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
|
---|---|---|---|---|---|
libpython/ben/icu_tools.py | longnow/panlex-tools | 8 | 71349 | <reponame>longnow/panlex-tools<gh_stars>1-10
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import icu
def all_glyphs(prop):
return [c.encode('utf-16', 'surrogatepass').decode('utf-16') for c in icu.UnicodeSetIterator(icu.UnicodeSet(r'[:{}:]'.format(prop)))]
def all_cps(prop):
return list(map(glyph_cp, all_glyphs(prop)))
def glyph_name(glyph, default=''):
if len(glyph) > 1:
raise TypeError('glyph must be a string with length of 1')
elif len(glyph) == 0:
return default
else:
return icu.Char.charName(glyph)
def cp_glyph(cp, default=''):
try:
return chr(int(cp, 16))
except ValueError:
return default
def cp_name(cp, default=''):
return glyph_name(cp_glyph(cp), default)
def glyph_cp(glyph):
return hex(ord(glyph))[2:]
class Rbnf:
def __init__(self, tag="spellout", locale="", rules=""):
if rules:
self._rbnf = icu.RuleBasedNumberFormat(rules)
else:
if tag.lower() not in {"spellout", "duration", "ordinal", "numbering_system"}:
raise ValueError("tag must be 'spellout', 'duration', 'ordinal', or 'numbering_system'")
self._rbnf = icu.RuleBasedNumberFormat(getattr(icu.URBNFRuleSetTag, tag.upper()), icu.Locale(locale))
def format(self, number):
return self._rbnf.format(number)
@property
def ruleset(self):
return self._rbnf.getDefaultRuleSetName()
@ruleset.setter
def ruleset(self, ruleset_name):
try:
self._rbnf.setDefaultRuleSet(ruleset_name)
except icu.ICUError:
raise ValueError(f"{ruleset_name} not a valid ruleset. See {self.__class__.__name__}.rulesets() for valid rulesets.")
def rulesets(self):
return {self._rbnf.getRuleSetName(i) for i in range(self._rbnf.getNumberOfRuleSetNames())}
def rules(self):
return self._rbnf.getRules()
def parse(self, string):
try:
return self._rbnf.parse(string)
except icu.ICUError:
raise ValueError("unable to parse string")
| [
1,
529,
276,
1112,
420,
29958,
5426,
3707,
29914,
8357,
2506,
29899,
8504,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
16077,
29884,
13,
13,
1753,
599,
29918,
16808,
561,
29879,
29898,
7728,
1125,
13,
1678,
736,
518,
29883,
29889,
12508,
877,
9420,
29899,
29896,
29953,
742,
525,
7610,
9102,
403,
3364,
2824,
13808,
877,
9420,
29899,
29896,
29953,
1495,
363,
274,
297,
16077,
29884,
29889,
2525,
12858,
2697,
20277,
29898,
293,
29884,
29889,
2525,
12858,
2697,
29898,
29878,
29915,
7503,
29912,
6177,
29962,
4286,
4830,
29898,
7728,
876,
4638,
13,
13,
1753,
599,
29918,
29883,
567,
29898,
7728,
1125,
13,
1678,
736,
1051,
29898,
1958,
29898,
16808,
561,
29918,
6814,
29892,
599,
29918,
16808,
561,
29879,
29898,
7728,
4961,
13,
13,
1753,
330,
27026,
29918,
978,
29898,
16808,
561,
29892,
2322,
2433,
29374,
13,
1678,
565,
7431,
29898,
16808,
561,
29897,
1405,
29871,
29896,
29901,
13,
4706,
12020,
20948,
877,
16808,
561,
1818,
367,
263,
1347,
411,
3309,
310,
29871,
29896,
1495,
13,
1678,
25342,
7431,
29898,
16808,
561,
29897,
1275,
29871,
29900,
29901,
13,
4706,
736,
2322,
13,
1678,
1683,
29901,
13,
4706,
736,
16077,
29884,
29889,
5914,
29889,
3090,
1170,
29898,
16808,
561,
29897,
13,
13,
1753,
21447,
29918,
16808,
561,
29898,
6814,
29892,
2322,
2433,
29374,
13,
1678,
1018,
29901,
13,
4706,
736,
18460,
29898,
524,
29898,
6814,
29892,
29871,
29896,
29953,
876,
13,
1678,
5174,
7865,
2392,
29901,
13,
4706,
736,
2322,
13,
13,
1753,
21447,
29918,
978,
29898,
6814,
29892,
2322,
2433,
29374,
13,
1678,
736,
330,
27026,
29918,
978,
29898,
6814,
29918,
16808,
561,
29898,
6814,
511,
2322,
29897,
13,
13,
1753,
330,
27026,
29918,
6814,
29898,
16808,
561,
1125,
13,
1678,
736,
15090,
29898,
536,
29898,
16808,
561,
876,
29961,
29906,
17531,
13,
13,
1990,
390,
11197,
29888,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4055,
543,
1028,
514,
449,
613,
15068,
543,
613,
6865,
13776,
1125,
13,
4706,
565,
6865,
29901,
13,
9651,
1583,
3032,
6050,
29876,
29888,
353,
16077,
29884,
29889,
10740,
29933,
1463,
4557,
5809,
29898,
19238,
29897,
13,
4706,
1683,
29901,
13,
9651,
565,
4055,
29889,
13609,
580,
451,
297,
8853,
1028,
514,
449,
613,
376,
19708,
613,
376,
536,
979,
613,
376,
4537,
292,
29918,
5205,
29908,
6177,
13,
18884,
12020,
7865,
2392,
703,
4039,
1818,
367,
525,
1028,
514,
449,
742,
525,
19708,
742,
525,
536,
979,
742,
470,
525,
4537,
292,
29918,
5205,
29915,
1159,
13,
9651,
1583,
3032,
6050,
29876,
29888,
353,
16077,
29884,
29889,
10740,
29933,
1463,
4557,
5809,
29898,
657,
5552,
29898,
293,
29884,
29889,
4574,
29933,
22498,
10740,
2697,
8176,
29892,
4055,
29889,
21064,
25739,
16077,
29884,
29889,
3524,
744,
29898,
23337,
876,
13,
13,
1678,
822,
3402,
29898,
1311,
29892,
1353,
1125,
13,
4706,
736,
1583,
3032,
6050,
29876,
29888,
29889,
4830,
29898,
4537,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
6865,
300,
29898,
1311,
1125,
13,
4706,
736,
1583,
3032,
6050,
29876,
29888,
29889,
657,
4592,
10740,
2697,
1170,
580,
13,
13,
1678,
732,
19238,
300,
29889,
842,
357,
13,
1678,
822,
6865,
300,
29898,
1311,
29892,
6865,
300,
29918,
978,
1125,
13,
4706,
1018,
29901,
13,
9651,
1583,
3032,
6050,
29876,
29888,
29889,
842,
4592,
10740,
2697,
29898,
19238,
300,
29918,
978,
29897,
13,
4706,
5174,
16077,
29884,
29889,
2965,
29965,
2392,
29901,
13,
9651,
12020,
7865,
2392,
29898,
29888,
29908,
29912,
19238,
300,
29918,
978,
29913,
451,
263,
2854,
6865,
300,
29889,
2823,
426,
1311,
17255,
1990,
1649,
17255,
978,
1649,
1836,
19238,
1691,
580,
363,
2854,
6865,
1691,
23157,
13,
268,
13,
1678,
822,
6865,
1691,
29898,
1311,
1125,
13,
4706,
736,
426,
1311,
3032,
6050,
29876,
29888,
29889,
657,
10740,
2697,
1170,
29898,
29875,
29897,
363,
474,
297,
3464,
29898,
1311,
3032,
6050,
29876,
29888,
29889,
657,
4557,
2776,
10740,
2697,
8659,
580,
2915,
13,
268,
13,
1678,
822,
6865,
29898,
1311,
1125,
13,
4706,
736,
1583,
3032,
6050,
29876,
29888,
29889,
657,
29934,
2540,
580,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
1347,
1125,
13,
4706,
1018,
29901,
13,
9651,
736,
1583,
3032,
6050,
29876,
29888,
29889,
5510,
29898,
1807,
29897,
13,
4706,
5174,
16077,
29884,
29889,
2965,
29965,
2392,
29901,
13,
9651,
12020,
7865,
2392,
703,
348,
519,
304,
6088,
1347,
1159,
13,
268,
13,
2
] |
tools/benchmark.py | openlabs/mongo-python-driver | 5 | 197346 | # Copyright 2009-2010 10gen, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""MongoDB benchmarking suite."""
import time
import sys
sys.path[0:0] = [""]
import datetime
import cProfile
from pymongo import connection
from pymongo import ASCENDING
trials = 2
per_trial = 5000
batch_size = 100
small = {}
medium = {"integer": 5,
"number": 5.05,
"boolean": False,
"array": ["test", "benchmark"]
}
# this is similar to the benchmark data posted to the user list
large = {"base_url": "http://www.example.com/test-me",
"total_word_count": 6743,
"access_time": datetime.datetime.utcnow(),
"meta_tags": {"description": "i am a long description string",
"author": "<NAME>",
"dynamically_created_meta_tag": "who know\n what"
},
"page_structure": {"counted_tags": 3450,
"no_of_js_attached": 10,
"no_of_images": 6
},
"harvested_words": ["10gen", "web", "open", "source", "application",
"paas", "platform-as-a-service", "technology",
"helps", "developers", "focus", "building",
"mongodb", "mongo"] * 20
}
def setup_insert(db, collection, object):
db.drop_collection(collection)
def insert(db, collection, object):
for i in range(per_trial):
to_insert = object.copy()
to_insert["x"] = i
db[collection].insert(to_insert)
def insert_batch(db, collection, object):
for i in range(per_trial / batch_size):
db[collection].insert([object] * batch_size)
def find_one(db, collection, x):
for _ in range(per_trial):
db[collection].find_one({"x": x})
def find(db, collection, x):
for _ in range(per_trial):
for _ in db[collection].find({"x": x}):
pass
def timed(name, function, args=[], setup=None):
times = []
for _ in range(trials):
if setup:
setup(*args)
start = time.time()
function(*args)
times.append(time.time() - start)
best_time = min(times)
print "%s%d" % (name + (60 - len(name)) * ".", per_trial / best_time)
return best_time
def main():
connection._TIMEOUT = 60 # jack up the timeout
c = connection.Connection()
c.drop_database("benchmark")
db = c.benchmark
timed("insert (small, no index)", insert,
[db, 'small_none', small], setup_insert)
timed("insert (medium, no index)", insert,
[db, 'medium_none', medium], setup_insert)
timed("insert (large, no index)", insert,
[db, 'large_none', large], setup_insert)
db.small_index.create_index("x", ASCENDING)
timed("insert (small, indexed)", insert, [db, 'small_index', small])
db.medium_index.create_index("x", ASCENDING)
timed("insert (medium, indexed)", insert, [db, 'medium_index', medium])
db.large_index.create_index("x", ASCENDING)
timed("insert (large, indexed)", insert, [db, 'large_index', large])
timed("batch insert (small, no index)", insert_batch,
[db, 'small_bulk', small], setup_insert)
timed("batch insert (medium, no index)", insert_batch,
[db, 'medium_bulk', medium], setup_insert)
timed("batch insert (large, no index)", insert_batch,
[db, 'large_bulk', large], setup_insert)
timed("find_one (small, no index)", find_one,
[db, 'small_none', per_trial / 2])
timed("find_one (medium, no index)", find_one,
[db, 'medium_none', per_trial / 2])
timed("find_one (large, no index)", find_one,
[db, 'large_none', per_trial / 2])
timed("find_one (small, indexed)", find_one,
[db, 'small_index', per_trial / 2])
timed("find_one (medium, indexed)", find_one,
[db, 'medium_index', per_trial / 2])
timed("find_one (large, indexed)", find_one,
[db, 'large_index', per_trial / 2])
timed("find (small, no index)", find, [db, 'small_none', per_trial / 2])
timed("find (medium, no index)", find, [db, 'medium_none', per_trial / 2])
timed("find (large, no index)", find, [db, 'large_none', per_trial / 2])
timed("find (small, indexed)", find, [db, 'small_index', per_trial / 2])
timed("find (medium, indexed)", find, [db, 'medium_index', per_trial / 2])
timed("find (large, indexed)", find, [db, 'large_index', per_trial / 2])
# timed("find range (small, no index)", find,
# [db, 'small_none',
# {"$gt": per_trial / 4, "$lt": 3 * per_trial / 4}])
# timed("find range (medium, no index)", find,
# [db, 'medium_none',
# {"$gt": per_trial / 4, "$lt": 3 * per_trial / 4}])
# timed("find range (large, no index)", find,
# [db, 'large_none',
# {"$gt": per_trial / 4, "$lt": 3 * per_trial / 4}])
timed("find range (small, indexed)", find,
[db, 'small_index',
{"$gt": per_trial / 2, "$lt": per_trial / 2 + batch_size}])
timed("find range (medium, indexed)", find,
[db, 'medium_index',
{"$gt": per_trial / 2, "$lt": per_trial / 2 + batch_size}])
timed("find range (large, indexed)", find,
[db, 'large_index',
{"$gt": per_trial / 2, "$lt": per_trial / 2 + batch_size}])
if __name__ == "__main__":
# cProfile.run("main()")
main()
| [
1,
396,
14187,
1266,
29871,
29906,
29900,
29900,
29929,
29899,
29906,
29900,
29896,
29900,
29871,
29896,
29900,
1885,
29892,
9266,
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,
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,
13,
15945,
29908,
29924,
7443,
4051,
23513,
292,
9460,
1213,
15945,
13,
13,
5215,
931,
13,
5215,
10876,
13,
9675,
29889,
2084,
29961,
29900,
29901,
29900,
29962,
353,
6796,
3108,
13,
13,
5215,
12865,
13,
5215,
274,
13909,
13,
13,
3166,
282,
962,
7443,
1053,
3957,
13,
3166,
282,
962,
7443,
1053,
18188,
11794,
4214,
13,
13,
3626,
1338,
353,
29871,
29906,
13,
546,
29918,
3626,
284,
353,
29871,
29945,
29900,
29900,
29900,
13,
16175,
29918,
2311,
353,
29871,
29896,
29900,
29900,
13,
9278,
353,
6571,
13,
27891,
353,
8853,
16031,
1115,
29871,
29945,
29892,
13,
3986,
376,
4537,
1115,
29871,
29945,
29889,
29900,
29945,
29892,
13,
3986,
376,
20054,
1115,
7700,
29892,
13,
3986,
376,
2378,
1115,
6796,
1688,
613,
376,
1785,
16580,
3108,
13,
3986,
500,
13,
29937,
445,
338,
2788,
304,
278,
23513,
848,
8059,
304,
278,
1404,
1051,
13,
16961,
353,
8853,
3188,
29918,
2271,
1115,
376,
1124,
597,
1636,
29889,
4773,
29889,
510,
29914,
1688,
29899,
1004,
613,
13,
308,
376,
7827,
29918,
1742,
29918,
2798,
1115,
29871,
29953,
29955,
29946,
29941,
29892,
13,
308,
376,
5943,
29918,
2230,
1115,
12865,
29889,
12673,
29889,
329,
29883,
3707,
3285,
13,
308,
376,
7299,
29918,
11338,
1115,
8853,
8216,
1115,
376,
29875,
626,
263,
1472,
6139,
1347,
613,
13,
462,
539,
376,
8921,
1115,
9872,
5813,
28341,
13,
462,
539,
376,
29881,
2926,
1711,
29918,
11600,
29918,
7299,
29918,
4039,
1115,
376,
15970,
1073,
29905,
29876,
825,
29908,
13,
462,
539,
2981,
13,
308,
376,
3488,
29918,
23905,
1115,
8853,
2798,
287,
29918,
11338,
1115,
29871,
29941,
29946,
29945,
29900,
29892,
13,
462,
9651,
376,
1217,
29918,
974,
29918,
1315,
29918,
1131,
3791,
1115,
29871,
29896,
29900,
29892,
13,
462,
9651,
376,
1217,
29918,
974,
29918,
8346,
1115,
29871,
29953,
13,
462,
9651,
2981,
13,
308,
376,
8222,
29894,
2868,
29918,
9303,
1115,
6796,
29896,
29900,
1885,
613,
376,
2676,
613,
376,
3150,
613,
376,
4993,
613,
376,
6214,
613,
13,
462,
632,
376,
3274,
294,
613,
376,
12120,
29899,
294,
29899,
29874,
29899,
5509,
613,
376,
21695,
3002,
613,
13,
462,
632,
376,
3952,
567,
613,
376,
17426,
613,
376,
18037,
613,
376,
25237,
613,
13,
462,
632,
376,
23264,
613,
376,
29885,
7443,
3108,
334,
29871,
29906,
29900,
13,
308,
500,
13,
13,
13,
1753,
6230,
29918,
7851,
29898,
2585,
29892,
4333,
29892,
1203,
1125,
13,
1678,
4833,
29889,
8865,
29918,
10855,
29898,
10855,
29897,
13,
13,
13,
1753,
4635,
29898,
2585,
29892,
4333,
29892,
1203,
1125,
13,
1678,
363,
474,
297,
3464,
29898,
546,
29918,
3626,
284,
1125,
13,
4706,
304,
29918,
7851,
353,
1203,
29889,
8552,
580,
13,
4706,
304,
29918,
7851,
3366,
29916,
3108,
353,
474,
13,
4706,
4833,
29961,
10855,
1822,
7851,
29898,
517,
29918,
7851,
29897,
13,
13,
13,
1753,
4635,
29918,
16175,
29898,
2585,
29892,
4333,
29892,
1203,
1125,
13,
1678,
363,
474,
297,
3464,
29898,
546,
29918,
3626,
284,
847,
9853,
29918,
2311,
1125,
13,
4706,
4833,
29961,
10855,
1822,
7851,
4197,
3318,
29962,
334,
9853,
29918,
2311,
29897,
13,
13,
13,
1753,
1284,
29918,
650,
29898,
2585,
29892,
4333,
29892,
921,
1125,
13,
1678,
363,
903,
297,
3464,
29898,
546,
29918,
3626,
284,
1125,
13,
4706,
4833,
29961,
10855,
1822,
2886,
29918,
650,
3319,
29908,
29916,
1115,
921,
1800,
13,
13,
13,
1753,
1284,
29898,
2585,
29892,
4333,
29892,
921,
1125,
13,
1678,
363,
903,
297,
3464,
29898,
546,
29918,
3626,
284,
1125,
13,
4706,
363,
903,
297,
4833,
29961,
10855,
1822,
2886,
3319,
29908,
29916,
1115,
921,
29913,
1125,
13,
9651,
1209,
13,
13,
13,
1753,
5335,
287,
29898,
978,
29892,
740,
29892,
6389,
11759,
1402,
6230,
29922,
8516,
1125,
13,
1678,
3064,
353,
5159,
13,
1678,
363,
903,
297,
3464,
29898,
3626,
1338,
1125,
13,
4706,
565,
6230,
29901,
13,
9651,
6230,
10456,
5085,
29897,
13,
4706,
1369,
353,
931,
29889,
2230,
580,
13,
4706,
740,
10456,
5085,
29897,
13,
4706,
3064,
29889,
4397,
29898,
2230,
29889,
2230,
580,
448,
1369,
29897,
13,
1678,
1900,
29918,
2230,
353,
1375,
29898,
3706,
29897,
13,
1678,
1596,
11860,
29879,
29995,
29881,
29908,
1273,
313,
978,
718,
313,
29953,
29900,
448,
7431,
29898,
978,
876,
334,
11393,
613,
639,
29918,
3626,
284,
847,
1900,
29918,
2230,
29897,
13,
1678,
736,
1900,
29918,
2230,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
3957,
3032,
15307,
12015,
353,
29871,
29953,
29900,
29871,
396,
28015,
701,
278,
11815,
13,
1678,
274,
353,
3957,
29889,
5350,
580,
13,
1678,
274,
29889,
8865,
29918,
9803,
703,
1785,
16580,
1159,
13,
1678,
4833,
353,
274,
29889,
1785,
16580,
13,
13,
1678,
5335,
287,
703,
7851,
313,
9278,
29892,
694,
2380,
19123,
4635,
29892,
13,
3986,
518,
2585,
29892,
525,
9278,
29918,
9290,
742,
2319,
1402,
6230,
29918,
7851,
29897,
13,
1678,
5335,
287,
703,
7851,
313,
27891,
29892,
694,
2380,
19123,
4635,
29892,
13,
3986,
518,
2585,
29892,
525,
27891,
29918,
9290,
742,
18350,
1402,
6230,
29918,
7851,
29897,
13,
1678,
5335,
287,
703,
7851,
313,
16961,
29892,
694,
2380,
19123,
4635,
29892,
13,
3986,
518,
2585,
29892,
525,
16961,
29918,
9290,
742,
2919,
1402,
6230,
29918,
7851,
29897,
13,
13,
1678,
4833,
29889,
9278,
29918,
2248,
29889,
3258,
29918,
2248,
703,
29916,
613,
18188,
11794,
4214,
29897,
13,
1678,
5335,
287,
703,
7851,
313,
9278,
29892,
27541,
19123,
4635,
29892,
518,
2585,
29892,
525,
9278,
29918,
2248,
742,
2319,
2314,
13,
1678,
4833,
29889,
27891,
29918,
2248,
29889,
3258,
29918,
2248,
703,
29916,
613,
18188,
11794,
4214,
29897,
13,
1678,
5335,
287,
703,
7851,
313,
27891,
29892,
27541,
19123,
4635,
29892,
518,
2585,
29892,
525,
27891,
29918,
2248,
742,
18350,
2314,
13,
1678,
4833,
29889,
16961,
29918,
2248,
29889,
3258,
29918,
2248,
703,
29916,
613,
18188,
11794,
4214,
29897,
13,
1678,
5335,
287,
703,
7851,
313,
16961,
29892,
27541,
19123,
4635,
29892,
518,
2585,
29892,
525,
16961,
29918,
2248,
742,
2919,
2314,
13,
13,
1678,
5335,
287,
703,
16175,
4635,
313,
9278,
29892,
694,
2380,
19123,
4635,
29918,
16175,
29892,
13,
3986,
518,
2585,
29892,
525,
9278,
29918,
8645,
29895,
742,
2319,
1402,
6230,
29918,
7851,
29897,
13,
1678,
5335,
287,
703,
16175,
4635,
313,
27891,
29892,
694,
2380,
19123,
4635,
29918,
16175,
29892,
13,
3986,
518,
2585,
29892,
525,
27891,
29918,
8645,
29895,
742,
18350,
1402,
6230,
29918,
7851,
29897,
13,
1678,
5335,
287,
703,
16175,
4635,
313,
16961,
29892,
694,
2380,
19123,
4635,
29918,
16175,
29892,
13,
3986,
518,
2585,
29892,
525,
16961,
29918,
8645,
29895,
742,
2919,
1402,
6230,
29918,
7851,
29897,
13,
13,
1678,
5335,
287,
703,
2886,
29918,
650,
313,
9278,
29892,
694,
2380,
19123,
1284,
29918,
650,
29892,
13,
3986,
518,
2585,
29892,
525,
9278,
29918,
9290,
742,
639,
29918,
3626,
284,
847,
29871,
29906,
2314,
13,
1678,
5335,
287,
703,
2886,
29918,
650,
313,
27891,
29892,
694,
2380,
19123,
1284,
29918,
650,
29892,
13,
3986,
518,
2585,
29892,
525,
27891,
29918,
9290,
742,
639,
29918,
3626,
284,
847,
29871,
29906,
2314,
13,
1678,
5335,
287,
703,
2886,
29918,
650,
313,
16961,
29892,
694,
2380,
19123,
1284,
29918,
650,
29892,
13,
3986,
518,
2585,
29892,
525,
16961,
29918,
9290,
742,
639,
29918,
3626,
284,
847,
29871,
29906,
2314,
13,
13,
1678,
5335,
287,
703,
2886,
29918,
650,
313,
9278,
29892,
27541,
19123,
1284,
29918,
650,
29892,
13,
3986,
518,
2585,
29892,
525,
9278,
29918,
2248,
742,
639,
29918,
3626,
284,
847,
29871,
29906,
2314,
13,
1678,
5335,
287,
703,
2886,
29918,
650,
313,
27891,
29892,
27541,
19123,
1284,
29918,
650,
29892,
13,
3986,
518,
2585,
29892,
525,
27891,
29918,
2248,
742,
639,
29918,
3626,
284,
847,
29871,
29906,
2314,
13,
1678,
5335,
287,
703,
2886,
29918,
650,
313,
16961,
29892,
27541,
19123,
1284,
29918,
650,
29892,
13,
3986,
518,
2585,
29892,
525,
16961,
29918,
2248,
742,
639,
29918,
3626,
284,
847,
29871,
29906,
2314,
13,
13,
1678,
5335,
287,
703,
2886,
313,
9278,
29892,
694,
2380,
19123,
1284,
29892,
518,
2585,
29892,
525,
9278,
29918,
9290,
742,
639,
29918,
3626,
284,
847,
29871,
29906,
2314,
13,
1678,
5335,
287,
703,
2886,
313,
27891,
29892,
694,
2380,
19123,
1284,
29892,
518,
2585,
29892,
525,
27891,
29918,
9290,
742,
639,
29918,
3626,
284,
847,
29871,
29906,
2314,
13,
1678,
5335,
287,
703,
2886,
313,
16961,
29892,
694,
2380,
19123,
1284,
29892,
518,
2585,
29892,
525,
16961,
29918,
9290,
742,
639,
29918,
3626,
284,
847,
29871,
29906,
2314,
13,
13,
1678,
5335,
287,
703,
2886,
313,
9278,
29892,
27541,
19123,
1284,
29892,
518,
2585,
29892,
525,
9278,
29918,
2248,
742,
639,
29918,
3626,
284,
847,
29871,
29906,
2314,
13,
1678,
5335,
287,
703,
2886,
313,
27891,
29892,
27541,
19123,
1284,
29892,
518,
2585,
29892,
525,
27891,
29918,
2248,
742,
639,
29918,
3626,
284,
847,
29871,
29906,
2314,
13,
1678,
5335,
287,
703,
2886,
313,
16961,
29892,
27541,
19123,
1284,
29892,
518,
2585,
29892,
525,
16961,
29918,
2248,
742,
639,
29918,
3626,
284,
847,
29871,
29906,
2314,
13,
13,
29937,
268,
5335,
287,
703,
2886,
3464,
313,
9278,
29892,
694,
2380,
19123,
1284,
29892,
13,
29937,
965,
518,
2585,
29892,
525,
9278,
29918,
9290,
742,
13,
29937,
9651,
8853,
29938,
4141,
1115,
639,
29918,
3626,
284,
847,
29871,
29946,
29892,
3908,
1896,
1115,
29871,
29941,
334,
639,
29918,
3626,
284,
847,
29871,
29946,
29913,
2314,
13,
29937,
268,
5335,
287,
703,
2886,
3464,
313,
27891,
29892,
694,
2380,
19123,
1284,
29892,
13,
29937,
965,
518,
2585,
29892,
525,
27891,
29918,
9290,
742,
13,
29937,
9651,
8853,
29938,
4141,
1115,
639,
29918,
3626,
284,
847,
29871,
29946,
29892,
3908,
1896,
1115,
29871,
29941,
334,
639,
29918,
3626,
284,
847,
29871,
29946,
29913,
2314,
13,
29937,
268,
5335,
287,
703,
2886,
3464,
313,
16961,
29892,
694,
2380,
19123,
1284,
29892,
13,
29937,
965,
518,
2585,
29892,
525,
16961,
29918,
9290,
742,
13,
29937,
9651,
8853,
29938,
4141,
1115,
639,
29918,
3626,
284,
847,
29871,
29946,
29892,
3908,
1896,
1115,
29871,
29941,
334,
639,
29918,
3626,
284,
847,
29871,
29946,
29913,
2314,
13,
13,
1678,
5335,
287,
703,
2886,
3464,
313,
9278,
29892,
27541,
19123,
1284,
29892,
13,
3986,
518,
2585,
29892,
525,
9278,
29918,
2248,
742,
13,
965,
8853,
29938,
4141,
1115,
639,
29918,
3626,
284,
847,
29871,
29906,
29892,
3908,
1896,
1115,
639,
29918,
3626,
284,
847,
29871,
29906,
718,
9853,
29918,
2311,
29913,
2314,
13,
1678,
5335,
287,
703,
2886,
3464,
313,
27891,
29892,
27541,
19123,
1284,
29892,
13,
3986,
518,
2585,
29892,
525,
27891,
29918,
2248,
742,
13,
965,
8853,
29938,
4141,
1115,
639,
29918,
3626,
284,
847,
29871,
29906,
29892,
3908,
1896,
1115,
639,
29918,
3626,
284,
847,
29871,
29906,
718,
9853,
29918,
2311,
29913,
2314,
13,
1678,
5335,
287,
703,
2886,
3464,
313,
16961,
29892,
27541,
19123,
1284,
29892,
13,
3986,
518,
2585,
29892,
525,
16961,
29918,
2248,
742,
13,
965,
8853,
29938,
4141,
1115,
639,
29918,
3626,
284,
847,
29871,
29906,
29892,
3908,
1896,
1115,
639,
29918,
3626,
284,
847,
29871,
29906,
718,
9853,
29918,
2311,
29913,
2314,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
29937,
1678,
274,
13909,
29889,
3389,
703,
3396,
580,
1159,
13,
1678,
1667,
580,
13,
2
] |
quantsbin/derivativepricing/namesnmapper.py | quantsbin/Quantsbin | 132 | 40746 | """
developed by Quantsbin - Jun'18
"""
from enum import Enum
class AssetClass(Enum):
EQOPTION = 'EqOption'
FXOPTION = 'FXOption'
FUTOPTION = 'FutOption'
COMOPTION = 'ComOption'
class DerivativeType(Enum):
VANILLA_OPTION = 'Vanilla Option'
class PricingModel(Enum):
BLACKSCHOLESMERTON = 'BSM'
BLACK76 = 'B76'
GK = 'GK'
MC_GBM = "MC_GBM"
MC_GBM_LSM = "MC_GBM_LSM"
BINOMIAL = "Binomial"
class UnderlyingParameters(Enum):
SPOT = "spot0"
VOLATILITY = "volatility"
PRICEDATE = "_pricing_date"
RF_RATE = "rf_rate"
CNV_YIELD = "cnv_yield"
COST_YIELD = "cost_yield"
UNEXPLAINED = "unexplained"
class RiskParameter(Enum):
DELTA = 'delta'
GAMMA = 'gamma'
THETA = 'theta'
VEGA = 'vega'
RHO = 'rho'
PHI = 'phi'
RHO_FOREIGN = 'rho_foreign'
RHO_CONV = 'rho_conv_yield'
class VanillaOptionType(Enum):
CALL = 'Call'
PUT = 'Put'
class ExpiryType(Enum):
AMERICAN = 'American'
EUROPEAN = 'European'
class UdlType(Enum):
INDEX = 'Index'
STOCK = 'Stock'
FX = 'Currency'
COMMODITY = 'Commodity'
FUTURES = 'Futures'
class DivType(Enum):
DISCRETE = 'Discrete'
YIELD = 'Yield'
OBJECT_MODEL = {
UdlType.STOCK.value: {ExpiryType.EUROPEAN.value: [PricingModel.BLACKSCHOLESMERTON.value, PricingModel.MC_GBM.value
, PricingModel.BINOMIAL.value],
ExpiryType.AMERICAN.value: [PricingModel.MC_GBM.value, PricingModel.BINOMIAL.value]}
, UdlType.FUTURES.value: {ExpiryType.EUROPEAN.value: [PricingModel.BLACK76.value, PricingModel.MC_GBM.value
, PricingModel.BINOMIAL.value],
ExpiryType.AMERICAN.value: [PricingModel.MC_GBM.value, PricingModel.BINOMIAL.value]}
, UdlType.FX.value: {ExpiryType.EUROPEAN.value: [PricingModel.GK.value, PricingModel.MC_GBM.value
, PricingModel.BINOMIAL.value],
ExpiryType.AMERICAN.value: [PricingModel.MC_GBM.value, PricingModel.BINOMIAL.value]}
, UdlType.COMMODITY.value: {ExpiryType.EUROPEAN.value: [PricingModel.GK.value, PricingModel.MC_GBM.value
, PricingModel.BINOMIAL.value],
ExpiryType.AMERICAN.value: [PricingModel.MC_GBM.value, PricingModel.BINOMIAL.value]}
}
DEFAULT_MODEL = {
UdlType.STOCK.value:
{DerivativeType.VANILLA_OPTION.value: {ExpiryType.EUROPEAN.value: PricingModel.BLACKSCHOLESMERTON.value,
ExpiryType.AMERICAN.value: PricingModel.BINOMIAL.value},
},
UdlType.FUTURES.value:
{DerivativeType.VANILLA_OPTION.value: {ExpiryType.EUROPEAN.value: PricingModel.BLACK76.value,
ExpiryType.AMERICAN.value: PricingModel.BINOMIAL.value},
},
UdlType.FX.value:
{DerivativeType.VANILLA_OPTION.value: {ExpiryType.EUROPEAN.value: PricingModel.GK.value,
ExpiryType.AMERICAN.value: PricingModel.BINOMIAL.value},
},
UdlType.COMMODITY.value:
{DerivativeType.VANILLA_OPTION.value: {ExpiryType.EUROPEAN.value: PricingModel.GK.value,
ExpiryType.AMERICAN.value: PricingModel.BINOMIAL.value},
}
}
IV_MODELS = [PricingModel.BLACKSCHOLESMERTON.value, PricingModel.BLACK76.value, PricingModel.GK.value]
ANALYTICAL_GREEKS = [PricingModel.BLACKSCHOLESMERTON.value, PricingModel.BLACK76.value, PricingModel.GK.value]
from . import pricingmodels as pm
MODEL_MAPPER = {
PricingModel.BLACKSCHOLESMERTON.value: pm.BSM,
PricingModel.BLACK76.value: pm.B76,
PricingModel.GK.value: pm.GK,
PricingModel.MC_GBM.value: pm.MonteCarloGBM,
PricingModel.BINOMIAL.value: pm.BinomialModel
}
| [
1,
9995,
13,
1678,
8906,
491,
751,
1934,
2109,
448,
8378,
29915,
29896,
29947,
13,
13,
15945,
29908,
13,
13,
3166,
14115,
1053,
1174,
398,
13,
13,
13,
1990,
1094,
842,
2385,
29898,
16854,
1125,
13,
1678,
382,
29984,
14094,
2725,
353,
525,
18630,
8375,
29915,
13,
1678,
383,
29990,
14094,
2725,
353,
525,
26753,
8375,
29915,
13,
1678,
383,
2692,
14094,
2725,
353,
525,
29943,
329,
8375,
29915,
13,
1678,
23353,
14094,
2725,
353,
525,
1523,
8375,
29915,
13,
13,
13,
1990,
2452,
440,
1230,
1542,
29898,
16854,
1125,
13,
1678,
478,
2190,
24071,
29909,
29918,
14094,
2725,
353,
525,
29963,
273,
2911,
10831,
29915,
13,
13,
13,
1990,
1588,
18499,
3195,
29898,
16854,
1125,
13,
1678,
350,
29931,
11375,
29903,
3210,
29949,
1307,
17061,
20161,
1164,
353,
525,
9851,
29924,
29915,
13,
1678,
350,
29931,
11375,
29955,
29953,
353,
525,
29933,
29955,
29953,
29915,
13,
1678,
402,
29968,
353,
525,
29954,
29968,
29915,
13,
1678,
21271,
29918,
7210,
29924,
353,
376,
12513,
29918,
7210,
29924,
29908,
13,
1678,
21271,
29918,
7210,
29924,
29918,
8547,
29924,
353,
376,
12513,
29918,
7210,
29924,
29918,
8547,
29924,
29908,
13,
1678,
350,
1177,
6488,
25758,
353,
376,
29933,
262,
7615,
29908,
13,
13,
13,
1990,
7634,
5890,
11507,
29898,
16854,
1125,
13,
1678,
10937,
2891,
353,
376,
17500,
29900,
29908,
13,
1678,
478,
5607,
1299,
6227,
11937,
353,
376,
1555,
271,
1793,
29908,
13,
1678,
12089,
2965,
3352,
3040,
353,
11119,
558,
18499,
29918,
1256,
29908,
13,
1678,
390,
29943,
29918,
29934,
3040,
353,
376,
9600,
29918,
10492,
29908,
13,
1678,
315,
29940,
29963,
29918,
29979,
29902,
27286,
353,
376,
18038,
29894,
29918,
29891,
969,
29908,
13,
1678,
315,
3718,
29918,
29979,
29902,
27286,
353,
376,
18253,
29918,
29891,
969,
29908,
13,
1678,
8291,
5746,
29925,
4375,
1177,
3352,
353,
376,
348,
4548,
433,
1312,
29908,
13,
13,
13,
1990,
390,
3873,
9329,
29898,
16854,
1125,
13,
1678,
5012,
5850,
29909,
353,
525,
4181,
29915,
13,
1678,
402,
5194,
1529,
353,
525,
4283,
29915,
13,
1678,
3446,
2544,
29909,
353,
525,
3416,
29915,
13,
1678,
478,
11787,
29909,
353,
525,
345,
3249,
29915,
13,
1678,
390,
8187,
353,
525,
4650,
29915,
13,
1678,
349,
17628,
353,
525,
2876,
29915,
13,
1678,
390,
8187,
29918,
5800,
1525,
17298,
353,
525,
4650,
29918,
1079,
647,
29915,
13,
1678,
390,
8187,
29918,
6007,
29963,
353,
525,
4650,
29918,
20580,
29918,
29891,
969,
29915,
13,
13,
13,
1990,
6556,
2911,
8375,
1542,
29898,
16854,
1125,
13,
1678,
315,
9818,
353,
525,
5594,
29915,
13,
1678,
349,
2692,
353,
525,
22908,
29915,
13,
13,
13,
1990,
12027,
16129,
1542,
29898,
16854,
1125,
13,
1678,
13862,
1001,
2965,
2190,
353,
525,
14689,
29915,
13,
1678,
19007,
1672,
4162,
2190,
353,
525,
15654,
273,
29915,
13,
13,
13,
1990,
501,
11671,
1542,
29898,
16854,
1125,
13,
1678,
2672,
19577,
353,
525,
3220,
29915,
13,
1678,
317,
4986,
7077,
353,
525,
20754,
384,
29915,
13,
1678,
383,
29990,
353,
525,
29907,
10880,
29915,
13,
1678,
23353,
6720,
29928,
11937,
353,
525,
1523,
1545,
537,
29915,
13,
1678,
383,
2692,
11499,
29903,
353,
525,
29943,
329,
1973,
29915,
13,
13,
13,
1990,
4910,
1542,
29898,
16854,
1125,
13,
1678,
28657,
22245,
4330,
353,
525,
4205,
9084,
29915,
13,
1678,
612,
29902,
27286,
353,
525,
29979,
969,
29915,
13,
13,
13,
14824,
17637,
29918,
20387,
29931,
353,
426,
13,
1678,
501,
11671,
1542,
29889,
1254,
29949,
7077,
29889,
1767,
29901,
426,
9544,
16129,
1542,
29889,
29923,
29965,
1672,
4162,
2190,
29889,
1767,
29901,
518,
29925,
2200,
292,
3195,
29889,
13367,
11375,
29903,
3210,
29949,
1307,
17061,
20161,
1164,
29889,
1767,
29892,
1588,
18499,
3195,
29889,
12513,
29918,
7210,
29924,
29889,
1767,
13,
462,
3986,
1919,
1588,
18499,
3195,
29889,
29933,
1177,
6488,
25758,
29889,
1767,
1402,
13,
462,
3986,
12027,
16129,
1542,
29889,
5194,
1001,
2965,
2190,
29889,
1767,
29901,
518,
29925,
2200,
292,
3195,
29889,
12513,
29918,
7210,
29924,
29889,
1767,
29892,
1588,
18499,
3195,
29889,
29933,
1177,
6488,
25758,
29889,
1767,
12258,
13,
1678,
1919,
501,
11671,
1542,
29889,
29943,
2692,
11499,
29903,
29889,
1767,
29901,
426,
9544,
16129,
1542,
29889,
29923,
29965,
1672,
4162,
2190,
29889,
1767,
29901,
518,
29925,
2200,
292,
3195,
29889,
13367,
11375,
29955,
29953,
29889,
1767,
29892,
1588,
18499,
3195,
29889,
12513,
29918,
7210,
29924,
29889,
1767,
13,
462,
795,
1919,
1588,
18499,
3195,
29889,
29933,
1177,
6488,
25758,
29889,
1767,
1402,
13,
462,
795,
12027,
16129,
1542,
29889,
5194,
1001,
2965,
2190,
29889,
1767,
29901,
29871,
518,
29925,
2200,
292,
3195,
29889,
12513,
29918,
7210,
29924,
29889,
1767,
29892,
1588,
18499,
3195,
29889,
29933,
1177,
6488,
25758,
29889,
1767,
12258,
13,
1678,
1919,
501,
11671,
1542,
29889,
26753,
29889,
1767,
29901,
29871,
426,
9544,
16129,
1542,
29889,
29923,
29965,
1672,
4162,
2190,
29889,
1767,
29901,
518,
29925,
2200,
292,
3195,
29889,
29954,
29968,
29889,
1767,
29892,
1588,
18499,
3195,
29889,
12513,
29918,
7210,
29924,
29889,
1767,
13,
462,
3986,
1919,
1588,
18499,
3195,
29889,
29933,
1177,
6488,
25758,
29889,
1767,
1402,
13,
462,
3986,
12027,
16129,
1542,
29889,
5194,
1001,
2965,
2190,
29889,
1767,
29901,
29871,
518,
29925,
2200,
292,
3195,
29889,
12513,
29918,
7210,
29924,
29889,
1767,
29892,
1588,
18499,
3195,
29889,
29933,
1177,
6488,
25758,
29889,
1767,
12258,
13,
1678,
1919,
501,
11671,
1542,
29889,
19795,
6720,
29928,
11937,
29889,
1767,
29901,
426,
9544,
16129,
1542,
29889,
29923,
29965,
1672,
4162,
2190,
29889,
1767,
29901,
518,
29925,
2200,
292,
3195,
29889,
29954,
29968,
29889,
1767,
29892,
1588,
18499,
3195,
29889,
12513,
29918,
7210,
29924,
29889,
1767,
13,
462,
18884,
1919,
1588,
18499,
3195,
29889,
29933,
1177,
6488,
25758,
29889,
1767,
1402,
13,
462,
18884,
12027,
16129,
1542,
29889,
5194,
1001,
2965,
2190,
29889,
1767,
29901,
518,
29925,
2200,
292,
3195,
29889,
12513,
29918,
7210,
29924,
29889,
1767,
29892,
1588,
18499,
3195,
29889,
29933,
1177,
6488,
25758,
29889,
1767,
12258,
13,
1678,
500,
13,
13,
23397,
29918,
20387,
29931,
353,
426,
13,
1678,
501,
11671,
1542,
29889,
1254,
29949,
7077,
29889,
1767,
29901,
13,
4706,
426,
15383,
440,
1230,
1542,
29889,
29963,
2190,
24071,
29909,
29918,
14094,
2725,
29889,
1767,
29901,
426,
9544,
16129,
1542,
29889,
29923,
29965,
1672,
4162,
2190,
29889,
1767,
29901,
1588,
18499,
3195,
29889,
13367,
11375,
29903,
3210,
29949,
1307,
17061,
20161,
1164,
29889,
1767,
29892,
13,
462,
462,
1669,
12027,
16129,
1542,
29889,
5194,
1001,
2965,
2190,
29889,
1767,
29901,
1588,
18499,
3195,
29889,
29933,
1177,
6488,
25758,
29889,
1767,
1118,
13,
308,
2981,
13,
1678,
501,
11671,
1542,
29889,
29943,
2692,
11499,
29903,
29889,
1767,
29901,
13,
4706,
426,
15383,
440,
1230,
1542,
29889,
29963,
2190,
24071,
29909,
29918,
14094,
2725,
29889,
1767,
29901,
426,
9544,
16129,
1542,
29889,
29923,
29965,
1672,
4162,
2190,
29889,
1767,
29901,
1588,
18499,
3195,
29889,
13367,
11375,
29955,
29953,
29889,
1767,
29892,
13,
462,
462,
1669,
12027,
16129,
1542,
29889,
5194,
1001,
2965,
2190,
29889,
1767,
29901,
1588,
18499,
3195,
29889,
29933,
1177,
6488,
25758,
29889,
1767,
1118,
13,
308,
2981,
13,
1678,
501,
11671,
1542,
29889,
26753,
29889,
1767,
29901,
13,
4706,
426,
15383,
440,
1230,
1542,
29889,
29963,
2190,
24071,
29909,
29918,
14094,
2725,
29889,
1767,
29901,
426,
9544,
16129,
1542,
29889,
29923,
29965,
1672,
4162,
2190,
29889,
1767,
29901,
1588,
18499,
3195,
29889,
29954,
29968,
29889,
1767,
29892,
13,
462,
462,
1669,
12027,
16129,
1542,
29889,
5194,
1001,
2965,
2190,
29889,
1767,
29901,
1588,
18499,
3195,
29889,
29933,
1177,
6488,
25758,
29889,
1767,
1118,
13,
308,
2981,
13,
1678,
501,
11671,
1542,
29889,
19795,
6720,
29928,
11937,
29889,
1767,
29901,
13,
4706,
426,
15383,
440,
1230,
1542,
29889,
29963,
2190,
24071,
29909,
29918,
14094,
2725,
29889,
1767,
29901,
426,
9544,
16129,
1542,
29889,
29923,
29965,
1672,
4162,
2190,
29889,
1767,
29901,
1588,
18499,
3195,
29889,
29954,
29968,
29889,
1767,
29892,
13,
462,
462,
1669,
12027,
16129,
1542,
29889,
5194,
1001,
2965,
2190,
29889,
1767,
29901,
1588,
18499,
3195,
29889,
29933,
1177,
6488,
25758,
29889,
1767,
1118,
13,
308,
500,
13,
1678,
500,
13,
13,
5667,
29918,
20387,
8547,
353,
518,
29925,
2200,
292,
3195,
29889,
13367,
11375,
29903,
3210,
29949,
1307,
17061,
20161,
1164,
29889,
1767,
29892,
1588,
18499,
3195,
29889,
13367,
11375,
29955,
29953,
29889,
1767,
29892,
1588,
18499,
3195,
29889,
29954,
29968,
29889,
1767,
29962,
13,
13,
2190,
1964,
29979,
29911,
2965,
1964,
29918,
29954,
21661,
17557,
353,
518,
29925,
2200,
292,
3195,
29889,
13367,
11375,
29903,
3210,
29949,
1307,
17061,
20161,
1164,
29889,
1767,
29892,
1588,
18499,
3195,
29889,
13367,
11375,
29955,
29953,
29889,
1767,
29892,
1588,
18499,
3195,
29889,
29954,
29968,
29889,
1767,
29962,
13,
13,
3166,
869,
1053,
544,
18499,
9794,
408,
26354,
13,
13,
20387,
29931,
29918,
23827,
13171,
353,
426,
13,
1678,
1588,
18499,
3195,
29889,
13367,
11375,
29903,
3210,
29949,
1307,
17061,
20161,
1164,
29889,
1767,
29901,
26354,
29889,
9851,
29924,
29892,
13,
1678,
1588,
18499,
3195,
29889,
13367,
11375,
29955,
29953,
29889,
1767,
29901,
26354,
29889,
29933,
29955,
29953,
29892,
13,
1678,
1588,
18499,
3195,
29889,
29954,
29968,
29889,
1767,
29901,
26354,
29889,
29954,
29968,
29892,
13,
1678,
1588,
18499,
3195,
29889,
12513,
29918,
7210,
29924,
29889,
1767,
29901,
26354,
29889,
7185,
371,
8179,
417,
7210,
29924,
29892,
13,
1678,
1588,
18499,
3195,
29889,
29933,
1177,
6488,
25758,
29889,
1767,
29901,
26354,
29889,
29933,
262,
7615,
3195,
13,
1678,
500,
13,
2
] |
blender/nodes/element/mpm.py | LewisOrton/taichi_elements_houdini | 1 | 190769 | from .. import base
class ElementsMpmSolverNode(base.BaseNode):
bl_idname = 'elements_mpm_solver_node'
bl_label = 'MPM Solver'
required_nodes = {
'Domain Object': [
'elements_source_object_node',
],
}
category = base.ELEMENT
def init(self, context):
self.width = 180.0
out = self.outputs.new('elements_struct_socket', 'MPM Solver')
out.text = 'Solver Settings'
domain_obj = self.inputs.new('elements_struct_socket', 'Domain Object')
domain_obj.text = 'Domain Object'
res = self.inputs.new('elements_integer_socket', 'Resolution')
res.text = 'Resolution'
res.default = 64
size = self.inputs.new('elements_float_socket', 'Size')
size.text = 'Size'
size.default = 10.0
| [
1,
515,
6317,
1053,
2967,
13,
13,
13,
1990,
10619,
29879,
29924,
3358,
13296,
369,
4247,
29898,
3188,
29889,
5160,
4247,
1125,
13,
1678,
1999,
29918,
333,
978,
353,
525,
17664,
29918,
1526,
29885,
29918,
2929,
369,
29918,
3177,
29915,
13,
1678,
1999,
29918,
1643,
353,
525,
3580,
29924,
4956,
369,
29915,
13,
13,
1678,
3734,
29918,
18010,
353,
426,
13,
4706,
525,
15951,
4669,
2396,
518,
13,
9651,
525,
17664,
29918,
4993,
29918,
3318,
29918,
3177,
742,
13,
4706,
21251,
13,
1678,
500,
13,
1678,
7663,
353,
2967,
29889,
29923,
1307,
13780,
13,
13,
1678,
822,
2069,
29898,
1311,
29892,
3030,
1125,
13,
4706,
1583,
29889,
2103,
353,
29871,
29896,
29947,
29900,
29889,
29900,
13,
13,
4706,
714,
353,
1583,
29889,
4905,
29879,
29889,
1482,
877,
17664,
29918,
4984,
29918,
11514,
742,
525,
3580,
29924,
4956,
369,
1495,
13,
4706,
714,
29889,
726,
353,
525,
13296,
369,
19215,
29915,
13,
13,
4706,
5354,
29918,
5415,
353,
1583,
29889,
2080,
29879,
29889,
1482,
877,
17664,
29918,
4984,
29918,
11514,
742,
525,
15951,
4669,
1495,
13,
4706,
5354,
29918,
5415,
29889,
726,
353,
525,
15951,
4669,
29915,
13,
13,
4706,
620,
353,
1583,
29889,
2080,
29879,
29889,
1482,
877,
17664,
29918,
16031,
29918,
11514,
742,
525,
12375,
918,
1495,
13,
4706,
620,
29889,
726,
353,
525,
12375,
918,
29915,
13,
4706,
620,
29889,
4381,
353,
29871,
29953,
29946,
13,
13,
4706,
2159,
353,
1583,
29889,
2080,
29879,
29889,
1482,
877,
17664,
29918,
7411,
29918,
11514,
742,
525,
3505,
1495,
13,
4706,
2159,
29889,
726,
353,
525,
3505,
29915,
13,
4706,
2159,
29889,
4381,
353,
29871,
29896,
29900,
29889,
29900,
13,
2
] |
riglib/kinarmsocket.py | sgowda/brain-python-interface | 7 | 126558 | <reponame>sgowda/brain-python-interface<filename>riglib/kinarmsocket.py
import socket
import struct
import time
import numpy as np
class KinarmSocket(object):
''' Method for receiving UDP packets from Kinarm. The kinarm must be running the Dexterit-E task
called 'PK_send_UDP_kinarm', or any task with a 'UDP Send Binary' block which is located in the
xPC target tab of the Simulink library. Note: The normal 'UDP Send' input will NOT work -- packets
will not be sent since the Dexterit task computer does not receive them (the xPC machine does).
The socket port that packets are sent to is also configured in this UDP Send Binary block.
Data format is double --> binary byte packing with Byte alignment = 1 (From Matlab: "The byte alignment
field specifies how the data types are aligned. The possible values are: 1, 2, 4, and 8. The byte
alignment scheme is simple, and starts each element in the list of signals on a boundary specified
by the alignment relative to the start of the vector."")
Packet received are 3 x 50 matrix. Refer to Dexterit Manual (on desktop of Dexterit task computer) for
what the rows / columns refer to (page 71/82).
'''
def __init__(self, addr=('192.168.0.8', 9090)):
''' Self-IP address is: 192.168.0.8 set manually. Once fully migrating system over to BMI3d,
will need to adjust for new IPs'''
#Set up UDP socket (specificed by socket.SOCK_DGRAM. TCP woudl use socket.SOCK_STREAM)
self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
#Free up port for use if you just ran task:
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
#Bind address
self.socket.bind(addr)
self.data_size = 1200 # 3 x 50 x 8 bytes (double)
self.remote_ip = '192.168.0.2'
def _test_connected(self):
try:
data, add = self.socket.recvfrom(1200)
unpacked_ = struct.unpack('150d', data)
assert len(unpacked_) == 150
self.connected = True
except:
print('Make sure Kinarm Task is running - error in recieving packets')
self.connected = False
def connect(self):
self._test_connected()
def get_data(self):
'''
A generator which yields packets as they are received
'''
assert self.connected, "Socket is not connected, cannot get data"
while self.connected:
packet, address = self.socket.recvfrom(self.data_size)
#Make sure packet is from correct address:
if address[0] == self.remote_ip:
arrival_ts = time.time()
data = np.array(struct.unpack('150d', packet))
if data.shape[0] == 150:
#reshape data into 3 x 50
kindata = data.reshape(50,3).T
#kindata = np.hstack((kindata, np.zeros((3, 1))))
#kindata[:, -1] = arrival_ts
yield kindata
def disconnect(self):
self.socket.close()
self.connected = False
def __del__(self):
self.disconnect()
| [
1,
529,
276,
1112,
420,
29958,
5311,
340,
1388,
29914,
2634,
262,
29899,
4691,
29899,
13248,
29966,
9507,
29958,
8966,
1982,
29914,
9089,
2817,
11514,
29889,
2272,
13,
5215,
9909,
13,
5215,
2281,
13,
5215,
931,
13,
5215,
12655,
408,
7442,
13,
13,
1990,
20311,
2817,
11373,
29898,
3318,
1125,
13,
1678,
14550,
8108,
363,
13442,
501,
11191,
23912,
515,
20311,
2817,
29889,
450,
19015,
2817,
1818,
367,
2734,
278,
360,
735,
357,
277,
29899,
29923,
3414,
29871,
13,
1678,
2000,
525,
21738,
29918,
6717,
29918,
29965,
11191,
29918,
9089,
2817,
742,
470,
738,
3414,
411,
263,
525,
29965,
11191,
15076,
29479,
29915,
2908,
607,
338,
5982,
297,
278,
29871,
13,
1678,
921,
9026,
3646,
4434,
310,
278,
3439,
352,
682,
3489,
29889,
3940,
29901,
450,
4226,
525,
29965,
11191,
15076,
29915,
1881,
674,
6058,
664,
1192,
23912,
13,
1678,
674,
451,
367,
2665,
1951,
278,
360,
735,
357,
277,
3414,
6601,
947,
451,
7150,
963,
313,
1552,
921,
9026,
4933,
947,
467,
29871,
13,
13,
1678,
450,
9909,
2011,
393,
23912,
526,
2665,
304,
338,
884,
13252,
297,
445,
501,
11191,
15076,
29479,
2908,
29889,
29871,
13,
13,
1678,
3630,
3402,
338,
3765,
6660,
7581,
7023,
4870,
292,
411,
19831,
22239,
353,
29871,
29896,
313,
4591,
5345,
8205,
29901,
376,
1576,
7023,
22239,
29871,
13,
4706,
1746,
1580,
11057,
920,
278,
848,
4072,
526,
26118,
29889,
450,
1950,
1819,
526,
29901,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29946,
29892,
322,
29871,
29947,
29889,
450,
7023,
29871,
13,
4706,
22239,
11380,
338,
2560,
29892,
322,
8665,
1269,
1543,
297,
278,
1051,
310,
18470,
373,
263,
10452,
6790,
29871,
13,
4706,
491,
278,
22239,
6198,
304,
278,
1369,
310,
278,
4608,
1213,
1159,
13,
13,
1678,
18744,
300,
4520,
526,
29871,
29941,
921,
29871,
29945,
29900,
4636,
29889,
4118,
304,
360,
735,
357,
277,
2315,
950,
313,
265,
14616,
310,
360,
735,
357,
277,
3414,
6601,
29897,
363,
29871,
13,
1678,
825,
278,
4206,
847,
4341,
2737,
304,
313,
3488,
29871,
29955,
29896,
29914,
29947,
29906,
467,
259,
13,
1678,
14550,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
28915,
29922,
877,
29896,
29929,
29906,
29889,
29896,
29953,
29947,
29889,
29900,
29889,
29947,
742,
29871,
29929,
29900,
29929,
29900,
22164,
13,
4706,
14550,
21782,
29899,
5690,
3211,
338,
29901,
29871,
29896,
29929,
29906,
29889,
29896,
29953,
29947,
29889,
29900,
29889,
29947,
731,
7522,
29889,
9038,
8072,
9725,
1218,
1788,
975,
304,
350,
10403,
29941,
29881,
29892,
29871,
13,
4706,
674,
817,
304,
10365,
363,
716,
5641,
29879,
12008,
13,
13,
4706,
396,
2697,
701,
501,
11191,
9909,
313,
14940,
287,
491,
9909,
29889,
6156,
7077,
29918,
29928,
29954,
25058,
29889,
19374,
281,
2736,
29880,
671,
9909,
29889,
6156,
7077,
29918,
1254,
1525,
5194,
29897,
13,
4706,
1583,
29889,
11514,
353,
9909,
29889,
11514,
29898,
11514,
29889,
5098,
29918,
1177,
2544,
29892,
9909,
29889,
6156,
7077,
29918,
29928,
29954,
25058,
29897,
29871,
13,
13,
4706,
396,
20475,
701,
2011,
363,
671,
565,
366,
925,
6350,
3414,
29901,
13,
4706,
1583,
29889,
11514,
29889,
842,
21852,
3670,
29898,
11514,
29889,
29903,
5607,
29918,
6156,
7077,
2544,
29892,
9909,
29889,
6156,
29918,
1525,
17171,
3035,
8353,
29892,
29871,
29896,
29897,
13,
308,
13,
4706,
396,
15708,
3211,
13,
4706,
1583,
29889,
11514,
29889,
5355,
29898,
10030,
29897,
13,
4706,
1583,
29889,
1272,
29918,
2311,
353,
29871,
29896,
29906,
29900,
29900,
396,
29871,
29941,
921,
29871,
29945,
29900,
921,
29871,
29947,
6262,
313,
8896,
29897,
13,
4706,
1583,
29889,
16674,
29918,
666,
353,
525,
29896,
29929,
29906,
29889,
29896,
29953,
29947,
29889,
29900,
29889,
29906,
29915,
13,
13,
1678,
822,
903,
1688,
29918,
18045,
29898,
1311,
1125,
13,
4706,
1018,
29901,
13,
9651,
848,
29892,
788,
353,
1583,
29889,
11514,
29889,
3757,
29894,
3166,
29898,
29896,
29906,
29900,
29900,
29897,
13,
9651,
443,
4058,
287,
29918,
353,
2281,
29889,
348,
4058,
877,
29896,
29945,
29900,
29881,
742,
848,
29897,
13,
9651,
4974,
7431,
29898,
348,
4058,
287,
19925,
1275,
29871,
29896,
29945,
29900,
13,
9651,
1583,
29889,
18045,
353,
5852,
13,
4706,
5174,
29901,
13,
9651,
1596,
877,
9984,
1854,
20311,
2817,
9330,
338,
2734,
448,
1059,
297,
1162,
15387,
23912,
1495,
13,
9651,
1583,
29889,
18045,
353,
7700,
13,
13,
1678,
822,
4511,
29898,
1311,
1125,
13,
4706,
1583,
3032,
1688,
29918,
18045,
580,
13,
13,
1678,
822,
679,
29918,
1272,
29898,
1311,
1125,
13,
4706,
14550,
13,
4706,
319,
15299,
607,
17498,
23912,
408,
896,
526,
4520,
13,
4706,
14550,
13,
13,
4706,
4974,
1583,
29889,
18045,
29892,
376,
11373,
338,
451,
6631,
29892,
2609,
679,
848,
29908,
13,
308,
13,
4706,
1550,
1583,
29889,
18045,
29901,
13,
9651,
18203,
29892,
3211,
353,
1583,
29889,
11514,
29889,
3757,
29894,
3166,
29898,
1311,
29889,
1272,
29918,
2311,
29897,
13,
13,
9651,
396,
9984,
1854,
18203,
338,
515,
1959,
3211,
29901,
29871,
13,
9651,
565,
3211,
29961,
29900,
29962,
1275,
1583,
29889,
16674,
29918,
666,
29901,
13,
18884,
18517,
29918,
1372,
353,
931,
29889,
2230,
580,
13,
18884,
848,
353,
7442,
29889,
2378,
29898,
4984,
29889,
348,
4058,
877,
29896,
29945,
29900,
29881,
742,
18203,
876,
13,
13,
18884,
565,
848,
29889,
12181,
29961,
29900,
29962,
1275,
29871,
29896,
29945,
29900,
29901,
13,
462,
1678,
396,
690,
14443,
848,
964,
29871,
29941,
921,
29871,
29945,
29900,
13,
462,
1678,
2924,
532,
353,
848,
29889,
690,
14443,
29898,
29945,
29900,
29892,
29941,
467,
29911,
13,
462,
1678,
396,
14380,
532,
353,
7442,
29889,
29882,
1429,
3552,
14380,
532,
29892,
7442,
29889,
3298,
359,
3552,
29941,
29892,
29871,
29896,
13697,
13,
462,
1678,
396,
14380,
532,
7503,
29892,
448,
29896,
29962,
353,
18517,
29918,
1372,
13,
462,
1678,
7709,
2924,
532,
13,
13,
1678,
822,
766,
6915,
29898,
1311,
1125,
13,
4706,
1583,
29889,
11514,
29889,
5358,
580,
13,
4706,
1583,
29889,
18045,
353,
7700,
13,
13,
1678,
822,
4770,
6144,
12035,
1311,
1125,
13,
4706,
1583,
29889,
2218,
6915,
580,
13,
13,
13,
13,
13,
2
] |
ni-usb-datalogger/tests/data_stream.py | chapdbr/ni-usb-datalogger | 0 | 1611067 | <gh_stars>0
# Libraries
# For plotting app
import time
import dash
import dash_core_components as dcc
import dash_html_components as html
from collections import deque
import plotly.graph_objs as go
import logging
# Stop suppress dash server posts to console
log = logging.getLogger('werkzeug')
log.setLevel(logging.ERROR)
# Define app vars
app = dash.Dash('sensor-data')
maxLineLength = 20
max_length = 20
times = deque(maxlen=max_length)
fx = deque(maxlen=max_length)
fy = deque(maxlen=max_length)
fz = deque(maxlen=max_length)
mx = deque(maxlen=max_length)
my = deque(maxlen=max_length)
mz = deque(maxlen=max_length)
data_dict = {"Force en X":fx,
"Force en Y":fy,
"Force en Z":fz,
"Moment en X":mx,
"Moment en Y":my,
"Moment en Z":mz}
def read_data():
with open('ATI45.txt', 'r') as log:
data_in = list(log)[-1]
data_out = data_in.split(",")
return data_out
def add_data_to_plot(data):
times.append(time.time())
fx.append(data[1])
fy.append(data[2])
fz.append(data[3])
#mx.append(data_tared_cal[3,0])
#my.append(data_tared_cal[4,0])
#mz.append(data_tared_cal[5,0])
return times, fx, fy, fz
def init_time():
global start_time
start_time = time.time()
return
# Initialize values
times, fx, fy, fz = add_data_to_plot(read_data())
# Define app layout
app.layout = html.Div([
html.Div([
html.H2('Sensor Data',
style={'float': 'left',
}),
]),
dcc.Dropdown(id='sensor-data-name', #dropdown menu
options=[{'label': s, 'value': s}
for s in data_dict.keys()],
value=['Force en X', 'Force en Y', 'Force en Z'], #default values at startup
multi=True
),
html.Div(children=html.Div(id='graphs'), className='row'),
dcc.Interval(
id='graph-update',
interval=500, #graph update interval in ms
n_intervals=0)
], className="container",style={'width':'98%','margin-left':10,'margin-right':10,'max-width':50000}) #maxwidth peut être enlevé si vu sur ordi
@app.callback(
dash.dependencies.Output('graphs','children'),
[dash.dependencies.Input('sensor-data-name', 'value')],
events=[dash.dependencies.Event('graph-update', 'interval')]
)
def update_graph(data_names):
graphs = []
data = read_data()
add_data_to_plot(data)
if len(data_names)>2:
class_choice = 'col s12 m6 l4'
elif len(data_names) == 2:
class_choice = 'col s12 m6 l6'
else:
class_choice = 'col s12'
for data_name in data_names:
data = go.Scatter(
x=list(times),
y=list(data_dict[data_name]),
name='Scatter',
fill="tozeroy",
fillcolor="#6897bb"
)
graphs.append(html.Div(dcc.Graph(
id=data_name,
animate=True,
figure={'data': [data],'layout' : go.Layout(xaxis=dict(range=[min(times),max(times)]),
yaxis=dict(range=[-100,100]),
margin={'l':50,'r':1,'t':45,'b':1},
title='{}'.format(data_name))}
), className=class_choice))
return graphs
external_css = ["https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css"]
for css in external_css:
app.css.append_css({"external_url": css})
external_js = ['https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js']
for js in external_css:
app.scripts.append_script({'external_url': js})
if __name__ == '__main__':
app.run_server(debug=False) | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
365,
4626,
4314,
13,
13,
29937,
1152,
6492,
1259,
623,
13,
5215,
931,
13,
5215,
12569,
13,
5215,
12569,
29918,
3221,
29918,
14036,
408,
270,
617,
13,
5215,
12569,
29918,
1420,
29918,
14036,
408,
3472,
13,
3166,
16250,
1053,
316,
802,
13,
5215,
6492,
368,
29889,
4262,
29918,
711,
1315,
408,
748,
13,
5215,
12183,
13,
13,
13,
13,
29937,
22303,
21301,
12569,
1923,
11803,
304,
2991,
13,
1188,
353,
12183,
29889,
657,
16363,
877,
9888,
13289,
1495,
13,
1188,
29889,
842,
10108,
29898,
21027,
29889,
11432,
29897,
13,
13,
29937,
22402,
623,
24987,
13,
932,
353,
12569,
29889,
29928,
1161,
877,
29879,
6073,
29899,
1272,
1495,
13,
13,
3317,
3542,
6513,
353,
29871,
29906,
29900,
13,
3317,
29918,
2848,
353,
29871,
29906,
29900,
13,
3706,
353,
316,
802,
29898,
3317,
2435,
29922,
3317,
29918,
2848,
29897,
13,
11093,
353,
316,
802,
29898,
3317,
2435,
29922,
3317,
29918,
2848,
29897,
13,
29888,
29891,
353,
316,
802,
29898,
3317,
2435,
29922,
3317,
29918,
2848,
29897,
13,
29888,
29920,
353,
316,
802,
29898,
3317,
2435,
29922,
3317,
29918,
2848,
29897,
13,
16838,
353,
316,
802,
29898,
3317,
2435,
29922,
3317,
29918,
2848,
29897,
13,
1357,
353,
316,
802,
29898,
3317,
2435,
29922,
3317,
29918,
2848,
29897,
13,
29885,
29920,
353,
316,
802,
29898,
3317,
2435,
29922,
3317,
29918,
2848,
29897,
13,
13,
1272,
29918,
8977,
353,
8853,
2831,
346,
427,
1060,
1115,
11093,
29892,
13,
29908,
2831,
346,
427,
612,
1115,
29888,
29891,
29892,
13,
29908,
2831,
346,
427,
796,
1115,
29888,
29920,
29892,
13,
29908,
29924,
2932,
427,
1060,
1115,
16838,
29892,
13,
29908,
29924,
2932,
427,
612,
1115,
1357,
29892,
13,
29908,
29924,
2932,
427,
796,
1115,
29885,
29920,
29913,
13,
13,
1753,
1303,
29918,
1272,
7295,
13,
1678,
411,
1722,
877,
1299,
29902,
29946,
29945,
29889,
3945,
742,
525,
29878,
1495,
408,
1480,
29901,
13,
4706,
848,
29918,
262,
353,
1051,
29898,
1188,
9601,
29899,
29896,
29962,
13,
4706,
848,
29918,
449,
353,
848,
29918,
262,
29889,
5451,
28165,
1159,
13,
1678,
736,
848,
29918,
449,
13,
1753,
788,
29918,
1272,
29918,
517,
29918,
5317,
29898,
1272,
1125,
13,
1678,
3064,
29889,
4397,
29898,
2230,
29889,
2230,
3101,
13,
1678,
285,
29916,
29889,
4397,
29898,
1272,
29961,
29896,
2314,
13,
1678,
285,
29891,
29889,
4397,
29898,
1272,
29961,
29906,
2314,
13,
1678,
285,
29920,
29889,
4397,
29898,
1272,
29961,
29941,
2314,
13,
1678,
396,
16838,
29889,
4397,
29898,
1272,
29918,
29873,
1965,
29918,
1052,
29961,
29941,
29892,
29900,
2314,
13,
1678,
396,
1357,
29889,
4397,
29898,
1272,
29918,
29873,
1965,
29918,
1052,
29961,
29946,
29892,
29900,
2314,
13,
1678,
396,
29885,
29920,
29889,
4397,
29898,
1272,
29918,
29873,
1965,
29918,
1052,
29961,
29945,
29892,
29900,
2314,
13,
1678,
736,
3064,
29892,
285,
29916,
29892,
285,
29891,
29892,
285,
29920,
13,
13,
1753,
2069,
29918,
2230,
7295,
13,
1678,
5534,
1369,
29918,
2230,
13,
1678,
1369,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
1678,
736,
13,
29937,
25455,
1819,
13,
13,
3706,
29892,
285,
29916,
29892,
285,
29891,
29892,
285,
29920,
353,
788,
29918,
1272,
29918,
517,
29918,
5317,
29898,
949,
29918,
1272,
3101,
13,
13,
29937,
22402,
623,
5912,
13,
932,
29889,
2680,
353,
3472,
29889,
12596,
4197,
13,
1678,
3472,
29889,
12596,
4197,
13,
4706,
3472,
29889,
29950,
29906,
877,
29903,
6073,
3630,
742,
13,
18884,
3114,
3790,
29915,
7411,
2396,
525,
1563,
742,
13,
462,
539,
500,
511,
13,
4706,
4514,
511,
13,
1678,
270,
617,
29889,
15063,
3204,
29898,
333,
2433,
29879,
6073,
29899,
1272,
29899,
978,
742,
396,
19305,
6143,
13,
462,
3987,
11759,
10998,
1643,
2396,
269,
29892,
525,
1767,
2396,
269,
29913,
13,
462,
3986,
363,
269,
297,
848,
29918,
8977,
29889,
8149,
580,
1402,
13,
462,
995,
29922,
1839,
2831,
346,
427,
1060,
742,
525,
2831,
346,
427,
612,
742,
525,
2831,
346,
427,
796,
7464,
396,
4381,
1819,
472,
20234,
13,
462,
2473,
29922,
5574,
13,
462,
10353,
13,
1678,
3472,
29889,
12596,
29898,
11991,
29922,
1420,
29889,
12596,
29898,
333,
2433,
4262,
29879,
5477,
22030,
2433,
798,
5477,
13,
1678,
270,
617,
29889,
12506,
29898,
13,
4706,
1178,
2433,
4262,
29899,
5504,
742,
13,
4706,
7292,
29922,
29945,
29900,
29900,
29892,
396,
4262,
2767,
7292,
297,
10887,
13,
4706,
302,
29918,
19207,
29879,
29922,
29900,
29897,
13,
1678,
21251,
22030,
543,
7611,
613,
3293,
3790,
29915,
2103,
22099,
29929,
29947,
29995,
3788,
9264,
29899,
1563,
2396,
29896,
29900,
5501,
9264,
29899,
1266,
2396,
29896,
29900,
5501,
3317,
29899,
2103,
2396,
29945,
29900,
29900,
29900,
29900,
1800,
396,
3317,
2103,
8164,
7848,
427,
2608,
29948,
1354,
18679,
1190,
4356,
29875,
13,
13,
29992,
932,
29889,
14035,
29898,
13,
1678,
12569,
29889,
22594,
29889,
6466,
877,
4262,
29879,
3788,
11991,
5477,
13,
1678,
518,
14592,
29889,
22594,
29889,
4290,
877,
29879,
6073,
29899,
1272,
29899,
978,
742,
525,
1767,
1495,
1402,
13,
1678,
4959,
11759,
14592,
29889,
22594,
29889,
2624,
877,
4262,
29899,
5504,
742,
525,
19207,
1495,
29962,
13,
1678,
1723,
13,
1753,
2767,
29918,
4262,
29898,
1272,
29918,
7039,
1125,
13,
1678,
18445,
353,
5159,
13,
1678,
848,
353,
1303,
29918,
1272,
580,
13,
1678,
788,
29918,
1272,
29918,
517,
29918,
5317,
29898,
1272,
29897,
13,
1678,
565,
7431,
29898,
1272,
29918,
7039,
15410,
29906,
29901,
13,
4706,
770,
29918,
16957,
353,
525,
1054,
269,
29896,
29906,
286,
29953,
301,
29946,
29915,
13,
1678,
25342,
7431,
29898,
1272,
29918,
7039,
29897,
1275,
29871,
29906,
29901,
13,
4706,
770,
29918,
16957,
353,
525,
1054,
269,
29896,
29906,
286,
29953,
301,
29953,
29915,
13,
1678,
1683,
29901,
13,
4706,
770,
29918,
16957,
353,
525,
1054,
269,
29896,
29906,
29915,
13,
13,
1678,
363,
848,
29918,
978,
297,
848,
29918,
7039,
29901,
13,
13,
4706,
848,
353,
748,
29889,
4421,
2620,
29898,
13,
9651,
921,
29922,
1761,
29898,
3706,
511,
13,
9651,
343,
29922,
1761,
29898,
1272,
29918,
8977,
29961,
1272,
29918,
978,
11724,
13,
9651,
1024,
2433,
4421,
2620,
742,
13,
9651,
5445,
543,
517,
9171,
29891,
613,
13,
9651,
5445,
2780,
9880,
29953,
29947,
29929,
29955,
1327,
29908,
13,
9651,
1723,
13,
13,
4706,
18445,
29889,
4397,
29898,
1420,
29889,
12596,
29898,
29881,
617,
29889,
9527,
29898,
13,
9651,
1178,
29922,
1272,
29918,
978,
29892,
13,
9651,
26015,
29922,
5574,
29892,
13,
9651,
4377,
3790,
29915,
1272,
2396,
518,
1272,
1402,
29915,
2680,
29915,
584,
748,
29889,
3453,
29898,
29916,
8990,
29922,
8977,
29898,
3881,
11759,
1195,
29898,
3706,
511,
3317,
29898,
3706,
4638,
511,
13,
462,
462,
462,
4706,
343,
8990,
29922,
8977,
29898,
3881,
11759,
29899,
29896,
29900,
29900,
29892,
29896,
29900,
29900,
11724,
13,
462,
462,
462,
4706,
5906,
3790,
29915,
29880,
2396,
29945,
29900,
5501,
29878,
2396,
29896,
5501,
29873,
2396,
29946,
29945,
5501,
29890,
2396,
29896,
1118,
13,
462,
462,
462,
4706,
3611,
2433,
8875,
4286,
4830,
29898,
1272,
29918,
978,
876,
29913,
13,
9651,
10353,
22030,
29922,
1990,
29918,
16957,
876,
13,
13,
1678,
736,
18445,
13,
13,
23176,
29918,
4268,
353,
6796,
991,
597,
29062,
29889,
28260,
29889,
510,
29914,
6538,
29914,
10254,
29914,
15388,
675,
29914,
29900,
29889,
29896,
29900,
29900,
29889,
29906,
29914,
4268,
29914,
15388,
675,
29889,
1195,
29889,
4268,
3108,
13,
1454,
5997,
297,
7029,
29918,
4268,
29901,
13,
1678,
623,
29889,
4268,
29889,
4397,
29918,
4268,
3319,
29908,
23176,
29918,
2271,
1115,
5997,
1800,
13,
13,
23176,
29918,
1315,
353,
6024,
991,
597,
29062,
29889,
28260,
29889,
510,
29914,
6538,
29914,
10254,
29914,
15388,
675,
29914,
29900,
29889,
29896,
29900,
29900,
29889,
29906,
29914,
1315,
29914,
15388,
675,
29889,
1195,
29889,
1315,
2033,
13,
1454,
6965,
297,
7029,
29918,
4268,
29901,
13,
1678,
623,
29889,
16713,
29889,
4397,
29918,
2154,
3319,
29915,
23176,
29918,
2271,
2396,
6965,
1800,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
623,
29889,
3389,
29918,
2974,
29898,
8382,
29922,
8824,
29897,
2
] |
saas/backend/common/redis.py | Canway-shiisa/bk-iam-saas | 0 | 1600155 | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-权限中心(BlueKing-IAM) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://opensource.org/licenses/MIT
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
"""
from django.core.cache import caches
from django_redis import get_redis_connection as get_django_cache_redis_connection
from .cache import CacheEnum
def make_redis_key(key: str) -> str:
"""
所有通过get_redis_connection获取原生Redis来使用Redis的,其最终key都需要避免与Django Cache冲突
所以这里提供了方法来协助生成避免Key冲突的,这样使用原生Redis时不需要关注与其他项目或者项目内Cache的key冲突
"""
cache = caches[CacheEnum.REDIS.value]
# 对于Cache来说version是有意义的,但对于原生使用Redis,没意义,为了避免与Cache Key冲突,这里可以使用任何version不可能去的值来代替,比如"raw"
return cache.make_key(key, version="raw")
def get_redis_connection():
"""
复用Django Cache其配置的Redis Cache的Redis Client Connection
这样可以不需要根据Redis配置来生成Redis Client Connection
Note:
这里返回的是原生Redis Connection,所以Django Cache里配置的KEY_PREFIX、TIMEOUT、VERSION都不会生效
所以使用时为了避免与Cache的key冲突,必须配合 make_redis_key方法一起使用
"""
return get_django_cache_redis_connection(alias=CacheEnum.REDIS.value)
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
29911,
264,
1760,
21319,
29968,
292,
338,
22301,
304,
2304,
278,
1722,
2752,
7881,
491,
3907,
29871,
235,
150,
160,
236,
181,
187,
31676,
31784,
29899,
233,
160,
134,
31175,
30275,
30869,
29898,
21319,
29968,
292,
29899,
29902,
5194,
29897,
3625,
29889,
13,
11882,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29955,
29899,
29906,
29900,
29906,
29896,
3446,
29931,
319,
29906,
29929,
28873,
29892,
263,
12444,
1760,
5001,
29889,
2178,
10462,
21676,
29889,
13,
29931,
293,
21144,
1090,
278,
341,
1806,
19245,
313,
1552,
376,
29931,
293,
1947,
1496,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
3492,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
1732,
597,
22156,
1167,
29889,
990,
29914,
506,
11259,
29914,
26349,
13,
2525,
2222,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13235,
1090,
278,
19245,
338,
13235,
373,
13,
273,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
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,
2823,
278,
19245,
363,
278,
13,
14940,
4086,
14765,
1076,
11239,
322,
27028,
1090,
278,
19245,
29889,
13,
15945,
29908,
13,
3166,
9557,
29889,
3221,
29889,
8173,
1053,
274,
14520,
13,
3166,
9557,
29918,
1127,
275,
1053,
679,
29918,
1127,
275,
29918,
9965,
408,
679,
29918,
14095,
29918,
8173,
29918,
1127,
275,
29918,
9965,
13,
13,
3166,
869,
8173,
1053,
28540,
16854,
13,
13,
13,
1753,
1207,
29918,
1127,
275,
29918,
1989,
29898,
1989,
29901,
851,
29897,
1599,
851,
29901,
13,
1678,
9995,
13,
268,
30744,
30417,
30768,
31138,
657,
29918,
1127,
275,
29918,
9965,
31024,
30683,
30667,
30486,
9039,
275,
30805,
30785,
30406,
9039,
275,
30210,
30214,
31149,
30878,
234,
190,
139,
1989,
30769,
31383,
30698,
236,
132,
194,
232,
136,
144,
31267,
29928,
5364,
28540,
232,
137,
181,
234,
173,
132,
13,
268,
30744,
30651,
30810,
30755,
31302,
231,
193,
158,
30743,
30525,
30545,
30805,
232,
144,
146,
31931,
30486,
30494,
236,
132,
194,
232,
136,
144,
2558,
232,
137,
181,
234,
173,
132,
30210,
30214,
30810,
31819,
30785,
30406,
30667,
30486,
9039,
275,
30594,
30413,
31383,
30698,
31057,
31368,
31267,
31149,
31221,
31888,
30895,
31391,
30767,
31888,
30895,
30728,
10408,
30210,
1989,
232,
137,
181,
234,
173,
132,
13,
1678,
9995,
13,
1678,
7090,
353,
274,
14520,
29961,
10408,
16854,
29889,
19386,
3235,
29889,
1767,
29962,
13,
1678,
396,
29871,
30783,
30909,
10408,
30805,
31639,
3259,
30392,
30417,
31474,
31349,
30210,
30214,
231,
192,
137,
30783,
30909,
30667,
30486,
30785,
30406,
9039,
275,
30214,
31423,
31474,
31349,
30214,
30573,
30743,
236,
132,
194,
232,
136,
144,
31267,
10408,
7670,
232,
137,
181,
234,
173,
132,
30214,
30810,
30755,
30682,
30651,
30785,
30406,
31450,
31502,
3259,
30413,
30682,
30815,
31475,
30210,
30959,
30805,
30690,
233,
158,
194,
30214,
31419,
30847,
29908,
1610,
29908,
13,
1678,
736,
7090,
29889,
5675,
29918,
1989,
29898,
1989,
29892,
1873,
543,
1610,
1159,
13,
13,
13,
1753,
679,
29918,
1127,
275,
29918,
9965,
7295,
13,
1678,
9995,
13,
268,
31810,
30406,
29928,
5364,
28540,
31149,
31361,
30669,
30210,
9039,
275,
28540,
30210,
9039,
275,
12477,
15160,
13,
268,
30810,
31819,
30682,
30651,
30413,
31383,
30698,
31393,
30763,
9039,
275,
31361,
30669,
30805,
30486,
30494,
9039,
275,
12477,
15160,
13,
1678,
3940,
30383,
13,
268,
30810,
30755,
31086,
30742,
30210,
30392,
30667,
30486,
9039,
275,
15160,
30214,
30744,
30651,
29928,
5364,
28540,
30755,
31361,
30669,
30210,
10818,
29918,
15094,
25634,
30330,
15307,
12015,
30330,
16358,
30769,
30413,
30437,
30486,
31944,
13,
268,
30744,
30651,
30785,
30406,
30594,
30573,
30743,
236,
132,
194,
232,
136,
144,
31267,
10408,
30210,
1989,
232,
137,
181,
234,
173,
132,
30214,
31641,
236,
164,
190,
31361,
30733,
1207,
29918,
1127,
275,
29918,
1989,
30525,
30545,
30287,
31558,
30785,
30406,
13,
1678,
9995,
13,
1678,
736,
679,
29918,
14095,
29918,
8173,
29918,
1127,
275,
29918,
9965,
29898,
19973,
29922,
10408,
16854,
29889,
19386,
3235,
29889,
1767,
29897,
13,
2
] |
backend/pages/views.py | ranwise/djangochannel | 45 | 95901 | from django.shortcuts import render, get_object_or_404
from django.views.generic.base import View
from .models import Pages
class Page(View):
"""Вывод страниц"""
def get(self, request, slug=None):
if slug is not None:
page = get_object_or_404(Pages, slug=slug, published=True)
else:
page = get_object_or_404(Pages, slug__isnull=True, published=True)
return render(request, page.template, {"page": page})
| [
1,
515,
9557,
29889,
12759,
7582,
29879,
1053,
4050,
29892,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
13,
3166,
9557,
29889,
7406,
29889,
19206,
29889,
3188,
1053,
4533,
13,
13,
3166,
869,
9794,
1053,
349,
1179,
13,
13,
13,
1990,
9305,
29898,
1043,
1125,
13,
1678,
9995,
30012,
29982,
8160,
8440,
7947,
15945,
29908,
13,
1678,
822,
679,
29898,
1311,
29892,
2009,
29892,
2243,
688,
29922,
8516,
1125,
13,
4706,
565,
2243,
688,
338,
451,
6213,
29901,
13,
9651,
1813,
353,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
29898,
27514,
29892,
2243,
688,
29922,
29517,
29892,
6369,
29922,
5574,
29897,
13,
4706,
1683,
29901,
13,
9651,
1813,
353,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
29898,
27514,
29892,
2243,
688,
1649,
275,
4304,
29922,
5574,
29892,
6369,
29922,
5574,
29897,
13,
4706,
736,
4050,
29898,
3827,
29892,
1813,
29889,
6886,
29892,
8853,
3488,
1115,
1813,
1800,
13,
13,
2
] |
erudition/data_challenge/__init__.py | papsebestyen/erudition | 0 | 162178 | from invoke import Collection
from . import tasks
data_ns = Collection.from_module(tasks)
| [
1,
515,
15928,
1053,
14348,
13,
13,
3166,
869,
1053,
9595,
13,
13,
1272,
29918,
1983,
353,
14348,
29889,
3166,
29918,
5453,
29898,
20673,
29897,
13,
2
] |
sancho/model.py | el-assistant/sancho | 0 | 128366 | """
Entity modelling for the whole project is described here.
"""
from sancho.defaults import *
import tree_sitter
class Repo(NamedTuple):
path: str
full_name: str = None
class File(NamedTuple):
repo: Repo
full_path: str
class ASTnode(NamedTuple):
"""It is a node and a tree at the same time, since the children nodes are nested
in a tuple. So the root node is actually the whole tree. Field 'kind' is the
kind of the node as defined in tree-sitter respective grammar. 'start' and
'end' are the position of the parsed structure in the source text. 'content'
has the raw content of the parsed text. It is filled only for some kinds of
nodes. For example, we track the content of 'identifier' nodes, so that we
can enrich the AST with symbol references later.
"""
kind: str
start: int
end: int
children: Tuple["ASTnode"]
content: str = None
class ParsedText(NamedTuple):
"""
Contains the AST of a file, together with the source code and some metadata.
sitter_tree contains the AST in the format provided by tree-sitter package,
whereas tree contains the AST defined as a NamedTuple. Once tree is defined,
sitter_tree can be discarded.
"""
sitter_tree: tree_sitter.Tree = None
tree: ASTnode = None
text: bytes = None
path: str = None
class ASTnodeRowFormat(NamedTuple):
"""These are generated from ASTnode information.
This format is suitable for ingesting data through Neo4j LOAD CSV command.
"""
full_path: str
local_id: int
kind: str
parent_id: int = None # root parent_id is None
next_id: int = None
content: str = None
class ASTnodesTable(NamedTuple):
full_path: str
rows: list[ASTnodeRowFormat]
class FileRowFormat(NamedTuple):
full_path: str # unique id
is_dir: bool = False
parent_path: str = None # repo root has parent_path=None
# respective root ASTnode is matched through full_path
class FilesTable(NamedTuple):
repo: Repo
rows: list[FileRowFormat]
| [
1,
9995,
13,
6691,
878,
7807,
363,
278,
3353,
2060,
338,
5439,
1244,
29889,
13,
15945,
29908,
13,
13,
13,
3166,
9753,
1859,
29889,
4381,
29879,
1053,
334,
13,
5215,
5447,
29918,
29879,
5171,
13,
13,
13,
1990,
830,
1129,
29898,
22175,
23215,
552,
1125,
13,
1678,
2224,
29901,
851,
13,
1678,
2989,
29918,
978,
29901,
851,
353,
6213,
13,
13,
13,
1990,
3497,
29898,
22175,
23215,
552,
1125,
13,
1678,
13761,
29901,
830,
1129,
13,
1678,
2989,
29918,
2084,
29901,
851,
13,
13,
13,
1990,
319,
1254,
3177,
29898,
22175,
23215,
552,
1125,
13,
1678,
9995,
3112,
338,
263,
2943,
322,
263,
5447,
472,
278,
1021,
931,
29892,
1951,
278,
4344,
7573,
526,
9322,
13,
1678,
297,
263,
18761,
29889,
1105,
278,
3876,
2943,
338,
2869,
278,
3353,
5447,
29889,
8989,
525,
14380,
29915,
338,
278,
13,
1678,
2924,
310,
278,
2943,
408,
3342,
297,
5447,
29899,
29879,
5171,
18067,
25437,
29889,
525,
2962,
29915,
322,
13,
1678,
525,
355,
29915,
526,
278,
2602,
310,
278,
21213,
3829,
297,
278,
2752,
1426,
29889,
525,
3051,
29915,
13,
1678,
756,
278,
10650,
2793,
310,
278,
21213,
1426,
29889,
739,
338,
10423,
871,
363,
777,
17690,
310,
13,
1678,
7573,
29889,
1152,
1342,
29892,
591,
5702,
278,
2793,
310,
525,
25378,
29915,
7573,
29892,
577,
393,
591,
13,
1678,
508,
427,
4018,
278,
319,
1254,
411,
5829,
9282,
2678,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
2924,
29901,
851,
13,
1678,
1369,
29901,
938,
13,
1678,
1095,
29901,
938,
13,
1678,
4344,
29901,
12603,
552,
3366,
28938,
3177,
3108,
13,
1678,
2793,
29901,
851,
353,
6213,
13,
13,
13,
1990,
1459,
8485,
1626,
29898,
22175,
23215,
552,
1125,
13,
1678,
9995,
13,
1678,
2866,
2708,
278,
319,
1254,
310,
263,
934,
29892,
4208,
411,
278,
2752,
775,
322,
777,
15562,
29889,
13,
13,
1678,
269,
5171,
29918,
8336,
3743,
278,
319,
1254,
297,
278,
3402,
4944,
491,
5447,
29899,
29879,
5171,
3577,
29892,
13,
1678,
13452,
5447,
3743,
278,
319,
1254,
3342,
408,
263,
405,
2795,
23215,
552,
29889,
9038,
5447,
338,
3342,
29892,
13,
1678,
269,
5171,
29918,
8336,
508,
367,
2313,
25600,
29889,
13,
1678,
9995,
13,
13,
1678,
269,
5171,
29918,
8336,
29901,
5447,
29918,
29879,
5171,
29889,
9643,
353,
6213,
13,
1678,
5447,
29901,
319,
1254,
3177,
353,
6213,
13,
1678,
1426,
29901,
6262,
353,
6213,
13,
1678,
2224,
29901,
851,
353,
6213,
13,
13,
13,
1990,
319,
1254,
3177,
4301,
5809,
29898,
22175,
23215,
552,
1125,
13,
1678,
9995,
1349,
968,
526,
5759,
515,
319,
1254,
3177,
2472,
29889,
13,
13,
1678,
910,
3402,
338,
13907,
363,
2348,
342,
292,
848,
1549,
2448,
29877,
29946,
29926,
11247,
3035,
16874,
1899,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
2989,
29918,
2084,
29901,
851,
13,
1678,
1887,
29918,
333,
29901,
938,
13,
1678,
2924,
29901,
851,
13,
1678,
3847,
29918,
333,
29901,
938,
353,
6213,
29871,
396,
3876,
3847,
29918,
333,
338,
6213,
13,
1678,
2446,
29918,
333,
29901,
938,
353,
6213,
13,
1678,
2793,
29901,
851,
353,
6213,
13,
13,
13,
1990,
319,
1254,
18010,
3562,
29898,
22175,
23215,
552,
1125,
13,
1678,
2989,
29918,
2084,
29901,
851,
13,
1678,
4206,
29901,
1051,
29961,
28938,
3177,
4301,
5809,
29962,
13,
13,
13,
1990,
3497,
4301,
5809,
29898,
22175,
23215,
552,
1125,
13,
1678,
2989,
29918,
2084,
29901,
851,
29871,
396,
5412,
1178,
13,
1678,
338,
29918,
3972,
29901,
6120,
353,
7700,
13,
1678,
3847,
29918,
2084,
29901,
851,
353,
6213,
29871,
396,
13761,
3876,
756,
3847,
29918,
2084,
29922,
8516,
13,
1678,
396,
18067,
3876,
319,
1254,
3177,
338,
19228,
1549,
2989,
29918,
2084,
13,
13,
13,
1990,
12745,
3562,
29898,
22175,
23215,
552,
1125,
13,
1678,
13761,
29901,
830,
1129,
13,
1678,
4206,
29901,
1051,
29961,
2283,
4301,
5809,
29962,
13,
2
] |
erp/migrations/0033_auto_20200205_1625.py | Foohx/acceslibre | 8 | 148058 | <filename>erp/migrations/0033_auto_20200205_1625.py
# Generated by Django 3.0.3 on 2020-02-05 15:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('erp', '0032_auto_20200205_1431'),
]
operations = [
migrations.AlterModelOptions(
name='cheminement',
options={'verbose_name': 'Cheminement', 'verbose_name_plural': 'Cheminements'},
),
migrations.AddField(
model_name='accessibilite',
name='aide_humaine',
field=models.BooleanField(blank=True, help_text="Présence ou possibilité d'une aide humaine au déplacement", null=True),
),
migrations.AddField(
model_name='accessibilite',
name='ascenseur',
field=models.BooleanField(blank=True, help_text="Présence d'un ascenseur ou d'un élévateur", null=True, verbose_name='Ascenseur/élévateur'),
),
migrations.AddField(
model_name='accessibilite',
name='escalier_main_courante',
field=models.BooleanField(blank=True, help_text="Présence d'une main courante d'escalier", null=True, verbose_name='Main courante'),
),
migrations.AddField(
model_name='accessibilite',
name='escalier_marches',
field=models.PositiveSmallIntegerField(blank=True, help_text="Nombre de marches d'escalier. Indiquez 0 si pas d'escalier ou si présence d'un ascenseur/élévateur.", null=True, verbose_name="Marches d'escalier"),
),
migrations.AddField(
model_name='accessibilite',
name='escalier_reperage',
field=models.BooleanField(blank=True, help_text="Si marches contrastées, bande d'éveil ou nez de marche contrastés, indiquez “Oui”", null=True, verbose_name="Repérage de l'escalier"),
),
migrations.AddField(
model_name='accessibilite',
name='guidage_sonore',
field=models.BooleanField(blank=True, help_text="Présence d'un dispositif de guidage sonore", null=True, verbose_name='Système de guidage sonore'),
),
migrations.AddField(
model_name='accessibilite',
name='largeur_mini',
field=models.PositiveSmallIntegerField(blank=True, help_text='Largeur minimale du passage ou rétrécissement, en centimètres', null=True, verbose_name='Largeur minimale'),
),
migrations.AddField(
model_name='accessibilite',
name='rampe',
field=models.CharField(blank=True, choices=[(None, 'Inconnu'), ('aucune', 'Aucune'), ('fixe', 'Fixe'), ('amovible', 'Amovible')], help_text='Présence et type de rampe', max_length=20, null=True),
),
migrations.AddField(
model_name='accessibilite',
name='reperage_vitres',
field=models.BooleanField(blank=True, help_text="Présence d'un repérage sur les surfaces vitrées", null=True, verbose_name='Répérage surfaces vitrées'),
),
migrations.AlterField(
model_name='cheminement',
name='type',
field=models.CharField(choices=[('int_entree_batiment_vers_accueil', "Cheminement intérieur de l'entrée du bâtiment jusqu'à l'accueil"), ('ext_stationnement_vers_entree', "Cheminement extérieur de la place de stationnement de l'ERP à l'entrée"), ('ext_entree_parcelle_entree_vers_batiment', "Cheminement extérieur de l'entrée de la parcelle de terrain à l'entrée du bâtiment")], default='int_entree_batiment_vers_accueil', help_text='Type de circulation', max_length=100, verbose_name='Type'),
),
]
| [
1,
529,
9507,
29958,
261,
29886,
29914,
26983,
800,
29914,
29900,
29900,
29941,
29941,
29918,
6921,
29918,
29906,
29900,
29906,
29900,
29900,
29906,
29900,
29945,
29918,
29896,
29953,
29906,
29945,
29889,
2272,
13,
29937,
3251,
630,
491,
15337,
29871,
29941,
29889,
29900,
29889,
29941,
373,
29871,
29906,
29900,
29906,
29900,
29899,
29900,
29906,
29899,
29900,
29945,
29871,
29896,
29945,
29901,
29906,
29945,
13,
13,
3166,
9557,
29889,
2585,
1053,
9725,
800,
29892,
4733,
13,
13,
13,
1990,
341,
16783,
29898,
26983,
800,
29889,
29924,
16783,
1125,
13,
13,
1678,
9962,
353,
518,
13,
4706,
6702,
261,
29886,
742,
525,
29900,
29900,
29941,
29906,
29918,
6921,
29918,
29906,
29900,
29906,
29900,
29900,
29906,
29900,
29945,
29918,
29896,
29946,
29941,
29896,
5477,
13,
1678,
4514,
13,
13,
1678,
6931,
353,
518,
13,
4706,
9725,
800,
29889,
2499,
357,
3195,
5856,
29898,
13,
9651,
1024,
2433,
14969,
262,
882,
742,
13,
9651,
3987,
3790,
29915,
369,
15828,
29918,
978,
2396,
525,
1451,
331,
262,
882,
742,
525,
369,
15828,
29918,
978,
29918,
572,
3631,
2396,
525,
1451,
331,
262,
4110,
16675,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
2528,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
5943,
13017,
568,
742,
13,
9651,
1024,
2433,
29874,
680,
29918,
16063,
9874,
742,
13,
9651,
1746,
29922,
9794,
29889,
18146,
3073,
29898,
19465,
29922,
5574,
29892,
1371,
29918,
726,
543,
4040,
743,
663,
2123,
27829,
2131,
270,
29915,
1540,
263,
680,
3165,
9874,
782,
17631,
9552,
613,
1870,
29922,
5574,
511,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
2528,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
5943,
13017,
568,
742,
13,
9651,
1024,
2433,
6151,
1947,
332,
742,
13,
9651,
1746,
29922,
9794,
29889,
18146,
3073,
29898,
19465,
29922,
5574,
29892,
1371,
29918,
726,
543,
4040,
743,
663,
270,
29915,
348,
12066,
1947,
332,
2123,
270,
29915,
348,
7877,
5903,
7289,
613,
1870,
29922,
5574,
29892,
26952,
29918,
978,
2433,
29909,
1557,
1947,
332,
29914,
3610,
5903,
7289,
5477,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
2528,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
5943,
13017,
568,
742,
13,
9651,
1024,
2433,
267,
1052,
631,
29918,
3396,
29918,
29883,
473,
1647,
742,
13,
9651,
1746,
29922,
9794,
29889,
18146,
3073,
29898,
19465,
29922,
5574,
29892,
1371,
29918,
726,
543,
4040,
743,
663,
270,
29915,
1540,
1667,
2085,
1647,
270,
29915,
267,
1052,
631,
613,
1870,
29922,
5574,
29892,
26952,
29918,
978,
2433,
6330,
2085,
1647,
5477,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
2528,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
5943,
13017,
568,
742,
13,
9651,
1024,
2433,
267,
1052,
631,
29918,
29885,
1279,
267,
742,
13,
9651,
1746,
29922,
9794,
29889,
9135,
3321,
12636,
497,
7798,
3073,
29898,
19465,
29922,
5574,
29892,
1371,
29918,
726,
543,
29940,
290,
1030,
316,
8575,
267,
270,
29915,
267,
1052,
631,
29889,
1894,
1387,
29920,
29871,
29900,
1354,
2331,
270,
29915,
267,
1052,
631,
2123,
1354,
29845,
270,
29915,
348,
12066,
1947,
332,
29914,
3610,
5903,
7289,
19602,
1870,
29922,
5574,
29892,
26952,
29918,
978,
543,
29924,
1279,
267,
270,
29915,
267,
1052,
631,
4968,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
2528,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
5943,
13017,
568,
742,
13,
9651,
1024,
2433,
267,
1052,
631,
29918,
276,
546,
482,
742,
13,
9651,
1746,
29922,
9794,
29889,
18146,
3073,
29898,
19465,
29922,
5574,
29892,
1371,
29918,
726,
543,
25598,
8575,
267,
12814,
2406,
29892,
27628,
270,
29915,
29948,
345,
309,
2123,
452,
29920,
316,
1766,
1173,
12814,
743,
29892,
1399,
1387,
29920,
1346,
29949,
1481,
30024,
613,
1870,
29922,
5574,
29892,
26952,
29918,
978,
543,
5612,
29948,
6617,
316,
301,
29915,
267,
1052,
631,
4968,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
2528,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
5943,
13017,
568,
742,
13,
9651,
1024,
2433,
2543,
333,
482,
29918,
1100,
487,
742,
13,
9651,
1746,
29922,
9794,
29889,
18146,
3073,
29898,
19465,
29922,
5574,
29892,
1371,
29918,
726,
543,
4040,
743,
663,
270,
29915,
348,
11549,
277,
361,
316,
16605,
482,
1487,
487,
613,
1870,
29922,
5574,
29892,
26952,
29918,
978,
2433,
29903,
858,
5000,
316,
16605,
482,
1487,
487,
5477,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
2528,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
5943,
13017,
568,
742,
13,
9651,
1024,
2433,
16961,
332,
29918,
1195,
29875,
742,
13,
9651,
1746,
29922,
9794,
29889,
9135,
3321,
12636,
497,
7798,
3073,
29898,
19465,
29922,
5574,
29892,
1371,
29918,
726,
2433,
24105,
479,
332,
6260,
744,
868,
13382,
2123,
1841,
509,
4582,
11537,
29892,
427,
1644,
326,
14228,
742,
1870,
29922,
5574,
29892,
26952,
29918,
978,
2433,
24105,
479,
332,
6260,
744,
5477,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
2528,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
5943,
13017,
568,
742,
13,
9651,
1024,
2433,
2572,
412,
742,
13,
9651,
1746,
29922,
9794,
29889,
27890,
29898,
19465,
29922,
5574,
29892,
19995,
11759,
29898,
8516,
29892,
525,
797,
535,
3433,
5477,
6702,
14766,
1540,
742,
525,
29909,
1682,
1540,
5477,
6702,
5878,
29872,
742,
525,
29943,
861,
29872,
5477,
6702,
314,
586,
1821,
742,
525,
6833,
586,
1821,
1495,
1402,
1371,
29918,
726,
2433,
4040,
743,
663,
634,
1134,
316,
13472,
412,
742,
4236,
29918,
2848,
29922,
29906,
29900,
29892,
1870,
29922,
5574,
511,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
2528,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
5943,
13017,
568,
742,
13,
9651,
1024,
2433,
276,
546,
482,
29918,
29894,
277,
690,
742,
13,
9651,
1746,
29922,
9794,
29889,
18146,
3073,
29898,
19465,
29922,
5574,
29892,
1371,
29918,
726,
543,
4040,
743,
663,
270,
29915,
348,
1634,
29948,
6617,
1190,
966,
28001,
13901,
29878,
2406,
613,
1870,
29922,
5574,
29892,
26952,
29918,
978,
2433,
29934,
6430,
29948,
6617,
28001,
13901,
29878,
2406,
5477,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
2499,
357,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
14969,
262,
882,
742,
13,
9651,
1024,
2433,
1853,
742,
13,
9651,
1746,
29922,
9794,
29889,
27890,
29898,
1859,
1575,
11759,
877,
524,
29918,
296,
929,
29918,
10222,
2073,
29918,
874,
29918,
5753,
28031,
742,
376,
1451,
331,
262,
882,
938,
14508,
316,
301,
29915,
14856,
1318,
868,
21592,
2073,
9291,
29915,
30001,
301,
29915,
5753,
28031,
4968,
6702,
1062,
29918,
19569,
17239,
29918,
874,
29918,
296,
929,
742,
376,
1451,
331,
262,
882,
1294,
14508,
316,
425,
2058,
316,
5073,
17239,
316,
301,
29915,
1001,
29925,
818,
301,
29915,
14856,
1318,
4968,
6702,
1062,
29918,
296,
929,
29918,
862,
29883,
1808,
29918,
296,
929,
29918,
874,
29918,
10222,
2073,
742,
376,
1451,
331,
262,
882,
1294,
14508,
316,
301,
29915,
14856,
1318,
316,
425,
20067,
1808,
316,
28439,
818,
301,
29915,
14856,
1318,
868,
21592,
2073,
1159,
1402,
2322,
2433,
524,
29918,
296,
929,
29918,
10222,
2073,
29918,
874,
29918,
5753,
28031,
742,
1371,
29918,
726,
2433,
1542,
316,
18342,
362,
742,
4236,
29918,
2848,
29922,
29896,
29900,
29900,
29892,
26952,
29918,
978,
2433,
1542,
5477,
13,
4706,
10353,
13,
1678,
4514,
13,
2
] |
fem/fem.py | Pengeace/DGP-PDE-FEM | 7 | 9477 | <reponame>Pengeace/DGP-PDE-FEM
import numpy as np
import pyamg
from scipy import sparse
from scipy.spatial import Delaunay
from linsolver import sparse_solver
from triangulation.delaunay import delaunay
class Element:
def __init__(self, points, global_indexes, fem):
self.points = np.array(points)
self.global_indexes = global_indexes
self.fem = fem
self.reference_triangle = np.array([[0, 0], [1., 0], [0, 1.]])
self.reference_grad = np.array([[-1., -1], [1., 0], [0, 1.]])
def perform_calculation(self):
self._calculate_transform()
self._calculate_stiffness_matrix()
self._calulate_load_vector()
def _calculate_transform(self):
reference_coord = np.array([self.reference_triangle[:, 0], self.reference_triangle[:, 1], [1] * 3])
transformed_coord = np.array([self.points[:, 0], self.points[:, 1], [1] * 3])
trans = np.dot(transformed_coord, np.linalg.inv(reference_coord))
self.transform_matrix = trans[0:-1, 0:-1]
self.area = abs(np.linalg.det(self.transform_matrix)) / 2
def _calculate_stiffness_matrix(self):
transform_matrix_inv = np.linalg.inv(self.transform_matrix)
self.element_stiffness_matrix = np.zeros((3, 3))
for row in range(3):
for col in range(3):
part_u_left_grad = np.dot(np.dot(self.fem.A, transform_matrix_inv.T), self.reference_grad[row])
part_u_right_grad = np.dot(transform_matrix_inv.T, self.reference_grad[col])
part_u_grad = self.area * np.dot(part_u_left_grad, part_u_right_grad)
part_u = (self.area / 6.0) if row == col else (self.area / 12.0)
self.element_stiffness_matrix[row, col] = part_u_grad + self.fem.q * part_u
def _calulate_load_vector(self):
mean_f = np.mean([self.fem.get_func_value(x) for x in self.points])
self.element_load_vector = np.array([mean_f * self.area / 3] * 3)
class FiniteElement:
"""
Finite Element Method to solve the 2D Elliptic Partial Differentiation differential Equation with below form:
div(A grad(u)) + q u = func
"""
def __init__(self, points, boundaries, A, q, func, slow_solver=True):
self.points = np.array(points)
self.dirichlet_boundaries = np.array(boundaries)
self.A = A
self.q = q
self.f = func
self.slow_solver = slow_solver
self.triangles = []
self.point_num = len(points)
def solve(self):
if len(self.triangles) == 0:
self._get_mesh()
self._process_each_element()
self._calculate_global_stiffness_matrix()
self._calulate_global_load_vector()
self._deal_with_dirichlet_bound()
self._solve_linear_equations()
def update_border_and_func(self, boundaries, func):
self.dirichlet_boundaries = np.array(boundaries)
self.f = func
def get_func_value(self, x):
if isinstance(self.f, dict):
return self.f[tuple(x)]
else:
return self.f(x)
def _get_mesh(self):
if self.slow_solver:
self.triangles = delaunay(self.points)
else:
triangulation = Delaunay(self.points)
self.triangles = triangulation.simplices
def _process_each_element(self):
self.elements = []
for tri in self.triangles:
ele = Element(points=[self.points[v] for v in tri], global_indexes=tri, fem=self)
ele.perform_calculation()
self.elements.append(ele)
def _calculate_global_stiffness_matrix(self):
self.global_stiffness_matrix_row = []
self.global_stiffness_matrix_col = []
self.global_stiffness_matrix_data = []
boundary_indexes = set(self.dirichlet_boundaries[:, 0].astype('int'))
for ele in self.elements:
for row in range(3):
if ele.global_indexes[row] not in boundary_indexes:
for col in range(3):
self.global_stiffness_matrix_row.append(ele.global_indexes[row])
self.global_stiffness_matrix_col.append(ele.global_indexes[col])
self.global_stiffness_matrix_data.append(ele.element_stiffness_matrix[row, col])
def _calulate_global_load_vector(self):
self.global_load_vector = np.zeros(self.point_num)
for ele in self.elements:
for v in range(3):
self.global_load_vector[ele.global_indexes[v]] += ele.element_load_vector[v]
def _deal_with_dirichlet_bound(self):
for index, val in self.dirichlet_boundaries:
index = int(index)
self.global_stiffness_matrix_row.append(index)
self.global_stiffness_matrix_col.append(index)
self.global_stiffness_matrix_data.append(1)
self.global_load_vector[index] = val
def _solve_linear_equations(self):
if not self.slow_solver:
self.global_stiffness_matrix_csr = sparse.coo_matrix((self.global_stiffness_matrix_data, (
self.global_stiffness_matrix_row, self.global_stiffness_matrix_col))).tocsr()
self.solution = pyamg.solve(self.global_stiffness_matrix_csr, self.global_load_vector, verb=False,
tol=1e-10)
else:
global_stiffness_sparse = [np.array(self.global_stiffness_matrix_row),
np.array(self.global_stiffness_matrix_col),
np.array(self.global_stiffness_matrix_data)]
self.solution = sparse_solver.sparse_gauss_seidel(global_stiffness_sparse, self.global_load_vector,
sparse_input=True)
## these solver methods are for test
# self.global_stiffness = sparse.coo_matrix((self.global_stiffness_matrix_data, (
# self.global_stiffness_matrix_row, self.global_stiffness_matrix_col))).tocsr()
# self.solution = linsolver.jacobi(self.global_stiffness.toarray(), self.global_load_vector)
# self.solution = linsolver.gauss_seidel(self.global_stiffness.toarray(), self.global_load_vector)
# self.solution = sparse_solver.sparse_jacobi(self.global_stiffness.toarray(), self.global_load_vector, sparse_input=False)
# self.solution = sparse_solver.sparse_gauss_seidel(self.global_stiffness.toarray(), self.global_load_vector, sparse_input=False)
if isinstance(self.solution, str):
print("The inputs for linear solver have problems.")
| [
1,
529,
276,
1112,
420,
29958,
29925,
264,
479,
815,
29914,
29928,
19903,
29899,
29925,
2287,
29899,
29943,
12665,
13,
5215,
12655,
408,
7442,
13,
5215,
11451,
314,
29887,
13,
3166,
4560,
2272,
1053,
29234,
13,
3166,
4560,
2272,
29889,
1028,
15238,
1053,
360,
3100,
348,
388,
13,
13,
3166,
301,
1144,
324,
369,
1053,
29234,
29918,
2929,
369,
13,
3166,
3367,
574,
2785,
29889,
29881,
3100,
348,
388,
1053,
628,
29874,
348,
388,
13,
13,
13,
1990,
10619,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3291,
29892,
5534,
29918,
2248,
267,
29892,
4445,
1125,
13,
4706,
1583,
29889,
9748,
353,
7442,
29889,
2378,
29898,
9748,
29897,
13,
4706,
1583,
29889,
10945,
29918,
2248,
267,
353,
5534,
29918,
2248,
267,
13,
4706,
1583,
29889,
29888,
331,
353,
4445,
13,
13,
4706,
1583,
29889,
5679,
29918,
26701,
353,
7442,
29889,
2378,
4197,
29961,
29900,
29892,
29871,
29900,
1402,
518,
29896,
1696,
29871,
29900,
1402,
518,
29900,
29892,
29871,
29896,
5586,
2314,
13,
4706,
1583,
29889,
5679,
29918,
5105,
353,
7442,
29889,
2378,
4197,
14352,
29896,
1696,
448,
29896,
1402,
518,
29896,
1696,
29871,
29900,
1402,
518,
29900,
29892,
29871,
29896,
5586,
2314,
13,
13,
1678,
822,
2189,
29918,
15807,
362,
29898,
1311,
1125,
13,
4706,
1583,
3032,
15807,
403,
29918,
9067,
580,
13,
4706,
1583,
3032,
15807,
403,
29918,
303,
2593,
2264,
29918,
5344,
580,
13,
4706,
1583,
3032,
1052,
5987,
29918,
1359,
29918,
8111,
580,
13,
13,
1678,
822,
903,
15807,
403,
29918,
9067,
29898,
1311,
1125,
13,
4706,
3407,
29918,
1111,
536,
353,
7442,
29889,
2378,
4197,
1311,
29889,
5679,
29918,
26701,
7503,
29892,
29871,
29900,
1402,
1583,
29889,
5679,
29918,
26701,
7503,
29892,
29871,
29896,
1402,
518,
29896,
29962,
334,
29871,
29941,
2314,
13,
4706,
27615,
29918,
1111,
536,
353,
7442,
29889,
2378,
4197,
1311,
29889,
9748,
7503,
29892,
29871,
29900,
1402,
1583,
29889,
9748,
7503,
29892,
29871,
29896,
1402,
518,
29896,
29962,
334,
29871,
29941,
2314,
13,
13,
4706,
1301,
353,
7442,
29889,
6333,
29898,
9067,
287,
29918,
1111,
536,
29892,
7442,
29889,
29880,
979,
29887,
29889,
11569,
29898,
5679,
29918,
1111,
536,
876,
13,
13,
4706,
1583,
29889,
9067,
29918,
5344,
353,
1301,
29961,
29900,
13018,
29896,
29892,
29871,
29900,
13018,
29896,
29962,
13,
13,
4706,
1583,
29889,
6203,
353,
6425,
29898,
9302,
29889,
29880,
979,
29887,
29889,
4801,
29898,
1311,
29889,
9067,
29918,
5344,
876,
847,
29871,
29906,
13,
13,
1678,
822,
903,
15807,
403,
29918,
303,
2593,
2264,
29918,
5344,
29898,
1311,
1125,
13,
13,
4706,
4327,
29918,
5344,
29918,
11569,
353,
7442,
29889,
29880,
979,
29887,
29889,
11569,
29898,
1311,
29889,
9067,
29918,
5344,
29897,
13,
4706,
1583,
29889,
5029,
29918,
303,
2593,
2264,
29918,
5344,
353,
7442,
29889,
3298,
359,
3552,
29941,
29892,
29871,
29941,
876,
13,
13,
4706,
363,
1948,
297,
3464,
29898,
29941,
1125,
13,
9651,
363,
784,
297,
3464,
29898,
29941,
1125,
13,
18884,
760,
29918,
29884,
29918,
1563,
29918,
5105,
353,
7442,
29889,
6333,
29898,
9302,
29889,
6333,
29898,
1311,
29889,
29888,
331,
29889,
29909,
29892,
4327,
29918,
5344,
29918,
11569,
29889,
29911,
511,
1583,
29889,
5679,
29918,
5105,
29961,
798,
2314,
13,
18884,
760,
29918,
29884,
29918,
1266,
29918,
5105,
353,
7442,
29889,
6333,
29898,
9067,
29918,
5344,
29918,
11569,
29889,
29911,
29892,
1583,
29889,
5679,
29918,
5105,
29961,
1054,
2314,
13,
13,
18884,
760,
29918,
29884,
29918,
5105,
353,
1583,
29889,
6203,
334,
7442,
29889,
6333,
29898,
1595,
29918,
29884,
29918,
1563,
29918,
5105,
29892,
760,
29918,
29884,
29918,
1266,
29918,
5105,
29897,
13,
13,
18884,
760,
29918,
29884,
353,
313,
1311,
29889,
6203,
847,
29871,
29953,
29889,
29900,
29897,
565,
1948,
1275,
784,
1683,
313,
1311,
29889,
6203,
847,
29871,
29896,
29906,
29889,
29900,
29897,
13,
13,
18884,
1583,
29889,
5029,
29918,
303,
2593,
2264,
29918,
5344,
29961,
798,
29892,
784,
29962,
353,
760,
29918,
29884,
29918,
5105,
718,
1583,
29889,
29888,
331,
29889,
29939,
334,
760,
29918,
29884,
13,
13,
1678,
822,
903,
1052,
5987,
29918,
1359,
29918,
8111,
29898,
1311,
1125,
13,
13,
4706,
2099,
29918,
29888,
353,
7442,
29889,
12676,
4197,
1311,
29889,
29888,
331,
29889,
657,
29918,
9891,
29918,
1767,
29898,
29916,
29897,
363,
921,
297,
1583,
29889,
9748,
2314,
13,
4706,
1583,
29889,
5029,
29918,
1359,
29918,
8111,
353,
7442,
29889,
2378,
4197,
12676,
29918,
29888,
334,
1583,
29889,
6203,
847,
29871,
29941,
29962,
334,
29871,
29941,
29897,
13,
13,
13,
1990,
4231,
568,
2642,
29901,
13,
1678,
9995,
13,
1678,
4231,
568,
10619,
8108,
304,
4505,
278,
29871,
29906,
29928,
26656,
23000,
3455,
616,
360,
8349,
7268,
362,
16712,
11243,
362,
411,
2400,
883,
29901,
13,
13,
4706,
1933,
29898,
29909,
4656,
29898,
29884,
876,
718,
3855,
318,
353,
3653,
13,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3291,
29892,
24371,
29892,
319,
29892,
3855,
29892,
3653,
29892,
5232,
29918,
2929,
369,
29922,
5574,
1125,
13,
4706,
1583,
29889,
9748,
353,
7442,
29889,
2378,
29898,
9748,
29897,
13,
4706,
1583,
29889,
3972,
436,
1026,
29918,
9917,
4314,
353,
7442,
29889,
2378,
29898,
9917,
4314,
29897,
13,
4706,
1583,
29889,
29909,
353,
319,
13,
4706,
1583,
29889,
29939,
353,
3855,
13,
4706,
1583,
29889,
29888,
353,
3653,
13,
4706,
1583,
29889,
28544,
29918,
2929,
369,
353,
5232,
29918,
2929,
369,
13,
13,
4706,
1583,
29889,
3626,
19536,
353,
5159,
13,
4706,
1583,
29889,
3149,
29918,
1949,
353,
7431,
29898,
9748,
29897,
13,
13,
1678,
822,
4505,
29898,
1311,
1125,
13,
4706,
565,
7431,
29898,
1311,
29889,
3626,
19536,
29897,
1275,
29871,
29900,
29901,
13,
9651,
1583,
3032,
657,
29918,
4467,
29882,
580,
13,
4706,
1583,
3032,
5014,
29918,
4204,
29918,
5029,
580,
13,
4706,
1583,
3032,
15807,
403,
29918,
10945,
29918,
303,
2593,
2264,
29918,
5344,
580,
13,
4706,
1583,
3032,
1052,
5987,
29918,
10945,
29918,
1359,
29918,
8111,
580,
13,
4706,
1583,
3032,
311,
284,
29918,
2541,
29918,
3972,
436,
1026,
29918,
9917,
580,
13,
4706,
1583,
3032,
2929,
345,
29918,
10660,
29918,
1686,
800,
580,
13,
13,
1678,
822,
2767,
29918,
11466,
29918,
392,
29918,
9891,
29898,
1311,
29892,
24371,
29892,
3653,
1125,
13,
4706,
1583,
29889,
3972,
436,
1026,
29918,
9917,
4314,
353,
7442,
29889,
2378,
29898,
9917,
4314,
29897,
13,
4706,
1583,
29889,
29888,
353,
3653,
13,
13,
1678,
822,
679,
29918,
9891,
29918,
1767,
29898,
1311,
29892,
921,
1125,
13,
4706,
565,
338,
8758,
29898,
1311,
29889,
29888,
29892,
9657,
1125,
13,
9651,
736,
1583,
29889,
29888,
29961,
23583,
29898,
29916,
4638,
13,
4706,
1683,
29901,
13,
9651,
736,
1583,
29889,
29888,
29898,
29916,
29897,
13,
13,
1678,
822,
903,
657,
29918,
4467,
29882,
29898,
1311,
1125,
13,
13,
4706,
565,
1583,
29889,
28544,
29918,
2929,
369,
29901,
13,
9651,
1583,
29889,
3626,
19536,
353,
628,
29874,
348,
388,
29898,
1311,
29889,
9748,
29897,
13,
4706,
1683,
29901,
13,
9651,
3367,
574,
2785,
353,
360,
3100,
348,
388,
29898,
1311,
29889,
9748,
29897,
13,
9651,
1583,
29889,
3626,
19536,
353,
3367,
574,
2785,
29889,
14739,
29399,
13,
13,
1678,
822,
903,
5014,
29918,
4204,
29918,
5029,
29898,
1311,
1125,
13,
4706,
1583,
29889,
17664,
353,
5159,
13,
4706,
363,
3367,
297,
1583,
29889,
3626,
19536,
29901,
13,
9651,
4552,
353,
10619,
29898,
9748,
11759,
1311,
29889,
9748,
29961,
29894,
29962,
363,
325,
297,
3367,
1402,
5534,
29918,
2248,
267,
29922,
3626,
29892,
4445,
29922,
1311,
29897,
13,
9651,
4552,
29889,
19826,
29918,
15807,
362,
580,
13,
9651,
1583,
29889,
17664,
29889,
4397,
29898,
6146,
29897,
13,
13,
1678,
822,
903,
15807,
403,
29918,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29898,
1311,
1125,
13,
13,
4706,
1583,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
798,
353,
5159,
13,
4706,
1583,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
1054,
353,
5159,
13,
4706,
1583,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
1272,
353,
5159,
13,
13,
4706,
10452,
29918,
2248,
267,
353,
731,
29898,
1311,
29889,
3972,
436,
1026,
29918,
9917,
4314,
7503,
29892,
29871,
29900,
1822,
579,
668,
877,
524,
8785,
13,
13,
4706,
363,
4552,
297,
1583,
29889,
17664,
29901,
13,
9651,
363,
1948,
297,
3464,
29898,
29941,
1125,
13,
18884,
565,
4552,
29889,
10945,
29918,
2248,
267,
29961,
798,
29962,
451,
297,
10452,
29918,
2248,
267,
29901,
13,
462,
1678,
363,
784,
297,
3464,
29898,
29941,
1125,
13,
462,
4706,
1583,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
798,
29889,
4397,
29898,
6146,
29889,
10945,
29918,
2248,
267,
29961,
798,
2314,
13,
462,
4706,
1583,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
1054,
29889,
4397,
29898,
6146,
29889,
10945,
29918,
2248,
267,
29961,
1054,
2314,
13,
462,
4706,
1583,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
1272,
29889,
4397,
29898,
6146,
29889,
5029,
29918,
303,
2593,
2264,
29918,
5344,
29961,
798,
29892,
784,
2314,
13,
13,
1678,
822,
903,
1052,
5987,
29918,
10945,
29918,
1359,
29918,
8111,
29898,
1311,
1125,
13,
13,
4706,
1583,
29889,
10945,
29918,
1359,
29918,
8111,
353,
7442,
29889,
3298,
359,
29898,
1311,
29889,
3149,
29918,
1949,
29897,
13,
4706,
363,
4552,
297,
1583,
29889,
17664,
29901,
13,
9651,
363,
325,
297,
3464,
29898,
29941,
1125,
13,
18884,
1583,
29889,
10945,
29918,
1359,
29918,
8111,
29961,
6146,
29889,
10945,
29918,
2248,
267,
29961,
29894,
5262,
4619,
4552,
29889,
5029,
29918,
1359,
29918,
8111,
29961,
29894,
29962,
13,
13,
1678,
822,
903,
311,
284,
29918,
2541,
29918,
3972,
436,
1026,
29918,
9917,
29898,
1311,
1125,
13,
4706,
363,
2380,
29892,
659,
297,
1583,
29889,
3972,
436,
1026,
29918,
9917,
4314,
29901,
13,
9651,
2380,
353,
938,
29898,
2248,
29897,
13,
13,
9651,
1583,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
798,
29889,
4397,
29898,
2248,
29897,
13,
9651,
1583,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
1054,
29889,
4397,
29898,
2248,
29897,
13,
9651,
1583,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
1272,
29889,
4397,
29898,
29896,
29897,
13,
13,
9651,
1583,
29889,
10945,
29918,
1359,
29918,
8111,
29961,
2248,
29962,
353,
659,
13,
13,
1678,
822,
903,
2929,
345,
29918,
10660,
29918,
1686,
800,
29898,
1311,
1125,
13,
13,
4706,
565,
451,
1583,
29889,
28544,
29918,
2929,
369,
29901,
13,
9651,
1583,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
2395,
29878,
353,
29234,
29889,
1111,
29877,
29918,
5344,
3552,
1311,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
1272,
29892,
313,
13,
18884,
1583,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
798,
29892,
1583,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
1054,
876,
467,
517,
2395,
29878,
580,
13,
9651,
1583,
29889,
2929,
918,
353,
11451,
314,
29887,
29889,
2929,
345,
29898,
1311,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
2395,
29878,
29892,
1583,
29889,
10945,
29918,
1359,
29918,
8111,
29892,
9750,
29922,
8824,
29892,
13,
462,
462,
4706,
304,
29880,
29922,
29896,
29872,
29899,
29896,
29900,
29897,
13,
4706,
1683,
29901,
13,
9651,
5534,
29918,
303,
2593,
2264,
29918,
29879,
5510,
353,
518,
9302,
29889,
2378,
29898,
1311,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
798,
511,
13,
462,
462,
539,
7442,
29889,
2378,
29898,
1311,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
1054,
511,
13,
462,
462,
539,
7442,
29889,
2378,
29898,
1311,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
1272,
4638,
13,
9651,
1583,
29889,
2929,
918,
353,
29234,
29918,
2929,
369,
29889,
29879,
5510,
29918,
29887,
11214,
29918,
344,
10652,
29898,
10945,
29918,
303,
2593,
2264,
29918,
29879,
5510,
29892,
1583,
29889,
10945,
29918,
1359,
29918,
8111,
29892,
13,
462,
462,
462,
795,
29234,
29918,
2080,
29922,
5574,
29897,
13,
13,
9651,
444,
1438,
899,
369,
3519,
526,
363,
1243,
13,
9651,
396,
1583,
29889,
10945,
29918,
303,
2593,
2264,
353,
29234,
29889,
1111,
29877,
29918,
5344,
3552,
1311,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
1272,
29892,
313,
13,
9651,
396,
268,
1583,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
798,
29892,
1583,
29889,
10945,
29918,
303,
2593,
2264,
29918,
5344,
29918,
1054,
876,
467,
517,
2395,
29878,
580,
13,
9651,
396,
1583,
29889,
2929,
918,
353,
301,
1144,
324,
369,
29889,
29926,
562,
15647,
29898,
1311,
29889,
10945,
29918,
303,
2593,
2264,
29889,
517,
2378,
3285,
1583,
29889,
10945,
29918,
1359,
29918,
8111,
29897,
13,
9651,
396,
1583,
29889,
2929,
918,
353,
301,
1144,
324,
369,
29889,
29887,
11214,
29918,
344,
10652,
29898,
1311,
29889,
10945,
29918,
303,
2593,
2264,
29889,
517,
2378,
3285,
1583,
29889,
10945,
29918,
1359,
29918,
8111,
29897,
13,
9651,
396,
1583,
29889,
2929,
918,
353,
29234,
29918,
2929,
369,
29889,
29879,
5510,
29918,
29926,
562,
15647,
29898,
1311,
29889,
10945,
29918,
303,
2593,
2264,
29889,
517,
2378,
3285,
1583,
29889,
10945,
29918,
1359,
29918,
8111,
29892,
29234,
29918,
2080,
29922,
8824,
29897,
13,
9651,
396,
1583,
29889,
2929,
918,
353,
29234,
29918,
2929,
369,
29889,
29879,
5510,
29918,
29887,
11214,
29918,
344,
10652,
29898,
1311,
29889,
10945,
29918,
303,
2593,
2264,
29889,
517,
2378,
3285,
1583,
29889,
10945,
29918,
1359,
29918,
8111,
29892,
29234,
29918,
2080,
29922,
8824,
29897,
13,
13,
4706,
565,
338,
8758,
29898,
1311,
29889,
2929,
918,
29892,
851,
1125,
13,
9651,
1596,
703,
1576,
10970,
363,
5608,
899,
369,
505,
4828,
23157,
13,
2
] |
tests/stdlib/test_math.py | bozhiyeh/voc | 0 | 112129 | import unittest
from ..utils import TranspileTestCase
class MathModuleTests(TranspileTestCase):
def test_fabs(self):
self.assertCodeExecution("""
import math
print(math.fabs(10234))
print(math.fabs(0.0001))
print(math.fabs(0))
print(math.fabs(-1))
""")
@unittest.expectedFailure
def test_fail(self):
self.assertCodeExecution("""
import math
try:
print(math.fabs('12334'))
except Exception as e:
print(type(e), e)
""") | [
1,
1053,
443,
27958,
13,
13,
3166,
6317,
13239,
1053,
4103,
29886,
488,
3057,
8259,
13,
13,
1990,
5792,
7355,
24376,
29898,
4300,
29886,
488,
3057,
8259,
1125,
13,
1678,
822,
1243,
29918,
29888,
6897,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
3399,
20418,
703,
15945,
13,
9651,
1053,
5844,
13,
9651,
1596,
29898,
755,
29889,
29888,
6897,
29898,
29896,
29900,
29906,
29941,
29946,
876,
13,
9651,
1596,
29898,
755,
29889,
29888,
6897,
29898,
29900,
29889,
29900,
29900,
29900,
29896,
876,
13,
9651,
1596,
29898,
755,
29889,
29888,
6897,
29898,
29900,
876,
13,
9651,
1596,
29898,
755,
29889,
29888,
6897,
6278,
29896,
876,
13,
9651,
5124,
1159,
13,
1678,
732,
348,
27958,
29889,
9684,
24155,
268,
13,
1678,
822,
1243,
29918,
14057,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
3399,
20418,
703,
15945,
13,
9651,
1053,
5844,
29871,
13,
9651,
1018,
29901,
13,
18884,
1596,
29898,
755,
29889,
29888,
6897,
877,
29896,
29906,
29941,
29941,
29946,
8785,
13,
9651,
5174,
8960,
408,
321,
29901,
13,
18884,
1596,
29898,
1853,
29898,
29872,
511,
321,
29897,
13,
9651,
5124,
1159,
2
] |
deepfence_backend/init_scripts/reindex_sbom_artifacts.py | riddopic/ThreatMapper | 0 | 1608741 | import os
from elasticsearch import Elasticsearch
from elasticsearch.helpers import bulk
import math
EL_HOST = "%s://%s:%s" % (os.getenv('ELASTICSEARCH_SCHEME', 'http'), os.environ['ELASTICSEARCH_HOST'], os.environ['ELASTICSEARCH_PORT'])
http_auth = None
CUSTOMER_UNIQUE_ID = os.getenv('CUSTOMER_UNIQUE_ID', None)
if 'ELASTICSEARCH_USER' in os.environ:
http_auth = (os.environ['ELASTICSEARCH_USER'],
os.environ['ELASTICSEARCH_PASSWORD'])
if http_auth:
EL_CLIENT = Elasticsearch([EL_HOST], http_auth=http_auth, timeout=300)
else:
EL_CLIENT = Elasticsearch([EL_HOST], timeout=300)
SBOM_INDEX = "sbom-cve-scan"
SBOM_ARTIFACT_INDEX = "sbom-artifact"
if CUSTOMER_UNIQUE_ID:
SBOM_INDEX += f"-{CUSTOMER_UNIQUE_ID}"
SBOM_ARTIFACT_INDEX += f"-{CUSTOMER_UNIQUE_ID}"
ARRAY_SIZE = 5
if EL_CLIENT.indices.exists(index=SBOM_INDEX) and EL_CLIENT.indices.exists(index=SBOM_ARTIFACT_INDEX):
sbom_count_array = EL_CLIENT.cat.count(SBOM_INDEX, params={"format": "json"})
sbom_count = 0
if sbom_count_array:
sbom_count = int(sbom_count_array[0]["count"])
if sbom_count > 0:
for i in range(0, math.ceil(sbom_count/ARRAY_SIZE)):
sbom_docs = EL_CLIENT.search(index=SBOM_INDEX, body={"query": {"match_all": {}}}, from_=i*ARRAY_SIZE, size=ARRAY_SIZE,
sort="scan_id.keyword:desc", _source=["scan_id", "node_id", "node_type",
"@timestamp", "time_stamp", "artifacts"])
if sbom_docs["hits"]["total"]["value"] > 0:
for sbom_doc in sbom_docs["hits"]["hits"]:
body = {
"query": {
"constant_score": {
"filter": {
"bool": {
"must": {
"terms": {
"scan_id.keyword": [sbom_doc["_source"]["scan_id"]]
}
}
}
}
}
}
}
sbom_artifact_res = EL_CLIENT.search(index=SBOM_ARTIFACT_INDEX, body=body, size=1)
if sbom_artifact_res.get("hits", {}).get("total", {}).get("value", -1) == 0:
source_doc = sbom_doc["_source"]
defaults = {
"scan_id": source_doc["scan_id"],
"node_id": source_doc["node_id"],
"node_type": source_doc["node_type"],
"masked": "false",
"@timestamp": source_doc["@timestamp"],
"time_stamp": source_doc["time_stamp"],
}
bulk_index_actions = []
for artifact in sbom_doc["_source"]["artifacts"]:
# print("Going through artifact: ", artifact["name"])
doc = {
**defaults,
"name": artifact["name"],
"version": artifact["version"],
"locations": artifact["locations"],
"licenses": artifact["licenses"],
"language": artifact["language"]
}
bulk_index_actions.append({
"_op_type": "index",
"_index": SBOM_ARTIFACT_INDEX,
"_source": doc
})
errors = bulk(EL_CLIENT, bulk_index_actions)
if errors:
print("Error while bulk processing artifacts for scan_id: ", source_doc["scan_id"])
print(errors)
| [
1,
1053,
2897,
13,
3166,
560,
20291,
1053,
1260,
20291,
13,
3166,
560,
20291,
29889,
3952,
6774,
1053,
21610,
13,
5215,
5844,
13,
13,
6670,
29918,
20832,
353,
11860,
29879,
597,
29995,
29879,
16664,
29879,
29908,
1273,
313,
359,
29889,
657,
6272,
877,
29923,
4375,
1254,
2965,
1660,
1718,
3210,
29918,
29903,
3210,
29923,
2303,
742,
525,
1124,
5477,
2897,
29889,
21813,
1839,
29923,
4375,
1254,
2965,
1660,
1718,
3210,
29918,
20832,
7464,
2897,
29889,
21813,
1839,
29923,
4375,
1254,
2965,
1660,
1718,
3210,
29918,
15082,
11287,
13,
1124,
29918,
5150,
353,
6213,
13,
29907,
17321,
6488,
1001,
29918,
3904,
29902,
11144,
29918,
1367,
353,
2897,
29889,
657,
6272,
877,
29907,
17321,
6488,
1001,
29918,
3904,
29902,
11144,
29918,
1367,
742,
6213,
29897,
13,
13,
361,
525,
29923,
4375,
1254,
2965,
1660,
1718,
3210,
29918,
11889,
29915,
297,
2897,
29889,
21813,
29901,
13,
1678,
1732,
29918,
5150,
353,
313,
359,
29889,
21813,
1839,
29923,
4375,
1254,
2965,
1660,
1718,
3210,
29918,
11889,
7464,
13,
462,
2897,
29889,
21813,
1839,
29923,
4375,
1254,
2965,
1660,
1718,
3210,
29918,
25711,
17013,
11287,
13,
13,
361,
1732,
29918,
5150,
29901,
13,
1678,
14845,
29918,
27205,
3919,
353,
1260,
20291,
4197,
6670,
29918,
20832,
1402,
1732,
29918,
5150,
29922,
1124,
29918,
5150,
29892,
11815,
29922,
29941,
29900,
29900,
29897,
13,
2870,
29901,
13,
1678,
14845,
29918,
27205,
3919,
353,
1260,
20291,
4197,
6670,
29918,
20832,
1402,
11815,
29922,
29941,
29900,
29900,
29897,
13,
13,
1744,
6488,
29918,
27992,
353,
376,
20778,
290,
29899,
29883,
345,
29899,
16192,
29908,
13,
1744,
6488,
29918,
8322,
29902,
4519,
1783,
29918,
27992,
353,
376,
20778,
290,
29899,
8813,
29908,
13,
361,
315,
17321,
6488,
1001,
29918,
3904,
29902,
11144,
29918,
1367,
29901,
13,
1678,
317,
29933,
6488,
29918,
27992,
4619,
285,
29908,
29899,
29912,
29907,
17321,
6488,
1001,
29918,
3904,
29902,
11144,
29918,
1367,
5038,
13,
1678,
317,
29933,
6488,
29918,
8322,
29902,
4519,
1783,
29918,
27992,
4619,
285,
29908,
29899,
29912,
29907,
17321,
6488,
1001,
29918,
3904,
29902,
11144,
29918,
1367,
5038,
13,
13,
1718,
22800,
29918,
14226,
353,
29871,
29945,
13,
13,
361,
14845,
29918,
27205,
3919,
29889,
513,
1575,
29889,
9933,
29898,
2248,
29922,
1744,
6488,
29918,
27992,
29897,
322,
14845,
29918,
27205,
3919,
29889,
513,
1575,
29889,
9933,
29898,
2248,
29922,
1744,
6488,
29918,
8322,
29902,
4519,
1783,
29918,
27992,
1125,
13,
1678,
17444,
290,
29918,
2798,
29918,
2378,
353,
14845,
29918,
27205,
3919,
29889,
4117,
29889,
2798,
29898,
1744,
6488,
29918,
27992,
29892,
8636,
3790,
29908,
4830,
1115,
376,
3126,
29908,
1800,
13,
1678,
17444,
290,
29918,
2798,
353,
29871,
29900,
13,
1678,
565,
17444,
290,
29918,
2798,
29918,
2378,
29901,
13,
4706,
17444,
290,
29918,
2798,
353,
938,
29898,
20778,
290,
29918,
2798,
29918,
2378,
29961,
29900,
29962,
3366,
2798,
20068,
13,
1678,
565,
17444,
290,
29918,
2798,
1405,
29871,
29900,
29901,
13,
4706,
363,
474,
297,
3464,
29898,
29900,
29892,
5844,
29889,
27696,
29898,
20778,
290,
29918,
2798,
29914,
1718,
22800,
29918,
14226,
22164,
13,
9651,
17444,
290,
29918,
2640,
353,
14845,
29918,
27205,
3919,
29889,
4478,
29898,
2248,
29922,
1744,
6488,
29918,
27992,
29892,
3573,
3790,
29908,
1972,
1115,
8853,
4352,
29918,
497,
1115,
426,
930,
1118,
515,
29918,
29922,
29875,
29930,
1718,
22800,
29918,
14226,
29892,
2159,
29922,
1718,
22800,
29918,
14226,
29892,
13,
462,
462,
308,
2656,
543,
16192,
29918,
333,
29889,
26766,
29901,
14273,
613,
903,
4993,
29922,
3366,
16192,
29918,
333,
613,
376,
3177,
29918,
333,
613,
376,
3177,
29918,
1853,
613,
13,
462,
462,
462,
462,
1669,
17962,
16394,
613,
376,
2230,
29918,
303,
1160,
613,
376,
8813,
29879,
20068,
13,
9651,
565,
17444,
290,
29918,
2640,
3366,
29882,
1169,
3108,
3366,
7827,
3108,
3366,
1767,
3108,
1405,
29871,
29900,
29901,
13,
18884,
363,
17444,
290,
29918,
1514,
297,
17444,
290,
29918,
2640,
3366,
29882,
1169,
3108,
3366,
29882,
1169,
3108,
29901,
13,
462,
1678,
3573,
353,
426,
13,
462,
4706,
376,
1972,
1115,
426,
13,
462,
9651,
376,
23362,
29918,
13628,
1115,
426,
13,
462,
18884,
376,
4572,
1115,
426,
13,
462,
462,
1678,
376,
11227,
1115,
426,
13,
462,
462,
4706,
376,
21969,
1115,
426,
13,
462,
462,
9651,
376,
357,
1516,
1115,
426,
13,
462,
462,
18884,
376,
16192,
29918,
333,
29889,
26766,
1115,
518,
20778,
290,
29918,
1514,
3366,
29918,
4993,
3108,
3366,
16192,
29918,
333,
3108,
29962,
13,
462,
462,
9651,
500,
13,
462,
462,
4706,
500,
13,
462,
462,
1678,
500,
13,
462,
18884,
500,
13,
462,
9651,
500,
13,
462,
4706,
500,
13,
462,
1678,
500,
13,
462,
1678,
17444,
290,
29918,
8813,
29918,
690,
353,
14845,
29918,
27205,
3919,
29889,
4478,
29898,
2248,
29922,
1744,
6488,
29918,
8322,
29902,
4519,
1783,
29918,
27992,
29892,
3573,
29922,
2587,
29892,
2159,
29922,
29896,
29897,
13,
462,
1678,
565,
17444,
290,
29918,
8813,
29918,
690,
29889,
657,
703,
29882,
1169,
613,
6571,
467,
657,
703,
7827,
613,
6571,
467,
657,
703,
1767,
613,
448,
29896,
29897,
1275,
29871,
29900,
29901,
13,
462,
4706,
2752,
29918,
1514,
353,
17444,
290,
29918,
1514,
3366,
29918,
4993,
3108,
13,
462,
4706,
21274,
353,
426,
13,
462,
9651,
376,
16192,
29918,
333,
1115,
2752,
29918,
1514,
3366,
16192,
29918,
333,
12436,
13,
462,
9651,
376,
3177,
29918,
333,
1115,
2752,
29918,
1514,
3366,
3177,
29918,
333,
12436,
13,
462,
9651,
376,
3177,
29918,
1853,
1115,
2752,
29918,
1514,
3366,
3177,
29918,
1853,
12436,
13,
462,
9651,
376,
13168,
287,
1115,
376,
4541,
613,
13,
462,
9651,
17962,
16394,
1115,
2752,
29918,
1514,
3366,
29992,
16394,
12436,
13,
462,
9651,
376,
2230,
29918,
303,
1160,
1115,
2752,
29918,
1514,
3366,
2230,
29918,
303,
1160,
12436,
13,
462,
4706,
500,
13,
462,
4706,
21610,
29918,
2248,
29918,
7387,
353,
5159,
13,
462,
4706,
363,
24238,
297,
17444,
290,
29918,
1514,
3366,
29918,
4993,
3108,
3366,
8813,
29879,
3108,
29901,
13,
462,
9651,
396,
1596,
703,
8120,
292,
1549,
24238,
29901,
9162,
24238,
3366,
978,
20068,
13,
462,
9651,
1574,
353,
426,
13,
462,
18884,
3579,
4381,
29879,
29892,
13,
462,
18884,
376,
978,
1115,
24238,
3366,
978,
12436,
13,
462,
18884,
376,
3259,
1115,
24238,
3366,
3259,
12436,
13,
462,
18884,
376,
2029,
800,
1115,
24238,
3366,
2029,
800,
12436,
13,
462,
18884,
376,
506,
11259,
1115,
24238,
3366,
506,
11259,
12436,
13,
462,
18884,
376,
11675,
1115,
24238,
3366,
11675,
3108,
13,
462,
9651,
500,
13,
462,
9651,
21610,
29918,
2248,
29918,
7387,
29889,
4397,
3319,
13,
462,
18884,
11119,
459,
29918,
1853,
1115,
376,
2248,
613,
13,
462,
18884,
11119,
2248,
1115,
317,
29933,
6488,
29918,
8322,
29902,
4519,
1783,
29918,
27992,
29892,
13,
462,
18884,
11119,
4993,
1115,
1574,
13,
462,
9651,
5615,
13,
462,
4706,
4436,
353,
21610,
29898,
6670,
29918,
27205,
3919,
29892,
21610,
29918,
2248,
29918,
7387,
29897,
13,
462,
4706,
565,
4436,
29901,
13,
462,
9651,
1596,
703,
2392,
1550,
21610,
9068,
24238,
29879,
363,
12812,
29918,
333,
29901,
9162,
2752,
29918,
1514,
3366,
16192,
29918,
333,
20068,
13,
462,
9651,
1596,
29898,
12523,
29897,
13,
13,
13,
2
] |
edi/ad.py | GaloisInc/adapt | 2 | 117656 | <reponame>GaloisInc/adapt
import argparse
import csv
import gzip
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import edi.simple.ad as ad
parser = argparse.ArgumentParser(description='Attribute value frequency')
parser.add_argument('--input', '-i',
help='input file', required=True)
parser.add_argument('--output', '-o',
help='output file', required=True)
parser.add_argument('--score', '-s',
help='avf or avc or rasp',
default='avf',
choices=['avf','avc','rasp'])
parser.add_argument('--mode', '-m',
help='batch or stream',
default='batch',
choices=['batch','stream'])
if __name__ == '__main__':
args = parser.parse_args()
if(args.mode == 'batch'):
ad.batch(args.input, args.output, args.score)
elif (args.mode == 'stream'):
ad.stream(args.input, args.output, args.score)
| [
1,
529,
276,
1112,
420,
29958,
29954,
7003,
275,
797,
29883,
29914,
1114,
415,
13,
5215,
1852,
5510,
13,
5215,
11799,
13,
5215,
330,
7554,
13,
5215,
10876,
13,
5215,
2897,
13,
13,
9675,
29889,
2084,
29889,
7851,
29898,
29900,
29892,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
7122,
29898,
359,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
511,
525,
636,
29915,
4961,
13,
13,
5215,
1226,
29875,
29889,
12857,
29889,
328,
408,
594,
13,
13,
16680,
353,
1852,
5510,
29889,
15730,
11726,
29898,
8216,
2433,
6708,
995,
10868,
1495,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
2080,
742,
17411,
29875,
742,
13,
12,
12,
12,
12,
12,
8477,
2433,
2080,
934,
742,
3734,
29922,
5574,
29897,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
4905,
742,
17411,
29877,
742,
13,
12,
12,
12,
12,
12,
8477,
2433,
4905,
934,
742,
3734,
29922,
5574,
29897,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
13628,
742,
17411,
29879,
742,
13,
12,
12,
12,
12,
12,
8477,
2433,
485,
29888,
470,
1029,
29883,
470,
364,
4692,
742,
13,
12,
12,
12,
12,
12,
4381,
2433,
485,
29888,
742,
13,
12,
12,
12,
12,
12,
1859,
1575,
29922,
1839,
485,
29888,
3788,
485,
29883,
3788,
3417,
29886,
11287,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
8513,
742,
17411,
29885,
742,
13,
12,
12,
12,
12,
12,
8477,
2433,
16175,
470,
4840,
742,
13,
12,
12,
12,
12,
12,
4381,
2433,
16175,
742,
13,
12,
12,
12,
12,
12,
1859,
1575,
29922,
1839,
16175,
3788,
5461,
11287,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
12,
5085,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
13,
12,
361,
29898,
5085,
29889,
8513,
1275,
525,
16175,
29374,
13,
12,
12,
328,
29889,
16175,
29898,
5085,
29889,
2080,
29892,
6389,
29889,
4905,
29892,
6389,
29889,
13628,
29897,
13,
12,
23681,
313,
5085,
29889,
8513,
1275,
525,
5461,
29374,
13,
12,
12,
328,
29889,
5461,
29898,
5085,
29889,
2080,
29892,
6389,
29889,
4905,
29892,
6389,
29889,
13628,
29897,
13,
2
] |
CS303_Pro/AI_Project1/test1.py | zc-BEAR/Course_Repo | 0 | 133890 | <reponame>zc-BEAR/Course_Repo<filename>CS303_Pro/AI_Project1/test1.py
import numpy as np
COLOR_BLACK = 1
COLOR_WHITE = -1
COLOR_NONE = 0
class AI(object):
def __init__(self, chessboard_size, color, time_out):
self.chessboard_size = chessboard_size
self.color = color
self.time_out = time_out
self.candidate_list = []
def go(self, chessboard):
chessboard = np.array(chessboard)
self.candidate_list.clear()
changeLimit(countRound(chessboard))
len, list = getMove(self.color, chessboard)
list = BubbleSort(list, len)
for i in range(0, len):
self.candidate_list.append((list[i][0], list[i][1]))
if (len != 0):
list.append((list[0][0], list[0][1]))
findMove(chessboard, self.color, 1, Limit, -INF, INF)
self.candidate_list.append((resultX, resultY))
DIR = ((-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 1), (1, -1), (1, 0), (1, 1))
Varr = [
[300, -20, 11, 5, 5, 10, -20, 300],
[-20, -80, 1, 1, 1, 2, -80, -20],
[11, 2, 4, 2, 2, 4, 2, 11],
[5, 1, 2, 1, 1, 2, 1, 5],
[5, 1, 2, 1, 1, 2, 1, 5],
[11, 2, 4, 2, 2, 4, 2, 11],
[-20, -80, 2, 1, 1, 2, -80, -20],
[300, -20, 11, 5, 5, 11, -20, 300]
]
BLACK = 1
WHITE = -1
INF = 1e8
Limit = 7
curr: int = 0
def countRound(board):
b, w = 0, 0
for i in range(0, 8):
for j in range(0, 8):
if (board[i][j] == BLACK):
b = b + 1
elif (board[i][j] == WHITE):
w = w + 1
return b + w
def changeLimit(curr: int):
global Limit
if curr <= 7:
Limit = 6
elif curr <= 15:
Limit = 6
elif curr <= 33:
Limit = 4
elif curr <= 44:
Limit = 5
elif curr <= 48:
Limit = 6
elif curr <= 50:
Limit = 6
elif curr < 52:
Limit = 6
elif curr < 54:
Limit = 7
else:
Limit = 20
def getV(color, board):
global Varr
global INF
now = 0
op = 0
opColor = -color
res = 0
for i in range(0, 8):
for j in range(0, 8):
if (board[i][j] == color):
res += Varr[i][j]
now = now + 1
elif (board[i][j] == opColor):
res -= Varr[i][j]
op = op + 1
if (now + op == 64 and now > op):
return INF + now - op
elif (now + op == 64 and now < op):
return -INF + now - op
elif (now + op == 64):
return 0
if (now == 0):
return -INF - op
if (op == 0):
return INF + now
return res
def getMove(color, board):
nxtMove = []
opColor = -color
numOfMove = 0
for i in range(0, 8):
for j in range(0, 8):
if (board[i][j] == 0):
change = 0
for d in range(0, 8):
if (change != 0):
break
nxtx = i + DIR[d][0]
nxty = j + DIR[d][1]
if (nxtx < 0 or nxtx >= 8 or nxty < 0 or nxty >= 8 or board[nxtx][nxty] != opColor):
continue
for k in range(1, 8):
nxtx = nxtx + DIR[d][0]
nxty = nxty + DIR[d][1]
if (nxtx < 0 or nxtx >= 8 or nxty < 0 or nxty >= 8 or board[nxtx][nxty] == 0):
break
if (board[nxtx][nxty] == color):
nxtMove.append([i, j])
change = 1
numOfMove = numOfMove + 1
break
if (change == 1):
break
return numOfMove, nxtMove
def Moves(board, color, x, y):
board[x][y] = color
opColor = -color
for i in range(0, 8):
nxtx = x + DIR[i][0]
nxty = y + DIR[i][1]
if nxtx < 0 or nxtx >= 8 or nxty < 0 or nxty >= 8 or board[nxtx][nxty] != opColor:
continue
for k in range(1, 8):
nxtx = nxtx + DIR[i][0]
nxty = nxty + DIR[i][1]
if (nxtx < 0 or nxtx >= 8 or nxty < 0 or nxty >= 8 or board[nxtx][nxty] == 0):
break
if (board[nxtx][nxty] == color):
while (nxtx != x or nxty != y):
nxtx = nxtx - DIR[i][0]
nxty = nxty - DIR[i][1]
board[nxtx][nxty] = color
return board
def getstable(color, board):
h, s, k1, k0 = [], [], [], []
for i in range(0, 8):
h.append(1)
s.append(1)
for i in range(0, 15):
k1.append(1)
k0.append(1)
for i in range(0, 8):
for j in range(0, 8):
if (board[i][j] == 0):
h[i] = 0
s[j] = 0
k1[i - j + 7] = 1
k0[i + j] = 1
stab, stb = 0, []
for i in range(0, 8):
L = []
for j in range(0, 8):
L.append(0)
if (i == 0 or i == 7 or j == 0 or j == 7):
if (i != 0 or i != 7 or j != 0 or j != 7):
continue
stab = stab + color * board[i][j]
stb[i][j] = abs(board[i][j])
elif (h[i] and s[j] and k1[i - j + 7] and k0[i + j]):
stab = stab + color * board[i][j]
stb.append(L)
for y in range(0, 8, 7):
if (h[y] == 1):
for x in range(1, 7):
stab = stab + color * board[y][x]
continue
for d in range(-1, 2, 2):
for X in range(1, 7):
x = X
if (d == 1):
x = 7 - X
if (board[y][x] == 0):
break
elif (board[y][x] == board[y][x + d]):
stb[y][x] = stb[y][x + d]
stab = stab + color * board[y][x]
elif (board[y][x] * board[y][x + d] == -1 and stb[y][x + d] == 1):
stb[y][x] = -1
elif (board[y][x] * board[y][x + d] == -1 and stb[y][x + d] == -1):
tem = x + d
while (stb[y][tem] != -1):
stb[y][tem] = 1
stab = stab + color * board[y][tem]
tem = tem + d
for y in range(0, 8, 7):
if (s[y] == 1):
for x in range(1, 7):
stab = stab + color * board[x][y]
continue
for d in range(-1, 2, 2):
for X in range(1, 7):
x = X
if (d == 1):
x = 7 - X
if (board[x][y] == 0):
break
if (board[x][y] == board[x + d][y]):
stb[x][y] = stb[x + d][y]
stab = stab + color * board[x][y]
elif (board[x][y] * board[x + d][y] == -1 and stb[x + d][y] == 1):
stb[x][y] = -1
elif (board[x][y] * board[x + d][y] == -1 and stb[x + d][y] == -1):
tem = x + d
while (stb[tem][y] != -1):
stb[tem][y] = 1
stab = stab + color * board[tem][y]
tem = tem + d
return stab
CurrentRound = 0
NumOfFind = 0
def Function(color, isMyTurn, board, movePower):
global NumOfFind
NumOfFind = NumOfFind + 1
if (isMyTurn == 0):
color = -color
movePower = -movePower
return getV(color, board) + movePower * 6 + getstable(color, board) * 20 + 6 * stableLine(color, board)
def stableLine(color, board):
ct = [0, 1, 2, 3, 4, 5, 6, 7, 8]
nowcolor = 0
nowcnt = 0
start = 1
res = 0
for i in range(0, 8):
if (start == 0 and board[i][0] == 0):
start = 1
elif (start == 1 and nowcnt != 0 and board[i][0] == 0):
res = res + ct[nowcnt] * color * nowcolor
start = 1
nowcnt = 0
nowcolor = 0
elif (nowcolor == 0 and start == 1 and board[i][0] != 0):
nowcolor = board[i][0]
nowcnt = nowcnt + 1
elif (start == 1 and board[i][0] != 0 and nowcolor != board[i][0]):
start = 0
elif (start == 1 and board[i][0] == nowcolor):
nowcnt = nowcnt + 1
if (start == 1):
res = res + ct[nowcnt] * color * nowcolor
return res
def Finished(board):
b, w = 0, 0
for i in range(0, 8):
for j in range(0, 8):
if (board[i][j] == BLACK):
b = b + 1
elif (board[i][j] == WHITE):
w = w + 1
if (b == 0 or w == 0 or b + w == 64):
return 1
return 0
def BubbleSort(moves, numOfMoves):
global Varr
for i in range(0, numOfMoves):
for j in range(i + 1, numOfMoves):
if (Varr[moves[i][0]][moves[i][1]] < Varr[moves[j][0]][moves[j][1]]):
moves[i], moves[j] = moves[j], moves[i]
return moves
MAX_FIND = 15000
resultX, resultY = -1, -1
def findMove(board, color, isMyTurn, round, alpha, beta):
global NumOfFind
global resultX
global resultY
if (round == 0 or Finished(board) == 1):
movePower, nxtMove = getMove(color, board)
return Function(color, isMyTurn, board, movePower)
if (round == Limit):
NumOfFind = 0
if (NumOfFind >= MAX_FIND):
if (isMyTurn == 1):
return alpha
else:
return beta
movePower, nxtMove = getMove(color, board)
nxtMove = BubbleSort(nxtMove, movePower)
opColor = -color
if (movePower == 0):
return findMove(board, opColor, 1 - isMyTurn, round - 1, alpha, beta)
elif (round == Limit):
resultX, resultY = nxtMove[0][0], nxtMove[0][1]
if (isMyTurn == 1):
for step in range(0, movePower):
newBoard = []
for i in range(0, 8):
L = []
for j in range(0, 8):
L.append(board[i][j])
newBoard.append(L)
newBoard = Moves(newBoard, color, nxtMove[step][0], nxtMove[step][1])
nxtV = findMove(newBoard, opColor, 1 - isMyTurn, round - 1, alpha, beta)
if (nxtV > alpha):
alpha = nxtV
if (round == Limit):
resultX = nxtMove[step][0]
resultY = nxtMove[step][1]
if (alpha >= beta):
return beta
else:
for step in range(0, movePower):
newBoard = []
for i in range(0, 8):
L = []
for j in range(0, 8):
L.append(board[i][j])
newBoard.append(L)
newBoard = Moves(newBoard, color, nxtMove[step][0], nxtMove[step][1])
nxtV = findMove(newBoard, opColor, 1 - isMyTurn, round - 1, alpha, beta)
if (nxtV < beta):
beta = nxtV
if (round == Limit):
resultX = nxtMove[step][0]
resultY = nxtMove[step][1]
if (alpha >= beta):
return alpha
del nxtMove
if (isMyTurn == 1):
return alpha
else:
return beta
#
# import datetime
# chessboard = []
# for i in range(0,8):
# L = []
# for j in range(0,8):
# L.append(0)
# chessboard.append(L)
# chessboard[3][4],chessboard[4][3] ,chessboard[3][3] ,chessboard[4][4] = BLACK,BLACK,WHITE,WHITE
# ai = AI(8,BLACK,10000000)
#
# for round in range (4,64):
# start=datetime.datetime.now()
# ai.go(chessboard)
# lens = len(ai.candidate_list)
# print(ai.candidate_list)
# print(round,Limit,NumOfFind)
# if( lens != 0 ):
# Moves(chessboard,ai.color,ai.candidate_list[lens-1][0],ai.candidate_list[lens-1][1])
# ai.color = -ai.color
# end=datetime.datetime.now()
# print(end-start)
| [
1,
529,
276,
1112,
420,
29958,
29920,
29883,
29899,
15349,
1718,
29914,
29907,
10242,
29918,
5612,
29877,
29966,
9507,
29958,
9295,
29941,
29900,
29941,
29918,
1184,
29914,
23869,
29918,
7653,
29896,
29914,
1688,
29896,
29889,
2272,
13,
5215,
12655,
408,
7442,
13,
15032,
1955,
29918,
13367,
11375,
353,
29871,
29896,
13,
15032,
1955,
29918,
25039,
9094,
353,
448,
29896,
13,
15032,
1955,
29918,
29940,
12413,
353,
29871,
29900,
13,
13,
13,
1990,
319,
29902,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
521,
404,
3377,
29918,
2311,
29892,
2927,
29892,
931,
29918,
449,
1125,
13,
4706,
1583,
29889,
305,
404,
3377,
29918,
2311,
353,
521,
404,
3377,
29918,
2311,
13,
4706,
1583,
29889,
2780,
353,
2927,
13,
4706,
1583,
29889,
2230,
29918,
449,
353,
931,
29918,
449,
13,
4706,
1583,
29889,
29883,
5380,
403,
29918,
1761,
353,
5159,
13,
13,
1678,
822,
748,
29898,
1311,
29892,
521,
404,
3377,
1125,
13,
4706,
521,
404,
3377,
353,
7442,
29889,
2378,
29898,
305,
404,
3377,
29897,
13,
4706,
1583,
29889,
29883,
5380,
403,
29918,
1761,
29889,
8551,
580,
13,
4706,
1735,
24445,
29898,
2798,
29934,
618,
29898,
305,
404,
3377,
876,
13,
4706,
7431,
29892,
1051,
353,
679,
16619,
29898,
1311,
29889,
2780,
29892,
521,
404,
3377,
29897,
13,
4706,
1051,
353,
350,
23232,
13685,
29898,
1761,
29892,
7431,
29897,
13,
4706,
363,
474,
297,
3464,
29898,
29900,
29892,
7431,
1125,
13,
9651,
1583,
29889,
29883,
5380,
403,
29918,
1761,
29889,
4397,
3552,
1761,
29961,
29875,
3816,
29900,
1402,
1051,
29961,
29875,
3816,
29896,
12622,
13,
4706,
565,
313,
2435,
2804,
29871,
29900,
1125,
13,
9651,
1051,
29889,
4397,
3552,
1761,
29961,
29900,
3816,
29900,
1402,
1051,
29961,
29900,
3816,
29896,
12622,
13,
9651,
1284,
16619,
29898,
305,
404,
3377,
29892,
1583,
29889,
2780,
29892,
29871,
29896,
29892,
9628,
277,
29892,
448,
24065,
29892,
2672,
29943,
29897,
13,
9651,
1583,
29889,
29883,
5380,
403,
29918,
1761,
29889,
4397,
3552,
2914,
29990,
29892,
1121,
29979,
876,
13,
13,
13,
9464,
353,
5135,
29899,
29896,
29892,
448,
29896,
511,
8521,
29896,
29892,
29871,
29900,
511,
8521,
29896,
29892,
29871,
29896,
511,
313,
29900,
29892,
448,
29896,
511,
313,
29900,
29892,
29871,
29896,
511,
313,
29896,
29892,
448,
29896,
511,
313,
29896,
29892,
29871,
29900,
511,
313,
29896,
29892,
29871,
29896,
876,
13,
13,
29963,
2749,
353,
518,
13,
1678,
518,
29941,
29900,
29900,
29892,
448,
29906,
29900,
29892,
29871,
29896,
29896,
29892,
29871,
29945,
29892,
29871,
29945,
29892,
29871,
29896,
29900,
29892,
448,
29906,
29900,
29892,
29871,
29941,
29900,
29900,
1402,
13,
1678,
21069,
29906,
29900,
29892,
448,
29947,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
448,
29947,
29900,
29892,
448,
29906,
29900,
1402,
13,
1678,
518,
29896,
29896,
29892,
29871,
29906,
29892,
29871,
29946,
29892,
29871,
29906,
29892,
29871,
29906,
29892,
29871,
29946,
29892,
29871,
29906,
29892,
29871,
29896,
29896,
1402,
13,
1678,
518,
29945,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29896,
29892,
29871,
29945,
1402,
13,
1678,
518,
29945,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29896,
29892,
29871,
29945,
1402,
13,
1678,
518,
29896,
29896,
29892,
29871,
29906,
29892,
29871,
29946,
29892,
29871,
29906,
29892,
29871,
29906,
29892,
29871,
29946,
29892,
29871,
29906,
29892,
29871,
29896,
29896,
1402,
13,
1678,
21069,
29906,
29900,
29892,
448,
29947,
29900,
29892,
29871,
29906,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
448,
29947,
29900,
29892,
448,
29906,
29900,
1402,
13,
1678,
518,
29941,
29900,
29900,
29892,
448,
29906,
29900,
29892,
29871,
29896,
29896,
29892,
29871,
29945,
29892,
29871,
29945,
29892,
29871,
29896,
29896,
29892,
448,
29906,
29900,
29892,
29871,
29941,
29900,
29900,
29962,
13,
29962,
13,
13,
13367,
11375,
353,
29871,
29896,
13,
25039,
9094,
353,
448,
29896,
13,
24065,
353,
29871,
29896,
29872,
29947,
13,
24445,
353,
29871,
29955,
13,
21962,
29901,
938,
353,
29871,
29900,
13,
13,
13,
1753,
2302,
29934,
618,
29898,
3377,
1125,
13,
1678,
289,
29892,
281,
353,
29871,
29900,
29892,
29871,
29900,
13,
1678,
363,
474,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
4706,
363,
432,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
9651,
565,
313,
3377,
29961,
29875,
3816,
29926,
29962,
1275,
350,
29931,
11375,
1125,
13,
18884,
289,
353,
289,
718,
29871,
29896,
13,
9651,
25342,
313,
3377,
29961,
29875,
3816,
29926,
29962,
1275,
12317,
9094,
1125,
13,
18884,
281,
353,
281,
718,
29871,
29896,
13,
1678,
736,
289,
718,
281,
13,
13,
13,
1753,
1735,
24445,
29898,
21962,
29901,
938,
1125,
13,
1678,
5534,
9628,
277,
13,
1678,
565,
16256,
5277,
29871,
29955,
29901,
13,
4706,
9628,
277,
353,
29871,
29953,
13,
1678,
25342,
16256,
5277,
29871,
29896,
29945,
29901,
13,
4706,
9628,
277,
353,
29871,
29953,
13,
1678,
25342,
16256,
5277,
29871,
29941,
29941,
29901,
13,
4706,
9628,
277,
353,
29871,
29946,
13,
1678,
25342,
16256,
5277,
29871,
29946,
29946,
29901,
13,
4706,
9628,
277,
353,
29871,
29945,
13,
1678,
25342,
16256,
5277,
29871,
29946,
29947,
29901,
13,
4706,
9628,
277,
353,
29871,
29953,
13,
1678,
25342,
16256,
5277,
29871,
29945,
29900,
29901,
13,
4706,
9628,
277,
353,
29871,
29953,
13,
1678,
25342,
16256,
529,
29871,
29945,
29906,
29901,
13,
4706,
9628,
277,
353,
29871,
29953,
13,
1678,
25342,
16256,
529,
29871,
29945,
29946,
29901,
13,
4706,
9628,
277,
353,
29871,
29955,
13,
1678,
1683,
29901,
13,
4706,
9628,
277,
353,
29871,
29906,
29900,
13,
13,
13,
1753,
679,
29963,
29898,
2780,
29892,
7613,
1125,
13,
1678,
5534,
478,
2749,
13,
1678,
5534,
2672,
29943,
13,
1678,
1286,
353,
29871,
29900,
13,
1678,
1015,
353,
29871,
29900,
13,
1678,
1015,
3306,
353,
448,
2780,
13,
1678,
620,
353,
29871,
29900,
13,
1678,
363,
474,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
4706,
363,
432,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
9651,
565,
313,
3377,
29961,
29875,
3816,
29926,
29962,
1275,
2927,
1125,
13,
18884,
620,
4619,
478,
2749,
29961,
29875,
3816,
29926,
29962,
13,
18884,
1286,
353,
1286,
718,
29871,
29896,
13,
9651,
25342,
313,
3377,
29961,
29875,
3816,
29926,
29962,
1275,
1015,
3306,
1125,
13,
18884,
620,
22361,
478,
2749,
29961,
29875,
3816,
29926,
29962,
13,
18884,
1015,
353,
1015,
718,
29871,
29896,
13,
1678,
565,
313,
3707,
718,
1015,
1275,
29871,
29953,
29946,
322,
1286,
1405,
1015,
1125,
13,
4706,
736,
2672,
29943,
718,
1286,
448,
1015,
13,
1678,
25342,
313,
3707,
718,
1015,
1275,
29871,
29953,
29946,
322,
1286,
529,
1015,
1125,
13,
4706,
736,
448,
24065,
718,
1286,
448,
1015,
13,
1678,
25342,
313,
3707,
718,
1015,
1275,
29871,
29953,
29946,
1125,
13,
4706,
736,
29871,
29900,
13,
1678,
565,
313,
3707,
1275,
29871,
29900,
1125,
13,
4706,
736,
448,
24065,
448,
1015,
13,
1678,
565,
313,
459,
1275,
29871,
29900,
1125,
13,
4706,
736,
2672,
29943,
718,
1286,
13,
1678,
736,
620,
13,
13,
13,
1753,
679,
16619,
29898,
2780,
29892,
7613,
1125,
13,
1678,
302,
486,
16619,
353,
5159,
13,
1678,
1015,
3306,
353,
448,
2780,
13,
1678,
954,
2776,
16619,
353,
29871,
29900,
13,
1678,
363,
474,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
4706,
363,
432,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
9651,
565,
313,
3377,
29961,
29875,
3816,
29926,
29962,
1275,
29871,
29900,
1125,
13,
18884,
1735,
353,
29871,
29900,
13,
18884,
363,
270,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
462,
1678,
565,
313,
3167,
2804,
29871,
29900,
1125,
13,
462,
4706,
2867,
13,
462,
1678,
302,
486,
29916,
353,
474,
718,
360,
8193,
29961,
29881,
3816,
29900,
29962,
13,
462,
1678,
302,
29312,
353,
432,
718,
360,
8193,
29961,
29881,
3816,
29896,
29962,
13,
462,
1678,
565,
313,
29876,
486,
29916,
529,
29871,
29900,
470,
302,
486,
29916,
6736,
29871,
29947,
470,
302,
29312,
529,
29871,
29900,
470,
302,
29312,
6736,
29871,
29947,
470,
7613,
29961,
29876,
486,
29916,
3816,
29876,
29312,
29962,
2804,
1015,
3306,
1125,
13,
462,
4706,
6773,
13,
462,
1678,
363,
413,
297,
3464,
29898,
29896,
29892,
29871,
29947,
1125,
13,
462,
4706,
302,
486,
29916,
353,
302,
486,
29916,
718,
360,
8193,
29961,
29881,
3816,
29900,
29962,
13,
462,
4706,
302,
29312,
353,
302,
29312,
718,
360,
8193,
29961,
29881,
3816,
29896,
29962,
13,
462,
4706,
565,
313,
29876,
486,
29916,
529,
29871,
29900,
470,
302,
486,
29916,
6736,
29871,
29947,
470,
302,
29312,
529,
29871,
29900,
470,
302,
29312,
6736,
29871,
29947,
470,
7613,
29961,
29876,
486,
29916,
3816,
29876,
29312,
29962,
1275,
29871,
29900,
1125,
13,
462,
9651,
2867,
13,
462,
4706,
565,
313,
3377,
29961,
29876,
486,
29916,
3816,
29876,
29312,
29962,
1275,
2927,
1125,
13,
462,
9651,
302,
486,
16619,
29889,
4397,
4197,
29875,
29892,
432,
2314,
13,
462,
9651,
1735,
353,
29871,
29896,
13,
462,
9651,
954,
2776,
16619,
353,
954,
2776,
16619,
718,
29871,
29896,
13,
462,
9651,
2867,
13,
462,
1678,
565,
313,
3167,
1275,
29871,
29896,
1125,
13,
462,
4706,
2867,
13,
1678,
736,
954,
2776,
16619,
29892,
302,
486,
16619,
13,
13,
13,
1753,
14104,
267,
29898,
3377,
29892,
2927,
29892,
921,
29892,
343,
1125,
13,
1678,
7613,
29961,
29916,
3816,
29891,
29962,
353,
2927,
13,
1678,
1015,
3306,
353,
448,
2780,
13,
1678,
363,
474,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
4706,
302,
486,
29916,
353,
921,
718,
360,
8193,
29961,
29875,
3816,
29900,
29962,
13,
4706,
302,
29312,
353,
343,
718,
360,
8193,
29961,
29875,
3816,
29896,
29962,
13,
4706,
565,
302,
486,
29916,
529,
29871,
29900,
470,
302,
486,
29916,
6736,
29871,
29947,
470,
302,
29312,
529,
29871,
29900,
470,
302,
29312,
6736,
29871,
29947,
470,
7613,
29961,
29876,
486,
29916,
3816,
29876,
29312,
29962,
2804,
1015,
3306,
29901,
13,
9651,
6773,
13,
4706,
363,
413,
297,
3464,
29898,
29896,
29892,
29871,
29947,
1125,
13,
9651,
302,
486,
29916,
353,
302,
486,
29916,
718,
360,
8193,
29961,
29875,
3816,
29900,
29962,
13,
9651,
302,
29312,
353,
302,
29312,
718,
360,
8193,
29961,
29875,
3816,
29896,
29962,
13,
9651,
565,
313,
29876,
486,
29916,
529,
29871,
29900,
470,
302,
486,
29916,
6736,
29871,
29947,
470,
302,
29312,
529,
29871,
29900,
470,
302,
29312,
6736,
29871,
29947,
470,
7613,
29961,
29876,
486,
29916,
3816,
29876,
29312,
29962,
1275,
29871,
29900,
1125,
13,
18884,
2867,
13,
9651,
565,
313,
3377,
29961,
29876,
486,
29916,
3816,
29876,
29312,
29962,
1275,
2927,
1125,
13,
18884,
1550,
313,
29876,
486,
29916,
2804,
921,
470,
302,
29312,
2804,
343,
1125,
13,
462,
1678,
302,
486,
29916,
353,
302,
486,
29916,
448,
360,
8193,
29961,
29875,
3816,
29900,
29962,
13,
462,
1678,
302,
29312,
353,
302,
29312,
448,
360,
8193,
29961,
29875,
3816,
29896,
29962,
13,
462,
1678,
7613,
29961,
29876,
486,
29916,
3816,
29876,
29312,
29962,
353,
2927,
13,
13,
1678,
736,
7613,
13,
13,
13,
1753,
679,
13844,
29898,
2780,
29892,
7613,
1125,
13,
1678,
298,
29892,
269,
29892,
413,
29896,
29892,
413,
29900,
353,
19997,
19997,
19997,
5159,
13,
1678,
363,
474,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
4706,
298,
29889,
4397,
29898,
29896,
29897,
13,
4706,
269,
29889,
4397,
29898,
29896,
29897,
13,
1678,
363,
474,
297,
3464,
29898,
29900,
29892,
29871,
29896,
29945,
1125,
13,
4706,
413,
29896,
29889,
4397,
29898,
29896,
29897,
13,
4706,
413,
29900,
29889,
4397,
29898,
29896,
29897,
13,
1678,
363,
474,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
4706,
363,
432,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
9651,
565,
313,
3377,
29961,
29875,
3816,
29926,
29962,
1275,
29871,
29900,
1125,
13,
18884,
298,
29961,
29875,
29962,
353,
29871,
29900,
13,
18884,
269,
29961,
29926,
29962,
353,
29871,
29900,
13,
18884,
413,
29896,
29961,
29875,
448,
432,
718,
29871,
29955,
29962,
353,
29871,
29896,
13,
18884,
413,
29900,
29961,
29875,
718,
432,
29962,
353,
29871,
29896,
13,
1678,
380,
370,
29892,
380,
29890,
353,
29871,
29900,
29892,
5159,
13,
1678,
363,
474,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
4706,
365,
353,
5159,
13,
4706,
363,
432,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
9651,
365,
29889,
4397,
29898,
29900,
29897,
13,
9651,
565,
313,
29875,
1275,
29871,
29900,
470,
474,
1275,
29871,
29955,
470,
432,
1275,
29871,
29900,
470,
432,
1275,
29871,
29955,
1125,
13,
18884,
565,
313,
29875,
2804,
29871,
29900,
470,
474,
2804,
29871,
29955,
470,
432,
2804,
29871,
29900,
470,
432,
2804,
29871,
29955,
1125,
13,
462,
1678,
6773,
13,
18884,
380,
370,
353,
380,
370,
718,
2927,
334,
7613,
29961,
29875,
3816,
29926,
29962,
13,
18884,
380,
29890,
29961,
29875,
3816,
29926,
29962,
353,
6425,
29898,
3377,
29961,
29875,
3816,
29926,
2314,
13,
9651,
25342,
313,
29882,
29961,
29875,
29962,
322,
269,
29961,
29926,
29962,
322,
413,
29896,
29961,
29875,
448,
432,
718,
29871,
29955,
29962,
322,
413,
29900,
29961,
29875,
718,
432,
29962,
1125,
13,
18884,
380,
370,
353,
380,
370,
718,
2927,
334,
7613,
29961,
29875,
3816,
29926,
29962,
13,
4706,
380,
29890,
29889,
4397,
29898,
29931,
29897,
13,
1678,
363,
343,
297,
3464,
29898,
29900,
29892,
29871,
29947,
29892,
29871,
29955,
1125,
13,
4706,
565,
313,
29882,
29961,
29891,
29962,
1275,
29871,
29896,
1125,
13,
9651,
363,
921,
297,
3464,
29898,
29896,
29892,
29871,
29955,
1125,
13,
18884,
380,
370,
353,
380,
370,
718,
2927,
334,
7613,
29961,
29891,
3816,
29916,
29962,
13,
9651,
6773,
13,
4706,
363,
270,
297,
3464,
6278,
29896,
29892,
29871,
29906,
29892,
29871,
29906,
1125,
13,
9651,
363,
1060,
297,
3464,
29898,
29896,
29892,
29871,
29955,
1125,
13,
18884,
921,
353,
1060,
13,
18884,
565,
313,
29881,
1275,
29871,
29896,
1125,
13,
462,
1678,
921,
353,
29871,
29955,
448,
1060,
13,
18884,
565,
313,
3377,
29961,
29891,
3816,
29916,
29962,
1275,
29871,
29900,
1125,
13,
462,
1678,
2867,
13,
18884,
25342,
313,
3377,
29961,
29891,
3816,
29916,
29962,
1275,
7613,
29961,
29891,
3816,
29916,
718,
270,
29962,
1125,
13,
462,
1678,
380,
29890,
29961,
29891,
3816,
29916,
29962,
353,
380,
29890,
29961,
29891,
3816,
29916,
718,
270,
29962,
13,
462,
1678,
380,
370,
353,
380,
370,
718,
2927,
334,
7613,
29961,
29891,
3816,
29916,
29962,
13,
18884,
25342,
313,
3377,
29961,
29891,
3816,
29916,
29962,
334,
7613,
29961,
29891,
3816,
29916,
718,
270,
29962,
1275,
448,
29896,
322,
380,
29890,
29961,
29891,
3816,
29916,
718,
270,
29962,
1275,
29871,
29896,
1125,
13,
462,
1678,
380,
29890,
29961,
29891,
3816,
29916,
29962,
353,
448,
29896,
13,
18884,
25342,
313,
3377,
29961,
29891,
3816,
29916,
29962,
334,
7613,
29961,
29891,
3816,
29916,
718,
270,
29962,
1275,
448,
29896,
322,
380,
29890,
29961,
29891,
3816,
29916,
718,
270,
29962,
1275,
448,
29896,
1125,
13,
462,
1678,
1350,
353,
921,
718,
270,
13,
462,
1678,
1550,
313,
303,
29890,
29961,
29891,
3816,
1356,
29962,
2804,
448,
29896,
1125,
13,
462,
4706,
380,
29890,
29961,
29891,
3816,
1356,
29962,
353,
29871,
29896,
13,
462,
4706,
380,
370,
353,
380,
370,
718,
2927,
334,
7613,
29961,
29891,
3816,
1356,
29962,
13,
462,
4706,
1350,
353,
1350,
718,
270,
13,
1678,
363,
343,
297,
3464,
29898,
29900,
29892,
29871,
29947,
29892,
29871,
29955,
1125,
13,
4706,
565,
313,
29879,
29961,
29891,
29962,
1275,
29871,
29896,
1125,
13,
9651,
363,
921,
297,
3464,
29898,
29896,
29892,
29871,
29955,
1125,
13,
18884,
380,
370,
353,
380,
370,
718,
2927,
334,
7613,
29961,
29916,
3816,
29891,
29962,
13,
9651,
6773,
13,
4706,
363,
270,
297,
3464,
6278,
29896,
29892,
29871,
29906,
29892,
29871,
29906,
1125,
13,
9651,
363,
1060,
297,
3464,
29898,
29896,
29892,
29871,
29955,
1125,
13,
18884,
921,
353,
1060,
13,
18884,
565,
313,
29881,
1275,
29871,
29896,
1125,
13,
462,
1678,
921,
353,
29871,
29955,
448,
1060,
13,
18884,
565,
313,
3377,
29961,
29916,
3816,
29891,
29962,
1275,
29871,
29900,
1125,
13,
462,
1678,
2867,
13,
18884,
565,
313,
3377,
29961,
29916,
3816,
29891,
29962,
1275,
7613,
29961,
29916,
718,
270,
3816,
29891,
29962,
1125,
13,
462,
1678,
380,
29890,
29961,
29916,
3816,
29891,
29962,
353,
380,
29890,
29961,
29916,
718,
270,
3816,
29891,
29962,
13,
462,
1678,
380,
370,
353,
380,
370,
718,
2927,
334,
7613,
29961,
29916,
3816,
29891,
29962,
13,
18884,
25342,
313,
3377,
29961,
29916,
3816,
29891,
29962,
334,
7613,
29961,
29916,
718,
270,
3816,
29891,
29962,
1275,
448,
29896,
322,
380,
29890,
29961,
29916,
718,
270,
3816,
29891,
29962,
1275,
29871,
29896,
1125,
13,
462,
1678,
380,
29890,
29961,
29916,
3816,
29891,
29962,
353,
448,
29896,
13,
18884,
25342,
313,
3377,
29961,
29916,
3816,
29891,
29962,
334,
7613,
29961,
29916,
718,
270,
3816,
29891,
29962,
1275,
448,
29896,
322,
380,
29890,
29961,
29916,
718,
270,
3816,
29891,
29962,
1275,
448,
29896,
1125,
13,
462,
1678,
1350,
353,
921,
718,
270,
13,
462,
1678,
1550,
313,
303,
29890,
29961,
1356,
3816,
29891,
29962,
2804,
448,
29896,
1125,
13,
462,
4706,
380,
29890,
29961,
1356,
3816,
29891,
29962,
353,
29871,
29896,
13,
462,
4706,
380,
370,
353,
380,
370,
718,
2927,
334,
7613,
29961,
1356,
3816,
29891,
29962,
13,
462,
4706,
1350,
353,
1350,
718,
270,
13,
1678,
736,
380,
370,
13,
13,
13,
7583,
29934,
618,
353,
29871,
29900,
13,
8009,
2776,
12542,
353,
29871,
29900,
13,
13,
13,
1753,
6680,
29898,
2780,
29892,
338,
3421,
27407,
29892,
7613,
29892,
4337,
21472,
1125,
13,
1678,
5534,
11848,
2776,
12542,
13,
1678,
11848,
2776,
12542,
353,
11848,
2776,
12542,
718,
29871,
29896,
13,
1678,
565,
313,
275,
3421,
27407,
1275,
29871,
29900,
1125,
13,
4706,
2927,
353,
448,
2780,
13,
4706,
4337,
21472,
353,
448,
11631,
21472,
13,
1678,
736,
679,
29963,
29898,
2780,
29892,
7613,
29897,
718,
4337,
21472,
334,
29871,
29953,
718,
679,
13844,
29898,
2780,
29892,
7613,
29897,
334,
29871,
29906,
29900,
718,
29871,
29953,
334,
13714,
3542,
29898,
2780,
29892,
7613,
29897,
13,
13,
13,
1753,
13714,
3542,
29898,
2780,
29892,
7613,
1125,
13,
1678,
274,
29873,
353,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
29892,
29871,
29953,
29892,
29871,
29955,
29892,
29871,
29947,
29962,
13,
1678,
1286,
2780,
353,
29871,
29900,
13,
1678,
1286,
20047,
353,
29871,
29900,
13,
1678,
1369,
353,
29871,
29896,
13,
1678,
620,
353,
29871,
29900,
13,
1678,
363,
474,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
4706,
565,
313,
2962,
1275,
29871,
29900,
322,
7613,
29961,
29875,
3816,
29900,
29962,
1275,
29871,
29900,
1125,
13,
9651,
1369,
353,
29871,
29896,
13,
4706,
25342,
313,
2962,
1275,
29871,
29896,
322,
1286,
20047,
2804,
29871,
29900,
322,
7613,
29961,
29875,
3816,
29900,
29962,
1275,
29871,
29900,
1125,
13,
9651,
620,
353,
620,
718,
274,
29873,
29961,
3707,
20047,
29962,
334,
2927,
334,
1286,
2780,
13,
9651,
1369,
353,
29871,
29896,
13,
9651,
1286,
20047,
353,
29871,
29900,
13,
9651,
1286,
2780,
353,
29871,
29900,
13,
4706,
25342,
313,
3707,
2780,
1275,
29871,
29900,
322,
1369,
1275,
29871,
29896,
322,
7613,
29961,
29875,
3816,
29900,
29962,
2804,
29871,
29900,
1125,
13,
9651,
1286,
2780,
353,
7613,
29961,
29875,
3816,
29900,
29962,
13,
9651,
1286,
20047,
353,
1286,
20047,
718,
29871,
29896,
13,
4706,
25342,
313,
2962,
1275,
29871,
29896,
322,
7613,
29961,
29875,
3816,
29900,
29962,
2804,
29871,
29900,
322,
1286,
2780,
2804,
7613,
29961,
29875,
3816,
29900,
29962,
1125,
13,
9651,
1369,
353,
29871,
29900,
13,
4706,
25342,
313,
2962,
1275,
29871,
29896,
322,
7613,
29961,
29875,
3816,
29900,
29962,
1275,
1286,
2780,
1125,
13,
9651,
1286,
20047,
353,
1286,
20047,
718,
29871,
29896,
13,
1678,
565,
313,
2962,
1275,
29871,
29896,
1125,
13,
4706,
620,
353,
620,
718,
274,
29873,
29961,
3707,
20047,
29962,
334,
2927,
334,
1286,
2780,
13,
1678,
736,
620,
13,
13,
13,
1753,
4231,
3276,
29898,
3377,
1125,
13,
1678,
289,
29892,
281,
353,
29871,
29900,
29892,
29871,
29900,
13,
1678,
363,
474,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
4706,
363,
432,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
9651,
565,
313,
3377,
29961,
29875,
3816,
29926,
29962,
1275,
350,
29931,
11375,
1125,
13,
18884,
289,
353,
289,
718,
29871,
29896,
13,
9651,
25342,
313,
3377,
29961,
29875,
3816,
29926,
29962,
1275,
12317,
9094,
1125,
13,
18884,
281,
353,
281,
718,
29871,
29896,
13,
1678,
565,
313,
29890,
1275,
29871,
29900,
470,
281,
1275,
29871,
29900,
470,
289,
718,
281,
1275,
29871,
29953,
29946,
1125,
13,
4706,
736,
29871,
29896,
13,
1678,
736,
29871,
29900,
13,
13,
13,
1753,
350,
23232,
13685,
29898,
13529,
267,
29892,
954,
2776,
29924,
586,
267,
1125,
13,
1678,
5534,
478,
2749,
13,
1678,
363,
474,
297,
3464,
29898,
29900,
29892,
954,
2776,
29924,
586,
267,
1125,
13,
4706,
363,
432,
297,
3464,
29898,
29875,
718,
29871,
29896,
29892,
954,
2776,
29924,
586,
267,
1125,
13,
9651,
565,
313,
29963,
2749,
29961,
13529,
267,
29961,
29875,
3816,
29900,
29962,
3816,
13529,
267,
29961,
29875,
3816,
29896,
5262,
529,
478,
2749,
29961,
13529,
267,
29961,
29926,
3816,
29900,
29962,
3816,
13529,
267,
29961,
29926,
3816,
29896,
5262,
1125,
13,
18884,
16229,
29961,
29875,
1402,
16229,
29961,
29926,
29962,
353,
16229,
29961,
29926,
1402,
16229,
29961,
29875,
29962,
13,
1678,
736,
16229,
13,
13,
13,
12648,
29918,
29943,
22255,
353,
29871,
29896,
29945,
29900,
29900,
29900,
13,
2914,
29990,
29892,
1121,
29979,
353,
448,
29896,
29892,
448,
29896,
13,
13,
13,
1753,
1284,
16619,
29898,
3377,
29892,
2927,
29892,
338,
3421,
27407,
29892,
4513,
29892,
15595,
29892,
21762,
1125,
13,
1678,
5534,
11848,
2776,
12542,
13,
1678,
5534,
1121,
29990,
13,
1678,
5534,
1121,
29979,
13,
1678,
565,
313,
14486,
1275,
29871,
29900,
470,
4231,
3276,
29898,
3377,
29897,
1275,
29871,
29896,
1125,
13,
4706,
4337,
21472,
29892,
302,
486,
16619,
353,
679,
16619,
29898,
2780,
29892,
7613,
29897,
13,
4706,
736,
6680,
29898,
2780,
29892,
338,
3421,
27407,
29892,
7613,
29892,
4337,
21472,
29897,
13,
1678,
565,
313,
14486,
1275,
9628,
277,
1125,
13,
4706,
11848,
2776,
12542,
353,
29871,
29900,
13,
1678,
565,
313,
8009,
2776,
12542,
6736,
18134,
29918,
29943,
22255,
1125,
13,
4706,
565,
313,
275,
3421,
27407,
1275,
29871,
29896,
1125,
13,
9651,
736,
15595,
13,
4706,
1683,
29901,
13,
9651,
736,
21762,
13,
1678,
4337,
21472,
29892,
302,
486,
16619,
353,
679,
16619,
29898,
2780,
29892,
7613,
29897,
13,
1678,
302,
486,
16619,
353,
350,
23232,
13685,
29898,
29876,
486,
16619,
29892,
4337,
21472,
29897,
13,
1678,
1015,
3306,
353,
448,
2780,
13,
1678,
565,
313,
11631,
21472,
1275,
29871,
29900,
1125,
13,
4706,
736,
1284,
16619,
29898,
3377,
29892,
1015,
3306,
29892,
29871,
29896,
448,
338,
3421,
27407,
29892,
4513,
448,
29871,
29896,
29892,
15595,
29892,
21762,
29897,
13,
1678,
25342,
313,
14486,
1275,
9628,
277,
1125,
13,
4706,
1121,
29990,
29892,
1121,
29979,
353,
302,
486,
16619,
29961,
29900,
3816,
29900,
1402,
302,
486,
16619,
29961,
29900,
3816,
29896,
29962,
13,
1678,
565,
313,
275,
3421,
27407,
1275,
29871,
29896,
1125,
13,
4706,
363,
4331,
297,
3464,
29898,
29900,
29892,
4337,
21472,
1125,
13,
9651,
716,
28397,
353,
5159,
13,
9651,
363,
474,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
18884,
365,
353,
5159,
13,
18884,
363,
432,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
462,
1678,
365,
29889,
4397,
29898,
3377,
29961,
29875,
3816,
29926,
2314,
13,
18884,
716,
28397,
29889,
4397,
29898,
29931,
29897,
13,
9651,
716,
28397,
353,
14104,
267,
29898,
1482,
28397,
29892,
2927,
29892,
302,
486,
16619,
29961,
10568,
3816,
29900,
1402,
302,
486,
16619,
29961,
10568,
3816,
29896,
2314,
13,
9651,
302,
486,
29963,
353,
1284,
16619,
29898,
1482,
28397,
29892,
1015,
3306,
29892,
29871,
29896,
448,
338,
3421,
27407,
29892,
4513,
448,
29871,
29896,
29892,
15595,
29892,
21762,
29897,
13,
9651,
565,
313,
29876,
486,
29963,
1405,
15595,
1125,
13,
18884,
15595,
353,
302,
486,
29963,
13,
18884,
565,
313,
14486,
1275,
9628,
277,
1125,
13,
462,
1678,
1121,
29990,
353,
302,
486,
16619,
29961,
10568,
3816,
29900,
29962,
13,
462,
1678,
1121,
29979,
353,
302,
486,
16619,
29961,
10568,
3816,
29896,
29962,
13,
9651,
565,
313,
2312,
6736,
21762,
1125,
13,
18884,
736,
21762,
13,
1678,
1683,
29901,
13,
4706,
363,
4331,
297,
3464,
29898,
29900,
29892,
4337,
21472,
1125,
13,
9651,
716,
28397,
353,
5159,
13,
9651,
363,
474,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
18884,
365,
353,
5159,
13,
18884,
363,
432,
297,
3464,
29898,
29900,
29892,
29871,
29947,
1125,
13,
462,
1678,
365,
29889,
4397,
29898,
3377,
29961,
29875,
3816,
29926,
2314,
13,
18884,
716,
28397,
29889,
4397,
29898,
29931,
29897,
13,
9651,
716,
28397,
353,
14104,
267,
29898,
1482,
28397,
29892,
2927,
29892,
302,
486,
16619,
29961,
10568,
3816,
29900,
1402,
302,
486,
16619,
29961,
10568,
3816,
29896,
2314,
13,
9651,
302,
486,
29963,
353,
1284,
16619,
29898,
1482,
28397,
29892,
1015,
3306,
29892,
29871,
29896,
448,
338,
3421,
27407,
29892,
4513,
448,
29871,
29896,
29892,
15595,
29892,
21762,
29897,
13,
9651,
565,
313,
29876,
486,
29963,
529,
21762,
1125,
13,
18884,
21762,
353,
302,
486,
29963,
13,
18884,
565,
313,
14486,
1275,
9628,
277,
1125,
13,
462,
1678,
1121,
29990,
353,
302,
486,
16619,
29961,
10568,
3816,
29900,
29962,
13,
462,
1678,
1121,
29979,
353,
302,
486,
16619,
29961,
10568,
3816,
29896,
29962,
13,
18884,
565,
313,
2312,
6736,
21762,
1125,
13,
462,
1678,
736,
15595,
13,
1678,
628,
302,
486,
16619,
13,
1678,
565,
313,
275,
3421,
27407,
1275,
29871,
29896,
1125,
13,
4706,
736,
15595,
13,
1678,
1683,
29901,
13,
4706,
736,
21762,
13,
13,
29937,
13,
29937,
1053,
12865,
13,
29937,
521,
404,
3377,
353,
5159,
13,
29937,
363,
474,
297,
3464,
29898,
29900,
29892,
29947,
1125,
13,
29937,
268,
365,
353,
5159,
13,
29937,
268,
363,
432,
297,
3464,
29898,
29900,
29892,
29947,
1125,
13,
29937,
308,
365,
29889,
4397,
29898,
29900,
29897,
13,
29937,
268,
521,
404,
3377,
29889,
4397,
29898,
29931,
29897,
13,
29937,
521,
404,
3377,
29961,
29941,
3816,
29946,
1402,
305,
404,
3377,
29961,
29946,
3816,
29941,
29962,
1919,
305,
404,
3377,
29961,
29941,
3816,
29941,
29962,
1919,
305,
404,
3377,
29961,
29946,
3816,
29946,
29962,
353,
350,
29931,
11375,
29892,
13367,
11375,
29892,
25039,
9094,
29892,
25039,
9094,
13,
29937,
7468,
353,
319,
29902,
29898,
29947,
29892,
13367,
11375,
29892,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29897,
13,
29937,
13,
29937,
363,
4513,
297,
3464,
313,
29946,
29892,
29953,
29946,
1125,
13,
29937,
268,
1369,
29922,
12673,
29889,
12673,
29889,
3707,
580,
13,
29937,
268,
7468,
29889,
1484,
29898,
305,
404,
3377,
29897,
13,
29937,
268,
301,
575,
353,
7431,
29898,
1794,
29889,
29883,
5380,
403,
29918,
1761,
29897,
13,
29937,
268,
1596,
29898,
1794,
29889,
29883,
5380,
403,
29918,
1761,
29897,
13,
29937,
268,
1596,
29898,
14486,
29892,
24445,
29892,
8009,
2776,
12542,
29897,
13,
29937,
268,
565,
29898,
301,
575,
2804,
29871,
29900,
29871,
1125,
13,
29937,
308,
14104,
267,
29898,
305,
404,
3377,
29892,
1794,
29889,
2780,
29892,
1794,
29889,
29883,
5380,
403,
29918,
1761,
29961,
29880,
575,
29899,
29896,
3816,
29900,
1402,
1794,
29889,
29883,
5380,
403,
29918,
1761,
29961,
29880,
575,
29899,
29896,
3816,
29896,
2314,
13,
29937,
268,
7468,
29889,
2780,
353,
448,
1794,
29889,
2780,
13,
29937,
268,
1095,
29922,
12673,
29889,
12673,
29889,
3707,
580,
13,
29937,
268,
1596,
29898,
355,
29899,
2962,
29897,
13,
2
] |
livius/video/processing/visualization/slide_boundaries.py | papar22/livius | 1 | 73646 | """
Visualise the min/max function for the slides contrast
"""
def visualize_environment_changes_and_histogram_interpolation(path_to_video, path_to_json_file):
from video.processing.postProcessing import ContrastEnhancer
# Read the Json file
corr, boundaries, frame_ids = read_histogram_correlations_and_boundaries_from_json_file(path_to_json_file)
X = frame_ids
print X
print corr
print boundaries
# Extract the segments and boundaries from the Contrast Enhancer
contrast_enhancer = ContrastEnhancer(corr, boundaries)
segments = contrast_enhancer.segments
segment_boundaries = contrast_enhancer.segment_histogram_boundaries
plt.figure('Histogram correlations and boundaries')
# ## Plot the histogram correlations
subplot1 = plt.subplot(2, 1, 1)
subplot1.set_title('Histogram Correlations')
subplot1.set_ylim([0, 1])
# Plot everything red
subplot1.plot(X, corr, 'r')
# Plot segments green
for (start, end) in segments:
subplot1.plot(X[int(start):int(end)], corr[int(start):int(end)], 'g')
# ## Plot the histogram boundaries
# Get the histogram boundary for every second
seconds = range(len(X))
boundaries = map(contrast_enhancer.get_histogram_boundaries_at_time, seconds)
min_max = zip(*boundaries)
min_values = min_max[0]
max_values = min_max[1]
subplot2 = plt.subplot(2, 1, 2)
subplot2.set_title('Min and Max histogram boundaries used for color correction')
def get_non_segments(frame_ids, segments):
"""Extract times that do not belong to segments"""
non_segments = []
# If the segments don't start at 0, we have a non-segment from 0 to the first segment
if segments[0][0] > 0:
non_segments.append((0, segments[0][0]))
# Append all times between the segments
for i in range(len(segments) - 1):
non_segments.append((segments[i][1], segments[i + 1][0]))
# If the segments don't end at the last possible frame, we have a non-segment from the last segment to the end
if segments[-1][1] < len(frame_ids):
non_segments.append((segments[-1][1], len(frame_ids)))
return non_segments
non_segments = get_non_segments(X, segments)
# Print Segments as straight line
for (start, end) in segments:
x_range = X[int(start) : int(end)]
subplot2.plot(x_range, min_values[int(start) : int(end)], 'b')
subplot2.plot(x_range, max_values[int(start) : int(end)], 'g')
# Print dashes between the segments
for (start, end) in non_segments:
x_range = X[int(start) : int(end)]
if len(x_range) > 1:
# We can use dotted dash line style
subplot2.plot(x_range, min_values[int(start) : int(end)], 'b-.')
subplot2.plot(x_range, max_values[int(start) : int(end)], 'g-.')
else:
# We only have one point, draw it as a hline marker
subplot2.plot(x_range, min_values[int(start) : int(end)], 'b_')
subplot2.plot(x_range, max_values[int(start) : int(end)], 'g_')
plt.show()
plt.figure('Frames')
# ## Plot the start frames of each segment
video = VideoFileClip(path_to_video, audio=False)
max_pics_in_x = 4
x_count = 1
num_rows = (len(segments) / max_pics_in_x) + 1
frame_count = 1
# Adjust the segments. The Json file starts at frame 60, so we cannot take get_frame(0) for this
# but rather get_frame(2)
time_correction = X[0][1] / 30 # @todo(Stephan): This assumes 30fps, what to do with missing fps data?
adjusted_segments = map(lambda (x, y): (x + time_correction, y + time_correction), segments)
for (start, end) in adjusted_segments:
# Extract and resize
frame = video.get_frame(start)
print frame.shape
frame = cv2.resize(frame, dsize=(0, 0), fx=0.1, fy=0.1)
# Plotting
subplot = plt.subplot(num_rows, max_pics_in_x, frame_count)
subplot.set_title('t = ' + str(start))
# Remove axis description
subplot.get_xaxis().set_ticks([])
subplot.get_yaxis().set_ticks([])
subplot.imshow(frame)
frame_count += 1
plt.show()
| [
1,
9995,
13,
16227,
895,
278,
1375,
29914,
3317,
740,
363,
278,
2243,
2247,
12814,
13,
13,
13,
15945,
29908,
13,
13,
13,
13,
1753,
7604,
675,
29918,
20944,
29918,
25990,
29918,
392,
29918,
29882,
391,
13342,
29918,
1639,
3733,
362,
29898,
2084,
29918,
517,
29918,
9641,
29892,
2224,
29918,
517,
29918,
3126,
29918,
1445,
1125,
13,
13,
1678,
515,
4863,
29889,
19170,
29889,
2490,
7032,
292,
1053,
1281,
509,
579,
2369,
5403,
2265,
13,
13,
1678,
396,
7523,
278,
14355,
934,
13,
1678,
27760,
29892,
24371,
29892,
3515,
29918,
4841,
353,
1303,
29918,
29882,
391,
13342,
29918,
2616,
2674,
800,
29918,
392,
29918,
9917,
4314,
29918,
3166,
29918,
3126,
29918,
1445,
29898,
2084,
29918,
517,
29918,
3126,
29918,
1445,
29897,
13,
1678,
1060,
353,
3515,
29918,
4841,
13,
13,
1678,
1596,
1060,
13,
1678,
1596,
27760,
13,
1678,
1596,
24371,
13,
13,
1678,
396,
7338,
1461,
278,
24611,
322,
24371,
515,
278,
1281,
509,
579,
1174,
5403,
2265,
13,
1678,
12814,
29918,
264,
5403,
2265,
353,
1281,
509,
579,
2369,
5403,
2265,
29898,
29725,
29892,
24371,
29897,
13,
1678,
24611,
353,
12814,
29918,
264,
5403,
2265,
29889,
10199,
1860,
13,
1678,
10768,
29918,
9917,
4314,
353,
12814,
29918,
264,
5403,
2265,
29889,
28192,
29918,
29882,
391,
13342,
29918,
9917,
4314,
13,
13,
1678,
14770,
29889,
4532,
877,
29950,
391,
13342,
8855,
800,
322,
24371,
1495,
13,
13,
1678,
396,
444,
18399,
278,
9825,
13342,
8855,
800,
13,
13,
1678,
1014,
5317,
29896,
353,
14770,
29889,
1491,
5317,
29898,
29906,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
1678,
1014,
5317,
29896,
29889,
842,
29918,
3257,
877,
29950,
391,
13342,
2994,
2674,
800,
1495,
13,
1678,
1014,
5317,
29896,
29889,
842,
29918,
29891,
2576,
4197,
29900,
29892,
29871,
29896,
2314,
13,
13,
1678,
396,
18399,
4129,
2654,
13,
1678,
1014,
5317,
29896,
29889,
5317,
29898,
29990,
29892,
27760,
29892,
525,
29878,
1495,
13,
13,
1678,
396,
18399,
24611,
7933,
13,
1678,
363,
313,
2962,
29892,
1095,
29897,
297,
24611,
29901,
13,
4706,
1014,
5317,
29896,
29889,
5317,
29898,
29990,
29961,
524,
29898,
2962,
1125,
524,
29898,
355,
29897,
1402,
27760,
29961,
524,
29898,
2962,
1125,
524,
29898,
355,
29897,
1402,
525,
29887,
1495,
13,
13,
13,
1678,
396,
444,
18399,
278,
9825,
13342,
24371,
13,
13,
1678,
396,
3617,
278,
9825,
13342,
10452,
363,
1432,
1473,
13,
1678,
6923,
353,
3464,
29898,
2435,
29898,
29990,
876,
13,
1678,
24371,
353,
2910,
29898,
9996,
579,
29918,
264,
5403,
2265,
29889,
657,
29918,
29882,
391,
13342,
29918,
9917,
4314,
29918,
271,
29918,
2230,
29892,
6923,
29897,
13,
1678,
1375,
29918,
3317,
353,
14319,
10456,
9917,
4314,
29897,
13,
1678,
1375,
29918,
5975,
353,
1375,
29918,
3317,
29961,
29900,
29962,
13,
1678,
4236,
29918,
5975,
353,
1375,
29918,
3317,
29961,
29896,
29962,
13,
13,
1678,
1014,
5317,
29906,
353,
14770,
29889,
1491,
5317,
29898,
29906,
29892,
29871,
29896,
29892,
29871,
29906,
29897,
13,
1678,
1014,
5317,
29906,
29889,
842,
29918,
3257,
877,
8140,
322,
5918,
9825,
13342,
24371,
1304,
363,
2927,
26385,
1495,
13,
13,
1678,
822,
679,
29918,
5464,
29918,
10199,
1860,
29898,
2557,
29918,
4841,
29892,
24611,
1125,
13,
4706,
9995,
5647,
1461,
3064,
393,
437,
451,
6852,
304,
24611,
15945,
29908,
13,
4706,
1661,
29918,
10199,
1860,
353,
5159,
13,
13,
4706,
396,
960,
278,
24611,
1016,
29915,
29873,
1369,
472,
29871,
29900,
29892,
591,
505,
263,
1661,
29899,
28192,
515,
29871,
29900,
304,
278,
937,
10768,
13,
4706,
565,
24611,
29961,
29900,
3816,
29900,
29962,
1405,
29871,
29900,
29901,
13,
9651,
1661,
29918,
10199,
1860,
29889,
4397,
3552,
29900,
29892,
24611,
29961,
29900,
3816,
29900,
12622,
13,
13,
4706,
396,
22871,
599,
3064,
1546,
278,
24611,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
10199,
1860,
29897,
448,
29871,
29896,
1125,
13,
9651,
1661,
29918,
10199,
1860,
29889,
4397,
3552,
10199,
1860,
29961,
29875,
3816,
29896,
1402,
24611,
29961,
29875,
718,
29871,
29896,
3816,
29900,
12622,
13,
13,
4706,
396,
960,
278,
24611,
1016,
29915,
29873,
1095,
472,
278,
1833,
1950,
3515,
29892,
591,
505,
263,
1661,
29899,
28192,
515,
278,
1833,
10768,
304,
278,
1095,
13,
4706,
565,
24611,
14352,
29896,
3816,
29896,
29962,
529,
7431,
29898,
2557,
29918,
4841,
1125,
13,
9651,
1661,
29918,
10199,
1860,
29889,
4397,
3552,
10199,
1860,
14352,
29896,
3816,
29896,
1402,
7431,
29898,
2557,
29918,
4841,
4961,
13,
13,
4706,
736,
1661,
29918,
10199,
1860,
13,
13,
1678,
1661,
29918,
10199,
1860,
353,
679,
29918,
5464,
29918,
10199,
1860,
29898,
29990,
29892,
24611,
29897,
13,
13,
1678,
396,
13905,
6667,
1860,
408,
7812,
1196,
13,
1678,
363,
313,
2962,
29892,
1095,
29897,
297,
24611,
29901,
13,
4706,
921,
29918,
3881,
353,
1060,
29961,
524,
29898,
2962,
29897,
584,
938,
29898,
355,
4638,
13,
13,
4706,
1014,
5317,
29906,
29889,
5317,
29898,
29916,
29918,
3881,
29892,
1375,
29918,
5975,
29961,
524,
29898,
2962,
29897,
584,
938,
29898,
355,
29897,
1402,
525,
29890,
1495,
13,
4706,
1014,
5317,
29906,
29889,
5317,
29898,
29916,
29918,
3881,
29892,
4236,
29918,
5975,
29961,
524,
29898,
2962,
29897,
584,
938,
29898,
355,
29897,
1402,
525,
29887,
1495,
13,
13,
1678,
396,
13905,
12569,
267,
1546,
278,
24611,
13,
1678,
363,
313,
2962,
29892,
1095,
29897,
297,
1661,
29918,
10199,
1860,
29901,
13,
13,
4706,
921,
29918,
3881,
353,
1060,
29961,
524,
29898,
2962,
29897,
584,
938,
29898,
355,
4638,
13,
13,
4706,
565,
7431,
29898,
29916,
29918,
3881,
29897,
1405,
29871,
29896,
29901,
13,
9651,
396,
1334,
508,
671,
270,
15048,
12569,
1196,
3114,
13,
9651,
1014,
5317,
29906,
29889,
5317,
29898,
29916,
29918,
3881,
29892,
1375,
29918,
5975,
29961,
524,
29898,
2962,
29897,
584,
938,
29898,
355,
29897,
1402,
525,
29890,
28753,
1495,
13,
9651,
1014,
5317,
29906,
29889,
5317,
29898,
29916,
29918,
3881,
29892,
4236,
29918,
5975,
29961,
524,
29898,
2962,
29897,
584,
938,
29898,
355,
29897,
1402,
525,
29887,
28753,
1495,
13,
4706,
1683,
29901,
13,
9651,
396,
1334,
871,
505,
697,
1298,
29892,
4216,
372,
408,
263,
298,
1220,
17456,
13,
9651,
1014,
5317,
29906,
29889,
5317,
29898,
29916,
29918,
3881,
29892,
1375,
29918,
5975,
29961,
524,
29898,
2962,
29897,
584,
938,
29898,
355,
29897,
1402,
525,
29890,
29918,
1495,
13,
9651,
1014,
5317,
29906,
29889,
5317,
29898,
29916,
29918,
3881,
29892,
4236,
29918,
5975,
29961,
524,
29898,
2962,
29897,
584,
938,
29898,
355,
29897,
1402,
525,
29887,
29918,
1495,
13,
13,
1678,
14770,
29889,
4294,
580,
13,
13,
1678,
14770,
29889,
4532,
877,
14438,
1280,
1495,
13,
13,
13,
1678,
396,
444,
18399,
278,
1369,
16608,
310,
1269,
10768,
13,
13,
1678,
4863,
353,
13987,
2283,
29907,
3466,
29898,
2084,
29918,
517,
29918,
9641,
29892,
10348,
29922,
8824,
29897,
13,
13,
1678,
4236,
29918,
29886,
1199,
29918,
262,
29918,
29916,
353,
29871,
29946,
13,
1678,
921,
29918,
2798,
353,
29871,
29896,
13,
1678,
954,
29918,
5727,
353,
313,
2435,
29898,
10199,
1860,
29897,
847,
4236,
29918,
29886,
1199,
29918,
262,
29918,
29916,
29897,
718,
29871,
29896,
13,
1678,
3515,
29918,
2798,
353,
29871,
29896,
13,
13,
13,
1678,
396,
2087,
5143,
278,
24611,
29889,
450,
14355,
934,
8665,
472,
3515,
29871,
29953,
29900,
29892,
577,
591,
2609,
2125,
679,
29918,
2557,
29898,
29900,
29897,
363,
445,
13,
1678,
396,
541,
3265,
679,
29918,
2557,
29898,
29906,
29897,
13,
13,
1678,
931,
29918,
2616,
276,
428,
353,
1060,
29961,
29900,
3816,
29896,
29962,
847,
29871,
29941,
29900,
29871,
396,
732,
29873,
8144,
29898,
7789,
16711,
1125,
910,
15894,
29871,
29941,
29900,
29888,
567,
29892,
825,
304,
437,
411,
4567,
285,
567,
848,
29973,
13,
1678,
10365,
287,
29918,
10199,
1860,
353,
2910,
29898,
2892,
313,
29916,
29892,
343,
1125,
313,
29916,
718,
931,
29918,
2616,
276,
428,
29892,
343,
718,
931,
29918,
2616,
276,
428,
511,
24611,
29897,
13,
13,
13,
1678,
363,
313,
2962,
29892,
1095,
29897,
297,
10365,
287,
29918,
10199,
1860,
29901,
13,
4706,
396,
7338,
1461,
322,
19490,
13,
4706,
3515,
353,
4863,
29889,
657,
29918,
2557,
29898,
2962,
29897,
13,
13,
4706,
1596,
3515,
29889,
12181,
13,
13,
4706,
3515,
353,
13850,
29906,
29889,
21476,
29898,
2557,
29892,
270,
2311,
7607,
29900,
29892,
29871,
29900,
511,
285,
29916,
29922,
29900,
29889,
29896,
29892,
285,
29891,
29922,
29900,
29889,
29896,
29897,
13,
13,
4706,
396,
18399,
1259,
13,
4706,
1014,
5317,
353,
14770,
29889,
1491,
5317,
29898,
1949,
29918,
5727,
29892,
4236,
29918,
29886,
1199,
29918,
262,
29918,
29916,
29892,
3515,
29918,
2798,
29897,
13,
4706,
1014,
5317,
29889,
842,
29918,
3257,
877,
29873,
353,
525,
718,
851,
29898,
2962,
876,
13,
13,
4706,
396,
15154,
9685,
6139,
13,
4706,
1014,
5317,
29889,
657,
29918,
29916,
8990,
2141,
842,
29918,
29873,
7358,
4197,
2314,
13,
4706,
1014,
5317,
29889,
657,
29918,
29891,
8990,
2141,
842,
29918,
29873,
7358,
4197,
2314,
13,
13,
4706,
1014,
5317,
29889,
326,
4294,
29898,
2557,
29897,
13,
13,
4706,
3515,
29918,
2798,
4619,
29871,
29896,
13,
13,
1678,
14770,
29889,
4294,
580,
13,
2
] |
app.py | aws-samples/eks-configrules-with-cdk | 1 | 88746 | #!/usr/bin/env python3
from aws_cdk import App, Aspects
from eks_cis_cdk.eks_cis_cdk_stack import CdkConfigEksStack
from eks_cis_cdk.config_cis_cdk_stack import lambdaStack
# from config_cis_cdk.eks_cis_cdk_stack import lambdaStack
# from eks_cis_cdk.eks_test_stack import lambdaTestStack
############### Deployment Parameters ####################################################################
eks_admin_rolename = (
"Admin" # Set this to the Admin role in your AWS account, this is typically 'Admin'
)
trusted_registries = "111111111111.dkr.ecr.us-east-1.amazonaws.com,busybox"
##########################################################################################################
app = App()
eks_stack = CdkConfigEksStack(
app, "eksconfigexample", eks_admin_rolename=eks_admin_rolename
)
config_stack = lambdaStack(
app,
"configrules",
eks_lambda_role=eks_stack.lambda_role,
eks_cluster=eks_stack.cluster.cluster_name,
trusted_registries=trusted_registries,
)
app.synth()
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
3166,
25879,
29918,
2252,
29895,
1053,
2401,
29892,
1094,
1103,
29879,
13,
3166,
321,
2039,
29918,
3476,
29918,
2252,
29895,
29889,
14541,
29918,
3476,
29918,
2252,
29895,
29918,
1429,
1053,
315,
8181,
3991,
29923,
2039,
7264,
13,
3166,
321,
2039,
29918,
3476,
29918,
2252,
29895,
29889,
2917,
29918,
3476,
29918,
2252,
29895,
29918,
1429,
1053,
14013,
7264,
13,
13,
29937,
515,
2295,
29918,
3476,
29918,
2252,
29895,
29889,
14541,
29918,
3476,
29918,
2252,
29895,
29918,
1429,
1053,
14013,
7264,
13,
29937,
515,
321,
2039,
29918,
3476,
29918,
2252,
29895,
29889,
14541,
29918,
1688,
29918,
1429,
1053,
14013,
3057,
7264,
13,
13,
7346,
4136,
2277,
29937,
10034,
22812,
12662,
2699,
835,
13383,
13383,
13383,
13383,
29937,
13,
14541,
29918,
6406,
29918,
1467,
3871,
353,
313,
13,
1678,
376,
12754,
29908,
29871,
396,
3789,
445,
304,
278,
10229,
6297,
297,
596,
15540,
3633,
29892,
445,
338,
12234,
525,
12754,
29915,
13,
29897,
13,
509,
16656,
29918,
1727,
391,
2722,
353,
376,
29896,
29896,
29896,
29896,
29896,
29896,
29896,
29896,
29896,
29896,
29896,
29896,
29889,
8181,
29878,
29889,
687,
29878,
29889,
375,
29899,
23027,
29899,
29896,
29889,
17260,
10467,
29889,
510,
29892,
8262,
29891,
1884,
29908,
13,
13383,
13383,
13383,
13383,
13383,
13383,
7346,
2277,
13,
13,
13,
932,
353,
2401,
580,
13,
14541,
29918,
1429,
353,
315,
8181,
3991,
29923,
2039,
7264,
29898,
13,
1678,
623,
29892,
376,
14541,
2917,
4773,
613,
321,
2039,
29918,
6406,
29918,
1467,
3871,
29922,
14541,
29918,
6406,
29918,
1467,
3871,
13,
29897,
13,
2917,
29918,
1429,
353,
14013,
7264,
29898,
13,
1678,
623,
29892,
13,
1678,
376,
2917,
19238,
613,
13,
1678,
321,
2039,
29918,
2892,
29918,
12154,
29922,
14541,
29918,
1429,
29889,
2892,
29918,
12154,
29892,
13,
1678,
321,
2039,
29918,
19594,
29922,
14541,
29918,
1429,
29889,
19594,
29889,
19594,
29918,
978,
29892,
13,
1678,
9311,
287,
29918,
1727,
391,
2722,
29922,
509,
16656,
29918,
1727,
391,
2722,
29892,
13,
29897,
13,
13,
932,
29889,
19274,
386,
580,
13,
2
] |
hard-gists/3a2a081e4f3089920fd8aecefecbe280/snippet.py | jjhenkel/dockerizeme | 21 | 29075 | <reponame>jjhenkel/dockerizeme<gh_stars>10-100
'''Trains a simple convnet on the MNIST dataset.
Does flat increment from <NAME> "Error-Driven Incremental Learning in Deep Convolutional
Neural Network for Large-Scale Image Classification"
Starts with just 3 classes, trains for 12 epochs then
incrementally trains the rest of the classes by reusing
the trained weights.
'''
from __future__ import print_function
import numpy as np
np.random.seed(1) # for reproducibility
from keras.datasets import mnist
from keras.models import Sequential, model_from_json
from keras.layers.core import Dense, Dropout, Activation, Flatten
from keras.layers.convolutional import Convolution2D, MaxPooling2D
from keras.utils import np_utils
def build_data(classes,total_classes,X_train_all,y_train_all,X_test_all,y_test_all):
train_ind = []
test_ind = []
for c in classes:
train_ind.extend(list(np.where(y_train_all==c)[0]))
test_ind.extend(list(np.where(y_test_all==c)[0]))
X_train = X_train_all[train_ind,:,:]
X_test = X_test_all[test_ind,:,:]
y_train_true = y_train_all[train_ind]
y_train = np.zeros(y_train_true.shape)
y_test_true = y_test_all[test_ind]
y_test = np.zeros(y_test_true.shape)
for i,c in enumerate(classes):
train_ind = list(np.where(y_train_true==c)[0])
test_ind = list(np.where(y_test_true==c)[0])
y_train[train_ind] = i
y_test[test_ind] = i
X_train = X_train.reshape(X_train.shape[0], 1, img_rows, img_cols)
X_test = X_test.reshape(X_test.shape[0], 1, img_rows, img_cols)
X_train = X_train.astype('float32')
X_test = X_test.astype('float32')
X_train /= 255
X_test /= 255
# convert class vectors to binary class matrices
Y_train = np_utils.to_categorical(y_train, total_classes)
Y_test = np_utils.to_categorical(y_test, total_classes)
return X_train, Y_train, X_test, Y_test
def build_model(old_model=None):
model = Sequential()
if old_model is None:
model.add(Convolution2D(nb_filters, nb_conv, nb_conv,
border_mode='valid',
input_shape=(1, img_rows, img_cols)))
else:
weights = old_model.layers[0].get_weights()
model.add(Convolution2D(nb_filters, nb_conv, nb_conv,
border_mode='valid',weights=weights,
input_shape=(1, img_rows, img_cols)))
model.add(Activation('relu'))
if old_model is None:
model.add(Convolution2D(nb_filters, nb_conv, nb_conv))
else:
weights = old_model.layers[2].get_weights()
model.add(Convolution2D(nb_filters, nb_conv, nb_conv,weights=weights))
model.add(Activation('relu'))
model.add(MaxPooling2D(pool_size=(nb_pool, nb_pool)))
model.add(Dropout(0.25))
model.add(Flatten())
if old_model is None:
model.add(Dense(128))
else:
weights = old_model.layers[7].get_weights()
model.add(Dense(128,weights=weights))
model.add(Activation('relu'))
model.add(Dropout(0.5))
return model
if __name__ == '__main__':
MODEL_TRAINED = False
# input image dimensions
img_rows, img_cols = 28, 28
# the data, shuffled and split between train and test sets
(X_train_all, y_train_all), (X_test_all, y_test_all) = mnist.load_data()
if not MODEL_TRAINED:
batch_size = 256
total_classes = 10
nb_epoch = 12
# number of convolutional filters to use
nb_filters = 32
# size of pooling area for max pooling
nb_pool = 2
# convolution kernel size
nb_conv = 3
classes = [9,1,6]
X_train, Y_train, X_test, Y_test = build_data(classes,3,
X_train_all,y_train_all,X_test_all,y_test_all)
model1 = build_model()
model1.add(Dense(len(classes)))
model1.add(Activation('softmax'))
model1.compile(loss='categorical_crossentropy',optimizer='adadelta',metrics=['accuracy'])
model1.fit(X_train, Y_train, batch_size=batch_size, nb_epoch=nb_epoch,
verbose=1, validation_data=(X_test, Y_test))
# Save this model for later interrogation
json_string = model1.to_json()
open('model1_incremental_architecture.json', 'w').write(json_string)
model1.save_weights('model1_incremental_weights.h5')
score = model1.evaluate(X_test, Y_test, verbose=0)
print('Test score:', score[0])
print('Test accuracy:', score[1])
# Now create a new model with all total_classes in the softmax layer. Copy over the weights to
# this new network and initialize the new class connections randomly.
model2 = build_model(old_model=model1)
model2.add(Dense(total_classes))
# Replace the corresponding weights of the new network with the previously trained class weights
weights = model2.layers[-1].get_weights()
old_weights = model1.layers[-2].get_weights() # Last dense layer is second to last layer
weights[0][:,-len(classes):] = old_weights[0]
weights[1][-len(classes):] = old_weights[1]
model2.layers[-1].set_weights(weights)
model2.add(Activation('softmax'))
model2.compile(loss='categorical_crossentropy',optimizer='adadelta',metrics=['accuracy'])
new_classes = [7, 0, 3, 5, 2, 8, 4]
class_mapping = new_classes[:]
class_mapping.extend(classes)
X_train, Y_train, X_test, Y_test = build_data(new_classes,10,
X_train_all,y_train_all,X_test_all,y_test_all)
model2.fit(X_train, Y_train, batch_size=batch_size, nb_epoch=nb_epoch,
verbose=1, validation_data=(X_test, Y_test))
score = model2.evaluate(X_test, Y_test, verbose=0)
print('Test score:', score[0])
print('Test accuracy:', score[1])
# Save the incrementally trained model
json_string = model2.to_json()
open('model2_incremental_architecture.json', 'w').write(json_string)
model2.save_weights('model2_incremental_weights.h5')
X_test = X_test_all.reshape(X_test_all.shape[0], 1, img_rows, img_cols)
X_test = X_test.astype('float32')
X_test /= 255
# Convert class vectors to binary class matrices
# Note, that when a new image is presented to this network, the label of the image must be
# fed into class_mapping to get the "real" label of the output
y_test = np.array([class_mapping.index(c) for c in y_test_all])
Y_test = np_utils.to_categorical(y_test, total_classes)
score = model2.evaluate(X_test, Y_test, verbose=1)
print('Total Test score:', score[0])
print('Total Test accuracy:', score[1])
else:
# Load the incrementally trained model and test it
model = model_from_json(open('model2_incremental_architecture.json').read())
model.load_weights('model2_incremental_weights.h5')
model.compile(loss='categorical_crossentropy',optimizer='adadelta',metrics=['accuracy'])
classes = [7, 0, 3, 5, 2, 8, 4, 9, 1, 6]
X_train, Y_train, X_test, Y_test = build_data(classes,10,
X_train_all,y_train_all,X_test_all,y_test_all)
score = model.evaluate(X_test, Y_test, verbose=1)
print('Total Test score:', score[0])
print('Total Test accuracy:', score[1])
score = model.evaluate(X_train, Y_train, verbose=1)
print('Total Train score:', score[0])
print('Total Train accuracy:', score[1])
| [
1,
529,
276,
1112,
420,
29958,
29926,
29926,
3169,
10265,
29914,
14695,
466,
2004,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
12008,
5323,
1144,
263,
2560,
7602,
1212,
373,
278,
341,
29940,
9047,
8783,
29889,
13,
25125,
12151,
11924,
515,
529,
5813,
29958,
29871,
376,
2392,
29899,
29928,
374,
854,
512,
17053,
284,
29257,
297,
21784,
1281,
4068,
284,
29871,
13,
8139,
3631,
8527,
363,
8218,
479,
29899,
17185,
7084,
23236,
29908,
13,
4763,
29879,
411,
925,
29871,
29941,
4413,
29892,
22983,
363,
29871,
29896,
29906,
21502,
12168,
769,
29871,
13,
25629,
635,
22983,
278,
1791,
310,
278,
4413,
491,
337,
4746,
29871,
13,
1552,
16370,
18177,
29889,
13,
12008,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
5215,
12655,
408,
7442,
13,
9302,
29889,
8172,
29889,
26776,
29898,
29896,
29897,
29871,
396,
363,
9483,
455,
29890,
1793,
13,
13,
3166,
13023,
294,
29889,
14538,
1691,
1053,
28597,
391,
13,
3166,
13023,
294,
29889,
9794,
1053,
922,
339,
2556,
29892,
1904,
29918,
3166,
29918,
3126,
13,
3166,
13023,
294,
29889,
29277,
29889,
3221,
1053,
360,
1947,
29892,
20724,
449,
29892,
21775,
362,
29892,
2379,
8606,
13,
3166,
13023,
294,
29889,
29277,
29889,
535,
4068,
284,
1053,
1281,
4068,
29906,
29928,
29892,
5918,
11426,
292,
29906,
29928,
13,
3166,
13023,
294,
29889,
13239,
1053,
7442,
29918,
13239,
13,
13,
1753,
2048,
29918,
1272,
29898,
13203,
29892,
7827,
29918,
13203,
29892,
29990,
29918,
14968,
29918,
497,
29892,
29891,
29918,
14968,
29918,
497,
29892,
29990,
29918,
1688,
29918,
497,
29892,
29891,
29918,
1688,
29918,
497,
1125,
13,
1678,
7945,
29918,
513,
353,
5159,
13,
1678,
1243,
29918,
513,
353,
5159,
13,
1678,
363,
274,
297,
4413,
29901,
13,
4706,
7945,
29918,
513,
29889,
21843,
29898,
1761,
29898,
9302,
29889,
3062,
29898,
29891,
29918,
14968,
29918,
497,
1360,
29883,
9601,
29900,
12622,
13,
4706,
1243,
29918,
513,
29889,
21843,
29898,
1761,
29898,
9302,
29889,
3062,
29898,
29891,
29918,
1688,
29918,
497,
1360,
29883,
9601,
29900,
12622,
13,
13,
1678,
1060,
29918,
14968,
353,
1060,
29918,
14968,
29918,
497,
29961,
14968,
29918,
513,
29892,
29901,
29892,
17531,
13,
1678,
1060,
29918,
1688,
353,
1060,
29918,
1688,
29918,
497,
29961,
1688,
29918,
513,
29892,
29901,
29892,
17531,
13,
13,
1678,
343,
29918,
14968,
29918,
3009,
353,
343,
29918,
14968,
29918,
497,
29961,
14968,
29918,
513,
29962,
13,
1678,
343,
29918,
14968,
353,
7442,
29889,
3298,
359,
29898,
29891,
29918,
14968,
29918,
3009,
29889,
12181,
29897,
13,
1678,
343,
29918,
1688,
29918,
3009,
353,
343,
29918,
1688,
29918,
497,
29961,
1688,
29918,
513,
29962,
13,
1678,
343,
29918,
1688,
353,
7442,
29889,
3298,
359,
29898,
29891,
29918,
1688,
29918,
3009,
29889,
12181,
29897,
13,
13,
1678,
363,
474,
29892,
29883,
297,
26985,
29898,
13203,
1125,
13,
4706,
7945,
29918,
513,
353,
1051,
29898,
9302,
29889,
3062,
29898,
29891,
29918,
14968,
29918,
3009,
1360,
29883,
9601,
29900,
2314,
13,
4706,
1243,
29918,
513,
353,
1051,
29898,
9302,
29889,
3062,
29898,
29891,
29918,
1688,
29918,
3009,
1360,
29883,
9601,
29900,
2314,
13,
4706,
343,
29918,
14968,
29961,
14968,
29918,
513,
29962,
353,
474,
13,
4706,
343,
29918,
1688,
29961,
1688,
29918,
513,
29962,
353,
474,
13,
13,
13,
1678,
1060,
29918,
14968,
353,
1060,
29918,
14968,
29889,
690,
14443,
29898,
29990,
29918,
14968,
29889,
12181,
29961,
29900,
1402,
29871,
29896,
29892,
10153,
29918,
5727,
29892,
10153,
29918,
22724,
29897,
13,
1678,
1060,
29918,
1688,
353,
1060,
29918,
1688,
29889,
690,
14443,
29898,
29990,
29918,
1688,
29889,
12181,
29961,
29900,
1402,
29871,
29896,
29892,
10153,
29918,
5727,
29892,
10153,
29918,
22724,
29897,
13,
1678,
1060,
29918,
14968,
353,
1060,
29918,
14968,
29889,
579,
668,
877,
7411,
29941,
29906,
1495,
13,
1678,
1060,
29918,
1688,
353,
1060,
29918,
1688,
29889,
579,
668,
877,
7411,
29941,
29906,
1495,
13,
1678,
1060,
29918,
14968,
847,
29922,
29871,
29906,
29945,
29945,
13,
1678,
1060,
29918,
1688,
847,
29922,
29871,
29906,
29945,
29945,
13,
13,
1678,
396,
3588,
770,
12047,
304,
7581,
770,
13516,
13,
1678,
612,
29918,
14968,
353,
7442,
29918,
13239,
29889,
517,
29918,
29883,
20440,
936,
29898,
29891,
29918,
14968,
29892,
3001,
29918,
13203,
29897,
13,
1678,
612,
29918,
1688,
353,
7442,
29918,
13239,
29889,
517,
29918,
29883,
20440,
936,
29898,
29891,
29918,
1688,
29892,
3001,
29918,
13203,
29897,
13,
268,
13,
1678,
736,
1060,
29918,
14968,
29892,
612,
29918,
14968,
29892,
1060,
29918,
1688,
29892,
612,
29918,
1688,
13,
13,
1753,
2048,
29918,
4299,
29898,
1025,
29918,
4299,
29922,
8516,
1125,
13,
1678,
1904,
353,
922,
339,
2556,
580,
13,
13,
1678,
565,
2030,
29918,
4299,
338,
6213,
29901,
13,
4706,
1904,
29889,
1202,
29898,
1168,
4068,
29906,
29928,
29898,
9877,
29918,
26705,
29892,
302,
29890,
29918,
20580,
29892,
302,
29890,
29918,
20580,
29892,
13,
462,
4706,
5139,
29918,
8513,
2433,
3084,
742,
13,
462,
4706,
1881,
29918,
12181,
7607,
29896,
29892,
10153,
29918,
5727,
29892,
10153,
29918,
22724,
4961,
13,
1678,
1683,
29901,
13,
4706,
18177,
353,
2030,
29918,
4299,
29889,
29277,
29961,
29900,
1822,
657,
29918,
705,
5861,
580,
13,
4706,
1904,
29889,
1202,
29898,
1168,
4068,
29906,
29928,
29898,
9877,
29918,
26705,
29892,
302,
29890,
29918,
20580,
29892,
302,
29890,
29918,
20580,
29892,
13,
462,
4706,
5139,
29918,
8513,
2433,
3084,
742,
705,
5861,
29922,
705,
5861,
29892,
13,
462,
4706,
1881,
29918,
12181,
7607,
29896,
29892,
10153,
29918,
5727,
29892,
10153,
29918,
22724,
4961,
13,
1678,
1904,
29889,
1202,
29898,
21786,
362,
877,
2674,
29884,
8785,
13,
1678,
565,
2030,
29918,
4299,
338,
6213,
29901,
13,
4706,
1904,
29889,
1202,
29898,
1168,
4068,
29906,
29928,
29898,
9877,
29918,
26705,
29892,
302,
29890,
29918,
20580,
29892,
302,
29890,
29918,
20580,
876,
13,
1678,
1683,
29901,
13,
4706,
18177,
353,
2030,
29918,
4299,
29889,
29277,
29961,
29906,
1822,
657,
29918,
705,
5861,
580,
13,
4706,
1904,
29889,
1202,
29898,
1168,
4068,
29906,
29928,
29898,
9877,
29918,
26705,
29892,
302,
29890,
29918,
20580,
29892,
302,
29890,
29918,
20580,
29892,
705,
5861,
29922,
705,
5861,
876,
13,
1678,
1904,
29889,
1202,
29898,
21786,
362,
877,
2674,
29884,
8785,
13,
1678,
1904,
29889,
1202,
29898,
7976,
11426,
292,
29906,
29928,
29898,
10109,
29918,
2311,
7607,
9877,
29918,
10109,
29892,
302,
29890,
29918,
10109,
4961,
13,
1678,
1904,
29889,
1202,
29898,
15063,
449,
29898,
29900,
29889,
29906,
29945,
876,
13,
13,
1678,
1904,
29889,
1202,
29898,
29943,
5066,
841,
3101,
13,
1678,
565,
2030,
29918,
4299,
338,
6213,
29901,
13,
4706,
1904,
29889,
1202,
29898,
29928,
1947,
29898,
29896,
29906,
29947,
876,
13,
1678,
1683,
29901,
13,
4706,
18177,
353,
2030,
29918,
4299,
29889,
29277,
29961,
29955,
1822,
657,
29918,
705,
5861,
580,
13,
4706,
1904,
29889,
1202,
29898,
29928,
1947,
29898,
29896,
29906,
29947,
29892,
705,
5861,
29922,
705,
5861,
876,
13,
1678,
1904,
29889,
1202,
29898,
21786,
362,
877,
2674,
29884,
8785,
13,
1678,
1904,
29889,
1202,
29898,
15063,
449,
29898,
29900,
29889,
29945,
876,
13,
268,
13,
1678,
736,
1904,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
16999,
2287,
29931,
29918,
29911,
4717,
1177,
3352,
353,
7700,
13,
1678,
396,
1881,
1967,
13391,
13,
1678,
10153,
29918,
5727,
29892,
10153,
29918,
22724,
353,
29871,
29906,
29947,
29892,
29871,
29906,
29947,
13,
13,
1678,
396,
278,
848,
29892,
528,
3096,
839,
322,
6219,
1546,
7945,
322,
1243,
6166,
13,
1678,
313,
29990,
29918,
14968,
29918,
497,
29892,
343,
29918,
14968,
29918,
497,
511,
313,
29990,
29918,
1688,
29918,
497,
29892,
343,
29918,
1688,
29918,
497,
29897,
353,
28597,
391,
29889,
1359,
29918,
1272,
580,
13,
13,
1678,
565,
451,
16999,
2287,
29931,
29918,
29911,
4717,
1177,
3352,
29901,
13,
4706,
9853,
29918,
2311,
353,
29871,
29906,
29945,
29953,
13,
4706,
3001,
29918,
13203,
353,
29871,
29896,
29900,
13,
4706,
302,
29890,
29918,
1022,
2878,
353,
29871,
29896,
29906,
13,
13,
4706,
396,
1353,
310,
26851,
284,
18094,
304,
671,
13,
4706,
302,
29890,
29918,
26705,
353,
29871,
29941,
29906,
13,
4706,
396,
2159,
310,
11565,
292,
4038,
363,
4236,
11565,
292,
13,
4706,
302,
29890,
29918,
10109,
353,
29871,
29906,
13,
4706,
396,
26851,
8466,
2159,
13,
4706,
302,
29890,
29918,
20580,
353,
29871,
29941,
13,
13,
4706,
4413,
353,
518,
29929,
29892,
29896,
29892,
29953,
29962,
13,
4706,
1060,
29918,
14968,
29892,
612,
29918,
14968,
29892,
1060,
29918,
1688,
29892,
612,
29918,
1688,
353,
2048,
29918,
1272,
29898,
13203,
29892,
29941,
29892,
13,
462,
462,
462,
418,
1060,
29918,
14968,
29918,
497,
29892,
29891,
29918,
14968,
29918,
497,
29892,
29990,
29918,
1688,
29918,
497,
29892,
29891,
29918,
1688,
29918,
497,
29897,
13,
13,
4706,
1904,
29896,
353,
2048,
29918,
4299,
580,
13,
4706,
1904,
29896,
29889,
1202,
29898,
29928,
1947,
29898,
2435,
29898,
13203,
4961,
13,
4706,
1904,
29896,
29889,
1202,
29898,
21786,
362,
877,
2695,
3317,
8785,
13,
4706,
1904,
29896,
29889,
12198,
29898,
6758,
2433,
29883,
20440,
936,
29918,
19128,
296,
14441,
742,
20640,
3950,
2433,
328,
328,
2554,
742,
2527,
10817,
29922,
1839,
562,
2764,
4135,
11287,
13,
13,
4706,
1904,
29896,
29889,
9202,
29898,
29990,
29918,
14968,
29892,
612,
29918,
14968,
29892,
9853,
29918,
2311,
29922,
16175,
29918,
2311,
29892,
302,
29890,
29918,
1022,
2878,
29922,
9877,
29918,
1022,
2878,
29892,
13,
462,
259,
26952,
29922,
29896,
29892,
8845,
29918,
1272,
7607,
29990,
29918,
1688,
29892,
612,
29918,
1688,
876,
13,
13,
4706,
396,
16913,
445,
1904,
363,
2678,
1006,
9102,
362,
13,
4706,
4390,
29918,
1807,
353,
1904,
29896,
29889,
517,
29918,
3126,
580,
29871,
13,
4706,
1722,
877,
4299,
29896,
29918,
25629,
284,
29918,
25428,
29889,
3126,
742,
525,
29893,
2824,
3539,
29898,
3126,
29918,
1807,
29897,
29871,
13,
4706,
1904,
29896,
29889,
7620,
29918,
705,
5861,
877,
4299,
29896,
29918,
25629,
284,
29918,
705,
5861,
29889,
29882,
29945,
1495,
29871,
13,
13,
4706,
8158,
353,
1904,
29896,
29889,
24219,
403,
29898,
29990,
29918,
1688,
29892,
612,
29918,
1688,
29892,
26952,
29922,
29900,
29897,
13,
4706,
1596,
877,
3057,
8158,
29901,
742,
8158,
29961,
29900,
2314,
13,
4706,
1596,
877,
3057,
13600,
29901,
742,
8158,
29961,
29896,
2314,
13,
13,
4706,
396,
2567,
1653,
263,
716,
1904,
411,
599,
3001,
29918,
13203,
297,
278,
4964,
3317,
7546,
29889,
29871,
14187,
975,
278,
18177,
304,
13,
4706,
396,
445,
716,
3564,
322,
11905,
278,
716,
770,
12368,
20459,
29889,
13,
4706,
1904,
29906,
353,
2048,
29918,
4299,
29898,
1025,
29918,
4299,
29922,
4299,
29896,
29897,
13,
4706,
1904,
29906,
29889,
1202,
29898,
29928,
1947,
29898,
7827,
29918,
13203,
876,
13,
13,
4706,
396,
22108,
278,
6590,
18177,
310,
278,
716,
3564,
411,
278,
9251,
16370,
770,
18177,
13,
4706,
18177,
353,
1904,
29906,
29889,
29277,
14352,
29896,
1822,
657,
29918,
705,
5861,
580,
13,
4706,
2030,
29918,
705,
5861,
353,
1904,
29896,
29889,
29277,
14352,
29906,
1822,
657,
29918,
705,
5861,
580,
396,
9208,
20619,
7546,
338,
1473,
304,
1833,
7546,
13,
4706,
18177,
29961,
29900,
3816,
29901,
6653,
2435,
29898,
13203,
1125,
29962,
353,
2030,
29918,
705,
5861,
29961,
29900,
29962,
13,
4706,
18177,
29961,
29896,
3816,
29899,
2435,
29898,
13203,
1125,
29962,
353,
2030,
29918,
705,
5861,
29961,
29896,
29962,
13,
4706,
1904,
29906,
29889,
29277,
14352,
29896,
1822,
842,
29918,
705,
5861,
29898,
705,
5861,
29897,
13,
4706,
1904,
29906,
29889,
1202,
29898,
21786,
362,
877,
2695,
3317,
8785,
13,
4706,
1904,
29906,
29889,
12198,
29898,
6758,
2433,
29883,
20440,
936,
29918,
19128,
296,
14441,
742,
20640,
3950,
2433,
328,
328,
2554,
742,
2527,
10817,
29922,
1839,
562,
2764,
4135,
11287,
13,
268,
13,
4706,
716,
29918,
13203,
353,
518,
29955,
29892,
29871,
29900,
29892,
29871,
29941,
29892,
29871,
29945,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29946,
29962,
13,
4706,
770,
29918,
20698,
353,
716,
29918,
13203,
7503,
29962,
13,
4706,
770,
29918,
20698,
29889,
21843,
29898,
13203,
29897,
13,
4706,
1060,
29918,
14968,
29892,
612,
29918,
14968,
29892,
1060,
29918,
1688,
29892,
612,
29918,
1688,
353,
2048,
29918,
1272,
29898,
1482,
29918,
13203,
29892,
29896,
29900,
29892,
13,
462,
462,
462,
418,
1060,
29918,
14968,
29918,
497,
29892,
29891,
29918,
14968,
29918,
497,
29892,
29990,
29918,
1688,
29918,
497,
29892,
29891,
29918,
1688,
29918,
497,
29897,
13,
268,
13,
4706,
1904,
29906,
29889,
9202,
29898,
29990,
29918,
14968,
29892,
612,
29918,
14968,
29892,
9853,
29918,
2311,
29922,
16175,
29918,
2311,
29892,
302,
29890,
29918,
1022,
2878,
29922,
9877,
29918,
1022,
2878,
29892,
13,
462,
259,
26952,
29922,
29896,
29892,
8845,
29918,
1272,
7607,
29990,
29918,
1688,
29892,
612,
29918,
1688,
876,
13,
4706,
8158,
353,
1904,
29906,
29889,
24219,
403,
29898,
29990,
29918,
1688,
29892,
612,
29918,
1688,
29892,
26952,
29922,
29900,
29897,
13,
4706,
1596,
877,
3057,
8158,
29901,
742,
8158,
29961,
29900,
2314,
13,
4706,
1596,
877,
3057,
13600,
29901,
742,
8158,
29961,
29896,
2314,
13,
268,
13,
4706,
396,
16913,
278,
11924,
635,
16370,
1904,
13,
4706,
4390,
29918,
1807,
353,
1904,
29906,
29889,
517,
29918,
3126,
580,
29871,
13,
4706,
1722,
877,
4299,
29906,
29918,
25629,
284,
29918,
25428,
29889,
3126,
742,
525,
29893,
2824,
3539,
29898,
3126,
29918,
1807,
29897,
29871,
13,
4706,
1904,
29906,
29889,
7620,
29918,
705,
5861,
877,
4299,
29906,
29918,
25629,
284,
29918,
705,
5861,
29889,
29882,
29945,
1495,
29871,
13,
13,
4706,
1060,
29918,
1688,
353,
1060,
29918,
1688,
29918,
497,
29889,
690,
14443,
29898,
29990,
29918,
1688,
29918,
497,
29889,
12181,
29961,
29900,
1402,
29871,
29896,
29892,
10153,
29918,
5727,
29892,
10153,
29918,
22724,
29897,
13,
4706,
1060,
29918,
1688,
353,
1060,
29918,
1688,
29889,
579,
668,
877,
7411,
29941,
29906,
1495,
13,
4706,
1060,
29918,
1688,
847,
29922,
29871,
29906,
29945,
29945,
13,
13,
4706,
396,
14806,
770,
12047,
304,
7581,
770,
13516,
13,
4706,
396,
3940,
29892,
393,
746,
263,
716,
1967,
338,
9132,
304,
445,
3564,
29892,
278,
3858,
310,
278,
1967,
1818,
367,
29871,
13,
4706,
396,
21242,
964,
770,
29918,
20698,
304,
679,
278,
376,
6370,
29908,
3858,
310,
278,
1962,
13,
4706,
343,
29918,
1688,
353,
7442,
29889,
2378,
4197,
1990,
29918,
20698,
29889,
2248,
29898,
29883,
29897,
363,
274,
297,
343,
29918,
1688,
29918,
497,
2314,
13,
4706,
612,
29918,
1688,
353,
7442,
29918,
13239,
29889,
517,
29918,
29883,
20440,
936,
29898,
29891,
29918,
1688,
29892,
3001,
29918,
13203,
29897,
13,
13,
4706,
8158,
353,
1904,
29906,
29889,
24219,
403,
29898,
29990,
29918,
1688,
29892,
612,
29918,
1688,
29892,
26952,
29922,
29896,
29897,
13,
4706,
1596,
877,
11536,
4321,
8158,
29901,
742,
8158,
29961,
29900,
2314,
13,
4706,
1596,
877,
11536,
4321,
13600,
29901,
742,
8158,
29961,
29896,
2314,
13,
13,
1678,
1683,
29901,
268,
13,
4706,
396,
16012,
278,
11924,
635,
16370,
1904,
322,
1243,
372,
29871,
13,
4706,
1904,
353,
1904,
29918,
3166,
29918,
3126,
29898,
3150,
877,
4299,
29906,
29918,
25629,
284,
29918,
25428,
29889,
3126,
2824,
949,
3101,
29871,
13,
4706,
1904,
29889,
1359,
29918,
705,
5861,
877,
4299,
29906,
29918,
25629,
284,
29918,
705,
5861,
29889,
29882,
29945,
1495,
13,
4706,
1904,
29889,
12198,
29898,
6758,
2433,
29883,
20440,
936,
29918,
19128,
296,
14441,
742,
20640,
3950,
2433,
328,
328,
2554,
742,
2527,
10817,
29922,
1839,
562,
2764,
4135,
11287,
13,
13,
4706,
4413,
353,
518,
29955,
29892,
29871,
29900,
29892,
29871,
29941,
29892,
29871,
29945,
29892,
29871,
29906,
29892,
29871,
29947,
29892,
29871,
29946,
29892,
29871,
29929,
29892,
29871,
29896,
29892,
29871,
29953,
29962,
13,
4706,
1060,
29918,
14968,
29892,
612,
29918,
14968,
29892,
1060,
29918,
1688,
29892,
612,
29918,
1688,
353,
2048,
29918,
1272,
29898,
13203,
29892,
29896,
29900,
29892,
13,
462,
462,
462,
418,
1060,
29918,
14968,
29918,
497,
29892,
29891,
29918,
14968,
29918,
497,
29892,
29990,
29918,
1688,
29918,
497,
29892,
29891,
29918,
1688,
29918,
497,
29897,
13,
13,
4706,
8158,
353,
1904,
29889,
24219,
403,
29898,
29990,
29918,
1688,
29892,
612,
29918,
1688,
29892,
26952,
29922,
29896,
29897,
13,
4706,
1596,
877,
11536,
4321,
8158,
29901,
742,
8158,
29961,
29900,
2314,
13,
4706,
1596,
877,
11536,
4321,
13600,
29901,
742,
8158,
29961,
29896,
2314,
13,
13,
4706,
8158,
353,
1904,
29889,
24219,
403,
29898,
29990,
29918,
14968,
29892,
612,
29918,
14968,
29892,
26952,
29922,
29896,
29897,
13,
4706,
1596,
877,
11536,
28186,
8158,
29901,
742,
8158,
29961,
29900,
2314,
13,
4706,
1596,
877,
11536,
28186,
13600,
29901,
742,
8158,
29961,
29896,
2314,
13,
2
] |
mnist_pytorch/previewer.py | DewanshuHaswani/fastai | 0 | 79660 | import torch
import matplotlib.pyplot as plt
from torchvision import datasets, transforms
from random import choice
BATCH_SIZE=64
# Load the mnist dataset
train_loader = torch.utils.data.DataLoader(
datasets.MNIST(
"./data",
train=True,
download=True,
transform=transforms.Compose([
transforms.ToTensor(),
# transforms.Normalize((0.1307,), (0.3081,))
])),
batch_size=BATCH_SIZE
)
train_data = train_loader.dataset.train_data
char = choice(train_data)
print(char)
plt.imshow(char.numpy())
plt.show()
| [
1,
1053,
4842,
305,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
3166,
4842,
305,
4924,
1053,
20035,
29892,
4327,
29879,
13,
3166,
4036,
1053,
7348,
13,
13,
29933,
14789,
29918,
14226,
29922,
29953,
29946,
13,
13,
29937,
16012,
278,
28597,
391,
8783,
13,
14968,
29918,
12657,
353,
4842,
305,
29889,
13239,
29889,
1272,
29889,
1469,
10036,
29898,
13,
4706,
20035,
29889,
29924,
29940,
9047,
29898,
13,
9651,
376,
6904,
1272,
613,
29871,
13,
9651,
7945,
29922,
5574,
29892,
13,
9651,
5142,
29922,
5574,
29892,
13,
9651,
4327,
29922,
9067,
29879,
29889,
1523,
4220,
4197,
13,
18884,
4327,
29879,
29889,
1762,
29911,
6073,
3285,
13,
18884,
396,
4327,
29879,
29889,
19077,
675,
3552,
29900,
29889,
29896,
29941,
29900,
29955,
29892,
511,
313,
29900,
29889,
29941,
29900,
29947,
29896,
29892,
876,
13,
308,
2314,
511,
13,
4706,
9853,
29918,
2311,
29922,
29933,
14789,
29918,
14226,
13,
1678,
1723,
13,
13,
14968,
29918,
1272,
353,
7945,
29918,
12657,
29889,
24713,
29889,
14968,
29918,
1272,
13,
13,
3090,
353,
7348,
29898,
14968,
29918,
1272,
29897,
13,
13,
2158,
29898,
3090,
29897,
13,
13,
572,
29873,
29889,
326,
4294,
29898,
3090,
29889,
23749,
3101,
13,
572,
29873,
29889,
4294,
580,
13,
13,
2
] |
src/pipeline/pipeline.py | GuiYuDaniel/CGC_of_Sn | 0 | 167493 | # -*- coding:utf8 -*-
"""
pipeline负责构建(不是执行)整体计算图:
(当前支持串行拓扑序调度)
1,构建顶层拓扑序(既检查了DAG性,又是串行执行顺序)
2,创建pipenodes
本工作目前只考虑单线程串行,所以这是个简略版pipeline,
暂不支持:微服务,并行异步计算
"""
import copy
from db.typing import PipeLineInfo
from pipeline.pipenode import PipeNode
from utils.config import Config
from utils.log import get_logger
from utils.utils import new_id
from utils.topo import (calc_dag, calc_topo_order)
logger = get_logger(__name__)
class PipeLine(object):
"""
负责检查并构建计算图,分配对应的pipe node
pipeline在新建后,是不随任务改变的
"""
def __init__(self, workflow_conf=None, ppl_id=None, ppl_name=None):
if workflow_conf is None:
# a blank ppl waiting for load
self.ppl_id = ppl_id if ppl_id and isinstance(ppl_id, str) else None
self.ppl_name = ppl_name if ppl_name and isinstance(ppl_name, str) else None
self.config = None
self.dag_dict = None # 计算图的有向无环图表达
self.topo_order_list = None # 序列化的计算顺序
self.node_id_dict = None # {name: ppd_id}
self.flags = None
else:
# new a real ppl
self.ppl_id = ppl_id if ppl_id and isinstance(ppl_id, str) else new_id()
self.ppl_name = ppl_name if ppl_name and isinstance(ppl_name, str) else self.ppl_id
self.config = Config()
self.dag_dict = calc_dag(workflow_conf)
self.topo_order_list = calc_topo_order(self.dag_dict)
self.node_id_dict = self._create_node_dict(workflow_conf)
self.flags = None
self.save_to_db()
def _from_dict(self, ppl_dict):
if not isinstance(ppl_dict, dict):
err_msg = "_from_dict need input dict but {} with {}".format(type(ppl_dict), ppl_dict)
logger.error(err_msg)
raise Exception(err_msg)
map_dict = {
"pipeline_id": "ppl_id",
"pipeline_name": "ppl_name",
"dag_dict": "dag_dict",
"topo_order_list": "topo_order_list",
"config": "config",
"node_id_dict": "node_id_dict",
"flags": "flags"
}
self_keys = self.__dict__.keys()
for map_key in map_dict:
# if ppl_dict.get(map_key) and map_dict.get(map_key) in self_keys:
if map_key in ppl_dict and map_dict.get(map_key) in self_keys:
self.__dict__[map_dict.get(map_key)] = ppl_dict.get(map_key)
def load_by_id(self, ppl_id):
"""成功则返回通过id装载起的类实例,失败则返回空实例"""
if not isinstance(ppl_id, str):
err_msg = "the ppl_id={} must be str, will return blank class".format(ppl_id)
logger.error(err_msg)
# 返回未经改动的实例
return self
flag, ppl_dict = PipeLineInfo().query_by_id(ppl_id)
if not flag:
err_msg = "query pipeline by ppl_id={} meet error with {}, will return blank class".format(
ppl_id, ppl_dict) # 此时ppl_dict是msg
logger.error(err_msg)
return self
if ppl_dict is False:
err_msg = "no pipeline in db by ppl_id={}, will return blank class".format(ppl_id)
logger.warning(err_msg)
return self
self._from_dict(ppl_dict)
return self
def _to_dict(self):
ppl_dict = {
"pipeline_id": self.ppl_id,
"pipeline_name": self.ppl_name,
"dag_dict": self.dag_dict,
"topo_order_list": self.topo_order_list,
"config": self.config,
"node_id_dict": self.node_id_dict,
"flags": self.flags
}
return ppl_dict
def save_to_db(self): # 不需要写try,因为db交互层已经写好了保护和log,只需要返回结果即可
ppl_dict = self._to_dict()
flag, msg = PipeLineInfo().insert(ppl_dict)
if not flag:
err_msg = "save ppl_dict={} to db meet error".format(ppl_dict)
logger.error(err_msg)
return flag, msg
def _create_node_dict(self, workflow_conf):
"""
这个函数一是补完node信息,并存入db;
另一个是返回{node_name: node_id}的字典存在于pipeline中作为索引
"""
# 补完prep_nodes添加进workflow_conf
padding_workflow_conf = copy.deepcopy(workflow_conf)
for single_node_id_dict in padding_workflow_conf:
node_name = single_node_id_dict.get("name")
single_node_id_dict["prep_nodes"] = self.dag_dict.get(node_name).get("prep_nodes")
# check
node_name_list = self.topo_order_list
if len(node_name_list) != len(padding_workflow_conf):
err_msg = "node_name_list={} and padding_workflow_conf={} must have same len".format(
node_name_list, padding_workflow_conf)
logger.error(err_msg)
raise Exception(err_msg)
node_id_dict = {}
# create nodes
for single_dict in padding_workflow_conf: # 结果的字典也是无序化的,依workflow字典初始化node没问题
if single_dict.get("name") not in node_name_list:
err_msg = "node_name={} not in topo_order_list={}, conf_dict={}".format(
single_dict.get("name"), node_name_list, single_dict)
logger.error(err_msg)
raise Exception(err_msg)
try:
ppn = PipeNode(conf=single_dict)
node_id_dict[single_dict.get("name")] = ppn.ppn_id
except Exception as e:
err_msg = "create pipenode with conf={} meet error".format(single_dict)
logger.error(err_msg)
raise Exception(e)
if len(node_name_list) != len(node_id_dict):
err_msg = "node_name_list={} and node_id_dict={} must have same len".format(node_name_list, node_id_dict)
logger.error(err_msg)
logger.debug("workflow_conf={}".format(workflow_conf))
raise Exception(err_msg)
return node_id_dict
| [
1,
396,
448,
29930,
29899,
14137,
29901,
9420,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
13096,
5570,
235,
183,
162,
235,
183,
166,
31901,
30886,
30419,
30413,
30392,
233,
140,
170,
30448,
30409,
233,
152,
183,
30988,
31466,
31565,
30861,
30383,
13,
30419,
30948,
30658,
31541,
31695,
31767,
30448,
233,
142,
150,
233,
140,
148,
31463,
31268,
30898,
30409,
13,
13,
29896,
30214,
31901,
30886,
236,
164,
185,
232,
180,
133,
233,
142,
150,
233,
140,
148,
31463,
30419,
233,
154,
165,
233,
166,
131,
31213,
30743,
7698,
29954,
30952,
30214,
232,
146,
139,
30392,
31767,
30448,
233,
140,
170,
30448,
236,
164,
189,
31463,
30409,
13,
13,
29906,
30214,
31441,
30886,
13096,
264,
2631,
13,
13,
13,
30346,
31041,
30732,
30895,
30658,
31557,
235,
131,
134,
235,
156,
148,
31166,
31532,
31101,
31767,
30448,
30214,
30744,
30651,
30810,
30392,
30502,
234,
177,
131,
234,
152,
168,
30845,
13096,
5570,
30214,
13,
233,
157,
133,
30413,
31541,
31695,
30383,
31935,
31520,
31358,
30214,
31666,
30448,
232,
191,
133,
233,
176,
168,
31466,
31565,
13,
15945,
29908,
13,
13,
5215,
3509,
13,
3166,
4833,
29889,
1017,
15702,
1053,
7362,
412,
3542,
3401,
13,
3166,
16439,
29889,
13096,
264,
356,
1053,
7362,
412,
4247,
13,
3166,
3667,
29879,
29889,
2917,
1053,
12782,
13,
3166,
3667,
29879,
29889,
1188,
1053,
679,
29918,
21707,
13,
3166,
3667,
29879,
29889,
13239,
1053,
716,
29918,
333,
13,
3166,
3667,
29879,
29889,
3332,
29877,
1053,
313,
28667,
29918,
24157,
29892,
22235,
29918,
3332,
29877,
29918,
2098,
29897,
13,
13,
13,
21707,
353,
679,
29918,
21707,
22168,
978,
1649,
29897,
13,
13,
13,
1990,
7362,
412,
3542,
29898,
3318,
1125,
13,
1678,
9995,
13,
268,
235,
183,
162,
235,
183,
166,
233,
166,
131,
31213,
31666,
31901,
30886,
31466,
31565,
30861,
30214,
30748,
31361,
30783,
31370,
30210,
17760,
2943,
13,
1678,
16439,
30505,
30374,
30886,
30822,
30214,
30392,
30413,
236,
157,
146,
31450,
31358,
31264,
31462,
30210,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
27321,
29918,
5527,
29922,
8516,
29892,
282,
572,
29918,
333,
29922,
8516,
29892,
282,
572,
29918,
978,
29922,
8516,
1125,
13,
4706,
565,
27321,
29918,
5527,
338,
6213,
29901,
13,
9651,
396,
263,
9654,
282,
572,
10534,
363,
2254,
13,
9651,
1583,
29889,
407,
29880,
29918,
333,
353,
282,
572,
29918,
333,
565,
282,
572,
29918,
333,
322,
338,
8758,
29898,
407,
29880,
29918,
333,
29892,
851,
29897,
1683,
6213,
13,
9651,
1583,
29889,
407,
29880,
29918,
978,
353,
282,
572,
29918,
978,
565,
282,
572,
29918,
978,
322,
338,
8758,
29898,
407,
29880,
29918,
978,
29892,
851,
29897,
1683,
6213,
13,
9651,
1583,
29889,
2917,
353,
6213,
13,
9651,
1583,
29889,
24157,
29918,
8977,
353,
6213,
29871,
396,
29871,
31466,
31565,
30861,
30210,
30417,
31331,
31352,
234,
145,
178,
30861,
30746,
31798,
13,
9651,
1583,
29889,
3332,
29877,
29918,
2098,
29918,
1761,
353,
6213,
29871,
396,
29871,
31463,
31025,
30705,
30210,
31466,
31565,
236,
164,
189,
31463,
13,
9651,
1583,
29889,
3177,
29918,
333,
29918,
8977,
353,
6213,
29871,
396,
426,
978,
29901,
6499,
29881,
29918,
333,
29913,
13,
9651,
1583,
29889,
15764,
353,
6213,
13,
4706,
1683,
29901,
13,
9651,
396,
716,
263,
1855,
282,
572,
13,
9651,
1583,
29889,
407,
29880,
29918,
333,
353,
282,
572,
29918,
333,
565,
282,
572,
29918,
333,
322,
338,
8758,
29898,
407,
29880,
29918,
333,
29892,
851,
29897,
1683,
716,
29918,
333,
580,
13,
9651,
1583,
29889,
407,
29880,
29918,
978,
353,
282,
572,
29918,
978,
565,
282,
572,
29918,
978,
322,
338,
8758,
29898,
407,
29880,
29918,
978,
29892,
851,
29897,
1683,
1583,
29889,
407,
29880,
29918,
333,
13,
9651,
1583,
29889,
2917,
353,
12782,
580,
13,
9651,
1583,
29889,
24157,
29918,
8977,
353,
22235,
29918,
24157,
29898,
1287,
1731,
29918,
5527,
29897,
13,
9651,
1583,
29889,
3332,
29877,
29918,
2098,
29918,
1761,
353,
22235,
29918,
3332,
29877,
29918,
2098,
29898,
1311,
29889,
24157,
29918,
8977,
29897,
13,
9651,
1583,
29889,
3177,
29918,
333,
29918,
8977,
353,
1583,
3032,
3258,
29918,
3177,
29918,
8977,
29898,
1287,
1731,
29918,
5527,
29897,
13,
9651,
1583,
29889,
15764,
353,
6213,
13,
9651,
1583,
29889,
7620,
29918,
517,
29918,
2585,
580,
13,
13,
1678,
822,
903,
3166,
29918,
8977,
29898,
1311,
29892,
282,
572,
29918,
8977,
1125,
13,
4706,
565,
451,
338,
8758,
29898,
407,
29880,
29918,
8977,
29892,
9657,
1125,
13,
9651,
4589,
29918,
7645,
353,
11119,
3166,
29918,
8977,
817,
1881,
9657,
541,
6571,
411,
6571,
1642,
4830,
29898,
1853,
29898,
407,
29880,
29918,
8977,
511,
282,
572,
29918,
8977,
29897,
13,
9651,
17927,
29889,
2704,
29898,
3127,
29918,
7645,
29897,
13,
9651,
12020,
8960,
29898,
3127,
29918,
7645,
29897,
13,
4706,
2910,
29918,
8977,
353,
426,
13,
9651,
376,
13096,
5570,
29918,
333,
1115,
376,
407,
29880,
29918,
333,
613,
13,
9651,
376,
13096,
5570,
29918,
978,
1115,
376,
407,
29880,
29918,
978,
613,
13,
9651,
376,
24157,
29918,
8977,
1115,
376,
24157,
29918,
8977,
613,
13,
9651,
376,
3332,
29877,
29918,
2098,
29918,
1761,
1115,
376,
3332,
29877,
29918,
2098,
29918,
1761,
613,
13,
9651,
376,
2917,
1115,
376,
2917,
613,
13,
9651,
376,
3177,
29918,
333,
29918,
8977,
1115,
376,
3177,
29918,
333,
29918,
8977,
613,
13,
9651,
376,
15764,
1115,
376,
15764,
29908,
13,
4706,
500,
13,
4706,
1583,
29918,
8149,
353,
1583,
17255,
8977,
26914,
8149,
580,
13,
4706,
363,
2910,
29918,
1989,
297,
2910,
29918,
8977,
29901,
13,
9651,
396,
565,
282,
572,
29918,
8977,
29889,
657,
29898,
1958,
29918,
1989,
29897,
322,
2910,
29918,
8977,
29889,
657,
29898,
1958,
29918,
1989,
29897,
297,
1583,
29918,
8149,
29901,
13,
9651,
565,
2910,
29918,
1989,
297,
282,
572,
29918,
8977,
322,
2910,
29918,
8977,
29889,
657,
29898,
1958,
29918,
1989,
29897,
297,
1583,
29918,
8149,
29901,
13,
18884,
1583,
17255,
8977,
1649,
29961,
1958,
29918,
8977,
29889,
657,
29898,
1958,
29918,
1989,
4638,
353,
282,
572,
29918,
8977,
29889,
657,
29898,
1958,
29918,
1989,
29897,
13,
13,
1678,
822,
2254,
29918,
1609,
29918,
333,
29898,
1311,
29892,
282,
572,
29918,
333,
1125,
13,
4706,
9995,
30494,
31134,
31403,
31086,
30742,
30768,
31138,
333,
31905,
31526,
31558,
30210,
30832,
31195,
31507,
30214,
31369,
31955,
31403,
31086,
30742,
30816,
31195,
31507,
15945,
29908,
13,
4706,
565,
451,
338,
8758,
29898,
407,
29880,
29918,
333,
29892,
851,
1125,
13,
9651,
4589,
29918,
7645,
353,
376,
1552,
282,
572,
29918,
333,
3790,
29913,
1818,
367,
851,
29892,
674,
736,
9654,
770,
1642,
4830,
29898,
407,
29880,
29918,
333,
29897,
13,
9651,
17927,
29889,
2704,
29898,
3127,
29918,
7645,
29897,
13,
9651,
396,
29871,
31086,
30742,
31295,
31412,
31264,
30846,
30210,
31195,
31507,
13,
9651,
736,
1583,
13,
4706,
7353,
29892,
282,
572,
29918,
8977,
353,
7362,
412,
3542,
3401,
2141,
1972,
29918,
1609,
29918,
333,
29898,
407,
29880,
29918,
333,
29897,
13,
4706,
565,
451,
7353,
29901,
13,
9651,
4589,
29918,
7645,
353,
376,
1972,
16439,
491,
282,
572,
29918,
333,
3790,
29913,
5870,
1059,
411,
24335,
674,
736,
9654,
770,
1642,
4830,
29898,
13,
18884,
282,
572,
29918,
333,
29892,
282,
572,
29918,
8977,
29897,
29871,
396,
29871,
31389,
30594,
407,
29880,
29918,
8977,
30392,
7645,
13,
9651,
17927,
29889,
2704,
29898,
3127,
29918,
7645,
29897,
13,
9651,
736,
1583,
13,
4706,
565,
282,
572,
29918,
8977,
338,
7700,
29901,
13,
9651,
4589,
29918,
7645,
353,
376,
1217,
16439,
297,
4833,
491,
282,
572,
29918,
333,
3790,
1118,
674,
736,
9654,
770,
1642,
4830,
29898,
407,
29880,
29918,
333,
29897,
13,
9651,
17927,
29889,
27392,
29898,
3127,
29918,
7645,
29897,
13,
9651,
736,
1583,
13,
4706,
1583,
3032,
3166,
29918,
8977,
29898,
407,
29880,
29918,
8977,
29897,
13,
4706,
736,
1583,
13,
13,
1678,
822,
903,
517,
29918,
8977,
29898,
1311,
1125,
13,
4706,
282,
572,
29918,
8977,
353,
426,
13,
9651,
376,
13096,
5570,
29918,
333,
1115,
1583,
29889,
407,
29880,
29918,
333,
29892,
13,
9651,
376,
13096,
5570,
29918,
978,
1115,
1583,
29889,
407,
29880,
29918,
978,
29892,
13,
9651,
376,
24157,
29918,
8977,
1115,
1583,
29889,
24157,
29918,
8977,
29892,
13,
9651,
376,
3332,
29877,
29918,
2098,
29918,
1761,
1115,
1583,
29889,
3332,
29877,
29918,
2098,
29918,
1761,
29892,
13,
9651,
376,
2917,
1115,
1583,
29889,
2917,
29892,
13,
9651,
376,
3177,
29918,
333,
29918,
8977,
1115,
1583,
29889,
3177,
29918,
333,
29918,
8977,
29892,
13,
9651,
376,
15764,
1115,
1583,
29889,
15764,
13,
4706,
500,
13,
4706,
736,
282,
572,
29918,
8977,
13,
13,
1678,
822,
4078,
29918,
517,
29918,
2585,
29898,
1311,
1125,
29871,
396,
29871,
30413,
31383,
30698,
31479,
2202,
30214,
31570,
30573,
2585,
31398,
231,
189,
149,
232,
180,
133,
31290,
31412,
31479,
31076,
30743,
30982,
233,
141,
167,
30503,
1188,
30214,
31557,
31383,
30698,
31086,
30742,
31320,
30801,
232,
144,
182,
30682,
13,
4706,
282,
572,
29918,
8977,
353,
1583,
3032,
517,
29918,
8977,
580,
13,
4706,
7353,
29892,
10191,
353,
7362,
412,
3542,
3401,
2141,
7851,
29898,
407,
29880,
29918,
8977,
29897,
13,
4706,
565,
451,
7353,
29901,
13,
9651,
4589,
29918,
7645,
353,
376,
7620,
282,
572,
29918,
8977,
3790,
29913,
304,
4833,
5870,
1059,
1642,
4830,
29898,
407,
29880,
29918,
8977,
29897,
13,
9651,
17927,
29889,
2704,
29898,
3127,
29918,
7645,
29897,
13,
4706,
736,
7353,
29892,
10191,
13,
13,
1678,
822,
903,
3258,
29918,
3177,
29918,
8977,
29898,
1311,
29892,
27321,
29918,
5527,
1125,
13,
4706,
9995,
13,
308,
30810,
30502,
31629,
30354,
30287,
30392,
235,
164,
168,
31366,
3177,
30689,
31021,
30214,
31666,
30946,
30752,
2585,
31608,
13,
308,
232,
146,
169,
30287,
30502,
30392,
31086,
30742,
29912,
3177,
29918,
978,
29901,
2943,
29918,
333,
29913,
30210,
30578,
31259,
30946,
30505,
30909,
13096,
5570,
30275,
30732,
30573,
31836,
31674,
13,
4706,
9995,
13,
4706,
396,
29871,
235,
164,
168,
31366,
15287,
29918,
18010,
31538,
30666,
31174,
1287,
1731,
29918,
5527,
13,
4706,
7164,
29918,
1287,
1731,
29918,
5527,
353,
3509,
29889,
24535,
8552,
29898,
1287,
1731,
29918,
5527,
29897,
13,
4706,
363,
2323,
29918,
3177,
29918,
333,
29918,
8977,
297,
7164,
29918,
1287,
1731,
29918,
5527,
29901,
13,
9651,
2943,
29918,
978,
353,
2323,
29918,
3177,
29918,
333,
29918,
8977,
29889,
657,
703,
978,
1159,
13,
9651,
2323,
29918,
3177,
29918,
333,
29918,
8977,
3366,
15287,
29918,
18010,
3108,
353,
1583,
29889,
24157,
29918,
8977,
29889,
657,
29898,
3177,
29918,
978,
467,
657,
703,
15287,
29918,
18010,
1159,
13,
4706,
396,
1423,
13,
4706,
2943,
29918,
978,
29918,
1761,
353,
1583,
29889,
3332,
29877,
29918,
2098,
29918,
1761,
13,
4706,
565,
7431,
29898,
3177,
29918,
978,
29918,
1761,
29897,
2804,
7431,
29898,
12791,
29918,
1287,
1731,
29918,
5527,
1125,
13,
9651,
4589,
29918,
7645,
353,
376,
3177,
29918,
978,
29918,
1761,
3790,
29913,
322,
7164,
29918,
1287,
1731,
29918,
5527,
3790,
29913,
1818,
505,
1021,
7431,
1642,
4830,
29898,
13,
18884,
2943,
29918,
978,
29918,
1761,
29892,
7164,
29918,
1287,
1731,
29918,
5527,
29897,
13,
9651,
17927,
29889,
2704,
29898,
3127,
29918,
7645,
29897,
13,
9651,
12020,
8960,
29898,
3127,
29918,
7645,
29897,
13,
4706,
2943,
29918,
333,
29918,
8977,
353,
6571,
13,
4706,
396,
1653,
7573,
13,
4706,
363,
2323,
29918,
8977,
297,
7164,
29918,
1287,
1731,
29918,
5527,
29901,
29871,
396,
29871,
31320,
30801,
30210,
30578,
31259,
30953,
30392,
31352,
31463,
30705,
30210,
30214,
231,
193,
160,
1287,
1731,
30578,
31259,
31120,
31020,
30705,
3177,
31423,
31658,
31596,
13,
9651,
565,
2323,
29918,
8977,
29889,
657,
703,
978,
1159,
451,
297,
2943,
29918,
978,
29918,
1761,
29901,
13,
18884,
4589,
29918,
7645,
353,
376,
3177,
29918,
978,
3790,
29913,
451,
297,
304,
1129,
29918,
2098,
29918,
1761,
3790,
1118,
1970,
29918,
8977,
3790,
29913,
1642,
4830,
29898,
13,
462,
1678,
2323,
29918,
8977,
29889,
657,
703,
978,
4968,
2943,
29918,
978,
29918,
1761,
29892,
2323,
29918,
8977,
29897,
13,
18884,
17927,
29889,
2704,
29898,
3127,
29918,
7645,
29897,
13,
18884,
12020,
8960,
29898,
3127,
29918,
7645,
29897,
13,
9651,
1018,
29901,
13,
18884,
6499,
29876,
353,
7362,
412,
4247,
29898,
5527,
29922,
14369,
29918,
8977,
29897,
13,
18884,
2943,
29918,
333,
29918,
8977,
29961,
14369,
29918,
8977,
29889,
657,
703,
978,
13531,
353,
6499,
29876,
29889,
407,
29876,
29918,
333,
13,
9651,
5174,
8960,
408,
321,
29901,
13,
18884,
4589,
29918,
7645,
353,
376,
3258,
8450,
264,
356,
411,
1970,
3790,
29913,
5870,
1059,
1642,
4830,
29898,
14369,
29918,
8977,
29897,
13,
18884,
17927,
29889,
2704,
29898,
3127,
29918,
7645,
29897,
13,
18884,
12020,
8960,
29898,
29872,
29897,
13,
4706,
565,
7431,
29898,
3177,
29918,
978,
29918,
1761,
29897,
2804,
7431,
29898,
3177,
29918,
333,
29918,
8977,
1125,
13,
9651,
4589,
29918,
7645,
353,
376,
3177,
29918,
978,
29918,
1761,
3790,
29913,
322,
2943,
29918,
333,
29918,
8977,
3790,
29913,
1818,
505,
1021,
7431,
1642,
4830,
29898,
3177,
29918,
978,
29918,
1761,
29892,
2943,
29918,
333,
29918,
8977,
29897,
13,
9651,
17927,
29889,
2704,
29898,
3127,
29918,
7645,
29897,
13,
9651,
17927,
29889,
8382,
703,
1287,
1731,
29918,
5527,
3790,
29913,
1642,
4830,
29898,
1287,
1731,
29918,
5527,
876,
13,
9651,
12020,
8960,
29898,
3127,
29918,
7645,
29897,
13,
4706,
736,
2943,
29918,
333,
29918,
8977,
13,
2
] |
oscar/apps/dashboard/nav.py | endgame/django-oscar | 0 | 159483 | <gh_stars>0
from django.core.urlresolvers import reverse
_nodes = []
class Node(object):
def __init__(self, label, url_name=None, url_args=None, url_kwargs=None, access_fn=None):
self.label = label
self.url_name = url_name
self.url_args = url_args
self.url_kwargs = url_kwargs
self.access_fn = access_fn
self.children = []
@property
def is_heading(self):
return self.url_name is None
@property
def url(self):
return reverse(self.url_name, args=self.url_args, kwargs=self.url_kwargs)
def add_child(self, node):
self.children.append(node)
def is_visible(self, user):
if not self.access_fn:
return True
return self.access_fn(user)
def filter(self, user):
if not self.is_visible(user):
return None
node = Node(self.label, self.url_name, self.access_fn)
for child in self.children:
if child.is_visible(node):
node.add_child(child)
return node
def has_children(self):
return len(self.children) > 0
def register(node, display_order=5):
# We use tuples so we can sort later on. The lower the display order, the
# closer to the left the node appears.
_nodes.append((display_order, node))
def flush():
_nodes = []
def get_nodes(user):
nodes = []
for _, node in sorted(_nodes):
filtered_node = node.filter(user)
if filtered_node:
nodes.append(node)
return nodes
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
9557,
29889,
3221,
29889,
2271,
9778,
874,
1053,
11837,
13,
13,
29918,
18010,
353,
5159,
13,
13,
13,
1990,
9071,
29898,
3318,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3858,
29892,
3142,
29918,
978,
29922,
8516,
29892,
3142,
29918,
5085,
29922,
8516,
29892,
3142,
29918,
19290,
29922,
8516,
29892,
2130,
29918,
9144,
29922,
8516,
1125,
13,
4706,
1583,
29889,
1643,
353,
3858,
13,
4706,
1583,
29889,
2271,
29918,
978,
353,
3142,
29918,
978,
13,
4706,
1583,
29889,
2271,
29918,
5085,
353,
3142,
29918,
5085,
13,
4706,
1583,
29889,
2271,
29918,
19290,
353,
3142,
29918,
19290,
13,
4706,
1583,
29889,
5943,
29918,
9144,
353,
2130,
29918,
9144,
13,
4706,
1583,
29889,
11991,
353,
5159,
13,
13,
1678,
732,
6799,
13,
1678,
822,
338,
29918,
2813,
292,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
2271,
29918,
978,
338,
6213,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3142,
29898,
1311,
1125,
13,
4706,
736,
11837,
29898,
1311,
29889,
2271,
29918,
978,
29892,
6389,
29922,
1311,
29889,
2271,
29918,
5085,
29892,
9049,
5085,
29922,
1311,
29889,
2271,
29918,
19290,
29897,
13,
13,
1678,
822,
788,
29918,
5145,
29898,
1311,
29892,
2943,
1125,
13,
4706,
1583,
29889,
11991,
29889,
4397,
29898,
3177,
29897,
13,
13,
1678,
822,
338,
29918,
12872,
29898,
1311,
29892,
1404,
1125,
13,
4706,
565,
451,
1583,
29889,
5943,
29918,
9144,
29901,
13,
9651,
736,
5852,
13,
4706,
736,
1583,
29889,
5943,
29918,
9144,
29898,
1792,
29897,
13,
13,
1678,
822,
4175,
29898,
1311,
29892,
1404,
1125,
13,
4706,
565,
451,
1583,
29889,
275,
29918,
12872,
29898,
1792,
1125,
13,
9651,
736,
6213,
13,
4706,
2943,
353,
9071,
29898,
1311,
29889,
1643,
29892,
1583,
29889,
2271,
29918,
978,
29892,
1583,
29889,
5943,
29918,
9144,
29897,
13,
4706,
363,
2278,
297,
1583,
29889,
11991,
29901,
13,
9651,
565,
2278,
29889,
275,
29918,
12872,
29898,
3177,
1125,
13,
18884,
2943,
29889,
1202,
29918,
5145,
29898,
5145,
29897,
13,
4706,
736,
2943,
13,
13,
1678,
822,
756,
29918,
11991,
29898,
1311,
1125,
13,
4706,
736,
7431,
29898,
1311,
29889,
11991,
29897,
1405,
29871,
29900,
13,
13,
1753,
6036,
29898,
3177,
29892,
2479,
29918,
2098,
29922,
29945,
1125,
13,
1678,
396,
1334,
671,
5291,
2701,
577,
591,
508,
2656,
2678,
373,
29889,
29871,
450,
5224,
278,
2479,
1797,
29892,
278,
13,
1678,
396,
17649,
304,
278,
2175,
278,
2943,
5692,
29889,
13,
1678,
903,
18010,
29889,
4397,
3552,
4990,
29918,
2098,
29892,
2943,
876,
13,
13,
1753,
28371,
7295,
13,
1678,
903,
18010,
353,
5159,
13,
13,
1753,
679,
29918,
18010,
29898,
1792,
1125,
13,
1678,
7573,
353,
5159,
13,
1678,
363,
17117,
2943,
297,
12705,
7373,
18010,
1125,
13,
4706,
22289,
29918,
3177,
353,
2943,
29889,
4572,
29898,
1792,
29897,
13,
4706,
565,
22289,
29918,
3177,
29901,
13,
9651,
7573,
29889,
4397,
29898,
3177,
29897,
13,
1678,
736,
7573,
13,
13,
13,
2
] |
main/admin.py | ravsimar-sodhi/SRIP-web-app | 0 | 72763 | from django.contrib import admin
from .models import LoggedCommit
from mentor.models import Mentor
def approve_status(modeladmin, request, queryset):
queryset.update(status = "APPROVED")
approve_status.short_description = "Mark selected Commits as approved"
class LoggedCommitAdmin(admin.ModelAdmin):
list_filter = ('status',)
list_display = ['user', 'commit_id','url', 'issue_points','toc', 'remark','status', 'project', 'evaluated_by', 'time_eval']
actions = [approve_status]
def get_queryset(self, request):
qs = super(admin.ModelAdmin, self).get_queryset(request)
if not request.user.is_superuser:
mentor = Mentor.objects.get(handle=request.user)
projects = mentor.project_set.all()
qs = qs.filter(project__in=projects)
return qs
admin.site.register(LoggedCommit, LoggedCommitAdmin)
| [
1,
515,
9557,
29889,
21570,
1053,
4113,
13,
3166,
869,
9794,
1053,
4522,
3192,
1523,
2415,
13,
3166,
6042,
272,
29889,
9794,
1053,
341,
296,
272,
13,
13,
1753,
2134,
345,
29918,
4882,
29898,
4299,
6406,
29892,
2009,
29892,
2346,
842,
1125,
13,
1678,
2346,
842,
29889,
5504,
29898,
4882,
353,
376,
3301,
8618,
29963,
3352,
1159,
13,
9961,
345,
29918,
4882,
29889,
12759,
29918,
8216,
353,
376,
9802,
4629,
1876,
1169,
408,
23454,
29908,
13,
13,
1990,
4522,
3192,
1523,
2415,
12754,
29898,
6406,
29889,
3195,
12754,
1125,
13,
1678,
1051,
29918,
4572,
353,
6702,
4882,
742,
29897,
13,
1678,
1051,
29918,
4990,
353,
6024,
1792,
742,
525,
15060,
29918,
333,
3788,
2271,
742,
525,
15118,
29918,
9748,
3788,
517,
29883,
742,
525,
26294,
3788,
4882,
742,
525,
4836,
742,
525,
24219,
630,
29918,
1609,
742,
525,
2230,
29918,
14513,
2033,
13,
1678,
8820,
353,
518,
9961,
345,
29918,
4882,
29962,
13,
13,
1678,
822,
679,
29918,
1972,
842,
29898,
1311,
29892,
2009,
1125,
13,
4706,
3855,
29879,
353,
2428,
29898,
6406,
29889,
3195,
12754,
29892,
1583,
467,
657,
29918,
1972,
842,
29898,
3827,
29897,
13,
4706,
565,
451,
2009,
29889,
1792,
29889,
275,
29918,
9136,
1792,
29901,
13,
9651,
6042,
272,
353,
341,
296,
272,
29889,
12650,
29889,
657,
29898,
8411,
29922,
3827,
29889,
1792,
29897,
13,
9651,
9279,
353,
6042,
272,
29889,
4836,
29918,
842,
29889,
497,
580,
13,
9651,
3855,
29879,
353,
3855,
29879,
29889,
4572,
29898,
4836,
1649,
262,
29922,
16418,
29897,
13,
4706,
736,
3855,
29879,
13,
13,
6406,
29889,
2746,
29889,
9573,
29898,
3403,
3192,
1523,
2415,
29892,
4522,
3192,
1523,
2415,
12754,
29897,
13,
2
] |
setup.py | DecodEPFL/neurSLS | 0 | 161688 | #!/usr/bin/env python
import setuptools
import os
os.chmod("run.py", 0o744)
setuptools.setup(
name='neurSLS',
version='1.0',
url='https://github.com/DecodEPFL/neurSLS',
license='CC-BY-4.0 License',
author='<NAME>',
author_email='<EMAIL>',
description='Neural System Level Synthesis',
packages=setuptools.find_packages(),
install_requires=['torch>=1.7.1',
'numpy>=1.18.1',
'matplotlib>=3.1.3'],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
],
python_requires='>=3.8',
)
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
5215,
731,
21245,
8789,
13,
5215,
2897,
13,
13,
359,
29889,
305,
1545,
703,
3389,
29889,
2272,
613,
29871,
29900,
29877,
29955,
29946,
29946,
29897,
13,
13,
842,
21245,
8789,
29889,
14669,
29898,
13,
1678,
1024,
2433,
16115,
29903,
8547,
742,
13,
1678,
1873,
2433,
29896,
29889,
29900,
742,
13,
1678,
3142,
2433,
991,
597,
3292,
29889,
510,
29914,
6185,
397,
15488,
10536,
29914,
16115,
29903,
8547,
742,
13,
1678,
19405,
2433,
4174,
29899,
22716,
29899,
29946,
29889,
29900,
19245,
742,
13,
1678,
4148,
2433,
29966,
5813,
29958,
742,
13,
1678,
4148,
29918,
5269,
2433,
29966,
26862,
6227,
29958,
742,
13,
1678,
6139,
2433,
8139,
3631,
2184,
21597,
10829,
26533,
742,
13,
1678,
9741,
29922,
842,
21245,
8789,
29889,
2886,
29918,
8318,
3285,
13,
1678,
2601,
29918,
276,
339,
2658,
29922,
1839,
7345,
305,
18572,
29896,
29889,
29955,
29889,
29896,
742,
13,
462,
418,
525,
23749,
18572,
29896,
29889,
29896,
29947,
29889,
29896,
742,
13,
462,
418,
525,
2922,
17357,
18572,
29941,
29889,
29896,
29889,
29941,
7464,
13,
1678,
770,
14903,
11759,
13,
4706,
376,
9283,
4056,
17088,
4761,
5132,
4761,
29871,
29941,
613,
13,
4706,
376,
29931,
293,
1947,
4761,
438,
5425,
28268,
1490,
4761,
341,
1806,
19245,
613,
13,
1678,
21251,
13,
1678,
3017,
29918,
276,
339,
2658,
2433,
18572,
29941,
29889,
29947,
742,
13,
29897,
13,
2
] |
tensorflow_datasets/ranking/istella/istella.py | vanshhhhh/datasets | 3,380 | 110934 | <reponame>vanshhhhh/datasets
# coding=utf-8
# Copyright 2021 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""istella dataset."""
import dataclasses
from typing import Optional
import tensorflow as tf
import tensorflow_datasets.public_api as tfds
from tensorflow_datasets.ranking.libsvm_ranking_parser import LibSVMRankingParser
_DESCRIPTION = """
The Istella datasets are three large-scale Learning-to-Rank datasets released by
Istella. Each dataset consists of query-document pairs represented as feature
vectors and corresponding relevance judgment labels.
The dataset contains three versions:
* `main` ("Istella LETOR"): Containing 10,454,629 query-document pairs.
* `s` ("Istella-S LETOR"): Containing 3,408,630 query-document pairs.
* `x` ("Istella-X LETOR"): Containing 26,791,447 query-document pairs.
You can specify whether to use the `main`, `s` or `x` version of the dataset as
follows:
```python
ds = tfds.load("istella/main")
ds = tfds.load("istella/s")
ds = tfds.load("istella/x")
```
If only `istella` is specified, the `istella/main` option is selected by
default:
```python
# This is the same as `tfds.load("istella/main")`
ds = tfds.load("istella")
```
"""
_CITATION = """
@article{10.1145/2987380,
author = {<NAME> Lucchese, <NAME>},
title = {Fast Ranking with Additive Ensembles of Oblivious and Non-Oblivious Regression Trees},
year = {2016},
publisher = {ACM},
address = {New York, NY, USA},
volume = {35},
number = {2},
issn = {1046-8188},
url = {https://doi.org/10.1145/2987380},
doi = {10.1145/2987380},
journal = {ACM Transactions on Information Systems},
articleno = {15},
numpages = {31},
}
"""
_URLS = {
"main": "http://library.istella.it/dataset/istella-letor.tar.gz",
"s": "http://library.istella.it/dataset/istella-s-letor.tar.gz",
"x": "http://quickrank.isti.cnr.it/istella-datasets-mirror/istella-X.tar.gz"
}
_FEATURE_NAMES = {n: f"feature_{n}" for n in range(1, 221)}
_LABEL_NAME = "label"
@dataclasses.dataclass
class IstellaConfig(tfds.core.BuilderConfig):
has_vali: bool = False
subdirectory: Optional[str] = None
class Istella(tfds.core.GeneratorBasedBuilder):
"""DatasetBuilder for istella dataset."""
VERSION = tfds.core.Version("1.0.1")
RELEASE_NOTES = {
"1.0.0": "Initial release.",
"1.0.1": "Fix serialization to support float64."
}
# pytype: disable=wrong-keyword-args
BUILDER_CONFIGS = [
IstellaConfig(name="main", has_vali=False, subdirectory="full"),
IstellaConfig(name="s", has_vali=True, subdirectory="sample"),
IstellaConfig(name="x", has_vali=True, subdirectory=None)
]
# pytype: enable=wrong-keyword-args
def _info(self) -> tfds.core.DatasetInfo:
"""Returns the dataset metadata."""
encoding = tfds.features.Encoding.ZLIB
features = {
name: tfds.features.Tensor(
shape=(None,), dtype=tf.float64, encoding=encoding)
for name in _FEATURE_NAMES.values()
}
features[_LABEL_NAME] = tfds.features.Tensor(
shape=(None,), dtype=tf.float64, encoding=encoding)
return tfds.core.DatasetInfo(
builder=self,
description=_DESCRIPTION,
features=tfds.features.FeaturesDict(features),
homepage="http://quickrank.isti.cnr.it/istella-dataset/",
citation=_CITATION,
)
def _split_generators(self, dl_manager: tfds.download.DownloadManager):
"""Returns SplitGenerators."""
path = dl_manager.download_and_extract(_URLS[self.builder_config.name])
# For some dataset configs, the data is in a subdirectory.
if self.builder_config.subdirectory is not None:
path = path / self.builder_config.subdirectory
splits = {
"train": self._generate_examples(path / "train.txt"),
"test": self._generate_examples(path / "test.txt")
}
# For some dataset configs, there is an additional validation split.
if self.builder_config.has_vali:
splits["vali"] = self._generate_examples(path / "vali.txt")
return splits
def _generate_examples(self, path):
"""Yields examples."""
# Istella datasets seems to be encoded as latin1 and not utf-8, so we have
# to read the file contents as bytes and manually decode it as latin1.
with tf.io.gfile.GFile(path, "rb") as f:
lines = map(lambda bytes_line: bytes_line.decode("latin1"), f)
yield from LibSVMRankingParser(lines, _FEATURE_NAMES, _LABEL_NAME)
| [
1,
529,
276,
1112,
420,
29958,
29894,
550,
25446,
25446,
29882,
29914,
14538,
1691,
13,
29937,
14137,
29922,
9420,
29899,
29947,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29896,
450,
323,
6073,
17907,
13373,
294,
1691,
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,
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,
13,
15945,
29908,
391,
3547,
8783,
1213,
15945,
13,
13,
5215,
848,
13203,
13,
3166,
19229,
1053,
28379,
13,
13,
5215,
26110,
408,
15886,
13,
5215,
26110,
29918,
14538,
1691,
29889,
3597,
29918,
2754,
408,
15886,
6289,
13,
3166,
26110,
29918,
14538,
1691,
29889,
661,
9292,
29889,
1982,
4501,
29885,
29918,
661,
9292,
29918,
16680,
1053,
8153,
7597,
21055,
804,
292,
11726,
13,
13,
29918,
2287,
7187,
24290,
2725,
353,
9995,
13,
1576,
11066,
3547,
20035,
526,
2211,
2919,
29899,
7052,
29257,
29899,
517,
29899,
29934,
804,
20035,
5492,
491,
13,
29902,
303,
3547,
29889,
7806,
8783,
11624,
310,
2346,
29899,
3225,
11000,
9875,
408,
4682,
13,
345,
14359,
322,
6590,
29527,
749,
24284,
11073,
29889,
13,
13,
1576,
8783,
3743,
2211,
6910,
29901,
13,
13,
334,
421,
3396,
29952,
4852,
29902,
303,
3547,
365,
2544,
1955,
29908,
1125,
2866,
17225,
29871,
29896,
29900,
29892,
29946,
29945,
29946,
29892,
29953,
29906,
29929,
2346,
29899,
3225,
11000,
29889,
13,
334,
421,
29879,
29952,
4852,
29902,
303,
3547,
29899,
29903,
365,
2544,
1955,
29908,
1125,
2866,
17225,
29871,
29941,
29892,
29946,
29900,
29947,
29892,
29953,
29941,
29900,
2346,
29899,
3225,
11000,
29889,
13,
334,
421,
29916,
29952,
4852,
29902,
303,
3547,
29899,
29990,
365,
2544,
1955,
29908,
1125,
2866,
17225,
29871,
29906,
29953,
29892,
29955,
29929,
29896,
29892,
29946,
29946,
29955,
2346,
29899,
3225,
11000,
29889,
13,
13,
3492,
508,
6084,
3692,
304,
671,
278,
421,
3396,
1673,
421,
29879,
29952,
470,
421,
29916,
29952,
1873,
310,
278,
8783,
408,
13,
23031,
29879,
29901,
13,
13,
28956,
4691,
13,
6289,
353,
15886,
6289,
29889,
1359,
703,
391,
3547,
29914,
3396,
1159,
13,
6289,
353,
15886,
6289,
29889,
1359,
703,
391,
3547,
29914,
29879,
1159,
13,
6289,
353,
15886,
6289,
29889,
1359,
703,
391,
3547,
29914,
29916,
1159,
13,
28956,
13,
13,
3644,
871,
421,
391,
3547,
29952,
338,
6790,
29892,
278,
421,
391,
3547,
29914,
3396,
29952,
2984,
338,
4629,
491,
13,
4381,
29901,
13,
13,
28956,
4691,
13,
29937,
910,
338,
278,
1021,
408,
421,
13264,
6289,
29889,
1359,
703,
391,
3547,
29914,
3396,
20933,
13,
6289,
353,
15886,
6289,
29889,
1359,
703,
391,
3547,
1159,
13,
28956,
13,
15945,
29908,
13,
13,
29918,
29907,
1806,
8098,
353,
9995,
13,
29992,
7914,
29912,
29896,
29900,
29889,
29896,
29896,
29946,
29945,
29914,
29906,
29929,
29947,
29955,
29941,
29947,
29900,
29892,
13,
29871,
4148,
353,
426,
29966,
5813,
29958,
10315,
305,
968,
29892,
529,
5813,
29958,
1118,
13,
29871,
3611,
353,
426,
29943,
579,
22125,
292,
411,
3462,
3321,
22521,
1590,
793,
310,
438,
2204,
440,
2738,
322,
10050,
29899,
29949,
2204,
440,
2738,
2169,
23881,
6479,
267,
1118,
13,
29871,
1629,
353,
426,
29906,
29900,
29896,
29953,
1118,
13,
29871,
9805,
261,
353,
426,
2477,
29924,
1118,
13,
29871,
3211,
353,
426,
4373,
3088,
29892,
23526,
29892,
8278,
1118,
13,
29871,
7977,
353,
426,
29941,
29945,
1118,
13,
29871,
1353,
353,
426,
29906,
1118,
13,
29871,
1721,
29876,
353,
426,
29896,
29900,
29946,
29953,
29899,
29947,
29896,
29947,
29947,
1118,
13,
29871,
3142,
353,
426,
991,
597,
1867,
29875,
29889,
990,
29914,
29896,
29900,
29889,
29896,
29896,
29946,
29945,
29914,
29906,
29929,
29947,
29955,
29941,
29947,
29900,
1118,
13,
29871,
13102,
353,
426,
29896,
29900,
29889,
29896,
29896,
29946,
29945,
29914,
29906,
29929,
29947,
29955,
29941,
29947,
29900,
1118,
13,
29871,
8955,
353,
426,
2477,
29924,
4103,
7387,
373,
10343,
23985,
1118,
13,
29871,
1616,
293,
2435,
29877,
353,
426,
29896,
29945,
1118,
13,
29871,
954,
12292,
353,
426,
29941,
29896,
1118,
13,
29913,
13,
15945,
29908,
13,
13,
29918,
4219,
29903,
353,
426,
13,
1678,
376,
3396,
1115,
376,
1124,
597,
5258,
29889,
391,
3547,
29889,
277,
29914,
24713,
29914,
391,
3547,
29899,
1026,
272,
29889,
12637,
29889,
18828,
613,
13,
1678,
376,
29879,
1115,
376,
1124,
597,
5258,
29889,
391,
3547,
29889,
277,
29914,
24713,
29914,
391,
3547,
29899,
29879,
29899,
1026,
272,
29889,
12637,
29889,
18828,
613,
13,
1678,
376,
29916,
1115,
376,
1124,
597,
24561,
10003,
29889,
14194,
29889,
18038,
29878,
29889,
277,
29914,
391,
3547,
29899,
14538,
1691,
29899,
11038,
729,
29914,
391,
3547,
29899,
29990,
29889,
12637,
29889,
18828,
29908,
13,
29913,
13,
13,
29918,
16359,
1299,
11499,
29918,
5813,
29903,
353,
426,
29876,
29901,
285,
29908,
14394,
648,
29876,
5038,
363,
302,
297,
3464,
29898,
29896,
29892,
29871,
29906,
29906,
29896,
2915,
13,
13,
29918,
24461,
6670,
29918,
5813,
353,
376,
1643,
29908,
13,
13,
13,
29992,
1272,
13203,
29889,
1272,
1990,
13,
1990,
11066,
3547,
3991,
29898,
13264,
6289,
29889,
3221,
29889,
5627,
3991,
1125,
13,
29871,
756,
29918,
791,
29875,
29901,
6120,
353,
7700,
13,
29871,
1014,
12322,
29901,
28379,
29961,
710,
29962,
353,
6213,
13,
13,
13,
1990,
11066,
3547,
29898,
13264,
6289,
29889,
3221,
29889,
21575,
29933,
1463,
5627,
1125,
13,
29871,
9995,
16390,
24541,
5627,
363,
1752,
3547,
8783,
1213,
15945,
13,
13,
29871,
478,
1001,
13381,
353,
15886,
6289,
29889,
3221,
29889,
6594,
703,
29896,
29889,
29900,
29889,
29896,
1159,
13,
29871,
5195,
14063,
29918,
12256,
2890,
353,
426,
13,
418,
376,
29896,
29889,
29900,
29889,
29900,
1115,
376,
15514,
6507,
19602,
13,
418,
376,
29896,
29889,
29900,
29889,
29896,
1115,
376,
29943,
861,
7797,
2133,
304,
2304,
5785,
29953,
29946,
1213,
13,
29871,
500,
13,
29871,
396,
11451,
1853,
29901,
11262,
29922,
15866,
549,
29899,
26766,
29899,
5085,
13,
29871,
350,
3120,
29931,
8032,
29918,
6007,
3738,
10749,
353,
518,
13,
418,
11066,
3547,
3991,
29898,
978,
543,
3396,
613,
756,
29918,
791,
29875,
29922,
8824,
29892,
1014,
12322,
543,
8159,
4968,
13,
418,
11066,
3547,
3991,
29898,
978,
543,
29879,
613,
756,
29918,
791,
29875,
29922,
5574,
29892,
1014,
12322,
543,
11249,
4968,
13,
418,
11066,
3547,
3991,
29898,
978,
543,
29916,
613,
756,
29918,
791,
29875,
29922,
5574,
29892,
1014,
12322,
29922,
8516,
29897,
13,
29871,
4514,
13,
13,
29871,
396,
11451,
1853,
29901,
9025,
29922,
15866,
549,
29899,
26766,
29899,
5085,
13,
13,
29871,
822,
903,
3888,
29898,
1311,
29897,
1599,
15886,
6289,
29889,
3221,
29889,
16390,
24541,
3401,
29901,
13,
1678,
9995,
11609,
29879,
278,
8783,
15562,
1213,
15945,
13,
1678,
8025,
353,
15886,
6289,
29889,
22100,
29889,
14934,
29889,
29999,
5265,
29933,
13,
1678,
5680,
353,
426,
13,
4706,
1024,
29901,
15886,
6289,
29889,
22100,
29889,
29911,
6073,
29898,
13,
9651,
8267,
7607,
8516,
29892,
511,
26688,
29922,
13264,
29889,
7411,
29953,
29946,
29892,
8025,
29922,
22331,
29897,
13,
4706,
363,
1024,
297,
903,
16359,
1299,
11499,
29918,
5813,
29903,
29889,
5975,
580,
13,
1678,
500,
13,
1678,
5680,
28513,
24461,
6670,
29918,
5813,
29962,
353,
15886,
6289,
29889,
22100,
29889,
29911,
6073,
29898,
13,
4706,
8267,
7607,
8516,
29892,
511,
26688,
29922,
13264,
29889,
7411,
29953,
29946,
29892,
8025,
29922,
22331,
29897,
13,
13,
1678,
736,
15886,
6289,
29889,
3221,
29889,
16390,
24541,
3401,
29898,
13,
4706,
12856,
29922,
1311,
29892,
13,
4706,
6139,
29922,
29918,
2287,
7187,
24290,
2725,
29892,
13,
4706,
5680,
29922,
13264,
6289,
29889,
22100,
29889,
8263,
3698,
21533,
29898,
22100,
511,
13,
4706,
3271,
3488,
543,
1124,
597,
24561,
10003,
29889,
14194,
29889,
18038,
29878,
29889,
277,
29914,
391,
3547,
29899,
24713,
29914,
613,
13,
4706,
274,
7018,
29922,
29918,
29907,
1806,
8098,
29892,
13,
1678,
1723,
13,
13,
29871,
822,
903,
5451,
29918,
4738,
4097,
29898,
1311,
29892,
270,
29880,
29918,
12847,
29901,
15886,
6289,
29889,
10382,
29889,
22954,
3260,
1125,
13,
1678,
9995,
11609,
29879,
26178,
5631,
4097,
1213,
15945,
13,
1678,
2224,
353,
270,
29880,
29918,
12847,
29889,
10382,
29918,
392,
29918,
21111,
7373,
4219,
29903,
29961,
1311,
29889,
16409,
29918,
2917,
29889,
978,
2314,
13,
13,
1678,
396,
1152,
777,
8783,
2295,
29879,
29892,
278,
848,
338,
297,
263,
1014,
12322,
29889,
13,
1678,
565,
1583,
29889,
16409,
29918,
2917,
29889,
1491,
12322,
338,
451,
6213,
29901,
13,
418,
2224,
353,
2224,
847,
1583,
29889,
16409,
29918,
2917,
29889,
1491,
12322,
13,
13,
1678,
8536,
1169,
353,
426,
13,
4706,
376,
14968,
1115,
1583,
3032,
17158,
29918,
19057,
29898,
2084,
847,
376,
14968,
29889,
3945,
4968,
13,
4706,
376,
1688,
1115,
1583,
3032,
17158,
29918,
19057,
29898,
2084,
847,
376,
1688,
29889,
3945,
1159,
13,
1678,
500,
13,
13,
1678,
396,
1152,
777,
8783,
2295,
29879,
29892,
727,
338,
385,
5684,
8845,
6219,
29889,
13,
1678,
565,
1583,
29889,
16409,
29918,
2917,
29889,
5349,
29918,
791,
29875,
29901,
13,
418,
8536,
1169,
3366,
791,
29875,
3108,
353,
1583,
3032,
17158,
29918,
19057,
29898,
2084,
847,
376,
791,
29875,
29889,
3945,
1159,
13,
13,
1678,
736,
8536,
1169,
13,
13,
29871,
822,
903,
17158,
29918,
19057,
29898,
1311,
29892,
2224,
1125,
13,
1678,
9995,
29979,
969,
29879,
6455,
1213,
15945,
13,
1678,
396,
11066,
3547,
20035,
2444,
304,
367,
18511,
408,
25677,
29896,
322,
451,
23616,
29899,
29947,
29892,
577,
591,
505,
13,
1678,
396,
304,
1303,
278,
934,
8118,
408,
6262,
322,
7522,
21822,
372,
408,
25677,
29896,
29889,
13,
1678,
411,
15886,
29889,
601,
29889,
29887,
1445,
29889,
29954,
2283,
29898,
2084,
29892,
376,
6050,
1159,
408,
285,
29901,
13,
418,
3454,
353,
2910,
29898,
2892,
6262,
29918,
1220,
29901,
6262,
29918,
1220,
29889,
13808,
703,
5066,
262,
29896,
4968,
285,
29897,
13,
418,
7709,
515,
8153,
7597,
21055,
804,
292,
11726,
29898,
9012,
29892,
903,
16359,
1299,
11499,
29918,
5813,
29903,
29892,
903,
24461,
6670,
29918,
5813,
29897,
13,
2
] |
refocus/constant.py | harshkothari410/refocus-python | 0 | 1616041 | HTTPSTATUS = {
'OK': 200,
'CREATED': 201,
'BAD_REQUEST': 400,
'UNAUTHORIZED': 401,
'FORBIDDEN': 403,
'NOT_FOUND': 404,
'NOT_ALLOWED': 405,
}
| [
1,
7331,
27047,
353,
426,
13,
12,
29915,
8949,
2396,
29871,
29906,
29900,
29900,
29892,
13,
12,
29915,
27045,
29928,
2396,
29871,
29906,
29900,
29896,
29892,
13,
12,
29915,
29933,
3035,
29918,
16244,
2396,
29871,
29946,
29900,
29900,
29892,
13,
12,
29915,
29965,
3521,
2692,
29950,
1955,
26664,
3352,
2396,
29871,
29946,
29900,
29896,
29892,
13,
12,
29915,
22051,
29933,
1367,
29928,
1430,
2396,
29871,
29946,
29900,
29941,
29892,
13,
12,
29915,
12256,
29918,
5800,
18783,
2396,
29871,
29946,
29900,
29946,
29892,
13,
12,
29915,
12256,
29918,
1964,
27998,
3352,
2396,
29871,
29946,
29900,
29945,
29892,
13,
29913,
13,
2
] |
setup.py | Peder2911/dstk | 0 | 106087 | <reponame>Peder2911/dstk<gh_stars>0
import setuptools
setuptools.setup(
name="dstk",
version="0.0.1",
author="<NAME>",
author_email="<EMAIL>",
packages=setuptools.find_packages(),
scripts=["bin/dstk"],
url="http://pypi.python.org/pypi/dstk",
license="LICENSE",
description="Data science tookit",
long_description=open("README").read(),
install_requires=[
"pandas==1.0.1"
]
)
| [
1,
529,
276,
1112,
420,
29958,
29925,
2447,
29906,
29929,
29896,
29896,
29914,
22992,
29895,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
731,
21245,
8789,
13,
13,
842,
21245,
8789,
29889,
14669,
29898,
13,
1678,
1024,
543,
22992,
29895,
613,
13,
1678,
1873,
543,
29900,
29889,
29900,
29889,
29896,
613,
13,
1678,
4148,
543,
29966,
5813,
28341,
13,
1678,
4148,
29918,
5269,
543,
29966,
26862,
6227,
28341,
13,
1678,
9741,
29922,
842,
21245,
8789,
29889,
2886,
29918,
8318,
3285,
13,
1678,
12078,
29922,
3366,
2109,
29914,
22992,
29895,
12436,
13,
1678,
3142,
543,
1124,
597,
29886,
1478,
29875,
29889,
4691,
29889,
990,
29914,
29886,
1478,
29875,
29914,
22992,
29895,
613,
13,
1678,
19405,
543,
27888,
1430,
1660,
613,
13,
1678,
6139,
543,
1469,
10466,
3614,
277,
613,
13,
1678,
1472,
29918,
8216,
29922,
3150,
703,
16310,
2303,
2564,
949,
3285,
13,
1678,
2601,
29918,
276,
339,
2658,
11759,
13,
4706,
376,
15112,
1360,
29896,
29889,
29900,
29889,
29896,
29908,
13,
1678,
4514,
13,
29897,
13,
2
] |
monorun/datasets/pipelines/loading.py | minghanz/MonoRUn | 0 | 86484 | <reponame>minghanz/MonoRUn
import os.path as osp
import mmcv
import numpy as np
from mmdet.datasets import PIPELINES
@PIPELINES.register_module()
class LoadAnnotations3D(object):
def __init__(self,
with_bbox_3d=True,
with_coord_3d=True,
with_coord_2d=True,
with_truncation=False,
with_depth=False,
depth_mean=0.0,
depth_std=1.0):
self.with_bbox_3d = with_bbox_3d
self.with_coord_3d = with_coord_3d
self.with_coord_2d = with_coord_2d
self.with_truncation = with_truncation
self.with_depth = with_depth
self.depth_mean = depth_mean
self.depth_std = depth_std
@staticmethod
def _load_coord_3d(results):
assert results['img_shape'] == results['ori_shape']
h, w = results['img_shape'][:2]
oc_dict = mmcv.load(
osp.join(results['coord_3d_prefix'], results['ann_info']['coord_3d']))
gt_coords_3d = []
gt_coords_3d_mask = []
for i, bbox_3d in zip(results['ann_info']['object_ids'],
results['ann_info']['bboxes_3d']):
uv = np.round(oc_dict['uv_list'][i]).astype(np.int)
oc = oc_dict['oc_list'][i].astype(np.float32)
coord_3d = np.zeros((h, w, 3), dtype=np.float32)
coord_3d_mask = np.zeros((h, w, 1), dtype=np.float32)
coord_3d[uv[:, 1], uv[:, 0]] = oc
coord_3d_mask[uv[:, 1], uv[:, 0]] = 1.0
gt_coords_3d.append(coord_3d)
gt_coords_3d_mask.append(coord_3d_mask)
results['gt_coords_3d'] = gt_coords_3d
results['gt_coords_3d_mask'] = gt_coords_3d_mask
results['dense_fields'].append('gt_coords_3d')
results['dense_fields'].append('gt_coords_3d_mask')
return results
@staticmethod
def _load_bboxes_3d(results):
results['gt_bboxes_3d'] = results['ann_info']['bboxes_3d']
results['bbox_3d_fields'].append('gt_bboxes_3d')
results['gt_proj_r_mats'] = results['ann_info']['gt_proj_r_mats']
results['gt_proj_t_vecs'] = results['ann_info']['gt_proj_t_vecs']
return results
def _load_depth(self, results):
depth = mmcv.imread(
osp.join(results['depth_prefix'],
results['ann_info']['depth']),
flag='unchanged')[..., None] # (H, W, 1)
results['depth'] = (depth.astype(np.float32) - self.depth_mean) / self.depth_std
results['dense_fields'].append('depth')
return results
@staticmethod
def _gen_coord_2d(results):
assert results['img_shape'] == results['ori_shape']
h, w = results['img_shape'][:2]
coord_2d = np.mgrid[:h, :w].astype(np.float32)
coord_2d[[1, 0]] = coord_2d[[0, 1]] # to [u, v]
results['coord_2d'] = np.moveaxis(coord_2d, 0, -1) # (H, W, 2)
if 'dense_fields' in results:
results['dense_fields'].append('coord_2d')
else:
results['dense_fields'] = ['coord_2d']
return results
def __call__(self, results):
if 'ann_info' in results and 'cam_intrinsic' in results['ann_info']:
results['cam_intrinsic'] = results['ann_info']['cam_intrinsic']
elif 'img_info' in results and 'cam_intrinsic' in results['img_info']:
results['cam_intrinsic'] = results['img_info']['cam_intrinsic']
else:
raise ValueError('cam_intrinsic not found')
if self.with_bbox_3d:
results = self._load_bboxes_3d(results)
if self.with_coord_3d:
results = self._load_coord_3d(results)
if self.with_coord_2d:
results = self._gen_coord_2d(results)
if self.with_truncation:
results['truncation'] = results['ann_info']['truncation']
if self.with_depth:
results = self._load_depth(results)
return results
| [
1,
529,
276,
1112,
420,
29958,
4056,
29882,
4096,
29914,
29924,
3231,
29934,
2525,
13,
5215,
2897,
29889,
2084,
408,
288,
1028,
13,
13,
5215,
5654,
11023,
13,
5215,
12655,
408,
7442,
13,
13,
3166,
286,
3487,
300,
29889,
14538,
1691,
1053,
349,
29902,
4162,
23714,
2890,
13,
13,
13,
29992,
2227,
4162,
23714,
2890,
29889,
9573,
29918,
5453,
580,
13,
1990,
16012,
2744,
1333,
800,
29941,
29928,
29898,
3318,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
411,
29918,
29890,
1884,
29918,
29941,
29881,
29922,
5574,
29892,
13,
462,
411,
29918,
1111,
536,
29918,
29941,
29881,
29922,
5574,
29892,
13,
462,
411,
29918,
1111,
536,
29918,
29906,
29881,
29922,
5574,
29892,
13,
462,
411,
29918,
509,
4661,
362,
29922,
8824,
29892,
13,
462,
411,
29918,
19488,
29922,
8824,
29892,
13,
462,
10809,
29918,
12676,
29922,
29900,
29889,
29900,
29892,
13,
462,
10809,
29918,
4172,
29922,
29896,
29889,
29900,
1125,
13,
4706,
1583,
29889,
2541,
29918,
29890,
1884,
29918,
29941,
29881,
353,
411,
29918,
29890,
1884,
29918,
29941,
29881,
13,
4706,
1583,
29889,
2541,
29918,
1111,
536,
29918,
29941,
29881,
353,
411,
29918,
1111,
536,
29918,
29941,
29881,
13,
4706,
1583,
29889,
2541,
29918,
1111,
536,
29918,
29906,
29881,
353,
411,
29918,
1111,
536,
29918,
29906,
29881,
13,
4706,
1583,
29889,
2541,
29918,
509,
4661,
362,
353,
411,
29918,
509,
4661,
362,
13,
4706,
1583,
29889,
2541,
29918,
19488,
353,
411,
29918,
19488,
13,
4706,
1583,
29889,
19488,
29918,
12676,
353,
10809,
29918,
12676,
13,
4706,
1583,
29889,
19488,
29918,
4172,
353,
10809,
29918,
4172,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
903,
1359,
29918,
1111,
536,
29918,
29941,
29881,
29898,
9902,
1125,
13,
4706,
4974,
2582,
1839,
2492,
29918,
12181,
2033,
1275,
2582,
1839,
4170,
29918,
12181,
2033,
13,
4706,
298,
29892,
281,
353,
2582,
1839,
2492,
29918,
12181,
2033,
7503,
29906,
29962,
13,
4706,
12954,
29918,
8977,
353,
5654,
11023,
29889,
1359,
29898,
13,
9651,
288,
1028,
29889,
7122,
29898,
9902,
1839,
1111,
536,
29918,
29941,
29881,
29918,
13506,
7464,
2582,
1839,
812,
29918,
3888,
16215,
1111,
536,
29918,
29941,
29881,
25901,
13,
4706,
330,
29873,
29918,
1111,
4339,
29918,
29941,
29881,
353,
5159,
13,
4706,
330,
29873,
29918,
1111,
4339,
29918,
29941,
29881,
29918,
13168,
353,
5159,
13,
4706,
363,
474,
29892,
289,
1884,
29918,
29941,
29881,
297,
14319,
29898,
9902,
1839,
812,
29918,
3888,
16215,
3318,
29918,
4841,
7464,
13,
462,
795,
2582,
1839,
812,
29918,
3888,
16215,
29890,
1884,
267,
29918,
29941,
29881,
2033,
1125,
13,
9651,
318,
29894,
353,
7442,
29889,
14486,
29898,
542,
29918,
8977,
1839,
4090,
29918,
1761,
2033,
29961,
29875,
14664,
579,
668,
29898,
9302,
29889,
524,
29897,
13,
9651,
12954,
353,
12954,
29918,
8977,
1839,
542,
29918,
1761,
2033,
29961,
29875,
1822,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
29897,
13,
9651,
29311,
29918,
29941,
29881,
353,
7442,
29889,
3298,
359,
3552,
29882,
29892,
281,
29892,
29871,
29941,
511,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
29897,
13,
9651,
29311,
29918,
29941,
29881,
29918,
13168,
353,
7442,
29889,
3298,
359,
3552,
29882,
29892,
281,
29892,
29871,
29896,
511,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
29897,
13,
9651,
29311,
29918,
29941,
29881,
29961,
4090,
7503,
29892,
29871,
29896,
1402,
318,
29894,
7503,
29892,
29871,
29900,
5262,
353,
12954,
13,
9651,
29311,
29918,
29941,
29881,
29918,
13168,
29961,
4090,
7503,
29892,
29871,
29896,
1402,
318,
29894,
7503,
29892,
29871,
29900,
5262,
353,
29871,
29896,
29889,
29900,
13,
9651,
330,
29873,
29918,
1111,
4339,
29918,
29941,
29881,
29889,
4397,
29898,
1111,
536,
29918,
29941,
29881,
29897,
13,
9651,
330,
29873,
29918,
1111,
4339,
29918,
29941,
29881,
29918,
13168,
29889,
4397,
29898,
1111,
536,
29918,
29941,
29881,
29918,
13168,
29897,
13,
4706,
2582,
1839,
4141,
29918,
1111,
4339,
29918,
29941,
29881,
2033,
353,
330,
29873,
29918,
1111,
4339,
29918,
29941,
29881,
13,
4706,
2582,
1839,
4141,
29918,
1111,
4339,
29918,
29941,
29881,
29918,
13168,
2033,
353,
330,
29873,
29918,
1111,
4339,
29918,
29941,
29881,
29918,
13168,
13,
4706,
2582,
1839,
1145,
344,
29918,
9621,
13359,
4397,
877,
4141,
29918,
1111,
4339,
29918,
29941,
29881,
1495,
13,
4706,
2582,
1839,
1145,
344,
29918,
9621,
13359,
4397,
877,
4141,
29918,
1111,
4339,
29918,
29941,
29881,
29918,
13168,
1495,
13,
4706,
736,
2582,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
903,
1359,
29918,
29890,
1884,
267,
29918,
29941,
29881,
29898,
9902,
1125,
13,
4706,
2582,
1839,
4141,
29918,
29890,
1884,
267,
29918,
29941,
29881,
2033,
353,
2582,
1839,
812,
29918,
3888,
16215,
29890,
1884,
267,
29918,
29941,
29881,
2033,
13,
4706,
2582,
1839,
29890,
1884,
29918,
29941,
29881,
29918,
9621,
13359,
4397,
877,
4141,
29918,
29890,
1884,
267,
29918,
29941,
29881,
1495,
13,
4706,
2582,
1839,
4141,
29918,
20865,
29918,
29878,
29918,
29885,
1446,
2033,
353,
2582,
1839,
812,
29918,
3888,
16215,
4141,
29918,
20865,
29918,
29878,
29918,
29885,
1446,
2033,
13,
4706,
2582,
1839,
4141,
29918,
20865,
29918,
29873,
29918,
2003,
29879,
2033,
353,
2582,
1839,
812,
29918,
3888,
16215,
4141,
29918,
20865,
29918,
29873,
29918,
2003,
29879,
2033,
13,
4706,
736,
2582,
13,
13,
1678,
822,
903,
1359,
29918,
19488,
29898,
1311,
29892,
2582,
1125,
13,
4706,
10809,
353,
5654,
11023,
29889,
326,
949,
29898,
13,
9651,
288,
1028,
29889,
7122,
29898,
9902,
1839,
19488,
29918,
13506,
7464,
13,
462,
268,
2582,
1839,
812,
29918,
3888,
16215,
19488,
2033,
511,
13,
9651,
7353,
2433,
3322,
4618,
29861,
16361,
6213,
29962,
29871,
396,
313,
29950,
29892,
399,
29892,
29871,
29896,
29897,
13,
4706,
2582,
1839,
19488,
2033,
353,
313,
19488,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
29897,
448,
1583,
29889,
19488,
29918,
12676,
29897,
847,
1583,
29889,
19488,
29918,
4172,
13,
4706,
2582,
1839,
1145,
344,
29918,
9621,
13359,
4397,
877,
19488,
1495,
13,
4706,
736,
2582,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
903,
1885,
29918,
1111,
536,
29918,
29906,
29881,
29898,
9902,
1125,
13,
4706,
4974,
2582,
1839,
2492,
29918,
12181,
2033,
1275,
2582,
1839,
4170,
29918,
12181,
2033,
13,
4706,
298,
29892,
281,
353,
2582,
1839,
2492,
29918,
12181,
2033,
7503,
29906,
29962,
13,
4706,
29311,
29918,
29906,
29881,
353,
7442,
29889,
29885,
7720,
7503,
29882,
29892,
584,
29893,
1822,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
29897,
13,
4706,
29311,
29918,
29906,
29881,
8999,
29896,
29892,
29871,
29900,
5262,
353,
29311,
29918,
29906,
29881,
8999,
29900,
29892,
29871,
29896,
5262,
29871,
396,
304,
518,
29884,
29892,
325,
29962,
13,
4706,
2582,
1839,
1111,
536,
29918,
29906,
29881,
2033,
353,
7442,
29889,
11631,
8990,
29898,
1111,
536,
29918,
29906,
29881,
29892,
29871,
29900,
29892,
448,
29896,
29897,
29871,
396,
313,
29950,
29892,
399,
29892,
29871,
29906,
29897,
13,
4706,
565,
525,
1145,
344,
29918,
9621,
29915,
297,
2582,
29901,
13,
9651,
2582,
1839,
1145,
344,
29918,
9621,
13359,
4397,
877,
1111,
536,
29918,
29906,
29881,
1495,
13,
4706,
1683,
29901,
13,
9651,
2582,
1839,
1145,
344,
29918,
9621,
2033,
353,
6024,
1111,
536,
29918,
29906,
29881,
2033,
13,
4706,
736,
2582,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
2582,
1125,
13,
4706,
565,
525,
812,
29918,
3888,
29915,
297,
2582,
322,
525,
11108,
29918,
262,
509,
28594,
29915,
297,
2582,
1839,
812,
29918,
3888,
2033,
29901,
13,
9651,
2582,
1839,
11108,
29918,
262,
509,
28594,
2033,
353,
2582,
1839,
812,
29918,
3888,
16215,
11108,
29918,
262,
509,
28594,
2033,
13,
4706,
25342,
525,
2492,
29918,
3888,
29915,
297,
2582,
322,
525,
11108,
29918,
262,
509,
28594,
29915,
297,
2582,
1839,
2492,
29918,
3888,
2033,
29901,
13,
9651,
2582,
1839,
11108,
29918,
262,
509,
28594,
2033,
353,
2582,
1839,
2492,
29918,
3888,
16215,
11108,
29918,
262,
509,
28594,
2033,
13,
4706,
1683,
29901,
13,
9651,
12020,
7865,
2392,
877,
11108,
29918,
262,
509,
28594,
451,
1476,
1495,
13,
4706,
565,
1583,
29889,
2541,
29918,
29890,
1884,
29918,
29941,
29881,
29901,
13,
9651,
2582,
353,
1583,
3032,
1359,
29918,
29890,
1884,
267,
29918,
29941,
29881,
29898,
9902,
29897,
13,
4706,
565,
1583,
29889,
2541,
29918,
1111,
536,
29918,
29941,
29881,
29901,
13,
9651,
2582,
353,
1583,
3032,
1359,
29918,
1111,
536,
29918,
29941,
29881,
29898,
9902,
29897,
13,
4706,
565,
1583,
29889,
2541,
29918,
1111,
536,
29918,
29906,
29881,
29901,
13,
9651,
2582,
353,
1583,
3032,
1885,
29918,
1111,
536,
29918,
29906,
29881,
29898,
9902,
29897,
13,
4706,
565,
1583,
29889,
2541,
29918,
509,
4661,
362,
29901,
13,
9651,
2582,
1839,
509,
4661,
362,
2033,
353,
2582,
1839,
812,
29918,
3888,
16215,
509,
4661,
362,
2033,
13,
4706,
565,
1583,
29889,
2541,
29918,
19488,
29901,
13,
9651,
2582,
353,
1583,
3032,
1359,
29918,
19488,
29898,
9902,
29897,
13,
4706,
736,
2582,
13,
2
] |
mouse_burrows/hpc/templates/pass3_single.py | david-zwicker/cv-mouse-burrows | 1 | 149371 | <reponame>david-zwicker/cv-mouse-burrows<filename>mouse_burrows/hpc/templates/pass3_single.py
#!/usr/bin/env python2
from __future__ import division
import sys
import logging
{ADD_PYTHON_PATHS} # @UndefinedVariable
from numpy import array # @UnusedImport
from mouse_burrows.algorithm.pass3 import ThirdPass
from mouse_burrows.hpc.project import process_trials
from video.io.backend_ffmpeg import FFmpegError
# configure basic logging, which will be overwritten later
logging.basicConfig()
# set specific parameters for this job
parameters = {SPECIFIC_PARAMETERS} # @UndefinedVariable
# set job parameters
job_id = sys.argv[1]
parameters.update({{
'base_folder': "{JOB_DIRECTORY}",
'logging/folder': ".",
'output/folder': ".",
'resources/pass3/job_id': job_id,
}})
# do the second pass scan
for trial in process_trials("{LOG_FILE}" % job_id, 10):
try:
pass3 = ThirdPass("{NAME}", parameters=parameters, read_data=True)
pass3.process()
except FFmpegError:
print('FFmpeg error occurred. Continue.')
| [
1,
529,
276,
1112,
420,
29958,
29881,
16093,
29899,
7659,
6541,
29914,
11023,
29899,
15769,
29899,
8399,
5727,
29966,
9507,
29958,
15769,
29918,
8399,
5727,
29914,
29882,
6739,
29914,
20943,
29914,
3364,
29941,
29918,
14369,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29906,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
13,
13,
5215,
10876,
13,
5215,
12183,
13,
29912,
17744,
29918,
20055,
4690,
1164,
29918,
10145,
29903,
29913,
29871,
396,
732,
25263,
5598,
16174,
13,
13,
3166,
12655,
1053,
1409,
29871,
396,
732,
2525,
3880,
17518,
13,
13,
3166,
9495,
29918,
8399,
5727,
29889,
20567,
29889,
3364,
29941,
1053,
18008,
7129,
13,
3166,
9495,
29918,
8399,
5727,
29889,
29882,
6739,
29889,
4836,
1053,
1889,
29918,
3626,
1338,
13,
3166,
4863,
29889,
601,
29889,
27852,
29918,
600,
20856,
1053,
21379,
20856,
2392,
29871,
13,
13,
29937,
10822,
6996,
12183,
29892,
607,
674,
367,
975,
17625,
2678,
13,
21027,
29889,
16121,
3991,
580,
13,
13,
29937,
731,
2702,
4128,
363,
445,
4982,
13,
16744,
353,
426,
29903,
4162,
29907,
6545,
2965,
29918,
16320,
25797,
4945,
29903,
29913,
29871,
396,
732,
25263,
5598,
16174,
13,
13,
29937,
731,
4982,
4128,
13,
9057,
29918,
333,
353,
10876,
29889,
19218,
29961,
29896,
29962,
13,
16744,
29889,
5504,
3319,
29912,
13,
1678,
525,
3188,
29918,
12083,
2396,
29850,
29967,
14824,
29918,
4571,
26282,
18929,
17671,
13,
1678,
525,
21027,
29914,
12083,
2396,
11393,
613,
13,
1678,
525,
4905,
29914,
12083,
2396,
11393,
613,
13,
1678,
525,
13237,
29914,
3364,
29941,
29914,
9057,
29918,
333,
2396,
4982,
29918,
333,
29892,
13,
24289,
13,
13,
29937,
437,
278,
1473,
1209,
12812,
13,
1454,
14260,
297,
1889,
29918,
3626,
1338,
703,
29912,
14480,
29918,
7724,
5038,
1273,
4982,
29918,
333,
29892,
29871,
29896,
29900,
1125,
13,
1678,
1018,
29901,
13,
4706,
1209,
29941,
353,
18008,
7129,
703,
29912,
5813,
17671,
4128,
29922,
16744,
29892,
1303,
29918,
1272,
29922,
5574,
29897,
13,
4706,
1209,
29941,
29889,
5014,
580,
13,
1678,
5174,
21379,
20856,
2392,
29901,
13,
4706,
1596,
877,
4198,
20856,
1059,
10761,
29889,
2866,
14150,
29889,
1495,
13,
2
] |
autowrite/zmatrix.py | sjklipp/autochem_1219 | 0 | 151500 | """ z-matrix writers
"""
def write(syms, key_mat, name_mat, val_dct, mat_delim=' ', setval_sign='='):
""" write a z-matrix to a string
"""
mat_str = matrix_block(syms=syms, key_mat=key_mat, name_mat=name_mat,
delim=mat_delim)
setval_str = setval_block(val_dct=val_dct, setval_sign=setval_sign)
zma_str = '\n\n'.join((mat_str, setval_str))
return zma_str
def matrix_block(syms, key_mat, name_mat, delim=' '):
""" write the .zmat matrix block to a string
"""
def _line_string(row_idx):
line_str = '{:<2s} '.format(syms[row_idx])
keys = key_mat[row_idx]
names = name_mat[row_idx]
line_str += delim.join([
'{:>d}{}{:>5s} '.format(keys[col_idx], delim, names[col_idx])
for col_idx in range(min(row_idx, 3))])
return line_str
natms = len(syms)
mat_str = '\n'.join([_line_string(row_idx) for row_idx in range(natms)])
return mat_str
def setval_block(val_dct, setval_sign='='):
""" write the .zmat setval block to a string
"""
setval_str = '\n'.join([
'{:<5s}{}{:>11.6f}'.format(name, setval_sign, val)
for name, val in val_dct.items()])
return setval_str
| [
1,
9995,
503,
29899,
5344,
23550,
13,
15945,
29908,
13,
13,
13,
1753,
2436,
29898,
11967,
29879,
29892,
1820,
29918,
2922,
29892,
1024,
29918,
2922,
29892,
659,
29918,
29881,
312,
29892,
1775,
29918,
6144,
326,
2433,
13420,
731,
791,
29918,
4530,
2433,
2433,
1125,
13,
1678,
9995,
2436,
263,
503,
29899,
5344,
304,
263,
1347,
13,
1678,
9995,
13,
1678,
1775,
29918,
710,
353,
4636,
29918,
1271,
29898,
11967,
29879,
29922,
11967,
29879,
29892,
1820,
29918,
2922,
29922,
1989,
29918,
2922,
29892,
1024,
29918,
2922,
29922,
978,
29918,
2922,
29892,
13,
462,
965,
628,
326,
29922,
2922,
29918,
6144,
326,
29897,
13,
1678,
731,
791,
29918,
710,
353,
731,
791,
29918,
1271,
29898,
791,
29918,
29881,
312,
29922,
791,
29918,
29881,
312,
29892,
731,
791,
29918,
4530,
29922,
842,
791,
29918,
4530,
29897,
13,
1678,
503,
655,
29918,
710,
353,
11297,
29876,
29905,
29876,
4286,
7122,
3552,
2922,
29918,
710,
29892,
731,
791,
29918,
710,
876,
13,
1678,
736,
503,
655,
29918,
710,
13,
13,
13,
1753,
4636,
29918,
1271,
29898,
11967,
29879,
29892,
1820,
29918,
2922,
29892,
1024,
29918,
2922,
29892,
628,
326,
2433,
525,
1125,
13,
1678,
9995,
2436,
278,
869,
29920,
2922,
4636,
2908,
304,
263,
1347,
13,
1678,
9995,
13,
1678,
822,
903,
1220,
29918,
1807,
29898,
798,
29918,
13140,
1125,
13,
4706,
1196,
29918,
710,
353,
22372,
29901,
29966,
29906,
29879,
29913,
15300,
4830,
29898,
11967,
29879,
29961,
798,
29918,
13140,
2314,
13,
4706,
6611,
353,
1820,
29918,
2922,
29961,
798,
29918,
13140,
29962,
13,
4706,
2983,
353,
1024,
29918,
2922,
29961,
798,
29918,
13140,
29962,
13,
4706,
1196,
29918,
710,
4619,
628,
326,
29889,
7122,
4197,
13,
9651,
22372,
29901,
29958,
29881,
1157,
1157,
29901,
29958,
29945,
29879,
29913,
15300,
4830,
29898,
8149,
29961,
1054,
29918,
13140,
1402,
628,
326,
29892,
2983,
29961,
1054,
29918,
13140,
2314,
13,
9651,
363,
784,
29918,
13140,
297,
3464,
29898,
1195,
29898,
798,
29918,
13140,
29892,
29871,
29941,
876,
2314,
13,
4706,
736,
1196,
29918,
710,
13,
13,
1678,
14033,
1516,
353,
7431,
29898,
11967,
29879,
29897,
13,
1678,
1775,
29918,
710,
353,
11297,
29876,
4286,
7122,
4197,
29918,
1220,
29918,
1807,
29898,
798,
29918,
13140,
29897,
363,
1948,
29918,
13140,
297,
3464,
29898,
8924,
1516,
29897,
2314,
13,
1678,
736,
1775,
29918,
710,
13,
13,
13,
1753,
731,
791,
29918,
1271,
29898,
791,
29918,
29881,
312,
29892,
731,
791,
29918,
4530,
2433,
2433,
1125,
13,
1678,
9995,
2436,
278,
869,
29920,
2922,
731,
791,
2908,
304,
263,
1347,
13,
1678,
9995,
13,
1678,
731,
791,
29918,
710,
353,
11297,
29876,
4286,
7122,
4197,
13,
4706,
22372,
29901,
29966,
29945,
29879,
1157,
1157,
29901,
29958,
29896,
29896,
29889,
29953,
29888,
29913,
4286,
4830,
29898,
978,
29892,
731,
791,
29918,
4530,
29892,
659,
29897,
13,
4706,
363,
1024,
29892,
659,
297,
659,
29918,
29881,
312,
29889,
7076,
580,
2314,
13,
1678,
736,
731,
791,
29918,
710,
13,
2
] |
src/dataAccess/Connection.py | mattmillr/utaka | 1 | 9175 | <filename>src/dataAccess/Connection.py
#Copyright 2009 Humanitarian International Services Group
#
#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.
'''
Created Aug 4, 2009
connection pool abstraction over previous Connection.py which is now SingleConnection.py
sets up module scope connection pool, currently with no size limit
pool for both connections with dictionary cursors and regular cursors
reconnects to db every x hours depending on config file
@author: Andrew
'''
from utaka.src.dataAccess.SingleConnection import Connection as SingleConnection
import utaka.src.Config as Config
import MySQLdb
import datetime
dcp = [SingleConnection(True)]
rcp = [SingleConnection(False)]
dbTimer = datetime.datetime.today()
dbTimeout = datetime.timedelta(hours = int(Config.get('database', 'connection_timeout_in_hours')))
class Connection:
def __init__(self, useDictCursor = False):
if len(dcp) > 0:
if useDictCursor:
self.innerConn = dcp.pop()
else:
self.innerConn = rcp.pop()
now = datetime.datetime.today()
if (now - dbTimeout) > self.innerConn.connectTime:
self.innerConn.close()
self.innerConn = SingleConnection(useDictCursor)
else:
self.innerConn = SingleConnection(useDictCursor)
def usingDictCursor(self):
return self.innerConn.usingDictCursor()
def executeStatement(self, statement, placeholder):
return self.innerConn.executeStatement(statement, placeholder)
def getRowCount(self):
return self.innerConn.rowcount()
def commit(self):
self.innerConn.commit()
def rollback(self):
self.innerConn.rollback()
def close(self):
self.commit()
self.__close_()
def cancelAndClose(self):
self.rollback()
self.__close_()
def __close_(self):
utakaLog = open('/var/www/html/utaka/utakaLog', 'a')
try:
if self.usingDictCursor():
utakaLog.write('Dictionary Database Connection Returned to Pool\r\n')
else:
utakaLog.write('Regular Database Connection Returned to Pool\r\n')
finally:
utakaLog.close()
if self.usingDictCursor():
dcp.append(self.innerConn)
else:
rcp.append(self.innerConn)
self.innerConn = None
| [
1,
529,
9507,
29958,
4351,
29914,
1272,
6638,
29914,
5350,
29889,
2272,
13,
29937,
11882,
1266,
29871,
29906,
29900,
29900,
29929,
12968,
3673,
713,
4623,
15538,
6431,
13,
29937,
13,
29937,
29931,
293,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
6293,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
29937,
3492,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
259,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
29937,
13,
29937,
2525,
2222,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
5721,
7541,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
29937,
29956,
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,
13393,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
13400,
800,
1090,
278,
19245,
29889,
13,
13,
12008,
13,
20399,
22333,
29871,
29946,
29892,
29871,
29906,
29900,
29900,
29929,
13,
13,
9965,
11565,
27086,
428,
975,
3517,
15160,
29889,
2272,
607,
338,
1286,
16740,
5350,
29889,
2272,
13,
7224,
701,
3883,
6874,
3957,
11565,
29892,
5279,
411,
694,
2159,
4046,
13,
12,
10109,
363,
1716,
12368,
411,
8600,
18580,
943,
322,
4943,
18580,
943,
13,
276,
6915,
29879,
304,
4833,
1432,
921,
6199,
8679,
373,
2295,
934,
13,
29992,
8921,
29901,
11571,
13,
12008,
13,
13,
3166,
3477,
8245,
29889,
4351,
29889,
1272,
6638,
29889,
15771,
5350,
1053,
15160,
408,
16740,
5350,
13,
5215,
3477,
8245,
29889,
4351,
29889,
3991,
408,
12782,
13,
5215,
9254,
2585,
13,
5215,
12865,
13,
13,
29881,
6814,
353,
518,
15771,
5350,
29898,
5574,
4638,
13,
2214,
29886,
353,
518,
15771,
5350,
29898,
8824,
4638,
13,
2585,
14745,
353,
12865,
29889,
12673,
29889,
27765,
580,
13,
2585,
10851,
353,
12865,
29889,
9346,
287,
2554,
29898,
29882,
2470,
353,
938,
29898,
3991,
29889,
657,
877,
9803,
742,
525,
9965,
29918,
15619,
29918,
262,
29918,
29882,
2470,
29915,
4961,
13,
13,
1990,
15160,
29901,
13,
12,
1753,
4770,
2344,
12035,
1311,
29892,
671,
21533,
19890,
353,
7700,
1125,
13,
12,
12,
361,
7431,
29898,
29881,
6814,
29897,
1405,
29871,
29900,
29901,
13,
12,
12,
12,
361,
671,
21533,
19890,
29901,
13,
12,
12,
12,
12,
1311,
29889,
3993,
1168,
29876,
353,
270,
6814,
29889,
7323,
580,
13,
12,
12,
12,
2870,
29901,
13,
12,
12,
12,
12,
1311,
29889,
3993,
1168,
29876,
353,
364,
6814,
29889,
7323,
580,
13,
12,
12,
12,
3707,
353,
12865,
29889,
12673,
29889,
27765,
580,
13,
12,
12,
12,
361,
313,
3707,
448,
4833,
10851,
29897,
1405,
1583,
29889,
3993,
1168,
29876,
29889,
6915,
2481,
29901,
13,
12,
12,
12,
12,
1311,
29889,
3993,
1168,
29876,
29889,
5358,
580,
13,
12,
12,
12,
12,
1311,
29889,
3993,
1168,
29876,
353,
16740,
5350,
29898,
1509,
21533,
19890,
29897,
13,
12,
12,
2870,
29901,
13,
12,
12,
12,
1311,
29889,
3993,
1168,
29876,
353,
16740,
5350,
29898,
1509,
21533,
19890,
29897,
13,
13,
12,
1753,
773,
21533,
19890,
29898,
1311,
1125,
13,
12,
12,
2457,
1583,
29889,
3993,
1168,
29876,
29889,
4746,
21533,
19890,
580,
13,
13,
12,
1753,
6222,
14473,
29898,
1311,
29892,
3229,
29892,
12983,
1125,
13,
12,
12,
2457,
1583,
29889,
3993,
1168,
29876,
29889,
7978,
14473,
29898,
20788,
29892,
12983,
29897,
13,
13,
12,
1753,
679,
4301,
3981,
29898,
1311,
1125,
13,
12,
12,
2457,
1583,
29889,
3993,
1168,
29876,
29889,
798,
2798,
580,
13,
13,
12,
1753,
9063,
29898,
1311,
1125,
13,
12,
12,
1311,
29889,
3993,
1168,
29876,
29889,
15060,
580,
13,
12,
12,
13,
12,
1753,
9679,
1627,
29898,
1311,
1125,
13,
12,
12,
1311,
29889,
3993,
1168,
29876,
29889,
1245,
1627,
580,
13,
12,
12,
13,
12,
1753,
3802,
29898,
1311,
1125,
13,
12,
12,
1311,
29889,
15060,
580,
13,
12,
12,
1311,
17255,
5358,
29918,
580,
13,
12,
13,
12,
1753,
12611,
2855,
11123,
29898,
1311,
1125,
13,
12,
12,
1311,
29889,
1245,
1627,
580,
13,
12,
12,
1311,
17255,
5358,
29918,
580,
13,
13,
12,
1753,
4770,
5358,
23538,
1311,
1125,
13,
12,
12,
329,
8245,
3403,
353,
1722,
11219,
1707,
29914,
1636,
29914,
1420,
29914,
329,
8245,
29914,
329,
8245,
3403,
742,
525,
29874,
1495,
13,
12,
12,
2202,
29901,
13,
12,
12,
12,
361,
1583,
29889,
4746,
21533,
19890,
7295,
13,
12,
12,
12,
12,
329,
8245,
3403,
29889,
3539,
877,
11513,
5470,
15160,
7106,
287,
304,
28625,
29905,
29878,
29905,
29876,
1495,
13,
12,
12,
12,
2870,
29901,
13,
12,
12,
12,
12,
329,
8245,
3403,
29889,
3539,
877,
4597,
1070,
5470,
15160,
7106,
287,
304,
28625,
29905,
29878,
29905,
29876,
1495,
13,
12,
12,
4951,
635,
29901,
13,
12,
12,
12,
329,
8245,
3403,
29889,
5358,
580,
13,
12,
12,
361,
1583,
29889,
4746,
21533,
19890,
7295,
13,
12,
12,
12,
29881,
6814,
29889,
4397,
29898,
1311,
29889,
3993,
1168,
29876,
29897,
13,
12,
12,
2870,
29901,
13,
12,
12,
12,
2214,
29886,
29889,
4397,
29898,
1311,
29889,
3993,
1168,
29876,
29897,
13,
12,
12,
1311,
29889,
3993,
1168,
29876,
353,
6213,
13,
2
] |
pyutils/timing.py | eltrompetero/maxent_fim | 0 | 168847 | # Module for timing.
# Author: <NAME>, <EMAIL>
from .fim import *
import timeit
n = 6
hJ = np.concatenate((np.zeros(n), np.random.normal(scale=.3, size=n*(n-1)//2)))
def example():
isingdkl = IsingFisherCurvatureMethod2(n, h=hJ[:n], J=hJ[n:])
isingdkl.maj_curvature(n_cpus=1)
| [
1,
396,
15591,
363,
28750,
29889,
13,
29937,
13361,
29901,
529,
5813,
10202,
529,
26862,
6227,
29958,
13,
3166,
869,
29888,
326,
1053,
334,
13,
5215,
931,
277,
29871,
13,
29876,
353,
29871,
29953,
13,
29882,
29967,
353,
7442,
29889,
535,
29883,
2579,
403,
3552,
9302,
29889,
3298,
359,
29898,
29876,
511,
7442,
29889,
8172,
29889,
8945,
29898,
7052,
21098,
29941,
29892,
2159,
29922,
29876,
16395,
29876,
29899,
29896,
29897,
458,
29906,
4961,
13,
13,
13,
1753,
1342,
7295,
13,
1678,
338,
292,
29881,
6321,
353,
1317,
292,
29943,
22154,
23902,
29894,
1535,
4062,
29906,
29898,
29876,
29892,
298,
29922,
29882,
29967,
7503,
29876,
1402,
435,
29922,
29882,
29967,
29961,
29876,
29901,
2314,
13,
1678,
338,
292,
29881,
6321,
29889,
655,
29926,
29918,
2764,
29894,
1535,
29898,
29876,
29918,
6814,
375,
29922,
29896,
29897,
13,
2
] |
BleVibrationDevice.py | Suitceyes-Project-Code/Vibration-Pattern-Player | 0 | 31723 | from bluepy.btle import UUID, Peripheral
from VestDeviceBase import VestDevice
class BleVestDevice(VestDevice):
def __init__(self, deviceAddr):
try:
self._peripheral = Peripheral(deviceAddr)
serviceUUID = UUID("713d0000-503e-4c75-ba94-3148f18d941e")
characteristicUUID = UUID("713d0003-503e-4c75-ba94-3148f18d941e")
s = self._peripheral.getServiceByUUID(serviceUUID)
self._characteristic = s.getCharacteristics(characteristicUUID)[0]
except Exception as e:
print("Error: " + str(e))
def __isValidState(self):
return self._peripheral.getState() == "conn"
def __write(self, byteArr):
self._peripheral.writeCharacteristic(self._characteristic.getHandle(), byteArr)
def set_pin(self, index, intensity):
"""Sets a pin to a given intensity.
index: an integer from 0 - 6
intensity: an integer from 0 - 255
"""
if self.__isValidState():
rList=[0,index,intensity]
self.__write(bytes(rList))
def set_frequency(self,frequency):
"""Sets the frequency of the entire vest.
frequency.
"""
if self.__isValidState():
rList=[4, frequency & (255), (frequency & (255 << 8)) >> 8, (frequency & (255 << 16)) >> 16, (frequency & (255 << 24)) >> 24]
b = bytes(rList)
self.__write(b)
def mute(self):
"""Stops all motors on the vest from vibrating"""
if self.__isValidState():
rList=[3]
self.__write(bytes(rList))
def set_motor(self,index,rotation):
"""
Sets a given motor index to a given target rotation.
"""
if self.__isValidState():
rList = [11,index,rotation]
self.__write(bytes(rList))
def set_motor_speed(self,speed):
"""
Changes how long it takes to move 1 degree per millisecond.
"""
if speed <= 0:
raise ValueError("speed must be greater than 0.")
rList = [12,speed]
self.__write(bytes(rList))
def set_pins_batched(self, values = dict):
for pin in values:
self.set_pin(pin, values[pin]) | [
1,
515,
7254,
2272,
29889,
3116,
280,
1053,
501,
11150,
29892,
2431,
29875,
8096,
284,
13,
3166,
478,
342,
11501,
5160,
1053,
478,
342,
11501,
13,
13,
1990,
24718,
29963,
342,
11501,
29898,
29963,
342,
11501,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4742,
2528,
29878,
1125,
13,
4706,
1018,
29901,
13,
9651,
1583,
3032,
546,
29875,
8096,
284,
353,
2431,
29875,
8096,
284,
29898,
10141,
2528,
29878,
29897,
13,
9651,
2669,
29965,
11150,
353,
501,
11150,
703,
29955,
29896,
29941,
29881,
29900,
29900,
29900,
29900,
29899,
29945,
29900,
29941,
29872,
29899,
29946,
29883,
29955,
29945,
29899,
2291,
29929,
29946,
29899,
29941,
29896,
29946,
29947,
29888,
29896,
29947,
29881,
29929,
29946,
29896,
29872,
1159,
13,
9651,
17443,
29965,
11150,
353,
501,
11150,
703,
29955,
29896,
29941,
29881,
29900,
29900,
29900,
29941,
29899,
29945,
29900,
29941,
29872,
29899,
29946,
29883,
29955,
29945,
29899,
2291,
29929,
29946,
29899,
29941,
29896,
29946,
29947,
29888,
29896,
29947,
29881,
29929,
29946,
29896,
29872,
1159,
13,
9651,
269,
353,
1583,
3032,
546,
29875,
8096,
284,
29889,
657,
3170,
2059,
29965,
11150,
29898,
5509,
29965,
11150,
29897,
13,
9651,
1583,
3032,
18609,
4695,
353,
269,
29889,
657,
20755,
6765,
29898,
18609,
4695,
29965,
11150,
9601,
29900,
29962,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1596,
703,
2392,
29901,
376,
718,
851,
29898,
29872,
876,
13,
632,
13,
1678,
822,
4770,
275,
7211,
2792,
29898,
1311,
1125,
308,
13,
4706,
736,
1583,
3032,
546,
29875,
8096,
284,
29889,
657,
2792,
580,
1275,
376,
13082,
29908,
13,
268,
13,
1678,
822,
4770,
3539,
29898,
1311,
29892,
7023,
16401,
1125,
13,
4706,
1583,
3032,
546,
29875,
8096,
284,
29889,
3539,
20755,
4695,
29898,
1311,
3032,
18609,
4695,
29889,
657,
13554,
3285,
7023,
16401,
29897,
13,
632,
13,
1678,
822,
731,
29918,
12687,
29898,
1311,
29892,
2380,
29892,
26171,
1125,
13,
4706,
9995,
29903,
1691,
263,
12534,
304,
263,
2183,
26171,
29889,
13,
4706,
2380,
29901,
385,
6043,
515,
29871,
29900,
448,
29871,
29953,
13,
4706,
26171,
29901,
385,
6043,
515,
29871,
29900,
448,
29871,
29906,
29945,
29945,
13,
4706,
9995,
13,
4706,
565,
1583,
17255,
275,
7211,
2792,
7295,
13,
9651,
364,
1293,
11759,
29900,
29892,
2248,
29892,
524,
575,
537,
29962,
13,
9651,
1583,
17255,
3539,
29898,
13193,
29898,
29878,
1293,
876,
13,
632,
13,
1678,
822,
731,
29918,
10745,
23860,
29898,
1311,
29892,
10745,
23860,
1125,
13,
4706,
9995,
29903,
1691,
278,
10868,
310,
278,
4152,
16779,
29889,
13,
4706,
10868,
29889,
13,
4706,
9995,
13,
4706,
565,
1583,
17255,
275,
7211,
2792,
7295,
13,
9651,
364,
1293,
11759,
29946,
29892,
10868,
669,
313,
29906,
29945,
29945,
511,
313,
10745,
23860,
669,
313,
29906,
29945,
29945,
3532,
29871,
29947,
876,
5099,
29871,
29947,
29892,
313,
10745,
23860,
669,
313,
29906,
29945,
29945,
3532,
29871,
29896,
29953,
876,
5099,
29871,
29896,
29953,
29892,
313,
10745,
23860,
669,
313,
29906,
29945,
29945,
3532,
29871,
29906,
29946,
876,
5099,
29871,
29906,
29946,
29962,
13,
9651,
289,
353,
6262,
29898,
29878,
1293,
29897,
13,
9651,
1583,
17255,
3539,
29898,
29890,
29897,
13,
268,
13,
1678,
822,
286,
1082,
29898,
1311,
1125,
13,
4706,
9995,
855,
3554,
599,
3184,
943,
373,
278,
16779,
515,
325,
4626,
1218,
15945,
29908,
13,
4706,
565,
1583,
17255,
275,
7211,
2792,
7295,
13,
9651,
364,
1293,
11759,
29941,
29962,
13,
9651,
1583,
17255,
3539,
29898,
13193,
29898,
29878,
1293,
876,
13,
268,
13,
1678,
822,
731,
29918,
14817,
272,
29898,
1311,
29892,
2248,
29892,
5450,
362,
1125,
13,
4706,
9995,
13,
4706,
317,
1691,
263,
2183,
10992,
2380,
304,
263,
2183,
3646,
13733,
29889,
13,
4706,
9995,
13,
4706,
565,
1583,
17255,
275,
7211,
2792,
7295,
13,
9651,
364,
1293,
353,
518,
29896,
29896,
29892,
2248,
29892,
5450,
362,
29962,
13,
9651,
1583,
17255,
3539,
29898,
13193,
29898,
29878,
1293,
876,
13,
632,
13,
1678,
822,
731,
29918,
14817,
272,
29918,
19322,
29898,
1311,
29892,
19322,
1125,
13,
4706,
9995,
13,
4706,
678,
6916,
920,
1472,
372,
4893,
304,
4337,
29871,
29896,
7426,
639,
3533,
18802,
29889,
13,
4706,
9995,
13,
4706,
565,
6210,
5277,
29871,
29900,
29901,
13,
9651,
12020,
7865,
2392,
703,
19322,
1818,
367,
7621,
1135,
29871,
29900,
23157,
13,
4706,
364,
1293,
353,
518,
29896,
29906,
29892,
19322,
29962,
13,
4706,
1583,
17255,
3539,
29898,
13193,
29898,
29878,
1293,
876,
13,
13,
1678,
822,
731,
29918,
29886,
1144,
29918,
16175,
287,
29898,
1311,
29892,
1819,
353,
9657,
1125,
13,
4706,
363,
12534,
297,
1819,
29901,
13,
9651,
1583,
29889,
842,
29918,
12687,
29898,
12687,
29892,
1819,
29961,
12687,
2314,
2
] |
modred/tests/testera.py | shubhamKGIT/modred | 0 | 31290 | #!/usr/bin/env python
"""Test era module"""
import unittest
import os
from os.path import join
from shutil import rmtree
import numpy as np
from modred import era, parallel, util
from modred.py2to3 import range
def make_time_steps(num_steps, interval):
"""Helper function to find array of integer time steps.
Args:
num_steps: integer number of time steps to create.
interval: interval between pairs of time steps, as shown above.
Returns:
time_steps: array of integers, time steps [0 1 interval interval+1 ...]
"""
if num_steps % 2 != 0:
raise ValueError('num_steps, %d, must be even'%num_steps)
interval = int(interval)
time_steps = np.zeros(num_steps, dtype=int)
time_steps[::2] = interval*np.arange(num_steps/2)
time_steps[1::2] = 1 + interval*np.arange(num_steps/2)
return time_steps
@unittest.skipIf(parallel.is_distributed(), 'Only test ERA in serial')
class testERA(unittest.TestCase):
def setUp(self):
if not os.access('.', os.W_OK):
raise RuntimeError('Cannot write to current directory')
self.test_dir = 'files_ERA_DELETE_ME'
if not os.path.exists(self.test_dir):
os.mkdir(self.test_dir)
self.impulse_file_path = join(self.test_dir, 'impulse_input%03d.txt')
def tearDown(self):
"""Deletes all of the arrays created by the tests"""
rmtree(self.test_dir, ignore_errors=True)
<EMAIL>('Testing others')
def test_make_sampled_format(self):
"""
Test that can give time_values and outputs in either format.
First tests format [0, 1, P, P+1, ...] and if there is a wrong time
value.
Then tests [0, 1, 2, 3, ...] format.
"""
for num_inputs in [1, 3]:
for num_outputs in [1, 2, 4]:
for num_time_steps in [4, 10, 12]:
# Generate data
# P=2 format [0, 1, 2, 3, ...]
sample_interval = 2
dt_system = np.random.random()
dt_sample = sample_interval * dt_system
outputs = np.random.random(
(num_time_steps, num_outputs, num_inputs))
time_steps = make_time_steps(
num_time_steps, sample_interval)
time_values = time_steps * dt_system
# Compute using modred
my_ERA = era.ERA()
time_steps_computed, outputs_computed =\
era.make_sampled_format(time_values, outputs)
#self.assertEqual(dt_system_computed, dt_system)
# Reference values
num_time_steps_true = (num_time_steps - 1) * 2
time_steps_true = make_time_steps(num_time_steps_true, 1)
outputs_true = np.zeros(
(num_time_steps_true, num_outputs, num_inputs))
outputs_true[::2] = outputs[:-1]
outputs_true[1::2] = outputs[1:]
# Compare values
np.testing.assert_equal(
time_steps_computed, time_steps_true)
np.testing.assert_equal(outputs_computed, outputs_true)
# Test that if there is a wrong time value, get an error
time_values[num_time_steps // 2] = -1
self.assertRaises(
ValueError, era.make_sampled_format, time_values,
outputs)
<EMAIL>("testing others")
def test_assemble_Hankel(self):
""" Tests Hankel arrays are symmetric given
``[CB CAB CA**P CA**(P+1)B ...]``."""
rtol = 1e-10
atol = 1e-12
for num_inputs in [1,3]:
for num_outputs in [1, 2, 4]:
for sample_interval in [1]:
num_time_steps = 50
num_states = 5
A, B, C = util.drss(num_states, num_inputs, num_outputs)
time_steps = make_time_steps(
num_time_steps, sample_interval)
Markovs = util.impulse(A, B, C, time_steps[-1] + 1)
Markovs = Markovs[time_steps]
if sample_interval == 2:
time_steps, Markovs = era.make_sampled_format(
time_steps, Markovs)
my_ERA = era.ERA(verbosity=0)
my_ERA._set_Markovs(Markovs)
my_ERA._assemble_Hankel()
H = my_ERA.Hankel_array
Hp = my_ERA.Hankel_array2
for row in range(my_ERA.mc):
for col in range(my_ERA.mo):
np.testing.assert_equal(
H[row * num_outputs:(row + 1) * num_outputs,
col * num_inputs:(col + 1) * num_inputs],
H[col * num_outputs:(col + 1) * num_outputs,
row * num_inputs:(row + 1) * num_inputs])
np.testing.assert_equal(
Hp[row * num_outputs:(row + 1) * num_outputs,
col * num_inputs:(col + 1) * num_inputs],
Hp[col * num_outputs:(col + 1) * num_outputs,
row * num_inputs:(row + 1) * num_inputs])
np.testing.assert_allclose(
H[row * num_outputs:(row + 1) * num_outputs,
col * num_inputs:(col + 1) * num_inputs],
C.dot(
np.linalg.matrix_power(
A, time_steps[(row + col) * 2]).dot(
B)),
rtol=rtol, atol=atol)
np.testing.assert_allclose(
Hp[row * num_outputs:(row + 1) * num_outputs,
col * num_inputs:(col + 1) * num_inputs],
C.dot(
np.linalg.matrix_power(
A, time_steps[(row + col) * 2 + 1]).dot(
B)),
rtol=rtol, atol=atol)
<EMAIL>('testing others')
def test_compute_model(self):
"""
Test ROM Markov params similar to those given
- generates data
- assembles Hankel array
- computes SVD
- forms the ROM discrete arrays A, B, and C (D = 0)
- Tests Markov parameters from ROM are approx. equal to full plant's
"""
num_time_steps = 40
num_states_plant = 12
num_states_model = num_states_plant // 3
for num_inputs in [1, 3]:
for num_outputs in [1, 2]:
for sample_interval in [1, 2, 4]:
time_steps = make_time_steps(
num_time_steps, sample_interval)
A, B, C = util.drss(
num_states_plant, num_inputs, num_outputs)
my_ERA = era.ERA(verbosity=0)
Markovs = util.impulse(A, B, C, time_steps[-1] + 1)
Markovs = Markovs[time_steps]
if sample_interval == 2:
time_steps, Markovs =\
era.make_sampled_format(time_steps, Markovs)
num_time_steps = time_steps.shape[0]
A_path_computed = join(self.test_dir, 'A_computed.txt')
B_path_computed = join(self.test_dir, 'B_computed.txt')
C_path_computed = join(self.test_dir, 'C_computed.txt')
A, B, C = my_ERA.compute_model(Markovs, num_states_model)
my_ERA.put_model(
A_path_computed, B_path_computed, C_path_computed)
#sing_vals = my_ERA.sing_vals[:num_states_model]
# Flatten vecs into 2D X and Y arrays:
# [B AB A**PB A**(P+1)B ...]
#direct_vecs_flat = direct_vecs.swapaxes(0,1).reshape(
# (num_states_model,-1)))
# Exact grammians from Lyapunov eqn solve
#gram_cont = util.solve_Lyapunov(A, B*B.H)
#gram_obs = util.solve_Lyapunov(A.H, C.H*C)
#print(np.sort(np.linalg.eig(gram_cont)[0])[::-1])
#print(sing_vals)
#np.testing.assert_allclose(gram_cont.diagonal(),
# sing_vals, atol=.1, rtol=.1)
#np.testing.assert_allclose(gram_obs.diagonal(),
# sing_vals, atol=.1, rtol=.1)
#np.testing.assert_allclose(np.sort(np.linalg.eig(
# gram_cont)[0])[::-1], sing_vals,
# atol=.1, rtol=.1)
#np.testing.assert_allclose(np.sort(np.linalg.eig(
# gram_obs)[0])[::-1], sing_vals,
# atol=.1, rtol=.1)
# Check that the diagonals are largest entry on each row
#self.assertTrue((np.max(np.abs(gram_cont),axis=1) ==
# np.abs(gram_cont.diagonal())).all())
#self.assertTrue((np.max(np.abs(gram_obs),axis=1) ==
# np.abs(gram_obs.diagonal())).all())
# Check the ROM Markov params match the full plant's
Markovs_model = np.zeros(Markovs.shape)
for ti, tv in enumerate(time_steps):
Markovs_model[ti] = C.dot(
np.linalg.matrix_power(A, tv).dot(
B))
#print(
# 'Computing ROM Markov param at time step %d' % tv)
"""
import matplotlib.pyplot as PLT
for input_num in range(num_inputs):
PLT.figure()
PLT.hold(True)
for output_num in range(num_outputs):
PLT.plot(time_steps[:50],
# Markovs_model[:50, output_num,input_num], 'ko')
PLT.plot(time_steps[:50],Markovs[:50,
# output_num, input_num],'rx')
PLT.plot(time_steps_dense[:50],
# Markovs_dense[:50, output_num, input_num],'b--')
PLT.title('input %d to outputs'%input_num)
PLT.legend(['ROM','Plant','Dense plant'])
PLT.show()
"""
np.testing.assert_allclose(
Markovs_model.squeeze(), Markovs.squeeze(),
rtol=0.5, atol=0.5)
np.testing.assert_equal(
util.load_array_text(A_path_computed), A)
np.testing.assert_equal(
util.load_array_text(B_path_computed), B)
np.testing.assert_equal(
util.load_array_text(C_path_computed), C)
if __name__ == '__main__':
unittest.main()
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
15945,
29908,
3057,
3152,
3883,
15945,
29908,
13,
5215,
443,
27958,
13,
5215,
2897,
13,
3166,
2897,
29889,
2084,
1053,
5988,
13,
3166,
528,
4422,
1053,
364,
4378,
929,
13,
13,
5215,
12655,
408,
7442,
13,
13,
3166,
878,
1127,
1053,
3152,
29892,
8943,
29892,
3667,
13,
3166,
878,
1127,
29889,
2272,
29906,
517,
29941,
1053,
3464,
13,
13,
13,
1753,
1207,
29918,
2230,
29918,
24530,
29898,
1949,
29918,
24530,
29892,
7292,
1125,
13,
1678,
9995,
10739,
740,
304,
1284,
1409,
310,
6043,
931,
6576,
29889,
13,
13,
1678,
826,
3174,
29901,
13,
4706,
954,
29918,
24530,
29901,
6043,
1353,
310,
931,
6576,
304,
1653,
29889,
13,
13,
4706,
7292,
29901,
7292,
1546,
11000,
310,
931,
6576,
29892,
408,
4318,
2038,
29889,
13,
13,
1678,
16969,
29901,
13,
4706,
931,
29918,
24530,
29901,
1409,
310,
11920,
29892,
931,
6576,
518,
29900,
29871,
29896,
7292,
7292,
29974,
29896,
2023,
29962,
13,
1678,
9995,
13,
1678,
565,
954,
29918,
24530,
1273,
29871,
29906,
2804,
29871,
29900,
29901,
13,
4706,
12020,
7865,
2392,
877,
1949,
29918,
24530,
29892,
1273,
29881,
29892,
1818,
367,
1584,
29915,
29995,
1949,
29918,
24530,
29897,
13,
1678,
7292,
353,
938,
29898,
19207,
29897,
13,
1678,
931,
29918,
24530,
353,
7442,
29889,
3298,
359,
29898,
1949,
29918,
24530,
29892,
26688,
29922,
524,
29897,
13,
1678,
931,
29918,
24530,
29961,
1057,
29906,
29962,
353,
7292,
29930,
9302,
29889,
279,
927,
29898,
1949,
29918,
24530,
29914,
29906,
29897,
13,
1678,
931,
29918,
24530,
29961,
29896,
1057,
29906,
29962,
353,
29871,
29896,
718,
7292,
29930,
9302,
29889,
279,
927,
29898,
1949,
29918,
24530,
29914,
29906,
29897,
13,
1678,
736,
931,
29918,
24530,
13,
13,
13,
29992,
348,
27958,
29889,
11014,
3644,
29898,
23482,
29889,
275,
29918,
5721,
7541,
3285,
525,
11730,
1243,
382,
4717,
297,
7797,
1495,
13,
1990,
1243,
1001,
29909,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
565,
451,
2897,
29889,
5943,
12839,
742,
2897,
29889,
29956,
29918,
8949,
1125,
13,
9651,
12020,
24875,
2392,
877,
29089,
2436,
304,
1857,
3884,
1495,
13,
4706,
1583,
29889,
1688,
29918,
3972,
353,
525,
5325,
29918,
1001,
29909,
29918,
2287,
18476,
29918,
2303,
29915,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
1311,
29889,
1688,
29918,
3972,
1125,
13,
9651,
2897,
29889,
11256,
3972,
29898,
1311,
29889,
1688,
29918,
3972,
29897,
13,
4706,
1583,
29889,
6574,
19994,
29918,
1445,
29918,
2084,
353,
5988,
29898,
1311,
29889,
1688,
29918,
3972,
29892,
525,
6574,
19994,
29918,
2080,
29995,
29900,
29941,
29881,
29889,
3945,
1495,
13,
13,
13,
1678,
822,
734,
279,
6767,
29898,
1311,
1125,
13,
4706,
9995,
2772,
1026,
267,
599,
310,
278,
7049,
2825,
491,
278,
6987,
15945,
29908,
13,
4706,
364,
4378,
929,
29898,
1311,
29889,
1688,
29918,
3972,
29892,
11455,
29918,
12523,
29922,
5574,
29897,
13,
13,
13,
1678,
529,
26862,
6227,
29958,
877,
3057,
292,
4045,
1495,
13,
1678,
822,
1243,
29918,
5675,
29918,
11249,
29881,
29918,
4830,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
4321,
393,
508,
2367,
931,
29918,
5975,
322,
14391,
297,
2845,
3402,
29889,
13,
13,
4706,
3824,
6987,
3402,
518,
29900,
29892,
29871,
29896,
29892,
349,
29892,
349,
29974,
29896,
29892,
2023,
29962,
322,
565,
727,
338,
263,
2743,
931,
13,
4706,
995,
29889,
13,
4706,
1987,
6987,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
2023,
29962,
3402,
29889,
13,
4706,
9995,
13,
4706,
363,
954,
29918,
2080,
29879,
297,
518,
29896,
29892,
29871,
29941,
5387,
13,
9651,
363,
954,
29918,
4905,
29879,
297,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29946,
5387,
13,
18884,
363,
954,
29918,
2230,
29918,
24530,
297,
518,
29946,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29906,
5387,
13,
462,
1678,
396,
3251,
403,
848,
13,
462,
1678,
396,
349,
29922,
29906,
3402,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
2023,
29962,
13,
462,
1678,
4559,
29918,
19207,
353,
29871,
29906,
13,
462,
1678,
11636,
29918,
5205,
353,
7442,
29889,
8172,
29889,
8172,
580,
13,
462,
1678,
11636,
29918,
11249,
353,
4559,
29918,
19207,
334,
11636,
29918,
5205,
13,
462,
1678,
14391,
353,
7442,
29889,
8172,
29889,
8172,
29898,
13,
462,
4706,
313,
1949,
29918,
2230,
29918,
24530,
29892,
954,
29918,
4905,
29879,
29892,
954,
29918,
2080,
29879,
876,
13,
462,
1678,
931,
29918,
24530,
353,
1207,
29918,
2230,
29918,
24530,
29898,
13,
462,
4706,
954,
29918,
2230,
29918,
24530,
29892,
4559,
29918,
19207,
29897,
13,
462,
1678,
931,
29918,
5975,
353,
931,
29918,
24530,
334,
11636,
29918,
5205,
13,
13,
462,
1678,
396,
11796,
29872,
773,
878,
1127,
13,
462,
1678,
590,
29918,
1001,
29909,
353,
3152,
29889,
1001,
29909,
580,
13,
462,
1678,
931,
29918,
24530,
29918,
12097,
287,
29892,
14391,
29918,
12097,
287,
17313,
13,
462,
4706,
3152,
29889,
5675,
29918,
11249,
29881,
29918,
4830,
29898,
2230,
29918,
5975,
29892,
14391,
29897,
13,
462,
1678,
396,
1311,
29889,
9294,
9843,
29898,
6008,
29918,
5205,
29918,
12097,
287,
29892,
11636,
29918,
5205,
29897,
13,
13,
462,
1678,
396,
12105,
1819,
13,
462,
1678,
954,
29918,
2230,
29918,
24530,
29918,
3009,
353,
313,
1949,
29918,
2230,
29918,
24530,
448,
29871,
29896,
29897,
334,
29871,
29906,
13,
462,
1678,
931,
29918,
24530,
29918,
3009,
353,
1207,
29918,
2230,
29918,
24530,
29898,
1949,
29918,
2230,
29918,
24530,
29918,
3009,
29892,
29871,
29896,
29897,
13,
462,
1678,
14391,
29918,
3009,
353,
7442,
29889,
3298,
359,
29898,
13,
462,
4706,
313,
1949,
29918,
2230,
29918,
24530,
29918,
3009,
29892,
954,
29918,
4905,
29879,
29892,
954,
29918,
2080,
29879,
876,
13,
462,
1678,
14391,
29918,
3009,
29961,
1057,
29906,
29962,
353,
14391,
7503,
29899,
29896,
29962,
13,
462,
1678,
14391,
29918,
3009,
29961,
29896,
1057,
29906,
29962,
353,
14391,
29961,
29896,
17531,
13,
13,
462,
1678,
396,
3831,
598,
1819,
13,
462,
1678,
7442,
29889,
13424,
29889,
9294,
29918,
11745,
29898,
13,
462,
4706,
931,
29918,
24530,
29918,
12097,
287,
29892,
931,
29918,
24530,
29918,
3009,
29897,
13,
462,
1678,
7442,
29889,
13424,
29889,
9294,
29918,
11745,
29898,
4905,
29879,
29918,
12097,
287,
29892,
14391,
29918,
3009,
29897,
13,
13,
462,
1678,
396,
4321,
393,
565,
727,
338,
263,
2743,
931,
995,
29892,
679,
385,
1059,
13,
462,
1678,
931,
29918,
5975,
29961,
1949,
29918,
2230,
29918,
24530,
849,
29871,
29906,
29962,
353,
448,
29896,
13,
462,
1678,
1583,
29889,
9294,
29934,
1759,
267,
29898,
13,
462,
4706,
7865,
2392,
29892,
3152,
29889,
5675,
29918,
11249,
29881,
29918,
4830,
29892,
931,
29918,
5975,
29892,
13,
462,
4706,
14391,
29897,
13,
13,
13,
1678,
529,
26862,
6227,
29958,
703,
13424,
4045,
1159,
13,
1678,
822,
1243,
29918,
465,
6967,
29918,
29950,
804,
295,
29898,
1311,
1125,
13,
4706,
9995,
4321,
29879,
379,
804,
295,
7049,
526,
18348,
2183,
13,
4706,
4954,
29961,
21685,
315,
2882,
12766,
1068,
29925,
12766,
1068,
29898,
29925,
29974,
29896,
29897,
29933,
2023,
7961,
29952,
1213,
15945,
13,
4706,
364,
25027,
353,
29871,
29896,
29872,
29899,
29896,
29900,
13,
4706,
472,
324,
353,
29871,
29896,
29872,
29899,
29896,
29906,
13,
4706,
363,
954,
29918,
2080,
29879,
297,
518,
29896,
29892,
29941,
5387,
13,
9651,
363,
954,
29918,
4905,
29879,
297,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29946,
5387,
13,
18884,
363,
4559,
29918,
19207,
297,
518,
29896,
5387,
13,
462,
1678,
954,
29918,
2230,
29918,
24530,
353,
29871,
29945,
29900,
13,
462,
1678,
954,
29918,
28631,
353,
29871,
29945,
13,
462,
1678,
319,
29892,
350,
29892,
315,
353,
3667,
29889,
7707,
893,
29898,
1949,
29918,
28631,
29892,
954,
29918,
2080,
29879,
29892,
954,
29918,
4905,
29879,
29897,
13,
462,
1678,
931,
29918,
24530,
353,
1207,
29918,
2230,
29918,
24530,
29898,
13,
462,
4706,
954,
29918,
2230,
29918,
24530,
29892,
4559,
29918,
19207,
29897,
13,
462,
1678,
4485,
586,
29879,
353,
3667,
29889,
6574,
19994,
29898,
29909,
29892,
350,
29892,
315,
29892,
931,
29918,
24530,
14352,
29896,
29962,
718,
29871,
29896,
29897,
13,
462,
1678,
4485,
586,
29879,
353,
4485,
586,
29879,
29961,
2230,
29918,
24530,
29962,
13,
13,
462,
1678,
565,
4559,
29918,
19207,
1275,
29871,
29906,
29901,
13,
462,
4706,
931,
29918,
24530,
29892,
4485,
586,
29879,
353,
3152,
29889,
5675,
29918,
11249,
29881,
29918,
4830,
29898,
13,
462,
9651,
931,
29918,
24530,
29892,
4485,
586,
29879,
29897,
13,
13,
462,
1678,
590,
29918,
1001,
29909,
353,
3152,
29889,
1001,
29909,
29898,
18248,
359,
537,
29922,
29900,
29897,
13,
462,
1678,
590,
29918,
1001,
29909,
3032,
842,
29918,
9802,
586,
29879,
29898,
9802,
586,
29879,
29897,
13,
462,
1678,
590,
29918,
1001,
29909,
3032,
465,
6967,
29918,
29950,
804,
295,
580,
13,
462,
1678,
379,
353,
590,
29918,
1001,
29909,
29889,
29950,
804,
295,
29918,
2378,
13,
462,
1678,
379,
29886,
353,
590,
29918,
1001,
29909,
29889,
29950,
804,
295,
29918,
2378,
29906,
13,
13,
462,
1678,
363,
1948,
297,
3464,
29898,
1357,
29918,
1001,
29909,
29889,
14047,
1125,
13,
462,
4706,
363,
784,
297,
3464,
29898,
1357,
29918,
1001,
29909,
29889,
4346,
1125,
13,
462,
9651,
7442,
29889,
13424,
29889,
9294,
29918,
11745,
29898,
13,
462,
18884,
379,
29961,
798,
334,
954,
29918,
4905,
29879,
5919,
798,
718,
29871,
29896,
29897,
334,
954,
29918,
4905,
29879,
29892,
13,
462,
462,
29871,
784,
334,
954,
29918,
2080,
29879,
5919,
1054,
718,
29871,
29896,
29897,
334,
954,
29918,
2080,
29879,
1402,
13,
462,
18884,
379,
29961,
1054,
334,
954,
29918,
4905,
29879,
5919,
1054,
718,
29871,
29896,
29897,
334,
954,
29918,
4905,
29879,
29892,
13,
462,
462,
29871,
1948,
334,
954,
29918,
2080,
29879,
5919,
798,
718,
29871,
29896,
29897,
334,
954,
29918,
2080,
29879,
2314,
13,
462,
9651,
7442,
29889,
13424,
29889,
9294,
29918,
11745,
29898,
13,
462,
18884,
379,
29886,
29961,
798,
334,
954,
29918,
4905,
29879,
5919,
798,
718,
29871,
29896,
29897,
334,
954,
29918,
4905,
29879,
29892,
13,
462,
462,
259,
784,
334,
954,
29918,
2080,
29879,
5919,
1054,
718,
29871,
29896,
29897,
334,
954,
29918,
2080,
29879,
1402,
13,
462,
18884,
379,
29886,
29961,
1054,
334,
954,
29918,
4905,
29879,
5919,
1054,
718,
29871,
29896,
29897,
334,
954,
29918,
4905,
29879,
29892,
13,
462,
462,
259,
1948,
334,
954,
29918,
2080,
29879,
5919,
798,
718,
29871,
29896,
29897,
334,
954,
29918,
2080,
29879,
2314,
13,
462,
9651,
7442,
29889,
13424,
29889,
9294,
29918,
497,
5358,
29898,
13,
462,
18884,
379,
29961,
798,
334,
954,
29918,
4905,
29879,
5919,
798,
718,
29871,
29896,
29897,
334,
954,
29918,
4905,
29879,
29892,
13,
462,
462,
29871,
784,
334,
954,
29918,
2080,
29879,
5919,
1054,
718,
29871,
29896,
29897,
334,
954,
29918,
2080,
29879,
1402,
13,
462,
18884,
315,
29889,
6333,
29898,
13,
462,
462,
1678,
7442,
29889,
29880,
979,
29887,
29889,
5344,
29918,
13519,
29898,
13,
462,
462,
4706,
319,
29892,
931,
29918,
24530,
15625,
798,
718,
784,
29897,
334,
29871,
29906,
14664,
6333,
29898,
13,
462,
462,
9651,
350,
8243,
13,
462,
18884,
364,
25027,
29922,
2273,
324,
29892,
472,
324,
29922,
14947,
29897,
13,
462,
9651,
7442,
29889,
13424,
29889,
9294,
29918,
497,
5358,
29898,
13,
462,
18884,
379,
29886,
29961,
798,
334,
954,
29918,
4905,
29879,
5919,
798,
718,
29871,
29896,
29897,
334,
954,
29918,
4905,
29879,
29892,
13,
462,
462,
259,
784,
334,
954,
29918,
2080,
29879,
5919,
1054,
718,
29871,
29896,
29897,
334,
954,
29918,
2080,
29879,
1402,
13,
462,
18884,
315,
29889,
6333,
29898,
13,
462,
462,
1678,
7442,
29889,
29880,
979,
29887,
29889,
5344,
29918,
13519,
29898,
13,
462,
462,
4706,
319,
29892,
931,
29918,
24530,
15625,
798,
718,
784,
29897,
334,
29871,
29906,
718,
29871,
29896,
14664,
6333,
29898,
13,
462,
462,
9651,
350,
8243,
13,
462,
18884,
364,
25027,
29922,
2273,
324,
29892,
472,
324,
29922,
14947,
29897,
13,
13,
13,
1678,
529,
26862,
6227,
29958,
877,
13424,
4045,
1495,
13,
1678,
822,
1243,
29918,
26017,
29918,
4299,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
4321,
390,
6488,
4485,
586,
8636,
2788,
304,
1906,
2183,
13,
13,
4706,
448,
16785,
848,
13,
4706,
448,
24367,
793,
379,
804,
295,
1409,
13,
4706,
448,
2912,
267,
317,
10699,
13,
4706,
448,
7190,
278,
390,
6488,
19554,
7049,
319,
29892,
350,
29892,
322,
315,
313,
29928,
353,
29871,
29900,
29897,
13,
4706,
448,
4321,
29879,
4485,
586,
4128,
515,
390,
6488,
526,
2134,
29916,
29889,
5186,
304,
2989,
8024,
29915,
29879,
13,
4706,
9995,
13,
4706,
954,
29918,
2230,
29918,
24530,
353,
29871,
29946,
29900,
13,
4706,
954,
29918,
28631,
29918,
24389,
353,
29871,
29896,
29906,
13,
4706,
954,
29918,
28631,
29918,
4299,
353,
954,
29918,
28631,
29918,
24389,
849,
29871,
29941,
13,
4706,
363,
954,
29918,
2080,
29879,
297,
518,
29896,
29892,
29871,
29941,
5387,
13,
9651,
363,
954,
29918,
4905,
29879,
297,
518,
29896,
29892,
29871,
29906,
5387,
13,
18884,
363,
4559,
29918,
19207,
297,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29946,
5387,
13,
462,
1678,
931,
29918,
24530,
353,
1207,
29918,
2230,
29918,
24530,
29898,
13,
462,
4706,
954,
29918,
2230,
29918,
24530,
29892,
4559,
29918,
19207,
29897,
13,
462,
1678,
319,
29892,
350,
29892,
315,
353,
3667,
29889,
7707,
893,
29898,
13,
462,
4706,
954,
29918,
28631,
29918,
24389,
29892,
954,
29918,
2080,
29879,
29892,
954,
29918,
4905,
29879,
29897,
13,
462,
1678,
590,
29918,
1001,
29909,
353,
3152,
29889,
1001,
29909,
29898,
18248,
359,
537,
29922,
29900,
29897,
13,
462,
1678,
4485,
586,
29879,
353,
3667,
29889,
6574,
19994,
29898,
29909,
29892,
350,
29892,
315,
29892,
931,
29918,
24530,
14352,
29896,
29962,
718,
29871,
29896,
29897,
13,
462,
1678,
4485,
586,
29879,
353,
4485,
586,
29879,
29961,
2230,
29918,
24530,
29962,
13,
13,
462,
1678,
565,
4559,
29918,
19207,
1275,
29871,
29906,
29901,
13,
462,
4706,
931,
29918,
24530,
29892,
4485,
586,
29879,
17313,
13,
462,
9651,
3152,
29889,
5675,
29918,
11249,
29881,
29918,
4830,
29898,
2230,
29918,
24530,
29892,
4485,
586,
29879,
29897,
13,
462,
1678,
954,
29918,
2230,
29918,
24530,
353,
931,
29918,
24530,
29889,
12181,
29961,
29900,
29962,
13,
13,
462,
1678,
319,
29918,
2084,
29918,
12097,
287,
353,
5988,
29898,
1311,
29889,
1688,
29918,
3972,
29892,
525,
29909,
29918,
12097,
287,
29889,
3945,
1495,
13,
462,
1678,
350,
29918,
2084,
29918,
12097,
287,
353,
5988,
29898,
1311,
29889,
1688,
29918,
3972,
29892,
525,
29933,
29918,
12097,
287,
29889,
3945,
1495,
13,
462,
1678,
315,
29918,
2084,
29918,
12097,
287,
353,
5988,
29898,
1311,
29889,
1688,
29918,
3972,
29892,
525,
29907,
29918,
12097,
287,
29889,
3945,
1495,
13,
13,
462,
1678,
319,
29892,
350,
29892,
315,
353,
590,
29918,
1001,
29909,
29889,
26017,
29918,
4299,
29898,
9802,
586,
29879,
29892,
954,
29918,
28631,
29918,
4299,
29897,
13,
462,
1678,
590,
29918,
1001,
29909,
29889,
649,
29918,
4299,
29898,
13,
462,
4706,
319,
29918,
2084,
29918,
12097,
287,
29892,
350,
29918,
2084,
29918,
12097,
287,
29892,
315,
29918,
2084,
29918,
12097,
287,
29897,
13,
462,
1678,
396,
2976,
29918,
791,
29879,
353,
590,
29918,
1001,
29909,
29889,
2976,
29918,
791,
29879,
7503,
1949,
29918,
28631,
29918,
4299,
29962,
13,
13,
462,
1678,
396,
2379,
8606,
9649,
29879,
964,
29871,
29906,
29928,
1060,
322,
612,
7049,
29901,
13,
462,
1678,
396,
518,
29933,
17571,
319,
1068,
29925,
29933,
319,
1068,
29898,
29925,
29974,
29896,
29897,
29933,
2023,
29962,
13,
462,
1678,
396,
11851,
29918,
2003,
29879,
29918,
20620,
353,
1513,
29918,
2003,
29879,
29889,
26276,
1165,
267,
29898,
29900,
29892,
29896,
467,
690,
14443,
29898,
13,
462,
1678,
396,
1678,
313,
1949,
29918,
28631,
29918,
4299,
6653,
29896,
4961,
13,
13,
462,
1678,
396,
1222,
627,
14961,
2460,
550,
515,
8626,
481,
348,
586,
11594,
29876,
4505,
13,
462,
1678,
396,
1393,
29918,
1285,
353,
3667,
29889,
2929,
345,
29918,
29931,
29891,
481,
348,
586,
29898,
29909,
29892,
350,
29930,
29933,
29889,
29950,
29897,
13,
462,
1678,
396,
1393,
29918,
26290,
353,
3667,
29889,
2929,
345,
29918,
29931,
29891,
481,
348,
586,
29898,
29909,
29889,
29950,
29892,
315,
29889,
29950,
29930,
29907,
29897,
13,
462,
1678,
396,
2158,
29898,
9302,
29889,
6605,
29898,
9302,
29889,
29880,
979,
29887,
29889,
29872,
335,
29898,
1393,
29918,
1285,
9601,
29900,
2314,
29961,
1057,
29899,
29896,
2314,
13,
462,
1678,
396,
2158,
29898,
2976,
29918,
791,
29879,
29897,
13,
462,
1678,
396,
9302,
29889,
13424,
29889,
9294,
29918,
497,
5358,
29898,
1393,
29918,
1285,
29889,
6051,
351,
7177,
3285,
13,
462,
1678,
396,
1678,
1809,
29918,
791,
29879,
29892,
472,
324,
21098,
29896,
29892,
364,
25027,
21098,
29896,
29897,
13,
462,
1678,
396,
9302,
29889,
13424,
29889,
9294,
29918,
497,
5358,
29898,
1393,
29918,
26290,
29889,
6051,
351,
7177,
3285,
13,
462,
1678,
396,
259,
1809,
29918,
791,
29879,
29892,
472,
324,
21098,
29896,
29892,
364,
25027,
21098,
29896,
29897,
13,
462,
1678,
396,
9302,
29889,
13424,
29889,
9294,
29918,
497,
5358,
29898,
9302,
29889,
6605,
29898,
9302,
29889,
29880,
979,
29887,
29889,
29872,
335,
29898,
13,
462,
1678,
396,
259,
14961,
29918,
1285,
9601,
29900,
2314,
29961,
1057,
29899,
29896,
1402,
1809,
29918,
791,
29879,
29892,
13,
462,
1678,
396,
1678,
472,
324,
21098,
29896,
29892,
364,
25027,
21098,
29896,
29897,
13,
462,
1678,
396,
9302,
29889,
13424,
29889,
9294,
29918,
497,
5358,
29898,
9302,
29889,
6605,
29898,
9302,
29889,
29880,
979,
29887,
29889,
29872,
335,
29898,
13,
462,
1678,
396,
259,
14961,
29918,
26290,
9601,
29900,
2314,
29961,
1057,
29899,
29896,
1402,
1809,
29918,
791,
29879,
29892,
13,
462,
1678,
396,
1678,
472,
324,
21098,
29896,
29892,
364,
25027,
21098,
29896,
29897,
13,
13,
462,
1678,
396,
5399,
393,
278,
7936,
265,
1338,
526,
10150,
6251,
373,
1269,
1948,
13,
462,
1678,
396,
1311,
29889,
9294,
5574,
3552,
9302,
29889,
3317,
29898,
9302,
29889,
6897,
29898,
1393,
29918,
1285,
511,
8990,
29922,
29896,
29897,
1275,
13,
462,
1678,
396,
1678,
7442,
29889,
6897,
29898,
1393,
29918,
1285,
29889,
6051,
351,
7177,
3101,
467,
497,
3101,
13,
462,
1678,
396,
1311,
29889,
9294,
5574,
3552,
9302,
29889,
3317,
29898,
9302,
29889,
6897,
29898,
1393,
29918,
26290,
511,
8990,
29922,
29896,
29897,
1275,
13,
462,
1678,
396,
1678,
7442,
29889,
6897,
29898,
1393,
29918,
26290,
29889,
6051,
351,
7177,
3101,
467,
497,
3101,
13,
13,
462,
1678,
396,
5399,
278,
390,
6488,
4485,
586,
8636,
1993,
278,
2989,
8024,
29915,
29879,
13,
462,
1678,
4485,
586,
29879,
29918,
4299,
353,
7442,
29889,
3298,
359,
29898,
9802,
586,
29879,
29889,
12181,
29897,
13,
462,
1678,
363,
19538,
29892,
9631,
297,
26985,
29898,
2230,
29918,
24530,
1125,
13,
462,
4706,
4485,
586,
29879,
29918,
4299,
29961,
2034,
29962,
353,
315,
29889,
6333,
29898,
13,
462,
9651,
7442,
29889,
29880,
979,
29887,
29889,
5344,
29918,
13519,
29898,
29909,
29892,
9631,
467,
6333,
29898,
13,
462,
18884,
350,
876,
13,
462,
4706,
396,
2158,
29898,
13,
462,
4706,
396,
1678,
525,
20606,
292,
390,
6488,
4485,
586,
1828,
472,
931,
4331,
1273,
29881,
29915,
1273,
9631,
29897,
13,
462,
1678,
9995,
13,
462,
1678,
1053,
22889,
29889,
2272,
5317,
408,
349,
5850,
13,
462,
1678,
363,
1881,
29918,
1949,
297,
3464,
29898,
1949,
29918,
2080,
29879,
1125,
13,
462,
4706,
349,
5850,
29889,
4532,
580,
13,
462,
4706,
349,
5850,
29889,
8948,
29898,
5574,
29897,
13,
462,
4706,
363,
1962,
29918,
1949,
297,
3464,
29898,
1949,
29918,
4905,
29879,
1125,
13,
462,
9651,
349,
5850,
29889,
5317,
29898,
2230,
29918,
24530,
7503,
29945,
29900,
1402,
13,
462,
9651,
396,
259,
4485,
586,
29879,
29918,
4299,
7503,
29945,
29900,
29892,
1962,
29918,
1949,
29892,
2080,
29918,
1949,
1402,
525,
2901,
1495,
13,
462,
9651,
349,
5850,
29889,
5317,
29898,
2230,
29918,
24530,
7503,
29945,
29900,
1402,
9802,
586,
29879,
7503,
29945,
29900,
29892,
13,
462,
9651,
396,
259,
1962,
29918,
1949,
29892,
1881,
29918,
1949,
1402,
29915,
17697,
1495,
13,
462,
9651,
349,
5850,
29889,
5317,
29898,
2230,
29918,
24530,
29918,
1145,
344,
7503,
29945,
29900,
1402,
13,
462,
9651,
396,
259,
4485,
586,
29879,
29918,
1145,
344,
7503,
29945,
29900,
29892,
1962,
29918,
1949,
29892,
1881,
29918,
1949,
1402,
29915,
29890,
489,
1495,
13,
462,
9651,
349,
5850,
29889,
3257,
877,
2080,
1273,
29881,
304,
14391,
29915,
29995,
2080,
29918,
1949,
29897,
13,
462,
9651,
349,
5850,
29889,
26172,
18959,
3491,
3788,
3247,
424,
3788,
29928,
1947,
8024,
11287,
13,
462,
4706,
349,
5850,
29889,
4294,
580,
13,
462,
1678,
9995,
13,
462,
1678,
7442,
29889,
13424,
29889,
9294,
29918,
497,
5358,
29898,
13,
462,
4706,
4485,
586,
29879,
29918,
4299,
29889,
29879,
802,
29872,
911,
3285,
4485,
586,
29879,
29889,
29879,
802,
29872,
911,
3285,
13,
462,
4706,
364,
25027,
29922,
29900,
29889,
29945,
29892,
472,
324,
29922,
29900,
29889,
29945,
29897,
13,
462,
1678,
7442,
29889,
13424,
29889,
9294,
29918,
11745,
29898,
13,
462,
4706,
3667,
29889,
1359,
29918,
2378,
29918,
726,
29898,
29909,
29918,
2084,
29918,
12097,
287,
511,
319,
29897,
13,
462,
1678,
7442,
29889,
13424,
29889,
9294,
29918,
11745,
29898,
13,
462,
4706,
3667,
29889,
1359,
29918,
2378,
29918,
726,
29898,
29933,
29918,
2084,
29918,
12097,
287,
511,
350,
29897,
13,
462,
1678,
7442,
29889,
13424,
29889,
9294,
29918,
11745,
29898,
13,
462,
4706,
3667,
29889,
1359,
29918,
2378,
29918,
726,
29898,
29907,
29918,
2084,
29918,
12097,
287,
511,
315,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
443,
27958,
29889,
3396,
580,
13,
2
] |
lectures/07-python-dictionaries/examples/gashlycrumb.py | mattmiller899/biosys-analytics | 4 | 23979 | <gh_stars>1-10
#!/usr/bin/env python3
"""dictionary lookup"""
import os
import sys
args = sys.argv[1:]
if len(args) != 1:
print('Usage: {} LETTER'.format(os.path.basename(sys.argv[0])))
sys.exit(1)
letter = args[0].upper()
lines = """
A is for Amy who fell down the stairs.
B is for Basil assaulted by bears.
C is for Clara who wasted away.
D is for Desmond thrown out of a sleigh.
E is for Ernest who choked on a peach.
F is for Fanny sucked dry by a leech.
G is for George smothered under a rug.
H is for Hector done in by a thug.
I is for Ida who drowned in a lake.
J is for James who took lye by mistake.
K is for Kate who was struck with an axe.
L is for Leo who choked on some tacks.
M is for Maud who was swept out to sea.
N is for Neville who died of ennui.
O is for Olive run through with an awl.
P is for Prue trampled flat in a brawl.
Q is for Quentin who sank on a mire.
R is for Rhoda consumed by a fire.
S is for Susan who perished of fits.
T is for Titus who flew into bits.
U is for Una who slipped down a drain.
V is for Victor squashed under a train.
W is for Winnie embedded in ice.
X is for Xerxes devoured by mice.
Y is for Yorick whose head was bashed in.
Z is for Zillah who drank too much gin.
""".strip().splitlines()
lookup = {}
for line in lines:
lookup[line[0]] = line
if letter in lookup:
print(lookup[letter])
else:
print('I do not know "{}"'.format(letter))
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
15945,
29908,
27126,
16280,
15945,
29908,
13,
13,
5215,
2897,
13,
5215,
10876,
13,
13,
5085,
353,
10876,
29889,
19218,
29961,
29896,
17531,
13,
13,
361,
7431,
29898,
5085,
29897,
2804,
29871,
29896,
29901,
13,
1678,
1596,
877,
27573,
29901,
6571,
365,
2544,
4945,
4286,
4830,
29898,
359,
29889,
2084,
29889,
6500,
3871,
29898,
9675,
29889,
19218,
29961,
29900,
29962,
4961,
13,
1678,
10876,
29889,
13322,
29898,
29896,
29897,
13,
13,
15670,
353,
6389,
29961,
29900,
1822,
21064,
580,
13,
13,
9012,
353,
9995,
13,
29909,
338,
363,
28533,
1058,
8379,
1623,
278,
380,
7121,
29889,
13,
29933,
338,
363,
4886,
309,
29159,
287,
491,
367,
1503,
29889,
13,
29907,
338,
363,
29042,
1058,
471,
9446,
3448,
29889,
13,
29928,
338,
363,
2726,
8315,
12005,
714,
310,
263,
12844,
1141,
29889,
13,
29923,
338,
363,
23993,
1058,
521,
12504,
373,
263,
1236,
496,
29889,
13,
29943,
338,
363,
383,
14763,
480,
384,
287,
15589,
491,
263,
454,
5309,
29889,
13,
29954,
338,
363,
5122,
1560,
1228,
287,
1090,
263,
29833,
29889,
13,
29950,
338,
363,
379,
3019,
2309,
297,
491,
263,
266,
688,
29889,
13,
29902,
338,
363,
306,
1388,
1058,
270,
4708,
287,
297,
263,
19437,
29889,
13,
29967,
338,
363,
5011,
1058,
3614,
301,
4099,
491,
10171,
29889,
13,
29968,
338,
363,
23738,
1058,
471,
15469,
411,
385,
4853,
29872,
29889,
13,
29931,
338,
363,
22533,
1058,
521,
12504,
373,
777,
22002,
29879,
29889,
13,
29924,
338,
363,
3219,
566,
1058,
471,
7901,
415,
714,
304,
7205,
29889,
13,
29940,
338,
363,
2448,
4909,
1058,
6423,
310,
427,
29876,
1481,
29889,
13,
29949,
338,
363,
438,
9258,
1065,
1549,
411,
385,
3773,
29880,
29889,
13,
29925,
338,
363,
1588,
434,
534,
981,
29881,
12151,
297,
263,
289,
1610,
29880,
29889,
13,
29984,
338,
363,
751,
15440,
1058,
269,
804,
373,
263,
286,
533,
29889,
13,
29934,
338,
363,
7861,
8887,
11233,
287,
491,
263,
3974,
29889,
13,
29903,
338,
363,
25914,
1058,
639,
3276,
310,
23994,
29889,
13,
29911,
338,
363,
11810,
375,
1058,
9115,
29893,
964,
9978,
29889,
13,
29965,
338,
363,
12127,
1058,
20662,
2986,
1623,
263,
270,
6038,
29889,
13,
29963,
338,
363,
12684,
10674,
25936,
1090,
263,
7945,
29889,
13,
29956,
338,
363,
399,
2559,
347,
15685,
297,
14890,
29889,
13,
29990,
338,
363,
1060,
261,
9100,
2906,
14076,
491,
286,
625,
29889,
13,
29979,
338,
363,
612,
272,
860,
5069,
2343,
471,
10891,
287,
297,
29889,
13,
29999,
338,
363,
796,
2911,
29882,
1058,
270,
10003,
2086,
1568,
330,
262,
29889,
13,
15945,
1642,
17010,
2141,
5451,
9012,
580,
13,
13,
20401,
353,
6571,
13,
1454,
1196,
297,
3454,
29901,
13,
1678,
16280,
29961,
1220,
29961,
29900,
5262,
353,
1196,
13,
13,
361,
5497,
297,
16280,
29901,
13,
1678,
1596,
29898,
20401,
29961,
15670,
2314,
13,
2870,
29901,
13,
1678,
1596,
877,
29902,
437,
451,
1073,
29850,
5038,
4286,
4830,
29898,
15670,
876,
13,
2
] |
monodepth/geometry/utils.py | vguizilini/packnet-sfm | 1 | 22232 | # Copyright 2020 Toyota Research Institute. All rights reserved.
"""
Geometry utilities
"""
import numpy as np
def invert_pose_numpy(T):
"""
'Invert' 4x4 extrinsic matrix
Parameters
----------
T: 4x4 matrix (world to camera)
Returns
-------
4x4 matrix (camera to world)
"""
Tc = np.copy(T)
R, t = Tc[:3, :3], Tc[:3, 3]
Tc[:3, :3], Tc[:3, 3] = R.T, - np.matmul(R.T, t)
return Tc
| [
1,
396,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
29411,
4616,
10550,
8907,
29889,
29871,
2178,
10462,
21676,
29889,
13,
13,
15945,
29908,
13,
7999,
7843,
3667,
1907,
13,
15945,
29908,
13,
13,
5215,
12655,
408,
7442,
13,
13,
13,
1753,
21292,
29918,
4220,
29918,
23749,
29898,
29911,
1125,
13,
1678,
9995,
13,
1678,
525,
797,
1765,
29915,
29871,
29946,
29916,
29946,
17541,
28594,
4636,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
323,
29901,
29871,
29946,
29916,
29946,
4636,
313,
11526,
304,
10656,
29897,
13,
13,
1678,
16969,
13,
1678,
448,
22158,
13,
268,
29946,
29916,
29946,
4636,
313,
26065,
304,
3186,
29897,
13,
1678,
9995,
13,
1678,
323,
29883,
353,
7442,
29889,
8552,
29898,
29911,
29897,
13,
1678,
390,
29892,
260,
353,
323,
29883,
7503,
29941,
29892,
584,
29941,
1402,
323,
29883,
7503,
29941,
29892,
29871,
29941,
29962,
13,
1678,
323,
29883,
7503,
29941,
29892,
584,
29941,
1402,
323,
29883,
7503,
29941,
29892,
29871,
29941,
29962,
353,
390,
29889,
29911,
29892,
448,
7442,
29889,
2922,
16109,
29898,
29934,
29889,
29911,
29892,
260,
29897,
13,
1678,
736,
323,
29883,
13,
13,
2
] |
quimb/tensor/tensor_3d.py | cnakhl/quimb | 0 | 106857 | <reponame>cnakhl/quimb<gh_stars>0
import functools
from numbers import Integral
from itertools import product, starmap
from collections import defaultdict
from autoray import do
from ..gen.rand import randn, seed_rand
from . import array_ops as ops
from .tensor_core import (
Tensor,
TensorNetwork,
oset,
tags_to_oset,
rand_uuid,
)
def gen_3d_bonds(Lx, Ly, Lz, steppers, coo_filter=None):
"""Convenience function for tiling pairs of bond coordinates on a 3D
lattice given a function like ``lambda i, j, k: (i + 1, j + 1, k + 1)``.
Parameters
----------
Lx : int
The number of x-slices.
Ly : int
The number of y-slices.
Lz : int
The number of z-slices.
steppers : callable or sequence of callable
Function(s) that take args ``(i, j, k)`` and generate another
coordinate, thus defining a bond.
coo_filter : callable
Function that takes args ``(i, j, k)`` and only returns ``True`` if
this is to be a valid starting coordinate.
Yields
------
bond : tuple[tuple[int, int, int], tuple[int, int, int]]
A pair of coordinates.
Examples
--------
Generate nearest neighbor bonds:
>>> for bond in gen_3d_bonds(2, 2, 2, [lambda i, j, k: (i + 1, j, k),
... lambda i, j, k: (i, j + 1, k),
... lambda i, j, k: (i, j, k + 1)]):
... print(bond)
((0, 0, 0), (1, 0, 0))
((0, 0, 0), (0, 1, 0))
((0, 0, 0), (0, 0, 1))
((0, 0, 1), (1, 0, 1))
((0, 0, 1), (0, 1, 1))
((0, 1, 0), (1, 1, 0))
((0, 1, 0), (0, 1, 1))
((0, 1, 1), (1, 1, 1))
((1, 0, 0), (1, 1, 0))
((1, 0, 0), (1, 0, 1))
((1, 0, 1), (1, 1, 1))
((1, 1, 0), (1, 1, 1))
"""
if callable(steppers):
steppers = (steppers,)
for i, j, k in product(range(Lx), range(Ly), range(Lz)):
if (coo_filter is None) or coo_filter(i, j, k):
for stepper in steppers:
i2, j2, k2 = stepper(i, j, k)
if (0 <= i2 < Lx) and (0 <= j2 < Ly) and (0 <= k2 < Lz):
yield (i, j, k), (i2, j2, k2)
class TensorNetwork3D(TensorNetwork):
_EXTRA_PROPS = (
'_site_tag_id',
'_x_tag_id',
'_y_tag_id',
'_z_tag_id',
'_Lx',
'_Ly',
'_Lz',
)
def _compatible_3d(self, other):
"""Check whether ``self`` and ``other`` are compatible 3D tensor
networks such that they can remain a 3D tensor network when combined.
"""
return (
isinstance(other, TensorNetwork3D) and
all(getattr(self, e) == getattr(other, e)
for e in TensorNetwork3D._EXTRA_PROPS)
)
def __and__(self, other):
new = super().__and__(other)
if self._compatible_3d(other):
new.view_as_(TensorNetwork3D, like=self)
return new
def __or__(self, other):
new = super().__or__(other)
if self._compatible_3d(other):
new.view_as_(TensorNetwork3D, like=self)
return new
@property
def Lx(self):
"""The number of x-slices.
"""
return self._Lx
@property
def Ly(self):
"""The number of y-slices.
"""
return self._Ly
@property
def Lz(self):
"""The number of z-slices.
"""
return self._Lz
@property
def nsites(self):
"""The total number of sites.
"""
return self._Lx * self._Ly * self._Lz
@property
def site_tag_id(self):
"""The string specifier for tagging each site of this 3D TN.
"""
return self._site_tag_id
def site_tag(self, i, j, k):
"""The name of the tag specifiying the tensor at site ``(i, j, k)``.
"""
if not isinstance(i, str):
i = i % self.Lx
if not isinstance(j, str):
j = j % self.Ly
if not isinstance(k, str):
k = k % self.Lz
return self.site_tag_id.format(i, j, k)
@property
def x_tag_id(self):
"""The string specifier for tagging each x-slice of this 3D TN.
"""
return self._x_tag_id
def x_tag(self, i):
if not isinstance(i, str):
i = i % self.Lx
return self.x_tag_id.format(i)
@property
def x_tags(self):
"""A tuple of all of the ``Lx`` different x-slice tags.
"""
return tuple(map(self.x_tag, range(self.Lx)))
@property
def y_tag_id(self):
"""The string specifier for tagging each y-slice of this 3D TN.
"""
return self._y_tag_id
def y_tag(self, j):
if not isinstance(j, str):
j = j % self.Ly
return self.y_tag_id.format(j)
@property
def y_tags(self):
"""A tuple of all of the ``Ly`` different y-slice tags.
"""
return tuple(map(self.y_tag, range(self.Ly)))
@property
def z_tag_id(self):
"""The string specifier for tagging each z-slice of this 3D TN.
"""
return self._z_tag_id
def z_tag(self, k):
if not isinstance(k, str):
k = k % self.Lz
return self.z_tag_id.format(k)
@property
def z_tags(self):
"""A tuple of all of the ``Lz`` different z-slice tags.
"""
return tuple(map(self.z_tag, range(self.Lz)))
@property
def site_tags(self):
"""All of the ``Lx * Ly`` site tags.
"""
return tuple(starmap(self.site_tag, self.gen_site_coos()))
def maybe_convert_coo(self, coo):
"""Check if ``coo`` is a tuple of three ints and convert to the
corresponding site tag if so.
"""
if not isinstance(coo, str):
try:
i, j, k = map(int, coo)
return self.site_tag(i, j, k)
except (ValueError, TypeError):
pass
return coo
def _get_tids_from_tags(self, tags, which='all'):
"""This is the function that lets coordinates such as ``(i, j, k)`` be
used for many 'tag' based functions.
"""
tags = self.maybe_convert_coo(tags)
return super()._get_tids_from_tags(tags, which=which)
def gen_site_coos(self):
"""Generate coordinates for all the sites in this 3D TN.
"""
return product(range(self.Lx), range(self.Ly), range(self.Lz))
def gen_bond_coos(self):
"""Generate pairs of coordinates for all the bonds in this 3D TN.
"""
return gen_3d_bonds(self.Lx, self.Ly, self.Lz, steppers=[
lambda i, j, k: (i + 1, j, k),
lambda i, j, k: (i, j + 1, k),
lambda i, j, k: (i, j, k + 1),
])
def __getitem__(self, key):
"""Key based tensor selection, checking for integer based shortcut.
"""
return super().__getitem__(self.maybe_convert_coo(key))
def __repr__(self):
"""Insert number of slices into standard print.
"""
s = super().__repr__()
extra = (f', Lx={self.Lx}, Ly={self.Ly}, Lz={self.Lz}, '
f'max_bond={self.max_bond()}')
s = f'{s[:-2]}{extra}{s[-2:]}'
return s
def __str__(self):
"""Insert number of slices into standard print.
"""
s = super().__repr__()
extra = (f', Lx={self.Lx}, Ly={self.Ly}, Lz={self.Lz}'
f'max_bond={self.max_bond()}')
s = f'{s[:-2]}{extra}{s[-2:]}'
return s
def flatten(self, fuse_multibonds=True, inplace=False):
"""Contract all tensors corresponding to each site into one.
"""
tn = self if inplace else self.copy()
for i, j, k in self.gen_site_coos():
tn ^= (i, j, k)
if fuse_multibonds:
tn.fuse_multibonds_()
return tn.view_as_(TensorNetwork3DFlat, like=self)
flatten_ = functools.partialmethod(flatten, inplace=True)
def is_lone_coo(where):
"""Check if ``where`` has been specified as a single coordinate triplet.
"""
return (len(where) == 3) and (isinstance(where[0], Integral))
class TensorNetwork3DVector(TensorNetwork3D,
TensorNetwork):
"""Mixin class for a 3D square lattice vector TN, i.e. one with a single
physical index per site.
"""
_EXTRA_PROPS = (
'_site_tag_id',
'_x_tag_id',
'_y_tag_id',
'_z_tag_id',
'_Lx',
'_Ly',
'_Lz',
'_site_ind_id',
)
@property
def site_ind_id(self):
return self._site_ind_id
def site_ind(self, i, j, k):
if not isinstance(i, str):
i = i % self.Lx
if not isinstance(j, str):
j = j % self.Ly
if not isinstance(k, str):
k = k % self.Lz
return self.site_ind_id.format(i, j, k)
def reindex_sites(self, new_id, where=None, inplace=False):
if where is None:
where = self.gen_site_coos()
return self.reindex(
{
self.site_ind(*coo): new_id.format(*coo) for coo in where
},
inplace=inplace
)
@site_ind_id.setter
def site_ind_id(self, new_id):
if self._site_ind_id != new_id:
self.reindex_sites(new_id, inplace=True)
self._site_ind_id = new_id
@property
def site_inds(self):
"""All of the site inds.
"""
return tuple(starmap(self.site_ind, self.gen_site_coos()))
def to_dense(self, *inds_seq, **contract_opts):
"""Return the dense ket version of this 3D vector, i.e. a ``qarray``
with shape (-1, 1).
"""
if not inds_seq:
# just use list of site indices
return do('reshape', TensorNetwork.to_dense(
self, self.site_inds, **contract_opts
), (-1, 1))
return TensorNetwork.to_dense(self, *inds_seq, **contract_opts)
def phys_dim(self, i=None, j=None, k=None):
"""Get the size of the physical indices / a specific physical index.
"""
if (i is not None) and (j is not None) and (k is not None):
pix = self.site_ind(i, j, k)
else:
# allow for when some physical indices might have been contracted
pix = next(iter(
ix for ix in self.site_inds if ix in self.ind_map
))
return self.ind_size(pix)
def gate(
self,
G,
where,
contract=False,
tags=None,
info=None,
inplace=False,
**compress_opts,
):
"""Apply a gate ``G`` to sites ``where``, preserving the outer site
inds.
"""
if is_lone_coo(where):
where = (where,)
else:
where = tuple(where)
inds = tuple(starmap(self.site_ind, where))
return super().gate_inds(
G, inds, contract=contract, tags=tags, info=info, inplace=inplace,
**compress_opts
)
gate_ = functools.partialmethod(gate, inplace=True)
class TensorNetwork3DFlat(TensorNetwork3D,
TensorNetwork):
"""Mixin class for a 3D square lattice tensor network with a single tensor
per site, for example, both PEPS and PEPOs.
"""
_EXTRA_PROPS = (
'_site_tag_id',
'_x_tag_id',
'_y_tag_id',
'_z_tag_id',
'_Lx',
'_Ly',
'_Lz',
)
def bond(self, coo1, coo2):
"""Get the name of the index defining the bond between sites at
``coo1`` and ``coo2``.
"""
b_ix, = self[coo1].bonds(self[coo2])
return b_ix
def bond_size(self, coo1, coo2):
"""Return the size of the bond between sites at ``coo1`` and ``coo2``.
"""
b_ix = self.bond(coo1, coo2)
return self[coo1].ind_size(b_ix)
class PEPS3D(TensorNetwork3DVector,
TensorNetwork3DFlat,
TensorNetwork3D,
TensorNetwork):
r"""Projected Entangled Pair States object (3D).
Parameters
----------
arrays : sequence of sequence of sequence of array
The core tensor data arrays.
shape : str, optional
Which order the dimensions of the arrays are stored in, the default
``'urfdlbp'`` stands for ('up', 'right', 'front', down', 'left',
'behind', 'physical') meaning (x+, y+, z+, x-, y-, z-, physical)
respectively. Arrays on the edge of lattice are assumed to be missing
the corresponding dimension.
tags : set[str], optional
Extra global tags to add to the tensor network.
site_ind_id : str, optional
String specifier for naming convention of site indices.
site_tag_id : str, optional
String specifier for naming convention of site tags.
x_tag_id : str, optional
String specifier for naming convention of x-slice tags.
y_tag_id : str, optional
String specifier for naming convention of y-slice tags.
z_tag_id : str, optional
String specifier for naming convention of z-slice tags.
"""
_EXTRA_PROPS = (
'_site_tag_id',
'_x_tag_id',
'_y_tag_id',
'_z_tag_id',
'_Lx',
'_Ly',
'_Lz',
'_site_ind_id',
)
def __init__(
self,
arrays,
*,
shape='urfdlbp',
tags=None,
site_ind_id='k{},{},{}',
site_tag_id='I{},{},{}',
x_tag_id='X{}',
y_tag_id='Y{}',
z_tag_id='Z{}',
**tn_opts
):
if isinstance(arrays, PEPS3D):
super().__init__(arrays)
return
tags = tags_to_oset(tags)
self._site_ind_id = site_ind_id
self._site_tag_id = site_tag_id
self._x_tag_id = x_tag_id
self._y_tag_id = y_tag_id
self._z_tag_id = z_tag_id
arrays = tuple(tuple(tuple(z for z in y) for y in x) for x in arrays)
self._Lx = len(arrays)
self._Ly = len(arrays[0])
self._Lz = len(arrays[0][0])
tensors = []
# cache for both creating and retrieving indices
ix = defaultdict(rand_uuid)
for i, j, k in self.gen_site_coos():
array = arrays[i][j][k]
# figure out if we need to transpose the arrays from some order
# other than up right front down left behind physical
array_order = shape
if i == self.Lx - 1:
array_order = array_order.replace('u', '')
if j == self.Ly - 1:
array_order = array_order.replace('r', '')
if k == self.Lz - 1:
array_order = array_order.replace('f', '')
if i == 0:
array_order = array_order.replace('d', '')
if j == 0:
array_order = array_order.replace('l', '')
if k == 0:
array_order = array_order.replace('b', '')
# allow convention of missing bonds to be singlet dimensions
if len(array.shape) != len(array_order):
array = do('squeeze', array)
transpose_order = tuple(
array_order.find(x) for x in 'urfdlbp' if x in array_order
)
if transpose_order != tuple(range(len(array_order))):
array = do('transpose', array, transpose_order)
# get the relevant indices corresponding to neighbours
inds = []
if 'u' in array_order:
inds.append(ix[(i, j, k), (i + 1, j, k)])
if 'r' in array_order:
inds.append(ix[(i, j, k), (i, j + 1, k)])
if 'f' in array_order:
inds.append(ix[(i, j, k), (i, j, k + 1)])
if 'd' in array_order:
inds.append(ix[(i - 1, j, k), (i, j, k)])
if 'l' in array_order:
inds.append(ix[(i, j - 1, k), (i, j, k)])
if 'b' in array_order:
inds.append(ix[(i, j, k - 1), (i, j, k)])
inds.append(self.site_ind(i, j, k))
# mix site, slice and global tags
ijk_tags = tags | oset((self.site_tag(i, j, k), self.x_tag(i),
self.y_tag(j), self.z_tag(k)))
# create the site tensor!
tensors.append(Tensor(data=array, inds=inds, tags=ijk_tags))
super().__init__(tensors, virtual=True, **tn_opts)
@classmethod
def from_fill_fn(
cls, fill_fn, Lx, Ly, Lz, bond_dim, phys_dim=2, **peps3d_opts
):
"""Create a 3D PEPS from a filling function with signature
``fill_fn(shape)``.
Parameters
----------
Lx : int
The number of x-slices.
Ly : int
The number of y-slices.
Lz : int
The number of z-slices.
bond_dim : int
The bond dimension.
physical : int, optional
The physical index dimension.
peps_opts
Supplied to :class:`~quimb.tensor.tensor_3d.PEPS3D`.
Returns
-------
psi : PEPS3D
"""
arrays = [[[None
for _ in range(Lz)]
for _ in range(Ly)]
for _ in range(Lx)]
for i, j, k in product(range(Lx), range(Ly), range(Lz)):
shape = []
if i != Lx - 1: # bond up
shape.append(bond_dim)
if j != Ly - 1: # bond right
shape.append(bond_dim)
if k != Lz - 1: # bond front
shape.append(bond_dim)
if i != 0: # bond down
shape.append(bond_dim)
if j != 0: # bond left
shape.append(bond_dim)
if k != 0: # bond behind
shape.append(bond_dim)
shape.append(phys_dim)
arrays[i][j][k] = fill_fn(shape)
return cls(arrays, **peps3d_opts)
@classmethod
def empty(
self, Lx, Ly, Lz, bond_dim, phys_dim=2, like='numpy', **peps3d_opts,
):
"""Create an empty 3D PEPS.
Parameters
----------
Lx : int
The number of x-slices.
Ly : int
The number of y-slices.
Lz : int
The number of z-slices.
bond_dim : int
The bond dimension.
physical : int, optional
The physical index dimension.
peps3d_opts
Supplied to :class:`~quimb.tensor.tensor_3d.PEPS3D`.
Returns
-------
psi : PEPS3D
See Also
--------
PEPS3D.from_fill_fn
"""
return self.from_fill_fn(
lambda shape: do("zeros", shape, like=like),
Lx, Ly, Lz, bond_dim, phys_dim, **peps3d_opts
)
@classmethod
def ones(
self, Lx, Ly, Lz, bond_dim, phys_dim=2, like='numpy', **peps3d_opts,
):
"""Create a 3D PEPS whose tensors are filled with ones.
Parameters
----------
Lx : int
The number of x-slices.
Ly : int
The number of y-slices.
Lz : int
The number of z-slices.
bond_dim : int
The bond dimension.
physical : int, optional
The physical index dimension.
peps3d_opts
Supplied to :class:`~quimb.tensor.tensor_3d.PEPS3D`.
Returns
-------
psi : PEPS3D
See Also
--------
PEPS3D.from_fill_fn
"""
return self.from_fill_fn(
lambda shape: do("ones", shape, like=like),
Lx, Ly, Lz, bond_dim, phys_dim, **peps3d_opts
)
@classmethod
def rand(
cls, Lx, Ly, Lz, bond_dim, phys_dim=2,
dtype='float64', seed=None, **peps3d_opts
):
"""Create a random (un-normalized) 3D PEPS.
Parameters
----------
Lx : int
The number of x-slices.
Ly : int
The number of y-slices.
Lz : int
The number of z-slices.
bond_dim : int
The bond dimension.
physical : int, optional
The physical index dimension.
dtype : dtype, optional
The dtype to create the arrays with, default is real double.
seed : int, optional
A random seed.
peps_opts
Supplied to :class:`~quimb.tensor.tensor_3d.PEPS3D`.
Returns
-------
psi : PEPS3D
See Also
--------
PEPS3D.from_fill_fn
"""
if seed is not None:
seed_rand(seed)
def fill_fn(shape):
return ops.sensibly_scale(ops.sensibly_scale(
randn(shape, dtype=dtype)))
return cls.from_fill_fn(
fill_fn, Lx, Ly, Lz, bond_dim, phys_dim, **peps3d_opts
)
| [
1,
529,
276,
1112,
420,
29958,
29883,
8546,
4415,
29914,
339,
19977,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
2090,
312,
8789,
13,
3166,
3694,
1053,
17100,
284,
13,
3166,
4256,
8504,
1053,
3234,
29892,
5810,
1958,
13,
3166,
16250,
1053,
2322,
8977,
13,
13,
3166,
8478,
388,
1053,
437,
13,
13,
3166,
6317,
1885,
29889,
9502,
1053,
20088,
29876,
29892,
16717,
29918,
9502,
13,
3166,
869,
1053,
1409,
29918,
3554,
408,
288,
567,
13,
3166,
869,
20158,
29918,
3221,
1053,
313,
13,
1678,
323,
6073,
29892,
13,
1678,
323,
6073,
13724,
29892,
13,
1678,
288,
842,
29892,
13,
1678,
8282,
29918,
517,
29918,
359,
300,
29892,
13,
1678,
20088,
29918,
25118,
29892,
13,
29897,
13,
13,
13,
1753,
2531,
29918,
29941,
29881,
29918,
29890,
13788,
29898,
29931,
29916,
29892,
8626,
29892,
365,
29920,
29892,
1886,
22437,
29892,
1302,
29877,
29918,
4572,
29922,
8516,
1125,
13,
1678,
9995,
1168,
854,
5597,
740,
363,
260,
6504,
11000,
310,
21224,
10350,
373,
263,
29871,
29941,
29928,
13,
1678,
24094,
2183,
263,
740,
763,
4954,
2892,
474,
29892,
432,
29892,
413,
29901,
313,
29875,
718,
29871,
29896,
29892,
432,
718,
29871,
29896,
29892,
413,
718,
29871,
29896,
3569,
1412,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
365,
29916,
584,
938,
13,
4706,
450,
1353,
310,
921,
29899,
29879,
29399,
29889,
13,
1678,
8626,
584,
938,
13,
4706,
450,
1353,
310,
343,
29899,
29879,
29399,
29889,
13,
1678,
365,
29920,
584,
938,
13,
4706,
450,
1353,
310,
503,
29899,
29879,
29399,
29889,
13,
1678,
1886,
22437,
584,
1246,
519,
470,
5665,
310,
1246,
519,
13,
4706,
6680,
29898,
29879,
29897,
393,
2125,
6389,
4954,
29898,
29875,
29892,
432,
29892,
413,
3569,
29952,
322,
5706,
1790,
13,
4706,
14821,
29892,
4550,
16184,
263,
21224,
29889,
13,
1678,
1302,
29877,
29918,
4572,
584,
1246,
519,
13,
4706,
6680,
393,
4893,
6389,
4954,
29898,
29875,
29892,
432,
29892,
413,
3569,
29952,
322,
871,
3639,
4954,
5574,
16159,
565,
13,
4706,
445,
338,
304,
367,
263,
2854,
6257,
14821,
29889,
13,
13,
1678,
612,
969,
29879,
13,
1678,
448,
23648,
13,
1678,
21224,
584,
18761,
29961,
23583,
29961,
524,
29892,
938,
29892,
938,
1402,
18761,
29961,
524,
29892,
938,
29892,
938,
5262,
13,
4706,
319,
5101,
310,
10350,
29889,
13,
13,
1678,
1222,
9422,
13,
1678,
448,
26589,
13,
13,
1678,
3251,
403,
20471,
12307,
289,
13788,
29901,
13,
13,
4706,
8653,
363,
21224,
297,
2531,
29918,
29941,
29881,
29918,
29890,
13788,
29898,
29906,
29892,
29871,
29906,
29892,
29871,
29906,
29892,
518,
2892,
474,
29892,
432,
29892,
413,
29901,
313,
29875,
718,
29871,
29896,
29892,
432,
29892,
413,
511,
13,
4706,
2023,
462,
462,
1678,
14013,
474,
29892,
432,
29892,
413,
29901,
313,
29875,
29892,
432,
718,
29871,
29896,
29892,
413,
511,
13,
4706,
2023,
462,
462,
1678,
14013,
474,
29892,
432,
29892,
413,
29901,
313,
29875,
29892,
432,
29892,
413,
718,
29871,
29896,
4638,
1125,
13,
4706,
2023,
268,
1596,
29898,
29890,
898,
29897,
13,
4706,
5135,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
511,
313,
29896,
29892,
29871,
29900,
29892,
29871,
29900,
876,
13,
4706,
5135,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
511,
313,
29900,
29892,
29871,
29896,
29892,
29871,
29900,
876,
13,
4706,
5135,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
511,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
876,
13,
4706,
5135,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
511,
313,
29896,
29892,
29871,
29900,
29892,
29871,
29896,
876,
13,
4706,
5135,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
511,
313,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
876,
13,
4706,
5135,
29900,
29892,
29871,
29896,
29892,
29871,
29900,
511,
313,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
876,
13,
4706,
5135,
29900,
29892,
29871,
29896,
29892,
29871,
29900,
511,
313,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
876,
13,
4706,
5135,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
511,
313,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
876,
13,
4706,
5135,
29896,
29892,
29871,
29900,
29892,
29871,
29900,
511,
313,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
876,
13,
4706,
5135,
29896,
29892,
29871,
29900,
29892,
29871,
29900,
511,
313,
29896,
29892,
29871,
29900,
29892,
29871,
29896,
876,
13,
4706,
5135,
29896,
29892,
29871,
29900,
29892,
29871,
29896,
511,
313,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
876,
13,
4706,
5135,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
511,
313,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
876,
13,
13,
1678,
9995,
13,
13,
1678,
565,
1246,
519,
29898,
1655,
22437,
1125,
13,
4706,
1886,
22437,
353,
313,
1655,
22437,
29892,
29897,
13,
13,
1678,
363,
474,
29892,
432,
29892,
413,
297,
3234,
29898,
3881,
29898,
29931,
29916,
511,
3464,
29898,
29931,
29891,
511,
3464,
29898,
29931,
29920,
22164,
13,
4706,
565,
313,
1111,
29877,
29918,
4572,
338,
6213,
29897,
470,
1302,
29877,
29918,
4572,
29898,
29875,
29892,
432,
29892,
413,
1125,
13,
9651,
363,
1886,
2496,
297,
1886,
22437,
29901,
13,
18884,
474,
29906,
29892,
432,
29906,
29892,
413,
29906,
353,
1886,
2496,
29898,
29875,
29892,
432,
29892,
413,
29897,
13,
18884,
565,
313,
29900,
5277,
474,
29906,
529,
365,
29916,
29897,
322,
313,
29900,
5277,
432,
29906,
529,
8626,
29897,
322,
313,
29900,
5277,
413,
29906,
529,
365,
29920,
1125,
13,
462,
1678,
7709,
313,
29875,
29892,
432,
29892,
413,
511,
313,
29875,
29906,
29892,
432,
29906,
29892,
413,
29906,
29897,
13,
13,
13,
1990,
323,
6073,
13724,
29941,
29928,
29898,
29911,
6073,
13724,
1125,
13,
13,
1678,
903,
12194,
4717,
29918,
8618,
7024,
353,
313,
13,
4706,
22868,
2746,
29918,
4039,
29918,
333,
742,
13,
4706,
22868,
29916,
29918,
4039,
29918,
333,
742,
13,
4706,
22868,
29891,
29918,
4039,
29918,
333,
742,
13,
4706,
22868,
29920,
29918,
4039,
29918,
333,
742,
13,
4706,
22868,
29931,
29916,
742,
13,
4706,
22868,
29931,
29891,
742,
13,
4706,
22868,
29931,
29920,
742,
13,
1678,
1723,
13,
13,
1678,
822,
903,
23712,
29918,
29941,
29881,
29898,
1311,
29892,
916,
1125,
13,
4706,
9995,
5596,
3692,
4954,
1311,
16159,
322,
4954,
1228,
16159,
526,
15878,
29871,
29941,
29928,
12489,
13,
4706,
14379,
1316,
393,
896,
508,
3933,
263,
29871,
29941,
29928,
12489,
3564,
746,
12420,
29889,
13,
4706,
9995,
13,
4706,
736,
313,
13,
9651,
338,
8758,
29898,
1228,
29892,
323,
6073,
13724,
29941,
29928,
29897,
322,
13,
9651,
599,
29898,
657,
5552,
29898,
1311,
29892,
321,
29897,
1275,
679,
5552,
29898,
1228,
29892,
321,
29897,
13,
18884,
363,
321,
297,
323,
6073,
13724,
29941,
29928,
3032,
12194,
4717,
29918,
8618,
7024,
29897,
13,
4706,
1723,
13,
13,
1678,
822,
4770,
392,
12035,
1311,
29892,
916,
1125,
13,
4706,
716,
353,
2428,
2141,
1649,
392,
12035,
1228,
29897,
13,
4706,
565,
1583,
3032,
23712,
29918,
29941,
29881,
29898,
1228,
1125,
13,
9651,
716,
29889,
1493,
29918,
294,
23538,
29911,
6073,
13724,
29941,
29928,
29892,
763,
29922,
1311,
29897,
13,
4706,
736,
716,
13,
13,
1678,
822,
4770,
272,
12035,
1311,
29892,
916,
1125,
13,
4706,
716,
353,
2428,
2141,
1649,
272,
12035,
1228,
29897,
13,
4706,
565,
1583,
3032,
23712,
29918,
29941,
29881,
29898,
1228,
1125,
13,
9651,
716,
29889,
1493,
29918,
294,
23538,
29911,
6073,
13724,
29941,
29928,
29892,
763,
29922,
1311,
29897,
13,
4706,
736,
716,
13,
13,
1678,
732,
6799,
13,
1678,
822,
365,
29916,
29898,
1311,
1125,
13,
4706,
9995,
1576,
1353,
310,
921,
29899,
29879,
29399,
29889,
13,
4706,
9995,
13,
4706,
736,
1583,
3032,
29931,
29916,
13,
13,
1678,
732,
6799,
13,
1678,
822,
8626,
29898,
1311,
1125,
13,
4706,
9995,
1576,
1353,
310,
343,
29899,
29879,
29399,
29889,
13,
4706,
9995,
13,
4706,
736,
1583,
3032,
29931,
29891,
13,
13,
1678,
732,
6799,
13,
1678,
822,
365,
29920,
29898,
1311,
1125,
13,
4706,
9995,
1576,
1353,
310,
503,
29899,
29879,
29399,
29889,
13,
4706,
9995,
13,
4706,
736,
1583,
3032,
29931,
29920,
13,
13,
1678,
732,
6799,
13,
1678,
822,
302,
16315,
29898,
1311,
1125,
13,
4706,
9995,
1576,
3001,
1353,
310,
11840,
29889,
13,
4706,
9995,
13,
4706,
736,
1583,
3032,
29931,
29916,
334,
1583,
3032,
29931,
29891,
334,
1583,
3032,
29931,
29920,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3268,
29918,
4039,
29918,
333,
29898,
1311,
1125,
13,
4706,
9995,
1576,
1347,
1580,
3709,
363,
4055,
3460,
1269,
3268,
310,
445,
29871,
29941,
29928,
323,
29940,
29889,
13,
4706,
9995,
13,
4706,
736,
1583,
3032,
2746,
29918,
4039,
29918,
333,
13,
13,
1678,
822,
3268,
29918,
4039,
29898,
1311,
29892,
474,
29892,
432,
29892,
413,
1125,
13,
4706,
9995,
1576,
1024,
310,
278,
4055,
1580,
6832,
5414,
278,
12489,
472,
3268,
4954,
29898,
29875,
29892,
432,
29892,
413,
3569,
1412,
13,
4706,
9995,
13,
4706,
565,
451,
338,
8758,
29898,
29875,
29892,
851,
1125,
13,
9651,
474,
353,
474,
1273,
1583,
29889,
29931,
29916,
13,
4706,
565,
451,
338,
8758,
29898,
29926,
29892,
851,
1125,
13,
9651,
432,
353,
432,
1273,
1583,
29889,
29931,
29891,
13,
4706,
565,
451,
338,
8758,
29898,
29895,
29892,
851,
1125,
13,
9651,
413,
353,
413,
1273,
1583,
29889,
29931,
29920,
13,
4706,
736,
1583,
29889,
2746,
29918,
4039,
29918,
333,
29889,
4830,
29898,
29875,
29892,
432,
29892,
413,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
921,
29918,
4039,
29918,
333,
29898,
1311,
1125,
13,
4706,
9995,
1576,
1347,
1580,
3709,
363,
4055,
3460,
1269,
921,
29899,
18337,
310,
445,
29871,
29941,
29928,
323,
29940,
29889,
13,
4706,
9995,
13,
4706,
736,
1583,
3032,
29916,
29918,
4039,
29918,
333,
13,
13,
1678,
822,
921,
29918,
4039,
29898,
1311,
29892,
474,
1125,
13,
4706,
565,
451,
338,
8758,
29898,
29875,
29892,
851,
1125,
13,
9651,
474,
353,
474,
1273,
1583,
29889,
29931,
29916,
13,
4706,
736,
1583,
29889,
29916,
29918,
4039,
29918,
333,
29889,
4830,
29898,
29875,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
921,
29918,
11338,
29898,
1311,
1125,
13,
4706,
9995,
29909,
18761,
310,
599,
310,
278,
4954,
29931,
29916,
16159,
1422,
921,
29899,
18337,
8282,
29889,
13,
4706,
9995,
13,
4706,
736,
18761,
29898,
1958,
29898,
1311,
29889,
29916,
29918,
4039,
29892,
3464,
29898,
1311,
29889,
29931,
29916,
4961,
13,
13,
1678,
732,
6799,
13,
1678,
822,
343,
29918,
4039,
29918,
333,
29898,
1311,
1125,
13,
4706,
9995,
1576,
1347,
1580,
3709,
363,
4055,
3460,
1269,
343,
29899,
18337,
310,
445,
29871,
29941,
29928,
323,
29940,
29889,
13,
4706,
9995,
13,
4706,
736,
1583,
3032,
29891,
29918,
4039,
29918,
333,
13,
13,
1678,
822,
343,
29918,
4039,
29898,
1311,
29892,
432,
1125,
13,
4706,
565,
451,
338,
8758,
29898,
29926,
29892,
851,
1125,
13,
9651,
432,
353,
432,
1273,
1583,
29889,
29931,
29891,
13,
4706,
736,
1583,
29889,
29891,
29918,
4039,
29918,
333,
29889,
4830,
29898,
29926,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
343,
29918,
11338,
29898,
1311,
1125,
13,
4706,
9995,
29909,
18761,
310,
599,
310,
278,
4954,
29931,
29891,
16159,
1422,
343,
29899,
18337,
8282,
29889,
13,
4706,
9995,
13,
4706,
736,
18761,
29898,
1958,
29898,
1311,
29889,
29891,
29918,
4039,
29892,
3464,
29898,
1311,
29889,
29931,
29891,
4961,
13,
13,
1678,
732,
6799,
13,
1678,
822,
503,
29918,
4039,
29918,
333,
29898,
1311,
1125,
13,
4706,
9995,
1576,
1347,
1580,
3709,
363,
4055,
3460,
1269,
503,
29899,
18337,
310,
445,
29871,
29941,
29928,
323,
29940,
29889,
13,
4706,
9995,
13,
4706,
736,
1583,
3032,
29920,
29918,
4039,
29918,
333,
13,
13,
1678,
822,
503,
29918,
4039,
29898,
1311,
29892,
413,
1125,
13,
4706,
565,
451,
338,
8758,
29898,
29895,
29892,
851,
1125,
13,
9651,
413,
353,
413,
1273,
1583,
29889,
29931,
29920,
13,
4706,
736,
1583,
29889,
29920,
29918,
4039,
29918,
333,
29889,
4830,
29898,
29895,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
503,
29918,
11338,
29898,
1311,
1125,
13,
4706,
9995,
29909,
18761,
310,
599,
310,
278,
4954,
29931,
29920,
16159,
1422,
503,
29899,
18337,
8282,
29889,
13,
4706,
9995,
13,
4706,
736,
18761,
29898,
1958,
29898,
1311,
29889,
29920,
29918,
4039,
29892,
3464,
29898,
1311,
29889,
29931,
29920,
4961,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3268,
29918,
11338,
29898,
1311,
1125,
13,
4706,
9995,
3596,
310,
278,
4954,
29931,
29916,
334,
8626,
16159,
3268,
8282,
29889,
13,
4706,
9995,
13,
4706,
736,
18761,
29898,
8508,
1958,
29898,
1311,
29889,
2746,
29918,
4039,
29892,
1583,
29889,
1885,
29918,
2746,
29918,
1111,
359,
22130,
13,
13,
1678,
822,
5505,
29918,
13441,
29918,
1111,
29877,
29898,
1311,
29892,
1302,
29877,
1125,
13,
4706,
9995,
5596,
565,
4954,
1111,
29877,
16159,
338,
263,
18761,
310,
2211,
938,
29879,
322,
3588,
304,
278,
13,
4706,
6590,
3268,
4055,
565,
577,
29889,
13,
4706,
9995,
13,
4706,
565,
451,
338,
8758,
29898,
1111,
29877,
29892,
851,
1125,
13,
9651,
1018,
29901,
13,
18884,
474,
29892,
432,
29892,
413,
353,
2910,
29898,
524,
29892,
1302,
29877,
29897,
13,
18884,
736,
1583,
29889,
2746,
29918,
4039,
29898,
29875,
29892,
432,
29892,
413,
29897,
13,
9651,
5174,
313,
1917,
2392,
29892,
20948,
1125,
13,
18884,
1209,
13,
4706,
736,
1302,
29877,
13,
13,
1678,
822,
903,
657,
29918,
29873,
4841,
29918,
3166,
29918,
11338,
29898,
1311,
29892,
8282,
29892,
607,
2433,
497,
29374,
13,
4706,
9995,
4013,
338,
278,
740,
393,
16869,
10350,
1316,
408,
4954,
29898,
29875,
29892,
432,
29892,
413,
3569,
29952,
367,
13,
4706,
1304,
363,
1784,
525,
4039,
29915,
2729,
3168,
29889,
13,
4706,
9995,
13,
4706,
8282,
353,
1583,
29889,
26026,
29918,
13441,
29918,
1111,
29877,
29898,
11338,
29897,
13,
4706,
736,
2428,
2141,
29918,
657,
29918,
29873,
4841,
29918,
3166,
29918,
11338,
29898,
11338,
29892,
607,
29922,
4716,
29897,
13,
13,
1678,
822,
2531,
29918,
2746,
29918,
1111,
359,
29898,
1311,
1125,
13,
4706,
9995,
5631,
403,
10350,
363,
599,
278,
11840,
297,
445,
29871,
29941,
29928,
323,
29940,
29889,
13,
4706,
9995,
13,
4706,
736,
3234,
29898,
3881,
29898,
1311,
29889,
29931,
29916,
511,
3464,
29898,
1311,
29889,
29931,
29891,
511,
3464,
29898,
1311,
29889,
29931,
29920,
876,
13,
13,
1678,
822,
2531,
29918,
29890,
898,
29918,
1111,
359,
29898,
1311,
1125,
13,
4706,
9995,
5631,
403,
11000,
310,
10350,
363,
599,
278,
289,
13788,
297,
445,
29871,
29941,
29928,
323,
29940,
29889,
13,
4706,
9995,
13,
4706,
736,
2531,
29918,
29941,
29881,
29918,
29890,
13788,
29898,
1311,
29889,
29931,
29916,
29892,
1583,
29889,
29931,
29891,
29892,
1583,
29889,
29931,
29920,
29892,
1886,
22437,
11759,
13,
9651,
14013,
474,
29892,
432,
29892,
413,
29901,
313,
29875,
718,
29871,
29896,
29892,
432,
29892,
413,
511,
13,
9651,
14013,
474,
29892,
432,
29892,
413,
29901,
313,
29875,
29892,
432,
718,
29871,
29896,
29892,
413,
511,
13,
9651,
14013,
474,
29892,
432,
29892,
413,
29901,
313,
29875,
29892,
432,
29892,
413,
718,
29871,
29896,
511,
13,
308,
2314,
13,
13,
1678,
822,
4770,
657,
667,
12035,
1311,
29892,
1820,
1125,
13,
4706,
9995,
2558,
2729,
12489,
9262,
29892,
8454,
363,
6043,
2729,
21697,
29889,
13,
4706,
9995,
13,
4706,
736,
2428,
2141,
1649,
657,
667,
12035,
1311,
29889,
26026,
29918,
13441,
29918,
1111,
29877,
29898,
1989,
876,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
9995,
17491,
1353,
310,
269,
29399,
964,
3918,
1596,
29889,
13,
4706,
9995,
13,
4706,
269,
353,
2428,
2141,
1649,
276,
558,
1649,
580,
13,
4706,
4805,
353,
313,
29888,
742,
365,
29916,
3790,
1311,
29889,
29931,
29916,
1118,
8626,
3790,
1311,
29889,
29931,
29891,
1118,
365,
29920,
3790,
1311,
29889,
29931,
29920,
1118,
525,
13,
462,
285,
29915,
3317,
29918,
29890,
898,
3790,
1311,
29889,
3317,
29918,
29890,
898,
28296,
1495,
13,
4706,
269,
353,
285,
29915,
29912,
29879,
7503,
29899,
29906,
29962,
1157,
17833,
1157,
29879,
14352,
29906,
17531,
10162,
13,
4706,
736,
269,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
9995,
17491,
1353,
310,
269,
29399,
964,
3918,
1596,
29889,
13,
4706,
9995,
13,
4706,
269,
353,
2428,
2141,
1649,
276,
558,
1649,
580,
13,
4706,
4805,
353,
313,
29888,
742,
365,
29916,
3790,
1311,
29889,
29931,
29916,
1118,
8626,
3790,
1311,
29889,
29931,
29891,
1118,
365,
29920,
3790,
1311,
29889,
29931,
29920,
10162,
13,
462,
285,
29915,
3317,
29918,
29890,
898,
3790,
1311,
29889,
3317,
29918,
29890,
898,
28296,
1495,
13,
4706,
269,
353,
285,
29915,
29912,
29879,
7503,
29899,
29906,
29962,
1157,
17833,
1157,
29879,
14352,
29906,
17531,
10162,
13,
4706,
736,
269,
13,
13,
1678,
822,
1652,
8606,
29898,
1311,
29892,
285,
1509,
29918,
4713,
747,
13788,
29922,
5574,
29892,
297,
6689,
29922,
8824,
1125,
13,
4706,
9995,
21263,
599,
25187,
943,
6590,
304,
1269,
3268,
964,
697,
29889,
13,
4706,
9995,
13,
4706,
260,
29876,
353,
1583,
565,
297,
6689,
1683,
1583,
29889,
8552,
580,
13,
13,
4706,
363,
474,
29892,
432,
29892,
413,
297,
1583,
29889,
1885,
29918,
2746,
29918,
1111,
359,
7295,
13,
9651,
260,
29876,
6228,
29922,
313,
29875,
29892,
432,
29892,
413,
29897,
13,
13,
4706,
565,
285,
1509,
29918,
4713,
747,
13788,
29901,
13,
9651,
260,
29876,
29889,
29888,
1509,
29918,
4713,
747,
13788,
29918,
580,
13,
13,
4706,
736,
260,
29876,
29889,
1493,
29918,
294,
23538,
29911,
6073,
13724,
29941,
4037,
5066,
29892,
763,
29922,
1311,
29897,
13,
13,
1678,
1652,
8606,
29918,
353,
2090,
312,
8789,
29889,
3846,
5696,
29898,
1579,
8606,
29892,
297,
6689,
29922,
5574,
29897,
13,
13,
13,
1753,
338,
29918,
29880,
650,
29918,
1111,
29877,
29898,
3062,
1125,
13,
1678,
9995,
5596,
565,
4954,
3062,
16159,
756,
1063,
6790,
408,
263,
2323,
14821,
21954,
29873,
29889,
13,
1678,
9995,
13,
1678,
736,
313,
2435,
29898,
3062,
29897,
1275,
29871,
29941,
29897,
322,
313,
275,
8758,
29898,
3062,
29961,
29900,
1402,
17100,
284,
876,
13,
13,
13,
1990,
323,
6073,
13724,
29941,
29928,
12877,
29898,
29911,
6073,
13724,
29941,
29928,
29892,
13,
462,
9651,
323,
6073,
13724,
1125,
13,
1678,
9995,
29924,
861,
262,
770,
29871,
363,
263,
29871,
29941,
29928,
6862,
24094,
4608,
323,
29940,
29892,
474,
29889,
29872,
29889,
697,
411,
263,
2323,
13,
1678,
9128,
2380,
639,
3268,
29889,
13,
1678,
9995,
13,
13,
1678,
903,
12194,
4717,
29918,
8618,
7024,
353,
313,
13,
4706,
22868,
2746,
29918,
4039,
29918,
333,
742,
13,
4706,
22868,
29916,
29918,
4039,
29918,
333,
742,
13,
4706,
22868,
29891,
29918,
4039,
29918,
333,
742,
13,
4706,
22868,
29920,
29918,
4039,
29918,
333,
742,
13,
4706,
22868,
29931,
29916,
742,
13,
4706,
22868,
29931,
29891,
742,
13,
4706,
22868,
29931,
29920,
742,
13,
4706,
22868,
2746,
29918,
513,
29918,
333,
742,
13,
1678,
1723,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3268,
29918,
513,
29918,
333,
29898,
1311,
1125,
13,
4706,
736,
1583,
3032,
2746,
29918,
513,
29918,
333,
13,
13,
1678,
822,
3268,
29918,
513,
29898,
1311,
29892,
474,
29892,
432,
29892,
413,
1125,
13,
4706,
565,
451,
338,
8758,
29898,
29875,
29892,
851,
1125,
13,
9651,
474,
353,
474,
1273,
1583,
29889,
29931,
29916,
13,
4706,
565,
451,
338,
8758,
29898,
29926,
29892,
851,
1125,
13,
9651,
432,
353,
432,
1273,
1583,
29889,
29931,
29891,
13,
4706,
565,
451,
338,
8758,
29898,
29895,
29892,
851,
1125,
13,
9651,
413,
353,
413,
1273,
1583,
29889,
29931,
29920,
13,
4706,
736,
1583,
29889,
2746,
29918,
513,
29918,
333,
29889,
4830,
29898,
29875,
29892,
432,
29892,
413,
29897,
13,
13,
1678,
822,
337,
2248,
29918,
16315,
29898,
1311,
29892,
716,
29918,
333,
29892,
988,
29922,
8516,
29892,
297,
6689,
29922,
8824,
1125,
13,
4706,
565,
988,
338,
6213,
29901,
13,
9651,
988,
353,
1583,
29889,
1885,
29918,
2746,
29918,
1111,
359,
580,
13,
13,
4706,
736,
1583,
29889,
276,
2248,
29898,
13,
9651,
426,
13,
18884,
1583,
29889,
2746,
29918,
513,
10456,
1111,
29877,
1125,
716,
29918,
333,
29889,
4830,
10456,
1111,
29877,
29897,
363,
1302,
29877,
297,
988,
13,
9651,
2981,
13,
9651,
297,
6689,
29922,
262,
6689,
13,
4706,
1723,
13,
13,
1678,
732,
2746,
29918,
513,
29918,
333,
29889,
842,
357,
13,
1678,
822,
3268,
29918,
513,
29918,
333,
29898,
1311,
29892,
716,
29918,
333,
1125,
13,
4706,
565,
1583,
3032,
2746,
29918,
513,
29918,
333,
2804,
716,
29918,
333,
29901,
13,
9651,
1583,
29889,
276,
2248,
29918,
16315,
29898,
1482,
29918,
333,
29892,
297,
6689,
29922,
5574,
29897,
13,
9651,
1583,
3032,
2746,
29918,
513,
29918,
333,
353,
716,
29918,
333,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3268,
29918,
12772,
29898,
1311,
1125,
13,
4706,
9995,
3596,
310,
278,
3268,
1399,
29879,
29889,
13,
4706,
9995,
13,
4706,
736,
18761,
29898,
8508,
1958,
29898,
1311,
29889,
2746,
29918,
513,
29892,
1583,
29889,
1885,
29918,
2746,
29918,
1111,
359,
22130,
13,
13,
1678,
822,
304,
29918,
1145,
344,
29898,
1311,
29892,
334,
12772,
29918,
11762,
29892,
3579,
1285,
1461,
29918,
25707,
1125,
13,
4706,
9995,
11609,
278,
20619,
413,
300,
1873,
310,
445,
29871,
29941,
29928,
4608,
29892,
474,
29889,
29872,
29889,
263,
4954,
29939,
2378,
16159,
13,
4706,
411,
8267,
8521,
29896,
29892,
29871,
29896,
467,
13,
4706,
9995,
13,
4706,
565,
451,
1399,
29879,
29918,
11762,
29901,
13,
9651,
396,
925,
671,
1051,
310,
3268,
16285,
13,
9651,
736,
437,
877,
690,
14443,
742,
323,
6073,
13724,
29889,
517,
29918,
1145,
344,
29898,
13,
18884,
1583,
29892,
1583,
29889,
2746,
29918,
12772,
29892,
3579,
1285,
1461,
29918,
25707,
13,
9651,
10353,
8521,
29896,
29892,
29871,
29896,
876,
13,
13,
4706,
736,
323,
6073,
13724,
29889,
517,
29918,
1145,
344,
29898,
1311,
29892,
334,
12772,
29918,
11762,
29892,
3579,
1285,
1461,
29918,
25707,
29897,
13,
13,
1678,
822,
4824,
29918,
6229,
29898,
1311,
29892,
474,
29922,
8516,
29892,
432,
29922,
8516,
29892,
413,
29922,
8516,
1125,
13,
4706,
9995,
2577,
278,
2159,
310,
278,
9128,
16285,
847,
263,
2702,
9128,
2380,
29889,
13,
4706,
9995,
13,
4706,
565,
313,
29875,
338,
451,
6213,
29897,
322,
313,
29926,
338,
451,
6213,
29897,
322,
313,
29895,
338,
451,
6213,
1125,
13,
9651,
9277,
353,
1583,
29889,
2746,
29918,
513,
29898,
29875,
29892,
432,
29892,
413,
29897,
13,
4706,
1683,
29901,
13,
9651,
396,
2758,
363,
746,
777,
9128,
16285,
1795,
505,
1063,
8078,
287,
13,
9651,
9277,
353,
2446,
29898,
1524,
29898,
13,
18884,
474,
29916,
363,
474,
29916,
297,
1583,
29889,
2746,
29918,
12772,
565,
474,
29916,
297,
1583,
29889,
513,
29918,
1958,
13,
632,
876,
13,
4706,
736,
1583,
29889,
513,
29918,
2311,
29898,
29886,
861,
29897,
13,
13,
1678,
822,
12417,
29898,
13,
4706,
1583,
29892,
13,
4706,
402,
29892,
13,
4706,
988,
29892,
13,
4706,
8078,
29922,
8824,
29892,
13,
4706,
8282,
29922,
8516,
29892,
13,
4706,
5235,
29922,
8516,
29892,
13,
4706,
297,
6689,
29922,
8824,
29892,
13,
4706,
3579,
510,
2139,
29918,
25707,
29892,
13,
268,
1125,
13,
4706,
9995,
2052,
368,
263,
12417,
4954,
29954,
16159,
304,
11840,
4954,
3062,
29952,
1673,
2225,
29530,
278,
11420,
3268,
13,
4706,
1399,
29879,
29889,
13,
4706,
9995,
13,
4706,
565,
338,
29918,
29880,
650,
29918,
1111,
29877,
29898,
3062,
1125,
13,
9651,
988,
353,
313,
3062,
29892,
29897,
13,
4706,
1683,
29901,
13,
9651,
988,
353,
18761,
29898,
3062,
29897,
13,
13,
4706,
1399,
29879,
353,
18761,
29898,
8508,
1958,
29898,
1311,
29889,
2746,
29918,
513,
29892,
988,
876,
13,
4706,
736,
2428,
2141,
17062,
29918,
12772,
29898,
13,
9651,
402,
29892,
1399,
29879,
29892,
8078,
29922,
1285,
1461,
29892,
8282,
29922,
11338,
29892,
5235,
29922,
3888,
29892,
297,
6689,
29922,
262,
6689,
29892,
13,
9651,
3579,
510,
2139,
29918,
25707,
13,
4706,
1723,
13,
13,
1678,
12417,
29918,
353,
2090,
312,
8789,
29889,
3846,
5696,
29898,
17062,
29892,
297,
6689,
29922,
5574,
29897,
13,
13,
13,
1990,
323,
6073,
13724,
29941,
4037,
5066,
29898,
29911,
6073,
13724,
29941,
29928,
29892,
13,
462,
3986,
323,
6073,
13724,
1125,
13,
1678,
9995,
29924,
861,
262,
770,
363,
263,
29871,
29941,
29928,
6862,
24094,
12489,
3564,
411,
263,
2323,
12489,
13,
1678,
639,
3268,
29892,
363,
1342,
29892,
1716,
349,
29923,
7024,
322,
349,
29923,
13152,
29879,
29889,
13,
1678,
9995,
13,
13,
1678,
903,
12194,
4717,
29918,
8618,
7024,
353,
313,
13,
4706,
22868,
2746,
29918,
4039,
29918,
333,
742,
13,
4706,
22868,
29916,
29918,
4039,
29918,
333,
742,
13,
4706,
22868,
29891,
29918,
4039,
29918,
333,
742,
13,
4706,
22868,
29920,
29918,
4039,
29918,
333,
742,
13,
4706,
22868,
29931,
29916,
742,
13,
4706,
22868,
29931,
29891,
742,
13,
4706,
22868,
29931,
29920,
742,
13,
1678,
1723,
13,
13,
1678,
822,
21224,
29898,
1311,
29892,
1302,
29877,
29896,
29892,
1302,
29877,
29906,
1125,
13,
4706,
9995,
2577,
278,
1024,
310,
278,
2380,
16184,
278,
21224,
1546,
11840,
472,
13,
4706,
4954,
1111,
29877,
29896,
16159,
322,
4954,
1111,
29877,
29906,
29952,
1412,
13,
4706,
9995,
13,
4706,
289,
29918,
861,
29892,
353,
1583,
29961,
1111,
29877,
29896,
1822,
29890,
13788,
29898,
1311,
29961,
1111,
29877,
29906,
2314,
13,
4706,
736,
289,
29918,
861,
13,
13,
1678,
822,
21224,
29918,
2311,
29898,
1311,
29892,
1302,
29877,
29896,
29892,
1302,
29877,
29906,
1125,
13,
4706,
9995,
11609,
278,
2159,
310,
278,
21224,
1546,
11840,
472,
4954,
1111,
29877,
29896,
16159,
322,
4954,
1111,
29877,
29906,
29952,
1412,
13,
4706,
9995,
13,
4706,
289,
29918,
861,
353,
1583,
29889,
29890,
898,
29898,
1111,
29877,
29896,
29892,
1302,
29877,
29906,
29897,
13,
4706,
736,
1583,
29961,
1111,
29877,
29896,
1822,
513,
29918,
2311,
29898,
29890,
29918,
861,
29897,
13,
13,
13,
1990,
349,
29923,
7024,
29941,
29928,
29898,
29911,
6073,
13724,
29941,
29928,
12877,
29892,
13,
632,
323,
6073,
13724,
29941,
4037,
5066,
29892,
13,
632,
323,
6073,
13724,
29941,
29928,
29892,
13,
632,
323,
6073,
13724,
1125,
13,
1678,
364,
15945,
29908,
7653,
287,
4284,
574,
839,
349,
1466,
3900,
1203,
313,
29941,
29928,
467,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
7049,
584,
5665,
310,
5665,
310,
5665,
310,
1409,
13,
4706,
450,
7136,
12489,
848,
7049,
29889,
13,
1678,
8267,
584,
851,
29892,
13136,
13,
4706,
8449,
1797,
278,
13391,
310,
278,
7049,
526,
6087,
297,
29892,
278,
2322,
13,
4706,
4954,
29915,
332,
11512,
29880,
25288,
11120,
29952,
15028,
363,
6702,
786,
742,
525,
1266,
742,
525,
8862,
742,
1623,
742,
525,
1563,
742,
13,
4706,
525,
915,
16887,
742,
525,
14017,
936,
1495,
6593,
313,
29916,
29974,
29892,
343,
29974,
29892,
503,
29974,
29892,
921,
15767,
343,
15767,
503,
15767,
9128,
29897,
13,
4706,
8307,
29889,
4398,
29879,
373,
278,
7636,
310,
24094,
526,
12023,
304,
367,
4567,
13,
4706,
278,
6590,
9927,
29889,
13,
1678,
8282,
584,
731,
29961,
710,
1402,
13136,
13,
4706,
7338,
336,
5534,
8282,
304,
788,
304,
278,
12489,
3564,
29889,
13,
1678,
3268,
29918,
513,
29918,
333,
584,
851,
29892,
13136,
13,
4706,
1714,
1580,
3709,
363,
22006,
15687,
310,
3268,
16285,
29889,
13,
1678,
3268,
29918,
4039,
29918,
333,
584,
851,
29892,
13136,
13,
4706,
1714,
1580,
3709,
363,
22006,
15687,
310,
3268,
8282,
29889,
13,
1678,
921,
29918,
4039,
29918,
333,
584,
851,
29892,
13136,
13,
4706,
1714,
1580,
3709,
363,
22006,
15687,
310,
921,
29899,
18337,
8282,
29889,
13,
1678,
343,
29918,
4039,
29918,
333,
584,
851,
29892,
13136,
13,
4706,
1714,
1580,
3709,
363,
22006,
15687,
310,
343,
29899,
18337,
8282,
29889,
13,
1678,
503,
29918,
4039,
29918,
333,
584,
851,
29892,
13136,
13,
4706,
1714,
1580,
3709,
363,
22006,
15687,
310,
503,
29899,
18337,
8282,
29889,
13,
1678,
9995,
13,
13,
1678,
903,
12194,
4717,
29918,
8618,
7024,
353,
313,
13,
4706,
22868,
2746,
29918,
4039,
29918,
333,
742,
13,
4706,
22868,
29916,
29918,
4039,
29918,
333,
742,
13,
4706,
22868,
29891,
29918,
4039,
29918,
333,
742,
13,
4706,
22868,
29920,
29918,
4039,
29918,
333,
742,
13,
4706,
22868,
29931,
29916,
742,
13,
4706,
22868,
29931,
29891,
742,
13,
4706,
22868,
29931,
29920,
742,
13,
4706,
22868,
2746,
29918,
513,
29918,
333,
742,
13,
1678,
1723,
13,
13,
1678,
822,
4770,
2344,
12035,
13,
4706,
1583,
29892,
13,
4706,
7049,
29892,
13,
4706,
334,
29892,
13,
4706,
8267,
2433,
332,
11512,
29880,
25288,
742,
13,
4706,
8282,
29922,
8516,
29892,
13,
4706,
3268,
29918,
513,
29918,
333,
2433,
29895,
29912,
29087,
1118,
8875,
742,
13,
4706,
3268,
29918,
4039,
29918,
333,
2433,
29902,
29912,
29087,
1118,
8875,
742,
13,
4706,
921,
29918,
4039,
29918,
333,
2433,
29990,
8875,
742,
13,
4706,
343,
29918,
4039,
29918,
333,
2433,
29979,
8875,
742,
13,
4706,
503,
29918,
4039,
29918,
333,
2433,
29999,
8875,
742,
13,
4706,
3579,
6277,
29918,
25707,
13,
268,
1125,
13,
13,
4706,
565,
338,
8758,
29898,
2378,
29879,
29892,
349,
29923,
7024,
29941,
29928,
1125,
13,
9651,
2428,
2141,
1649,
2344,
12035,
2378,
29879,
29897,
13,
9651,
736,
13,
13,
4706,
8282,
353,
8282,
29918,
517,
29918,
359,
300,
29898,
11338,
29897,
13,
4706,
1583,
3032,
2746,
29918,
513,
29918,
333,
353,
3268,
29918,
513,
29918,
333,
13,
4706,
1583,
3032,
2746,
29918,
4039,
29918,
333,
353,
3268,
29918,
4039,
29918,
333,
13,
4706,
1583,
3032,
29916,
29918,
4039,
29918,
333,
353,
921,
29918,
4039,
29918,
333,
13,
4706,
1583,
3032,
29891,
29918,
4039,
29918,
333,
353,
343,
29918,
4039,
29918,
333,
13,
4706,
1583,
3032,
29920,
29918,
4039,
29918,
333,
353,
503,
29918,
4039,
29918,
333,
13,
13,
4706,
7049,
353,
18761,
29898,
23583,
29898,
23583,
29898,
29920,
363,
503,
297,
343,
29897,
363,
343,
297,
921,
29897,
363,
921,
297,
7049,
29897,
13,
4706,
1583,
3032,
29931,
29916,
353,
7431,
29898,
2378,
29879,
29897,
13,
4706,
1583,
3032,
29931,
29891,
353,
7431,
29898,
2378,
29879,
29961,
29900,
2314,
13,
4706,
1583,
3032,
29931,
29920,
353,
7431,
29898,
2378,
29879,
29961,
29900,
3816,
29900,
2314,
13,
4706,
25187,
943,
353,
5159,
13,
13,
4706,
396,
7090,
363,
1716,
4969,
322,
5663,
15387,
16285,
13,
4706,
474,
29916,
353,
2322,
8977,
29898,
9502,
29918,
25118,
29897,
13,
13,
4706,
363,
474,
29892,
432,
29892,
413,
297,
1583,
29889,
1885,
29918,
2746,
29918,
1111,
359,
7295,
13,
9651,
1409,
353,
7049,
29961,
29875,
3816,
29926,
3816,
29895,
29962,
13,
13,
9651,
396,
4377,
714,
565,
591,
817,
304,
1301,
4220,
278,
7049,
515,
777,
1797,
13,
9651,
396,
268,
916,
1135,
701,
1492,
4565,
1623,
2175,
5742,
9128,
13,
9651,
1409,
29918,
2098,
353,
8267,
13,
9651,
565,
474,
1275,
1583,
29889,
29931,
29916,
448,
29871,
29896,
29901,
13,
18884,
1409,
29918,
2098,
353,
1409,
29918,
2098,
29889,
6506,
877,
29884,
742,
27255,
13,
9651,
565,
432,
1275,
1583,
29889,
29931,
29891,
448,
29871,
29896,
29901,
13,
18884,
1409,
29918,
2098,
353,
1409,
29918,
2098,
29889,
6506,
877,
29878,
742,
27255,
13,
9651,
565,
413,
1275,
1583,
29889,
29931,
29920,
448,
29871,
29896,
29901,
13,
18884,
1409,
29918,
2098,
353,
1409,
29918,
2098,
29889,
6506,
877,
29888,
742,
27255,
13,
9651,
565,
474,
1275,
29871,
29900,
29901,
13,
18884,
1409,
29918,
2098,
353,
1409,
29918,
2098,
29889,
6506,
877,
29881,
742,
27255,
13,
9651,
565,
432,
1275,
29871,
29900,
29901,
13,
18884,
1409,
29918,
2098,
353,
1409,
29918,
2098,
29889,
6506,
877,
29880,
742,
27255,
13,
9651,
565,
413,
1275,
29871,
29900,
29901,
13,
18884,
1409,
29918,
2098,
353,
1409,
29918,
2098,
29889,
6506,
877,
29890,
742,
27255,
13,
13,
9651,
396,
2758,
15687,
310,
4567,
289,
13788,
304,
367,
1809,
1026,
13391,
13,
9651,
565,
7431,
29898,
2378,
29889,
12181,
29897,
2804,
7431,
29898,
2378,
29918,
2098,
1125,
13,
18884,
1409,
353,
437,
877,
29879,
802,
29872,
911,
742,
1409,
29897,
13,
13,
9651,
1301,
4220,
29918,
2098,
353,
18761,
29898,
13,
18884,
1409,
29918,
2098,
29889,
2886,
29898,
29916,
29897,
363,
921,
297,
525,
332,
11512,
29880,
25288,
29915,
565,
921,
297,
1409,
29918,
2098,
13,
9651,
1723,
13,
9651,
565,
1301,
4220,
29918,
2098,
2804,
18761,
29898,
3881,
29898,
2435,
29898,
2378,
29918,
2098,
876,
1125,
13,
18884,
1409,
353,
437,
877,
3286,
4220,
742,
1409,
29892,
1301,
4220,
29918,
2098,
29897,
13,
13,
9651,
396,
679,
278,
8018,
16285,
6590,
304,
22092,
2470,
13,
9651,
1399,
29879,
353,
5159,
13,
9651,
565,
525,
29884,
29915,
297,
1409,
29918,
2098,
29901,
13,
18884,
1399,
29879,
29889,
4397,
29898,
861,
15625,
29875,
29892,
432,
29892,
413,
511,
313,
29875,
718,
29871,
29896,
29892,
432,
29892,
413,
29897,
2314,
13,
9651,
565,
525,
29878,
29915,
297,
1409,
29918,
2098,
29901,
13,
18884,
1399,
29879,
29889,
4397,
29898,
861,
15625,
29875,
29892,
432,
29892,
413,
511,
313,
29875,
29892,
432,
718,
29871,
29896,
29892,
413,
29897,
2314,
13,
9651,
565,
525,
29888,
29915,
297,
1409,
29918,
2098,
29901,
13,
18884,
1399,
29879,
29889,
4397,
29898,
861,
15625,
29875,
29892,
432,
29892,
413,
511,
313,
29875,
29892,
432,
29892,
413,
718,
29871,
29896,
29897,
2314,
13,
9651,
565,
525,
29881,
29915,
297,
1409,
29918,
2098,
29901,
13,
18884,
1399,
29879,
29889,
4397,
29898,
861,
15625,
29875,
448,
29871,
29896,
29892,
432,
29892,
413,
511,
313,
29875,
29892,
432,
29892,
413,
29897,
2314,
13,
9651,
565,
525,
29880,
29915,
297,
1409,
29918,
2098,
29901,
13,
18884,
1399,
29879,
29889,
4397,
29898,
861,
15625,
29875,
29892,
432,
448,
29871,
29896,
29892,
413,
511,
313,
29875,
29892,
432,
29892,
413,
29897,
2314,
13,
9651,
565,
525,
29890,
29915,
297,
1409,
29918,
2098,
29901,
13,
18884,
1399,
29879,
29889,
4397,
29898,
861,
15625,
29875,
29892,
432,
29892,
413,
448,
29871,
29896,
511,
313,
29875,
29892,
432,
29892,
413,
29897,
2314,
13,
9651,
1399,
29879,
29889,
4397,
29898,
1311,
29889,
2746,
29918,
513,
29898,
29875,
29892,
432,
29892,
413,
876,
13,
13,
9651,
396,
6837,
3268,
29892,
22780,
322,
5534,
8282,
13,
9651,
474,
25467,
29918,
11338,
353,
8282,
891,
288,
842,
3552,
1311,
29889,
2746,
29918,
4039,
29898,
29875,
29892,
432,
29892,
413,
511,
1583,
29889,
29916,
29918,
4039,
29898,
29875,
511,
13,
462,
462,
259,
1583,
29889,
29891,
29918,
4039,
29898,
29926,
511,
1583,
29889,
29920,
29918,
4039,
29898,
29895,
4961,
13,
13,
9651,
396,
1653,
278,
3268,
12489,
29991,
13,
9651,
25187,
943,
29889,
4397,
29898,
29911,
6073,
29898,
1272,
29922,
2378,
29892,
1399,
29879,
29922,
12772,
29892,
8282,
29922,
13535,
29918,
11338,
876,
13,
13,
4706,
2428,
2141,
1649,
2344,
12035,
29873,
575,
943,
29892,
6901,
29922,
5574,
29892,
3579,
6277,
29918,
25707,
29897,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
515,
29918,
5589,
29918,
9144,
29898,
13,
4706,
1067,
29879,
29892,
5445,
29918,
9144,
29892,
365,
29916,
29892,
8626,
29892,
365,
29920,
29892,
21224,
29918,
6229,
29892,
4824,
29918,
6229,
29922,
29906,
29892,
3579,
412,
567,
29941,
29881,
29918,
25707,
13,
268,
1125,
13,
4706,
9995,
4391,
263,
29871,
29941,
29928,
349,
29923,
7024,
515,
263,
27523,
740,
411,
12608,
13,
4706,
4954,
5589,
29918,
9144,
29898,
12181,
3569,
1412,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
365,
29916,
584,
938,
13,
9651,
450,
1353,
310,
921,
29899,
29879,
29399,
29889,
13,
4706,
8626,
584,
938,
13,
9651,
450,
1353,
310,
343,
29899,
29879,
29399,
29889,
13,
4706,
365,
29920,
584,
938,
13,
9651,
450,
1353,
310,
503,
29899,
29879,
29399,
29889,
13,
4706,
21224,
29918,
6229,
584,
938,
13,
9651,
450,
21224,
9927,
29889,
13,
4706,
9128,
584,
938,
29892,
13136,
13,
9651,
450,
9128,
2380,
9927,
29889,
13,
4706,
1236,
567,
29918,
25707,
13,
9651,
9179,
2957,
304,
584,
1990,
18078,
30022,
339,
19977,
29889,
20158,
29889,
20158,
29918,
29941,
29881,
29889,
4162,
7024,
29941,
29928,
1412,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
282,
1039,
584,
349,
29923,
7024,
29941,
29928,
13,
4706,
9995,
13,
4706,
7049,
353,
5519,
29961,
8516,
13,
462,
1678,
363,
903,
297,
3464,
29898,
29931,
29920,
4638,
13,
462,
259,
363,
903,
297,
3464,
29898,
29931,
29891,
4638,
13,
462,
29871,
363,
903,
297,
3464,
29898,
29931,
29916,
4638,
13,
13,
4706,
363,
474,
29892,
432,
29892,
413,
297,
3234,
29898,
3881,
29898,
29931,
29916,
511,
3464,
29898,
29931,
29891,
511,
3464,
29898,
29931,
29920,
22164,
13,
13,
9651,
8267,
353,
5159,
13,
9651,
565,
474,
2804,
365,
29916,
448,
29871,
29896,
29901,
29871,
396,
21224,
701,
13,
18884,
8267,
29889,
4397,
29898,
29890,
898,
29918,
6229,
29897,
13,
9651,
565,
432,
2804,
8626,
448,
29871,
29896,
29901,
29871,
396,
21224,
1492,
13,
18884,
8267,
29889,
4397,
29898,
29890,
898,
29918,
6229,
29897,
13,
9651,
565,
413,
2804,
365,
29920,
448,
29871,
29896,
29901,
29871,
396,
21224,
4565,
13,
18884,
8267,
29889,
4397,
29898,
29890,
898,
29918,
6229,
29897,
13,
9651,
565,
474,
2804,
29871,
29900,
29901,
29871,
396,
21224,
1623,
13,
18884,
8267,
29889,
4397,
29898,
29890,
898,
29918,
6229,
29897,
13,
9651,
565,
432,
2804,
29871,
29900,
29901,
29871,
396,
21224,
2175,
13,
18884,
8267,
29889,
4397,
29898,
29890,
898,
29918,
6229,
29897,
13,
9651,
565,
413,
2804,
29871,
29900,
29901,
29871,
396,
21224,
5742,
13,
18884,
8267,
29889,
4397,
29898,
29890,
898,
29918,
6229,
29897,
13,
9651,
8267,
29889,
4397,
29898,
14017,
29918,
6229,
29897,
13,
13,
9651,
7049,
29961,
29875,
3816,
29926,
3816,
29895,
29962,
353,
5445,
29918,
9144,
29898,
12181,
29897,
13,
13,
4706,
736,
1067,
29879,
29898,
2378,
29879,
29892,
3579,
412,
567,
29941,
29881,
29918,
25707,
29897,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
4069,
29898,
13,
4706,
1583,
29892,
365,
29916,
29892,
8626,
29892,
365,
29920,
29892,
21224,
29918,
6229,
29892,
4824,
29918,
6229,
29922,
29906,
29892,
763,
2433,
23749,
742,
3579,
412,
567,
29941,
29881,
29918,
25707,
29892,
13,
268,
1125,
13,
4706,
9995,
4391,
385,
4069,
29871,
29941,
29928,
349,
29923,
7024,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
365,
29916,
584,
938,
13,
9651,
450,
1353,
310,
921,
29899,
29879,
29399,
29889,
13,
4706,
8626,
584,
938,
13,
9651,
450,
1353,
310,
343,
29899,
29879,
29399,
29889,
13,
4706,
365,
29920,
584,
938,
13,
9651,
450,
1353,
310,
503,
29899,
29879,
29399,
29889,
13,
4706,
21224,
29918,
6229,
584,
938,
13,
9651,
450,
21224,
9927,
29889,
13,
4706,
9128,
584,
938,
29892,
13136,
13,
9651,
450,
9128,
2380,
9927,
29889,
13,
4706,
1236,
567,
29941,
29881,
29918,
25707,
13,
9651,
9179,
2957,
304,
584,
1990,
18078,
30022,
339,
19977,
29889,
20158,
29889,
20158,
29918,
29941,
29881,
29889,
4162,
7024,
29941,
29928,
1412,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
282,
1039,
584,
349,
29923,
7024,
29941,
29928,
13,
13,
4706,
2823,
3115,
13,
4706,
448,
26589,
13,
4706,
349,
29923,
7024,
29941,
29928,
29889,
3166,
29918,
5589,
29918,
9144,
13,
4706,
9995,
13,
4706,
736,
1583,
29889,
3166,
29918,
5589,
29918,
9144,
29898,
13,
9651,
14013,
8267,
29901,
437,
703,
3298,
359,
613,
8267,
29892,
763,
29922,
4561,
511,
13,
9651,
365,
29916,
29892,
8626,
29892,
365,
29920,
29892,
21224,
29918,
6229,
29892,
4824,
29918,
6229,
29892,
3579,
412,
567,
29941,
29881,
29918,
25707,
13,
4706,
1723,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
6743,
29898,
13,
4706,
1583,
29892,
365,
29916,
29892,
8626,
29892,
365,
29920,
29892,
21224,
29918,
6229,
29892,
4824,
29918,
6229,
29922,
29906,
29892,
763,
2433,
23749,
742,
3579,
412,
567,
29941,
29881,
29918,
25707,
29892,
13,
268,
1125,
13,
4706,
9995,
4391,
263,
29871,
29941,
29928,
349,
29923,
7024,
5069,
25187,
943,
526,
10423,
411,
6743,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
365,
29916,
584,
938,
13,
9651,
450,
1353,
310,
921,
29899,
29879,
29399,
29889,
13,
4706,
8626,
584,
938,
13,
9651,
450,
1353,
310,
343,
29899,
29879,
29399,
29889,
13,
4706,
365,
29920,
584,
938,
13,
9651,
450,
1353,
310,
503,
29899,
29879,
29399,
29889,
13,
4706,
21224,
29918,
6229,
584,
938,
13,
9651,
450,
21224,
9927,
29889,
13,
4706,
9128,
584,
938,
29892,
13136,
13,
9651,
450,
9128,
2380,
9927,
29889,
13,
4706,
1236,
567,
29941,
29881,
29918,
25707,
13,
9651,
9179,
2957,
304,
584,
1990,
18078,
30022,
339,
19977,
29889,
20158,
29889,
20158,
29918,
29941,
29881,
29889,
4162,
7024,
29941,
29928,
1412,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
282,
1039,
584,
349,
29923,
7024,
29941,
29928,
13,
13,
4706,
2823,
3115,
13,
4706,
448,
26589,
13,
4706,
349,
29923,
7024,
29941,
29928,
29889,
3166,
29918,
5589,
29918,
9144,
13,
4706,
9995,
13,
4706,
736,
1583,
29889,
3166,
29918,
5589,
29918,
9144,
29898,
13,
9651,
14013,
8267,
29901,
437,
703,
2873,
613,
8267,
29892,
763,
29922,
4561,
511,
13,
9651,
365,
29916,
29892,
8626,
29892,
365,
29920,
29892,
21224,
29918,
6229,
29892,
4824,
29918,
6229,
29892,
3579,
412,
567,
29941,
29881,
29918,
25707,
13,
4706,
1723,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
20088,
29898,
13,
4706,
1067,
29879,
29892,
365,
29916,
29892,
8626,
29892,
365,
29920,
29892,
21224,
29918,
6229,
29892,
4824,
29918,
6229,
29922,
29906,
29892,
13,
4706,
26688,
2433,
7411,
29953,
29946,
742,
16717,
29922,
8516,
29892,
3579,
412,
567,
29941,
29881,
29918,
25707,
13,
268,
1125,
13,
4706,
9995,
4391,
263,
4036,
313,
348,
29899,
8945,
1891,
29897,
29871,
29941,
29928,
349,
29923,
7024,
29889,
13,
13,
4706,
12662,
2699,
13,
4706,
448,
1378,
29899,
13,
4706,
365,
29916,
584,
938,
13,
9651,
450,
1353,
310,
921,
29899,
29879,
29399,
29889,
13,
4706,
8626,
584,
938,
13,
9651,
450,
1353,
310,
343,
29899,
29879,
29399,
29889,
13,
4706,
365,
29920,
584,
938,
13,
9651,
450,
1353,
310,
503,
29899,
29879,
29399,
29889,
13,
4706,
21224,
29918,
6229,
584,
938,
13,
9651,
450,
21224,
9927,
29889,
13,
4706,
9128,
584,
938,
29892,
13136,
13,
9651,
450,
9128,
2380,
9927,
29889,
13,
4706,
26688,
584,
26688,
29892,
13136,
13,
9651,
450,
26688,
304,
1653,
278,
7049,
411,
29892,
2322,
338,
1855,
3765,
29889,
13,
4706,
16717,
584,
938,
29892,
13136,
13,
9651,
319,
4036,
16717,
29889,
13,
4706,
1236,
567,
29918,
25707,
13,
9651,
9179,
2957,
304,
584,
1990,
18078,
30022,
339,
19977,
29889,
20158,
29889,
20158,
29918,
29941,
29881,
29889,
4162,
7024,
29941,
29928,
1412,
13,
13,
4706,
16969,
13,
4706,
448,
22158,
13,
4706,
282,
1039,
584,
349,
29923,
7024,
29941,
29928,
13,
13,
4706,
2823,
3115,
13,
4706,
448,
26589,
13,
4706,
349,
29923,
7024,
29941,
29928,
29889,
3166,
29918,
5589,
29918,
9144,
13,
4706,
9995,
13,
4706,
565,
16717,
338,
451,
6213,
29901,
13,
9651,
16717,
29918,
9502,
29898,
26776,
29897,
13,
13,
4706,
822,
5445,
29918,
9144,
29898,
12181,
1125,
13,
9651,
736,
288,
567,
29889,
23149,
14981,
29918,
7052,
29898,
3554,
29889,
23149,
14981,
29918,
7052,
29898,
13,
18884,
20088,
29876,
29898,
12181,
29892,
26688,
29922,
29881,
1853,
4961,
13,
13,
4706,
736,
1067,
29879,
29889,
3166,
29918,
5589,
29918,
9144,
29898,
13,
9651,
5445,
29918,
9144,
29892,
365,
29916,
29892,
8626,
29892,
365,
29920,
29892,
21224,
29918,
6229,
29892,
4824,
29918,
6229,
29892,
3579,
412,
567,
29941,
29881,
29918,
25707,
13,
4706,
1723,
13,
2
] |
widget/build_css_source.py | vesellov/callfeed.net | 1 | 84379 | import sys
sys.stdout.write('function CallFeedBuildCSS(settings) {\n')
sys.stdout.write(' var o = "";\n')
sys.stdout.write(' o+="<style type="text/css">\\n";\n')
for line in open(sys.argv[1]).read().splitlines():
l = line.rstrip()
if not l:
continue
l = l.replace('"', '"')
l = ' o+="%s\\n";\n' % (unicode(l, 'utf-8').encode('unicode-escape'))
sys.stdout.write(l)
sys.stdout.write(' o+="</style>\\n";\n')
sys.stdout.write(' for (var key in settings) if (settings.hasOwnProperty(key))\n')
sys.stdout.write(' if ((key.indexOf("flag_")==0)||(key.indexOf("text_")==0)||(key.indexOf("param_")==0)||(key.indexOf("color_")==0))\n')
sys.stdout.write(' o = o.replace(new RegExp("%\\\\("+key+"\\\\)s", "g"), unescape(settings[key]));\n')
sys.stdout.write(' return o;\n')
sys.stdout.write('}\n')
| [
1,
1053,
10876,
30004,
13,
9675,
29889,
25393,
29889,
3539,
877,
2220,
8251,
29737,
8893,
19407,
29898,
11027,
29897,
2802,
29876,
1495,
30004,
13,
9675,
29889,
25393,
29889,
3539,
877,
1678,
722,
288,
353,
12942,
29905,
29876,
1495,
30004,
13,
9675,
29889,
25393,
29889,
3539,
877,
1678,
288,
29974,
543,
29987,
1896,
29936,
3293,
1134,
29332,
23083,
29936,
726,
29914,
4268,
29987,
23083,
25359,
4141,
29936,
1966,
29876,
1769,
29905,
29876,
1495,
30004,
13,
1454,
1196,
297,
1722,
29898,
9675,
29889,
19218,
29961,
29896,
14664,
949,
2141,
5451,
9012,
7295,
30004,
13,
1678,
301,
353,
1196,
29889,
29878,
17010,
26471,
13,
1678,
565,
451,
301,
29901,
30004,
13,
4706,
6773,
30004,
13,
1678,
301,
353,
301,
29889,
6506,
877,
29908,
742,
525,
29987,
23083,
29936,
1495,
30004,
13,
1678,
301,
353,
525,
1678,
288,
29974,
543,
29995,
29879,
1966,
29876,
1769,
29905,
29876,
29915,
1273,
313,
2523,
356,
29898,
29880,
29892,
525,
9420,
29899,
29947,
2824,
12508,
877,
2523,
356,
29899,
21587,
8785,
30004,
13,
1678,
10876,
29889,
25393,
29889,
3539,
29898,
29880,
8443,
13,
9675,
29889,
25393,
29889,
3539,
877,
1678,
288,
29974,
543,
29987,
1896,
29936,
29914,
3293,
29987,
4141,
29936,
1966,
29876,
1769,
29905,
29876,
1495,
30004,
13,
9675,
29889,
25393,
29889,
3539,
877,
1678,
363,
313,
1707,
1820,
297,
6055,
29897,
565,
313,
11027,
29889,
5349,
29949,
1233,
4854,
29898,
1989,
28986,
29876,
1495,
30004,
13,
9675,
29889,
25393,
29889,
3539,
877,
4706,
565,
5135,
1989,
29889,
19402,
703,
15581,
29918,
1159,
1360,
29900,
29897,
8876,
29898,
1989,
29889,
19402,
703,
726,
29918,
1159,
1360,
29900,
29897,
8876,
29898,
1989,
29889,
19402,
703,
3207,
29918,
1159,
1360,
29900,
29897,
8876,
29898,
1989,
29889,
19402,
703,
2780,
29918,
1159,
1360,
29900,
28986,
29876,
1495,
6756,
13,
9675,
29889,
25393,
29889,
3539,
877,
9651,
288,
353,
288,
29889,
6506,
29898,
1482,
2169,
9544,
11702,
1966,
1966,
703,
29974,
1989,
13578,
1966,
1966,
29897,
29879,
613,
376,
29887,
4968,
443,
21587,
29898,
11027,
29961,
1989,
2314,
416,
29905,
29876,
1495,
30004,
13,
9675,
29889,
25393,
29889,
3539,
877,
1678,
736,
288,
10436,
29876,
1495,
30004,
13,
9675,
29889,
25393,
29889,
3539,
877,
1012,
29876,
1495,
30004,
13,
2
] |
Testing/publications/magazines/glossy/__init__.py | freder/PageBotExamples | 5 | 131084 | # -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
#
# P A G E B O T
#
# Copyright (c) 2016+ <NAME> + <NAME>
# www.pagebot.io
# Licensed under MIT conditions
#
# Supporting DrawBot, www.drawbot.com
# Supporting Flat, xxyxyz.org/flat
# -----------------------------------------------------------------------------
#
# magazines/glossy/__init__.py
#
from pagebot.publications.magazines.basemagazine import BaseMagazine
class Glossy(BaseMagazine):
pass
| [
1,
396,
448,
29930,
29899,
14137,
29901,
18351,
29899,
29947,
448,
29930,
29899,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
13,
29937,
13,
29937,
268,
349,
319,
402,
382,
350,
438,
323,
13,
29937,
13,
29937,
268,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29953,
29974,
529,
5813,
29958,
718,
529,
5813,
29958,
13,
29937,
268,
7821,
29889,
3488,
7451,
29889,
601,
13,
29937,
268,
10413,
21144,
1090,
341,
1806,
5855,
13,
29937,
13,
29937,
268,
18601,
292,
18492,
29933,
327,
29892,
7821,
29889,
4012,
7451,
29889,
510,
13,
29937,
268,
18601,
292,
2379,
271,
29892,
921,
3594,
20230,
29889,
990,
29914,
20620,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
13,
29937,
13,
29937,
268,
2320,
834,
1475,
29914,
3820,
2209,
29891,
29914,
1649,
2344,
26914,
2272,
13,
29937,
13,
3166,
1813,
7451,
29889,
3597,
800,
29889,
11082,
834,
1475,
29889,
6500,
331,
351,
8985,
1053,
7399,
19095,
8985,
13,
13,
1990,
402,
6758,
29891,
29898,
5160,
19095,
8985,
1125,
13,
1678,
1209,
13,
2
] |
contrib/newsumt/setup.py | mjfwest/OpenMDAO-Framework | 69 | 68301 | <filename>contrib/newsumt/setup.py
import os.path
import setuptools
import sys
from numpy.distutils.core import setup
from numpy.distutils.misc_util import Configuration
sdkdir = os.environ.get('WindowsSdkDir')
if sys.platform == 'win32' and sdkdir:
# Update the ``library_dir_option`` function in MSVCCompiler
# to add quotes around /LIBPATH entries.
import types
def _lib_dir_option(self, dir):
return '/LIBPATH:"%s"' % dir
from distutils.msvc9compiler import MSVCCompiler
setattr(MSVCCompiler, 'library_dir_option',
types.MethodType(_lib_dir_option, None, MSVCCompiler))
include_dirs = [os.path.join(sdkdir,'Include')]
library_dirs = [os.path.join(sdkdir,'Lib')]
# make sure we have mt.exe available in path
path = os.environ['PATH'].split(';')
path.append(os.path.join(sdkdir,'bin'))
os.environ['PATH'] = ';'.join(path)
else:
include_dirs = []
library_dirs = []
config = Configuration(name='newsumt')
config.add_extension('newsumtinterruptible',
sources=['newsumt_interruptible.f',
'newsumt_interruptible.pyf'],
include_dirs=include_dirs,
library_dirs=library_dirs)
kwds = {'install_requires':['numpy'],
'version': '1.1.1',
'zip_safe': False,
'license': 'public domain',
# NOTE: we use 'url' here, but it really translates to 'home-page'
# in the metadata. Go figure.
'url': 'http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19790018640_1979018640.pdf',
'package_data': {'openmdao.main': ['*.html']},
}
kwds.update(config.todict())
setup(**kwds)
| [
1,
529,
9507,
29958,
21570,
29914,
1482,
2083,
29873,
29914,
14669,
29889,
2272,
13,
5215,
2897,
29889,
2084,
13,
5215,
731,
21245,
8789,
13,
5215,
10876,
13,
13,
3166,
12655,
29889,
5721,
13239,
29889,
3221,
1053,
6230,
13,
3166,
12655,
29889,
5721,
13239,
29889,
29885,
10669,
29918,
4422,
1053,
20999,
13,
13,
15348,
3972,
353,
2897,
29889,
21813,
29889,
657,
877,
7685,
29019,
9170,
1495,
13,
361,
10876,
29889,
12120,
1275,
525,
5080,
29941,
29906,
29915,
322,
269,
8181,
3972,
29901,
13,
1678,
396,
10318,
278,
4954,
5258,
29918,
3972,
29918,
3385,
16159,
740,
297,
341,
7597,
29907,
25333,
13,
1678,
396,
304,
788,
11839,
2820,
847,
5265,
29933,
10145,
9976,
29889,
13,
1678,
1053,
4072,
13,
1678,
822,
903,
1982,
29918,
3972,
29918,
3385,
29898,
1311,
29892,
4516,
1125,
13,
4706,
736,
8207,
5265,
29933,
10145,
6160,
29995,
29879,
29908,
29915,
1273,
4516,
13,
13,
1678,
515,
1320,
13239,
29889,
1516,
7071,
29929,
21789,
1053,
341,
7597,
29907,
25333,
13,
1678,
731,
5552,
29898,
4345,
8257,
25333,
29892,
525,
5258,
29918,
3972,
29918,
3385,
742,
13,
9651,
4072,
29889,
4062,
1542,
7373,
1982,
29918,
3972,
29918,
3385,
29892,
6213,
29892,
341,
7597,
29907,
25333,
876,
13,
13,
1678,
3160,
29918,
3972,
29879,
353,
518,
359,
29889,
2084,
29889,
7122,
29898,
15348,
3972,
5501,
29419,
1495,
29962,
13,
1678,
3489,
29918,
3972,
29879,
353,
518,
359,
29889,
2084,
29889,
7122,
29898,
15348,
3972,
5501,
14868,
1495,
29962,
13,
1678,
396,
1207,
1854,
591,
505,
286,
29873,
29889,
8097,
3625,
297,
2224,
13,
1678,
2224,
353,
2897,
29889,
21813,
1839,
10145,
13359,
5451,
877,
29936,
1495,
13,
1678,
2224,
29889,
4397,
29898,
359,
29889,
2084,
29889,
7122,
29898,
15348,
3972,
5501,
2109,
8785,
13,
1678,
2897,
29889,
21813,
1839,
10145,
2033,
353,
21921,
4286,
7122,
29898,
2084,
29897,
13,
2870,
29901,
13,
1678,
3160,
29918,
3972,
29879,
353,
5159,
13,
1678,
3489,
29918,
3972,
29879,
353,
5159,
13,
13,
2917,
353,
20999,
29898,
978,
2433,
1482,
2083,
29873,
1495,
13,
2917,
29889,
1202,
29918,
17588,
877,
1482,
2083,
29873,
1639,
6685,
1821,
742,
13,
462,
268,
8974,
29922,
1839,
1482,
2083,
29873,
29918,
1639,
6685,
1821,
29889,
29888,
742,
13,
462,
795,
525,
1482,
2083,
29873,
29918,
1639,
6685,
1821,
29889,
2272,
29888,
7464,
13,
462,
268,
3160,
29918,
3972,
29879,
29922,
2856,
29918,
3972,
29879,
29892,
13,
462,
268,
3489,
29918,
3972,
29879,
29922,
5258,
29918,
3972,
29879,
29897,
13,
13,
11022,
6289,
353,
11117,
6252,
29918,
276,
339,
2658,
2396,
1839,
23749,
7464,
13,
4706,
525,
3259,
2396,
525,
29896,
29889,
29896,
29889,
29896,
742,
13,
4706,
525,
7554,
29918,
11177,
2396,
7700,
29892,
13,
4706,
525,
506,
1947,
2396,
525,
3597,
5354,
742,
13,
259,
396,
6058,
29923,
29901,
591,
671,
525,
2271,
29915,
1244,
29892,
541,
372,
2289,
5578,
1078,
304,
525,
5184,
29899,
3488,
29915,
13,
259,
396,
297,
278,
15562,
29889,
2921,
4377,
29889,
13,
4706,
525,
2271,
2396,
525,
1124,
597,
29876,
509,
29879,
29889,
29876,
11290,
29889,
13513,
29914,
10867,
29914,
29876,
11290,
29914,
29883,
6840,
29889,
29876,
509,
29879,
29889,
29876,
11290,
29889,
13513,
29914,
29896,
29929,
29955,
29929,
29900,
29900,
29896,
29947,
29953,
29946,
29900,
29918,
29896,
29929,
29955,
29929,
29900,
29896,
29947,
29953,
29946,
29900,
29889,
5140,
742,
13,
4706,
525,
5113,
29918,
1272,
2396,
11117,
3150,
29885,
1388,
29877,
29889,
3396,
2396,
6024,
10521,
1420,
2033,
1118,
13,
539,
500,
13,
11022,
6289,
29889,
5504,
29898,
2917,
29889,
20034,
919,
3101,
13,
13,
14669,
29898,
1068,
11022,
6289,
29897,
13,
2
] |
CoquoBot/order_manager.py | Josef212/CoquoBot | 0 | 28716 | from order import Order
class OrderManager:
def __init__(self):
self.orders = {}
def user_has_any_order(self, chat_id: int, user: str) -> bool:
order = self.get_order(chat_id)
return order.user_has_any_order(user)
def get_order(self, id: int) -> Order:
if id not in self.orders:
self.orders[id] = Order()
return self.orders[id]
def reset_order(self, id: int) -> None:
self.get_order(id).reset() | [
1,
515,
1797,
1053,
8170,
13,
13,
1990,
8170,
3260,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
29889,
20488,
353,
6571,
13,
268,
13,
1678,
822,
1404,
29918,
5349,
29918,
1384,
29918,
2098,
29898,
1311,
29892,
13563,
29918,
333,
29901,
938,
29892,
1404,
29901,
851,
29897,
1599,
6120,
29901,
13,
4706,
1797,
353,
1583,
29889,
657,
29918,
2098,
29898,
13496,
29918,
333,
29897,
13,
4706,
736,
1797,
29889,
1792,
29918,
5349,
29918,
1384,
29918,
2098,
29898,
1792,
29897,
13,
13,
1678,
822,
679,
29918,
2098,
29898,
1311,
29892,
1178,
29901,
938,
29897,
1599,
8170,
29901,
13,
4706,
565,
1178,
451,
297,
1583,
29889,
20488,
29901,
13,
9651,
1583,
29889,
20488,
29961,
333,
29962,
353,
8170,
580,
13,
308,
13,
4706,
736,
1583,
29889,
20488,
29961,
333,
29962,
13,
13,
1678,
822,
10092,
29918,
2098,
29898,
1311,
29892,
1178,
29901,
938,
29897,
1599,
6213,
29901,
13,
4706,
1583,
29889,
657,
29918,
2098,
29898,
333,
467,
12071,
580,
2
] |
resqpy/property/__init__.py | poc11/resqpy | 35 | 165006 | <reponame>poc11/resqpy
"""Collections of properties for grids, wellbore frames, grid connection sets etc."""
__all__ = [
'PropertyCollection', 'Property', 'WellLog', 'WellIntervalProperty', 'WellIntervalPropertyCollection',
'WellLogCollection', 'StringLookup', 'PropertyKind', 'GridPropertyCollection',
'property_over_time_series_from_collection', 'property_collection_for_keyword', 'infer_property_kind',
'write_hdf5_and_create_xml_for_active_property', 'reformat_column_edges_to_resqml_format',
'reformat_column_edges_from_resqml_format', 'same_property_kind', 'selective_version_of_collection',
'supported_local_property_kind_list', 'supported_property_kind_list', 'supported_facet_type_list',
'expected_facet_type_dict', 'create_transmisibility_multiplier_property_kind',
'property_kind_and_facet_from_keyword', 'guess_uom'
]
from .property_common import property_collection_for_keyword, \
property_over_time_series_from_collection, \
write_hdf5_and_create_xml_for_active_property, \
infer_property_kind, \
reformat_column_edges_to_resqml_format, \
reformat_column_edges_from_resqml_format, \
selective_version_of_collection, \
same_property_kind, \
supported_property_kind_list, \
supported_local_property_kind_list, \
supported_facet_type_list, \
expected_facet_type_dict, \
property_kind_and_facet_from_keyword, \
guess_uom
from .property_kind import PropertyKind, create_transmisibility_multiplier_property_kind
from .string_lookup import StringLookup
from .property_collection import PropertyCollection
from .grid_property_collection import GridPropertyCollection
from .property import Property
from .well_interval_property import WellIntervalProperty
from .well_interval_property_collection import WellIntervalPropertyCollection
from .well_log import WellLog
from .well_log_collection import WellLogCollection
# Set "module" attribute of all public objects to this path.
for _name in __all__:
_obj = eval(_name)
if hasattr(_obj, "__module__"):
_obj.__module__ = __name__
| [
1,
529,
276,
1112,
420,
29958,
29886,
542,
29896,
29896,
29914,
690,
29939,
2272,
13,
15945,
29908,
19466,
310,
4426,
363,
867,
4841,
29892,
1532,
29890,
487,
16608,
29892,
6856,
3957,
6166,
2992,
1213,
15945,
13,
13,
1649,
497,
1649,
353,
518,
13,
1678,
525,
4854,
7196,
742,
525,
4854,
742,
525,
11284,
3403,
742,
525,
11284,
12506,
4854,
742,
525,
11284,
12506,
4854,
7196,
742,
13,
1678,
525,
11284,
3403,
7196,
742,
525,
1231,
14959,
786,
742,
525,
4854,
11885,
742,
525,
5756,
4854,
7196,
742,
13,
1678,
525,
6799,
29918,
957,
29918,
2230,
29918,
13757,
29918,
3166,
29918,
10855,
742,
525,
6799,
29918,
10855,
29918,
1454,
29918,
26766,
742,
525,
262,
571,
29918,
6799,
29918,
14380,
742,
13,
1678,
525,
3539,
29918,
29882,
2176,
29945,
29918,
392,
29918,
3258,
29918,
3134,
29918,
1454,
29918,
4925,
29918,
6799,
742,
525,
276,
4830,
29918,
4914,
29918,
287,
2710,
29918,
517,
29918,
690,
29939,
828,
29918,
4830,
742,
13,
1678,
525,
276,
4830,
29918,
4914,
29918,
287,
2710,
29918,
3166,
29918,
690,
29939,
828,
29918,
4830,
742,
525,
17642,
29918,
6799,
29918,
14380,
742,
525,
2622,
573,
29918,
3259,
29918,
974,
29918,
10855,
742,
13,
1678,
525,
23765,
29918,
2997,
29918,
6799,
29918,
14380,
29918,
1761,
742,
525,
23765,
29918,
6799,
29918,
14380,
29918,
1761,
742,
525,
23765,
29918,
17470,
300,
29918,
1853,
29918,
1761,
742,
13,
1678,
525,
9684,
29918,
17470,
300,
29918,
1853,
29918,
8977,
742,
525,
3258,
29918,
3286,
26737,
4127,
29918,
18056,
4926,
29918,
6799,
29918,
14380,
742,
13,
1678,
525,
6799,
29918,
14380,
29918,
392,
29918,
17470,
300,
29918,
3166,
29918,
26766,
742,
525,
2543,
404,
29918,
29884,
290,
29915,
13,
29962,
13,
13,
3166,
869,
6799,
29918,
9435,
1053,
2875,
29918,
10855,
29918,
1454,
29918,
26766,
29892,
320,
13,
1678,
2875,
29918,
957,
29918,
2230,
29918,
13757,
29918,
3166,
29918,
10855,
29892,
320,
13,
1678,
2436,
29918,
29882,
2176,
29945,
29918,
392,
29918,
3258,
29918,
3134,
29918,
1454,
29918,
4925,
29918,
6799,
29892,
320,
13,
1678,
10115,
29918,
6799,
29918,
14380,
29892,
320,
13,
1678,
337,
4830,
29918,
4914,
29918,
287,
2710,
29918,
517,
29918,
690,
29939,
828,
29918,
4830,
29892,
320,
13,
1678,
337,
4830,
29918,
4914,
29918,
287,
2710,
29918,
3166,
29918,
690,
29939,
828,
29918,
4830,
29892,
320,
13,
1678,
1831,
573,
29918,
3259,
29918,
974,
29918,
10855,
29892,
320,
13,
1678,
1021,
29918,
6799,
29918,
14380,
29892,
320,
13,
1678,
6969,
29918,
6799,
29918,
14380,
29918,
1761,
29892,
320,
13,
1678,
6969,
29918,
2997,
29918,
6799,
29918,
14380,
29918,
1761,
29892,
320,
13,
1678,
6969,
29918,
17470,
300,
29918,
1853,
29918,
1761,
29892,
320,
13,
1678,
3806,
29918,
17470,
300,
29918,
1853,
29918,
8977,
29892,
320,
13,
1678,
2875,
29918,
14380,
29918,
392,
29918,
17470,
300,
29918,
3166,
29918,
26766,
29892,
320,
13,
1678,
4140,
29918,
29884,
290,
13,
3166,
869,
6799,
29918,
14380,
1053,
9079,
11885,
29892,
1653,
29918,
3286,
26737,
4127,
29918,
18056,
4926,
29918,
6799,
29918,
14380,
13,
3166,
869,
1807,
29918,
20401,
1053,
1714,
14959,
786,
13,
3166,
869,
6799,
29918,
10855,
1053,
9079,
7196,
13,
3166,
869,
7720,
29918,
6799,
29918,
10855,
1053,
11657,
4854,
7196,
13,
3166,
869,
6799,
1053,
9079,
13,
3166,
869,
5872,
29918,
19207,
29918,
6799,
1053,
5674,
12506,
4854,
13,
3166,
869,
5872,
29918,
19207,
29918,
6799,
29918,
10855,
1053,
5674,
12506,
4854,
7196,
13,
3166,
869,
5872,
29918,
1188,
1053,
5674,
3403,
13,
3166,
869,
5872,
29918,
1188,
29918,
10855,
1053,
5674,
3403,
7196,
13,
13,
29937,
3789,
376,
5453,
29908,
5352,
310,
599,
970,
3618,
304,
445,
2224,
29889,
13,
1454,
903,
978,
297,
4770,
497,
1649,
29901,
13,
1678,
903,
5415,
353,
19745,
7373,
978,
29897,
13,
1678,
565,
756,
5552,
7373,
5415,
29892,
376,
1649,
5453,
1649,
29908,
1125,
13,
4706,
903,
5415,
17255,
5453,
1649,
353,
4770,
978,
1649,
13,
2
] |
Entry.py | yeweiasia/ater | 2 | 1613182 | import wx
from ui.MainWindowUI import MainWindowUI
from ConfigHolder import ConfigHolder
if __name__ == "__main__":
ConfigHolder("etc/ater.ini")
app = wx.App()
frame = MainWindowUI("Ater").Show()
app.MainLoop() | [
1,
1053,
26437,
13,
3166,
14313,
29889,
6330,
5907,
3120,
1053,
4241,
5907,
3120,
13,
3166,
12782,
11439,
1053,
12782,
11439,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
12782,
11439,
703,
7070,
29914,
1008,
29889,
2172,
1159,
13,
1678,
623,
353,
26437,
29889,
2052,
580,
13,
1678,
3515,
353,
4241,
5907,
3120,
703,
29909,
357,
2564,
8964,
580,
13,
1678,
623,
29889,
6330,
18405,
580,
2
] |
lab2/text_recognizer/data/base_data_module.py | ronaldokun/fsdl-text-recognizer-2021-labs | 0 | 65683 | <gh_stars>0
"""Base DataModule class."""
from pathlib import Path
from typing import Collection, Dict, Optional, Tuple, Union
import argparse
import os
from torch.utils.data import ConcatDataset, DataLoader
import pytorch_lightning as pl
from text_recognizer import util
from text_recognizer.data.util import BaseDataset
def load_and_print_info(data_module_class) -> None:
"""Load EMNISTLines and print info."""
parser = argparse.ArgumentParser()
data_module_class.add_to_argparse(parser)
args = parser.parse_args()
dataset = data_module_class(args)
dataset.prepare_data()
dataset.setup()
print(dataset)
def _download_raw_dataset(metadata: Dict, dl_dirname: Path) -> Path:
dl_dirname.mkdir(parents=True, exist_ok=True)
filename = dl_dirname / metadata["filename"]
if filename.exists():
return filename
print(f"Downloading raw dataset from {metadata['url']} to {filename}...")
util.download_url(metadata["url"], filename)
print("Computing SHA-256...")
sha256 = util.compute_sha256(filename)
if sha256 != metadata["sha256"]:
raise ValueError("Downloaded data file SHA-256 does not match that listed in metadata document.")
return filename
BATCH_SIZE = 2048
NUM_WORKERS = os.cpu_count()
class BaseDataModule(pl.LightningDataModule):
"""
Base DataModule.
Learn more at https://pytorch-lightning.readthedocs.io/en/stable/extensions/datamodules.html
"""
def __init__(self, args: argparse.Namespace = None) -> None:
super().__init__()
self.args = vars(args) if args is not None else {}
self.batch_size = self.args.get("batch_size", BATCH_SIZE)
self.num_workers = self.args.get("num_workers", NUM_WORKERS)
self.on_gpu = isinstance(self.args.get("gpus", None), (str, int))
# Make sure to set the variables below in subclasses
self.dims: Tuple[int, ...]
self.output_dims: Tuple[int, ...]
self.mapping: Collection
self.data_train: Union[BaseDataset, ConcatDataset]
self.data_val: Union[BaseDataset, ConcatDataset]
self.data_test: Union[BaseDataset, ConcatDataset]
@classmethod
def data_dirname(cls):
return Path(__file__).resolve().parents[3] / "data"
@staticmethod
def add_to_argparse(parser):
parser.add_argument(
"--batch_size", type=int, default=BATCH_SIZE, help="Number of examples to operate on per forward step."
)
parser.add_argument(
"--num_workers", type=int, default=NUM_WORKERS, help="Number of additional processes to load data."
)
return parser
def config(self):
"""Return important settings of the dataset, which will be passed to instantiate models."""
return {"input_dims": self.dims, "output_dims": self.output_dims, "mapping": self.mapping}
def prepare_data(self, *args, **kwargs) -> None:
"""
Use this method to do things that might write to disk or that need to be done only from a single GPU
in distributed settings (so don't set state `self.x = y`).
"""
def setup(self, stage: Optional[str] = None) -> None:
"""
Split into train, val, test, and set dims.
Should assign `torch Dataset` objects to self.data_train, self.data_val, and optionally self.data_test.
"""
def train_dataloader(self):
return DataLoader(
self.data_train,
shuffle=True,
batch_size=self.batch_size,
num_workers=self.num_workers,
pin_memory=self.on_gpu,
)
def val_dataloader(self):
return DataLoader(
self.data_val,
shuffle=False,
batch_size=self.batch_size,
num_workers=self.num_workers,
pin_memory=self.on_gpu,
)
def test_dataloader(self):
return DataLoader(
self.data_test,
shuffle=False,
batch_size=self.batch_size,
num_workers=self.num_workers,
pin_memory=self.on_gpu,
)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
5160,
3630,
7355,
770,
1213,
15945,
13,
3166,
2224,
1982,
1053,
10802,
13,
3166,
19229,
1053,
14348,
29892,
360,
919,
29892,
28379,
29892,
12603,
552,
29892,
7761,
13,
5215,
1852,
5510,
13,
5215,
2897,
13,
13,
3166,
4842,
305,
29889,
13239,
29889,
1272,
1053,
1281,
4117,
16390,
24541,
29892,
3630,
10036,
13,
5215,
282,
3637,
25350,
29918,
4366,
1076,
408,
715,
13,
13,
3166,
1426,
29918,
29423,
3950,
1053,
3667,
13,
3166,
1426,
29918,
29423,
3950,
29889,
1272,
29889,
4422,
1053,
7399,
16390,
24541,
13,
13,
13,
1753,
2254,
29918,
392,
29918,
2158,
29918,
3888,
29898,
1272,
29918,
5453,
29918,
1990,
29897,
1599,
6213,
29901,
13,
1678,
9995,
5896,
27295,
29940,
9047,
20261,
322,
1596,
5235,
1213,
15945,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
580,
13,
1678,
848,
29918,
5453,
29918,
1990,
29889,
1202,
29918,
517,
29918,
1191,
5510,
29898,
16680,
29897,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
1678,
8783,
353,
848,
29918,
5453,
29918,
1990,
29898,
5085,
29897,
13,
1678,
8783,
29889,
19125,
29918,
1272,
580,
13,
1678,
8783,
29889,
14669,
580,
13,
1678,
1596,
29898,
24713,
29897,
13,
13,
13,
1753,
903,
10382,
29918,
1610,
29918,
24713,
29898,
19635,
29901,
360,
919,
29892,
270,
29880,
29918,
25721,
29901,
10802,
29897,
1599,
10802,
29901,
13,
1678,
270,
29880,
29918,
25721,
29889,
11256,
3972,
29898,
862,
1237,
29922,
5574,
29892,
1863,
29918,
554,
29922,
5574,
29897,
13,
1678,
10422,
353,
270,
29880,
29918,
25721,
847,
15562,
3366,
9507,
3108,
13,
1678,
565,
10422,
29889,
9933,
7295,
13,
4706,
736,
10422,
13,
1678,
1596,
29898,
29888,
29908,
6767,
13234,
10650,
8783,
515,
426,
19635,
1839,
2271,
2033,
29913,
304,
426,
9507,
29913,
856,
1159,
13,
1678,
3667,
29889,
10382,
29918,
2271,
29898,
19635,
3366,
2271,
12436,
10422,
29897,
13,
1678,
1596,
703,
20606,
292,
317,
15715,
29899,
29906,
29945,
29953,
856,
1159,
13,
1678,
528,
29874,
29906,
29945,
29953,
353,
3667,
29889,
26017,
29918,
17051,
29906,
29945,
29953,
29898,
9507,
29897,
13,
1678,
565,
528,
29874,
29906,
29945,
29953,
2804,
15562,
3366,
17051,
29906,
29945,
29953,
3108,
29901,
13,
4706,
12020,
7865,
2392,
703,
6767,
15638,
848,
934,
317,
15715,
29899,
29906,
29945,
29953,
947,
451,
1993,
393,
9904,
297,
15562,
1842,
23157,
13,
1678,
736,
10422,
13,
13,
13,
29933,
14789,
29918,
14226,
353,
29871,
29906,
29900,
29946,
29947,
13,
13967,
29918,
11686,
29968,
23598,
353,
2897,
29889,
21970,
29918,
2798,
580,
13,
13,
13,
1990,
7399,
1469,
7355,
29898,
572,
29889,
20769,
1076,
1469,
7355,
1125,
13,
1678,
9995,
13,
1678,
7399,
3630,
7355,
29889,
13,
1678,
19530,
29876,
901,
472,
2045,
597,
2272,
7345,
305,
29899,
4366,
1076,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
264,
29914,
13844,
29914,
24299,
29914,
4130,
314,
397,
2540,
29889,
1420,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
6389,
29901,
1852,
5510,
29889,
23335,
353,
6213,
29897,
1599,
6213,
29901,
13,
4706,
2428,
2141,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
5085,
353,
24987,
29898,
5085,
29897,
565,
6389,
338,
451,
6213,
1683,
6571,
13,
4706,
1583,
29889,
16175,
29918,
2311,
353,
1583,
29889,
5085,
29889,
657,
703,
16175,
29918,
2311,
613,
350,
14789,
29918,
14226,
29897,
13,
4706,
1583,
29889,
1949,
29918,
1287,
414,
353,
1583,
29889,
5085,
29889,
657,
703,
1949,
29918,
1287,
414,
613,
28019,
29918,
11686,
29968,
23598,
29897,
13,
13,
4706,
1583,
29889,
265,
29918,
29887,
3746,
353,
338,
8758,
29898,
1311,
29889,
5085,
29889,
657,
703,
29887,
13364,
613,
6213,
511,
313,
710,
29892,
938,
876,
13,
13,
4706,
396,
8561,
1854,
304,
731,
278,
3651,
2400,
297,
1014,
13203,
13,
4706,
1583,
29889,
6229,
29879,
29901,
12603,
552,
29961,
524,
29892,
2023,
29962,
13,
4706,
1583,
29889,
4905,
29918,
6229,
29879,
29901,
12603,
552,
29961,
524,
29892,
2023,
29962,
13,
4706,
1583,
29889,
20698,
29901,
14348,
13,
4706,
1583,
29889,
1272,
29918,
14968,
29901,
7761,
29961,
5160,
16390,
24541,
29892,
1281,
4117,
16390,
24541,
29962,
13,
4706,
1583,
29889,
1272,
29918,
791,
29901,
7761,
29961,
5160,
16390,
24541,
29892,
1281,
4117,
16390,
24541,
29962,
13,
4706,
1583,
29889,
1272,
29918,
1688,
29901,
7761,
29961,
5160,
16390,
24541,
29892,
1281,
4117,
16390,
24541,
29962,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
848,
29918,
25721,
29898,
25932,
1125,
13,
4706,
736,
10802,
22168,
1445,
1649,
467,
17863,
2141,
862,
1237,
29961,
29941,
29962,
847,
376,
1272,
29908,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
788,
29918,
517,
29918,
1191,
5510,
29898,
16680,
1125,
13,
4706,
13812,
29889,
1202,
29918,
23516,
29898,
13,
9651,
376,
489,
16175,
29918,
2311,
613,
1134,
29922,
524,
29892,
2322,
29922,
29933,
14789,
29918,
14226,
29892,
1371,
543,
4557,
310,
6455,
304,
21994,
373,
639,
6375,
4331,
1213,
13,
4706,
1723,
13,
4706,
13812,
29889,
1202,
29918,
23516,
29898,
13,
9651,
376,
489,
1949,
29918,
1287,
414,
613,
1134,
29922,
524,
29892,
2322,
29922,
13967,
29918,
11686,
29968,
23598,
29892,
1371,
543,
4557,
310,
5684,
10174,
304,
2254,
848,
1213,
13,
4706,
1723,
13,
4706,
736,
13812,
13,
13,
1678,
822,
2295,
29898,
1311,
1125,
13,
4706,
9995,
11609,
4100,
6055,
310,
278,
8783,
29892,
607,
674,
367,
4502,
304,
25112,
4733,
1213,
15945,
13,
4706,
736,
8853,
2080,
29918,
6229,
29879,
1115,
1583,
29889,
6229,
29879,
29892,
376,
4905,
29918,
6229,
29879,
1115,
1583,
29889,
4905,
29918,
6229,
29879,
29892,
376,
20698,
1115,
1583,
29889,
20698,
29913,
13,
13,
1678,
822,
19012,
29918,
1272,
29898,
1311,
29892,
334,
5085,
29892,
3579,
19290,
29897,
1599,
6213,
29901,
13,
4706,
9995,
13,
4706,
4803,
445,
1158,
304,
437,
2712,
393,
1795,
2436,
304,
8086,
470,
393,
817,
304,
367,
2309,
871,
515,
263,
2323,
22796,
13,
4706,
297,
13235,
6055,
313,
578,
1016,
29915,
29873,
731,
2106,
421,
1311,
29889,
29916,
353,
343,
12913,
13,
4706,
9995,
13,
13,
1678,
822,
6230,
29898,
1311,
29892,
7408,
29901,
28379,
29961,
710,
29962,
353,
6213,
29897,
1599,
6213,
29901,
13,
4706,
9995,
13,
4706,
26178,
964,
7945,
29892,
659,
29892,
1243,
29892,
322,
731,
3964,
29879,
29889,
13,
4706,
10575,
3566,
421,
7345,
305,
13373,
24541,
29952,
3618,
304,
1583,
29889,
1272,
29918,
14968,
29892,
1583,
29889,
1272,
29918,
791,
29892,
322,
2984,
635,
1583,
29889,
1272,
29918,
1688,
29889,
13,
4706,
9995,
13,
13,
1678,
822,
7945,
29918,
29881,
2075,
29877,
1664,
29898,
1311,
1125,
13,
4706,
736,
3630,
10036,
29898,
13,
9651,
1583,
29889,
1272,
29918,
14968,
29892,
13,
9651,
528,
21897,
29922,
5574,
29892,
13,
9651,
9853,
29918,
2311,
29922,
1311,
29889,
16175,
29918,
2311,
29892,
13,
9651,
954,
29918,
1287,
414,
29922,
1311,
29889,
1949,
29918,
1287,
414,
29892,
13,
9651,
12534,
29918,
14834,
29922,
1311,
29889,
265,
29918,
29887,
3746,
29892,
13,
4706,
1723,
13,
13,
1678,
822,
659,
29918,
29881,
2075,
29877,
1664,
29898,
1311,
1125,
13,
4706,
736,
3630,
10036,
29898,
13,
9651,
1583,
29889,
1272,
29918,
791,
29892,
13,
9651,
528,
21897,
29922,
8824,
29892,
13,
9651,
9853,
29918,
2311,
29922,
1311,
29889,
16175,
29918,
2311,
29892,
13,
9651,
954,
29918,
1287,
414,
29922,
1311,
29889,
1949,
29918,
1287,
414,
29892,
13,
9651,
12534,
29918,
14834,
29922,
1311,
29889,
265,
29918,
29887,
3746,
29892,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
29881,
2075,
29877,
1664,
29898,
1311,
1125,
13,
4706,
736,
3630,
10036,
29898,
13,
9651,
1583,
29889,
1272,
29918,
1688,
29892,
13,
9651,
528,
21897,
29922,
8824,
29892,
13,
9651,
9853,
29918,
2311,
29922,
1311,
29889,
16175,
29918,
2311,
29892,
13,
9651,
954,
29918,
1287,
414,
29922,
1311,
29889,
1949,
29918,
1287,
414,
29892,
13,
9651,
12534,
29918,
14834,
29922,
1311,
29889,
265,
29918,
29887,
3746,
29892,
13,
4706,
1723,
13,
2
] |
seq_predict/ac.py | dmorrill10/seq_predict | 0 | 72016 | """Arithmetic Coding
Functions for doing compression using arithmetic coding.
http://en.wikipedia.org/wiki/Arithmetic_coding
The functions and classes all need predictive models; see model.py
"""
import math
import itertools
from seq_predict import CTW
def grouper(n, iterable, fillvalue=None):
args = [iter(iterable)] * n
return itertools.zip_longest(*args, fillvalue=fillvalue)
def compress_bits(model, bits):
"""Compresses a stream of bits into another stream of bits.
Requires a prediction model.
"""
encoder = BinaryArithmeticEncoder(model)
for c in itertools.chain.from_iterable((encoder.encode(b) for b in bits)):
yield c
for c in encoder.flush():
yield c
def compress_bytes(model, bytes):
"""Compresses a stream of bytes into another steam of bytes.
Requires a prediction model.
"""
bits = ((m >> i) & 1 for m in bytes for i in range(8))
cbits = compress_bits(model, bits)
for c in (int(''.join(reversed(byte)), 2) for byte in grouper(8, (str(b) for b in cbits), '0')):
yield c
def decompress_bits(model, bits, msglen):
"""Decompresses a stream of bits into another stream of bits.
Requires the same prediction model (from its original state) that was
used for decompression and the number of bits in the message.
"""
decoder = BinaryArithmeticDecoder(model)
nbits = 0
for r in itertools.chain.from_iterable((decoder.decode(b) for b in bits)):
yield r
nbits += 1
for r in decoder.flush(msglen - nbits):
yield r
def decompress_bytes(model, bytes, msglen):
"""Decompresses a stream of bytes into another stream of bytes.
Requires the same prediction model (from its original state) that was
used for decompression and the number of bytes in the message.
"""
cbits = ((m >> i) & 1 for m in bytes for i in range(8))
bits = decompress_bits(model, cbits, msglen * 8)
for r in (int(''.join(reversed(byte)), 2) for byte in grouper(8, (str(b) for b in bits), '0')):
yield r
class BinaryArithmeticEncoder:
"""BinaryArithmeticEncoder
An arithmetic encoder for binary data sources. For the theory behind the encoder
see http://en.wikipedia.org/wiki/Arithmetic_coding.
>>> encoder = BinaryArithmeticEncoder(CTW(8))
See also: BinaryArithmeticDecoder, compress, and compress_bytes
"""
def __init__(self, model, num_bits = 32):
self.model = model
self.num_bits = num_bits
self._top = 2 ** self.num_bits
self._half = self._top // 2 # [0, self._half) is outputs the zero bit
self._1_4 = self._half // 2
self._3_4 = self._top - self._1_4
self.low = 0 # Interval is [self.low, self.high)
self.high = self._top
self.follow_bits = 0 # Opposing bits to follow the next output'd bit
self.history = []
def encode(self, symbol):
"""Encodes a symbol returning a sequence of coded bits.
The encoder is stateful and (since it is hopefully compressing the input) it will not
return output bits for each input symbol.
You will need to flush the encoder to get remaining coded bits after encoding the
complete sequence.
"""
output = []
# Find the split point
p_zero = self.model.predict(0, self.history)
split = self.low + max(1, int((self.high - self.low) * p_zero)) # 0-interval is [self.low, split)
# Update the model
self.model.update(symbol, self.history)
self.history.append(symbol)
# Update the range based on the observed symbol
if symbol:
self.low = split
else:
self.high = split
# If the range no longer overlaps the midpoint, the next bit is known
# also rescale the interval to get back precision
#
# If the range overlaps the midpoint but not the 1/4 or 3/4 points then
# we rescale the interval, but track this with follow bits. If the next
# bit to output is a 1, then we already know it's at the low end of the upper
# half, so we follow with a 0. Similarly if the next bit is a 0, then
# we already know it's at the high end of the lower half, so we follow
# with a 1.
# If this happens a second time before outputting any bit, then there will
# need to be 2 of these follow bits. So we track this by just incrementing
# a follow bit counter.
#
# This is in a loop because the new range may not overlap the new midpoint,
# allowing multiple bits to be determined
output = []
while True:
if self.high <= self._half:
output.append(0)
output.extend([1] * self.follow_bits) # Add the follow bits
self.follow_bits = 0
elif self.low >= self._half:
output.append(1)
output.extend([0] * self.follow_bits) # Add the follow bits
self.follow_bits = 0
self.low -= self._half
self.high -= self._half
elif self.low >= self._1_4 and self.high <= self._3_4:
self.follow_bits += 1
self.low -= self._1_4
self.high -= self._1_4
else:
break
self.low *= 2
self.high *= 2
return output
def flush(self):
"""Flushes any coded bits in the encoder. Typically called after the entire
sequence has been encoded.
"""
if self.low < self._1_4:
output = [0] + [1] * (self.follow_bits + 1)
else:
output = [1] + [0] * (self.follow_bits + 1)
return output
class BinaryArithmeticDecoder:
def __init__(self, model, num_bits = 32):
self.model = model
self.num_bits = num_bits
self._top = 2 ** self.num_bits
self._half = self._top // 2 # [0, self._half) outputs the zero bit
self._1_4 = self._half // 2
self._3_4 = self._top - self._1_4
self.low = 0
self.high = 1 # This ensures num_bits are read before decoding
self.value = 0
self.history = []
def decode(self, bit):
if self.high <= self._half:
pass
elif self.low >= self._half:
self.value -= self._half
self.low -= self._half
self.high -= self._half
elif self.low >= self._1_4 and self.high <= self._3_4:
self.value -= self._1_4
self.low -= self._1_4
self.high -= self._1_4
self.low *= 2
self.high *= 2
self.value *= 2
self.value += bit
output = []
while (self.low < self._half < self.high and
((self.low < self._1_4 or self.high > self._3_4))):
p_zero = self.model.predict(0, self.history)
split = self.low + max(1, int((self.high - self.low) * p_zero)) # 0-interval is [self.low, split)
symbol = 0 if self.value < split else 1
output.append(symbol)
self.model.update(symbol, self.history)
self.history.append(symbol)
if symbol:
self.low = split
else:
self.high = split
return output
def flush(self, nbits):
output = []
while len(output) < nbits:
output += self.decode(0)
return output[:nbits]
| [
1,
9995,
1433,
18542,
315,
3689,
13,
13,
6678,
29879,
363,
2599,
24221,
773,
23342,
14137,
29889,
13,
1124,
597,
264,
29889,
6011,
29889,
990,
29914,
4594,
29914,
1433,
18542,
29918,
29883,
3689,
13,
13,
1576,
3168,
322,
4413,
599,
817,
8500,
573,
4733,
29936,
1074,
1904,
29889,
2272,
13,
15945,
29908,
13,
13,
5215,
5844,
13,
5215,
4256,
8504,
13,
13,
3166,
19359,
29918,
27711,
1053,
315,
16240,
13,
13,
1753,
867,
283,
546,
29898,
29876,
29892,
4256,
519,
29892,
5445,
1767,
29922,
8516,
1125,
13,
1678,
6389,
353,
518,
1524,
29898,
1524,
519,
4638,
334,
302,
13,
1678,
736,
4256,
8504,
29889,
7554,
29918,
5426,
342,
10456,
5085,
29892,
5445,
1767,
29922,
5589,
1767,
29897,
13,
13,
1753,
27122,
29918,
14836,
29898,
4299,
29892,
9978,
1125,
13,
1678,
9995,
1523,
2139,
267,
263,
4840,
310,
9978,
964,
1790,
4840,
310,
9978,
29889,
13,
1678,
830,
339,
2658,
263,
18988,
1904,
29889,
13,
1678,
9995,
13,
1678,
2094,
6119,
353,
29479,
1433,
18542,
8566,
6119,
29898,
4299,
29897,
13,
13,
1678,
363,
274,
297,
4256,
8504,
29889,
14153,
29889,
3166,
29918,
1524,
519,
3552,
3977,
6119,
29889,
12508,
29898,
29890,
29897,
363,
289,
297,
9978,
22164,
13,
4706,
7709,
274,
13,
1678,
363,
274,
297,
2094,
6119,
29889,
23126,
7295,
13,
4706,
7709,
274,
13,
13,
1753,
27122,
29918,
13193,
29898,
4299,
29892,
6262,
1125,
13,
1678,
9995,
1523,
2139,
267,
263,
4840,
310,
6262,
964,
1790,
21837,
310,
6262,
29889,
13,
1678,
830,
339,
2658,
263,
18988,
1904,
29889,
13,
1678,
9995,
13,
1678,
9978,
353,
5135,
29885,
5099,
474,
29897,
669,
29871,
29896,
363,
286,
297,
6262,
363,
474,
297,
3464,
29898,
29947,
876,
13,
1678,
274,
14836,
353,
27122,
29918,
14836,
29898,
4299,
29892,
9978,
29897,
13,
1678,
363,
274,
297,
313,
524,
877,
4286,
7122,
29898,
276,
874,
287,
29898,
10389,
8243,
29871,
29906,
29897,
363,
7023,
297,
867,
283,
546,
29898,
29947,
29892,
313,
710,
29898,
29890,
29897,
363,
289,
297,
274,
14836,
511,
525,
29900,
8785,
29901,
13,
4706,
7709,
274,
13,
13,
1753,
17753,
2139,
29918,
14836,
29898,
4299,
29892,
9978,
29892,
10191,
2435,
1125,
13,
1678,
9995,
2772,
510,
2139,
267,
263,
4840,
310,
9978,
964,
1790,
4840,
310,
9978,
29889,
13,
1678,
830,
339,
2658,
278,
1021,
18988,
1904,
313,
3166,
967,
2441,
2106,
29897,
393,
471,
13,
1678,
1304,
363,
17753,
2590,
322,
278,
1353,
310,
9978,
297,
278,
2643,
29889,
13,
1678,
9995,
13,
1678,
1602,
6119,
353,
29479,
1433,
18542,
6185,
6119,
29898,
4299,
29897,
13,
1678,
302,
14836,
353,
29871,
29900,
13,
1678,
363,
364,
297,
4256,
8504,
29889,
14153,
29889,
3166,
29918,
1524,
519,
3552,
7099,
6119,
29889,
13808,
29898,
29890,
29897,
363,
289,
297,
9978,
22164,
13,
4706,
7709,
364,
13,
4706,
302,
14836,
4619,
29871,
29896,
13,
1678,
363,
364,
297,
1602,
6119,
29889,
23126,
29898,
7645,
2435,
448,
302,
14836,
1125,
13,
4706,
7709,
364,
13,
13,
1753,
17753,
2139,
29918,
13193,
29898,
4299,
29892,
6262,
29892,
10191,
2435,
1125,
13,
1678,
9995,
2772,
510,
2139,
267,
263,
4840,
310,
6262,
964,
1790,
4840,
310,
6262,
29889,
13,
1678,
830,
339,
2658,
278,
1021,
18988,
1904,
313,
3166,
967,
2441,
2106,
29897,
393,
471,
13,
1678,
1304,
363,
17753,
2590,
322,
278,
1353,
310,
6262,
297,
278,
2643,
29889,
13,
1678,
9995,
13,
1678,
274,
14836,
353,
5135,
29885,
5099,
474,
29897,
669,
29871,
29896,
363,
286,
297,
6262,
363,
474,
297,
3464,
29898,
29947,
876,
13,
1678,
9978,
353,
17753,
2139,
29918,
14836,
29898,
4299,
29892,
274,
14836,
29892,
10191,
2435,
334,
29871,
29947,
29897,
13,
1678,
363,
364,
297,
313,
524,
877,
4286,
7122,
29898,
276,
874,
287,
29898,
10389,
8243,
29871,
29906,
29897,
363,
7023,
297,
867,
283,
546,
29898,
29947,
29892,
313,
710,
29898,
29890,
29897,
363,
289,
297,
9978,
511,
525,
29900,
8785,
29901,
13,
4706,
7709,
364,
13,
13,
1990,
29479,
1433,
18542,
8566,
6119,
29901,
13,
1678,
9995,
25196,
1433,
18542,
8566,
6119,
13,
13,
1678,
530,
23342,
2094,
6119,
363,
7581,
848,
8974,
29889,
29871,
1152,
278,
6368,
5742,
278,
2094,
6119,
13,
1678,
1074,
1732,
597,
264,
29889,
6011,
29889,
990,
29914,
4594,
29914,
1433,
18542,
29918,
29883,
3689,
29889,
13,
13,
1678,
8653,
2094,
6119,
353,
29479,
1433,
18542,
8566,
6119,
29898,
1783,
29956,
29898,
29947,
876,
13,
13,
1678,
2823,
884,
29901,
29479,
1433,
18542,
6185,
6119,
29892,
27122,
29892,
322,
27122,
29918,
13193,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1904,
29892,
954,
29918,
14836,
353,
29871,
29941,
29906,
1125,
13,
4706,
1583,
29889,
4299,
353,
1904,
13,
4706,
1583,
29889,
1949,
29918,
14836,
353,
954,
29918,
14836,
13,
13,
4706,
1583,
3032,
3332,
353,
29871,
29906,
3579,
1583,
29889,
1949,
29918,
14836,
13,
4706,
1583,
3032,
24498,
353,
1583,
3032,
3332,
849,
29871,
29906,
29871,
396,
518,
29900,
29892,
1583,
3032,
24498,
29897,
338,
14391,
278,
5225,
2586,
13,
4706,
1583,
3032,
29896,
29918,
29946,
353,
1583,
3032,
24498,
849,
29871,
29906,
13,
4706,
1583,
3032,
29941,
29918,
29946,
353,
1583,
3032,
3332,
448,
1583,
3032,
29896,
29918,
29946,
13,
13,
4706,
1583,
29889,
677,
353,
29871,
29900,
396,
4124,
791,
338,
518,
1311,
29889,
677,
29892,
1583,
29889,
9812,
29897,
13,
4706,
1583,
29889,
9812,
353,
1583,
3032,
3332,
13,
4706,
1583,
29889,
23031,
29918,
14836,
353,
29871,
29900,
396,
438,
407,
14556,
9978,
304,
1101,
278,
2446,
1962,
29915,
29881,
2586,
13,
13,
4706,
1583,
29889,
18434,
353,
5159,
13,
13,
1678,
822,
19750,
29898,
1311,
29892,
5829,
1125,
13,
4706,
9995,
8566,
2631,
263,
5829,
7863,
263,
5665,
310,
274,
6797,
9978,
29889,
13,
13,
4706,
450,
2094,
6119,
338,
2106,
1319,
322,
313,
16076,
372,
338,
27581,
27122,
292,
278,
1881,
29897,
372,
674,
451,
13,
4706,
736,
1962,
9978,
363,
1269,
1881,
5829,
29889,
13,
13,
4706,
887,
674,
817,
304,
28371,
278,
2094,
6119,
304,
679,
9886,
274,
6797,
9978,
1156,
8025,
278,
13,
4706,
4866,
5665,
29889,
13,
4706,
9995,
13,
13,
4706,
1962,
353,
5159,
13,
13,
4706,
396,
10987,
278,
6219,
1298,
13,
4706,
282,
29918,
9171,
353,
1583,
29889,
4299,
29889,
27711,
29898,
29900,
29892,
1583,
29889,
18434,
29897,
13,
4706,
6219,
353,
1583,
29889,
677,
718,
4236,
29898,
29896,
29892,
938,
3552,
1311,
29889,
9812,
448,
1583,
29889,
677,
29897,
334,
282,
29918,
9171,
876,
396,
29871,
29900,
29899,
19207,
338,
518,
1311,
29889,
677,
29892,
6219,
29897,
13,
13,
4706,
396,
10318,
278,
1904,
13,
4706,
1583,
29889,
4299,
29889,
5504,
29898,
18098,
29892,
1583,
29889,
18434,
29897,
13,
4706,
1583,
29889,
18434,
29889,
4397,
29898,
18098,
29897,
13,
13,
4706,
396,
10318,
278,
3464,
2729,
373,
278,
8900,
5829,
13,
4706,
565,
5829,
29901,
13,
9651,
1583,
29889,
677,
353,
6219,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
9812,
353,
6219,
13,
13,
4706,
396,
960,
278,
3464,
694,
5520,
975,
14128,
278,
7145,
3149,
29892,
278,
2446,
2586,
338,
2998,
13,
4706,
396,
259,
884,
620,
29883,
744,
278,
7292,
304,
679,
1250,
16716,
13,
4706,
396,
13,
4706,
396,
960,
278,
3464,
975,
14128,
278,
7145,
3149,
541,
451,
278,
29871,
29896,
29914,
29946,
470,
29871,
29941,
29914,
29946,
3291,
769,
13,
4706,
396,
259,
591,
620,
29883,
744,
278,
7292,
29892,
541,
5702,
445,
411,
1101,
9978,
29889,
29871,
960,
278,
2446,
13,
4706,
396,
259,
2586,
304,
1962,
338,
263,
29871,
29896,
29892,
769,
591,
2307,
1073,
372,
29915,
29879,
472,
278,
4482,
1095,
310,
278,
7568,
13,
4706,
396,
259,
4203,
29892,
577,
591,
1101,
411,
263,
29871,
29900,
29889,
29871,
20175,
565,
278,
2446,
2586,
338,
263,
29871,
29900,
29892,
769,
13,
4706,
396,
259,
591,
2307,
1073,
372,
29915,
29879,
472,
278,
1880,
1095,
310,
278,
5224,
4203,
29892,
577,
591,
1101,
13,
4706,
396,
259,
411,
263,
29871,
29896,
29889,
13,
4706,
396,
960,
445,
5930,
263,
1473,
931,
1434,
1962,
1259,
738,
2586,
29892,
769,
727,
674,
13,
4706,
396,
259,
817,
304,
367,
29871,
29906,
310,
1438,
1101,
9978,
29889,
29871,
1105,
591,
5702,
445,
491,
925,
11924,
292,
13,
4706,
396,
259,
263,
1101,
2586,
6795,
29889,
13,
4706,
396,
13,
4706,
396,
910,
338,
297,
263,
2425,
1363,
278,
716,
3464,
1122,
451,
25457,
278,
716,
7145,
3149,
29892,
13,
4706,
396,
259,
14372,
2999,
9978,
304,
367,
10087,
13,
4706,
1962,
353,
5159,
13,
4706,
1550,
5852,
29901,
13,
9651,
565,
1583,
29889,
9812,
5277,
1583,
3032,
24498,
29901,
13,
18884,
1962,
29889,
4397,
29898,
29900,
29897,
13,
18884,
1962,
29889,
21843,
4197,
29896,
29962,
334,
1583,
29889,
23031,
29918,
14836,
29897,
396,
3462,
278,
1101,
9978,
13,
18884,
1583,
29889,
23031,
29918,
14836,
353,
29871,
29900,
13,
9651,
25342,
1583,
29889,
677,
6736,
1583,
3032,
24498,
29901,
13,
18884,
1962,
29889,
4397,
29898,
29896,
29897,
13,
18884,
1962,
29889,
21843,
4197,
29900,
29962,
334,
1583,
29889,
23031,
29918,
14836,
29897,
396,
3462,
278,
1101,
9978,
13,
18884,
1583,
29889,
23031,
29918,
14836,
353,
29871,
29900,
13,
18884,
1583,
29889,
677,
22361,
1583,
3032,
24498,
13,
18884,
1583,
29889,
9812,
22361,
1583,
3032,
24498,
13,
9651,
25342,
1583,
29889,
677,
6736,
1583,
3032,
29896,
29918,
29946,
322,
1583,
29889,
9812,
5277,
1583,
3032,
29941,
29918,
29946,
29901,
13,
18884,
1583,
29889,
23031,
29918,
14836,
4619,
29871,
29896,
13,
18884,
1583,
29889,
677,
22361,
1583,
3032,
29896,
29918,
29946,
13,
18884,
1583,
29889,
9812,
22361,
1583,
3032,
29896,
29918,
29946,
13,
9651,
1683,
29901,
13,
18884,
2867,
13,
13,
9651,
1583,
29889,
677,
334,
29922,
29871,
29906,
13,
9651,
1583,
29889,
9812,
334,
29922,
29871,
29906,
13,
13,
4706,
736,
1962,
13,
13,
1678,
822,
28371,
29898,
1311,
1125,
13,
4706,
9995,
8754,
1878,
267,
738,
274,
6797,
9978,
297,
278,
2094,
6119,
29889,
29871,
14213,
1711,
2000,
1156,
278,
4152,
13,
4706,
5665,
756,
1063,
18511,
29889,
13,
4706,
9995,
13,
4706,
565,
1583,
29889,
677,
529,
1583,
3032,
29896,
29918,
29946,
29901,
13,
9651,
1962,
353,
518,
29900,
29962,
718,
518,
29896,
29962,
334,
313,
1311,
29889,
23031,
29918,
14836,
718,
29871,
29896,
29897,
13,
4706,
1683,
29901,
13,
9651,
1962,
353,
518,
29896,
29962,
718,
518,
29900,
29962,
334,
313,
1311,
29889,
23031,
29918,
14836,
718,
29871,
29896,
29897,
13,
13,
4706,
736,
1962,
13,
13,
1990,
29479,
1433,
18542,
6185,
6119,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1904,
29892,
954,
29918,
14836,
353,
29871,
29941,
29906,
1125,
13,
4706,
1583,
29889,
4299,
353,
1904,
13,
4706,
1583,
29889,
1949,
29918,
14836,
353,
954,
29918,
14836,
13,
4706,
1583,
3032,
3332,
353,
29871,
29906,
3579,
1583,
29889,
1949,
29918,
14836,
13,
4706,
1583,
3032,
24498,
353,
1583,
3032,
3332,
849,
29871,
29906,
396,
518,
29900,
29892,
1583,
3032,
24498,
29897,
14391,
278,
5225,
2586,
13,
4706,
1583,
3032,
29896,
29918,
29946,
353,
1583,
3032,
24498,
849,
29871,
29906,
13,
4706,
1583,
3032,
29941,
29918,
29946,
353,
1583,
3032,
3332,
448,
1583,
3032,
29896,
29918,
29946,
13,
4706,
1583,
29889,
677,
353,
29871,
29900,
13,
4706,
1583,
29889,
9812,
353,
29871,
29896,
396,
910,
5662,
1973,
954,
29918,
14836,
526,
1303,
1434,
1602,
3689,
13,
4706,
1583,
29889,
1767,
353,
29871,
29900,
13,
13,
4706,
1583,
29889,
18434,
353,
5159,
13,
13,
1678,
822,
21822,
29898,
1311,
29892,
2586,
1125,
13,
4706,
565,
1583,
29889,
9812,
5277,
1583,
3032,
24498,
29901,
13,
9651,
1209,
13,
4706,
25342,
1583,
29889,
677,
6736,
1583,
3032,
24498,
29901,
13,
9651,
1583,
29889,
1767,
22361,
1583,
3032,
24498,
13,
9651,
1583,
29889,
677,
22361,
1583,
3032,
24498,
13,
9651,
1583,
29889,
9812,
22361,
1583,
3032,
24498,
13,
4706,
25342,
1583,
29889,
677,
6736,
1583,
3032,
29896,
29918,
29946,
322,
1583,
29889,
9812,
5277,
1583,
3032,
29941,
29918,
29946,
29901,
13,
9651,
1583,
29889,
1767,
22361,
1583,
3032,
29896,
29918,
29946,
13,
9651,
1583,
29889,
677,
22361,
1583,
3032,
29896,
29918,
29946,
13,
9651,
1583,
29889,
9812,
22361,
1583,
3032,
29896,
29918,
29946,
13,
13,
4706,
1583,
29889,
677,
334,
29922,
29871,
29906,
13,
4706,
1583,
29889,
9812,
334,
29922,
29871,
29906,
13,
4706,
1583,
29889,
1767,
334,
29922,
29871,
29906,
13,
4706,
1583,
29889,
1767,
4619,
2586,
13,
13,
4706,
1962,
353,
5159,
13,
13,
4706,
1550,
313,
1311,
29889,
677,
529,
1583,
3032,
24498,
529,
1583,
29889,
9812,
322,
13,
18884,
5135,
1311,
29889,
677,
529,
1583,
3032,
29896,
29918,
29946,
470,
1583,
29889,
9812,
1405,
1583,
3032,
29941,
29918,
29946,
876,
1125,
13,
9651,
282,
29918,
9171,
353,
1583,
29889,
4299,
29889,
27711,
29898,
29900,
29892,
1583,
29889,
18434,
29897,
13,
9651,
6219,
353,
1583,
29889,
677,
718,
4236,
29898,
29896,
29892,
938,
3552,
1311,
29889,
9812,
448,
1583,
29889,
677,
29897,
334,
282,
29918,
9171,
876,
396,
29871,
29900,
29899,
19207,
338,
518,
1311,
29889,
677,
29892,
6219,
29897,
13,
9651,
5829,
353,
29871,
29900,
565,
1583,
29889,
1767,
529,
6219,
1683,
29871,
29896,
13,
9651,
1962,
29889,
4397,
29898,
18098,
29897,
13,
9651,
1583,
29889,
4299,
29889,
5504,
29898,
18098,
29892,
1583,
29889,
18434,
29897,
13,
9651,
1583,
29889,
18434,
29889,
4397,
29898,
18098,
29897,
13,
13,
9651,
565,
5829,
29901,
13,
18884,
1583,
29889,
677,
353,
6219,
13,
9651,
1683,
29901,
13,
18884,
1583,
29889,
9812,
353,
6219,
13,
13,
4706,
736,
1962,
13,
13,
1678,
822,
28371,
29898,
1311,
29892,
302,
14836,
1125,
13,
4706,
1962,
353,
5159,
13,
4706,
1550,
7431,
29898,
4905,
29897,
529,
302,
14836,
29901,
13,
9651,
1962,
4619,
1583,
29889,
13808,
29898,
29900,
29897,
13,
4706,
736,
1962,
7503,
9877,
1169,
29962,
13,
2
] |
src/files/trilio/get_pkgs.py | mskalka/charm-trilio-data-mover | 0 | 184991 | import cryptography
import libvirtmod
import cffi
import _cffi_backend
print(cryptography.__path__[0])
print(libvirtmod.__file__)
print(cffi.__path__[0])
print(_cffi_backend.__file__)
| [
1,
1053,
24941,
5275,
13,
5215,
4303,
15389,
1545,
13,
5215,
274,
600,
29875,
13,
5215,
903,
29883,
600,
29875,
29918,
27852,
13,
13,
2158,
29898,
29883,
4641,
5275,
17255,
2084,
1649,
29961,
29900,
2314,
13,
2158,
29898,
1982,
15389,
1545,
17255,
1445,
1649,
29897,
13,
2158,
29898,
29883,
600,
29875,
17255,
2084,
1649,
29961,
29900,
2314,
13,
2158,
7373,
29883,
600,
29875,
29918,
27852,
17255,
1445,
1649,
29897,
13,
2
] |
TwoPointers/Leetcode11.py | Rylie-W/LeetRecord | 0 | 9954 | class Solution:
def maxArea(self, height) -> int:
left=0
right=len(height)-1
res=min(height[left],height[right])*(right-left)
while right>left:
res=max(res,(right-left)*min(height[right],height[left]))
if height[left]<height[right]:
left+=1
else: right-=1
return res
if __name__ == '__main__':
sol=Solution()
# height = [1, 1]
height=[1,3,2,5,25,24,5]
print(sol.maxArea(height))
| [
1,
770,
24380,
29901,
13,
1678,
822,
4236,
13799,
29898,
1311,
29892,
3171,
29897,
1599,
938,
29901,
13,
4706,
2175,
29922,
29900,
13,
4706,
1492,
29922,
2435,
29898,
3545,
6817,
29896,
13,
4706,
620,
29922,
1195,
29898,
3545,
29961,
1563,
1402,
3545,
29961,
1266,
2314,
16395,
1266,
29899,
1563,
29897,
13,
13,
4706,
1550,
1492,
29958,
1563,
29901,
13,
9651,
620,
29922,
3317,
29898,
690,
22657,
1266,
29899,
1563,
11877,
1195,
29898,
3545,
29961,
1266,
1402,
3545,
29961,
1563,
12622,
13,
9651,
565,
3171,
29961,
1563,
29962,
29966,
3545,
29961,
1266,
5387,
13,
18884,
2175,
23661,
29896,
13,
9651,
1683,
29901,
1492,
29899,
29922,
29896,
13,
4706,
736,
620,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
899,
29922,
13296,
918,
580,
13,
1678,
396,
3171,
353,
518,
29896,
29892,
29871,
29896,
29962,
13,
1678,
3171,
11759,
29896,
29892,
29941,
29892,
29906,
29892,
29945,
29892,
29906,
29945,
29892,
29906,
29946,
29892,
29945,
29962,
13,
1678,
1596,
29898,
2929,
29889,
3317,
13799,
29898,
3545,
876,
13,
2
] |
examples/pytorch/AxHyperOptimizationPTL/ax_hpo_mnist.py | PeterSulcs/mlflow | 10,351 | 81368 | <filename>examples/pytorch/AxHyperOptimizationPTL/ax_hpo_mnist.py
import argparse
import mlflow
from ax.service.ax_client import AxClient
from iris import IrisClassification
from iris_data_module import IrisDataModule
import pytorch_lightning as pl
def train_evaluate(params, max_epochs=100):
model = IrisClassification(**params)
dm = IrisDataModule()
dm.setup(stage="fit")
trainer = pl.Trainer(max_epochs=max_epochs)
mlflow.pytorch.autolog()
trainer.fit(model, dm)
trainer.test(datamodule=dm)
test_accuracy = trainer.callback_metrics.get("test_acc")
return test_accuracy
def model_training_hyperparameter_tuning(max_epochs, total_trials, params):
"""
This function takes input params max_epochs, total_trials, params
and creates a nested run in Mlflow. The parameters, metrics, model and summary are dumped into their
respective mlflow-run ids. The best parameters are dumped along with the baseline model.
:param max_epochs: Max epochs used for training the model. Type:int
:param total_trials: Number of ax-client experimental trials. Type:int
:param params: Model parameters. Type:dict
"""
with mlflow.start_run(run_name="Parent Run"):
train_evaluate(params=params, max_epochs=max_epochs)
ax_client = AxClient()
ax_client.create_experiment(
parameters=[
{"name": "lr", "type": "range", "bounds": [1e-3, 0.15], "log_scale": True},
{"name": "weight_decay", "type": "range", "bounds": [1e-4, 1e-3]},
{"name": "momentum", "type": "range", "bounds": [0.7, 1.0]},
],
objective_name="test_accuracy",
)
for i in range(total_trials):
with mlflow.start_run(nested=True, run_name="Trial " + str(i)) as child_run:
parameters, trial_index = ax_client.get_next_trial()
test_accuracy = train_evaluate(params=parameters, max_epochs=max_epochs)
# completion of trial
ax_client.complete_trial(trial_index=trial_index, raw_data=test_accuracy.item())
best_parameters, metrics = ax_client.get_best_parameters()
for param_name, value in best_parameters.items():
mlflow.log_param("optimum_" + param_name, value)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser = pl.Trainer.add_argparse_args(parent_parser=parser)
parser.add_argument(
"--total_trials",
default=3,
help="umber of trials to be run for the optimization experiment",
)
args = parser.parse_args()
if "max_epochs" in args:
max_epochs = args.max_epochs
else:
max_epochs = 100
params = {"lr": 0.1, "momentum": 0.9, "weight_decay": 0}
model_training_hyperparameter_tuning(
max_epochs=int(max_epochs), total_trials=int(args.total_trials), params=params
)
| [
1,
529,
9507,
29958,
19057,
29914,
2272,
7345,
305,
29914,
29909,
29916,
26322,
546,
20624,
326,
2133,
7982,
29931,
29914,
1165,
29918,
29882,
1129,
29918,
23521,
391,
29889,
2272,
13,
5215,
1852,
5510,
13,
5215,
286,
29880,
1731,
13,
3166,
4853,
29889,
5509,
29889,
1165,
29918,
4645,
1053,
22523,
4032,
13,
3166,
3805,
275,
1053,
306,
3780,
2385,
2450,
13,
3166,
3805,
275,
29918,
1272,
29918,
5453,
1053,
306,
3780,
1469,
7355,
13,
5215,
282,
3637,
25350,
29918,
4366,
1076,
408,
715,
13,
13,
13,
1753,
7945,
29918,
24219,
403,
29898,
7529,
29892,
4236,
29918,
1022,
2878,
29879,
29922,
29896,
29900,
29900,
1125,
13,
1678,
1904,
353,
306,
3780,
2385,
2450,
29898,
1068,
7529,
29897,
13,
1678,
270,
29885,
353,
306,
3780,
1469,
7355,
580,
13,
1678,
270,
29885,
29889,
14669,
29898,
19190,
543,
9202,
1159,
13,
1678,
1020,
4983,
353,
715,
29889,
5323,
4983,
29898,
3317,
29918,
1022,
2878,
29879,
29922,
3317,
29918,
1022,
2878,
29879,
29897,
13,
1678,
286,
29880,
1731,
29889,
2272,
7345,
305,
29889,
1300,
1189,
580,
13,
1678,
1020,
4983,
29889,
9202,
29898,
4299,
29892,
270,
29885,
29897,
13,
1678,
1020,
4983,
29889,
1688,
29898,
4130,
314,
397,
1297,
29922,
18933,
29897,
13,
1678,
1243,
29918,
562,
2764,
4135,
353,
1020,
4983,
29889,
14035,
29918,
2527,
10817,
29889,
657,
703,
1688,
29918,
5753,
1159,
13,
1678,
736,
1243,
29918,
562,
2764,
4135,
13,
13,
13,
1753,
1904,
29918,
26495,
29918,
24947,
15501,
29918,
29873,
27964,
29898,
3317,
29918,
1022,
2878,
29879,
29892,
3001,
29918,
3626,
1338,
29892,
8636,
1125,
13,
1678,
9995,
13,
268,
910,
740,
4893,
1881,
8636,
4236,
29918,
1022,
2878,
29879,
29892,
3001,
29918,
3626,
1338,
29892,
8636,
13,
268,
322,
10017,
263,
9322,
1065,
297,
341,
29880,
1731,
29889,
450,
4128,
29892,
21556,
29892,
1904,
322,
15837,
526,
16766,
287,
964,
1009,
13,
268,
18067,
286,
29880,
1731,
29899,
3389,
18999,
29889,
450,
1900,
4128,
526,
16766,
287,
3412,
411,
278,
2362,
5570,
1904,
29889,
13,
13,
1678,
584,
3207,
4236,
29918,
1022,
2878,
29879,
29901,
5918,
21502,
12168,
1304,
363,
6694,
278,
1904,
29889,
5167,
29901,
524,
13,
1678,
584,
3207,
3001,
29918,
3626,
1338,
29901,
9681,
310,
4853,
29899,
4645,
17986,
3367,
1338,
29889,
5167,
29901,
524,
13,
1678,
584,
3207,
8636,
29901,
8125,
4128,
29889,
5167,
29901,
8977,
13,
1678,
9995,
13,
1678,
411,
286,
29880,
1731,
29889,
2962,
29918,
3389,
29898,
3389,
29918,
978,
543,
9780,
7525,
29908,
1125,
13,
4706,
7945,
29918,
24219,
403,
29898,
7529,
29922,
7529,
29892,
4236,
29918,
1022,
2878,
29879,
29922,
3317,
29918,
1022,
2878,
29879,
29897,
13,
13,
4706,
4853,
29918,
4645,
353,
22523,
4032,
580,
13,
4706,
4853,
29918,
4645,
29889,
3258,
29918,
735,
15362,
29898,
13,
9651,
4128,
11759,
13,
18884,
8853,
978,
1115,
376,
29212,
613,
376,
1853,
1115,
376,
3881,
613,
376,
23687,
1115,
518,
29896,
29872,
29899,
29941,
29892,
29871,
29900,
29889,
29896,
29945,
1402,
376,
1188,
29918,
7052,
1115,
5852,
1118,
13,
18884,
8853,
978,
1115,
376,
7915,
29918,
7099,
388,
613,
376,
1853,
1115,
376,
3881,
613,
376,
23687,
1115,
518,
29896,
29872,
29899,
29946,
29892,
29871,
29896,
29872,
29899,
29941,
29962,
1118,
13,
18884,
8853,
978,
1115,
376,
29885,
2932,
398,
613,
376,
1853,
1115,
376,
3881,
613,
376,
23687,
1115,
518,
29900,
29889,
29955,
29892,
29871,
29896,
29889,
29900,
29962,
1118,
13,
9651,
21251,
13,
9651,
12091,
29918,
978,
543,
1688,
29918,
562,
2764,
4135,
613,
13,
4706,
1723,
13,
13,
4706,
363,
474,
297,
3464,
29898,
7827,
29918,
3626,
1338,
1125,
13,
9651,
411,
286,
29880,
1731,
29889,
2962,
29918,
3389,
29898,
27420,
29922,
5574,
29892,
1065,
29918,
978,
543,
29911,
9315,
376,
718,
851,
29898,
29875,
876,
408,
2278,
29918,
3389,
29901,
13,
18884,
4128,
29892,
14260,
29918,
2248,
353,
4853,
29918,
4645,
29889,
657,
29918,
4622,
29918,
3626,
284,
580,
13,
18884,
1243,
29918,
562,
2764,
4135,
353,
7945,
29918,
24219,
403,
29898,
7529,
29922,
16744,
29892,
4236,
29918,
1022,
2878,
29879,
29922,
3317,
29918,
1022,
2878,
29879,
29897,
13,
13,
18884,
396,
13285,
310,
14260,
13,
18884,
4853,
29918,
4645,
29889,
8835,
29918,
3626,
284,
29898,
3626,
284,
29918,
2248,
29922,
3626,
284,
29918,
2248,
29892,
10650,
29918,
1272,
29922,
1688,
29918,
562,
2764,
4135,
29889,
667,
3101,
13,
13,
4706,
1900,
29918,
16744,
29892,
21556,
353,
4853,
29918,
4645,
29889,
657,
29918,
13318,
29918,
16744,
580,
13,
4706,
363,
1828,
29918,
978,
29892,
995,
297,
1900,
29918,
16744,
29889,
7076,
7295,
13,
9651,
286,
29880,
1731,
29889,
1188,
29918,
3207,
703,
3670,
12539,
27508,
718,
1828,
29918,
978,
29892,
995,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
580,
13,
1678,
13812,
353,
715,
29889,
5323,
4983,
29889,
1202,
29918,
1191,
5510,
29918,
5085,
29898,
3560,
29918,
16680,
29922,
16680,
29897,
13,
13,
1678,
13812,
29889,
1202,
29918,
23516,
29898,
13,
4706,
376,
489,
7827,
29918,
3626,
1338,
613,
13,
4706,
2322,
29922,
29941,
29892,
13,
4706,
1371,
543,
2807,
310,
3367,
1338,
304,
367,
1065,
363,
278,
13883,
7639,
613,
13,
1678,
1723,
13,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
13,
1678,
565,
376,
3317,
29918,
1022,
2878,
29879,
29908,
297,
6389,
29901,
13,
4706,
4236,
29918,
1022,
2878,
29879,
353,
6389,
29889,
3317,
29918,
1022,
2878,
29879,
13,
1678,
1683,
29901,
13,
4706,
4236,
29918,
1022,
2878,
29879,
353,
29871,
29896,
29900,
29900,
13,
13,
1678,
8636,
353,
8853,
29212,
1115,
29871,
29900,
29889,
29896,
29892,
376,
29885,
2932,
398,
1115,
29871,
29900,
29889,
29929,
29892,
376,
7915,
29918,
7099,
388,
1115,
29871,
29900,
29913,
13,
13,
1678,
1904,
29918,
26495,
29918,
24947,
15501,
29918,
29873,
27964,
29898,
13,
4706,
4236,
29918,
1022,
2878,
29879,
29922,
524,
29898,
3317,
29918,
1022,
2878,
29879,
511,
3001,
29918,
3626,
1338,
29922,
524,
29898,
5085,
29889,
7827,
29918,
3626,
1338,
511,
8636,
29922,
7529,
13,
1678,
1723,
13,
2
] |
master/result_import_slp.py | dsolisherrera/excovery | 0 | 78653 | <filename>master/result_import_slp.py
import sys
#sys.path.append('/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7')
#sys.path.append('/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages')
import struct
import zlib
from exp_description import *
import pcapy
import datetime
import sqlite3
import json
import zlib
def init_db():
global conn
c = conn.cursor()
c.execute("SELECT name FROM sqlite_master WHERE type='table' AND name=''")
if c.fetchone()==None:
# Create table
c.execute('''CREATE TABLE "run_ids" (
"runID" INTEGER PRIMARY KEY AUTOINCREMENT,
"run_identifier" TEXT
) ''' )
c.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='EEFiles'")
if c.fetchone()==None:
# Create table
c.execute('''CREATE TABLE "EEFiles" (
"ID" INTEGER PRIMARY KEY AUTOINCREMENT,
"File" BLOB)'''
)
c.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='Events'")
if c.fetchone()==None:
c.execute('''
CREATE TABLE "Events" (
"RunID" INTEGER,
"NodeID" INTEGER,
"CommonTime" TEXT,
"EventType" TEXT,
"Parameter" TEXT
) ''')
c.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='ExperimentInfo'")
if c.fetchone()==None:
c.execute('''
CREATE TABLE "ExperimentInfo" (
"ExpXML" TEXT,
"EEVersion" TEXT,
"Name" TEXT,
"Comment" TEXT
)''')
c.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='NodesIP'")
if c.fetchone()==None:
c.execute('''CREATE TABLE "NodesIP" (
"NodeID" TEXT,
"IP_Address" TEXT
)''')
c.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='ExperimentMeasurements'")
if c.fetchone()==None:
c.execute('''CREATE TABLE "ExperimentMeasurements" (
"ID" INTEGER PRIMARY KEY,
"NodeID" TEXT,
"Name" TEXT,
"Content" TEXT
)''')
c.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='ExtraRunMeasurements'")
if c.fetchone()==None:
c.execute('''CREATE TABLE "ExtraRunMeasurements" (
"RunID" INTEGER,
"NodeID" INTEGER,
"Name" TEXT,
"Content" TEXT
)
''')
c.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='Links'")
if c.fetchone()==None:
c.execute('''
CREATE TABLE "Links" (
"RunID" INTEGER,
"NodeIP" TEXT,
"NeighborIP" TEXT,
"LQ" REAL,
"NLQ" REAL
) ''')
c.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='OLSR'")
if c.fetchone()==None:
c.execute('''
CREATE TABLE "OLSR" (
"RunID" INTEGER,
"NodeID" TEXT,
"OLSR" BLOB
) ''')
c.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='Logs'")
if c.fetchone()==None:
c.execute('''CREATE TABLE "Logs" (
"NodeID" TEXT,
"Log" BLOB
)''')
c.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='PacketsBmf0'")
if c.fetchone()==None:
c.execute('''CREATE TABLE "PacketsBmf0" (
"RunID" INTEGER,
"NodeID" INTEGER,
"CommonTime" TEXT,
"SrcNodeID" TEXT,
"Data" BLOB
)''')
c.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='PacketsWLAN2'")
if c.fetchone()==None:
c.execute('''CREATE TABLE "PacketsWLAN2" (
"RunID" INTEGER,
"NodeID" INTEGER,
"CommonTime" TEXT,
"SrcNodeID" TEXT,
"Data" BLOB
)''')
c.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='RunInfos'")
if c.fetchone()==None:
c.execute(''' CREATE TABLE "RunInfos" (
"RunID" INTEGER,
"NodeID" INTEGER,
"StartTime" TEXT,
"TimeDiff" TEXT
)''')
# c.execute('''CREATE INDEX "id" on measurements (runID ASC)''')
# Save (commit) the changes
conn.commit()
# We can also close the cursor if we are done with it
c.close()
class exp_event_list:
def __init__(self):
self.event_list = []
def load_from_file(self, file):
self.event_list = []
fd = open(file)
i = 0
event_list = []
for line in fd:
if i == 0 or line.split(',')[0] == "timestamp":
i = i +1
continue #skip the description line
try:
self.event_list.append(self.parse_line(line))
except:
print "Error in file ", file
raise()
#event_list.append("%s,%s" %(line,node_name))
fd.close()
return self.event_list
def parse_line(self, line):
'''
Each line consists of a timestamp,type,param
The timestamp is concerted into epoch value
'''
list = line.split(',')
dt, _, us = list[0].partition(".")
if _ != ".":
_, us = [".", "000000"]
list[0] = list[0] + ".000000"
dt= datetime.datetime.strptime(dt, "%Y-%m-%d %H:%M:%S")
us= int(us.rstrip("Z"), 10)
ret = dt + datetime.timedelta(microseconds=us)
## patch old event types:
if list[1]=="SD_init": list[1]="sd_init_done"
if list[1]=="SD_exit": list[1]="sd_exit"
if list[1]=="SD_start_search": list[1]="sd_start_search"
if list[1]=="SD_stop_search": list[1]="sd_stop_search"
if list[1]=="SD_publish": list[1]="sd_start_publish"
if list[1]=="SD_add": list[1]="sd_service_add"
return {'ts':ret, 'ts_string':list[0],'EventType':list[1], 'Parameter':list[2] }
#gt("2008-08-12T12:20:30.656234Z")
#datetime.datetime(2008, 8, 12, 12, 20, 30, 656234)
def get_packet_list(file, timediff,pos):
'''
returns an dict {'ts' commonTime, 'srcNode', 'data'}
'''
global exp
diff = datetime.timedelta(milliseconds=timediff)
p = pcapy.open_offline(file)
done = False
packet_list = []
while done==False:
try:
(hdr,data) = p.next()
curr_hdr = {}
curr_hdr['ts_s'],curr_hdr['ts_us'] = hdr.getts()
ts = datetime.datetime.fromtimestamp(curr_hdr['ts_s'])
ts = ts + datetime.timedelta(microseconds=curr_hdr['ts_us'])
ts = ts + diff
#ipaddr=struct.unpack('B',data[12:16])[0]
if pos == "bmp":
ip0=struct.unpack('B',data[12])[0]
ip1=struct.unpack('B',data[13])[0]
ip2=struct.unpack('B',data[14])[0]
ip3=struct.unpack('B',data[15])[0]
else:
ip0=struct.unpack('B',data[26])[0]
ip1=struct.unpack('B',data[27])[0]
ip2=struct.unpack('B',data[28])[0]
ip3=struct.unpack('B',data[29])[0]
ip = "%d.%d.%d.%d" % (ip0,ip1,ip2,ip3)
#node ID
node=exp.get_node_by_ip(ip)
try:
packet_list.append({'CommonTime':ts, 'SrcNodeID':node['real_id'], 'Data':data})
except TypeError:
print ">>> OOOOOPS!"
print ">>> Does one of you nodes have the wrong IP in the XML file?"
print ">>> Aborting ..."
continue
#print "Packet TS:",ts
except pcapy.PcapError:
done=True
return packet_list
def get_links_measurements(exp_dir, run_id, db_run_id , node, c,fmt='json'):
if fmt == 'txt':
start = 0
fd = open("%s/nodes/%s/links/%s.log" % (exp_dir,run_id, node['real_id']))
i = 0
for line in fd:
links = line.split()
if len(links) == 0 and start == 1:
break
for i in range(len(links)):
if links[i] == 'INFINITE':
links[i] = "infinity"
if start == 1:
c.execute("INSERT INTO Links (RunID, NodeIP, NeighborIP, LQ, NLQ) VALUES (?,?,?,?,?)", [db_run_id, links[0],links[1],links[3],links[4]])
if "Local" in links:
start = 1
# Need to find a proper way to save the text file
#c.execute("INSERT INTO OLSR (RunID,NodeID, OLSR) VALUES (?,?,?)",[db_run_id,node['real_id'], sqlite3.Binary(zlib.compress(fd.read()))])
fd.close()
else:
fd = open("%s/nodes/%s/links/%s.json" % (exp_dir,run_id, node['real_id']))
olsr = json.load(fd)
for link in olsr['links']:
c.execute("INSERT INTO Links (RunID, NodeIP, NeighborIP, LQ, NLQ) VALUES (?,?,?,?,?)", [db_run_id, link['localIP'],link['remoteIP'],link['linkQuality'],link['neighborLinkQuality']])
c.execute("INSERT INTO OLSR (RunID,NodeID, OLSR) VALUES (?,?,?)",[db_run_id,node['real_id'], sqlite3.Binary(zlib.compress(json.dumps(olsr)))])
fd.close()
def get_extra_run_measurements(exp_dir, run_id, node):
'''
'''
fd = open("%s/nodes/%s/routes/%s.log" % (exp_dir,run_id, node['real_id']))
i = 0
for line in fd:
routes = line
fd.close()
return routes
def get_log_file(exp_dir, node):
fd = open("%s/nodes/RPC-Server_%s.log" % (exp_dir, node['real_id']))
i = 0
log = fd.read()
log = zlib.compress(log)
fd.close()
return log
def run_dir_importer(exp_dir, run_identifier, db_run_id, node, c,olsr_fmt):
'''
'''
#get events
event_list = exp_event_list()
event_list.load_from_file("%s/nodes/%s/event_log_%s.log" % (exp_dir, run_identifier, node['real_id']))
time_diff = 0
#get time diff info
if node['abstract_id']!="":
fd = open("%s/master/%s/ping_t_%s" % (exp_dir,run_identifier, node['real_id']))
i = 0
offset_1 = 0
for line in fd:
if i == 3:
#fetch first offset
try:
offset_1 = int(line)
except ValueError:
last_run_identifier = run_identifier.split('_')
last_run_identifier[-1] = str(int(last_run_identifier[-1])-1)
last_run_identifier = '_'.join(last_run_identifier)
fd_last = open("%s/master/%s/ping_t_%s" % (exp_dir,last_run_identifier, node['real_id']))
i_last = 0
for line_last in fd_last:
if i_last == 3:
#fetch first offset
offset_1 = int(line_last)
if i_last == 5:
offset_2 = int(line_last)
break
i_last = i_last +1
fd_last.close()
break
if i == 5:
offset_2 = int(line)
break
i = i +1
fd.close()
# todo check calculation
time_diff = offset_1 #+ abs(offset_2))/2
#print "Time_diff=",time_diff
try:
c.execute("INSERT INTO RunInfos (RunID, NodeID, StartTime, TimeDiff) VALUES(?,?,?,?)",[db_run_id,node['real_id'],event_list.event_list[0]['ts_string'],time_diff])
except IndexError:
sys.stdout.flush()
sys.stdout.write("\n")
print ">>> OOOOOPS!"
print ">>> We have an index error."
print "db_run_id: %d" % db_run_id
print "node: %s" % node
print "node['real_id']: %s" % node['real_id']
print "event_list: %s" % event_list
print "event_list.event_list: %s" % event_list.event_list
print "event_list.event_list[0]: %s" % event_list.event_list[0]
print "event_list.event_list[0]['ts_string']: %s" % event_list.event_list[0]['ts_string']
print "time_diff: %d" % time_diff
raise()
for event in event_list.event_list:
diff = datetime.timedelta(milliseconds=time_diff)
commonTime = event['ts'] + diff
c.execute("INSERT INTO Events (RunID, NodeID, CommonTime, EventType, Parameter) VALUES (?,?,?,?,?)", [db_run_id,node['real_id'],commonTime, event['EventType'],event['Parameter']])
# parse packets
if node['abstract_id']!="":
cap = "%s/nodes/%s/capture/%s_bmf0.pcap" %(exp_dir, run_identifier,node['real_id'])
packet_list = get_packet_list(cap, time_diff,"bmp")
#print len(packet_list)
#print packet_list
for packet in packet_list:
c.execute("INSERT INTO PacketsBmf0 (RunID,NodeID,CommonTime, SrcNodeId, Data) VALUES (?,?,?,?,?)", [db_run_id,node['real_id'],packet['CommonTime'],packet['SrcNodeID'],sqlite3.Binary(packet['Data'])])
if node['abstract_id']!="":
cap = "%s/nodes/%s/capture/%s_wlan2.pcap" %(exp_dir, run_identifier,node['real_id'])
packet_list = get_packet_list(cap, time_diff,"wlan2")
#print len(packet_list)
#print packet_list
for packet in packet_list:
c.execute("INSERT INTO PacketsWLAN2 (RunID,NodeID,CommonTime, SrcNodeId, Data) VALUES (?,?,?,?,?)", [db_run_id,node['real_id'],packet['CommonTime'],packet['SrcNodeID'],sqlite3.Binary(packet['Data'])])
# ExtraRun measurements
routes = get_extra_run_measurements(exp_dir,run_identifier, node)
c.execute("INSERT INTO ExtraRunMeasurements (RunID, NodeID, Name, Content) VALUES (?,?,?,?)", [db_run_id, node['real_id'],"routes",routes])
# Topology/links measurements given by OLSR
get_links_measurements(exp_dir, run_identifier, db_run_id , node, c, fmt=olsr_fmt)
def get_topo(exp_dir, node, node2):
fd = open("%s/nodes/topology/traceroute_%s_%s" % (exp_dir, node['real_id'],node2['real_id']))
i = 0
s = fd.read()
#s = zlib.compress(s)
fd.close()
return s
def experiment_dir_importer(exp_dir,olsr_fmt):
global csv_file
global exp
global conn
c = conn.cursor()
#loop over run sequence
for run_number in range(exp.get_run_count()):
###### SETUP LEVELS OF ALL FACTORS FOR THIS RUN ########
exp.set_run_number(run_number)
run_definition = exp.get_run_identifier()
sys.stdout.write("\rImporting run ID %d" % run_number)
sys.stdout.flush()
c.execute("INSERT INTO run_ids (run_identifier) VALUES (?)", [run_definition])
run_id = c.lastrowid
# import measurements from nodes and master
# event lists, packets, topo, timediff
all_nodes = exp.get_all_spec_nodes()
for node in all_nodes:
#if node['real_id']=="t9-007":
run_dir_importer(exp_dir, run_definition, run_id, node, c,olsr_fmt)
sys.stdout.write("\r%d runs imported " % (run_number + 1))
sys.stdout.flush()
sys.stdout.write("\n")
conn.commit()
# get log files
nodenum = 0
for node in all_nodes:
nodenum = nodenum + 1
c.execute("INSERT INTO NodesIP (NodeID, IP_Address) VALUES (?,?)",[node['real_id'], node['real_ip']])
try:
sys.stdout.write("\rInserting log for node %d" % nodenum)
sys.stdout.flush()
log = get_log_file(exp_dir, node)
c.execute("INSERT INTO Logs (NodeID, Log) VALUES (?,?)",[node['real_id'], sqlite3.Binary(log)])
except:
sys.stdout.write(" ... no logfile")
sys.stdout.write("\rLogs for %d nodes inserted " % nodenum)
sys.stdout.flush()
sys.stdout.write("\n")
# get program files
conn.commit()
# get experiment measurements
for node in all_nodes:
for node2 in all_nodes:
if node!= node2:
if node['abstract_id']!="" and node2['abstract_id']!="":
topo = get_topo(exp_dir, node, node2)
c.execute("INSERT INTO ExperimentMeasurements (NodeID, Name, Content) VALUES (?,'hopcount',?)",[node['real_id'],topo])
# get experiment description
conn.commit()
if __name__ == '__main__':
global exp
global conn
parser = optparse.OptionParser(
description='Import Service Discovery Experiments.',
prog=os.path.basename(sys.argv[0]),
version='%s 0.0.1' % os.path.basename(sys.argv[0]),
)
parser.add_option('-e', metavar='experiment_dir', dest='experiment_dir', help='Name of the experiment')
parser.add_option('-x', metavar='exp_file', dest='exp_file', help='the abstract experiment description')
parser.add_option('-o', metavar='csv_file', dest='csv_file', help='the file to which the results are written')
parser.add_option('-d', metavar='database', dest='database', help='the file that should contain the database')
parser.add_option('--olsr', metavar='olsr_fmt', dest='olsr_fmt', help='the format in which the olsr data was generated')
options, arguments = parser.parse_args()
if options.experiment_dir==None:
print "Need experiment dir"
exit()
if options.csv_file!=None:
csv_file = options.csv_file
if options.database==None:
conn = sqlite3.connect('/tmp/example4')
else:
conn = sqlite3.connect(options.database)
if options.olsr_fmt!=None:
olsr_fmt = options.olsr_fmt
else:
olsr_fmt = 'json'
exp = experiment_description(options.exp_file)
#exp.summary()
init_db()
experiment_dir_importer(options.experiment_dir,olsr_fmt)
c = conn.cursor()
fd = open(options.exp_file)
xml = fd.read()
fd.close()
c.execute("INSERT INTO ExperimentInfo (ExpXML,EEVersion,Name,Comment) VALUES (?,'0.4',?,?)",[xml, exp.experiment_name,""])
conn.commit()
print "Creating indexes"
c.execute('''CREATE INDEX "events_index" on events (RunID ASC, NodeID ASC)''')
c.execute('''CREATE INDEX "packet_index" on packets (RunID ASC, NodeID ASC, SrcNodeID ASC)''')
c.execute('''CREATE INDEX "runinfo_index" on runinfos (RunID ASC, NodeID ASC)''')
conn.commit()
| [
1,
529,
9507,
29958,
6207,
29914,
2914,
29918,
5215,
29918,
2536,
29886,
29889,
2272,
13,
5215,
10876,
30004,
13,
29937,
9675,
29889,
2084,
29889,
4397,
11219,
3670,
29914,
2997,
29914,
12284,
29914,
4308,
13129,
29914,
11980,
29889,
4468,
29914,
29963,
414,
1080,
29914,
29906,
29889,
29955,
29914,
1982,
29914,
4691,
29906,
29889,
29955,
1495,
30004,
13,
29937,
9675,
29889,
2084,
29889,
4397,
11219,
3670,
29914,
2997,
29914,
12284,
29914,
4308,
13129,
29914,
11980,
29889,
4468,
29914,
29963,
414,
1080,
29914,
29906,
29889,
29955,
29914,
1982,
29914,
4691,
29906,
29889,
29955,
29914,
2746,
29899,
8318,
1495,
30004,
13,
30004,
13,
5215,
2281,
30004,
13,
5215,
503,
1982,
30004,
13,
3166,
1518,
29918,
8216,
1053,
334,
30004,
13,
5215,
282,
5030,
29891,
30004,
13,
5215,
12865,
30004,
13,
5215,
21120,
29941,
30004,
13,
5215,
4390,
30004,
13,
5215,
503,
1982,
30004,
13,
30004,
13,
1753,
2069,
29918,
2585,
7295,
30004,
13,
12,
10945,
11009,
6756,
13,
12,
29883,
353,
11009,
29889,
18127,
26471,
13,
30004,
13,
12,
29883,
29889,
7978,
703,
6404,
1024,
3895,
21120,
29918,
6207,
5754,
1134,
2433,
2371,
29915,
5300,
1024,
2433,
29915,
1159,
30004,
13,
12,
361,
274,
29889,
9155,
650,
580,
1360,
8516,
29901,
30004,
13,
12,
12,
29937,
6204,
1591,
30004,
13,
12,
12,
29883,
29889,
7978,
877,
4907,
27045,
10911,
376,
3389,
29918,
4841,
29908,
313,
30004,
13,
12,
12,
12,
12,
29908,
3389,
1367,
29908,
2672,
4330,
17070,
29778,
14636,
26524,
6992,
22245,
13780,
11167,
13,
12,
12,
12,
12,
29908,
3389,
29918,
25378,
29908,
323,
12194,
30004,
13,
12,
12,
12,
29897,
12,
12,
14550,
12,
1723,
30004,
13,
30004,
13,
12,
29883,
29889,
7978,
703,
6404,
1024,
3895,
21120,
29918,
6207,
5754,
1134,
2433,
2371,
29915,
5300,
1024,
2433,
17896,
10547,
29915,
1159,
30004,
13,
12,
361,
274,
29889,
9155,
650,
580,
1360,
8516,
29901,
30004,
13,
12,
12,
29937,
6204,
1591,
30004,
13,
12,
12,
29883,
29889,
7978,
877,
4907,
27045,
10911,
376,
17896,
10547,
29908,
313,
30004,
13,
12,
12,
12,
29908,
1367,
29908,
2672,
4330,
17070,
29778,
14636,
26524,
6992,
22245,
13780,
11167,
13,
12,
12,
12,
29908,
2283,
29908,
350,
28902,
29897,
12008,
30004,
13,
12,
12,
8443,
13,
12,
30004,
13,
12,
29883,
29889,
7978,
703,
6404,
1024,
3895,
21120,
29918,
6207,
5754,
1134,
2433,
2371,
29915,
5300,
1024,
2433,
13634,
29915,
1159,
30004,
13,
12,
361,
274,
29889,
9155,
650,
580,
1360,
8516,
29901,
30004,
13,
12,
12,
29883,
29889,
7978,
877,
4907,
30004,
13,
12,
12,
12,
12,
12,
27045,
10911,
376,
13634,
29908,
313,
30004,
13,
12,
12,
12,
12,
29908,
6558,
1367,
29908,
2672,
4330,
17070,
11167,
13,
12,
12,
12,
12,
29908,
4247,
1367,
29908,
2672,
4330,
17070,
11167,
13,
12,
12,
12,
12,
29908,
18877,
2481,
29908,
323,
12194,
11167,
13,
12,
12,
12,
12,
29908,
2624,
1542,
29908,
323,
12194,
11167,
13,
12,
12,
12,
12,
29908,
9329,
29908,
323,
12194,
30004,
13,
12,
12,
12,
29897,
6629,
1495,
30004,
13,
12,
12,
30004,
13,
12,
29883,
29889,
7978,
703,
6404,
1024,
3895,
21120,
29918,
6207,
5754,
1134,
2433,
2371,
29915,
5300,
1024,
2433,
1252,
15362,
3401,
29915,
1159,
30004,
13,
12,
361,
274,
29889,
9155,
650,
580,
1360,
8516,
29901,
30004,
13,
12,
12,
29883,
29889,
7978,
877,
4907,
30004,
13,
12,
12,
12,
27045,
10911,
376,
1252,
15362,
3401,
29908,
313,
30004,
13,
12,
12,
12,
12,
29908,
9544,
9165,
29908,
323,
12194,
11167,
13,
12,
12,
12,
12,
29908,
17896,
6594,
29908,
323,
12194,
11167,
13,
12,
12,
12,
12,
29908,
1170,
29908,
323,
12194,
11167,
13,
12,
12,
12,
12,
29908,
20001,
29908,
323,
12194,
30004,
13,
12,
12,
12,
29897,
4907,
1495,
30004,
13,
30004,
13,
12,
29883,
29889,
7978,
703,
6404,
1024,
3895,
21120,
29918,
6207,
5754,
1134,
2433,
2371,
29915,
5300,
1024,
2433,
20284,
5690,
29915,
1159,
30004,
13,
12,
361,
274,
29889,
9155,
650,
580,
1360,
8516,
29901,
30004,
13,
12,
12,
29883,
29889,
7978,
877,
4907,
27045,
10911,
376,
20284,
5690,
29908,
313,
30004,
13,
12,
12,
12,
12,
29908,
4247,
1367,
29908,
323,
12194,
11167,
13,
12,
12,
12,
12,
29908,
5690,
29918,
7061,
29908,
323,
12194,
30004,
13,
12,
12,
12,
29897,
4907,
1495,
30004,
13,
12,
30004,
13,
12,
29883,
29889,
7978,
703,
6404,
1024,
3895,
21120,
29918,
6207,
5754,
1134,
2433,
2371,
29915,
5300,
1024,
2433,
1252,
15362,
6816,
3745,
1860,
29915,
1159,
30004,
13,
12,
361,
274,
29889,
9155,
650,
580,
1360,
8516,
29901,
30004,
13,
12,
12,
29883,
29889,
7978,
877,
4907,
27045,
10911,
376,
1252,
15362,
6816,
3745,
1860,
29908,
313,
30004,
13,
12,
12,
12,
12,
29908,
1367,
29908,
2672,
4330,
17070,
29778,
14636,
11167,
13,
12,
12,
12,
12,
29908,
4247,
1367,
29908,
323,
12194,
11167,
13,
12,
12,
12,
12,
29908,
1170,
29908,
323,
12194,
11167,
13,
12,
12,
12,
12,
29908,
3916,
29908,
323,
12194,
30004,
13,
12,
12,
12,
29897,
4907,
1495,
30004,
13,
30004,
13,
12,
29883,
29889,
7978,
703,
6404,
1024,
3895,
21120,
29918,
6207,
5754,
1134,
2433,
2371,
29915,
5300,
1024,
2433,
18126,
6558,
6816,
3745,
1860,
29915,
1159,
30004,
13,
12,
361,
274,
29889,
9155,
650,
580,
1360,
8516,
29901,
30004,
13,
12,
12,
29883,
29889,
7978,
877,
4907,
27045,
10911,
376,
18126,
6558,
6816,
3745,
1860,
29908,
313,
30004,
13,
12,
12,
12,
29908,
6558,
1367,
29908,
2672,
4330,
17070,
11167,
13,
12,
12,
12,
29908,
4247,
1367,
29908,
2672,
4330,
17070,
11167,
13,
12,
12,
12,
29908,
1170,
29908,
323,
12194,
11167,
13,
12,
12,
12,
29908,
3916,
29908,
323,
12194,
30004,
13,
12,
12,
12,
8443,
13,
12,
12,
4907,
1495,
30004,
13,
30004,
13,
12,
29883,
29889,
7978,
703,
6404,
1024,
3895,
21120,
29918,
6207,
5754,
1134,
2433,
2371,
29915,
5300,
1024,
2433,
6595,
29879,
29915,
1159,
30004,
13,
12,
361,
274,
29889,
9155,
650,
580,
1360,
8516,
29901,
30004,
13,
12,
12,
29883,
29889,
7978,
877,
4907,
30004,
13,
12,
12,
12,
12,
27045,
10911,
376,
6595,
29879,
29908,
313,
30004,
13,
12,
12,
12,
12,
29908,
6558,
1367,
29908,
2672,
4330,
17070,
11167,
13,
12,
12,
12,
12,
29908,
4247,
5690,
29908,
323,
12194,
11167,
13,
18884,
376,
8139,
1141,
4089,
5690,
29908,
323,
12194,
11167,
13,
12,
12,
12,
12,
29908,
29931,
29984,
29908,
5195,
1964,
11167,
13,
12,
12,
12,
12,
29908,
25103,
29984,
29908,
5195,
1964,
30004,
13,
12,
12,
12,
29897,
6629,
1495,
30004,
13,
12,
12,
12,
30004,
13,
12,
29883,
29889,
7978,
703,
6404,
1024,
3895,
21120,
29918,
6207,
5754,
1134,
2433,
2371,
29915,
5300,
1024,
2433,
5607,
14098,
29915,
1159,
30004,
13,
12,
361,
274,
29889,
9155,
650,
580,
1360,
8516,
29901,
30004,
13,
12,
12,
29883,
29889,
7978,
877,
4907,
30004,
13,
12,
12,
12,
12,
27045,
10911,
376,
5607,
14098,
29908,
313,
30004,
13,
12,
12,
12,
12,
29908,
6558,
1367,
29908,
2672,
4330,
17070,
11167,
13,
12,
12,
12,
12,
29908,
4247,
1367,
29908,
323,
12194,
11167,
13,
18884,
376,
5607,
14098,
29908,
350,
28902,
30004,
13,
12,
12,
12,
29897,
6629,
1495,
12,
30004,
13,
12,
30004,
13,
12,
29883,
29889,
7978,
703,
6404,
1024,
3895,
21120,
29918,
6207,
5754,
1134,
2433,
2371,
29915,
5300,
1024,
2433,
3403,
29879,
29915,
1159,
30004,
13,
12,
361,
274,
29889,
9155,
650,
580,
1360,
8516,
29901,
30004,
13,
12,
12,
29883,
29889,
7978,
877,
4907,
27045,
10911,
376,
3403,
29879,
29908,
313,
30004,
13,
12,
12,
12,
12,
29908,
4247,
1367,
29908,
323,
12194,
11167,
13,
12,
12,
12,
12,
29908,
3403,
29908,
350,
28902,
30004,
13,
12,
12,
12,
29897,
4907,
1495,
30004,
13,
12,
30004,
13,
12,
29883,
29889,
7978,
703,
6404,
1024,
3895,
21120,
29918,
6207,
5754,
1134,
2433,
2371,
29915,
5300,
1024,
2433,
16638,
1691,
29933,
29885,
29888,
29900,
29915,
1159,
30004,
13,
12,
361,
274,
29889,
9155,
650,
580,
1360,
8516,
29901,
30004,
13,
12,
12,
29883,
29889,
7978,
877,
4907,
27045,
10911,
376,
16638,
1691,
29933,
29885,
29888,
29900,
29908,
313,
30004,
13,
12,
12,
12,
29908,
6558,
1367,
29908,
2672,
4330,
17070,
11167,
13,
12,
12,
12,
29908,
4247,
1367,
29908,
2672,
4330,
17070,
11167,
13,
12,
12,
12,
29908,
18877,
2481,
29908,
323,
12194,
11167,
13,
12,
12,
12,
29908,
29903,
2214,
4247,
1367,
29908,
323,
12194,
11167,
13,
12,
12,
12,
29908,
1469,
29908,
350,
28902,
30004,
13,
12,
12,
12,
29897,
4907,
1495,
30004,
13,
30004,
13,
12,
29883,
29889,
7978,
703,
6404,
1024,
3895,
21120,
29918,
6207,
5754,
1134,
2433,
2371,
29915,
5300,
1024,
2433,
16638,
1691,
29956,
29931,
2190,
29906,
29915,
1159,
30004,
13,
12,
361,
274,
29889,
9155,
650,
580,
1360,
8516,
29901,
30004,
13,
12,
12,
29883,
29889,
7978,
877,
4907,
27045,
10911,
376,
16638,
1691,
29956,
29931,
2190,
29906,
29908,
313,
30004,
13,
12,
12,
12,
29908,
6558,
1367,
29908,
2672,
4330,
17070,
11167,
13,
12,
12,
12,
29908,
4247,
1367,
29908,
2672,
4330,
17070,
11167,
13,
12,
12,
12,
29908,
18877,
2481,
29908,
323,
12194,
11167,
13,
12,
12,
12,
29908,
29903,
2214,
4247,
1367,
29908,
323,
12194,
11167,
13,
12,
12,
12,
29908,
1469,
29908,
350,
28902,
30004,
13,
12,
12,
12,
29897,
4907,
1495,
30004,
13,
12,
30004,
13,
12,
29883,
29889,
7978,
703,
6404,
1024,
3895,
21120,
29918,
6207,
5754,
1134,
2433,
2371,
29915,
5300,
1024,
2433,
6558,
25433,
359,
29915,
1159,
30004,
13,
12,
361,
274,
29889,
9155,
650,
580,
1360,
8516,
29901,
30004,
13,
12,
12,
29883,
29889,
7978,
877,
4907,
12,
259,
14602,
10911,
376,
6558,
25433,
359,
29908,
313,
30004,
13,
12,
12,
12,
29908,
6558,
1367,
29908,
2672,
4330,
17070,
11167,
13,
12,
12,
12,
29908,
4247,
1367,
29908,
2672,
4330,
17070,
11167,
13,
12,
12,
12,
29908,
4763,
2481,
29908,
323,
12194,
11167,
13,
12,
12,
12,
29908,
2481,
26023,
29908,
323,
12194,
30004,
13,
12,
12,
12,
29897,
4907,
1495,
30004,
13,
12,
12,
30004,
13,
29937,
12,
29883,
29889,
7978,
877,
4907,
27045,
2672,
19577,
376,
333,
29908,
373,
20398,
313,
3389,
1367,
18188,
29897,
4907,
1495,
30004,
13,
12,
12,
30004,
13,
12,
29937,
16913,
313,
15060,
29897,
278,
3620,
30004,
13,
12,
13082,
29889,
15060,
26471,
13,
12,
29937,
1334,
508,
884,
3802,
278,
10677,
565,
591,
526,
2309,
411,
372,
30004,
13,
12,
29883,
29889,
5358,
26471,
13,
30004,
13,
1990,
1518,
29918,
3696,
29918,
1761,
29901,
30004,
13,
12,
1753,
4770,
2344,
12035,
1311,
1125,
30004,
13,
12,
259,
1583,
29889,
3696,
29918,
1761,
353,
5159,
6756,
13,
12,
30004,
13,
12,
1753,
2254,
29918,
3166,
29918,
1445,
29898,
1311,
29892,
934,
1125,
30004,
13,
12,
12,
1311,
29889,
3696,
29918,
1761,
353,
5159,
30004,
13,
12,
12,
11512,
353,
1722,
29898,
1445,
8443,
13,
12,
12,
29875,
353,
29871,
29900,
30004,
13,
12,
12,
3696,
29918,
1761,
353,
5159,
30004,
13,
12,
12,
1454,
1196,
297,
285,
29881,
29901,
30004,
13,
12,
12,
12,
361,
474,
1275,
29871,
29900,
470,
1196,
29889,
5451,
29317,
29861,
29900,
29962,
1275,
376,
16394,
1115,
30004,
13,
12,
12,
12,
12,
29875,
353,
474,
718,
29896,
30004,
13,
12,
12,
12,
12,
19878,
396,
11014,
278,
6139,
1196,
30004,
13,
12,
12,
12,
2202,
29901,
12,
12,
12,
30004,
13,
12,
12,
12,
12,
1311,
29889,
3696,
29918,
1761,
29889,
4397,
29898,
1311,
29889,
5510,
29918,
1220,
29898,
1220,
876,
30004,
13,
12,
12,
12,
19499,
29901,
30004,
13,
12,
12,
12,
12,
2158,
376,
2392,
297,
934,
9162,
934,
30004,
13,
12,
12,
12,
12,
22692,
26471,
13,
12,
12,
12,
29937,
3696,
29918,
1761,
29889,
4397,
11702,
29879,
24163,
29879,
29908,
1273,
29898,
1220,
29892,
3177,
29918,
978,
876,
30004,
13,
12,
12,
11512,
29889,
5358,
26471,
13,
30004,
13,
12,
12,
2457,
1583,
29889,
3696,
29918,
1761,
30004,
13,
12,
12,
30004,
13,
12,
1753,
6088,
29918,
1220,
29898,
1311,
29892,
1196,
1125,
30004,
13,
12,
12,
12008,
30004,
13,
12,
12,
9760,
1196,
11624,
310,
263,
14334,
29892,
1853,
29892,
3207,
30004,
13,
12,
12,
1576,
14334,
338,
13135,
287,
964,
21502,
305,
995,
30004,
13,
12,
12,
12008,
30004,
13,
12,
12,
1761,
353,
1196,
29889,
5451,
29317,
1495,
30004,
13,
30004,
13,
12,
12,
6008,
29892,
17117,
502,
353,
1051,
29961,
29900,
1822,
16707,
17350,
1159,
30004,
13,
12,
12,
361,
903,
2804,
11393,
1115,
30004,
13,
12,
12,
12,
3383,
502,
353,
518,
1642,
613,
376,
29900,
29900,
29900,
29900,
29900,
29900,
3108,
30004,
13,
12,
12,
12,
1761,
29961,
29900,
29962,
353,
1051,
29961,
29900,
29962,
718,
11393,
29900,
29900,
29900,
29900,
29900,
29900,
19451,
13,
30004,
13,
12,
12,
6008,
29922,
12865,
29889,
12673,
29889,
710,
415,
603,
29898,
6008,
29892,
11860,
29979,
19222,
29885,
19222,
29881,
1273,
29950,
16664,
29924,
16664,
29903,
1159,
30004,
13,
12,
12,
375,
29922,
938,
29898,
375,
29889,
29878,
17010,
703,
29999,
4968,
29871,
29896,
29900,
8443,
13,
12,
12,
2267,
353,
11636,
718,
12865,
29889,
9346,
287,
2554,
29898,
29885,
2357,
23128,
29922,
375,
8443,
13,
12,
12,
2277,
13261,
2030,
1741,
4072,
29901,
30004,
13,
12,
12,
361,
1051,
29961,
29896,
13192,
543,
7230,
29918,
2344,
1115,
1051,
29961,
29896,
24927,
4928,
29918,
2344,
29918,
15091,
19451,
13,
12,
12,
361,
1051,
29961,
29896,
13192,
543,
7230,
29918,
13322,
1115,
1051,
29961,
29896,
24927,
4928,
29918,
13322,
19451,
13,
12,
12,
361,
1051,
29961,
29896,
13192,
543,
7230,
29918,
2962,
29918,
4478,
1115,
1051,
29961,
29896,
24927,
4928,
29918,
2962,
29918,
4478,
19451,
13,
12,
12,
361,
1051,
29961,
29896,
13192,
543,
7230,
29918,
9847,
29918,
4478,
1115,
1051,
29961,
29896,
24927,
4928,
29918,
9847,
29918,
4478,
19451,
13,
12,
12,
361,
1051,
29961,
29896,
13192,
543,
7230,
29918,
23679,
1115,
1051,
29961,
29896,
24927,
4928,
29918,
2962,
29918,
23679,
19451,
13,
12,
12,
361,
1051,
29961,
29896,
13192,
543,
7230,
29918,
1202,
1115,
1051,
29961,
29896,
24927,
4928,
29918,
5509,
29918,
1202,
19451,
13,
12,
12,
2457,
11117,
1372,
2396,
2267,
29892,
525,
1372,
29918,
1807,
2396,
1761,
29961,
29900,
1402,
29915,
2624,
1542,
2396,
1761,
29961,
29896,
1402,
525,
9329,
2396,
1761,
29961,
29906,
29962,
4970,
13,
12,
12,
29937,
4141,
703,
29906,
29900,
29900,
29947,
29899,
29900,
29947,
29899,
29896,
29906,
29911,
29896,
29906,
29901,
29906,
29900,
29901,
29941,
29900,
29889,
29953,
29945,
29953,
29906,
29941,
29946,
29999,
1159,
30004,
13,
12,
12,
29937,
12673,
29889,
12673,
29898,
29906,
29900,
29900,
29947,
29892,
29871,
29947,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29906,
29892,
29871,
29906,
29900,
29892,
29871,
29941,
29900,
29892,
29871,
29953,
29945,
29953,
29906,
29941,
29946,
8443,
13,
30004,
13,
30004,
13,
1753,
679,
29918,
4058,
300,
29918,
1761,
29898,
1445,
29892,
5335,
287,
2593,
29892,
1066,
1125,
30004,
13,
1678,
14550,
30004,
13,
1678,
3639,
385,
9657,
11117,
1372,
29915,
3619,
2481,
29892,
525,
4351,
4247,
742,
525,
1272,
29915,
8117,
13,
1678,
14550,
30004,
13,
1678,
5534,
1518,
30004,
13,
1678,
2923,
353,
12865,
29889,
9346,
287,
2554,
29898,
19958,
21462,
29922,
9346,
287,
2593,
8443,
13,
1678,
282,
353,
282,
5030,
29891,
29889,
3150,
29918,
2696,
1220,
29898,
1445,
8443,
13,
1678,
2309,
353,
7700,
30004,
13,
1678,
18203,
29918,
1761,
353,
5159,
30004,
13,
1678,
1550,
2309,
1360,
8824,
29901,
30004,
13,
4706,
1018,
29901,
30004,
13,
9651,
313,
29882,
7707,
29892,
1272,
29897,
353,
282,
29889,
4622,
26471,
13,
9651,
16256,
29918,
29882,
7707,
353,
6571,
30004,
13,
9651,
16256,
29918,
29882,
7707,
1839,
1372,
29918,
29879,
7464,
21962,
29918,
29882,
7707,
1839,
1372,
29918,
375,
2033,
353,
298,
7707,
29889,
657,
1372,
26471,
13,
9651,
18696,
353,
12865,
29889,
12673,
29889,
3166,
16394,
29898,
21962,
29918,
29882,
7707,
1839,
1372,
29918,
29879,
2033,
8443,
13,
9651,
18696,
353,
18696,
718,
12865,
29889,
9346,
287,
2554,
29898,
29885,
2357,
23128,
29922,
21962,
29918,
29882,
7707,
1839,
1372,
29918,
375,
2033,
8443,
13,
9651,
18696,
353,
18696,
718,
2923,
30004,
13,
9651,
6756,
13,
9651,
396,
666,
10030,
29922,
4984,
29889,
348,
4058,
877,
29933,
742,
1272,
29961,
29896,
29906,
29901,
29896,
29953,
2314,
29961,
29900,
29962,
30004,
13,
9651,
565,
926,
1275,
376,
29890,
1526,
1115,
30004,
13,
18884,
10377,
29900,
29922,
4984,
29889,
348,
4058,
877,
29933,
742,
1272,
29961,
29896,
29906,
2314,
29961,
29900,
29962,
30004,
13,
18884,
10377,
29896,
29922,
4984,
29889,
348,
4058,
877,
29933,
742,
1272,
29961,
29896,
29941,
2314,
29961,
29900,
29962,
30004,
13,
18884,
10377,
29906,
29922,
4984,
29889,
348,
4058,
877,
29933,
742,
1272,
29961,
29896,
29946,
2314,
29961,
29900,
29962,
30004,
13,
18884,
10377,
29941,
29922,
4984,
29889,
348,
4058,
877,
29933,
742,
1272,
29961,
29896,
29945,
2314,
29961,
29900,
29962,
30004,
13,
9651,
1683,
29901,
30004,
13,
18884,
10377,
29900,
29922,
4984,
29889,
348,
4058,
877,
29933,
742,
1272,
29961,
29906,
29953,
2314,
29961,
29900,
29962,
30004,
13,
18884,
10377,
29896,
29922,
4984,
29889,
348,
4058,
877,
29933,
742,
1272,
29961,
29906,
29955,
2314,
29961,
29900,
29962,
30004,
13,
18884,
10377,
29906,
29922,
4984,
29889,
348,
4058,
877,
29933,
742,
1272,
29961,
29906,
29947,
2314,
29961,
29900,
29962,
30004,
13,
18884,
10377,
29941,
29922,
4984,
29889,
348,
4058,
877,
29933,
742,
1272,
29961,
29906,
29929,
2314,
29961,
29900,
29962,
30004,
13,
9651,
6756,
13,
9651,
10377,
353,
11860,
29881,
29889,
29995,
29881,
29889,
29995,
29881,
29889,
29995,
29881,
29908,
1273,
313,
666,
29900,
29892,
666,
29896,
29892,
666,
29906,
29892,
666,
29941,
8443,
13,
9651,
396,
3177,
3553,
30004,
13,
9651,
2943,
29922,
4548,
29889,
657,
29918,
3177,
29918,
1609,
29918,
666,
29898,
666,
8443,
13,
9651,
6756,
13,
9651,
1018,
29901,
30004,
13,
18884,
18203,
29918,
1761,
29889,
4397,
3319,
29915,
18877,
2481,
2396,
1372,
29892,
525,
29903,
2214,
4247,
1367,
2396,
3177,
1839,
6370,
29918,
333,
7464,
525,
1469,
2396,
1272,
1800,
30004,
13,
9651,
5174,
20948,
29901,
30004,
13,
18884,
1596,
376,
6778,
29958,
438,
29949,
29949,
29949,
4590,
29903,
3850,
30004,
13,
18884,
1596,
376,
6778,
29958,
5538,
697,
310,
366,
7573,
505,
278,
2743,
5641,
297,
278,
6560,
934,
3026,
30004,
13,
18884,
1596,
376,
6778,
29958,
1976,
441,
292,
2023,
19451,
13,
18884,
6773,
30004,
13,
18884,
6756,
13,
9651,
396,
2158,
376,
16638,
300,
323,
29903,
29901,
613,
1372,
30004,
13,
30004,
13,
4706,
5174,
282,
5030,
29891,
29889,
29925,
5030,
2392,
29901,
30004,
13,
9651,
2309,
29922,
5574,
30004,
13,
1678,
736,
18203,
29918,
1761,
30004,
13,
30004,
13,
30004,
13,
1753,
679,
29918,
4965,
29918,
26658,
1860,
29898,
4548,
29918,
3972,
29892,
1065,
29918,
333,
29892,
4833,
29918,
3389,
29918,
333,
1919,
2943,
29892,
274,
29892,
23479,
2433,
3126,
29374,
30004,
13,
12,
361,
19200,
1275,
525,
3945,
2396,
30004,
13,
12,
12,
2962,
353,
29871,
29900,
30004,
13,
12,
12,
11512,
353,
1722,
11702,
29879,
29914,
18010,
22584,
29879,
29914,
4965,
22584,
29879,
29889,
1188,
29908,
1273,
313,
4548,
29918,
3972,
29892,
3389,
29918,
333,
29892,
2943,
1839,
6370,
29918,
333,
25901,
30004,
13,
12,
12,
29875,
353,
29871,
29900,
30004,
13,
12,
12,
1454,
1196,
297,
285,
29881,
29901,
30004,
13,
12,
12,
12,
4965,
353,
1196,
29889,
5451,
26471,
13,
12,
12,
12,
361,
7431,
29898,
4965,
29897,
1275,
29871,
29900,
322,
1369,
1275,
29871,
29896,
29901,
30004,
13,
12,
12,
12,
12,
8690,
30004,
13,
12,
12,
12,
1454,
474,
297,
3464,
29898,
2435,
29898,
4965,
22164,
30004,
13,
12,
12,
12,
12,
361,
2988,
29961,
29875,
29962,
1275,
525,
24065,
1177,
9094,
2396,
30004,
13,
12,
12,
12,
12,
12,
4965,
29961,
29875,
29962,
353,
376,
262,
4951,
537,
19451,
13,
12,
12,
12,
361,
1369,
1275,
29871,
29896,
29901,
30004,
13,
12,
12,
12,
12,
29883,
29889,
7978,
703,
19460,
11646,
6645,
29879,
313,
6558,
1367,
29892,
9071,
5690,
29892,
2448,
1141,
4089,
5690,
29892,
365,
29984,
29892,
405,
29931,
29984,
29897,
15673,
313,
14579,
14579,
14579,
14579,
7897,
613,
29871,
518,
2585,
29918,
3389,
29918,
333,
29892,
2988,
29961,
29900,
1402,
4965,
29961,
29896,
1402,
4965,
29961,
29941,
1402,
4965,
29961,
29946,
24960,
30004,
13,
12,
259,
6756,
13,
12,
12,
12,
361,
376,
7717,
29908,
297,
2988,
29901,
30004,
13,
12,
12,
12,
12,
2962,
353,
29871,
29896,
6756,
13,
12,
12,
29937,
20768,
304,
1284,
263,
1571,
982,
304,
4078,
278,
1426,
934,
30004,
13,
12,
12,
29937,
29883,
29889,
7978,
703,
19460,
11646,
438,
8547,
29934,
313,
6558,
1367,
29892,
4247,
1367,
29892,
438,
8547,
29934,
29897,
15673,
313,
14579,
14579,
7897,
613,
29961,
2585,
29918,
3389,
29918,
333,
29892,
3177,
1839,
6370,
29918,
333,
7464,
21120,
29941,
29889,
25196,
29898,
29920,
1982,
29889,
510,
2139,
29898,
11512,
29889,
949,
22130,
2314,
30004,
13,
12,
12,
11512,
29889,
5358,
26471,
13,
12,
2870,
29901,
30004,
13,
12,
12,
11512,
353,
1722,
11702,
29879,
29914,
18010,
22584,
29879,
29914,
4965,
22584,
29879,
29889,
3126,
29908,
1273,
313,
4548,
29918,
3972,
29892,
3389,
29918,
333,
29892,
2943,
1839,
6370,
29918,
333,
25901,
30004,
13,
12,
12,
3775,
29878,
353,
4390,
29889,
1359,
29898,
11512,
8443,
13,
12,
12,
1454,
1544,
297,
288,
3137,
29878,
1839,
4965,
2033,
29901,
30004,
13,
12,
12,
12,
29883,
29889,
7978,
703,
19460,
11646,
6645,
29879,
313,
6558,
1367,
29892,
9071,
5690,
29892,
2448,
1141,
4089,
5690,
29892,
365,
29984,
29892,
405,
29931,
29984,
29897,
15673,
313,
14579,
14579,
14579,
14579,
7897,
613,
29871,
518,
2585,
29918,
3389,
29918,
333,
29892,
1544,
1839,
2997,
5690,
7464,
2324,
1839,
16674,
5690,
7464,
2324,
1839,
2324,
24399,
537,
7464,
2324,
1839,
484,
1141,
4089,
6595,
24399,
537,
2033,
2314,
30004,
13,
12,
12,
12,
30004,
13,
12,
12,
29883,
29889,
7978,
703,
19460,
11646,
438,
8547,
29934,
313,
6558,
1367,
29892,
4247,
1367,
29892,
438,
8547,
29934,
29897,
15673,
313,
14579,
14579,
7897,
613,
29961,
2585,
29918,
3389,
29918,
333,
29892,
3177,
1839,
6370,
29918,
333,
7464,
21120,
29941,
29889,
25196,
29898,
29920,
1982,
29889,
510,
2139,
29898,
3126,
29889,
29881,
17204,
29898,
3775,
29878,
4961,
2314,
30004,
13,
12,
12,
11512,
29889,
5358,
26471,
13,
12,
30004,
13,
12,
12,
30004,
13,
1753,
679,
29918,
17833,
29918,
3389,
29918,
26658,
1860,
29898,
4548,
29918,
3972,
29892,
1065,
29918,
333,
29892,
2943,
1125,
30004,
13,
12,
12008,
30004,
13,
12,
30004,
13,
12,
12008,
30004,
13,
12,
11512,
353,
1722,
11702,
29879,
29914,
18010,
22584,
29879,
29914,
27894,
22584,
29879,
29889,
1188,
29908,
1273,
313,
4548,
29918,
3972,
29892,
3389,
29918,
333,
29892,
2943,
1839,
6370,
29918,
333,
25901,
30004,
13,
12,
29875,
353,
29871,
29900,
30004,
13,
12,
1454,
1196,
297,
285,
29881,
29901,
12,
12,
30004,
13,
12,
12,
27894,
353,
1196,
30004,
13,
12,
11512,
29889,
5358,
26471,
13,
12,
2457,
12049,
30004,
13,
30004,
13,
1753,
679,
29918,
1188,
29918,
1445,
29898,
4548,
29918,
3972,
29892,
2943,
1125,
30004,
13,
12,
11512,
353,
1722,
11702,
29879,
29914,
18010,
29914,
29934,
9026,
29899,
6004,
29918,
29995,
29879,
29889,
1188,
29908,
1273,
313,
4548,
29918,
3972,
29892,
2943,
1839,
6370,
29918,
333,
25901,
30004,
13,
12,
29875,
353,
29871,
29900,
30004,
13,
12,
1188,
353,
285,
29881,
29889,
949,
26471,
13,
12,
1188,
353,
503,
1982,
29889,
510,
2139,
29898,
1188,
8443,
13,
12,
11512,
29889,
5358,
26471,
13,
12,
2457,
1480,
30004,
13,
30004,
13,
1753,
1065,
29918,
3972,
29918,
326,
18505,
29898,
4548,
29918,
3972,
29892,
1065,
29918,
25378,
29892,
4833,
29918,
3389,
29918,
333,
29892,
2943,
29892,
274,
29892,
3775,
29878,
29918,
23479,
1125,
30004,
13,
12,
12008,
30004,
13,
12,
30004,
13,
12,
12008,
30004,
13,
12,
29937,
657,
4959,
30004,
13,
12,
3696,
29918,
1761,
353,
1518,
29918,
3696,
29918,
1761,
26471,
13,
12,
3696,
29918,
1761,
29889,
1359,
29918,
3166,
29918,
1445,
11702,
29879,
29914,
18010,
22584,
29879,
29914,
3696,
29918,
1188,
29918,
29995,
29879,
29889,
1188,
29908,
1273,
313,
4548,
29918,
3972,
29892,
1065,
29918,
25378,
29892,
2943,
1839,
6370,
29918,
333,
25901,
30004,
13,
12,
30004,
13,
12,
2230,
29918,
12765,
353,
29871,
29900,
30004,
13,
12,
29937,
657,
931,
2923,
5235,
30004,
13,
12,
361,
2943,
1839,
16595,
29918,
333,
2033,
29991,
543,
1115,
29871,
6756,
13,
12,
12,
11512,
353,
1722,
11702,
29879,
29914,
6207,
22584,
29879,
29914,
15702,
29918,
29873,
29918,
29995,
29879,
29908,
1273,
313,
4548,
29918,
3972,
29892,
3389,
29918,
25378,
29892,
2943,
1839,
6370,
29918,
333,
25901,
30004,
13,
12,
12,
29875,
353,
29871,
29900,
30004,
13,
12,
12,
10289,
29918,
29896,
353,
29871,
29900,
30004,
13,
12,
12,
1454,
1196,
297,
285,
29881,
29901,
12,
12,
30004,
13,
12,
12,
12,
361,
474,
1275,
29871,
29941,
29901,
30004,
13,
12,
12,
12,
12,
29937,
9155,
937,
9210,
30004,
13,
12,
12,
12,
12,
2202,
29901,
30004,
13,
12,
12,
12,
12,
12,
10289,
29918,
29896,
353,
938,
29898,
1220,
8443,
13,
12,
12,
12,
12,
19499,
7865,
2392,
29901,
30004,
13,
12,
12,
12,
12,
12,
4230,
29918,
3389,
29918,
25378,
353,
1065,
29918,
25378,
29889,
5451,
877,
29918,
1495,
30004,
13,
12,
12,
12,
12,
12,
4230,
29918,
3389,
29918,
25378,
14352,
29896,
29962,
353,
851,
29898,
524,
29898,
4230,
29918,
3389,
29918,
25378,
14352,
29896,
2314,
29899,
29896,
8443,
13,
12,
12,
12,
12,
12,
4230,
29918,
3389,
29918,
25378,
353,
22868,
4286,
7122,
29898,
4230,
29918,
3389,
29918,
25378,
8443,
13,
12,
12,
12,
12,
12,
11512,
29918,
4230,
353,
1722,
11702,
29879,
29914,
6207,
22584,
29879,
29914,
15702,
29918,
29873,
29918,
29995,
29879,
29908,
1273,
313,
4548,
29918,
3972,
29892,
4230,
29918,
3389,
29918,
25378,
29892,
2943,
1839,
6370,
29918,
333,
25901,
30004,
13,
12,
12,
12,
12,
12,
29875,
29918,
4230,
353,
29871,
29900,
30004,
13,
12,
12,
12,
12,
12,
1454,
1196,
29918,
4230,
297,
285,
29881,
29918,
4230,
29901,
12,
12,
30004,
13,
12,
12,
12,
12,
12,
12,
361,
474,
29918,
4230,
1275,
29871,
29941,
29901,
30004,
13,
12,
12,
12,
12,
12,
12,
12,
29937,
9155,
937,
9210,
30004,
13,
12,
12,
12,
12,
12,
12,
12,
10289,
29918,
29896,
353,
938,
29898,
1220,
29918,
4230,
8443,
13,
12,
12,
12,
12,
12,
12,
361,
474,
29918,
4230,
1275,
29871,
29945,
29901,
30004,
13,
12,
12,
12,
12,
12,
12,
12,
10289,
29918,
29906,
353,
938,
29898,
1220,
29918,
4230,
8443,
13,
12,
12,
12,
12,
12,
12,
12,
8690,
30004,
13,
12,
12,
12,
12,
12,
12,
29875,
29918,
4230,
353,
474,
29918,
4230,
718,
29896,
6756,
13,
12,
12,
12,
12,
12,
11512,
29918,
4230,
29889,
5358,
26471,
13,
12,
12,
12,
12,
12,
8690,
30004,
13,
12,
12,
12,
361,
474,
1275,
29871,
29945,
29901,
30004,
13,
12,
12,
12,
12,
10289,
29918,
29906,
353,
938,
29898,
1220,
8443,
13,
12,
12,
12,
12,
8690,
30004,
13,
12,
12,
12,
29875,
353,
474,
718,
29896,
6756,
13,
12,
12,
11512,
29889,
5358,
26471,
13,
12,
12,
29937,
10481,
1423,
13944,
30004,
13,
12,
12,
2230,
29918,
12765,
353,
9210,
29918,
29896,
396,
29974,
6425,
29898,
10289,
29918,
29906,
876,
29914,
29906,
30004,
13,
12,
30004,
13,
12,
29937,
2158,
376,
2481,
29918,
12765,
543,
29892,
2230,
29918,
12765,
30004,
13,
12,
2202,
29901,
30004,
13,
12,
12,
29883,
29889,
7978,
703,
19460,
11646,
7525,
25433,
359,
313,
6558,
1367,
29892,
9071,
1367,
29892,
7370,
2481,
29892,
5974,
26023,
29897,
15673,
10780,
29892,
14579,
14579,
7897,
613,
29961,
2585,
29918,
3389,
29918,
333,
29892,
3177,
1839,
6370,
29918,
333,
7464,
3696,
29918,
1761,
29889,
3696,
29918,
1761,
29961,
29900,
22322,
1372,
29918,
1807,
7464,
2230,
29918,
12765,
2314,
30004,
13,
12,
19499,
11374,
2392,
29901,
30004,
13,
12,
12,
9675,
29889,
25393,
29889,
23126,
26471,
13,
12,
12,
9675,
29889,
25393,
29889,
3539,
14182,
29876,
1159,
30004,
13,
12,
12,
2158,
376,
6778,
29958,
438,
29949,
29949,
29949,
4590,
29903,
3850,
30004,
13,
12,
12,
2158,
376,
6778,
29958,
1334,
505,
385,
2380,
1059,
1213,
30004,
13,
12,
12,
2158,
376,
2585,
29918,
3389,
29918,
333,
29901,
1273,
29881,
29908,
1273,
4833,
29918,
3389,
29918,
333,
30004,
13,
12,
12,
2158,
376,
3177,
29901,
1273,
29879,
29908,
1273,
2943,
30004,
13,
12,
12,
2158,
376,
3177,
1839,
6370,
29918,
333,
2033,
29901,
1273,
29879,
29908,
1273,
2943,
1839,
6370,
29918,
333,
2033,
30004,
13,
12,
12,
2158,
376,
3696,
29918,
1761,
29901,
1273,
29879,
29908,
1273,
1741,
29918,
1761,
30004,
13,
12,
12,
2158,
376,
3696,
29918,
1761,
29889,
3696,
29918,
1761,
29901,
1273,
29879,
29908,
1273,
1741,
29918,
1761,
29889,
3696,
29918,
1761,
30004,
13,
12,
12,
2158,
376,
3696,
29918,
1761,
29889,
3696,
29918,
1761,
29961,
29900,
5387,
1273,
29879,
29908,
1273,
1741,
29918,
1761,
29889,
3696,
29918,
1761,
29961,
29900,
29962,
30004,
13,
12,
12,
2158,
376,
3696,
29918,
1761,
29889,
3696,
29918,
1761,
29961,
29900,
22322,
1372,
29918,
1807,
2033,
29901,
1273,
29879,
29908,
1273,
1741,
29918,
1761,
29889,
3696,
29918,
1761,
29961,
29900,
22322,
1372,
29918,
1807,
2033,
30004,
13,
12,
12,
2158,
376,
2230,
29918,
12765,
29901,
1273,
29881,
29908,
1273,
931,
29918,
12765,
30004,
13,
12,
12,
22692,
26471,
13,
12,
30004,
13,
12,
1454,
1741,
297,
1741,
29918,
1761,
29889,
3696,
29918,
1761,
29901,
30004,
13,
12,
12,
12765,
353,
12865,
29889,
9346,
287,
2554,
29898,
19958,
21462,
29922,
2230,
29918,
12765,
8443,
13,
12,
12,
9435,
2481,
353,
1741,
1839,
1372,
2033,
718,
2923,
30004,
13,
12,
12,
29883,
29889,
7978,
703,
19460,
11646,
28488,
313,
6558,
1367,
29892,
9071,
1367,
29892,
13103,
2481,
29892,
6864,
1542,
29892,
24953,
29897,
15673,
313,
14579,
14579,
14579,
14579,
7897,
613,
518,
2585,
29918,
3389,
29918,
333,
29892,
3177,
1839,
6370,
29918,
333,
7464,
9435,
2481,
29892,
1741,
1839,
2624,
1542,
7464,
3696,
1839,
9329,
2033,
2314,
30004,
13,
12,
30004,
13,
12,
29937,
6088,
23912,
30004,
13,
12,
361,
2943,
1839,
16595,
29918,
333,
2033,
29991,
543,
1115,
6756,
13,
12,
12,
5030,
353,
11860,
29879,
29914,
18010,
22584,
29879,
29914,
17885,
545,
22584,
29879,
29918,
5838,
29888,
29900,
29889,
29886,
5030,
29908,
1273,
29898,
4548,
29918,
3972,
29892,
1065,
29918,
25378,
29892,
3177,
1839,
6370,
29918,
333,
2033,
8443,
13,
12,
12,
4058,
300,
29918,
1761,
353,
679,
29918,
4058,
300,
29918,
1761,
29898,
5030,
29892,
931,
29918,
12765,
1699,
29890,
1526,
1159,
30004,
13,
12,
12,
29937,
2158,
7431,
29898,
4058,
300,
29918,
1761,
8443,
13,
12,
12,
29937,
2158,
18203,
29918,
1761,
30004,
13,
12,
12,
1454,
18203,
297,
18203,
29918,
1761,
29901,
30004,
13,
12,
12,
12,
29883,
29889,
7978,
703,
19460,
11646,
18744,
1691,
29933,
29885,
29888,
29900,
313,
6558,
1367,
29892,
4247,
1367,
29892,
18877,
2481,
29892,
317,
2214,
4247,
1204,
29892,
3630,
29897,
15673,
313,
14579,
14579,
14579,
14579,
7897,
613,
518,
2585,
29918,
3389,
29918,
333,
29892,
3177,
1839,
6370,
29918,
333,
7464,
4058,
300,
1839,
18877,
2481,
7464,
4058,
300,
1839,
29903,
2214,
4247,
1367,
7464,
22793,
29941,
29889,
25196,
29898,
4058,
300,
1839,
1469,
11287,
2314,
12,
6756,
13,
30004,
13,
12,
361,
2943,
1839,
16595,
29918,
333,
2033,
29991,
543,
1115,
6756,
13,
12,
12,
5030,
353,
11860,
29879,
29914,
18010,
22584,
29879,
29914,
17885,
545,
22584,
29879,
29918,
29893,
6468,
29906,
29889,
29886,
5030,
29908,
1273,
29898,
4548,
29918,
3972,
29892,
1065,
29918,
25378,
29892,
3177,
1839,
6370,
29918,
333,
2033,
8443,
13,
12,
12,
4058,
300,
29918,
1761,
353,
679,
29918,
4058,
300,
29918,
1761,
29898,
5030,
29892,
931,
29918,
12765,
1699,
29893,
6468,
29906,
1159,
30004,
13,
12,
12,
29937,
2158,
7431,
29898,
4058,
300,
29918,
1761,
8443,
13,
12,
12,
29937,
2158,
18203,
29918,
1761,
30004,
13,
12,
12,
1454,
18203,
297,
18203,
29918,
1761,
29901,
30004,
13,
12,
12,
12,
29883,
29889,
7978,
703,
19460,
11646,
18744,
1691,
29956,
29931,
2190,
29906,
313,
6558,
1367,
29892,
4247,
1367,
29892,
18877,
2481,
29892,
317,
2214,
4247,
1204,
29892,
3630,
29897,
15673,
313,
14579,
14579,
14579,
14579,
7897,
613,
518,
2585,
29918,
3389,
29918,
333,
29892,
3177,
1839,
6370,
29918,
333,
7464,
4058,
300,
1839,
18877,
2481,
7464,
4058,
300,
1839,
29903,
2214,
4247,
1367,
7464,
22793,
29941,
29889,
25196,
29898,
4058,
300,
1839,
1469,
11287,
2314,
12,
30004,
13,
259,
6756,
13,
12,
29937,
7338,
336,
6558,
20398,
30004,
13,
12,
27894,
353,
679,
29918,
17833,
29918,
3389,
29918,
26658,
1860,
29898,
4548,
29918,
3972,
29892,
3389,
29918,
25378,
29892,
2943,
8443,
13,
12,
29883,
29889,
7978,
703,
19460,
11646,
7338,
336,
6558,
6816,
3745,
1860,
313,
6558,
1367,
29892,
9071,
1367,
29892,
4408,
29892,
10576,
29897,
15673,
313,
14579,
14579,
14579,
7897,
613,
518,
2585,
29918,
3389,
29918,
333,
29892,
2943,
1839,
6370,
29918,
333,
7464,
29908,
27894,
613,
27894,
2314,
30004,
13,
30004,
13,
1678,
396,
7488,
3002,
29914,
4965,
20398,
2183,
491,
438,
8547,
29934,
30004,
13,
12,
657,
29918,
4965,
29918,
26658,
1860,
29898,
4548,
29918,
3972,
29892,
1065,
29918,
25378,
29892,
4833,
29918,
3389,
29918,
333,
1919,
2943,
29892,
274,
29892,
19200,
29922,
3775,
29878,
29918,
23479,
8443,
13,
30004,
13,
1753,
679,
29918,
3332,
29877,
29898,
4548,
29918,
3972,
29892,
2943,
29892,
2943,
29906,
1125,
30004,
13,
12,
11512,
353,
1722,
11702,
29879,
29914,
18010,
29914,
3332,
3002,
29914,
29873,
945,
261,
2663,
29918,
29995,
29879,
29918,
29995,
29879,
29908,
1273,
313,
4548,
29918,
3972,
29892,
2943,
1839,
6370,
29918,
333,
7464,
3177,
29906,
1839,
6370,
29918,
333,
25901,
30004,
13,
12,
29875,
353,
29871,
29900,
30004,
13,
12,
29879,
353,
285,
29881,
29889,
949,
26471,
13,
12,
29937,
29879,
353,
503,
1982,
29889,
510,
2139,
29898,
29879,
8443,
13,
12,
11512,
29889,
5358,
26471,
13,
12,
2457,
269,
30004,
13,
12,
30004,
13,
1753,
7639,
29918,
3972,
29918,
326,
18505,
29898,
4548,
29918,
3972,
29892,
3775,
29878,
29918,
23479,
1125,
30004,
13,
12,
10945,
11799,
29918,
1445,
30004,
13,
12,
10945,
1518,
30004,
13,
12,
10945,
11009,
30004,
13,
12,
30004,
13,
12,
29883,
353,
11009,
29889,
18127,
26471,
13,
12,
29937,
7888,
975,
1065,
5665,
30004,
13,
12,
1454,
1065,
29918,
4537,
297,
3464,
29898,
4548,
29889,
657,
29918,
3389,
29918,
2798,
580,
1125,
30004,
13,
12,
12,
4136,
2277,
11368,
4897,
11060,
29963,
6670,
29903,
8079,
15149,
13515,
1783,
24125,
15842,
3446,
3235,
27694,
835,
4136,
29937,
30004,
13,
12,
12,
4548,
29889,
842,
29918,
3389,
29918,
4537,
29898,
3389,
29918,
4537,
8443,
13,
12,
12,
3389,
29918,
16553,
353,
1518,
29889,
657,
29918,
3389,
29918,
25378,
26471,
13,
12,
12,
9675,
29889,
25393,
29889,
3539,
14182,
29878,
17518,
292,
1065,
3553,
1273,
29881,
29908,
1273,
1065,
29918,
4537,
8443,
13,
12,
12,
9675,
29889,
25393,
29889,
23126,
26471,
13,
12,
12,
29883,
29889,
7978,
703,
19460,
11646,
1065,
29918,
4841,
313,
3389,
29918,
25378,
29897,
15673,
313,
7897,
613,
518,
3389,
29918,
16553,
2314,
30004,
13,
12,
12,
3389,
29918,
333,
353,
274,
29889,
4230,
798,
333,
30004,
13,
12,
12,
29937,
1053,
20398,
515,
7573,
322,
5835,
30004,
13,
12,
12,
29937,
1741,
8857,
29892,
23912,
29892,
304,
1129,
29892,
5335,
287,
2593,
30004,
13,
12,
12,
497,
29918,
18010,
353,
1518,
29889,
657,
29918,
497,
29918,
6550,
29918,
18010,
26471,
13,
12,
12,
1454,
2943,
297,
599,
29918,
18010,
29901,
30004,
13,
12,
12,
12,
29937,
361,
2943,
1839,
6370,
29918,
333,
2033,
26359,
29873,
29929,
29899,
29900,
29900,
29955,
1115,
30004,
13,
12,
12,
12,
3389,
29918,
3972,
29918,
326,
18505,
29898,
4548,
29918,
3972,
29892,
1065,
29918,
16553,
29892,
1065,
29918,
333,
29892,
2943,
29892,
274,
29892,
3775,
29878,
29918,
23479,
8443,
13,
30004,
13,
12,
9675,
29889,
25393,
29889,
3539,
14182,
29878,
29995,
29881,
6057,
19673,
462,
29871,
376,
1273,
313,
3389,
29918,
4537,
718,
29871,
29896,
876,
30004,
13,
12,
9675,
29889,
25393,
29889,
23126,
26471,
13,
12,
9675,
29889,
25393,
29889,
3539,
14182,
29876,
1159,
30004,
13,
12,
13082,
29889,
15060,
580,
12,
12,
30004,
13,
12,
396,
679,
1480,
2066,
30004,
13,
12,
29876,
13183,
398,
353,
29871,
29900,
30004,
13,
12,
1454,
2943,
297,
599,
29918,
18010,
29901,
30004,
13,
12,
12,
29876,
13183,
398,
353,
302,
13183,
398,
718,
29871,
29896,
30004,
13,
12,
12,
29883,
29889,
7978,
703,
19460,
11646,
405,
2631,
5690,
313,
4247,
1367,
29892,
5641,
29918,
7061,
29897,
15673,
313,
14579,
7897,
613,
29961,
3177,
1839,
6370,
29918,
333,
7464,
2943,
1839,
6370,
29918,
666,
2033,
2314,
30004,
13,
12,
12,
2202,
29901,
30004,
13,
12,
12,
12,
9675,
29889,
25393,
29889,
3539,
14182,
29878,
797,
643,
1259,
1480,
363,
2943,
1273,
29881,
29908,
1273,
302,
13183,
398,
8443,
13,
12,
12,
12,
9675,
29889,
25393,
29889,
23126,
26471,
13,
12,
12,
12,
1188,
353,
679,
29918,
1188,
29918,
1445,
29898,
4548,
29918,
3972,
29892,
2943,
8443,
13,
12,
12,
12,
29883,
29889,
7978,
703,
19460,
11646,
4522,
29879,
313,
4247,
1367,
29892,
4522,
29897,
15673,
313,
14579,
7897,
613,
29961,
3177,
1839,
6370,
29918,
333,
7464,
21120,
29941,
29889,
25196,
29898,
1188,
29897,
2314,
30004,
13,
12,
12,
19499,
29901,
30004,
13,
12,
12,
12,
9675,
29889,
25393,
29889,
3539,
703,
2023,
694,
1480,
1445,
1159,
30004,
13,
12,
9675,
29889,
25393,
29889,
3539,
14182,
29878,
3403,
29879,
363,
1273,
29881,
7573,
15478,
462,
29871,
376,
1273,
302,
13183,
398,
8443,
13,
12,
9675,
29889,
25393,
29889,
23126,
26471,
13,
12,
9675,
29889,
25393,
29889,
3539,
14182,
29876,
1159,
30004,
13,
12,
30004,
13,
12,
29937,
679,
1824,
2066,
30004,
13,
12,
13082,
29889,
15060,
26471,
13,
12,
29937,
679,
7639,
20398,
30004,
13,
12,
1454,
2943,
297,
599,
29918,
18010,
29901,
30004,
13,
12,
12,
1454,
2943,
29906,
297,
599,
29918,
18010,
29901,
30004,
13,
12,
12,
12,
361,
2943,
19216,
2943,
29906,
29901,
30004,
13,
12,
12,
12,
12,
361,
2943,
1839,
16595,
29918,
333,
2033,
29991,
13776,
322,
2943,
29906,
1839,
16595,
29918,
333,
2033,
29991,
543,
1115,
30004,
13,
12,
12,
12,
12,
12,
3332,
29877,
353,
679,
29918,
3332,
29877,
29898,
4548,
29918,
3972,
29892,
2943,
29892,
2943,
29906,
29897,
6756,
13,
12,
12,
12,
12,
12,
29883,
29889,
7978,
703,
19460,
11646,
1222,
15362,
6816,
3745,
1860,
313,
4247,
1367,
29892,
4408,
29892,
10576,
29897,
15673,
22308,
5501,
29882,
459,
2798,
742,
7897,
613,
29961,
3177,
1839,
6370,
29918,
333,
7464,
3332,
29877,
2314,
30004,
13,
12,
30004,
13,
12,
29937,
679,
7639,
6139,
30004,
13,
12,
30004,
13,
12,
13082,
29889,
15060,
26471,
13,
12,
30004,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
30004,
13,
12,
10945,
1518,
30004,
13,
12,
10945,
11009,
30004,
13,
12,
30004,
13,
12,
30004,
13,
12,
30004,
13,
12,
16680,
353,
3523,
5510,
29889,
8375,
11726,
29898,
30004,
13,
12,
12,
8216,
2433,
17518,
6692,
8565,
22205,
28224,
7862,
29889,
23592,
13,
12,
12,
29097,
29922,
359,
29889,
2084,
29889,
6500,
3871,
29898,
9675,
29889,
19218,
29961,
29900,
11724,
30004,
13,
12,
12,
3259,
2433,
29995,
29879,
29871,
29900,
29889,
29900,
29889,
29896,
29915,
1273,
2897,
29889,
2084,
29889,
6500,
3871,
29898,
9675,
29889,
19218,
29961,
29900,
11724,
30004,
13,
12,
8443,
13,
12,
16680,
29889,
1202,
29918,
3385,
877,
29899,
29872,
742,
1539,
485,
279,
2433,
735,
15362,
29918,
3972,
742,
2731,
2433,
735,
15362,
29918,
3972,
742,
1371,
2433,
1170,
310,
278,
7639,
1495,
30004,
13,
12,
16680,
29889,
1202,
29918,
3385,
877,
29899,
29916,
742,
1539,
485,
279,
2433,
4548,
29918,
1445,
742,
2731,
2433,
4548,
29918,
1445,
742,
1371,
2433,
1552,
9846,
7639,
6139,
1495,
30004,
13,
12,
16680,
29889,
1202,
29918,
3385,
877,
29899,
29877,
742,
1539,
485,
279,
2433,
7638,
29918,
1445,
742,
2731,
2433,
7638,
29918,
1445,
742,
1371,
2433,
1552,
934,
304,
607,
278,
2582,
526,
3971,
1495,
30004,
13,
12,
16680,
29889,
1202,
29918,
3385,
877,
29899,
29881,
742,
1539,
485,
279,
2433,
9803,
742,
2731,
2433,
9803,
742,
1371,
2433,
1552,
934,
393,
881,
1712,
278,
2566,
1495,
30004,
13,
12,
16680,
29889,
1202,
29918,
3385,
877,
489,
3775,
29878,
742,
1539,
485,
279,
2433,
3775,
29878,
29918,
23479,
742,
2731,
2433,
3775,
29878,
29918,
23479,
742,
1371,
2433,
1552,
3402,
297,
607,
278,
288,
3137,
29878,
848,
471,
5759,
1495,
30004,
13,
12,
6768,
29892,
6273,
353,
13812,
29889,
5510,
29918,
5085,
26471,
13,
12,
30004,
13,
12,
361,
3987,
29889,
735,
15362,
29918,
3972,
1360,
8516,
29901,
30004,
13,
12,
12,
2158,
376,
8139,
287,
7639,
4516,
19451,
13,
12,
12,
13322,
26471,
13,
12,
361,
3987,
29889,
7638,
29918,
1445,
19216,
8516,
29901,
30004,
13,
12,
12,
7638,
29918,
1445,
353,
3987,
29889,
7638,
29918,
1445,
30004,
13,
12,
30004,
13,
12,
361,
3987,
29889,
9803,
1360,
8516,
29901,
30004,
13,
12,
12,
13082,
353,
21120,
29941,
29889,
6915,
11219,
7050,
29914,
4773,
29946,
1495,
30004,
13,
12,
2870,
29901,
30004,
13,
12,
12,
13082,
353,
21120,
29941,
29889,
6915,
29898,
6768,
29889,
9803,
8443,
13,
12,
12,
30004,
13,
12,
361,
3987,
29889,
3775,
29878,
29918,
23479,
19216,
8516,
29901,
30004,
13,
12,
12,
3775,
29878,
29918,
23479,
353,
3987,
29889,
3775,
29878,
29918,
23479,
30004,
13,
12,
2870,
29901,
30004,
13,
12,
12,
3775,
29878,
29918,
23479,
353,
525,
3126,
29915,
30004,
13,
12,
12,
30004,
13,
12,
4548,
353,
7639,
29918,
8216,
29898,
6768,
29889,
4548,
29918,
1445,
8443,
13,
12,
29937,
4548,
29889,
7727,
26471,
13,
12,
2344,
29918,
2585,
26471,
13,
12,
735,
15362,
29918,
3972,
29918,
326,
18505,
29898,
6768,
29889,
735,
15362,
29918,
3972,
29892,
3775,
29878,
29918,
23479,
8443,
13,
12,
29883,
353,
11009,
29889,
18127,
26471,
13,
12,
11512,
353,
1722,
29898,
6768,
29889,
4548,
29918,
1445,
8443,
13,
12,
3134,
353,
285,
29881,
29889,
949,
26471,
13,
12,
11512,
29889,
5358,
26471,
13,
12,
29883,
29889,
7978,
703,
19460,
11646,
1222,
15362,
3401,
313,
9544,
9165,
29892,
17896,
6594,
29892,
1170,
29892,
20001,
29897,
15673,
22308,
5501,
29900,
29889,
29946,
742,
14579,
7897,
613,
29961,
3134,
29892,
1518,
29889,
735,
15362,
29918,
978,
1699,
20068,
30004,
13,
12,
13082,
29889,
15060,
26471,
13,
12,
2158,
376,
9832,
1218,
18111,
19451,
13,
12,
29883,
29889,
7978,
877,
4907,
27045,
2672,
19577,
376,
13604,
29918,
2248,
29908,
373,
4959,
313,
6558,
1367,
18188,
29892,
9071,
1367,
18188,
29897,
4907,
1495,
30004,
13,
12,
29883,
29889,
7978,
877,
4907,
27045,
2672,
19577,
376,
4058,
300,
29918,
2248,
29908,
373,
23912,
313,
6558,
1367,
18188,
29892,
9071,
1367,
18188,
29892,
317,
2214,
4247,
1367,
18188,
29897,
4907,
1495,
30004,
13,
12,
29883,
29889,
7978,
877,
4907,
27045,
2672,
19577,
376,
3389,
3888,
29918,
2248,
29908,
373,
1065,
7192,
359,
313,
6558,
1367,
18188,
29892,
9071,
1367,
18188,
29897,
4907,
1495,
30004,
13,
12,
13082,
29889,
15060,
26471,
13,
2
] |
cleanupRawFiles.py | porterad/photo-utils | 0 | 1606053 | #!/usr/bin/python3
import re
import os
import argparse
TRASH_DIR = 'Trash'
parser = argparse.ArgumentParser()
parser.add_argument("dir", help="directory to cleanup")
parser.add_argument("-e", "--extension", default="NEF", help="File extension to clean up. Files of this type without"
" a match of reference type are moved.")
parser.add_argument("-r", "--reference", default="JPG", help="reference file extension")
args = parser.parse_args()
# Using the case insensitive flag to match, for example, both .NEF and .nef
regex = re.compile(r"(.*)\." + args.extension + "$", re.I)
files = os.listdir(args.dir)
files_to_move = []
for filename in files:
match = regex.fullmatch(filename)
if match:
if str(match.groups()[0]) + '.' + args.reference not in files:
files_to_move.append(match.string)
files_to_move.sort()
if len(files_to_move) > 0:
trash_path = os.path.join(args.dir, TRASH_DIR)
if not os.path.exists(trash_path):
try:
os.mkdir(trash_path)
except FileExistsError as e:
print(e)
exit()
if os.path.isdir(trash_path):
for file_to_move in files_to_move:
print("moving " + file_to_move)
os.rename(os.path.join(args.dir, file_to_move), os.path.join(trash_path, file_to_move))
| [
1,
18787,
4855,
29914,
2109,
29914,
4691,
29941,
13,
13,
5215,
337,
13,
5215,
2897,
13,
5215,
1852,
5510,
13,
13,
5659,
24943,
29918,
9464,
353,
525,
2308,
1161,
29915,
13,
13,
16680,
353,
1852,
5510,
29889,
15730,
11726,
580,
13,
16680,
29889,
1202,
29918,
23516,
703,
3972,
613,
1371,
543,
12322,
304,
5941,
786,
1159,
13,
16680,
29889,
1202,
29918,
23516,
703,
29899,
29872,
613,
376,
489,
17588,
613,
2322,
543,
8186,
29943,
613,
1371,
543,
2283,
6081,
304,
5941,
701,
29889,
12745,
310,
445,
1134,
1728,
29908,
13,
462,
462,
1669,
376,
263,
1993,
310,
3407,
1134,
526,
6153,
23157,
13,
16680,
29889,
1202,
29918,
23516,
703,
29899,
29878,
613,
376,
489,
5679,
613,
2322,
543,
29967,
16903,
613,
1371,
543,
5679,
934,
6081,
1159,
13,
5085,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
13,
29937,
5293,
278,
1206,
1663,
575,
3321,
7353,
304,
1993,
29892,
363,
1342,
29892,
1716,
869,
8186,
29943,
322,
869,
484,
29888,
13,
13087,
353,
337,
29889,
12198,
29898,
29878,
29908,
28104,
2144,
1213,
718,
6389,
29889,
17588,
718,
3908,
613,
337,
29889,
29902,
29897,
13,
13,
5325,
353,
2897,
29889,
1761,
3972,
29898,
5085,
29889,
3972,
29897,
13,
13,
5325,
29918,
517,
29918,
11631,
353,
5159,
13,
13,
1454,
10422,
297,
2066,
29901,
13,
1678,
1993,
353,
6528,
29889,
8159,
4352,
29898,
9507,
29897,
13,
1678,
565,
1993,
29901,
13,
4706,
565,
851,
29898,
4352,
29889,
13155,
580,
29961,
29900,
2314,
718,
525,
6169,
718,
6389,
29889,
5679,
451,
297,
2066,
29901,
13,
9651,
2066,
29918,
517,
29918,
11631,
29889,
4397,
29898,
4352,
29889,
1807,
29897,
13,
13,
5325,
29918,
517,
29918,
11631,
29889,
6605,
580,
13,
13,
361,
7431,
29898,
5325,
29918,
517,
29918,
11631,
29897,
1405,
29871,
29900,
29901,
13,
1678,
534,
1161,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
3972,
29892,
10014,
24943,
29918,
9464,
29897,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
509,
1161,
29918,
2084,
1125,
13,
4706,
1018,
29901,
13,
9651,
2897,
29889,
11256,
3972,
29898,
509,
1161,
29918,
2084,
29897,
13,
4706,
5174,
3497,
24217,
2392,
408,
321,
29901,
13,
9651,
1596,
29898,
29872,
29897,
13,
9651,
6876,
580,
13,
1678,
565,
2897,
29889,
2084,
29889,
275,
3972,
29898,
509,
1161,
29918,
2084,
1125,
13,
4706,
363,
934,
29918,
517,
29918,
11631,
297,
2066,
29918,
517,
29918,
11631,
29901,
13,
9651,
1596,
703,
13529,
292,
376,
718,
934,
29918,
517,
29918,
11631,
29897,
13,
9651,
2897,
29889,
1267,
420,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
3972,
29892,
934,
29918,
517,
29918,
11631,
511,
2897,
29889,
2084,
29889,
7122,
29898,
509,
1161,
29918,
2084,
29892,
934,
29918,
517,
29918,
11631,
876,
13,
2
] |
create_dataset.py | phihes/dnp-create-paneldata | 0 | 168579 | import pandas as pd
import numpy as np
import time
import sys
import json
from jsmin import jsmin
from collections import Counter
import os.path
from xlrd.biffh import XLRDError
from aenum import IntEnum
import time
# set up logging (to console)
import logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter('[%(levelname)s] %(message)s')
handler = logging.StreamHandler(stream=sys.stdout)
handler.setFormatter(formatter)
handler.setLevel(logging.DEBUG)
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)
PATH_TO_SETTINGS = 'settings/settings.json'
DEFAULT_SETTINGS = dict(
# path to panel structure excel file
path_panel='settings/panel.xlsx',
# name of sheets in panel structure excel file
sheet_persons='persons',
sheet_panel_entities='panel_entities',
sheet_companies='companies',
sheet_groups='groups',
sheet_questions='data dictionary',
sheet_scales='scales',
# path to survey data - {} will be replaced with year (YYYY)
path_results='survey-results/results_{}.xlsx',
# path to resulting output file
path_output='output/dnp_panel-data_{}-{}',
# years to include
years=[2013, 2014, 2015, 2016, 2017, 2018, 2019],
# exclude deprecated variables
exclude_deprecated=True,
# exclude variables with personal information
exclude_personal=True,
# exclude variables with auxiliary information
exclude_auxiliary=True,
# exclude variables from special sections
exclude_special_sections=True,
# exclude din meta data
exclude_din_meta_data=True,
# exclude variables with less x years in which they were part of the questionnaire
exclude_years_min=0,
# allow missing observations: include panel entities which did not complete all specified years
allow_missing=True,
# save the results to an excel file
save_output=True
)
def load_excel_sheet(file, sheet=None, exit_on_error=True):
"""
Load an Excel sheet and return as Pandas dataframe with user friendly error-handling.
:param file: Path to excel file
:param sheet: Name of sheet to load. Default: None -> Loads first sheet.
:param exit_on_error: Whether to call exit(0) on exception.
:returns: Pandas DataFrame, or None in case of error.
"""
df = None
try:
if sheet is not None:
df = pd.read_excel(file, sheet_name=sheet)
else:
df = pd.read_excel(file)
except FileNotFoundError:
logger.error("Could not find file '{}'.".format(file))
if exit_on_error:
exit(0)
except pd.errors.EmptyDataError:
logger.error("File '{}' is empty.".format(file))
if exit_on_error:
exit(0)
except pd.errors.ParserError:
logger.error("File '{}' is broken.".format(file))
if exit_on_error:
exit(0)
except XLRDError:
logger.error("Sheet '{}' is missing in {}.".format(sheet, file))
if exit_on_error:
exit(0)
except Exception:
logger.error("There was an error while loading '{}'".format(file))
if exit_on_error:
exit(0)
return df
class DataSetType:
SINGLE_YEAR = 1
PANEL = 2
class SelectionReason(IntEnum):
"""
Reasons why a participant was / was not selected for sample;
Reason > 0 : selected, Reason <= 0 : not selected
"""
NOT_ENOUGH_QUESTIONS_ANSWERED = -1
NOT_SELECTED_OTHER_REPRESENTATIVE_WAS_SELECTED = 0
SELECTED_AS_COMPANY_REPRESENTATIVE = 1
SELECTED_AS_COMPANY_REPRESENTATIVE_NO_OTHERS_FOUND = 2
SELECTED_AS_INDUSTRY_REPRESENTATIVE = 3
class DataSetCreator(object):
dataset_extra_cols = {
'selected', 'algorithmic_selection',
'algorithmic_selection_comment', 'historic_selection',
'panel_entity_id', 'person_id', 'year', 'cat_position', 'email'
}
required_settings = ['path_panel', 'sheet_persons', 'sheet_panel_entities',
'sheet_companies', 'sheet_groups', 'sheet_questions',
'sheet_scales', 'sheet_selection', 'path_results',
'path_output', 'years', 'exclude_deprecated',
'exclude_personal', 'exclude_auxiliary',
'exclude_din_meta_data', 'exclude_special_sections',
'exclude_years_min', 'allow_missing', 'save_output',
'use_selection_history']
def __init__(self, settings=DEFAULT_SETTINGS):
# settings: dataframe
self.settings = settings
self.years = self.settings['years']
self._validate_settings()
# list people (per year) that can't be found when creating dataset
self.missing_persons = {y: set() for y in self.years}
# load data according to settings...
# data: dictionary year:dataframe per self.years
# questions, q_dict, scales: data structure dataframes
# participant database: dataframes
# selection: historic (who was in the samples of the past?), dataframes
logger.info("Loading data...")
self.data, self.questions, self.q_dict, self.scales, self.persons, self.companies,\
self.panel_entities, self.groups,\
self.selection = DataSetCreator._load_data(
settings=self.settings
)
# create lookup for persons
self.persons_lookup = (self.persons
.drop_duplicates(
subset=["email", "wave_added"],
keep="last"
)
.set_index(
["email", "wave_added"]
)
[["id", "panel_entity_id"]]
.rename(
columns={
"id": "person_id"
})
.to_dict(
orient='index'
)
)
logger.info("Mapping scales...")
self.data = self._map_scales(
data=self.data,
scales=self.scales,
q_dict=self.q_dict
)
logger.info("Generating panel data...")
self.panel_df, self.available_questions_per_year = self._make_panel_df()
# warn if persons couldn't be identified
for y, missing in self.missing_persons.items():
if len(missing) > 0:
logger.warning("Missing in {}: {} persons".format(y, len(missing))) # ", ".join(missing)))
def _validate_settings(self):
for s in self.required_settings:
if s not in self.settings.keys():
logger.error("Setting '{}' is missing.".format(s))
exit(0)
if not os.path.isfile(self.settings["path_panel"]):
logger.error("Panel file '{}' could not be found.".format(self.settings["path_panel"]))
exit(0)
outdir = "/".join(self.settings["path_output"].split("/")[:-1])
if not os.path.isdir(outdir):
logger.error("Can't find output directory '{}'.".format(outdir))
exit(0)
def _set_sheet_settings_attribute(self, attr_name):
"""
Sets an object attribute (=attr_name) to a df generate from the sheet
of the same name in the panel file ("panel.xlsx").
:param attr_name: Object attribute = sheet name to set
:return: None
"""
setattr(self, attr_name, load_excel_sheet(
self.settings['path_panel'],
self.settings['sheet_{}'.format(attr_name)]
))
def _get_relevant_questions(self, dataset_type=DataSetType.SINGLE_YEAR):
"""
Get a set of question names that should be included in dataset
according to settings: in/exclude deprecated, personal, auxiliary questions,
meta data, questions that appear in a minimum number of years, special sections, etc.
:param dataset_type: default: DataSetType.SINGLE_YEAR. If DataSetType.PANEL, exclude
special section questions
:return: Set of question names
"""
query = 'name != "NaN"'
query += ' and not deprecated' if self.settings['exclude_deprecated'] else ""
query += ' and not personal_data' if self.settings['exclude_personal'] else ""
query += ' and not auxiliary' if self.settings['exclude_auxiliary'] else ""
query += ' and not name.str.startswith("din_")' if self.settings['exclude_din_meta_data'] else ""
query += ' and num_years_observed >= {}'.format(self.settings['exclude_years_min'])
if dataset_type==DataSetType.PANEL:
query += ' and special_section_year == "NaN"' if self.settings[
'exclude_special_sections'] else ""
return set(self.questions.query(query, engine='python')['name'].tolist())
@staticmethod
def _load_data(settings):
"""
Load survey data files and additional settings from panel.xlsx.
:param settings:
:return: DataFrames (data, questions, q_dict, scales, persons,
companies, groups, panel_entities, selection)
"""
# load survey data
data = {y: load_excel_sheet(
settings['path_results'].format(y))
for y in settings['years']
}
# load sheets from panel.xlsx
questions = load_excel_sheet(settings['path_panel'], settings['sheet_questions'])
scales = load_excel_sheet(settings['path_panel'], settings['sheet_scales'])
persons = load_excel_sheet(settings['path_panel'], settings['sheet_persons'])
companies = load_excel_sheet(settings['path_panel'], settings['sheet_companies'])
groups = load_excel_sheet(settings['path_panel'], settings['sheet_groups'])
panel_entities = load_excel_sheet(settings['path_panel'], settings['sheet_panel_entities'])
selection = load_excel_sheet(settings['path_panel'], settings['sheet_selection'])
# group scale entries
scales = scales.groupby('scale')
# make sure deprecated works...
questions['deprecated'] = questions['deprecated'].astype('bool')
# save dict representation of questions
try:
q_dict = questions.set_index('name').to_dict(orient='index')
except ValueError:
logger.error("questions are not unique")
counter = Counter(questions['name'].tolist())
logger.error(["{}({})".format(i, counter[i]) for i in counter if counter[i] > 1])
exit(0)
except Exception as ex:
logger.error("Can not generate question dictionary, questions not properly loaded or defined")
raise ex
return data, questions, q_dict, scales, persons,\
companies, groups, panel_entities, selection
def _was_selected(self, email, year):
selected = np.nan
selection_col = "selection_{}".format(year)
# try all indices
for y in self.years:
try:
sel = self.selection.set_index("email_{}".format(y))
selected = True if sel.loc[email][selection_col] == 1 else False
break
except KeyError:
pass
# logger.warning("could not find {} in {}".format(email, y))
return selected
def _select_by_history(self, df):
return df.apply(lambda x: self._was_selected(x['email'], x['year']), axis=1)
@staticmethod
def _get_q_map(q, q_dict, scales):
"""
Map observations to desired values, using the corresponding
question's scale definition.
:param q: question name
:param q_dict: question dictionary (q->{...,scale: scalename})
:param scales: Pandas DataFrame
:return: dict {original_data_value: mapped_data_value}
"""
q_scale = q_dict[q]['scale']
q_map = {}
# if question is not associated with any scale, no mapping is necessary
if q_scale in scales.groups.keys():
for r in scales.get_group(q_scale).iterrows():
r = r[1]
for n in range(1, 50):
key_name = 'alternative_{}'.format(n)
if key_name in r.keys():
original = r['alternative_{}'.format(n)]
if not pd.isnull(original):
# cast all values to str to avoid type mismatches
q_map[str(original)] = str(r['value'])
return q_map
def identify(self, email, year):
"""
Get id of associated panel entity and person based on email and year of observation.
:param email: person's e-mail address
:param year: year of entry in participant DB
:return: {panel_entity_id:int value, person_id:int value}
"""
res = None
for i in range(year, min(self.persons.wave_added)-1, -1):
try:
res = self.persons_lookup[(email, i)]
break
except KeyError:
pass
if res is None:
self.missing_persons[year].add(email)
return {
'panel_entity_id': None,
'person_id': None
}
else:
return res
@staticmethod
def _select_company_representative(group):
"""
Algorithm for selecting DNP participants:
When there are multiple participants who answer for the same company in
one wave, a set of rules has to determine the one participant whose
answers to take into account.
Prerequisites: All participants need to be matched to a company.
Company names have to be cleaned / coded, considering a
threshold up to which organization subdivisions are
regarded as separate units.
:param group: A Pandas group of participants, where each participant represents
the same company.
:return: Pandas Series with bool selected
"""
# selected = []
# order by fraction of answered questions (most first)
# ranked = group.sort_values(['fill'], ascending=False)
fill = group["total_fill"]
max_fill = max(fill)
# de-select all participants with too much missing data
# group.loc[fill < min_fill, "selected"] = SelectionReason.NOT_ENOUGH_QUESTIONS_ANSWERED
# CASE A: only one participant in group
if len(group) == 1:
group.loc[
:, "selected"
] = SelectionReason.SELECTED_AS_COMPANY_REPRESENTATIVE_NO_OTHERS_FOUND
# CASE B: multiple potential representatives
else:
# find best candidate = first cand. with max fill and standardization position
candidates = (
group[(fill == max_fill) & group.std_position].index
if group[fill == max_fill].std_position.any()
else group[fill == max_fill].index
)
# the representative
group.loc[
group.index == candidates[0],
"selected"
] = SelectionReason.SELECTED_AS_COMPANY_REPRESENTATIVE
# the rest is not selected
group.loc[
pd.isnull(group.selected),
"selected"
] = SelectionReason.NOT_SELECTED_OTHER_REPRESENTATIVE_WAS_SELECTED
return group.selected
def _select(self, df):
"""
Select one participant from all participant groups in the data.
Calls DataSetCreator._select on each group. Appends selection reasons.
:param df: Pandas DataFrame
:return:
"""
participants = None
try:
participants = df[["panel_entity_id", "person_id", "year", "total_fill", "cat_position", "view"]].copy()
except Exception as ex:
logger.error("Data is missing for {}:".format(df['year'].unique()[0]))
logger.error(ex)
logger.info("Make sure that the following variables exist and have completely mapped scales:")
logger.info("email, cat_position, num_empl, num_turnover, view")
exit(0)
participants["selected"] = np.nan
participants.loc[
participants.total_fill < self.settings["min_fill"],
"selected"
] = SelectionReason.NOT_ENOUGH_QUESTIONS_ANSWERED
participants["std_position"] = participants['cat_position'].str.contains('standard', case=False)
selection = []
if self.settings["include_privates_in_representative_selection"]:
# group all participants that answered enough questions
# by their panel_entity_id and the year of participantion
for name, group in participants.groupby(['panel_entity_id', 'year']):
group_selection = self._select_company_representative(group.copy())
selection.append(group_selection)
else:
# select all participants with view=private & enough answered questions
participants.loc[
(participants.view == "private") &
(participants.total_fill >= self.settings["min_fill"]),
"selected"
] = SelectionReason.SELECTED_AS_INDUSTRY_REPRESENTATIVE
selection.append(participants[participants.view == "private"].selected)
# group all view=company participants that answered enough questions
# by their panel_entity_id and the year of participantion
remaining = participants[
(participants.view != "private") &
(pd.isnull(participants.selected))
].copy()
for name, group in remaining.groupby(['panel_entity_id', 'year']):
group_selection = DataSetCreator._select_company_representative(group)
selection.append(group_selection)
selected = pd.concat(selection)
return (
selected > 0,
selected.replace({r.value: r.name.lower() for r in SelectionReason})
)
@staticmethod
def get_fill(df):
"""
Get percentage of questions filled in by participants as Pandas Series.
:param df: Pandas DataFrame
:return: Pandas Series
"""
col_delta = set(df.columns).intersection(DataSetCreator.dataset_extra_cols)
return df.count(axis=1).divide(len(df.columns) - len(col_delta))
def make_dataset(self, data, selected_years):
"""
Prepare a dataset from given data for the specified years:
- select a sample of participants based on DataSetCreator.select()
- include historical selection if available
- drop variables that are not available in time-span
:param data: Pandas DataFrame (stacked panel data in long format with var 'year')
:param selected_years: list<int> of years
:return: dataset (Pandas DataFrame)
"""
# keep only observations for selected years
df = data[data['year'].isin(selected_years)].dropna(axis=1, how='all').copy()
# drop questions that are not required
try:
relevant_questions = self._get_relevant_questions(
DataSetType.SINGLE_YEAR if len(selected_years) == 1
else DataSetType.PANEL
)
drop_cols = set(df.columns) - relevant_questions - DataSetCreator.dataset_extra_cols
df = df.drop(drop_cols, axis=1)
except Exception as ex:
logger.error("An error occured when trying to drop irrelevant questions:")
raise ex
exit(0)
# calculate % of questions filled in
df['total_fill'] = DataSetCreator.get_fill(df)
logger.info("{}: {} participants dropped due to too many missings".format(
", ".join([str(y) for y in selected_years]),
len(df.total_fill[df.total_fill < self.settings["min_fill"]].index)
))
# create "selection" column
selection, selection_reason = self._select(df)
df['algorithmic_selection'] = selection
df['algorithmic_selection_comment'] = selection_reason
# create "historic selection" column
df['historic_selection'] = self._select_by_history(df)
# create merged selection column (history if available, otherwise alg. selection)
# TODO: review
# df['selected'] = df['historic_selection'].fillna(df['algorithmic_selection'])
df['selected'] = df['algorithmic_selection']
logger.info("{}: selected {}/{} participants".format(
", ".join([str(y) for y in selected_years]),
len(df.selected[df.selected > 0].index),
len(df.selected)
))
# drop email address
if self.settings['exclude_personal']:
df = df.drop(['email'], axis=1)
return df
@staticmethod
def _map_scales(data, scales, q_dict):
"""
Replaces all data values for questions that have defined scales.
A default mapped value can be set by setting the $default$ flag,
all original data values that can't be mapped will be mapped
to the default value.
:param data: dict{year:DataFrame} of survey data
:param scales:
:param q_dict:
:return:
"""
obs_map = {}
for y in data.keys():
for q in q_dict.keys():
obs_map[q_dict[q]['name_{}'.format(y)]] = DataSetCreator._get_q_map(q, q_dict, scales)
for y in data.keys():
for c in data[y].columns:
if c in obs_map.keys():
observations = data[y][c]
scale = q_dict[c] if c in q_dict.keys() else None
scale_map = obs_map[c]
default_map = {}
# if a default value is set,
# replace all original values for which no mapping exists
# with that default mapping value
if "$default$" in scale_map.keys():
# all values in the data that do not appear in map:
unmapped = set(observations.unique()) - set(scale_map.keys()) - {'', np.nan, 'nan'}
default_map = {str(k): scale_map["$default$"] for k in unmapped}
# replace values with mapped + default values
data[y][c] = observations.astype(str).replace({
**scale_map,
**default_map,
**{
'nan': np.nan,
'': np.nan
}
})
# if scale is in defined as numeric, cast column to numeric
# if c in q_dict.keys() and q_dict[c]['format'] == 'numeric':
if scale is not None and scale['format'] == 'numeric':
data[y][c] = pd.to_numeric(observations, errors='coerce')
return data
def _make_panel_df(self):
"""
Create panel DataFrame by stacking yearly data, adding year variable, and identifying
persons and panel entities by <year, email> information.
:return: panel (Pandas DataFrame), number of available questions per year (dict{year:num})
"""
panel_data = []
available_questions_per_year = {}
# iterate over columns (questions)
for y, d in self.data.items():
qs = {q_info['name_{}'.format(y)]: q_panel for q_panel, q_info in self.q_dict.items()}
found_qs = [k for k in qs.keys() if k in d.columns]
not_found_qs = list(set(qs.keys()) - set(found_qs))
available_questions_per_year[y] = [qs[f] for f in found_qs]
for _ in d.iterrows():
row = _[1]
panel_data.append({
**{'year': y},
**{qs[q]: row[q] for q in found_qs},
**{qs[nf_q]: np.nan for nf_q in not_found_qs}
})
# identify panel entities
panel_df = pd.DataFrame(panel_data).replace({'nan': np.nan})
# t = time.process_time()
ident = panel_df.apply(
lambda x: self.identify(x['email'], x['year']), axis=1).apply(pd.Series)
# logger.info("identifying took {} s".format(time.process_time() - t))
panel_df['panel_entity_id'] = ident['panel_entity_id']
panel_df['person_id'] = ident['person_id']
return panel_df, available_questions_per_year
def get_datasets(self, years=None):
if years is None:
years = self.years
datasets = {}
if len(years) == 1:
datasets = {
'{}'.format(years[0]): self.make_dataset(self.panel_df, years)
}
elif len(years) > 1:
datasets = {
'panel {}-{}'.format(years[0], years[-1]): self.make_dataset(self.panel_df, years),
**{'{}'.format(y): self.make_dataset(self.panel_df, [y]) for y in years}
}
return datasets
def to_excel(self):
# prepare datasets
logger.info("Preparing all datasets...")
datasets = self.get_datasets()
fn = self.settings['path_output'].format(min(self.years), max(self.years))
filename = '{}_{}.xlsx'.format(fn, time.strftime("%Y%m%d-%H%M%S"))
writer = pd.ExcelWriter(filename, engine='xlsxwriter')
info_years = "the years {} to {}".format(
min(self.years), max(self.years)) if len(self.years) > 1 else "{}".format(self.years[0])
info = [
"German Standardization Panel",
"Deutsches Normungspanel (DNP)",
"",
"This data set contains pseudonymized survey data from " + info_years + ".",
"It was created automatically on " + time.strftime("%Y-%m-%d") + ".",
"The data structure is described in the sheets 'variables' and 'scales'.",
"Observations:"
]
for n, dat in datasets.items():
c_text = "Sheet {}: Selected observations: {}. Total: {}.".format(
n,
len(dat[dat['selected'] == True].index),
len(dat.index)
)
if "-" in n:
c_text += " Panel observations: "
selected = dat[dat['selected'] == True]
try:
selected_grouped = selected.groupby('panel_entity_id').agg({'year': pd.Series.nunique})
yearly = selected_grouped['year'].value_counts().to_dict()
c_text += ". ".join(["{} year(s): {}".format(y, c) for y, c in yearly.items()])
except KeyError:
logger.error(selected.groupby('panel_entity_id'))
info.append(c_text)
# write questions and scales
questions_drop_cols = set(self.questions.columns) - {
'name', 'question', 'label', 'scale', 'format'
}
scales_drop_cols = set(self.scales.obj.columns) - {'scale', 'value'}
# sheet 'info'
pd.DataFrame({'info': info}).to_excel(writer, sheet_name='info')
# sheet 'variables'
self.questions.drop(questions_drop_cols, axis=1).to_excel(writer, sheet_name='variables')
# sheet 'scales'
self.scales.obj.drop(scales_drop_cols, axis=1).to_excel(writer, sheet_name='scales')
# sheets yyyy
for n, dat in datasets.items():
dat.to_excel(writer, sheet_name=n)
# stack all years and put them in one sheet
years_dat = [d for y, d in datasets.items() if y.isdigit()]
# sheet 'data'
pd.concat(years_dat, sort=False).to_excel(writer, sheet_name="data")
logger.info("Saving to excel...")
try:
writer.save()
except FileNotFoundError:
logger.error("Could not save to {}".format(filename))
exit(0)
return filename
if __name__ == "__main__":
settings = DEFAULT_SETTINGS
try:
with open(PATH_TO_SETTINGS) as handle:
minified = jsmin(handle.read())
settings = json.loads(minified)
logger.info("Loaded custom settings from {}".format(PATH_TO_SETTINGS))
except Exception as e:
logger.error(e)
logger.info("Could not load custom settings, using default settings")
creator = DataSetCreator(settings=settings)
filename = creator.to_excel()
logger.info("Dataset saved to {}".format(filename)) | [
1,
1053,
11701,
408,
10518,
13,
5215,
12655,
408,
7442,
13,
5215,
931,
13,
5215,
10876,
13,
5215,
4390,
13,
3166,
6965,
1195,
1053,
6965,
1195,
13,
3166,
16250,
1053,
315,
5336,
13,
5215,
2897,
29889,
2084,
13,
3166,
921,
29880,
5499,
29889,
29890,
2593,
29882,
1053,
1060,
29519,
29928,
2392,
13,
3166,
263,
18605,
1053,
3159,
16854,
13,
5215,
931,
13,
13,
29937,
731,
701,
12183,
313,
517,
2991,
29897,
13,
5215,
12183,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
21707,
29889,
842,
10108,
29898,
21027,
29889,
18525,
29897,
13,
689,
2620,
353,
12183,
29889,
18522,
877,
29961,
29995,
29898,
5563,
978,
29897,
29879,
29962,
1273,
29898,
4906,
29897,
29879,
1495,
13,
13789,
353,
12183,
29889,
3835,
4598,
29898,
5461,
29922,
9675,
29889,
25393,
29897,
13,
13789,
29889,
842,
18522,
29898,
689,
2620,
29897,
13,
13789,
29889,
842,
10108,
29898,
21027,
29889,
18525,
29897,
13,
21707,
29889,
1202,
4598,
29898,
13789,
29897,
13,
21707,
29889,
842,
10108,
29898,
21027,
29889,
18525,
29897,
13,
13,
10145,
29918,
4986,
29918,
10490,
29911,
4214,
29903,
353,
525,
11027,
29914,
11027,
29889,
3126,
29915,
13,
13,
23397,
29918,
10490,
29911,
4214,
29903,
353,
9657,
29898,
13,
1678,
396,
2224,
304,
9451,
3829,
10616,
934,
13,
1678,
2224,
29918,
15119,
2433,
11027,
29914,
15119,
29889,
20267,
29916,
742,
13,
13,
1678,
396,
1024,
310,
26718,
297,
9451,
3829,
10616,
934,
13,
1678,
9869,
29918,
6774,
787,
2433,
6774,
787,
742,
13,
1678,
9869,
29918,
15119,
29918,
296,
1907,
2433,
15119,
29918,
296,
1907,
742,
13,
1678,
9869,
29918,
2388,
273,
583,
2433,
2388,
273,
583,
742,
13,
1678,
9869,
29918,
13155,
2433,
13155,
742,
13,
1678,
9869,
29918,
2619,
2433,
1272,
8600,
742,
13,
1678,
9869,
29918,
19529,
267,
2433,
19529,
267,
742,
13,
13,
1678,
396,
2224,
304,
18994,
848,
448,
6571,
674,
367,
8611,
411,
1629,
313,
14995,
14995,
29897,
13,
1678,
2224,
29918,
9902,
2433,
7610,
6950,
29899,
9902,
29914,
9902,
648,
1836,
20267,
29916,
742,
13,
13,
1678,
396,
2224,
304,
9819,
1962,
934,
13,
1678,
2224,
29918,
4905,
2433,
4905,
29914,
5200,
29886,
29918,
15119,
29899,
1272,
648,
7402,
8875,
742,
13,
13,
1678,
396,
2440,
304,
3160,
13,
1678,
2440,
11759,
29906,
29900,
29896,
29941,
29892,
29871,
29906,
29900,
29896,
29946,
29892,
29871,
29906,
29900,
29896,
29945,
29892,
29871,
29906,
29900,
29896,
29953,
29892,
29871,
29906,
29900,
29896,
29955,
29892,
29871,
29906,
29900,
29896,
29947,
29892,
29871,
29906,
29900,
29896,
29929,
1402,
13,
13,
1678,
396,
19060,
18164,
3651,
13,
1678,
19060,
29918,
311,
17990,
630,
29922,
5574,
29892,
13,
13,
1678,
396,
19060,
3651,
411,
7333,
2472,
13,
1678,
19060,
29918,
10532,
284,
29922,
5574,
29892,
13,
13,
1678,
396,
19060,
3651,
411,
29587,
653,
2472,
13,
1678,
19060,
29918,
2993,
2638,
653,
29922,
5574,
29892,
13,
13,
1678,
396,
19060,
3651,
515,
4266,
13926,
13,
1678,
19060,
29918,
18732,
29918,
27117,
29922,
5574,
29892,
13,
13,
1678,
396,
19060,
4538,
12700,
848,
13,
1678,
19060,
29918,
24581,
29918,
7299,
29918,
1272,
29922,
5574,
29892,
13,
13,
1678,
396,
19060,
3651,
411,
3109,
921,
2440,
297,
607,
896,
892,
760,
310,
278,
1139,
15421,
13,
1678,
19060,
29918,
6360,
29879,
29918,
1195,
29922,
29900,
29892,
13,
13,
1678,
396,
2758,
4567,
13917,
29901,
3160,
9451,
16212,
607,
1258,
451,
4866,
599,
6790,
2440,
13,
1678,
2758,
29918,
27259,
29922,
5574,
29892,
13,
13,
1678,
396,
4078,
278,
2582,
304,
385,
10616,
934,
13,
1678,
4078,
29918,
4905,
29922,
5574,
13,
29897,
13,
13,
13,
1753,
2254,
29918,
24633,
29918,
9855,
29898,
1445,
29892,
9869,
29922,
8516,
29892,
6876,
29918,
265,
29918,
2704,
29922,
5574,
1125,
13,
1678,
9995,
13,
1678,
16012,
385,
11388,
9869,
322,
736,
408,
349,
7086,
12205,
411,
1404,
19780,
1059,
29899,
3179,
1847,
29889,
13,
13,
1678,
584,
3207,
934,
29901,
10802,
304,
10616,
934,
13,
1678,
584,
3207,
9869,
29901,
4408,
310,
9869,
304,
2254,
29889,
13109,
29901,
6213,
1599,
4309,
7925,
937,
9869,
29889,
13,
1678,
584,
3207,
6876,
29918,
265,
29918,
2704,
29901,
26460,
304,
1246,
6876,
29898,
29900,
29897,
373,
3682,
29889,
13,
1678,
584,
18280,
29901,
349,
7086,
3630,
4308,
29892,
470,
6213,
297,
1206,
310,
1059,
29889,
13,
1678,
9995,
13,
1678,
4489,
353,
6213,
13,
1678,
1018,
29901,
13,
4706,
565,
9869,
338,
451,
6213,
29901,
13,
9651,
4489,
353,
10518,
29889,
949,
29918,
24633,
29898,
1445,
29892,
9869,
29918,
978,
29922,
9855,
29897,
13,
4706,
1683,
29901,
13,
9651,
4489,
353,
10518,
29889,
949,
29918,
24633,
29898,
1445,
29897,
13,
1678,
5174,
3497,
17413,
2392,
29901,
13,
4706,
17927,
29889,
2704,
703,
23323,
451,
1284,
934,
525,
8875,
29915,
1213,
29889,
4830,
29898,
1445,
876,
13,
4706,
565,
6876,
29918,
265,
29918,
2704,
29901,
13,
9651,
6876,
29898,
29900,
29897,
13,
1678,
5174,
10518,
29889,
12523,
29889,
8915,
1469,
2392,
29901,
13,
4706,
17927,
29889,
2704,
703,
2283,
525,
8875,
29915,
338,
4069,
1213,
29889,
4830,
29898,
1445,
876,
13,
4706,
565,
6876,
29918,
265,
29918,
2704,
29901,
13,
9651,
6876,
29898,
29900,
29897,
13,
1678,
5174,
10518,
29889,
12523,
29889,
11726,
2392,
29901,
13,
4706,
17927,
29889,
2704,
703,
2283,
525,
8875,
29915,
338,
9391,
1213,
29889,
4830,
29898,
1445,
876,
13,
4706,
565,
6876,
29918,
265,
29918,
2704,
29901,
13,
9651,
6876,
29898,
29900,
29897,
13,
1678,
5174,
1060,
29519,
29928,
2392,
29901,
13,
4706,
17927,
29889,
2704,
703,
10654,
525,
8875,
29915,
338,
4567,
297,
6571,
1213,
29889,
4830,
29898,
9855,
29892,
934,
876,
13,
4706,
565,
6876,
29918,
265,
29918,
2704,
29901,
13,
9651,
6876,
29898,
29900,
29897,
13,
1678,
5174,
8960,
29901,
13,
4706,
17927,
29889,
2704,
703,
8439,
471,
385,
1059,
1550,
8363,
525,
8875,
29915,
1642,
4830,
29898,
1445,
876,
13,
4706,
565,
6876,
29918,
265,
29918,
2704,
29901,
13,
9651,
6876,
29898,
29900,
29897,
13,
13,
1678,
736,
4489,
13,
13,
13,
1990,
3630,
2697,
1542,
29901,
13,
1678,
317,
4214,
1307,
29918,
29979,
26441,
353,
29871,
29896,
13,
1678,
349,
2190,
6670,
353,
29871,
29906,
13,
13,
13,
1990,
27930,
1123,
1658,
29898,
2928,
16854,
1125,
13,
1678,
9995,
13,
1678,
830,
7040,
2020,
263,
5221,
424,
471,
847,
471,
451,
4629,
363,
4559,
29936,
13,
13,
1678,
830,
1658,
1405,
29871,
29900,
584,
4629,
29892,
830,
1658,
5277,
29871,
29900,
584,
451,
4629,
13,
1678,
9995,
13,
1678,
6058,
29918,
1430,
29949,
23338,
29950,
29918,
14130,
27946,
29918,
2190,
23066,
1001,
3352,
353,
448,
29896,
13,
1678,
6058,
29918,
6404,
3352,
29918,
2891,
4448,
29918,
1525,
15094,
29903,
3919,
1299,
18474,
29918,
29956,
3289,
29918,
6404,
3352,
353,
29871,
29900,
13,
1678,
5097,
3352,
29918,
3289,
29918,
21514,
2190,
29979,
29918,
1525,
15094,
29903,
3919,
1299,
18474,
353,
29871,
29896,
13,
1678,
5097,
3352,
29918,
3289,
29918,
21514,
2190,
29979,
29918,
1525,
15094,
29903,
3919,
1299,
18474,
29918,
6632,
29918,
2891,
4448,
29903,
29918,
5800,
18783,
353,
29871,
29906,
13,
1678,
5097,
3352,
29918,
3289,
29918,
1177,
14849,
10810,
29979,
29918,
1525,
15094,
29903,
3919,
1299,
18474,
353,
29871,
29941,
13,
13,
13,
1990,
3630,
2697,
9832,
1061,
29898,
3318,
1125,
13,
13,
1678,
8783,
29918,
17833,
29918,
22724,
353,
426,
13,
4706,
525,
8391,
742,
525,
20567,
293,
29918,
21731,
742,
13,
4706,
525,
20567,
293,
29918,
21731,
29918,
9342,
742,
525,
16211,
293,
29918,
21731,
742,
13,
4706,
525,
15119,
29918,
10041,
29918,
333,
742,
525,
10532,
29918,
333,
742,
525,
6360,
742,
525,
4117,
29918,
3283,
742,
525,
5269,
29915,
13,
1678,
500,
13,
13,
1678,
3734,
29918,
11027,
353,
6024,
2084,
29918,
15119,
742,
525,
9855,
29918,
6774,
787,
742,
525,
9855,
29918,
15119,
29918,
296,
1907,
742,
13,
462,
308,
525,
9855,
29918,
2388,
273,
583,
742,
525,
9855,
29918,
13155,
742,
525,
9855,
29918,
2619,
742,
13,
462,
308,
525,
9855,
29918,
19529,
267,
742,
525,
9855,
29918,
21731,
742,
525,
2084,
29918,
9902,
742,
13,
462,
308,
525,
2084,
29918,
4905,
742,
525,
6360,
29879,
742,
525,
735,
2325,
29918,
311,
17990,
630,
742,
13,
462,
308,
525,
735,
2325,
29918,
10532,
284,
742,
525,
735,
2325,
29918,
2993,
2638,
653,
742,
13,
462,
308,
525,
735,
2325,
29918,
24581,
29918,
7299,
29918,
1272,
742,
525,
735,
2325,
29918,
18732,
29918,
27117,
742,
13,
462,
308,
525,
735,
2325,
29918,
6360,
29879,
29918,
1195,
742,
525,
9536,
29918,
27259,
742,
525,
7620,
29918,
4905,
742,
13,
462,
308,
525,
1509,
29918,
21731,
29918,
18434,
2033,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
6055,
29922,
23397,
29918,
10490,
29911,
4214,
29903,
1125,
13,
13,
4706,
396,
6055,
29901,
12205,
13,
4706,
1583,
29889,
11027,
353,
6055,
13,
4706,
1583,
29889,
6360,
29879,
353,
1583,
29889,
11027,
1839,
6360,
29879,
2033,
13,
4706,
1583,
3032,
15480,
29918,
11027,
580,
13,
13,
4706,
396,
1051,
2305,
313,
546,
1629,
29897,
393,
508,
29915,
29873,
367,
1476,
746,
4969,
8783,
13,
4706,
1583,
29889,
27259,
29918,
6774,
787,
353,
426,
29891,
29901,
731,
580,
363,
343,
297,
1583,
29889,
6360,
29879,
29913,
13,
13,
4706,
396,
2254,
848,
5034,
304,
6055,
856,
13,
4706,
396,
848,
29901,
8600,
1629,
29901,
1272,
2557,
639,
1583,
29889,
6360,
29879,
13,
4706,
396,
5155,
29892,
3855,
29918,
8977,
29892,
23431,
29901,
848,
3829,
848,
19935,
13,
4706,
396,
5221,
424,
2566,
29901,
848,
19935,
13,
4706,
396,
9262,
29901,
22879,
313,
15970,
471,
297,
278,
11916,
310,
278,
4940,
29973,
511,
848,
19935,
13,
4706,
17927,
29889,
3888,
703,
23456,
848,
856,
1159,
13,
4706,
1583,
29889,
1272,
29892,
1583,
29889,
2619,
29892,
1583,
29889,
29939,
29918,
8977,
29892,
1583,
29889,
19529,
267,
29892,
1583,
29889,
6774,
787,
29892,
1583,
29889,
2388,
273,
583,
2053,
13,
4706,
1583,
29889,
15119,
29918,
296,
1907,
29892,
1583,
29889,
13155,
2053,
13,
4706,
1583,
29889,
21731,
353,
3630,
2697,
9832,
1061,
3032,
1359,
29918,
1272,
29898,
13,
9651,
6055,
29922,
1311,
29889,
11027,
13,
4706,
1723,
13,
13,
4706,
396,
1653,
16280,
363,
12407,
13,
4706,
1583,
29889,
6774,
787,
29918,
20401,
353,
313,
1311,
29889,
6774,
787,
13,
9651,
869,
8865,
29918,
20908,
15815,
29898,
13,
18884,
11306,
29922,
3366,
5269,
613,
376,
27766,
29918,
23959,
12436,
13,
18884,
3013,
543,
4230,
29908,
13,
9651,
1723,
13,
9651,
869,
842,
29918,
2248,
29898,
13,
18884,
6796,
5269,
613,
376,
27766,
29918,
23959,
3108,
13,
9651,
1723,
13,
9651,
518,
3366,
333,
613,
376,
15119,
29918,
10041,
29918,
333,
3108,
29962,
13,
9651,
869,
1267,
420,
29898,
13,
18884,
4341,
3790,
13,
18884,
376,
333,
1115,
376,
10532,
29918,
333,
29908,
13,
9651,
5615,
13,
9651,
869,
517,
29918,
8977,
29898,
13,
18884,
7769,
2433,
2248,
29915,
13,
9651,
1723,
13,
4706,
1723,
13,
13,
4706,
17927,
29889,
3888,
703,
15845,
23431,
856,
1159,
13,
4706,
1583,
29889,
1272,
353,
1583,
3032,
1958,
29918,
19529,
267,
29898,
13,
9651,
848,
29922,
1311,
29889,
1272,
29892,
13,
9651,
23431,
29922,
1311,
29889,
19529,
267,
29892,
13,
9651,
3855,
29918,
8977,
29922,
1311,
29889,
29939,
29918,
8977,
13,
4706,
1723,
13,
13,
4706,
17927,
29889,
3888,
703,
5631,
1218,
9451,
848,
856,
1159,
13,
4706,
1583,
29889,
15119,
29918,
2176,
29892,
1583,
29889,
16515,
29918,
2619,
29918,
546,
29918,
6360,
353,
1583,
3032,
5675,
29918,
15119,
29918,
2176,
580,
13,
13,
4706,
396,
29383,
565,
12407,
8496,
29915,
29873,
367,
15659,
13,
4706,
363,
343,
29892,
4567,
297,
1583,
29889,
27259,
29918,
6774,
787,
29889,
7076,
7295,
13,
9651,
565,
7431,
29898,
27259,
29897,
1405,
29871,
29900,
29901,
13,
18884,
17927,
29889,
27392,
703,
18552,
292,
297,
426,
6177,
6571,
12407,
1642,
4830,
29898,
29891,
29892,
7431,
29898,
27259,
4961,
396,
9162,
11393,
7122,
29898,
27259,
4961,
13,
13,
1678,
822,
903,
15480,
29918,
11027,
29898,
1311,
1125,
13,
4706,
363,
269,
297,
1583,
29889,
12403,
29918,
11027,
29901,
13,
9651,
565,
269,
451,
297,
1583,
29889,
11027,
29889,
8149,
7295,
13,
18884,
17927,
29889,
2704,
703,
29020,
525,
8875,
29915,
338,
4567,
1213,
29889,
4830,
29898,
29879,
876,
13,
18884,
6876,
29898,
29900,
29897,
13,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
275,
1445,
29898,
1311,
29889,
11027,
3366,
2084,
29918,
15119,
3108,
1125,
13,
9651,
17927,
29889,
2704,
703,
7490,
934,
525,
8875,
29915,
1033,
451,
367,
1476,
1213,
29889,
4830,
29898,
1311,
29889,
11027,
3366,
2084,
29918,
15119,
3108,
876,
13,
9651,
6876,
29898,
29900,
29897,
13,
13,
4706,
714,
3972,
353,
5591,
1642,
7122,
29898,
1311,
29889,
11027,
3366,
2084,
29918,
4905,
16862,
5451,
11974,
1159,
7503,
29899,
29896,
2314,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
275,
3972,
29898,
449,
3972,
1125,
13,
9651,
17927,
29889,
2704,
703,
6028,
29915,
29873,
1284,
1962,
3884,
525,
8875,
29915,
1213,
29889,
4830,
29898,
449,
3972,
876,
13,
9651,
6876,
29898,
29900,
29897,
13,
13,
1678,
822,
903,
842,
29918,
9855,
29918,
11027,
29918,
12715,
29898,
1311,
29892,
12421,
29918,
978,
1125,
13,
4706,
9995,
13,
4706,
317,
1691,
385,
1203,
5352,
11070,
5552,
29918,
978,
29897,
304,
263,
4489,
5706,
515,
278,
9869,
13,
4706,
310,
278,
1021,
1024,
297,
278,
9451,
934,
4852,
15119,
29889,
20267,
29916,
2564,
13,
13,
4706,
584,
3207,
12421,
29918,
978,
29901,
4669,
5352,
353,
9869,
1024,
304,
731,
13,
4706,
584,
2457,
29901,
6213,
13,
4706,
9995,
13,
4706,
731,
5552,
29898,
1311,
29892,
12421,
29918,
978,
29892,
2254,
29918,
24633,
29918,
9855,
29898,
13,
9651,
1583,
29889,
11027,
1839,
2084,
29918,
15119,
7464,
13,
9651,
1583,
29889,
11027,
1839,
9855,
648,
29913,
4286,
4830,
29898,
5552,
29918,
978,
4638,
13,
308,
876,
13,
13,
1678,
822,
903,
657,
29918,
276,
6591,
29918,
2619,
29898,
1311,
29892,
8783,
29918,
1853,
29922,
28449,
1542,
29889,
29903,
4214,
1307,
29918,
29979,
26441,
1125,
13,
4706,
9995,
13,
4706,
3617,
263,
731,
310,
1139,
2983,
393,
881,
367,
5134,
297,
8783,
13,
4706,
5034,
304,
6055,
29901,
297,
29914,
735,
2325,
18164,
29892,
7333,
29892,
29587,
653,
5155,
29892,
13,
4706,
12700,
848,
29892,
5155,
393,
2615,
297,
263,
9212,
1353,
310,
2440,
29892,
4266,
13926,
29892,
2992,
29889,
13,
13,
4706,
584,
3207,
8783,
29918,
1853,
29901,
2322,
29901,
3630,
2697,
1542,
29889,
29903,
4214,
1307,
29918,
29979,
26441,
29889,
960,
3630,
2697,
1542,
29889,
29925,
2190,
6670,
29892,
19060,
13,
462,
632,
4266,
4004,
5155,
13,
4706,
584,
2457,
29901,
3789,
310,
1139,
2983,
13,
4706,
9995,
13,
4706,
2346,
353,
29871,
525,
978,
2804,
376,
19377,
29908,
29915,
13,
4706,
2346,
4619,
525,
322,
451,
18164,
29915,
565,
1583,
29889,
11027,
1839,
735,
2325,
29918,
311,
17990,
630,
2033,
1683,
5124,
13,
4706,
2346,
4619,
525,
322,
451,
7333,
29918,
1272,
29915,
565,
1583,
29889,
11027,
1839,
735,
2325,
29918,
10532,
284,
2033,
1683,
5124,
13,
4706,
2346,
4619,
525,
322,
451,
29587,
653,
29915,
565,
1583,
29889,
11027,
1839,
735,
2325,
29918,
2993,
2638,
653,
2033,
1683,
5124,
13,
4706,
2346,
4619,
525,
322,
451,
1024,
29889,
710,
29889,
27382,
2541,
703,
24581,
29918,
1159,
29915,
565,
1583,
29889,
11027,
1839,
735,
2325,
29918,
24581,
29918,
7299,
29918,
1272,
2033,
1683,
5124,
13,
4706,
2346,
4619,
525,
322,
954,
29918,
6360,
29879,
29918,
711,
643,
1490,
6736,
6571,
4286,
4830,
29898,
1311,
29889,
11027,
1839,
735,
2325,
29918,
6360,
29879,
29918,
1195,
11287,
13,
13,
4706,
565,
8783,
29918,
1853,
1360,
28449,
1542,
29889,
29925,
2190,
6670,
29901,
13,
9651,
2346,
4619,
525,
322,
4266,
29918,
2042,
29918,
6360,
1275,
376,
19377,
29908,
29915,
565,
1583,
29889,
11027,
29961,
13,
18884,
525,
735,
2325,
29918,
18732,
29918,
27117,
2033,
1683,
5124,
13,
13,
4706,
736,
731,
29898,
1311,
29889,
2619,
29889,
1972,
29898,
1972,
29892,
6012,
2433,
4691,
1495,
1839,
978,
13359,
25027,
391,
3101,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
903,
1359,
29918,
1272,
29898,
11027,
1125,
13,
4706,
9995,
13,
4706,
16012,
18994,
848,
2066,
322,
5684,
6055,
515,
9451,
29889,
20267,
29916,
29889,
13,
13,
4706,
584,
3207,
6055,
29901,
13,
4706,
584,
2457,
29901,
3630,
14438,
1280,
313,
1272,
29892,
5155,
29892,
3855,
29918,
8977,
29892,
23431,
29892,
12407,
29892,
13,
462,
632,
14582,
29892,
6471,
29892,
9451,
29918,
296,
1907,
29892,
9262,
29897,
13,
4706,
9995,
13,
13,
4706,
396,
2254,
18994,
848,
13,
4706,
848,
353,
426,
29891,
29901,
2254,
29918,
24633,
29918,
9855,
29898,
13,
9651,
6055,
1839,
2084,
29918,
9902,
13359,
4830,
29898,
29891,
876,
13,
9651,
363,
343,
297,
6055,
1839,
6360,
29879,
2033,
13,
4706,
500,
13,
13,
4706,
396,
2254,
26718,
515,
9451,
29889,
20267,
29916,
13,
4706,
5155,
353,
2254,
29918,
24633,
29918,
9855,
29898,
11027,
1839,
2084,
29918,
15119,
7464,
6055,
1839,
9855,
29918,
2619,
11287,
13,
4706,
23431,
353,
2254,
29918,
24633,
29918,
9855,
29898,
11027,
1839,
2084,
29918,
15119,
7464,
6055,
1839,
9855,
29918,
19529,
267,
11287,
13,
4706,
12407,
353,
2254,
29918,
24633,
29918,
9855,
29898,
11027,
1839,
2084,
29918,
15119,
7464,
6055,
1839,
9855,
29918,
6774,
787,
11287,
13,
4706,
14582,
353,
2254,
29918,
24633,
29918,
9855,
29898,
11027,
1839,
2084,
29918,
15119,
7464,
6055,
1839,
9855,
29918,
2388,
273,
583,
11287,
13,
4706,
6471,
353,
2254,
29918,
24633,
29918,
9855,
29898,
11027,
1839,
2084,
29918,
15119,
7464,
6055,
1839,
9855,
29918,
13155,
11287,
13,
4706,
9451,
29918,
296,
1907,
353,
2254,
29918,
24633,
29918,
9855,
29898,
11027,
1839,
2084,
29918,
15119,
7464,
6055,
1839,
9855,
29918,
15119,
29918,
296,
1907,
11287,
13,
4706,
9262,
353,
2254,
29918,
24633,
29918,
9855,
29898,
11027,
1839,
2084,
29918,
15119,
7464,
6055,
1839,
9855,
29918,
21731,
11287,
13,
13,
4706,
396,
2318,
6287,
9976,
13,
4706,
23431,
353,
23431,
29889,
27789,
877,
7052,
1495,
13,
13,
4706,
396,
1207,
1854,
18164,
1736,
856,
13,
4706,
5155,
1839,
311,
17990,
630,
2033,
353,
5155,
1839,
311,
17990,
630,
13359,
579,
668,
877,
11227,
1495,
13,
13,
4706,
396,
4078,
9657,
8954,
310,
5155,
13,
4706,
1018,
29901,
13,
9651,
3855,
29918,
8977,
353,
5155,
29889,
842,
29918,
2248,
877,
978,
2824,
517,
29918,
8977,
29898,
12236,
2433,
2248,
1495,
13,
4706,
5174,
7865,
2392,
29901,
13,
9651,
17927,
29889,
2704,
703,
2619,
526,
451,
5412,
1159,
13,
9651,
6795,
353,
315,
5336,
29898,
2619,
1839,
978,
13359,
25027,
391,
3101,
13,
9651,
17927,
29889,
2704,
29898,
3366,
29912,
2119,
29912,
1800,
1642,
4830,
29898,
29875,
29892,
6795,
29961,
29875,
2314,
363,
474,
297,
6795,
565,
6795,
29961,
29875,
29962,
1405,
29871,
29896,
2314,
13,
9651,
6876,
29898,
29900,
29897,
13,
4706,
5174,
8960,
408,
429,
29901,
13,
9651,
17927,
29889,
2704,
703,
6028,
451,
5706,
1139,
8600,
29892,
5155,
451,
6284,
7500,
470,
3342,
1159,
13,
9651,
12020,
429,
13,
13,
4706,
736,
848,
29892,
5155,
29892,
3855,
29918,
8977,
29892,
23431,
29892,
12407,
2053,
13,
1669,
14582,
29892,
6471,
29892,
9451,
29918,
296,
1907,
29892,
9262,
13,
13,
1678,
822,
903,
11102,
29918,
8391,
29898,
1311,
29892,
4876,
29892,
1629,
1125,
13,
4706,
4629,
353,
7442,
29889,
13707,
13,
4706,
9262,
29918,
1054,
353,
376,
21731,
648,
29913,
1642,
4830,
29898,
6360,
29897,
13,
4706,
396,
1018,
599,
16285,
13,
4706,
363,
343,
297,
1583,
29889,
6360,
29879,
29901,
13,
9651,
1018,
29901,
13,
18884,
5535,
353,
1583,
29889,
21731,
29889,
842,
29918,
2248,
703,
5269,
648,
29913,
1642,
4830,
29898,
29891,
876,
13,
18884,
4629,
353,
5852,
565,
5535,
29889,
2029,
29961,
5269,
3816,
21731,
29918,
1054,
29962,
1275,
29871,
29896,
1683,
7700,
13,
18884,
2867,
13,
9651,
5174,
7670,
2392,
29901,
13,
18884,
1209,
13,
18884,
396,
17927,
29889,
27392,
703,
26680,
451,
1284,
6571,
297,
6571,
1642,
4830,
29898,
5269,
29892,
343,
876,
13,
13,
4706,
736,
4629,
13,
13,
1678,
822,
903,
2622,
29918,
1609,
29918,
18434,
29898,
1311,
29892,
4489,
1125,
13,
4706,
736,
4489,
29889,
7302,
29898,
2892,
921,
29901,
1583,
3032,
11102,
29918,
8391,
29898,
29916,
1839,
5269,
7464,
921,
1839,
6360,
2033,
511,
9685,
29922,
29896,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
903,
657,
29918,
29939,
29918,
1958,
29898,
29939,
29892,
3855,
29918,
8977,
29892,
23431,
1125,
13,
4706,
9995,
13,
4706,
7315,
13917,
304,
7429,
1819,
29892,
773,
278,
6590,
13,
4706,
1139,
29915,
29879,
6287,
5023,
29889,
13,
13,
4706,
584,
3207,
3855,
29901,
1139,
1024,
13,
4706,
584,
3207,
3855,
29918,
8977,
29901,
1139,
8600,
313,
29939,
20667,
16361,
7052,
29901,
8716,
3871,
1800,
13,
4706,
584,
3207,
23431,
29901,
349,
7086,
3630,
4308,
13,
4706,
584,
2457,
29901,
9657,
426,
13492,
29918,
1272,
29918,
1767,
29901,
20545,
29918,
1272,
29918,
1767,
29913,
13,
4706,
9995,
13,
4706,
3855,
29918,
7052,
353,
3855,
29918,
8977,
29961,
29939,
22322,
7052,
2033,
13,
4706,
3855,
29918,
1958,
353,
6571,
13,
13,
4706,
396,
565,
1139,
338,
451,
6942,
411,
738,
6287,
29892,
694,
10417,
338,
5181,
13,
4706,
565,
3855,
29918,
7052,
297,
23431,
29889,
13155,
29889,
8149,
7295,
13,
9651,
363,
364,
297,
23431,
29889,
657,
29918,
2972,
29898,
29939,
29918,
7052,
467,
1524,
5727,
7295,
13,
18884,
364,
353,
364,
29961,
29896,
29962,
13,
18884,
363,
302,
297,
3464,
29898,
29896,
29892,
29871,
29945,
29900,
1125,
13,
462,
1678,
1820,
29918,
978,
353,
525,
26123,
1230,
648,
29913,
4286,
4830,
29898,
29876,
29897,
13,
462,
1678,
565,
1820,
29918,
978,
297,
364,
29889,
8149,
7295,
13,
462,
4706,
2441,
353,
364,
1839,
26123,
1230,
648,
29913,
4286,
4830,
29898,
29876,
4638,
13,
462,
4706,
565,
451,
10518,
29889,
275,
4304,
29898,
13492,
1125,
13,
462,
9651,
396,
4320,
599,
1819,
304,
851,
304,
4772,
1134,
29635,
267,
13,
462,
9651,
3855,
29918,
1958,
29961,
710,
29898,
13492,
4638,
353,
851,
29898,
29878,
1839,
1767,
11287,
13,
13,
4706,
736,
3855,
29918,
1958,
13,
13,
1678,
822,
12439,
29898,
1311,
29892,
4876,
29892,
1629,
1125,
13,
4706,
9995,
13,
4706,
3617,
1178,
310,
6942,
9451,
7855,
322,
2022,
2729,
373,
4876,
322,
1629,
310,
15500,
29889,
13,
13,
4706,
584,
3207,
4876,
29901,
2022,
29915,
29879,
321,
29899,
2549,
3211,
13,
4706,
584,
3207,
1629,
29901,
1629,
310,
6251,
297,
5221,
424,
6535,
13,
4706,
584,
2457,
29901,
426,
15119,
29918,
10041,
29918,
333,
29901,
524,
995,
29892,
2022,
29918,
333,
29901,
524,
995,
29913,
13,
4706,
9995,
13,
13,
4706,
620,
353,
6213,
13,
13,
4706,
363,
474,
297,
3464,
29898,
6360,
29892,
1375,
29898,
1311,
29889,
6774,
787,
29889,
27766,
29918,
23959,
6817,
29896,
29892,
448,
29896,
1125,
13,
9651,
1018,
29901,
13,
18884,
620,
353,
1583,
29889,
6774,
787,
29918,
20401,
15625,
5269,
29892,
474,
4638,
13,
18884,
2867,
13,
9651,
5174,
7670,
2392,
29901,
13,
18884,
1209,
13,
13,
4706,
565,
620,
338,
6213,
29901,
13,
9651,
1583,
29889,
27259,
29918,
6774,
787,
29961,
6360,
1822,
1202,
29898,
5269,
29897,
13,
9651,
736,
426,
13,
18884,
525,
15119,
29918,
10041,
29918,
333,
2396,
6213,
29892,
13,
18884,
525,
10532,
29918,
333,
2396,
6213,
13,
9651,
500,
13,
4706,
1683,
29901,
13,
9651,
736,
620,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
903,
2622,
29918,
14518,
29918,
276,
6338,
1230,
29898,
2972,
1125,
13,
4706,
9995,
13,
4706,
29068,
363,
18851,
360,
25500,
27138,
29901,
13,
13,
4706,
1932,
727,
526,
2999,
27138,
1058,
1234,
363,
278,
1021,
5001,
297,
13,
4706,
697,
10742,
29892,
263,
731,
310,
6865,
756,
304,
8161,
278,
697,
5221,
424,
5069,
13,
4706,
6089,
304,
2125,
964,
3633,
29889,
13,
13,
4706,
1588,
406,
7680,
3246,
29901,
2178,
27138,
817,
304,
367,
19228,
304,
263,
5001,
29889,
13,
462,
539,
6938,
2983,
505,
304,
367,
5941,
287,
847,
274,
6797,
29892,
13858,
263,
13,
462,
539,
16897,
701,
304,
607,
13013,
1014,
4563,
12112,
526,
13,
462,
539,
17878,
408,
5004,
10340,
29889,
13,
13,
4706,
584,
3207,
2318,
29901,
319,
349,
7086,
2318,
310,
27138,
29892,
988,
1269,
5221,
424,
11524,
13,
462,
418,
278,
1021,
5001,
29889,
13,
4706,
584,
2457,
29901,
349,
7086,
10488,
411,
6120,
4629,
13,
4706,
9995,
13,
4706,
396,
4629,
353,
5159,
13,
13,
4706,
396,
1797,
491,
15958,
310,
7699,
5155,
313,
3242,
937,
29897,
13,
4706,
396,
26642,
353,
2318,
29889,
6605,
29918,
5975,
18959,
5589,
7464,
12066,
2548,
29922,
8824,
29897,
13,
4706,
5445,
353,
2318,
3366,
7827,
29918,
5589,
3108,
13,
4706,
4236,
29918,
5589,
353,
4236,
29898,
5589,
29897,
13,
13,
4706,
396,
316,
29899,
2622,
599,
27138,
411,
2086,
1568,
4567,
848,
13,
4706,
396,
2318,
29889,
2029,
29961,
5589,
529,
1375,
29918,
5589,
29892,
376,
8391,
3108,
353,
27930,
1123,
1658,
29889,
12256,
29918,
1430,
29949,
23338,
29950,
29918,
14130,
27946,
29918,
2190,
23066,
1001,
3352,
13,
13,
4706,
396,
29134,
319,
29901,
871,
697,
5221,
424,
297,
2318,
13,
4706,
565,
7431,
29898,
2972,
29897,
1275,
29871,
29896,
29901,
13,
9651,
2318,
29889,
2029,
29961,
13,
18884,
584,
29892,
376,
8391,
29908,
13,
9651,
4514,
353,
27930,
1123,
1658,
29889,
6404,
3352,
29918,
3289,
29918,
21514,
2190,
29979,
29918,
1525,
15094,
29903,
3919,
1299,
18474,
29918,
6632,
29918,
2891,
4448,
29903,
29918,
5800,
18783,
13,
13,
4706,
396,
29134,
350,
29901,
2999,
7037,
2755,
5056,
13,
4706,
1683,
29901,
13,
9651,
396,
1284,
1900,
14020,
353,
937,
23794,
29889,
411,
4236,
5445,
322,
3918,
2133,
2602,
13,
9651,
21669,
353,
313,
13,
18884,
2318,
15625,
5589,
1275,
4236,
29918,
5589,
29897,
669,
2318,
29889,
4172,
29918,
3283,
1822,
2248,
13,
18884,
565,
2318,
29961,
5589,
1275,
4236,
29918,
5589,
1822,
4172,
29918,
3283,
29889,
1384,
580,
13,
18884,
1683,
2318,
29961,
5589,
1275,
4236,
29918,
5589,
1822,
2248,
13,
9651,
1723,
13,
13,
9651,
396,
278,
21097,
13,
9651,
2318,
29889,
2029,
29961,
13,
18884,
2318,
29889,
2248,
1275,
21669,
29961,
29900,
1402,
13,
18884,
376,
8391,
29908,
13,
9651,
4514,
353,
27930,
1123,
1658,
29889,
6404,
3352,
29918,
3289,
29918,
21514,
2190,
29979,
29918,
1525,
15094,
29903,
3919,
1299,
18474,
13,
13,
9651,
396,
278,
1791,
338,
451,
4629,
13,
9651,
2318,
29889,
2029,
29961,
13,
18884,
10518,
29889,
275,
4304,
29898,
2972,
29889,
8391,
511,
13,
18884,
376,
8391,
29908,
13,
9651,
4514,
353,
27930,
1123,
1658,
29889,
12256,
29918,
6404,
3352,
29918,
2891,
4448,
29918,
1525,
15094,
29903,
3919,
1299,
18474,
29918,
29956,
3289,
29918,
6404,
3352,
13,
13,
4706,
736,
2318,
29889,
8391,
13,
13,
1678,
822,
903,
2622,
29898,
1311,
29892,
4489,
1125,
13,
4706,
9995,
13,
4706,
7605,
697,
5221,
424,
515,
599,
5221,
424,
6471,
297,
278,
848,
29889,
13,
4706,
315,
4293,
3630,
2697,
9832,
1061,
3032,
2622,
373,
1269,
2318,
29889,
2401,
1975,
9262,
9590,
29889,
13,
13,
4706,
584,
3207,
4489,
29901,
349,
7086,
3630,
4308,
13,
4706,
584,
2457,
29901,
13,
4706,
9995,
13,
13,
4706,
27138,
353,
6213,
13,
4706,
1018,
29901,
13,
9651,
27138,
353,
4489,
29961,
3366,
15119,
29918,
10041,
29918,
333,
613,
376,
10532,
29918,
333,
613,
376,
6360,
613,
376,
7827,
29918,
5589,
613,
376,
4117,
29918,
3283,
613,
376,
1493,
3108,
1822,
8552,
580,
13,
4706,
5174,
8960,
408,
429,
29901,
13,
9651,
17927,
29889,
2704,
703,
1469,
338,
4567,
363,
426,
6177,
1642,
4830,
29898,
2176,
1839,
6360,
13359,
13092,
580,
29961,
29900,
12622,
13,
9651,
17927,
29889,
2704,
29898,
735,
29897,
13,
9651,
17927,
29889,
3888,
703,
9984,
1854,
393,
278,
1494,
3651,
1863,
322,
505,
6446,
20545,
23431,
29901,
1159,
13,
9651,
17927,
29889,
3888,
703,
5269,
29892,
6635,
29918,
3283,
29892,
954,
29918,
16305,
29892,
954,
29918,
685,
957,
29892,
1776,
1159,
13,
9651,
6876,
29898,
29900,
29897,
13,
13,
4706,
27138,
3366,
8391,
3108,
353,
7442,
29889,
13707,
13,
4706,
27138,
29889,
2029,
29961,
13,
9651,
27138,
29889,
7827,
29918,
5589,
529,
1583,
29889,
11027,
3366,
1195,
29918,
5589,
12436,
13,
9651,
376,
8391,
29908,
13,
4706,
4514,
353,
27930,
1123,
1658,
29889,
12256,
29918,
1430,
29949,
23338,
29950,
29918,
14130,
27946,
29918,
2190,
23066,
1001,
3352,
13,
13,
4706,
27138,
3366,
4172,
29918,
3283,
3108,
353,
27138,
1839,
4117,
29918,
3283,
13359,
710,
29889,
11516,
877,
15770,
742,
1206,
29922,
8824,
29897,
13,
13,
4706,
9262,
353,
5159,
13,
4706,
565,
1583,
29889,
11027,
3366,
2856,
29918,
22534,
1078,
29918,
262,
29918,
276,
6338,
1230,
29918,
21731,
3108,
29901,
13,
9651,
396,
2318,
599,
27138,
393,
7699,
3307,
5155,
13,
9651,
396,
491,
1009,
9451,
29918,
10041,
29918,
333,
322,
278,
1629,
310,
5221,
424,
291,
13,
9651,
363,
1024,
29892,
2318,
297,
27138,
29889,
27789,
18959,
15119,
29918,
10041,
29918,
333,
742,
525,
6360,
2033,
1125,
13,
18884,
2318,
29918,
21731,
353,
1583,
3032,
2622,
29918,
14518,
29918,
276,
6338,
1230,
29898,
2972,
29889,
8552,
3101,
13,
18884,
9262,
29889,
4397,
29898,
2972,
29918,
21731,
29897,
13,
4706,
1683,
29901,
13,
9651,
396,
1831,
599,
27138,
411,
1776,
29922,
9053,
669,
3307,
7699,
5155,
13,
9651,
27138,
29889,
2029,
29961,
13,
18884,
313,
1595,
12654,
1934,
29889,
1493,
1275,
376,
9053,
1159,
669,
13,
18884,
313,
1595,
12654,
1934,
29889,
7827,
29918,
5589,
6736,
1583,
29889,
11027,
3366,
1195,
29918,
5589,
3108,
511,
13,
18884,
376,
8391,
29908,
13,
9651,
4514,
353,
27930,
1123,
1658,
29889,
6404,
3352,
29918,
3289,
29918,
1177,
14849,
10810,
29979,
29918,
1525,
15094,
29903,
3919,
1299,
18474,
13,
9651,
9262,
29889,
4397,
29898,
1595,
12654,
1934,
29961,
1595,
12654,
1934,
29889,
1493,
1275,
376,
9053,
16862,
8391,
29897,
13,
13,
9651,
396,
2318,
599,
1776,
29922,
14518,
27138,
393,
7699,
3307,
5155,
13,
9651,
396,
491,
1009,
9451,
29918,
10041,
29918,
333,
322,
278,
1629,
310,
5221,
424,
291,
13,
9651,
9886,
353,
27138,
29961,
13,
18884,
313,
1595,
12654,
1934,
29889,
1493,
2804,
376,
9053,
1159,
669,
13,
18884,
313,
15926,
29889,
275,
4304,
29898,
1595,
12654,
1934,
29889,
8391,
876,
13,
632,
1822,
8552,
580,
13,
9651,
363,
1024,
29892,
2318,
297,
9886,
29889,
27789,
18959,
15119,
29918,
10041,
29918,
333,
742,
525,
6360,
2033,
1125,
13,
18884,
2318,
29918,
21731,
353,
3630,
2697,
9832,
1061,
3032,
2622,
29918,
14518,
29918,
276,
6338,
1230,
29898,
2972,
29897,
13,
18884,
9262,
29889,
4397,
29898,
2972,
29918,
21731,
29897,
13,
13,
4706,
4629,
353,
10518,
29889,
17685,
29898,
21731,
29897,
13,
13,
4706,
736,
313,
13,
9651,
4629,
1405,
29871,
29900,
29892,
13,
9651,
4629,
29889,
6506,
3319,
29878,
29889,
1767,
29901,
364,
29889,
978,
29889,
13609,
580,
363,
364,
297,
27930,
1123,
1658,
1800,
13,
4706,
1723,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
679,
29918,
5589,
29898,
2176,
1125,
13,
4706,
9995,
13,
4706,
3617,
19649,
310,
5155,
10423,
297,
491,
27138,
408,
349,
7086,
10488,
29889,
13,
13,
4706,
584,
3207,
4489,
29901,
349,
7086,
3630,
4308,
13,
4706,
584,
2457,
29901,
349,
7086,
10488,
13,
4706,
9995,
13,
4706,
784,
29918,
4181,
353,
731,
29898,
2176,
29889,
13099,
467,
1639,
2042,
29898,
28449,
9832,
1061,
29889,
24713,
29918,
17833,
29918,
22724,
29897,
13,
13,
4706,
736,
4489,
29889,
2798,
29898,
8990,
29922,
29896,
467,
4563,
680,
29898,
2435,
29898,
2176,
29889,
13099,
29897,
448,
7431,
29898,
1054,
29918,
4181,
876,
13,
13,
1678,
822,
1207,
29918,
24713,
29898,
1311,
29892,
848,
29892,
4629,
29918,
6360,
29879,
1125,
13,
4706,
9995,
13,
4706,
349,
3445,
598,
263,
8783,
515,
2183,
848,
363,
278,
6790,
2440,
29901,
13,
4706,
448,
1831,
263,
4559,
310,
27138,
2729,
373,
3630,
2697,
9832,
1061,
29889,
2622,
580,
13,
4706,
448,
3160,
15839,
9262,
565,
3625,
13,
4706,
448,
5768,
3651,
393,
526,
451,
3625,
297,
931,
29899,
9653,
13,
13,
4706,
584,
3207,
848,
29901,
349,
7086,
3630,
4308,
313,
1429,
287,
9451,
848,
297,
1472,
3402,
411,
722,
525,
6360,
1495,
13,
4706,
584,
3207,
4629,
29918,
6360,
29879,
29901,
1051,
29966,
524,
29958,
310,
2440,
13,
4706,
584,
2457,
29901,
8783,
313,
29925,
7086,
3630,
4308,
29897,
13,
4706,
9995,
13,
13,
4706,
396,
3013,
871,
13917,
363,
4629,
2440,
13,
4706,
4489,
353,
848,
29961,
1272,
1839,
6360,
13359,
275,
262,
29898,
8391,
29918,
6360,
29879,
29897,
1822,
8865,
1056,
29898,
8990,
29922,
29896,
29892,
920,
2433,
497,
2824,
8552,
580,
13,
13,
4706,
396,
5768,
5155,
393,
526,
451,
3734,
13,
4706,
1018,
29901,
13,
9651,
8018,
29918,
2619,
353,
1583,
3032,
657,
29918,
276,
6591,
29918,
2619,
29898,
13,
18884,
3630,
2697,
1542,
29889,
29903,
4214,
1307,
29918,
29979,
26441,
565,
7431,
29898,
8391,
29918,
6360,
29879,
29897,
1275,
29871,
29896,
13,
18884,
1683,
3630,
2697,
1542,
29889,
29925,
2190,
6670,
13,
9651,
1723,
13,
9651,
5768,
29918,
22724,
353,
731,
29898,
2176,
29889,
13099,
29897,
448,
8018,
29918,
2619,
448,
3630,
2697,
9832,
1061,
29889,
24713,
29918,
17833,
29918,
22724,
13,
9651,
4489,
353,
4489,
29889,
8865,
29898,
8865,
29918,
22724,
29892,
9685,
29922,
29896,
29897,
13,
4706,
5174,
8960,
408,
429,
29901,
13,
9651,
17927,
29889,
2704,
703,
2744,
1059,
2179,
2955,
746,
1811,
304,
5768,
28190,
5155,
29901,
1159,
13,
9651,
12020,
429,
13,
9651,
6876,
29898,
29900,
29897,
13,
13,
4706,
396,
8147,
1273,
310,
5155,
10423,
297,
13,
4706,
4489,
1839,
7827,
29918,
5589,
2033,
353,
3630,
2697,
9832,
1061,
29889,
657,
29918,
5589,
29898,
2176,
29897,
13,
4706,
17927,
29889,
3888,
703,
29912,
6177,
6571,
27138,
13700,
2861,
304,
2086,
1784,
3052,
886,
1642,
4830,
29898,
13,
9651,
9162,
11393,
7122,
4197,
710,
29898,
29891,
29897,
363,
343,
297,
4629,
29918,
6360,
29879,
11724,
13,
9651,
7431,
29898,
2176,
29889,
7827,
29918,
5589,
29961,
2176,
29889,
7827,
29918,
5589,
529,
1583,
29889,
11027,
3366,
1195,
29918,
5589,
3108,
1822,
2248,
29897,
13,
308,
876,
13,
13,
4706,
396,
1653,
376,
21731,
29908,
1897,
13,
4706,
9262,
29892,
9262,
29918,
23147,
353,
1583,
3032,
2622,
29898,
2176,
29897,
13,
4706,
4489,
1839,
20567,
293,
29918,
21731,
2033,
353,
9262,
13,
4706,
4489,
1839,
20567,
293,
29918,
21731,
29918,
9342,
2033,
353,
9262,
29918,
23147,
13,
13,
4706,
396,
1653,
376,
16211,
293,
9262,
29908,
1897,
13,
4706,
4489,
1839,
16211,
293,
29918,
21731,
2033,
353,
1583,
3032,
2622,
29918,
1609,
29918,
18434,
29898,
2176,
29897,
13,
13,
4706,
396,
1653,
19412,
9262,
1897,
313,
18434,
565,
3625,
29892,
6467,
3093,
29889,
9262,
29897,
13,
4706,
396,
14402,
29901,
9076,
13,
4706,
396,
4489,
1839,
8391,
2033,
353,
4489,
1839,
16211,
293,
29918,
21731,
13359,
5589,
1056,
29898,
2176,
1839,
20567,
293,
29918,
21731,
11287,
13,
4706,
4489,
1839,
8391,
2033,
353,
4489,
1839,
20567,
293,
29918,
21731,
2033,
13,
13,
4706,
17927,
29889,
3888,
703,
29912,
6177,
4629,
6571,
29914,
8875,
27138,
1642,
4830,
29898,
13,
9651,
9162,
11393,
7122,
4197,
710,
29898,
29891,
29897,
363,
343,
297,
4629,
29918,
6360,
29879,
11724,
13,
9651,
7431,
29898,
2176,
29889,
8391,
29961,
2176,
29889,
8391,
1405,
29871,
29900,
1822,
2248,
511,
13,
9651,
7431,
29898,
2176,
29889,
8391,
29897,
13,
308,
876,
13,
13,
4706,
396,
5768,
4876,
3211,
13,
4706,
565,
1583,
29889,
11027,
1839,
735,
2325,
29918,
10532,
284,
2033,
29901,
13,
9651,
4489,
353,
4489,
29889,
8865,
18959,
5269,
7464,
9685,
29922,
29896,
29897,
13,
13,
4706,
736,
4489,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
903,
1958,
29918,
19529,
267,
29898,
1272,
29892,
23431,
29892,
3855,
29918,
8977,
1125,
13,
4706,
9995,
13,
4706,
10088,
6048,
599,
848,
1819,
363,
5155,
393,
505,
3342,
23431,
29889,
13,
13,
4706,
319,
2322,
20545,
995,
508,
367,
731,
491,
4444,
278,
395,
4381,
29938,
7353,
29892,
13,
4706,
599,
2441,
848,
1819,
393,
508,
29915,
29873,
367,
20545,
674,
367,
20545,
13,
4706,
304,
278,
2322,
995,
29889,
13,
13,
4706,
584,
3207,
848,
29901,
9657,
29912,
6360,
29901,
17271,
29913,
310,
18994,
848,
13,
4706,
584,
3207,
23431,
29901,
13,
4706,
584,
3207,
3855,
29918,
8977,
29901,
13,
4706,
584,
2457,
29901,
13,
4706,
9995,
13,
4706,
20881,
29918,
1958,
353,
6571,
13,
13,
4706,
363,
343,
297,
848,
29889,
8149,
7295,
13,
9651,
363,
3855,
297,
3855,
29918,
8977,
29889,
8149,
7295,
13,
18884,
20881,
29918,
1958,
29961,
29939,
29918,
8977,
29961,
29939,
22322,
978,
648,
29913,
4286,
4830,
29898,
29891,
4638,
29962,
353,
3630,
2697,
9832,
1061,
3032,
657,
29918,
29939,
29918,
1958,
29898,
29939,
29892,
3855,
29918,
8977,
29892,
23431,
29897,
13,
13,
4706,
363,
343,
297,
848,
29889,
8149,
7295,
13,
9651,
363,
274,
297,
848,
29961,
29891,
1822,
13099,
29901,
13,
18884,
565,
274,
297,
20881,
29918,
1958,
29889,
8149,
7295,
13,
462,
1678,
13917,
353,
848,
29961,
29891,
3816,
29883,
29962,
13,
462,
1678,
6287,
353,
3855,
29918,
8977,
29961,
29883,
29962,
565,
274,
297,
3855,
29918,
8977,
29889,
8149,
580,
1683,
6213,
13,
462,
1678,
6287,
29918,
1958,
353,
20881,
29918,
1958,
29961,
29883,
29962,
13,
462,
1678,
2322,
29918,
1958,
353,
6571,
13,
13,
462,
1678,
396,
565,
263,
2322,
995,
338,
731,
29892,
13,
462,
1678,
396,
5191,
599,
2441,
1819,
363,
607,
694,
10417,
4864,
13,
462,
1678,
396,
411,
393,
2322,
10417,
995,
13,
462,
1678,
565,
3908,
4381,
29938,
29908,
297,
6287,
29918,
1958,
29889,
8149,
7295,
13,
462,
4706,
396,
599,
1819,
297,
278,
848,
393,
437,
451,
2615,
297,
2910,
29901,
13,
462,
4706,
443,
655,
2986,
353,
731,
29898,
26739,
800,
29889,
13092,
3101,
448,
731,
29898,
7052,
29918,
1958,
29889,
8149,
3101,
448,
11117,
742,
7442,
29889,
13707,
29892,
525,
13707,
10827,
13,
462,
4706,
2322,
29918,
1958,
353,
426,
710,
29898,
29895,
1125,
6287,
29918,
1958,
3366,
29938,
4381,
29938,
3108,
363,
413,
297,
443,
655,
2986,
29913,
13,
13,
462,
1678,
396,
5191,
1819,
411,
20545,
718,
2322,
1819,
13,
462,
1678,
848,
29961,
29891,
3816,
29883,
29962,
353,
13917,
29889,
579,
668,
29898,
710,
467,
6506,
3319,
13,
462,
4706,
3579,
7052,
29918,
1958,
29892,
13,
462,
4706,
3579,
4381,
29918,
1958,
29892,
13,
462,
4706,
3579,
29912,
13,
462,
9651,
525,
13707,
2396,
7442,
29889,
13707,
29892,
13,
462,
9651,
525,
2396,
7442,
29889,
13707,
13,
462,
4706,
500,
13,
462,
1678,
5615,
13,
13,
462,
1678,
396,
565,
6287,
338,
297,
3342,
408,
16985,
29892,
4320,
1897,
304,
16985,
13,
462,
1678,
396,
565,
274,
297,
3855,
29918,
8977,
29889,
8149,
580,
322,
3855,
29918,
8977,
29961,
29883,
22322,
4830,
2033,
1275,
525,
21574,
2396,
13,
462,
1678,
565,
6287,
338,
451,
6213,
322,
6287,
1839,
4830,
2033,
1275,
525,
21574,
2396,
13,
462,
4706,
848,
29961,
29891,
3816,
29883,
29962,
353,
10518,
29889,
517,
29918,
21574,
29898,
26739,
800,
29892,
4436,
2433,
1111,
261,
346,
1495,
13,
13,
4706,
736,
848,
13,
13,
1678,
822,
903,
5675,
29918,
15119,
29918,
2176,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
6204,
9451,
3630,
4308,
491,
5096,
292,
1629,
368,
848,
29892,
4417,
1629,
2286,
29892,
322,
2893,
9215,
13,
4706,
12407,
322,
9451,
16212,
491,
529,
6360,
29892,
4876,
29958,
2472,
29889,
13,
13,
4706,
584,
2457,
29901,
9451,
313,
29925,
7086,
3630,
4308,
511,
1353,
310,
3625,
5155,
639,
1629,
313,
8977,
29912,
6360,
29901,
1949,
1800,
13,
4706,
9995,
13,
13,
4706,
9451,
29918,
1272,
353,
5159,
13,
4706,
3625,
29918,
2619,
29918,
546,
29918,
6360,
353,
6571,
13,
13,
4706,
396,
13649,
975,
4341,
313,
2619,
29897,
13,
4706,
363,
343,
29892,
270,
297,
1583,
29889,
1272,
29889,
7076,
7295,
13,
9651,
3855,
29879,
353,
426,
29939,
29918,
3888,
1839,
978,
648,
29913,
4286,
4830,
29898,
29891,
4638,
29901,
3855,
29918,
15119,
363,
3855,
29918,
15119,
29892,
3855,
29918,
3888,
297,
1583,
29889,
29939,
29918,
8977,
29889,
7076,
28296,
13,
9651,
1476,
29918,
29939,
29879,
353,
518,
29895,
363,
413,
297,
3855,
29879,
29889,
8149,
580,
565,
413,
297,
270,
29889,
13099,
29962,
13,
9651,
451,
29918,
11940,
29918,
29939,
29879,
353,
1051,
29898,
842,
29898,
29939,
29879,
29889,
8149,
3101,
448,
731,
29898,
11940,
29918,
29939,
29879,
876,
13,
9651,
3625,
29918,
2619,
29918,
546,
29918,
6360,
29961,
29891,
29962,
353,
518,
29939,
29879,
29961,
29888,
29962,
363,
285,
297,
1476,
29918,
29939,
29879,
29962,
13,
9651,
363,
903,
297,
270,
29889,
1524,
5727,
7295,
13,
18884,
1948,
353,
903,
29961,
29896,
29962,
13,
18884,
9451,
29918,
1272,
29889,
4397,
3319,
13,
462,
1678,
3579,
10998,
6360,
2396,
343,
1118,
13,
462,
1678,
3579,
29912,
29939,
29879,
29961,
29939,
5387,
1948,
29961,
29939,
29962,
363,
3855,
297,
1476,
29918,
29939,
29879,
1118,
13,
462,
1678,
3579,
29912,
29939,
29879,
29961,
29876,
29888,
29918,
29939,
5387,
7442,
29889,
13707,
363,
302,
29888,
29918,
29939,
297,
451,
29918,
11940,
29918,
29939,
29879,
29913,
13,
18884,
5615,
13,
13,
9651,
396,
12439,
9451,
16212,
13,
9651,
9451,
29918,
2176,
353,
10518,
29889,
17271,
29898,
15119,
29918,
1272,
467,
6506,
3319,
29915,
13707,
2396,
7442,
29889,
13707,
1800,
13,
9651,
396,
260,
353,
931,
29889,
5014,
29918,
2230,
580,
13,
9651,
2893,
353,
9451,
29918,
2176,
29889,
7302,
29898,
13,
18884,
14013,
921,
29901,
1583,
29889,
1693,
1598,
29898,
29916,
1839,
5269,
7464,
921,
1839,
6360,
2033,
511,
9685,
29922,
29896,
467,
7302,
29898,
15926,
29889,
19204,
29897,
13,
9651,
396,
17927,
29889,
3888,
703,
1693,
9215,
3614,
6571,
269,
1642,
4830,
29898,
2230,
29889,
5014,
29918,
2230,
580,
448,
260,
876,
13,
13,
9651,
9451,
29918,
2176,
1839,
15119,
29918,
10041,
29918,
333,
2033,
353,
2893,
1839,
15119,
29918,
10041,
29918,
333,
2033,
13,
9651,
9451,
29918,
2176,
1839,
10532,
29918,
333,
2033,
353,
2893,
1839,
10532,
29918,
333,
2033,
13,
13,
4706,
736,
9451,
29918,
2176,
29892,
3625,
29918,
2619,
29918,
546,
29918,
6360,
13,
13,
1678,
822,
679,
29918,
14538,
1691,
29898,
1311,
29892,
2440,
29922,
8516,
1125,
13,
4706,
565,
2440,
338,
6213,
29901,
13,
9651,
2440,
353,
1583,
29889,
6360,
29879,
13,
4706,
20035,
353,
6571,
13,
4706,
565,
7431,
29898,
6360,
29879,
29897,
1275,
29871,
29896,
29901,
13,
9651,
20035,
353,
426,
13,
18884,
525,
8875,
4286,
4830,
29898,
6360,
29879,
29961,
29900,
29962,
1125,
1583,
29889,
5675,
29918,
24713,
29898,
1311,
29889,
15119,
29918,
2176,
29892,
2440,
29897,
13,
9651,
500,
13,
4706,
25342,
7431,
29898,
6360,
29879,
29897,
1405,
29871,
29896,
29901,
13,
9651,
20035,
353,
426,
13,
18884,
525,
15119,
6571,
29899,
8875,
4286,
4830,
29898,
6360,
29879,
29961,
29900,
1402,
2440,
14352,
29896,
29962,
1125,
1583,
29889,
5675,
29918,
24713,
29898,
1311,
29889,
15119,
29918,
2176,
29892,
2440,
511,
13,
18884,
3579,
10998,
8875,
4286,
4830,
29898,
29891,
1125,
1583,
29889,
5675,
29918,
24713,
29898,
1311,
29889,
15119,
29918,
2176,
29892,
518,
29891,
2314,
363,
343,
297,
2440,
29913,
13,
9651,
500,
13,
13,
4706,
736,
20035,
13,
13,
1678,
822,
304,
29918,
24633,
29898,
1311,
1125,
13,
4706,
396,
19012,
20035,
13,
4706,
17927,
29889,
3888,
703,
6572,
862,
292,
599,
20035,
856,
1159,
13,
4706,
20035,
353,
1583,
29889,
657,
29918,
14538,
1691,
580,
13,
13,
4706,
7876,
353,
1583,
29889,
11027,
1839,
2084,
29918,
4905,
13359,
4830,
29898,
1195,
29898,
1311,
29889,
6360,
29879,
511,
4236,
29898,
1311,
29889,
6360,
29879,
876,
13,
4706,
10422,
353,
22372,
3227,
1836,
20267,
29916,
4286,
4830,
29898,
9144,
29892,
931,
29889,
710,
615,
603,
11702,
29979,
29995,
29885,
29995,
29881,
19222,
29950,
29995,
29924,
29995,
29903,
5783,
13,
13,
4706,
9227,
353,
10518,
29889,
22926,
10507,
29898,
9507,
29892,
6012,
2433,
20267,
29916,
13236,
1495,
13,
13,
4706,
5235,
29918,
6360,
29879,
353,
376,
1552,
2440,
6571,
304,
6571,
1642,
4830,
29898,
13,
9651,
1375,
29898,
1311,
29889,
6360,
29879,
511,
4236,
29898,
1311,
29889,
6360,
29879,
876,
565,
7431,
29898,
1311,
29889,
6360,
29879,
29897,
1405,
29871,
29896,
1683,
376,
8875,
1642,
4830,
29898,
1311,
29889,
6360,
29879,
29961,
29900,
2314,
13,
13,
4706,
5235,
353,
518,
13,
9651,
376,
29954,
3504,
10117,
2133,
349,
3870,
613,
13,
9651,
376,
2772,
2434,
267,
5655,
686,
1028,
3870,
313,
29928,
25500,
19123,
13,
9651,
12633,
13,
9651,
376,
4013,
848,
731,
3743,
19923,
4735,
1891,
18994,
848,
515,
376,
718,
5235,
29918,
6360,
29879,
718,
11393,
613,
13,
9651,
376,
3112,
471,
2825,
6336,
373,
376,
718,
931,
29889,
710,
615,
603,
11702,
29979,
19222,
29885,
19222,
29881,
1159,
718,
11393,
613,
13,
9651,
376,
1576,
848,
3829,
338,
5439,
297,
278,
26718,
525,
20897,
29915,
322,
525,
19529,
267,
4286,
613,
13,
9651,
376,
6039,
2140,
800,
6160,
13,
4706,
4514,
13,
13,
4706,
363,
302,
29892,
1418,
297,
20035,
29889,
7076,
7295,
13,
9651,
274,
29918,
726,
353,
376,
10654,
426,
6177,
22012,
13917,
29901,
426,
1836,
14990,
29901,
6571,
1213,
29889,
4830,
29898,
13,
18884,
302,
29892,
13,
18884,
7431,
29898,
4130,
29961,
4130,
1839,
8391,
2033,
1275,
5852,
1822,
2248,
511,
13,
18884,
7431,
29898,
4130,
29889,
2248,
29897,
13,
9651,
1723,
13,
9651,
565,
11663,
29908,
297,
302,
29901,
13,
18884,
274,
29918,
726,
4619,
376,
349,
3870,
13917,
29901,
376,
13,
18884,
4629,
353,
1418,
29961,
4130,
1839,
8391,
2033,
1275,
5852,
29962,
13,
18884,
1018,
29901,
13,
462,
1678,
4629,
29918,
2972,
287,
353,
4629,
29889,
27789,
877,
15119,
29918,
10041,
29918,
333,
2824,
16170,
3319,
29915,
6360,
2396,
10518,
29889,
19204,
29889,
29876,
13092,
1800,
13,
462,
1678,
1629,
368,
353,
4629,
29918,
2972,
287,
1839,
6360,
13359,
1767,
29918,
2798,
29879,
2141,
517,
29918,
8977,
580,
13,
462,
1678,
274,
29918,
726,
4619,
11393,
11393,
7122,
29898,
3366,
8875,
1629,
29898,
29879,
1125,
6571,
1642,
4830,
29898,
29891,
29892,
274,
29897,
363,
343,
29892,
274,
297,
1629,
368,
29889,
7076,
580,
2314,
13,
18884,
5174,
7670,
2392,
29901,
13,
462,
1678,
17927,
29889,
2704,
29898,
8391,
29889,
27789,
877,
15119,
29918,
10041,
29918,
333,
8785,
13,
13,
9651,
5235,
29889,
4397,
29898,
29883,
29918,
726,
29897,
13,
13,
13,
4706,
396,
2436,
5155,
322,
23431,
13,
4706,
5155,
29918,
8865,
29918,
22724,
353,
731,
29898,
1311,
29889,
2619,
29889,
13099,
29897,
448,
426,
13,
9651,
525,
978,
742,
525,
12470,
742,
525,
1643,
742,
525,
7052,
742,
525,
4830,
29915,
13,
4706,
500,
13,
4706,
23431,
29918,
8865,
29918,
22724,
353,
731,
29898,
1311,
29889,
19529,
267,
29889,
5415,
29889,
13099,
29897,
448,
11117,
7052,
742,
525,
1767,
10827,
13,
13,
4706,
396,
9869,
525,
3888,
29915,
13,
4706,
10518,
29889,
17271,
3319,
29915,
3888,
2396,
5235,
7690,
517,
29918,
24633,
29898,
13236,
29892,
9869,
29918,
978,
2433,
3888,
1495,
13,
13,
4706,
396,
9869,
525,
20897,
29915,
13,
4706,
1583,
29889,
2619,
29889,
8865,
29898,
2619,
29918,
8865,
29918,
22724,
29892,
9685,
29922,
29896,
467,
517,
29918,
24633,
29898,
13236,
29892,
9869,
29918,
978,
2433,
20897,
1495,
13,
13,
4706,
396,
9869,
525,
19529,
267,
29915,
13,
4706,
1583,
29889,
19529,
267,
29889,
5415,
29889,
8865,
29898,
19529,
267,
29918,
8865,
29918,
22724,
29892,
9685,
29922,
29896,
467,
517,
29918,
24633,
29898,
13236,
29892,
9869,
29918,
978,
2433,
19529,
267,
1495,
13,
13,
4706,
396,
26718,
343,
8071,
29891,
13,
4706,
363,
302,
29892,
1418,
297,
20035,
29889,
7076,
7295,
13,
9651,
1418,
29889,
517,
29918,
24633,
29898,
13236,
29892,
9869,
29918,
978,
29922,
29876,
29897,
13,
13,
4706,
396,
5096,
599,
2440,
322,
1925,
963,
297,
697,
9869,
13,
4706,
2440,
29918,
4130,
353,
518,
29881,
363,
343,
29892,
270,
297,
20035,
29889,
7076,
580,
565,
343,
29889,
275,
26204,
580,
29962,
13,
13,
4706,
396,
9869,
525,
1272,
29915,
13,
4706,
10518,
29889,
17685,
29898,
6360,
29879,
29918,
4130,
29892,
2656,
29922,
8824,
467,
517,
29918,
24633,
29898,
13236,
29892,
9869,
29918,
978,
543,
1272,
1159,
13,
13,
4706,
17927,
29889,
3888,
703,
29903,
5555,
304,
10616,
856,
1159,
13,
4706,
1018,
29901,
13,
9651,
9227,
29889,
7620,
580,
13,
4706,
5174,
3497,
17413,
2392,
29901,
13,
9651,
17927,
29889,
2704,
703,
23323,
451,
4078,
304,
6571,
1642,
4830,
29898,
9507,
876,
13,
9651,
6876,
29898,
29900,
29897,
13,
13,
4706,
736,
10422,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
6055,
353,
22236,
29918,
10490,
29911,
4214,
29903,
13,
1678,
1018,
29901,
13,
4706,
411,
1722,
29898,
10145,
29918,
4986,
29918,
10490,
29911,
4214,
29903,
29897,
408,
4386,
29901,
13,
9651,
1375,
2164,
353,
6965,
1195,
29898,
8411,
29889,
949,
3101,
13,
9651,
6055,
353,
4390,
29889,
18132,
29898,
1195,
2164,
29897,
13,
4706,
17927,
29889,
3888,
703,
29147,
2888,
6055,
515,
6571,
1642,
4830,
29898,
10145,
29918,
4986,
29918,
10490,
29911,
4214,
29903,
876,
13,
1678,
5174,
8960,
408,
321,
29901,
13,
4706,
17927,
29889,
2704,
29898,
29872,
29897,
13,
4706,
17927,
29889,
3888,
703,
23323,
451,
2254,
2888,
6055,
29892,
773,
2322,
6055,
1159,
13,
13,
1678,
907,
1061,
353,
3630,
2697,
9832,
1061,
29898,
11027,
29922,
11027,
29897,
13,
1678,
10422,
353,
907,
1061,
29889,
517,
29918,
24633,
580,
13,
1678,
17927,
29889,
3888,
703,
16390,
24541,
7160,
304,
6571,
1642,
4830,
29898,
9507,
876,
2
] |
utils/phase0/minimal_ssz.py | CarlBeek/eth2.0-specs | 3 | 146044 | <reponame>CarlBeek/eth2.0-specs
from .hash_function import hash
BYTES_PER_CHUNK = 32
BYTES_PER_LENGTH_PREFIX = 4
ZERO_CHUNK = b'\x00' * BYTES_PER_CHUNK
def SSZType(fields):
class SSZObject():
def __init__(self, **kwargs):
for f in fields:
if f not in kwargs:
raise Exception("Missing constructor argument: %s" % f)
setattr(self, f, kwargs[f])
def __eq__(self, other):
return (
self.fields == other.fields and
self.serialize() == other.serialize()
)
def __hash__(self):
return int.from_bytes(self.hash_tree_root(), byteorder="little")
def __str__(self):
output = []
for field in self.fields:
output.append(f'{field}: {getattr(self, field)}')
return "\n".join(output)
def serialize(self):
return serialize_value(self, self.__class__)
def hash_tree_root(self):
return hash_tree_root(self, self.__class__)
SSZObject.fields = fields
return SSZObject
class Vector():
def __init__(self, items):
self.items = items
self.length = len(items)
def __getitem__(self, key):
return self.items[key]
def __setitem__(self, key, value):
self.items[key] = value
def __iter__(self):
return iter(self.items)
def __len__(self):
return self.length
def is_basic(typ):
return isinstance(typ, str) and (typ[:4] in ('uint', 'bool') or typ == 'byte')
def is_constant_sized(typ):
if is_basic(typ):
return True
elif isinstance(typ, list) and len(typ) == 1:
return is_constant_sized(typ[0])
elif isinstance(typ, list) and len(typ) == 2:
return False
elif isinstance(typ, str) and typ[:5] == 'bytes':
return len(typ) > 5
elif hasattr(typ, 'fields'):
for subtype in typ.fields.values():
if not is_constant_sized(subtype):
return False
return True
else:
raise Exception("Type not recognized")
def coerce_to_bytes(x):
if isinstance(x, str):
o = x.encode('utf-8')
assert len(o) == len(x)
return o
elif isinstance(x, bytes):
return x
else:
raise Exception("Expecting bytes")
def serialize_value(value, typ=None):
if typ is None:
typ = infer_type(value)
if isinstance(typ, str) and typ[:4] == 'uint':
length = int(typ[4:])
assert length in (8, 16, 32, 64, 128, 256)
return value.to_bytes(length // 8, 'little')
elif typ == 'bool':
assert value in (True, False)
return b'\x01' if value is True else b'\x00'
elif (isinstance(typ, list) and len(typ) == 1) or typ == 'bytes':
serialized_bytes = coerce_to_bytes(value) if typ == 'bytes' else b''.join([serialize_value(element, typ[0]) for element in value])
assert len(serialized_bytes) < 2**(8 * BYTES_PER_LENGTH_PREFIX)
serialized_length = len(serialized_bytes).to_bytes(BYTES_PER_LENGTH_PREFIX, 'little')
return serialized_length + serialized_bytes
elif isinstance(typ, list) and len(typ) == 2:
assert len(value) == typ[1]
return b''.join([serialize_value(element, typ[0]) for element in value])
elif isinstance(typ, str) and len(typ) > 5 and typ[:5] == 'bytes':
assert len(value) == int(typ[5:]), (value, int(typ[5:]))
return coerce_to_bytes(value)
elif hasattr(typ, 'fields'):
serialized_bytes = b''.join([serialize_value(getattr(value, field), subtype) for field, subtype in typ.fields.items()])
if is_constant_sized(typ):
return serialized_bytes
else:
assert len(serialized_bytes) < 2**(8 * BYTES_PER_LENGTH_PREFIX)
serialized_length = len(serialized_bytes).to_bytes(BYTES_PER_LENGTH_PREFIX, 'little')
return serialized_length + serialized_bytes
else:
print(value, typ)
raise Exception("Type not recognized")
def chunkify(bytez):
bytez += b'\x00' * (-len(bytez) % BYTES_PER_CHUNK)
return [bytez[i:i + 32] for i in range(0, len(bytez), 32)]
def pack(values, subtype):
return chunkify(b''.join([serialize_value(value, subtype) for value in values]))
def is_power_of_two(x):
return x > 0 and x & (x - 1) == 0
def merkleize(chunks):
tree = chunks[::]
while not is_power_of_two(len(tree)):
tree.append(ZERO_CHUNK)
tree = [ZERO_CHUNK] * len(tree) + tree
for i in range(len(tree) // 2 - 1, 0, -1):
tree[i] = hash(tree[i * 2] + tree[i * 2 + 1])
return tree[1]
def mix_in_length(root, length):
return hash(root + length.to_bytes(32, 'little'))
def infer_type(value):
if hasattr(value.__class__, 'fields'):
return value.__class__
elif isinstance(value, Vector):
return [infer_type(value[0]) if len(value) > 0 else 'uint64', len(value)]
elif isinstance(value, list):
return [infer_type(value[0])] if len(value) > 0 else ['uint64']
elif isinstance(value, (bytes, str)):
return 'bytes'
elif isinstance(value, int):
return 'uint64'
else:
raise Exception("Failed to infer type")
def hash_tree_root(value, typ=None):
if typ is None:
typ = infer_type(value)
if is_basic(typ):
return merkleize(pack([value], typ))
elif isinstance(typ, list) and len(typ) == 1 and is_basic(typ[0]):
return mix_in_length(merkleize(pack(value, typ[0])), len(value))
elif isinstance(typ, list) and len(typ) == 1 and not is_basic(typ[0]):
return mix_in_length(merkleize([hash_tree_root(element, typ[0]) for element in value]), len(value))
elif isinstance(typ, list) and len(typ) == 2 and is_basic(typ[0]):
assert len(value) == typ[1]
return merkleize(pack(value, typ[0]))
elif typ == 'bytes':
return mix_in_length(merkleize(chunkify(coerce_to_bytes(value))), len(value))
elif isinstance(typ, str) and typ[:5] == 'bytes' and len(typ) > 5:
assert len(value) == int(typ[5:])
return merkleize(chunkify(coerce_to_bytes(value)))
elif isinstance(typ, list) and len(typ) == 2 and not is_basic(typ[0]):
return merkleize([hash_tree_root(element, typ[0]) for element in value])
elif hasattr(typ, 'fields'):
return merkleize([hash_tree_root(getattr(value, field), subtype) for field, subtype in typ.fields.items()])
else:
raise Exception("Type not recognized")
def truncate(container):
field_keys = list(container.fields.keys())
truncated_fields = {
key: container.fields[key]
for key in field_keys[:-1]
}
truncated_class = SSZType(truncated_fields)
kwargs = {
field: getattr(container, field)
for field in field_keys[:-1]
}
return truncated_class(**kwargs)
def signed_root(container):
return hash_tree_root(truncate(container))
def serialize(ssz_object):
return getattr(ssz_object, 'serialize')()
| [
1,
529,
276,
1112,
420,
29958,
8179,
29880,
3629,
1416,
29914,
621,
29906,
29889,
29900,
29899,
5965,
2395,
13,
3166,
869,
8568,
29918,
2220,
1053,
6608,
13,
13,
13,
22716,
29911,
2890,
29918,
13171,
29918,
3210,
3904,
29968,
353,
29871,
29941,
29906,
13,
22716,
29911,
2890,
29918,
13171,
29918,
19433,
29918,
15094,
25634,
353,
29871,
29946,
13,
29999,
1001,
29949,
29918,
3210,
3904,
29968,
353,
289,
12764,
29916,
29900,
29900,
29915,
334,
6770,
29911,
2890,
29918,
13171,
29918,
3210,
3904,
29968,
13,
13,
13,
1753,
5886,
29999,
1542,
29898,
9621,
1125,
13,
1678,
770,
5886,
29999,
2061,
7295,
13,
4706,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
9651,
363,
285,
297,
4235,
29901,
13,
18884,
565,
285,
451,
297,
9049,
5085,
29901,
13,
462,
1678,
12020,
8960,
703,
18552,
292,
5823,
2980,
29901,
1273,
29879,
29908,
1273,
285,
29897,
13,
18884,
731,
5552,
29898,
1311,
29892,
285,
29892,
9049,
5085,
29961,
29888,
2314,
13,
13,
4706,
822,
4770,
1837,
12035,
1311,
29892,
916,
1125,
13,
9651,
736,
313,
13,
18884,
1583,
29889,
9621,
1275,
916,
29889,
9621,
322,
13,
18884,
1583,
29889,
643,
6646,
580,
1275,
916,
29889,
643,
6646,
580,
13,
9651,
1723,
13,
13,
4706,
822,
4770,
8568,
12035,
1311,
1125,
13,
9651,
736,
938,
29889,
3166,
29918,
13193,
29898,
1311,
29889,
8568,
29918,
8336,
29918,
4632,
3285,
7023,
2098,
543,
29880,
1992,
1159,
13,
13,
4706,
822,
4770,
710,
12035,
1311,
1125,
13,
9651,
1962,
353,
5159,
13,
9651,
363,
1746,
297,
1583,
29889,
9621,
29901,
13,
18884,
1962,
29889,
4397,
29898,
29888,
29915,
29912,
2671,
6177,
426,
657,
5552,
29898,
1311,
29892,
1746,
2915,
1495,
13,
9651,
736,
6634,
29876,
1642,
7122,
29898,
4905,
29897,
13,
13,
4706,
822,
28755,
29898,
1311,
1125,
13,
9651,
736,
28755,
29918,
1767,
29898,
1311,
29892,
1583,
17255,
1990,
1649,
29897,
13,
13,
4706,
822,
6608,
29918,
8336,
29918,
4632,
29898,
1311,
1125,
13,
9651,
736,
6608,
29918,
8336,
29918,
4632,
29898,
1311,
29892,
1583,
17255,
1990,
1649,
29897,
13,
13,
1678,
5886,
29999,
2061,
29889,
9621,
353,
4235,
13,
1678,
736,
5886,
29999,
2061,
13,
13,
13,
1990,
16510,
7295,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4452,
1125,
13,
4706,
1583,
29889,
7076,
353,
4452,
13,
4706,
1583,
29889,
2848,
353,
7431,
29898,
7076,
29897,
13,
13,
1678,
822,
4770,
657,
667,
12035,
1311,
29892,
1820,
1125,
13,
4706,
736,
1583,
29889,
7076,
29961,
1989,
29962,
13,
13,
1678,
822,
4770,
842,
667,
12035,
1311,
29892,
1820,
29892,
995,
1125,
13,
4706,
1583,
29889,
7076,
29961,
1989,
29962,
353,
995,
13,
13,
1678,
822,
4770,
1524,
12035,
1311,
1125,
13,
4706,
736,
4256,
29898,
1311,
29889,
7076,
29897,
13,
13,
1678,
822,
4770,
2435,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
2848,
13,
13,
13,
1753,
338,
29918,
16121,
29898,
22449,
1125,
13,
1678,
736,
338,
8758,
29898,
22449,
29892,
851,
29897,
322,
313,
22449,
7503,
29946,
29962,
297,
6702,
13470,
742,
525,
11227,
1495,
470,
2393,
1275,
525,
10389,
1495,
13,
13,
13,
1753,
338,
29918,
23362,
29918,
29879,
1891,
29898,
22449,
1125,
13,
1678,
565,
338,
29918,
16121,
29898,
22449,
1125,
13,
4706,
736,
5852,
13,
1678,
25342,
338,
8758,
29898,
22449,
29892,
1051,
29897,
322,
7431,
29898,
22449,
29897,
1275,
29871,
29896,
29901,
13,
4706,
736,
338,
29918,
23362,
29918,
29879,
1891,
29898,
22449,
29961,
29900,
2314,
13,
1678,
25342,
338,
8758,
29898,
22449,
29892,
1051,
29897,
322,
7431,
29898,
22449,
29897,
1275,
29871,
29906,
29901,
13,
4706,
736,
7700,
13,
1678,
25342,
338,
8758,
29898,
22449,
29892,
851,
29897,
322,
2393,
7503,
29945,
29962,
1275,
525,
13193,
2396,
13,
4706,
736,
7431,
29898,
22449,
29897,
1405,
29871,
29945,
13,
1678,
25342,
756,
5552,
29898,
22449,
29892,
525,
9621,
29374,
13,
4706,
363,
1014,
1853,
297,
2393,
29889,
9621,
29889,
5975,
7295,
13,
9651,
565,
451,
338,
29918,
23362,
29918,
29879,
1891,
29898,
1491,
1853,
1125,
13,
18884,
736,
7700,
13,
4706,
736,
5852,
13,
1678,
1683,
29901,
13,
4706,
12020,
8960,
703,
1542,
451,
14831,
1159,
13,
13,
13,
1753,
1302,
261,
346,
29918,
517,
29918,
13193,
29898,
29916,
1125,
13,
1678,
565,
338,
8758,
29898,
29916,
29892,
851,
1125,
13,
4706,
288,
353,
921,
29889,
12508,
877,
9420,
29899,
29947,
1495,
13,
4706,
4974,
7431,
29898,
29877,
29897,
1275,
7431,
29898,
29916,
29897,
13,
4706,
736,
288,
13,
1678,
25342,
338,
8758,
29898,
29916,
29892,
6262,
1125,
13,
4706,
736,
921,
13,
1678,
1683,
29901,
13,
4706,
12020,
8960,
703,
1252,
1103,
292,
6262,
1159,
13,
13,
13,
1753,
28755,
29918,
1767,
29898,
1767,
29892,
2393,
29922,
8516,
1125,
13,
1678,
565,
2393,
338,
6213,
29901,
13,
4706,
2393,
353,
10115,
29918,
1853,
29898,
1767,
29897,
13,
1678,
565,
338,
8758,
29898,
22449,
29892,
851,
29897,
322,
2393,
7503,
29946,
29962,
1275,
525,
13470,
2396,
13,
4706,
3309,
353,
938,
29898,
22449,
29961,
29946,
29901,
2314,
13,
4706,
4974,
3309,
297,
313,
29947,
29892,
29871,
29896,
29953,
29892,
29871,
29941,
29906,
29892,
29871,
29953,
29946,
29892,
29871,
29896,
29906,
29947,
29892,
29871,
29906,
29945,
29953,
29897,
13,
4706,
736,
995,
29889,
517,
29918,
13193,
29898,
2848,
849,
29871,
29947,
29892,
525,
29880,
1992,
1495,
13,
1678,
25342,
2393,
1275,
525,
11227,
2396,
13,
4706,
4974,
995,
297,
313,
5574,
29892,
7700,
29897,
13,
4706,
736,
289,
12764,
29916,
29900,
29896,
29915,
565,
995,
338,
5852,
1683,
289,
12764,
29916,
29900,
29900,
29915,
13,
1678,
25342,
313,
275,
8758,
29898,
22449,
29892,
1051,
29897,
322,
7431,
29898,
22449,
29897,
1275,
29871,
29896,
29897,
470,
2393,
1275,
525,
13193,
2396,
13,
4706,
7797,
1891,
29918,
13193,
353,
1302,
261,
346,
29918,
517,
29918,
13193,
29898,
1767,
29897,
565,
2393,
1275,
525,
13193,
29915,
1683,
289,
29915,
4286,
7122,
4197,
643,
6646,
29918,
1767,
29898,
5029,
29892,
2393,
29961,
29900,
2314,
363,
1543,
297,
995,
2314,
13,
4706,
4974,
7431,
29898,
15550,
1891,
29918,
13193,
29897,
529,
29871,
29906,
1068,
29898,
29947,
334,
6770,
29911,
2890,
29918,
13171,
29918,
19433,
29918,
15094,
25634,
29897,
13,
4706,
7797,
1891,
29918,
2848,
353,
7431,
29898,
15550,
1891,
29918,
13193,
467,
517,
29918,
13193,
29898,
22716,
29911,
2890,
29918,
13171,
29918,
19433,
29918,
15094,
25634,
29892,
525,
29880,
1992,
1495,
13,
4706,
736,
7797,
1891,
29918,
2848,
718,
7797,
1891,
29918,
13193,
13,
1678,
25342,
338,
8758,
29898,
22449,
29892,
1051,
29897,
322,
7431,
29898,
22449,
29897,
1275,
29871,
29906,
29901,
13,
4706,
4974,
7431,
29898,
1767,
29897,
1275,
2393,
29961,
29896,
29962,
13,
4706,
736,
289,
29915,
4286,
7122,
4197,
643,
6646,
29918,
1767,
29898,
5029,
29892,
2393,
29961,
29900,
2314,
363,
1543,
297,
995,
2314,
13,
1678,
25342,
338,
8758,
29898,
22449,
29892,
851,
29897,
322,
7431,
29898,
22449,
29897,
1405,
29871,
29945,
322,
2393,
7503,
29945,
29962,
1275,
525,
13193,
2396,
13,
4706,
4974,
7431,
29898,
1767,
29897,
1275,
938,
29898,
22449,
29961,
29945,
29901,
11724,
313,
1767,
29892,
938,
29898,
22449,
29961,
29945,
29901,
12622,
13,
4706,
736,
1302,
261,
346,
29918,
517,
29918,
13193,
29898,
1767,
29897,
13,
1678,
25342,
756,
5552,
29898,
22449,
29892,
525,
9621,
29374,
13,
4706,
7797,
1891,
29918,
13193,
353,
289,
29915,
4286,
7122,
4197,
643,
6646,
29918,
1767,
29898,
657,
5552,
29898,
1767,
29892,
1746,
511,
1014,
1853,
29897,
363,
1746,
29892,
1014,
1853,
297,
2393,
29889,
9621,
29889,
7076,
580,
2314,
13,
4706,
565,
338,
29918,
23362,
29918,
29879,
1891,
29898,
22449,
1125,
13,
9651,
736,
7797,
1891,
29918,
13193,
13,
4706,
1683,
29901,
13,
9651,
4974,
7431,
29898,
15550,
1891,
29918,
13193,
29897,
529,
29871,
29906,
1068,
29898,
29947,
334,
6770,
29911,
2890,
29918,
13171,
29918,
19433,
29918,
15094,
25634,
29897,
13,
9651,
7797,
1891,
29918,
2848,
353,
7431,
29898,
15550,
1891,
29918,
13193,
467,
517,
29918,
13193,
29898,
22716,
29911,
2890,
29918,
13171,
29918,
19433,
29918,
15094,
25634,
29892,
525,
29880,
1992,
1495,
13,
9651,
736,
7797,
1891,
29918,
2848,
718,
7797,
1891,
29918,
13193,
13,
1678,
1683,
29901,
13,
4706,
1596,
29898,
1767,
29892,
2393,
29897,
13,
4706,
12020,
8960,
703,
1542,
451,
14831,
1159,
13,
13,
13,
1753,
19875,
1598,
29898,
10389,
29920,
1125,
13,
1678,
7023,
29920,
4619,
289,
12764,
29916,
29900,
29900,
29915,
334,
8521,
2435,
29898,
10389,
29920,
29897,
1273,
6770,
29911,
2890,
29918,
13171,
29918,
3210,
3904,
29968,
29897,
13,
1678,
736,
518,
10389,
29920,
29961,
29875,
29901,
29875,
718,
29871,
29941,
29906,
29962,
363,
474,
297,
3464,
29898,
29900,
29892,
7431,
29898,
10389,
29920,
511,
29871,
29941,
29906,
4638,
13,
13,
13,
1753,
4870,
29898,
5975,
29892,
1014,
1853,
1125,
13,
1678,
736,
19875,
1598,
29898,
29890,
29915,
4286,
7122,
4197,
643,
6646,
29918,
1767,
29898,
1767,
29892,
1014,
1853,
29897,
363,
995,
297,
1819,
12622,
13,
13,
13,
1753,
338,
29918,
13519,
29918,
974,
29918,
10184,
29898,
29916,
1125,
13,
1678,
736,
921,
1405,
29871,
29900,
322,
921,
669,
313,
29916,
448,
29871,
29896,
29897,
1275,
29871,
29900,
13,
13,
13,
1753,
2778,
29895,
280,
675,
29898,
305,
18801,
1125,
13,
1678,
5447,
353,
521,
18801,
29961,
1057,
29962,
13,
1678,
1550,
451,
338,
29918,
13519,
29918,
974,
29918,
10184,
29898,
2435,
29898,
8336,
22164,
13,
4706,
5447,
29889,
4397,
29898,
29999,
1001,
29949,
29918,
3210,
3904,
29968,
29897,
13,
1678,
5447,
353,
518,
29999,
1001,
29949,
29918,
3210,
3904,
29968,
29962,
334,
7431,
29898,
8336,
29897,
718,
5447,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
8336,
29897,
849,
29871,
29906,
448,
29871,
29896,
29892,
29871,
29900,
29892,
448,
29896,
1125,
13,
4706,
5447,
29961,
29875,
29962,
353,
6608,
29898,
8336,
29961,
29875,
334,
29871,
29906,
29962,
718,
5447,
29961,
29875,
334,
29871,
29906,
718,
29871,
29896,
2314,
13,
1678,
736,
5447,
29961,
29896,
29962,
13,
13,
13,
1753,
6837,
29918,
262,
29918,
2848,
29898,
4632,
29892,
3309,
1125,
13,
1678,
736,
6608,
29898,
4632,
718,
3309,
29889,
517,
29918,
13193,
29898,
29941,
29906,
29892,
525,
29880,
1992,
8785,
13,
13,
13,
1753,
10115,
29918,
1853,
29898,
1767,
1125,
13,
1678,
565,
756,
5552,
29898,
1767,
17255,
1990,
1649,
29892,
525,
9621,
29374,
13,
4706,
736,
995,
17255,
1990,
1649,
13,
1678,
25342,
338,
8758,
29898,
1767,
29892,
16510,
1125,
13,
4706,
736,
518,
262,
571,
29918,
1853,
29898,
1767,
29961,
29900,
2314,
565,
7431,
29898,
1767,
29897,
1405,
29871,
29900,
1683,
525,
13470,
29953,
29946,
742,
7431,
29898,
1767,
4638,
13,
1678,
25342,
338,
8758,
29898,
1767,
29892,
1051,
1125,
13,
4706,
736,
518,
262,
571,
29918,
1853,
29898,
1767,
29961,
29900,
2314,
29962,
565,
7431,
29898,
1767,
29897,
1405,
29871,
29900,
1683,
6024,
13470,
29953,
29946,
2033,
13,
1678,
25342,
338,
8758,
29898,
1767,
29892,
313,
13193,
29892,
851,
22164,
13,
4706,
736,
525,
13193,
29915,
13,
1678,
25342,
338,
8758,
29898,
1767,
29892,
938,
1125,
13,
4706,
736,
525,
13470,
29953,
29946,
29915,
13,
1678,
1683,
29901,
13,
4706,
12020,
8960,
703,
17776,
304,
10115,
1134,
1159,
13,
13,
13,
1753,
6608,
29918,
8336,
29918,
4632,
29898,
1767,
29892,
2393,
29922,
8516,
1125,
13,
1678,
565,
2393,
338,
6213,
29901,
13,
4706,
2393,
353,
10115,
29918,
1853,
29898,
1767,
29897,
13,
1678,
565,
338,
29918,
16121,
29898,
22449,
1125,
13,
4706,
736,
2778,
29895,
280,
675,
29898,
4058,
4197,
1767,
1402,
2393,
876,
13,
1678,
25342,
338,
8758,
29898,
22449,
29892,
1051,
29897,
322,
7431,
29898,
22449,
29897,
1275,
29871,
29896,
322,
338,
29918,
16121,
29898,
22449,
29961,
29900,
29962,
1125,
13,
4706,
736,
6837,
29918,
262,
29918,
2848,
29898,
28150,
280,
675,
29898,
4058,
29898,
1767,
29892,
2393,
29961,
29900,
2314,
511,
7431,
29898,
1767,
876,
13,
1678,
25342,
338,
8758,
29898,
22449,
29892,
1051,
29897,
322,
7431,
29898,
22449,
29897,
1275,
29871,
29896,
322,
451,
338,
29918,
16121,
29898,
22449,
29961,
29900,
29962,
1125,
13,
4706,
736,
6837,
29918,
262,
29918,
2848,
29898,
28150,
280,
675,
4197,
8568,
29918,
8336,
29918,
4632,
29898,
5029,
29892,
2393,
29961,
29900,
2314,
363,
1543,
297,
995,
11724,
7431,
29898,
1767,
876,
13,
1678,
25342,
338,
8758,
29898,
22449,
29892,
1051,
29897,
322,
7431,
29898,
22449,
29897,
1275,
29871,
29906,
322,
338,
29918,
16121,
29898,
22449,
29961,
29900,
29962,
1125,
13,
4706,
4974,
7431,
29898,
1767,
29897,
1275,
2393,
29961,
29896,
29962,
13,
4706,
736,
2778,
29895,
280,
675,
29898,
4058,
29898,
1767,
29892,
2393,
29961,
29900,
12622,
13,
1678,
25342,
2393,
1275,
525,
13193,
2396,
13,
4706,
736,
6837,
29918,
262,
29918,
2848,
29898,
28150,
280,
675,
29898,
29812,
1598,
29898,
1111,
261,
346,
29918,
517,
29918,
13193,
29898,
1767,
876,
511,
7431,
29898,
1767,
876,
13,
1678,
25342,
338,
8758,
29898,
22449,
29892,
851,
29897,
322,
2393,
7503,
29945,
29962,
1275,
525,
13193,
29915,
322,
7431,
29898,
22449,
29897,
1405,
29871,
29945,
29901,
13,
4706,
4974,
7431,
29898,
1767,
29897,
1275,
938,
29898,
22449,
29961,
29945,
29901,
2314,
13,
4706,
736,
2778,
29895,
280,
675,
29898,
29812,
1598,
29898,
1111,
261,
346,
29918,
517,
29918,
13193,
29898,
1767,
4961,
13,
1678,
25342,
338,
8758,
29898,
22449,
29892,
1051,
29897,
322,
7431,
29898,
22449,
29897,
1275,
29871,
29906,
322,
451,
338,
29918,
16121,
29898,
22449,
29961,
29900,
29962,
1125,
13,
4706,
736,
2778,
29895,
280,
675,
4197,
8568,
29918,
8336,
29918,
4632,
29898,
5029,
29892,
2393,
29961,
29900,
2314,
363,
1543,
297,
995,
2314,
13,
1678,
25342,
756,
5552,
29898,
22449,
29892,
525,
9621,
29374,
13,
4706,
736,
2778,
29895,
280,
675,
4197,
8568,
29918,
8336,
29918,
4632,
29898,
657,
5552,
29898,
1767,
29892,
1746,
511,
1014,
1853,
29897,
363,
1746,
29892,
1014,
1853,
297,
2393,
29889,
9621,
29889,
7076,
580,
2314,
13,
1678,
1683,
29901,
13,
4706,
12020,
8960,
703,
1542,
451,
14831,
1159,
13,
13,
13,
1753,
21022,
403,
29898,
7611,
1125,
13,
1678,
1746,
29918,
8149,
353,
1051,
29898,
7611,
29889,
9621,
29889,
8149,
3101,
13,
1678,
21022,
630,
29918,
9621,
353,
426,
13,
4706,
1820,
29901,
5639,
29889,
9621,
29961,
1989,
29962,
13,
4706,
363,
1820,
297,
1746,
29918,
8149,
7503,
29899,
29896,
29962,
13,
1678,
500,
13,
1678,
21022,
630,
29918,
1990,
353,
5886,
29999,
1542,
29898,
509,
4661,
630,
29918,
9621,
29897,
13,
1678,
9049,
5085,
353,
426,
13,
4706,
1746,
29901,
679,
5552,
29898,
7611,
29892,
1746,
29897,
13,
4706,
363,
1746,
297,
1746,
29918,
8149,
7503,
29899,
29896,
29962,
13,
1678,
500,
13,
1678,
736,
21022,
630,
29918,
1990,
29898,
1068,
19290,
29897,
13,
13,
13,
1753,
8794,
29918,
4632,
29898,
7611,
1125,
13,
1678,
736,
6608,
29918,
8336,
29918,
4632,
29898,
509,
4661,
403,
29898,
7611,
876,
13,
13,
13,
1753,
28755,
29898,
893,
29920,
29918,
3318,
1125,
13,
1678,
736,
679,
5552,
29898,
893,
29920,
29918,
3318,
29892,
525,
643,
6646,
1495,
580,
13,
2
] |
data/app.d/crypto.py | hythloda/easy-crypto | 0 | 1616235 | from pycoingecko import CoinGeckoAPI
from deephaven.DBTimeUtils import secondsToTime, millisToTime
from deephaven.TableTools import merge
from deephaven import DynamicTableWriter
import deephaven.Types as dht
import jpy
from time import sleep, time
import pandas as pd
import threading
# secondsToSleep should be 10 or higher. If too fast, will hit request limit.
secondsToSleep = 60
# if getHistory = true, the days to pull
daysHistory = 90
# coins to get data
ids = ['bitcoin', 'ethereum', 'litecoin', 'dogecoin', 'tether', 'binancecoin', 'cardano', 'ripple', 'polkadot']
getLive = True
getHistory = True
# below this line there are no variables that need changed
########################################################################
def get_coingecko_table_historical(daysHistory = 90):
tableArray = []
cg = CoinGeckoAPI()
# get historical data
for id in ids:
coin_data_hist = cg.get_coin_market_chart_by_id(id, vs_currency = "usd", days = daysHistory)
sub = pd.DataFrame(coin_data_hist)
coin_query = "Coin = `{id}`".format(id=id)
tableArray.append(dataFrameToTable(sub).view("DateTime = millisToTime((long)prices_[i][0])", coin_query, "Price = prices_[i][1]", "MarketCap = market_caps_[i][1]", "TotalVolume = total_volumes_[i][1]").moveUpColumns("DateTime", "Coin"))
return merge(tableArray).selectDistinct("DateTime", "Coin", "Price", "MarketCap", "TotalVolume").sortDescending("DateTime", "Coin")
def get_coingecko_table_live(secondsToSleep = 60):
cg = CoinGeckoAPI()
# array to store tables for current and previous data
tableArray=[]
tableWriter = DynamicTableWriter(['Coin', 'DateTime', 'Price', 'MarketCap', 'TotalVolume'], [dht.string, dht.datetime, dht.double, dht.double, dht.double])
tableArray.append(tableWriter.getTable())
result = merge(tableArray).selectDistinct('DateTime', 'Coin', 'Price', 'MarketCap', 'TotalVolume').sortDescending('DateTime', 'Coin')
def thread_func():
cg.get_coins_markets(vs_currency = 'usd')
while True:
coin_data = cg.get_price(ids, vs_currencies = 'usd', include_market_cap = True, include_24hr_vol = True, include_24hr_change = False, include_last_updated_at = True)
for id in ids:
#Add new data to the dynamic table
tableWriter.logRow( id, secondsToTime(int(coin_data[id]['last_updated_at'])), float(coin_data[id]['usd']), coin_data[id]['usd_market_cap'], coin_data[id]['usd_24h_vol'])
sleep(secondsToSleep)
thread = threading.Thread(target = thread_func)
thread.start()
return result
if getHistory:
HistoricalCryptoTable = get_coingecko_table_historical(daysHistory)
if getLive:
LiveCryptoTable = get_coingecko_table_live(secondsToSleep)
| [
1,
515,
11451,
1111,
19144,
27604,
1053,
3189,
262,
7999,
27604,
8787,
13,
13,
3166,
316,
29872,
561,
3496,
29889,
4051,
2481,
12177,
1053,
6923,
1762,
2481,
29892,
3533,
275,
1762,
2481,
13,
3166,
316,
29872,
561,
3496,
29889,
3562,
24183,
1053,
10366,
13,
3166,
316,
29872,
561,
3496,
1053,
27747,
3562,
10507,
13,
13,
5215,
316,
29872,
561,
3496,
29889,
10562,
408,
270,
400,
13,
5215,
432,
2272,
13,
13,
3166,
931,
1053,
8709,
29892,
931,
13,
5215,
11701,
408,
10518,
13,
5215,
3244,
292,
13,
13,
29937,
6923,
1762,
29903,
5436,
881,
367,
29871,
29896,
29900,
470,
6133,
29889,
960,
2086,
5172,
29892,
674,
7124,
2009,
4046,
29889,
13,
23128,
1762,
29903,
5436,
353,
29871,
29953,
29900,
13,
13,
29937,
565,
679,
20570,
353,
1565,
29892,
278,
3841,
304,
8206,
13,
16700,
20570,
353,
29871,
29929,
29900,
13,
13,
29937,
1302,
1144,
304,
679,
848,
13,
4841,
353,
6024,
2966,
1111,
262,
742,
525,
621,
406,
398,
742,
525,
29880,
568,
1111,
262,
742,
525,
26169,
687,
28230,
742,
525,
29873,
1979,
742,
525,
2109,
749,
1111,
262,
742,
525,
7543,
1562,
742,
525,
374,
407,
280,
742,
525,
3733,
29895,
328,
327,
2033,
13,
13,
657,
23859,
353,
5852,
13,
13,
657,
20570,
353,
5852,
13,
13,
29937,
2400,
445,
1196,
727,
526,
694,
3651,
393,
817,
3939,
13,
13383,
13383,
13383,
13383,
7346,
13,
13,
1753,
679,
29918,
1111,
19144,
27604,
29918,
2371,
29918,
16211,
936,
29898,
16700,
20570,
353,
29871,
29929,
29900,
1125,
13,
1678,
1591,
2588,
353,
5159,
13,
1678,
274,
29887,
353,
3189,
262,
7999,
27604,
8787,
580,
13,
13,
1678,
396,
679,
15839,
848,
13,
1678,
363,
1178,
297,
18999,
29901,
13,
4706,
19480,
29918,
1272,
29918,
29882,
391,
353,
274,
29887,
29889,
657,
29918,
1111,
262,
29918,
28549,
29918,
15425,
29918,
1609,
29918,
333,
29898,
333,
29892,
7186,
29918,
26095,
353,
376,
375,
29881,
613,
3841,
353,
3841,
20570,
29897,
13,
4706,
1014,
353,
10518,
29889,
17271,
29898,
1111,
262,
29918,
1272,
29918,
29882,
391,
29897,
13,
4706,
19480,
29918,
1972,
353,
376,
7967,
262,
353,
23230,
333,
10114,
1642,
4830,
29898,
333,
29922,
333,
29897,
13,
4706,
1591,
2588,
29889,
4397,
29898,
1272,
4308,
1762,
3562,
29898,
1491,
467,
1493,
703,
11384,
353,
3533,
275,
1762,
2481,
3552,
5426,
29897,
558,
1575,
29918,
29961,
29875,
3816,
29900,
2314,
613,
19480,
29918,
1972,
29892,
376,
13026,
353,
26094,
29918,
29961,
29875,
3816,
29896,
29962,
613,
376,
9802,
300,
12415,
353,
9999,
29918,
29883,
2547,
29918,
29961,
29875,
3816,
29896,
29962,
613,
376,
11536,
24679,
353,
3001,
29918,
1555,
9351,
29918,
29961,
29875,
3816,
29896,
29962,
2564,
11631,
3373,
14289,
703,
11384,
613,
376,
7967,
262,
5783,
13,
1678,
736,
10366,
29898,
2371,
2588,
467,
2622,
13398,
5562,
703,
11384,
613,
376,
7967,
262,
613,
376,
13026,
613,
376,
9802,
300,
12415,
613,
376,
11536,
24679,
2564,
6605,
19617,
2548,
703,
11384,
613,
376,
7967,
262,
1159,
13,
13,
13,
1753,
679,
29918,
1111,
19144,
27604,
29918,
2371,
29918,
9258,
29898,
23128,
1762,
29903,
5436,
353,
29871,
29953,
29900,
1125,
13,
1678,
274,
29887,
353,
3189,
262,
7999,
27604,
8787,
580,
13,
13,
1678,
396,
1409,
304,
3787,
6131,
363,
1857,
322,
3517,
848,
13,
1678,
1591,
2588,
29922,
2636,
13,
13,
1678,
1591,
10507,
353,
27747,
3562,
10507,
18959,
7967,
262,
742,
525,
11384,
742,
525,
13026,
742,
525,
9802,
300,
12415,
742,
525,
11536,
24679,
7464,
518,
29881,
400,
29889,
1807,
29892,
270,
400,
29889,
12673,
29892,
270,
400,
29889,
8896,
29892,
270,
400,
29889,
8896,
29892,
270,
400,
29889,
8896,
2314,
13,
13,
1678,
1591,
2588,
29889,
4397,
29898,
2371,
10507,
29889,
657,
3562,
3101,
13,
1678,
1121,
353,
10366,
29898,
2371,
2588,
467,
2622,
13398,
5562,
877,
11384,
742,
525,
7967,
262,
742,
525,
13026,
742,
525,
9802,
300,
12415,
742,
525,
11536,
24679,
2824,
6605,
19617,
2548,
877,
11384,
742,
525,
7967,
262,
1495,
13,
13,
1678,
822,
3244,
29918,
9891,
7295,
13,
4706,
274,
29887,
29889,
657,
29918,
1111,
1144,
29918,
3502,
1691,
29898,
4270,
29918,
26095,
353,
525,
375,
29881,
1495,
13,
13,
4706,
1550,
5852,
29901,
13,
9651,
19480,
29918,
1272,
353,
274,
29887,
29889,
657,
29918,
9175,
29898,
4841,
29892,
7186,
29918,
21962,
15942,
353,
525,
375,
29881,
742,
3160,
29918,
28549,
29918,
5030,
353,
5852,
29892,
3160,
29918,
29906,
29946,
1092,
29918,
1555,
353,
5852,
29892,
3160,
29918,
29906,
29946,
1092,
29918,
3167,
353,
7700,
29892,
3160,
29918,
4230,
29918,
21402,
29918,
271,
353,
5852,
29897,
13,
13,
9651,
363,
1178,
297,
18999,
29901,
13,
18884,
396,
2528,
716,
848,
304,
278,
7343,
1591,
13,
18884,
1591,
10507,
29889,
1188,
4301,
29898,
1178,
29892,
6923,
1762,
2481,
29898,
524,
29898,
1111,
262,
29918,
1272,
29961,
333,
22322,
4230,
29918,
21402,
29918,
271,
2033,
8243,
5785,
29898,
1111,
262,
29918,
1272,
29961,
333,
22322,
375,
29881,
2033,
511,
19480,
29918,
1272,
29961,
333,
22322,
375,
29881,
29918,
28549,
29918,
5030,
7464,
19480,
29918,
1272,
29961,
333,
22322,
375,
29881,
29918,
29906,
29946,
29882,
29918,
1555,
11287,
13,
13,
9651,
8709,
29898,
23128,
1762,
29903,
5436,
29897,
13,
13,
1678,
3244,
353,
3244,
292,
29889,
4899,
29898,
5182,
353,
3244,
29918,
9891,
29897,
13,
1678,
3244,
29889,
2962,
580,
13,
1678,
736,
1121,
13,
13,
361,
679,
20570,
29901,
13,
1678,
20315,
29907,
17929,
3562,
353,
679,
29918,
1111,
19144,
27604,
29918,
2371,
29918,
16211,
936,
29898,
16700,
20570,
29897,
13,
13,
361,
679,
23859,
29901,
13,
1678,
10782,
29907,
17929,
3562,
353,
679,
29918,
1111,
19144,
27604,
29918,
2371,
29918,
9258,
29898,
23128,
1762,
29903,
5436,
29897,
13,
2
] |
sparkdh/dataframe_column_functions.py | mmutiso/dea | 0 | 114924 | from pyspark.sql import functions
def clone_column(df, existing_column_name, new_column_name):
"""
Adds a column to the dataframe with a new name copying
all the values from the existing column
"""
df = df.withColumn(new_column_name, df[existing_column_name])
return df | [
1,
515,
282,
952,
6378,
29889,
2850,
1053,
3168,
30004,
13,
30004,
13,
1753,
17432,
29918,
4914,
29898,
2176,
29892,
5923,
29918,
4914,
29918,
978,
29892,
716,
29918,
4914,
29918,
978,
1125,
30004,
13,
1678,
9995,
30004,
13,
1678,
3462,
29879,
263,
1897,
304,
278,
12205,
411,
263,
716,
1024,
17596,
30004,
13,
1678,
599,
278,
1819,
515,
278,
5923,
1897,
30004,
13,
1678,
9995,
30004,
13,
1678,
4489,
353,
4489,
29889,
2541,
4409,
29898,
1482,
29918,
4914,
29918,
978,
29892,
4489,
29961,
735,
15423,
29918,
4914,
29918,
978,
2314,
30004,
13,
30004,
13,
1678,
736,
4489,
2
] |
app.py | TimothyWillard/dash-multi-app-server | 0 | 185324 | <gh_stars>0
import dash
import dash_auth
from config import config as cfg
app = None
auth = None
if cfg["auth"]["required"]:
app = dash.Dash("auth")
auth = dash_auth.BasicAuth(app, cfg["auth"]["validPairs"])
else:
app = dash.Dash()
server = app.server
app.config.suppress_callback_exceptions = True
app.css.append_css({"external_url": "https://codepen.io/chriddyp/pen/bWLwgP.css"}) | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
12569,
13,
5215,
12569,
29918,
5150,
13,
13,
3166,
2295,
1053,
2295,
408,
274,
16434,
13,
13,
932,
353,
6213,
13,
5150,
353,
6213,
13,
361,
274,
16434,
3366,
5150,
3108,
3366,
12403,
3108,
29901,
13,
1678,
623,
353,
12569,
29889,
29928,
1161,
703,
5150,
1159,
13,
1678,
4817,
353,
12569,
29918,
5150,
29889,
16616,
6444,
29898,
932,
29892,
274,
16434,
3366,
5150,
3108,
3366,
3084,
29925,
7121,
20068,
13,
2870,
29901,
13,
1678,
623,
353,
12569,
29889,
29928,
1161,
580,
13,
13,
2974,
353,
623,
29889,
2974,
13,
932,
29889,
2917,
29889,
19303,
1253,
29918,
14035,
29918,
11739,
29879,
353,
5852,
13,
932,
29889,
4268,
29889,
4397,
29918,
4268,
3319,
29908,
23176,
29918,
2271,
1115,
376,
991,
597,
401,
2238,
29889,
601,
29914,
22495,
2205,
1478,
29914,
2238,
29914,
29890,
29956,
29931,
29893,
29887,
29925,
29889,
4268,
29908,
1800,
2
] |
setup.py | FoxNerdSaysMoo/HomeAssistantAPI | 0 | 32436 | from setuptools import setup
from homeassistant_api import __version__
with open("README.md", "r") as f:
read = f.read()
setup(
name="HomeAssistant API",
url="https://github.com/GrandMoff100/HomeassistantAPI",
description="Python Wrapper for Homeassistant's REST API",
version=__version__,
keywords=['homeassistant', 'api', 'wrapper', 'client'],
author="GrandMoff100",
author_email="<EMAIL>",
packages=[
"homeassistant_api",
"homeassistant_api.models",
"homeassistant_api._async",
"homeassistant_api._async.models"
],
long_description=read,
long_description_content_type="text/markdown",
install_requires=["requests", "simplejson"],
extras_require={
"async": ["aiohttp"]
},
python_requires=">=3.6",
provides=["homeassistant_api"],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Version Control :: Git"
]
)
| [
1,
515,
731,
21245,
8789,
1053,
6230,
13,
3166,
3271,
465,
22137,
29918,
2754,
1053,
4770,
3259,
1649,
13,
13,
2541,
1722,
703,
16310,
2303,
29889,
3487,
613,
376,
29878,
1159,
408,
285,
29901,
13,
1678,
1303,
353,
285,
29889,
949,
580,
13,
13,
14669,
29898,
13,
1678,
1024,
543,
11184,
7900,
22137,
3450,
613,
13,
1678,
3142,
543,
991,
597,
3292,
29889,
510,
29914,
3338,
392,
29924,
2696,
29896,
29900,
29900,
29914,
11184,
465,
22137,
8787,
613,
13,
1678,
6139,
543,
11980,
399,
6794,
363,
8778,
465,
22137,
29915,
29879,
16759,
3450,
613,
13,
1678,
1873,
29922,
1649,
3259,
1649,
29892,
13,
1678,
29361,
29922,
1839,
5184,
465,
22137,
742,
525,
2754,
742,
525,
17699,
742,
525,
4645,
7464,
13,
1678,
4148,
543,
3338,
392,
29924,
2696,
29896,
29900,
29900,
613,
13,
1678,
4148,
29918,
5269,
543,
29966,
26862,
6227,
28341,
13,
1678,
9741,
11759,
13,
4706,
376,
5184,
465,
22137,
29918,
2754,
613,
13,
4706,
376,
5184,
465,
22137,
29918,
2754,
29889,
9794,
613,
13,
4706,
376,
5184,
465,
22137,
29918,
2754,
3032,
12674,
613,
13,
4706,
376,
5184,
465,
22137,
29918,
2754,
3032,
12674,
29889,
9794,
29908,
13,
1678,
21251,
13,
1678,
1472,
29918,
8216,
29922,
949,
29892,
13,
1678,
1472,
29918,
8216,
29918,
3051,
29918,
1853,
543,
726,
29914,
3502,
3204,
613,
13,
1678,
2601,
29918,
276,
339,
2658,
29922,
3366,
24830,
613,
376,
12857,
3126,
12436,
13,
1678,
429,
10678,
29918,
12277,
3790,
13,
4706,
376,
12674,
1115,
6796,
29874,
601,
1124,
3108,
13,
1678,
2981,
13,
1678,
3017,
29918,
276,
339,
2658,
543,
18572,
29941,
29889,
29953,
613,
13,
1678,
8128,
29922,
3366,
5184,
465,
22137,
29918,
2754,
12436,
13,
1678,
770,
14903,
11759,
13,
4706,
376,
21956,
358,
16034,
4761,
29871,
29945,
448,
19561,
29914,
855,
519,
613,
13,
4706,
376,
2928,
2760,
319,
4749,
663,
4761,
10682,
414,
613,
13,
4706,
376,
29940,
18771,
17088,
4761,
4223,
613,
13,
4706,
376,
7094,
1218,
2184,
4761,
6570,
25266,
613,
13,
4706,
376,
9283,
4056,
17088,
4761,
5132,
4761,
29871,
29906,
29889,
29955,
613,
13,
4706,
376,
9283,
4056,
17088,
4761,
5132,
4761,
29871,
29941,
29889,
29945,
613,
13,
4706,
376,
9283,
4056,
17088,
4761,
5132,
4761,
29871,
29941,
29889,
29953,
613,
13,
4706,
376,
9283,
4056,
17088,
4761,
5132,
4761,
29871,
29941,
29889,
29955,
613,
13,
4706,
376,
9283,
4056,
17088,
4761,
5132,
4761,
29871,
29941,
29889,
29947,
613,
13,
4706,
376,
9283,
4056,
17088,
4761,
5132,
4761,
29871,
29941,
29889,
29929,
613,
13,
4706,
376,
9283,
4056,
17088,
4761,
5132,
4761,
29871,
29941,
29889,
29896,
29900,
613,
13,
4706,
376,
7031,
293,
4761,
18540,
14650,
4761,
365,
4626,
4314,
4761,
5132,
3382,
2540,
613,
13,
4706,
376,
7031,
293,
4761,
18540,
14650,
4761,
10079,
11264,
4761,
11786,
29908,
13,
1678,
4514,
13,
29897,
13,
2
] |
lambda/apiSimpleAuth.py | mjuliana/staticformupload | 0 | 1616694 | <filename>lambda/apiSimpleAuth.py
import json
def lambda_handler(event, context):
if event["headers"]["authorization"] == "superSecret" :
response = {
"isAuthorized": True
}
else :
response = {
"isAuthorized": False
}
return response
| [
1,
529,
9507,
29958,
2892,
29914,
2754,
15427,
6444,
29889,
2272,
13,
5215,
4390,
13,
13,
1753,
14013,
29918,
13789,
29898,
3696,
29892,
3030,
1125,
13,
268,
13,
268,
13,
1678,
565,
1741,
3366,
13662,
3108,
3366,
8921,
2133,
3108,
1275,
376,
9136,
28459,
29908,
584,
13,
4706,
2933,
353,
426,
13,
9651,
376,
275,
13720,
1891,
1115,
5852,
13,
9651,
500,
13,
1678,
1683,
584,
13,
4706,
2933,
353,
426,
13,
9651,
376,
275,
13720,
1891,
1115,
7700,
13,
9651,
500,
13,
268,
13,
1678,
736,
2933,
13,
268,
2
] |
posts/tests.py | Kolokol2002/Yatube | 0 | 104865 | <reponame>Kolokol2002/Yatube
import tempfile
from django.core import mail
from django.core.cache import cache
from django.test import Client, TestCase, override_settings
from posts.models import Follow, Group, Post, User
# User = get_user_model()
class ProfileTest(TestCase):
def setUp(self):
# создаём пользователя
self.client = Client()
self.user = User.objects.create_user(
username="sarah", email="<EMAIL>", password="<PASSWORD>"
)
# создаём пост от имени пользователя
self.post = Post.objects.create(
text="You're talking about things I haven't done yet in the past tense. It's driving me crazy!",
author=self.user)
def test_profile(self):
#После регистрации пользователя создается его персональная страница (profile)
response = self.client.get("/sarah/")
self.assertEqual(response.status_code, 200)
#После публикации поста новая запись появляется на главной странице сайта (index), на персональной странице
#пользователя (profile), и на отдельной странице поста (post)
# print(response.context)
self.assertEqual(response.context["post"], self.post)
response = self.client.get("")
self.assertEqual(response.context["post"], self.post)
def test_new_post(self):
#Авторизованный пользователь может опубликовать пост (new)
#Неавторизованный посетитель не может опубликовать пост (его редиректит на страницу входа)
self.client.login(username=self.user, password="<PASSWORD>")
response = self.client.get("/new/")
self.assertEqual(response.status_code, 200)
self.client.post('/new/',
data={
"text": "Тест для створення нового поста"
}
)
self.assertTrue(Post.objects.filter(text='Тест для створення нового поста',
author=self.user).exists()
)
self.client.logout()
response = self.client.get("/new/")
self.assertEqual(response.status_code, 302)
def test_edit_post(self):
#Авторизованный пользователь может отредактировать свой пост
# и его содержимое изменится на всех связанных страницах
self.client.login(username=self.user, password="<PASSWORD>")
response = self.client.get(f'/{self.user}/{self.post.id}/edit/')
self.assertEqual(response.status_code, 200)
self.client.post(f'/{self.user}/{self.post.id}/edit/',
data={
'text': 'Змінено для тесту',
}
)
self.assertTrue(Post.objects.filter(text='Змінено для тесту').exists())
class ErrorsTest(TestCase):
def test_404(self):
response = self.client.get("/test/test/test/test/")
self.assertEqual(response.status_code, 404)
class PostsImgTest(TestCase):
'''Тестирование возможности добавления изображений к публикациям'''
def setUp(self):
self.client = Client()
self.group = Group.objects.create(title='Test Group',
slug='testgroup',
description='A test group')
def test_img_upload(self):
user = User.objects.create_user(username="testUserImg",
email="<EMAIL>",
password="*<PASSWORD>",
first_name="Test",
last_name="User")
self.client.login(username="testUserImg", password="*<PASSWORD>")
post = Post.objects.create(author=user,
text='Post with img',
group=self.group,
image='test-img.jpg')
urls = [f'/{user}/',
f'/{user.username}/{post.id}/',
f'/group/{self.group.slug}/',
"",]
for urls in urls:
response = self.client.get(urls)
self.assertContains(response, 'img_posts"', status_code=200)
def test_file_upload(self):
User.objects.create_user(username="testUserFile",
email="<EMAIL>",
password="*<PASSWORD>",
first_name="Test",
last_name="User")
self.client.login(username="testUserFile", password="*<PASSWORD>")
with open('test-file.txt', 'rb') as fp:
response = self.client.post(
'/new/', {'group': 1, 'text': 'Test post', 'image': fp, })
self.assertFormError(response, 'form', 'image',
"Загрузите правильное изображение. "
"Файл, который вы загрузили, поврежден "
"или не является изображением.")
class CacheTest(TestCase):
''''Тестирование работы кеширования главной страницы'''
def setUp(self):
self.client = Client()
self.user = User.objects.create_user(username="testUser",
email="<EMAIL>",
password="*<PASSWORD>",
first_name="Test",
last_name="User")
self.client.login(username="testUser", password="*<PASSWORD>")
Post.objects.create(text='A test post', author=self.user)
def test_index_cache(self):
response = self.client.get('/')
self.assertContains(response, 'A test post', status_code=200)
self.client.post('/new/', {'text': 'A test post 2'})
response = self.client.get('/')
self.assertNotContains(response, 'A test post 2', status_code=200)
cache.clear()
response = self.client.get('/')
self.assertContains(response, 'A test post 2', status_code=200)
class FollowTest(TestCase):
'''Тестирование подписок'''
def setUp(self):
self.client = Client()
self.user1 = User.objects.create_user(username="testUser1",
email="<EMAIL>",
password="*<PASSWORD>",
first_name="Test1",
last_name="User1")
self.user2 = User.objects.create_user(username="testUser2",
email="<EMAIL>",
password="*<PASSWORD>",
first_name="Test2",
last_name="User2")
self.user3 = User.objects.create_user(username="testUser3",
email="<EMAIL>",
password="*<PASSWORD>",
first_name="Test3",
last_name="User3")
def test_follow(self):
self.client.login(username="testUser1", password="*<PASSWORD>")
response = self.client.get('/testUser2/follow')
self.assertRedirects(response, '/testUser2/')
follower = Follow.objects.get(user=self.user1, author=self.user2)
self.assertIsNotNone(follower)
response = self.client.get('/testUser2/unfollow')
self.assertRedirects(response, '/testUser2/')
follower = Follow.objects.filter(
user=self.user1, author=self.user2).first()
self.assertIsNone(follower)
def test_follow_posts(self):
self.client.login(username="testUser1", password="*<PASSWORD>")
self.client.get('/testUser2/follow')
Post.objects.create(author=self.user2, text='A test post')
response = self.client.get('/follow/')
self.assertContains(response, 'A test post', status_code=200)
self.client.login(username="testUser3", password="*<PASSWORD>")
response = self.client.get('/follow/')
self.assertNotContains(response, 'A test post', status_code=200)
class CommentsTest(TestCase):
'''Тестирование комментариев'''
def setUp(self):
self.client = Client()
self.user1 = User.objects.create_user(username="testUser1",
email="<EMAIL>",
password="*<PASSWORD>",
first_name="Test1",
last_name="User1")
Post.objects.create(author=self.user1, text='A test post')
def test_comments(self):
response = self.client.get('/testUser1/1/comment/')
self.assertRedirects(
response, '/auth/login/?next=/testUser1/1/comment/')
self.client.login(username="testUser1", password="*<PASSWORD>")
response = self.client.post(
'/testUser1/1/comment/', {'text': 'A test comment'})
self.assertRedirects(response, '/testUser1/1/')
response = self.client.get('/testUser1/1/')
self.assertContains(response, 'A test comment', status_code=200)
| [
1,
529,
276,
1112,
420,
29958,
29968,
324,
554,
324,
29906,
29900,
29900,
29906,
29914,
29979,
271,
4003,
13,
5215,
5694,
1445,
13,
13,
3166,
9557,
29889,
3221,
1053,
10524,
13,
3166,
9557,
29889,
3221,
29889,
8173,
1053,
7090,
13,
3166,
9557,
29889,
1688,
1053,
12477,
29892,
4321,
8259,
29892,
5712,
29918,
11027,
13,
13,
3166,
11803,
29889,
9794,
1053,
10306,
29892,
6431,
29892,
4918,
29892,
4911,
13,
13,
29937,
4911,
353,
679,
29918,
1792,
29918,
4299,
580,
13,
13,
1990,
20802,
3057,
29898,
3057,
8259,
1125,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
396,
14507,
11560,
18636,
9718,
11146,
13,
4706,
1583,
29889,
4645,
353,
12477,
580,
13,
4706,
1583,
29889,
1792,
353,
4911,
29889,
12650,
29889,
3258,
29918,
1792,
29898,
13,
9651,
8952,
543,
29879,
279,
801,
613,
4876,
543,
29966,
26862,
6227,
28341,
4800,
543,
29966,
25711,
17013,
11903,
13,
4706,
1723,
13,
4706,
396,
14507,
11560,
733,
464,
1685,
21959,
18636,
9718,
11146,
13,
4706,
1583,
29889,
2490,
353,
4918,
29889,
12650,
29889,
3258,
29898,
13,
9651,
1426,
543,
3492,
29915,
276,
9963,
1048,
2712,
306,
7359,
29915,
29873,
2309,
3447,
297,
278,
4940,
260,
1947,
29889,
739,
29915,
29879,
19500,
592,
12220,
1537,
29991,
613,
13,
9651,
4148,
29922,
1311,
29889,
1792,
29897,
13,
13,
1678,
822,
1243,
29918,
10185,
29898,
1311,
1125,
13,
4706,
396,
30013,
3264,
753,
16487,
5242,
3540,
18636,
9718,
11146,
14507,
4364,
5686,
27485,
693,
3162,
8440,
11519,
313,
10185,
29897,
13,
4706,
2933,
353,
1583,
29889,
4645,
29889,
657,
11974,
29879,
279,
801,
29914,
1159,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5327,
29889,
4882,
29918,
401,
29892,
29871,
29906,
29900,
29900,
29897,
13,
4706,
396,
30013,
3264,
753,
26147,
642,
3540,
733,
1229,
6968,
28369,
1077,
1668,
1210,
23969,
7593,
4364,
665,
13986,
2082,
8440,
23256,
8347,
676,
313,
2248,
511,
665,
27485,
25883,
8440,
23256,
13,
4706,
396,
18360,
9718,
11146,
313,
10185,
511,
606,
665,
1685,
13538,
2082,
8440,
23256,
733,
1229,
313,
2490,
29897,
13,
4706,
396,
1596,
29898,
5327,
29889,
4703,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5327,
29889,
4703,
3366,
2490,
12436,
1583,
29889,
2490,
29897,
13,
4706,
2933,
353,
1583,
29889,
4645,
29889,
657,
703,
1159,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5327,
29889,
4703,
3366,
2490,
12436,
1583,
29889,
2490,
29897,
13,
13,
1678,
822,
1243,
29918,
1482,
29918,
2490,
29898,
1311,
1125,
13,
4706,
396,
30018,
29942,
24689,
11337,
745,
2370,
18636,
9718,
2584,
20302,
614,
10862,
9767,
1413,
733,
464,
313,
1482,
29897,
13,
4706,
396,
30029,
29919,
29910,
29942,
24689,
11337,
745,
2370,
10865,
811,
2584,
1538,
20302,
614,
10862,
9767,
1413,
733,
464,
313,
20189,
1909,
956,
587,
9054,
29932,
665,
8440,
7947,
29960,
490,
26352,
29897,
13,
4706,
1583,
29889,
4645,
29889,
7507,
29898,
6786,
29922,
1311,
29889,
1792,
29892,
4800,
543,
29966,
25711,
17013,
29958,
1159,
13,
4706,
2933,
353,
1583,
29889,
4645,
29889,
657,
11974,
1482,
29914,
1159,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5327,
29889,
4882,
29918,
401,
29892,
29871,
29906,
29900,
29900,
29897,
13,
13,
4706,
1583,
29889,
4645,
29889,
2490,
11219,
1482,
29914,
742,
13,
462,
308,
848,
3790,
13,
462,
632,
376,
726,
1115,
376,
30041,
29919,
464,
3807,
21417,
22757,
6968,
11913,
733,
1229,
29908,
13,
462,
308,
500,
13,
462,
308,
1723,
13,
4706,
1583,
29889,
9294,
5574,
29898,
6747,
29889,
12650,
29889,
4572,
29898,
726,
2433,
30041,
29919,
464,
3807,
21417,
22757,
6968,
11913,
733,
1229,
742,
13,
462,
462,
9651,
4148,
29922,
1311,
29889,
1792,
467,
9933,
580,
13,
462,
4706,
1723,
13,
4706,
1583,
29889,
4645,
29889,
1188,
449,
580,
13,
4706,
2933,
353,
1583,
29889,
4645,
29889,
657,
11974,
1482,
29914,
1159,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5327,
29889,
4882,
29918,
401,
29892,
29871,
29941,
29900,
29906,
29897,
13,
13,
1678,
822,
1243,
29918,
5628,
29918,
2490,
29898,
1311,
1125,
13,
4706,
396,
30018,
29942,
24689,
11337,
745,
2370,
18636,
9718,
2584,
20302,
1685,
587,
840,
9054,
4962,
1413,
24913,
733,
464,
13,
4706,
396,
606,
5686,
1778,
6620,
1969,
1630,
29919,
1866,
10950,
7489,
665,
23103,
9690,
9661,
2430,
8440,
11519,
29988,
13,
4706,
1583,
29889,
4645,
29889,
7507,
29898,
6786,
29922,
1311,
29889,
1792,
29892,
4800,
543,
29966,
25711,
17013,
29958,
1159,
13,
4706,
2933,
353,
1583,
29889,
4645,
29889,
657,
29898,
29888,
29915,
19248,
1311,
29889,
1792,
6822,
29912,
1311,
29889,
2490,
29889,
333,
6822,
5628,
29914,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5327,
29889,
4882,
29918,
401,
29892,
29871,
29906,
29900,
29900,
29897,
13,
4706,
1583,
29889,
4645,
29889,
2490,
29898,
29888,
29915,
19248,
1311,
29889,
1792,
6822,
29912,
1311,
29889,
2490,
29889,
333,
6822,
5628,
29914,
742,
13,
462,
308,
848,
3790,
13,
462,
632,
525,
726,
2396,
525,
30060,
3272,
821,
570,
3807,
2399,
3936,
742,
13,
13,
462,
308,
500,
13,
462,
308,
1723,
13,
4706,
1583,
29889,
9294,
5574,
29898,
6747,
29889,
12650,
29889,
4572,
29898,
726,
2433,
30060,
3272,
821,
570,
3807,
2399,
3936,
2824,
9933,
3101,
13,
13,
1990,
4829,
29879,
3057,
29898,
3057,
8259,
1125,
13,
1678,
822,
1243,
29918,
29946,
29900,
29946,
29898,
1311,
1125,
13,
4706,
2933,
353,
1583,
29889,
4645,
29889,
657,
11974,
1688,
29914,
1688,
29914,
1688,
29914,
1688,
29914,
1159,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5327,
29889,
4882,
29918,
401,
29892,
29871,
29946,
29900,
29946,
29897,
13,
13,
1990,
4918,
29879,
25518,
3057,
29898,
3057,
8259,
1125,
13,
1678,
14550,
30041,
29919,
1415,
4962,
1755,
28461,
5395,
1447,
3102,
29942,
6052,
1866,
15124,
25612,
1186,
26147,
642,
5274,
29959,
12008,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
13,
4706,
1583,
29889,
4645,
353,
12477,
580,
13,
13,
4706,
1583,
29889,
2972,
353,
6431,
29889,
12650,
29889,
3258,
29898,
3257,
2433,
3057,
6431,
742,
13,
462,
462,
3986,
2243,
688,
2433,
1688,
2972,
742,
13,
462,
462,
3986,
6139,
2433,
29909,
1243,
2318,
1495,
13,
13,
1678,
822,
1243,
29918,
2492,
29918,
9009,
29898,
1311,
1125,
13,
4706,
1404,
353,
4911,
29889,
12650,
29889,
3258,
29918,
1792,
29898,
6786,
543,
1688,
2659,
25518,
613,
13,
462,
462,
4706,
4876,
543,
29966,
26862,
6227,
28341,
13,
462,
462,
4706,
4800,
543,
29930,
29966,
25711,
17013,
28341,
13,
462,
462,
4706,
937,
29918,
978,
543,
3057,
613,
13,
462,
462,
4706,
1833,
29918,
978,
543,
2659,
1159,
13,
4706,
1583,
29889,
4645,
29889,
7507,
29898,
6786,
543,
1688,
2659,
25518,
613,
4800,
543,
29930,
29966,
25711,
17013,
29958,
1159,
13,
13,
4706,
1400,
353,
4918,
29889,
12650,
29889,
3258,
29898,
8921,
29922,
1792,
29892,
13,
462,
462,
1678,
1426,
2433,
6747,
411,
10153,
742,
13,
462,
462,
1678,
2318,
29922,
1311,
29889,
2972,
29892,
13,
462,
462,
1678,
1967,
2433,
1688,
29899,
2492,
29889,
6173,
1495,
13,
13,
4706,
23942,
353,
518,
29888,
29915,
19248,
1792,
6822,
742,
13,
18884,
285,
29915,
19248,
1792,
29889,
6786,
6822,
29912,
2490,
29889,
333,
6822,
742,
13,
18884,
285,
29915,
29914,
2972,
19248,
1311,
29889,
2972,
29889,
29517,
6822,
742,
13,
18884,
12633,
29962,
13,
13,
4706,
363,
23942,
297,
23942,
29901,
13,
9651,
2933,
353,
1583,
29889,
4645,
29889,
657,
29898,
26045,
29897,
13,
9651,
1583,
29889,
9294,
21409,
29898,
5327,
29892,
525,
2492,
29918,
14080,
29908,
742,
4660,
29918,
401,
29922,
29906,
29900,
29900,
29897,
13,
13,
1678,
822,
1243,
29918,
1445,
29918,
9009,
29898,
1311,
1125,
13,
4706,
4911,
29889,
12650,
29889,
3258,
29918,
1792,
29898,
6786,
543,
1688,
2659,
2283,
613,
13,
462,
18884,
4876,
543,
29966,
26862,
6227,
28341,
13,
462,
18884,
4800,
543,
29930,
29966,
25711,
17013,
28341,
13,
462,
18884,
937,
29918,
978,
543,
3057,
613,
13,
462,
18884,
1833,
29918,
978,
543,
2659,
1159,
13,
4706,
1583,
29889,
4645,
29889,
7507,
29898,
6786,
543,
1688,
2659,
2283,
613,
4800,
543,
29930,
29966,
25711,
17013,
29958,
1159,
13,
13,
4706,
411,
1722,
877,
1688,
29899,
1445,
29889,
3945,
742,
525,
6050,
1495,
408,
285,
29886,
29901,
13,
9651,
2933,
353,
1583,
29889,
4645,
29889,
2490,
29898,
13,
18884,
8207,
1482,
29914,
742,
11117,
2972,
2396,
29871,
29896,
29892,
525,
726,
2396,
525,
3057,
1400,
742,
525,
3027,
2396,
285,
29886,
29892,
5615,
13,
4706,
1583,
29889,
9294,
2500,
2392,
29898,
5327,
29892,
525,
689,
742,
525,
3027,
742,
13,
462,
632,
376,
15578,
29969,
1086,
1916,
730,
12318,
693,
5209,
1866,
15124,
11567,
29889,
376,
13,
462,
632,
376,
30061,
29910,
29977,
29944,
29892,
12423,
2771,
1077,
29969,
1086,
1916,
644,
29892,
5885,
587,
29998,
4466,
376,
13,
462,
632,
376,
29917,
644,
1538,
14367,
1866,
15124,
1498,
8751,
23157,
13,
13,
13,
1990,
28540,
3057,
29898,
3057,
8259,
1125,
13,
1678,
525,
12008,
30041,
29919,
1415,
4962,
1755,
24534,
1186,
29919,
1911,
4962,
1587,
13986,
2082,
8440,
25213,
12008,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
1583,
29889,
4645,
353,
12477,
580,
13,
4706,
1583,
29889,
1792,
353,
4911,
29889,
12650,
29889,
3258,
29918,
1792,
29898,
6786,
543,
1688,
2659,
613,
13,
462,
462,
632,
4876,
543,
29966,
26862,
6227,
28341,
13,
462,
462,
632,
4800,
543,
29930,
29966,
25711,
17013,
28341,
13,
462,
462,
632,
937,
29918,
978,
543,
3057,
613,
13,
462,
462,
632,
1833,
29918,
978,
543,
2659,
1159,
13,
4706,
1583,
29889,
4645,
29889,
7507,
29898,
6786,
543,
1688,
2659,
613,
4800,
543,
29930,
29966,
25711,
17013,
29958,
1159,
13,
4706,
4918,
29889,
12650,
29889,
3258,
29898,
726,
2433,
29909,
1243,
1400,
742,
4148,
29922,
1311,
29889,
1792,
29897,
13,
13,
1678,
822,
1243,
29918,
2248,
29918,
8173,
29898,
1311,
1125,
13,
4706,
2933,
353,
1583,
29889,
4645,
29889,
657,
11219,
1495,
13,
4706,
1583,
29889,
9294,
21409,
29898,
5327,
29892,
525,
29909,
1243,
1400,
742,
4660,
29918,
401,
29922,
29906,
29900,
29900,
29897,
13,
4706,
1583,
29889,
4645,
29889,
2490,
11219,
1482,
29914,
742,
11117,
726,
2396,
525,
29909,
1243,
1400,
29871,
29906,
29915,
1800,
13,
4706,
2933,
353,
1583,
29889,
4645,
29889,
657,
11219,
1495,
13,
4706,
1583,
29889,
9294,
3664,
21409,
29898,
5327,
29892,
525,
29909,
1243,
1400,
29871,
29906,
742,
4660,
29918,
401,
29922,
29906,
29900,
29900,
29897,
13,
4706,
7090,
29889,
8551,
580,
13,
4706,
2933,
353,
1583,
29889,
4645,
29889,
657,
11219,
1495,
13,
4706,
1583,
29889,
9294,
21409,
29898,
5327,
29892,
525,
29909,
1243,
1400,
29871,
29906,
742,
4660,
29918,
401,
29922,
29906,
29900,
29900,
29897,
13,
13,
13,
1990,
10306,
3057,
29898,
3057,
8259,
1125,
13,
1678,
14550,
30041,
29919,
1415,
4962,
1755,
3693,
18021,
12008,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
1583,
29889,
4645,
353,
12477,
580,
13,
4706,
1583,
29889,
1792,
29896,
353,
4911,
29889,
12650,
29889,
3258,
29918,
1792,
29898,
6786,
543,
1688,
2659,
29896,
613,
13,
462,
462,
795,
4876,
543,
29966,
26862,
6227,
28341,
13,
462,
462,
795,
4800,
543,
29930,
29966,
25711,
17013,
28341,
13,
462,
462,
795,
937,
29918,
978,
543,
3057,
29896,
613,
13,
462,
462,
795,
1833,
29918,
978,
543,
2659,
29896,
1159,
13,
4706,
1583,
29889,
1792,
29906,
353,
4911,
29889,
12650,
29889,
3258,
29918,
1792,
29898,
6786,
543,
1688,
2659,
29906,
613,
13,
462,
462,
795,
4876,
543,
29966,
26862,
6227,
28341,
13,
462,
462,
795,
4800,
543,
29930,
29966,
25711,
17013,
28341,
13,
462,
462,
795,
937,
29918,
978,
543,
3057,
29906,
613,
13,
462,
462,
795,
1833,
29918,
978,
543,
2659,
29906,
1159,
13,
4706,
1583,
29889,
1792,
29941,
353,
4911,
29889,
12650,
29889,
3258,
29918,
1792,
29898,
6786,
543,
1688,
2659,
29941,
613,
13,
462,
462,
795,
4876,
543,
29966,
26862,
6227,
28341,
13,
462,
462,
795,
4800,
543,
29930,
29966,
25711,
17013,
28341,
13,
462,
462,
795,
937,
29918,
978,
543,
3057,
29941,
613,
13,
462,
462,
795,
1833,
29918,
978,
543,
2659,
29941,
1159,
13,
13,
1678,
822,
1243,
29918,
23031,
29898,
1311,
1125,
13,
4706,
1583,
29889,
4645,
29889,
7507,
29898,
6786,
543,
1688,
2659,
29896,
613,
4800,
543,
29930,
29966,
25711,
17013,
29958,
1159,
13,
4706,
2933,
353,
1583,
29889,
4645,
29889,
657,
11219,
1688,
2659,
29906,
29914,
23031,
1495,
13,
4706,
1583,
29889,
9294,
24735,
29879,
29898,
5327,
29892,
8207,
1688,
2659,
29906,
29914,
1495,
13,
4706,
1101,
261,
353,
10306,
29889,
12650,
29889,
657,
29898,
1792,
29922,
1311,
29889,
1792,
29896,
29892,
4148,
29922,
1311,
29889,
1792,
29906,
29897,
13,
4706,
1583,
29889,
9294,
3624,
3664,
8516,
29898,
23031,
261,
29897,
13,
4706,
2933,
353,
1583,
29889,
4645,
29889,
657,
11219,
1688,
2659,
29906,
29914,
348,
23031,
1495,
13,
4706,
1583,
29889,
9294,
24735,
29879,
29898,
5327,
29892,
8207,
1688,
2659,
29906,
29914,
1495,
13,
4706,
1101,
261,
353,
10306,
29889,
12650,
29889,
4572,
29898,
13,
9651,
1404,
29922,
1311,
29889,
1792,
29896,
29892,
4148,
29922,
1311,
29889,
1792,
29906,
467,
4102,
580,
13,
4706,
1583,
29889,
9294,
3624,
8516,
29898,
23031,
261,
29897,
13,
13,
1678,
822,
1243,
29918,
23031,
29918,
14080,
29898,
1311,
1125,
13,
4706,
1583,
29889,
4645,
29889,
7507,
29898,
6786,
543,
1688,
2659,
29896,
613,
4800,
543,
29930,
29966,
25711,
17013,
29958,
1159,
13,
4706,
1583,
29889,
4645,
29889,
657,
11219,
1688,
2659,
29906,
29914,
23031,
1495,
13,
4706,
4918,
29889,
12650,
29889,
3258,
29898,
8921,
29922,
1311,
29889,
1792,
29906,
29892,
1426,
2433,
29909,
1243,
1400,
1495,
13,
4706,
2933,
353,
1583,
29889,
4645,
29889,
657,
11219,
23031,
29914,
1495,
13,
4706,
1583,
29889,
9294,
21409,
29898,
5327,
29892,
525,
29909,
1243,
1400,
742,
4660,
29918,
401,
29922,
29906,
29900,
29900,
29897,
13,
4706,
1583,
29889,
4645,
29889,
7507,
29898,
6786,
543,
1688,
2659,
29941,
613,
4800,
543,
29930,
29966,
25711,
17013,
29958,
1159,
13,
4706,
2933,
353,
1583,
29889,
4645,
29889,
657,
11219,
23031,
29914,
1495,
13,
4706,
1583,
29889,
9294,
3664,
21409,
29898,
5327,
29892,
525,
29909,
1243,
1400,
742,
4660,
29918,
401,
29922,
29906,
29900,
29900,
29897,
13,
13,
13,
1990,
461,
29879,
3057,
29898,
3057,
8259,
1125,
13,
1678,
14550,
30041,
29919,
1415,
4962,
1755,
5294,
19900,
641,
4020,
12008,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
1583,
29889,
4645,
353,
12477,
580,
13,
4706,
1583,
29889,
1792,
29896,
353,
4911,
29889,
12650,
29889,
3258,
29918,
1792,
29898,
6786,
543,
1688,
2659,
29896,
613,
13,
462,
462,
795,
4876,
543,
29966,
26862,
6227,
28341,
13,
462,
462,
795,
4800,
543,
29930,
29966,
25711,
17013,
28341,
13,
462,
462,
795,
937,
29918,
978,
543,
3057,
29896,
613,
13,
462,
462,
795,
1833,
29918,
978,
543,
2659,
29896,
1159,
13,
4706,
4918,
29889,
12650,
29889,
3258,
29898,
8921,
29922,
1311,
29889,
1792,
29896,
29892,
1426,
2433,
29909,
1243,
1400,
1495,
13,
13,
1678,
822,
1243,
29918,
21032,
29898,
1311,
1125,
13,
4706,
2933,
353,
1583,
29889,
4645,
29889,
657,
11219,
1688,
2659,
29896,
29914,
29896,
29914,
9342,
29914,
1495,
13,
4706,
1583,
29889,
9294,
24735,
29879,
29898,
13,
9651,
2933,
29892,
8207,
5150,
29914,
7507,
13401,
4622,
14327,
1688,
2659,
29896,
29914,
29896,
29914,
9342,
29914,
1495,
13,
4706,
1583,
29889,
4645,
29889,
7507,
29898,
6786,
543,
1688,
2659,
29896,
613,
4800,
543,
29930,
29966,
25711,
17013,
29958,
1159,
13,
4706,
2933,
353,
1583,
29889,
4645,
29889,
2490,
29898,
13,
9651,
8207,
1688,
2659,
29896,
29914,
29896,
29914,
9342,
29914,
742,
11117,
726,
2396,
525,
29909,
1243,
3440,
29915,
1800,
13,
4706,
1583,
29889,
9294,
24735,
29879,
29898,
5327,
29892,
8207,
1688,
2659,
29896,
29914,
29896,
29914,
1495,
13,
4706,
2933,
353,
1583,
29889,
4645,
29889,
657,
11219,
1688,
2659,
29896,
29914,
29896,
29914,
1495,
13,
4706,
1583,
29889,
9294,
21409,
29898,
5327,
29892,
525,
29909,
1243,
3440,
742,
4660,
29918,
401,
29922,
29906,
29900,
29900,
29897,
13,
13,
13,
2
] |
projectFile.py | waelbenamara/predef | 0 | 141524 | <filename>projectFile.py
from flask_website import app
app.run(debug=True)
#!/usr/bin/env python
from flask_website import app
from flask_website.search import update_documentation_index
with app.test_request_context():
update_documentation_index()
import os
_basedir = os.path.abspath(os.path.dirname(__file__))
DEBUG = False
SECRET_KEY = 'testkey'
DATABASE_URI = 'sqlite:///' + os.path.join(_basedir, 'flask-website.db')
DATABASE_CONNECT_OPTIONS = {}
ADMINS = frozenset(['http://lucumr.pocoo.org/'])
WHOOSH_INDEX = os.path.join(_basedir, 'flask-website.whoosh')
DOCUMENTATION_PATH = os.path.join(_basedir, '../flask/docs/_build/dirhtml')
del os
# flasky extensions. flasky pygments style based on tango style
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
class FlaskyStyle(Style):
background_color = "#f8f8f8"
default_style = ""
styles = {
# No corresponding class for the following:
#Text: "", # class: ''
Whitespace: "underline #f8f8f8", # class: 'w'
Error: "#a40000 border:#ef2929", # class: 'err'
Other: "#000000", # class 'x'
Comment: "italic #8f5902", # class: 'c'
Comment.Preproc: "noitalic", # class: 'cp'
Keyword: "bold #004461", # class: 'k'
Keyword.Constant: "bold #004461", # class: 'kc'
Keyword.Declaration: "bold #004461", # class: 'kd'
Keyword.Namespace: "bold #004461", # class: 'kn'
Keyword.Pseudo: "bold #004461", # class: 'kp'
Keyword.Reserved: "bold #004461", # class: 'kr'
Keyword.Type: "bold #004461", # class: 'kt'
Operator: "#582800", # class: 'o'
Operator.Word: "bold #004461", # class: 'ow' - like keywords
Punctuation: "bold #000000", # class: 'p'
# because special names such as Name.Class, Name.Function, etc.
# are not recognized as such later in the parsing, we choose them
# to look the same as ordinary variables.
Name: "#000000", # class: 'n'
Name.Attribute: "#c4a000", # class: 'na' - to be revised
Name.Builtin: "#004461", # class: 'nb'
Name.Builtin.Pseudo: "#3465a4", # class: 'bp'
Name.Class: "#000000", # class: 'nc' - to be revised
Name.Constant: "#000000", # class: 'no' - to be revised
Name.Decorator: "#888", # class: 'nd' - to be revised
Name.Entity: "#ce5c00", # class: 'ni'
Name.Exception: "bold #cc0000", # class: 'ne'
Name.Function: "#000000", # class: 'nf'
Name.Property: "#000000", # class: 'py'
Name.Label: "#f57900", # class: 'nl'
Name.Namespace: "#000000", # class: 'nn' - to be revised
Name.Other: "#000000", # class: 'nx'
Name.Tag: "bold #004461", # class: 'nt' - like a keyword
Name.Variable: "#000000", # class: 'nv' - to be revised
Name.Variable.Class: "#000000", # class: 'vc' - to be revised
Name.Variable.Global: "#000000", # class: 'vg' - to be revised
Name.Variable.Instance: "#000000", # class: 'vi' - to be revised
Number: "#990000", # class: 'm'
Literal: "#000000", # class: 'l'
Literal.Date: "#000000", # class: 'ld'
String: "#4e9a06", # class: 's'
String.Backtick: "#4e9a06", # class: 'sb'
String.Char: "#4e9a06", # class: 'sc'
String.Doc: "italic #8f5902", # class: 'sd' - like a comment
String.Double: "#4e9a06", # class: 's2'
String.Escape: "#4e9a06", # class: 'se'
String.Heredoc: "#4e9a06", # class: 'sh'
String.Interpol: "#4e9a06", # class: 'si'
String.Other: "#4e9a06", # class: 'sx'
String.Regex: "#4e9a06", # class: 'sr'
String.Single: "#4e9a06", # class: 's1'
String.Symbol: "#4e9a06", # class: 'ss'
Generic: "#000000", # class: 'g'
Generic.Deleted: "#a40000", # class: 'gd'
Generic.Emph: "italic #000000", # class: 'ge'
Generic.Error: "#ef2929", # class: 'gr'
Generic.Heading: "bold #000080", # class: 'gh'
Generic.Inserted: "#00A000", # class: 'gi'
Generic.Output: "#888", # class: 'go'
Generic.Prompt: "#745334", # class: 'gp'
Generic.Strong: "bold #000000", # class: 'gs'
Generic.Subheading: "bold #800080", # class: 'gu'
Generic.Traceback: "bold #a40000", # class: 'gt'
}
# -*- coding: utf-8 -*-
from urlparse import urlparse
from werkzeug import url_quote
from flask import Markup
class Extension(object):
def __init__(self, name, author, description,
github=None, gitlab=None, bitbucket=None, docs=None, website=None,
approved=False, notes=None):
self.name = name
self.author = author
self.description = Markup(description)
self.github = github
self.gitlab = gitlab
self.bitbucket = bitbucket
self.docs = docs
self.website = website
self.approved = approved
self.notes = notes
def to_json(self):
rv = vars(self).copy()
rv['description'] = unicode(rv['description'])
return rv
@property
def pypi(self):
return 'http://pypi.python.org/pypi/%s' % url_quote(self.name)
@property
def docserver(self):
if self.docs:
return urlparse(self.docs)[1]
# This list contains all extensions that were approved as well as those which
# passed listing.
extensions = [
Extension('Flask-OpenID', '<NAME>',
description='''
<p>Adds <a href="http://openid.net/">OpenID</a> support to Flask.
''',
github='mitsuhiko/flask-openid',
docs='http://pythonhosted.org/Flask-OpenID/',
notes='''
Short long description, missing tests.
'''
),
Extension('Flask-Babel', '<NAME>',
description='''
<p>Adds i18n/l10n support to Flask, based on
<a href=http://babel.edgewall.org/>babel</a> and
<a href=http://pytz.sourceforge.net/>pytz</a>.
''',
github='mitsuhiko/flask-babel',
docs='http://pythonhosted.org/Flask-Babel/',
approved=True,
notes='''
How to improve: add a better long description to the next release.
'''
),
Extension('Flask-SQLAlchemy', '<NAME>',
description='''
<p>Add <a href="http://www.sqlalchemy.org/">SQLAlchemy</a> support to Flask
with automatic configuration and helpers to simplify common web use cases.
Major features include:</p>
<ul>
<li>Handle configuring one or more database connections.</li>
<li>Set up sessions scoped to the request/response cycle.</li>
<li>Time queries and track model changes for debugging.</li>
</ul>
''',
github='mitsuhiko/flask-sqlalchemy',
docs='http://flask-sqlalchemy.pocoo.org/',
approved=True
),
Extension('Flask-Migrate', '<NAME>',
description='''
<p><a href="http://www.sqlalchemy.org/">SQLAlchemy</a> database
migrations for Flask applications using
<a href="https://alembic.readthedocs.org/">Alembic</a>. The
database operations are provided as command line arguments for
<a href="https://flask-script.readthedocs.org/">Flask-Script</a>.
''',
github='miguelgrinberg/flask-migrate',
docs='http://pythonhosted.org/Flask-Migrate/',
),
Extension('Flask-XML-RPC', '<NAME>',
description='''
<p>Adds <a href="http://www.xmlrpc.com/">XML-RPC</a> support to Flask.
''',
bitbucket='leafstorm/flask-xml-rpc',
docs='http://pythonhosted.org/Flask-XML-RPC/',
approved=True
),
Extension('Flask-CouchDB', '<NAME>',
description='''
<p>Adds <a href="http://couchdb.apache.org/">CouchDB</a> support to Flask.
''',
bitbucket='leafstorm/flask-couchdb',
docs='http://pythonhosted.org/Flask-CouchDB/',
approved=True,
notes='''
There is also Flask-CouchDBKit. Both are fine because they are
doing different things, but the latter is not yet approved.
'''
),
Extension('Flask-Uploads', '<NAME>',
description='''
<p>Flask-Uploads allows your application to flexibly and
efficiently handle file uploading and serving the uploaded files.
You can create different sets of uploads - one for document
attachments, one for photos, etc.
''',
github='maxcountryman/flask-uploads',
docs='https://flask-uploads.readthedocs.org/en/latest/',
approved=True
),
Extension('Flask-Themes', '<NAME>',
description='''
<p>Flask-Themes makes it easy for your application to support
a wide range of appearances.
''',
bitbucket='leafstorm/flask-themes',
docs='http://pythonhosted.org/Flask-Themes/',
approved=True
),
Extension('Flask-CouchDBKit', '<NAME>',
description='''
<p>Adds <a href="http://www.couchdbkit.org/">CouchDBKit</a> support to Flask.
''',
github='sirn/flask-couchdbkit',
docs='http://pythonhosted.org/Flask-CouchDBKit/'
),
Extension('Flask-Genshi', '<NAME>',
description='''
<p>Adds support for the <a href="http://genshi.edgewall.org/">Genshi</a>
templating language to Flask applications.
''',
github='dag/flask-genshi',
docs='http://pythonhosted.org/Flask-Genshi/',
approved=True,
notes='''
This is the first template engine extension. When others come
around it would be a good idea to decide on a common interface.
'''
),
Extension('Flask-Mail', '<NAME> (created by <NAME>)',
description='''
<p>Makes sending mails from Flask applications very easy and
has also support for unittesting.
''',
github='mattupstate/flask-mail',
docs='http://pythonhosted.org/Flask-Mail/',
approved=True
),
Extension('Flask-WTF', '<NAME> (created by <NAME>)',
description='''
<p>Flask-WTF offers simple integration with WTForms. This
integration includes optional CSRF handling for greater security.
''',
github='ajford/flask-wtf',
docs='http://pythonhosted.org/Flask-WTF/',
approved=True
),
Extension('Flask-Testing', u'<NAME> (created by <NAME>)',
description='''
<p>The Flask-Testing extension provides unit testing utilities for Flask.
''',
github='jarus/flask-testing',
docs='http://pythonhosted.org/Flask-Testing/',
approved=True
),
Extension('Flask-Script', '<NAME> (created by <NAME>)',
description='''
<p>The Flask-Script extension provides support for writing external
scripts in Flask. It uses argparse to parse command line arguments.
''',
github='techniq/flask-script',
docs='http://pythonhosted.org/Flask-Script/',
approved=True,
notes='''
Flask-Actions has some overlap. Consider that when approving
Flask-Actions or similar packages.
'''
),
Extension('flask-lesscss', '<NAME>',
description='''
<p>
A small Flask extension that makes it easy to use
<a href=http://lesscss.org/>LessCSS</a> with your
Flask application.
''',
docs='http://sjl.bitbucket.org/flask-lesscss/',
bitbucket='sjl/flask-lesscss',
notes='''
Broken package description, nonconforming package name, does not
follow standard API rules (init_lesscss instead of lesscss).
Considered for unlisting, improved version should release as
"Flask-LessCSS" with a conforming API and fixed packages indices,
as well as a testsuite.
'''
),
Extension('Flask-Creole', '<NAME>',
description='''
<p>Creole parser filters for Flask.
''',
docs='http://pythonhosted.org/Flask-Creole',
bitbucket='aafshar/flask-creole-main',
approved=True,
notes='''
Flask-Markdown and this should share API, consider that when
approving Flask-Markdown
'''
),
Extension('Flask-Cache', '<NAME>',
description='''
<p>Adds cache support to your Flask application.
''',
docs='http://pythonhosted.org/Flask-Cache',
github='thadeusb/flask-cache',
),
Extension('Flask-Principal', '<NAME>',
description='''
<p>Identity management for Flask.
''',
docs='http://pythonhosted.org/Flask-Principal',
github='mattupstate/flask-principal',
approved=False
),
Extension('Flask-Zen', '<NAME>',
description='''
<p>Flask-Zen allows you to use PyZen via Flask-Script commands.
''',
docs='http://pythonhosted.org/Flask-Zen/',
github='coderanger/flask-zen',
approved=False
),
Extension('Flask-Static-Compress', '<NAME>',
description='''
<p>Automatically minifies, combines, and versions your static CSS
and JavaScript assets. Like Django-Compressor for Flask.
''',
github='alanhamlett/flask-static-compress',
docs='https://github.com/alanhamlett/flask-static-compress',
approved=False
),
Extension('Flask-Assets', u'<NAME>',
description='''
<p>
Integrates the webassets library with Flask, adding support for
merging, minifying and compiling CSS and Javascript files.
''',
docs='http://elsdoerfer.name/docs/flask-assets/',
github='miracle2k/flask-assets',
approved=False
),
Extension('Flask-AutoIndex', '<NAME>',
description='''
<p>
An extension that generates an index page for your Flask
application automatically
''',
docs='http://pythonhosted.org/Flask-AutoIndex/',
github='sublee/flask-autoindex',
approved=False
),
Extension('Flask-Celery', '<NAME>',
description='''
<p>
Celery integration for Flask
''',
docs='http://ask.github.com/celery/',
github='ask/flask-celery',
approved=False
),
Extension('Flask-Cors', '<NAME>',
description='''
<p>
Cross Origin Resource Sharing (CORS) for flask
''',
docs='http://flask-cors.readthedocs.org/en/latest/',
github='wcdolphin/flask-cors',
approved=False
),
Extension('Frozen-Flask', '<NAME>',
description='''
<p>
Freezes a Flask application into a set of static files.
The result can be hosted without any server-side software
other than a traditional web server.
''',
docs='http://pythonhosted.org/Frozen-Flask/',
github='SimonSapin/Frozen-Flask',
approved=True
),
Extension('Flask-FlatPages', '<NAME>',
description='''
<p>
Provides flat static pages to a Flask application, based on text
files as opposed to a relational database.
''',
docs='http://pythonhosted.org/Flask-FlatPages/',
github='SimonSapin/Flask-FlatPages',
approved=True
),
Extension('Flask-FluidDB', '<NAME>',
description='''
<p>
FluidDB access for Flask.
''',
docs='http://pythonhosted.org/Flask-FluidDB/',
bitbucket='aafshar/flask-fluiddb-main',
approved=False
),
Extension('Flask-fillin', '<NAME>',
description='''
<p>The Flask-fillin extension provides simple utilities for testing your forms in Flask application..
''',
github='jarus/flask-fillin',
docs='http://pythonhosted.org/Flask-fillin/',
),
Extension('Flask-Gravatar', '<NAME>',
description='''
<p>
Small extension for Flask to make using Gravatar easy.
''',
docs='http://pythonhosted.org/Flask-Gravatar/',
github='zzzsochi/Flask-Gravatar',
approved=False
),
Extension('Flask-HTMLBuilder', '<NAME>',
description='''
<p>
Flask-HTMLBuilder is an extension that allows flexible and easy
Python-only generation of HTML snippets and full HTML documents
using a robust syntax.
''',
docs='http://majorz.github.com/flask-htmlbuilder/',
github='majorz/flask-htmlbuilder',
approved=False
),
Extension('Flask-MongoAlchemy', '<NAME>',
description='''
<p>
Add Flask support for MongoDB using MongoAlchemy.
''',
docs='http://pythonhosted.org/Flask-MongoAlchemy/',
github='cobrateam/flask-mongoalchemy',
approved=False
),
Extension('Flask-DebugToolbar', '<NAME>',
description='''
<p>
A port of the Django debug toolbar to Flask
''',
docs='https://github.com/mgood/flask-debugtoolbar',
github='mgood/flask-debugtoolbar',
approved=False
),
Extension('Flask-Login', '<NAME>',
description='''
<p>
Flask-Login provides user session management for Flask. It
handles the common tasks of logging in, logging out, and
remembering your users' sessions over extended periods of time.
''',
github='maxcountryman/flask-login',
docs='http://pythonhosted.org/Flask-Login/',
approved=True
),
Extension('Flask-Security', '<NAME>',
description='''
<p>
Flask-Security is an opinionated Flask extension which adds
basic security and authentication features to your Flask apps
quickly and easily.
''',
docs='https://pythonhosted.org/Flask-Security/',
github='mattupstate/flask-security'
),
Extension('Flask-Exceptional', '<NAME>',
description='''
<p>
Adds Exceptional support to Flask applications
''',
docs='http://pythonhosted.org/Flask-Exceptional/',
github='jzempel/flask-exceptional',
approved=True,
),
Extension('Flask-Bcrypt', '<NAME>',
description='''
<p>
Bcrypt support for hashing passwords
''',
docs='http://pythonhosted.org/Flask-Bcrypt/',
github='maxcountryman/flask-bcrypt',
approved=True,
),
Extension('Flask-MongoKit', '<NAME>',
description='''
<p>
Flask extension to better integrate MongoKit into Flask
''',
docs='http://pythonhosted.org/Flask-MongoKit/',
github='jarus/flask-mongokit'
),
Extension('Flask-GAE-Mini-Profiler', '<NAME>',
description='''
<p>
Flask integration of gae_mini_profiler for Google App Engine.
''',
docs='http://pythonhosted.org/Flask-GAE-Mini-Profiler',
github='passy/flask-gae-mini-profiler'
),
Extension('Flask-Admin', 'Flask-Admin team',
description='''
<p>Simple and extensible administrative interface framework for Flask
''',
docs='http://flask-admin.readthedocs.org/en/latest/index.html',
github='flask-admin/flask-admin'
),
Extension('Flask-ZODB', '<NAME>',
description='''
<p>
Use the ZODB with Flask
''',
docs='http://pythonhosted.org/Flask-ZODB/',
github='dag/flask-zodb',
approved=True
),
Extension('Flask-Peewee', '<NAME>',
description='''
<p>
Integrates Flask and the peewee orm
''',
docs='http://charlesleifer.com/docs/flask-peewee/index.html',
github='coleifer/flask-peewee',
approved=False
),
Extension('Flask-Lettuce', 'Daniel, <NAME>',
description='''
<p>
Add Lettuce support for Flask
''',
# docs='http://pythonhosted.org/Flask-Lettuce/',
github='dqminh/flask-lettuce',
approved=False
),
Extension('Flask-Sijax', '<NAME>',
description='''
<p>
Flask integration for Sijax,
a Python/jQuery library that makes AJAX easy to use
''',
docs='http://pythonhosted.org/Flask-Sijax/',
github='spantaleev/flask-sijax',
approved=False
),
Extension('Flask-Dashed', '<NAME>',
description='''
<p>
Flask-Dashed provides tools for building
simple and extensible admin interfaces.
''',
docs='http://jeanphix.github.com/Flask-Dashed/',
github='jeanphix/Flask-Dashed',
approved=False
),
Extension('Flask-SeaSurf', '<NAME>',
description='''
<p>
SeaSurf is a Flask extension for preventing
cross-site request forgery (CSRF).
''',
docs='http://pythonhosted.org/Flask-SeaSurf/',
github='maxcountryman/flask-seasurf',
approved=True,
),
Extension('Flask-PonyWhoosh', '<NAME> & <NAME>',
description='''
<p>
A full-text search engine using Pony ORM and Whoosh.
''',
docs='https://pythonhosted.org/Flask-PonyWhoosh/',
github='compiteing/flask-ponywhoosh',
),
Extension('Flask-PyMongo', '<NAME>',
description='''
<p>
Flask-PyMongo bridges Flask and PyMongo.
''',
docs='http://readthedocs.org/docs/flask-pymongo/',
github='dcrosta/flask-pymongo',
),
Extension('Flask-Raptor', '<NAME>',
description='''
<p>
Flask-Raptor provides support for adding raptors
to Flask instances.
''',
docs='http://pythonhosted.org/Flask-Raptor/',
github='dplepage/flask-raptor',
),
Extension('Flask-Shelve', '<NAME>',
description='''
<p>
Flask-Shelve bridges Flask and the Python standard library
`shelve` module, for very simple (slow) no-dependency key-value
storage.
''',
docs='http://pythonhosted.org/Flask-Shelve/',
github='jamesls/flask-shelve',
),
Extension('Flask-RESTful', 'Twilio API Team',
description='''
<p>Flask-RESTful provides the building blocks for creating a great REST API.
''',
docs='https://flask-restful.readthedocs.org/',
github='flask-restful/flask-restful',
approved=True
),
Extension('Flask-Restless', '<NAME>',
description='''
<p>Flask-Restless provides simple generation of ReSTful APIs for
database models defined using Flask-SQLAlchemy. The generated
APIs send and receive messages in JSON format.
''',
docs='http://readthedocs.org/docs/flask-restless/en/latest/',
github='jfinkels/flask-restless',
approved=True
),
Extension('Flask-Heroku', '<NAME>',
description='''
<p>Sets Flask configuration defaults for Heroku-esque environment variables
''',
github='kennethreitz/flask-heroku',
approved=False
),
Extension('Flask-Mako', '<NAME>, <NAME>',
description='''
<p>Allows for <a href="http://www.makotemplates.org/">Mako templates</a>
to be used instead of Jinja2
''',
github='benselme/flask-mako',
docs='http://pythonhosted.org/Flask-Mako/',
approved=False
),
Extension('Flask-WeasyPrint', '<NAME>',
description='''
<p>Make PDF with <a href="http://weasyprint.org/">WeasyPrint</a>
in your Flask app.
''',
docs='http://pythonhosted.org/Flask-WeasyPrint/',
github='SimonSapin/Flask-WeasyPrint',
),
Extension('Flask-Classy', 'Freedom Dumlao',
description='''
<p>Class based views for Flask.
''',
github='apiguy/flask-classy',
docs='http://pythonhosted.org/Flask-Classy/',
approved=False
),
Extension('Flask-WebTest', '<NAME>',
description='''
<p>Utilities for testing Flask applications with
<a href="http://webtest.readthedocs.org/en/latest/">WebTest</a>.
''',
github='aromanovich/flask-webtest',
docs='http://flask-webtest.readthedocs.org/',
approved=False
),
Extension('Flask-Misaka', '<NAME>',
description='''
A simple extension to integrate the
<a href="http://misaka.61924.nl/">Misaka</a> module for efficiently
parsing Markdown.
''',
docs='https://flask-misaka.readthedocs.org/en/latest/',
github='singingwolfboy/flask-misaka',
approved=True,
),
Extension('Flask-Dance', '<NAME>',
description='''
Doing the OAuth dance with style using Flask, requests, and oauthlib.
''',
docs='https://flask-dance.readthedocs.org/en/latest/',
github='singingwolfboy/flask-dance',
approved=True,
),
Extension('Flask-SSE', '<NAME>',
description='''
<a href="http://www.html5rocks.com/en/tutorials/eventsource/basics/">
Server Sent Events</a> for Flask.
''',
docs='https://flask-sse.readthedocs.org/en/latest/',
github='singingwolfboy/flask-sse',
approved=True,
),
Extension('Flask-Limiter', '<NAME>',
description='''
<p>Adds Ratelimiting support to Flask.
Supports a configurable storage backend with implementations for
in-memory, redis and memcache.
''',
github='alisaifee/flask-limiter',
docs='http://flask-limiter.readthedocs.org/en/latest/',
approved=False,
),
Extension('Flask-User', '<NAME>',
description='''
Customizable User Account Management for Flask:
Register, Confirm email, Login, Change username, Change password, Forgot password,
Role-based Authorization and Internationalization.
''',
github='lingthio/flask-user',
docs='http://flask-user.readthedocs.io/',
approved=True,
),
Extension('Flask-Via', 'SOON_, <NAME>',
description='''
<p>
Provides a clean, simple URL routing framework for growing Flask
Applications.
''',
docs='http://flask-via.soon.build',
github='thisissoon/Flask-Via',
),
Extension('Flask-QueryInspect', '<NAME>',
description='''
<p>Provides metrics on SQL queries (using SQLAlchemy) executed
for each request.</p>
''',
docs='https://github.com/noise/flask-queryinspect',
github='noise/flask-queryinspect',
),
Extension('Flask-Stormpath', '<NAME>',
description='''
<p>Add Stormpath user management, authentication,
and authorization to Flask.
''',
docs='http://flask-stormpath.readthedocs.org/en/latest/',
github='stormpath/stormpath-flask'
),
Extension('Flask-Ask', '<NAME>',
description='''
<p>
Flask-Ask makes it easy to write Amazon Echo apps with Flask and
the Alexa Skills Kit.
''',
docs='http://flask-ask.readthedocs.io/en/latest/',
github='johnwheeler/flask-ask'
),
Extension('Flask-Rest-JSONAPI', '<NAME>',
description='''
<p>
Build REST APIs following the
<a href="http://jsonapi.org/format/">JSONAPI</a>
specification with a powerful data layer system.
''',
docs='http://flask-rest-jsonapi.readthedocs.io/en/latest/',
github='miLibris/flask-rest-jsonapi'
),
Extension('Flask-SAML', '<NAME>',
description='''
<p>
Enable SAML authentication for your webapp.
''',
docs='https://flask-saml.readthedocs.io/en/latest/',
bitbucket='asecurityteam/flask_saml'
),
Extension('Flask-Snow', '<NAME>',
description='''
<p>
Flask-snow enables easy access to the REST API in the ServiceNow ITSM platform
with the help of the <a href="http://github.com/rbw0/pysnow">pysnow library</a>.
Additionally, it supports OAuth for a seamless authentication / authorization experience.
''',
docs='http://flask-snow.readthedocs.io/en/latest/',
github='rbw0/flask-snow'
),
Extension('flask-keycloak', '<NAME>',
description='''
<p>Flask extension for
<a href=https://www.keycloak.org>Keycloak</a> integration.
''',
docs='https://github.com/akhilputhiry/flask-keycloak/blob/master/README.md',
github='akhilputhiry/flask-keycloak',
),
Extension('Flask-MailboxValidator', 'MailboxValidator,
description='''
<p>
Flask-MailboxValidator provides an easy way to call the MailboxValidator API which validates if an email address is a valid one.
''',
docs='https://flask-mailboxvalidator.readthedocs.io/en/latest/',
github='MailboxValidator/Flask_MailboxValidator'
),
Extension('Flask-Dropzone', 'Grey Li',
description='''
<p>
Upload file in Flask application with <a href="http://dropzonejs.com">Dropzone.js</a>.
''',
docs='https://flask-dropzone.readthedocs.io/en/latest/',
github='greyli/flask-dropzone',
),
Extension('Flask-CKEditor', 'Grey Li',
description='''
<p>
<a href="https://ckeditor.com">CKEditor</a> integration for Flask, including image
upload, code syntax highlight and more.
''',
docs='https://flask-ckeditor.readthedocs.io/en/latest/',
github='greyli/flask-ckeditor',
),
Extension('Bootstrap-Flask', 'Grey Li',
description='''
<p>
<a href="https://getbootstrap.com/">Bootstrap 4</a> helper for Flask/Jinja2.
Based on Flask-Bootstrap, but lighter and better.
''',
docs='https://bootstrap-flask.readthedocs.io/en/latest/',
github='greyli/bootstrap-flask',
),
Extension('Flask-Avatars', 'Grey Li',
description='''
<p>
All avatar generators in one place. Including:
<ul>
<li>Default avatar</li>
<li>Gravatar</li>
<li>Robohash</li>
<li>Social media avatar</li>
<li>Identicon generation</li>
<li>Avatar crop</li>
</ul>
''',
docs='https://flask-avatars.readthedocs.io/en/latest/',
github='greyli/flask-avatars',
),
Extension('Flask-Share', 'Grey Li',
description='''
<p>
Create social share component in Jinja2 template based on
<a href="https://github.com/overtrue/share.js/">share.js</a>.
''',
docs='https://flask-share.readthedocs.io/en/latest/',
github='greyli/flask-share',
),
Extension('Flask-Praetorian', '<NAME>',
description='''
<p>
API security should be strong, simple, and precise like a Roman
Legionary. This package aims to provide that. Using JWT tokens as
implemented by PyJWT, flask-praetorian uses a very simple
interface to make sure that the users accessing your API’s
endpoints are provisioned with the correct roles for access.
''',
docs='http://flask-praetorian.readthedocs.io/en/latest/',
github='dusktreader/flask-praetorian',
),
Extension('Flask-MonitoringDashboard', '<NAME>',
description='''
<p>
Flask-MonitoringDashboard is an extension that offers 3 main functionalities with little effort from the
Flask developer:
<ol>
<li>Monitor and visualize the performance of a Flask application.</li>
<li>Monitor and visualize the test coverage.</li>
<li>Collect extra information about request outliers (requests which are slower than normal).</li>
</ol>
</p>
''',
docs='http://flask-monitoringdashboard.readthedocs.io/',
github='flask-dashboard/Flask-MonitoringDashboard'
),
Extension('Flask-Dramatiq', '<NAME>',
description='''
<p>Plugs <a href="https://dramatiq.io/">Dramatiq</a> task queue in your
Flask web app.
''',
docs='https://flask-dramatiq.readthedocs.io/',
gitlab='https://gitlab.com/bersace/flask-dramatiq',
),
Extension('Flask-Assistant', '<NAME>',
description='''
<p>
Framework for building conversational apps using
Flask and API.AI with integration for Google Assistant.
''',
docs='http://flask-assistant.readthedocs.io/en/latest/',
github='treethought/flask-assistant'
),
]
# This is a list of extensions that is currently rejected from listing and with
# that also not approved. If an extension ends up here it should improved to
# be listed.
unlisted = [
Extension('Flask-Actions', 'Young King',
description='''
<p>
Flask-actions provide some management comands for flask based
project.
''',
docs='http://pythonhosted.org/Flask-Actions/',
bitbucket='youngking/flask-actions',
approved=False,
notes='''
Rejected because of missing description in PyPI, formatting issues
with the documentation (missing headlines, scrollbars etc.) and a
general clash of functionality with the Flask-Script package.
Latter should not be a problem, but the documentation should
improve. For listing, the extension developer should probably
discuss the extension on the mailinglist with others.
Futhermore it also has an egg registered with an invalid filename.
'''
),
Extension('Flask-Jinja2Extender', '<NAME>',
description='''
<p>
''',
docs=None,
github='dcolish/flask-jinja2extender',
approved=False,
notes='''
Appears to be discontinued.
Usecase not obvious, hacky implementation, does not solve a problem
that could not be solved with Flask itself. I suppose it is to aid
other extensions, but that should be discussed on the mailinglist.
'''
),
Extension('Flask-Markdown', '<NAME>',
description='''
<p>
This is a small module to a markdown processing filter into your
flask.
''',
docs='http://pythonhosted.org/Flask-Markdown/',
github='dcolish/flask-markdown',
approved=False,
notes='''
Would be great for enlisting but it should follow the API of
Flask-Creole. Besides that, the docstrings are not valid rst (run
through rst2html to see the issue) and it is missing tests.
Otherwise fine :)
'''
),
Extension('flask-urls', '<NAME>',
description='''
<p>
A collection of URL-related functions for Flask applications.
''',
docs='http://sjl.bitbucket.org/flask-urls/',
bitbucket='sjl/flask-urls',
approved=False,
notes='''
Broken PyPI index and non-conforming extension name. Due to the
small featureset this was also delisted from the list. It was
there previously before the approval process was introduced.
'''
),
Extension('Flask-Coffee', '<NAME>',
description='''
<p>
Automatically compile CoffeeScript files while developing with
the Flask framework.
''',
docs=None,
approved=False,
notes='''
On the mailing list, author claims it's flask-lesscss with a
different label. No sphinx-based docs, just a blog post. No
publicly accessible repository -- requires login on
bettercodes.org.
'''
),
Extension('Flask-Solr', '<NAME>',
description='''
<p>
Add Solr support to Flask using pysolr.
''',
docs=None,
github='willowtreeapps/flask-solr',
notes='''
Fully exposes pysolr API in Flask extension pattern, and code is
production-ready. It lacks documentation and tests.
'''
),
Extension('flask-csrf', '<NAME>',
description='''
<p>A small Flask extension for adding
<a href=http://en.wikipedia.org/wiki/CSRF>CSRF</a> protection.
''',
docs='http://sjl.bitbucket.org/flask-csrf/',
bitbucket='sjl/flask-csrf',
notes='''
Unlisted because duplicates the Flask-SeaSurf extension.
'''
),
]
extensions.sort(key=lambda x: x.name.lower())
unlisted.sort(key=lambda x: x.name.lower())
from urlparse import urljoin
server = 'https://pypi.org/'
detail_path = '/project/Flask/%s/'
class Release(object):
def __init__(self, version):
self.version = version
def to_json(self):
return dict(version=self.version,
detail_url=self.detail_url)
@property
def detail_url(self):
return urljoin(server, detail_path % self.version)
releases = map(Release, [
'0.1',
'0.2',
'0.3',
'0.3.1',
'0.4',
'0.5',
'0.5.1',
'0.5.2',
'0.6',
'0.6.1',
'0.7',
'0.7.1',
'0.7.2',
'0.8',
'0.8.1',
'0.9',
'0.10',
'0.10.1',
'0.11',
'0.11.1',
'0.12',
'0.12.1',
'0.12.2',
'0.12.3',
'0.12.4',
'1.0',
'1.0.1',
'1.0.2',
])
# -*- coding: utf-8 -*-
from urlparse import urlparse
from flask import Markup
class Project(object):
def __init__(self, name, url, description, source=None):
self.name = name
self.url = url
self.description = Markup(description)
self.source = source
@property
def host(self):
if self.url is not None:
return urlparse(self.url)[1]
@property
def sourcehost(self):
if self.source is not None:
return urlparse(self.source)[1]
def to_json(self):
rv = vars(self).copy()
rv['description'] = unicode(rv['description'])
return rv
projects = {
'websites': [
Project('Flask Website', 'http://flask.pocoo.org/', '''
<p>
The website of the Flask microframework itself including the
mailinglist interface, snippet archive and extension registry.
'''),
Project('Brightonpy', 'http://brightonpy.org/', '''
<p>
The website of the Brighton Python User Group
''', source='http://github.com/j4mie/brightonpy.org/'),
Project(u's h o r e … software development', 'http://shore.be/', '''
<p>Corporate website of Shore Software Development.
'''),
Project(u'ROCKYOU.fm', 'https://www.rockyou.fm/', '''
<p>
ROCKYOU.fm is a german internet radio station and webzine
featuring mostly metal and hard rock. Since 2012 the DJs and
reporters provide their listeners with news, reviews, feature
shows and interviews.
'''),
Project(u'MetalSpy', 'https://www.metalspy.de/', '''
<p>
MetalSpy.de is the portfolio website of a german hobby
photographer featuring mainly photos of metal bands,
festivals, fantasy conventions and cosplay.
'''),
Project('ThadeusB\'s Website', 'http://thadeusb.com/', u'''
<p>
Personal website of ThadeusB.
'''),
Project('Blueslug', 'http://blueslug.com/', u'''
<p>
A flask-powered anti-social delicious clone
'''),
Project('DotShare', 'http://dotshare.it/', u'''
<p>
Socially driven website for sharing Linux/Unix dot files.
'''),
Project(
'sopython', 'http://sopython.com/',
'<p>Site of the Python chat room on Stack Overflow. '
'Includes OAuth authentication, a wiki, and a growing, '
'searchable list of "canonical" answers to Python '
'questions on SO.</p>',
source='https://github.com/sopython/sopython-site'
)
],
'apps': [
Project('hg-review', None, '''
<p>
hg-review is a code review system for Mercurial. It is available
GPL2 license.
''', source='http://bitbucket.org/sjl/hg-review/'),
Project('Ryshcate', None, '''
<p>
Ryshcate is a Flask powered pastebin with sourcecode
available.
''', source='http://bitbucket.org/leafstorm/ryshcate/'),
Project(u'Übersuggest Keyword Suggestion Tool', None, u'''
<p>
Übersuggest is a free tool that exploit the Google
suggest JSON API to get keyword ideas for your search marketing
campaign (PPC or SEO).
''', source='http://bitbucket.org/esaurito/ubersuggest'),
Project('Have they emailed me?', None, '''
<p>
A mini-site for checking Google's GMail feed with Oauth.
''', source='http://github.com/lincolnloop/emailed-me'),
Project('Remar.kZ', None, '''
<p>
Sometimes you use someone else's computer and find something
neat and interesting. Store it on Remar.kZ without having
to enter your credentials.
''', source='http://bitbucket.org/little_arhat/remarkz'),
Project('Domination', None, u'''
<p>
Domination is a clone of a well-known card game.
''', source='https://bitbucket.org/xoraxax/domination/'),
Project('jitviewer', None, '''
<p>
web-based tool to inspect the output of PyPy JIT log
''', source='https://bitbucket.org/pypy/jitviewer'),
Project('blohg', 'http://blohg.org/', '''
<p>
A mercurial based blog engine.
''', source='https://github.com/rafaelmartins/blohg'),
Project('pidsim-web', None, '''
<p>
PID Controller simulator.
''', source='https://github.com/rafaelmartins/pidsim-web'),
Project('HTTPBin', 'http://httpbin.org/', u'''
<p>
An HTTP request & response service.
''', source='https://github.com/kennethreitz/httpbin'),
Project('Flask-Pastebin', None, u'''
<p>
Pastebin app with Flask and a few extensions that does Facebook
connect as well as realtime push notifications with socket.io
and juggernaut.
''', source='https://github.com/mitsuhiko/flask-pastebin'),
Project('newsmeme', None, u'''
<p>
A hackernews/reddit clone written with Flask and
various Flask extensions.
''', source='https://bitbucket.org/danjac/newsmeme'),
Project('Indico', 'https://getindico.io/', u'''
<p>
Indico is a full-fledged meeting and conference management
system developed at CERN. It includes advanced features such
as integration with collaborative systems, a plugin system
and support for SSO-based authentication.
''', source='https://github.com/indico/indico/'),
Project('SayHello', 'http://sayhello.helloflask.com', u'''
<p>
A simple message board.
''', source='https://github.com/greyli/sayhello'),
Project('Bluelog', 'http://bluelog.helloflask.com', u'''
<p>
A blog engine that supports category and resource management.
''', source='https://github.com/greyli/bluelog'),
Project('Albumy', 'http://albumy.helloflask.com', u'''
<p>
A full-featured photo-sharing social networking.
''', source='https://github.com/greyli/albumy'),
Project('Todoism', 'http://todoism.helloflask.com', u'''
<p>
A to-do application implements as SPA, it supports
i18n (Flask-Babel) and provides web APIs.
''', source='https://github.com/greyli/todoism'),
Project('CatChat', 'http://catchat.helloflask.com', u'''
<p>
A chat room based on WebSocket (Flask-Socket-IO), fetured
with Markdown support and code syntax highlighting.
''', source='https://github.com/greyli/catchat'),
]
}
# order projects by name
for _category in projects.itervalues():
_category.sort(key=lambda x: x.name.lower())
del _category
from datetime import datetime
from sqlalchemy import create_engine, Column, Integer, String, DateTime, \
ForeignKey, event
from sqlalchemy.orm import scoped_session, sessionmaker, backref, relation
from sqlalchemy.ext.declarative import declarative_base
from werkzeug import cached_property, http_date
from flask import url_for, Markup
from flask_website import app, search
engine = create_engine(app.config['DATABASE_URI'],
convert_unicode=True,
**app.config['DATABASE_CONNECT_OPTIONS'])
db_session = scoped_session(sessionmaker(autocommit=False,
autoflush=False,
bind=engine))
def init_db():
Model.metadata.create_all(bind=engine)
Model = declarative_base(name='Model')
Model.query = db_session.query_property()
class User(Model):
__tablename__ = 'users'
id = Column('user_id', Integer, primary_key=True)
openid = Column('openid', String(200))
name = Column(String(200))
def __init__(self, name, openid):
self.name = name
self.openid = openid
def to_json(self):
return dict(name=self.name, is_admin=self.is_admin)
@property
def is_admin(self):
return self.openid in app.config['ADMINS']
def __eq__(self, other):
return type(self) is type(other) and self.id == other.id
def __ne__(self, other):
return not self.__eq__(other)
class Category(Model):
__tablename__ = 'categories'
id = Column('category_id', Integer, primary_key=True)
name = Column(String(50))
slug = Column(String(50))
def __init__(self, name):
self.name = name
self.slug = '-'.join(name.split()).lower()
def to_json(self):
return dict(name=self.name, slug=self.slug, count=self.count)
@cached_property
def count(self):
return self.snippets.count()
@property
def url(self):
return url_for('snippets.category', slug=self.slug)
class Snippet(Model, search.Indexable):
__tablename__ = 'snippets'
id = Column('snippet_id', Integer, primary_key=True)
author_id = Column(Integer, ForeignKey('users.user_id'))
category_id = Column(Integer, ForeignKey('categories.category_id'))
title = Column(String(200))
body = Column(String)
pub_date = Column(DateTime)
author = relation(User, backref=backref('snippets', lazy='dynamic'))
category = relation(Category, backref=backref('snippets', lazy='dynamic'))
search_document_kind = 'snippet'
def __init__(self, author, title, body, category):
self.author = author
self.title = title
self.body = body
self.category = category
self.pub_date = datetime.utcnow()
def to_json(self):
return dict(id=self.id, title=self.title,
body=unicode(self.rendered_body),
pub_date=http_date(self.pub_date),
comments=[c.to_json() for c in self.comments],
author=self.author.to_json(),
category=self.category.slug)
def get_search_document(self):
return dict(
id=unicode(self.id),
title=self.title,
keywords=[self.category.name],
content=self.body
)
@classmethod
def describe_search_result(cls, result):
obj = cls.query.get(int(result['id']))
if obj is not None:
text = obj.rendered_body.striptags()
return Markup(result.highlights('content', text=text)) or None
@property
def url(self):
return url_for('snippets.show', id=self.id)
@property
def rendered_body(self):
from flask_website.utils import format_creole
return format_creole(self.body)
class Comment(Model):
__tablename__ = 'comments'
id = Column('comment_id', Integer, primary_key=True)
snippet_id = Column(Integer, ForeignKey('snippets.snippet_id'))
author_id = Column(Integer, ForeignKey('users.user_id'))
title = Column(String(200))
text = Column(String)
pub_date = Column(DateTime)
snippet = relation(Snippet, backref=backref('comments', lazy=True))
author = relation(User, backref=backref('comments', lazy='dynamic'))
def __init__(self, snippet, author, title, text):
self.snippet = snippet
self.author = author
self.title = title
self.text = text
self.pub_date = datetime.utcnow()
def to_json(self):
return dict(author=self.author.to_json(),
title=self.title,
pub_date=http_date(self.pub_date),
text=unicode(self.rendered_text))
@property
def rendered_text(self):
from flask_website.utils import format_creole
return format_creole(self.text)
class OpenIDAssociation(Model):
__tablename__ = 'openid_associations'
id = Column('association_id', Integer, primary_key=True)
server_url = Column(String(1024))
handle = Column(String(255))
secret = Column(String(255))
issued = Column(Integer)
lifetime = Column(Integer)
assoc_type = Column(String(64))
class OpenIDUserNonce(Model):
__tablename__ = 'openid_user_nonces'
id = Column('user_nonce_id', Integer, primary_key=True)
server_url = Column(String(1024))
timestamp = Column(Integer)
salt = Column(String(40))
event.listen(db_session, 'after_flush', search.update_model_based_indexes)
from datetime import datetime
from flask import Flask, session, g, render_template
from flask_openid import OpenID
app = Flask(__name__)
app.config.from_object('websiteconfig')
from flask_website.openid_auth import DatabaseOpenIDStore
oid = OpenID(app, store_factory=DatabaseOpenIDStore)
@app.errorhandler(404)
def not_found(error):
return render_template('404.html'), 404
@app.before_request
def load_current_user():
g.user = User.query.filter_by(openid=session['openid']).first() \
if 'openid' in session else None
@app.teardown_request
def remove_db_session(exception):
db_session.remove()
@app.context_processor
def current_year():
return {'current_year': datetime.utcnow().year}
app.add_url_rule('/docs/', endpoint='docs.index', build_only=True)
app.add_url_rule('/docs/<path:page>/', endpoint='docs.show',
build_only=True)
app.add_url_rule('/docs/<version>/.latex/Flask.pdf', endpoint='docs.pdf',
build_only=True)
from flask_website.views import general
from flask_website.views import community
from flask_website.views import mailinglist
from flask_website.views import snippets
from flask_website.views import extensions
app.register_blueprint(general.mod)
app.register_blueprint(community.mod)
app.register_blueprint(mailinglist.mod)
app.register_blueprint(snippets.mod)
app.register_blueprint(extensions.mod)
from flask_website.database import User, db_session
from flask_website import utils
app.jinja_env.filters['datetimeformat'] = utils.format_datetime
app.jinja_env.filters['dateformat'] = utils.format_date
app.jinja_env.filters['timedeltaformat'] = utils.format_timedelta
app.jinja_env.filters['displayopenid'] = utils.display_openid
# -*- coding: utf-8 -*-
import os
import re
from flask import url_for, Markup
from flask_website import app
from flask_website.search import Indexable
_doc_body_re = re.compile(r'''(?smx)
<title>(.*?)</title>.*?
<div.*?class=".*?body.*?>(.*)
<div.*?class=".*?sphinxsidebar
''')
class DocumentationPage(Indexable):
search_document_kind = 'documentation'
def __init__(self, slug):
self.slug = slug
fn = os.path.join(app.config['DOCUMENTATION_PATH'],
slug, 'index.html')
with open(fn) as f:
contents = f.read().decode('utf-8')
title, text = _doc_body_re.search(contents).groups()
self.title = Markup(title).striptags().split(u'—')[0].strip()
self.text = Markup(text).striptags().strip().replace(u'¶', u'')
def get_search_document(self):
return dict(
id=unicode(self.slug),
title=self.title,
keywords=[],
content=self.text
)
@property
def url(self):
return url_for('docs.show', page=self.slug)
@classmethod
def describe_search_result(cls, result):
rv = cls(result['id'])
return Markup(result.highlights('content', text=rv.text)) or None
@classmethod
def iter_pages(cls):
base_folder = os.path.abspath(app.config['DOCUMENTATION_PATH'])
for dirpath, dirnames, filenames in os.walk(base_folder):
if 'index.html' in filenames:
slug = dirpath[len(base_folder) + 1:]
# skip the index page. useless
if slug:
yield DocumentationPage(slug)
import re
import creoleparser
from datetime import datetime, timedelta
from genshi import builder
from functools import wraps
from creoleparser.elements import PreBlock
from pygments import highlight
from pygments.formatters import HtmlFormatter
from pygments.lexers import get_lexer_by_name
from pygments.util import ClassNotFound
from flask import g, url_for, flash, abort, request, redirect, Markup
from flask_website.flaskystyle import FlaskyStyle # same as docs
pygments_formatter = HtmlFormatter(style=FlaskyStyle)
_ws_split_re = re.compile(r'(\s+)')
TIMEDELTA_UNITS = (
('year', 3600 * 24 * 365),
('month', 3600 * 24 * 30),
('week', 3600 * 24 * 7),
('day', 3600 * 24),
('hour', 3600),
('minute', 60),
('second', 1)
)
class CodeBlock(PreBlock):
def __init__(self):
super(CodeBlock, self).__init__('pre', ['{{{', '}}}'])
def _build(self, mo, element_store, environ):
lines = self.regexp2.sub(r'\1', mo.group(1)).splitlines()
if lines and lines[0].startswith('#!'):
try:
lexer = get_lexer_by_name(lines.pop(0)[2:].strip())
except ClassNotFound:
pass
else:
return Markup(highlight(u'\n'.join(lines), lexer,
pygments_formatter))
return builder.tag.pre(u'\n'.join(lines))
custom_dialect = creoleparser.create_dialect(creoleparser.creole10_base)
# hacky way to get rid of image support
custom_dialect.img = custom_dialect.no_wiki
custom_dialect.pre = CodeBlock()
_parser = creoleparser.Parser(
dialect=custom_dialect,
method='html'
)
def format_creole(text):
return Markup(_parser.render(text, encoding=None))
def split_lines_wrapping(text, width=74, threshold=82):
lines = text.splitlines()
if all(len(line) <= threshold for line in lines):
return lines
result = []
for line in lines:
if len(line) <= threshold:
result.append(line)
continue
line_width = 0
line_buffer = []
for piece in _ws_split_re.split(line):
line_width += len(piece)
if line_width > width:
result.append(u''.join(line_buffer))
line_buffer = []
if not piece.isspace():
line_buffer.append(piece)
line_width = len(piece)
else:
line_width = 0
else:
line_buffer.append(piece)
if line_buffer:
result.append(u''.join(line_buffer))
return result
def request_wants_json():
# we only accept json if the quality of json is greater than the
# quality of text/html because text/html is preferred to support
# browsers that accept on */*
best = request.accept_mimetypes \
.best_match(['application/json', 'text/html'])
return best == 'application/json' and \
request.accept_mimetypes[best] > request.accept_mimetypes['text/html']
def requires_login(f):
@wraps(f)
def decorated_function(*args, **kwargs):
if g.user is None:
flash(u'You need to be signed in for this page.')
return redirect(url_for('general.login', next=request.path))
return f(*args, **kwargs)
return decorated_function
def requires_admin(f):
@wraps(f)
def decorated_function(*args, **kwargs):
if not g.user.is_admin:
abort(401)
return f(*args, **kwargs)
return requires_login(decorated_function)
def format_datetime(dt):
return dt.strftime('%Y-%m-%d @ %H:%M')
def format_date(dt):
return dt.strftime('%Y-%m-%d')
def format_timedelta(delta, granularity='second', threshold=.85):
if isinstance(delta, datetime):
delta = datetime.utcnow() - delta
if isinstance(delta, timedelta):
seconds = int((delta.days * 86400) + delta.seconds)
else:
seconds = delta
for unit, secs_per_unit in TIMEDELTA_UNITS:
value = abs(seconds) / secs_per_unit
if value >= threshold or unit == granularity:
if unit == granularity and value > 0:
value = max(1, value)
value = int(round(value))
rv = u'%s %s' % (value, unit)
if value != 1:
rv += u's'
return rv
return u''
def display_openid(openid):
if not openid:
return ''
rv = openid
if rv.startswith(('http://', 'https://')):
rv = rv.split('/', 2)[-1]
return rv.rstrip('/')
from time import time
from openid.association import Association
from openid.store.interface import OpenIDStore
from openid.store import nonce
from flask_website.database import db_session, OpenIDAssociation, \
OpenIDUserNonce
class DatabaseOpenIDStore(OpenIDStore):
"""Implements the open store for the website using the database."""
def storeAssociation(self, server_url, association):
assoc = OpenIDAssociation(
server_url=server_url,
handle=association.handle,
secret=association.secret.encode('base64'),
issued=association.issued,
lifetime=association.lifetime,
assoc_type=association.assoc_type
)
db_session.add(assoc)
db_session.commit()
def getAssociation(self, server_url, handle=None):
q = OpenIDAssociation.query.filter_by(server_url=server_url)
if handle is not None:
q = q.filter_by(handle=handle)
result_assoc = None
for item in q.all():
assoc = Association(item.handle, item.secret.decode('base64'),
item.issued, item.lifetime, item.assoc_type)
if assoc.getExpiresIn() <= 0:
self.removeAssociation(server_url, assoc.handle)
else:
result_assoc = assoc
return result_assoc
def removeAssociation(self, server_url, handle):
try:
return OpenIDAssociation.query.filter(
(OpenIDAssociation.server_url == server_url) &
(OpenIDAssociation.handle == handle)
).delete()
finally:
db_session.commit()
def useNonce(self, server_url, timestamp, salt):
if abs(timestamp - time()) > nonce.SKEW:
return False
rv = OpenIDUserNonce.query.filter(
(OpenIDUserNonce.server_url == server_url) &
(OpenIDUserNonce.timestamp == timestamp) &
(OpenIDUserNonce.salt == salt)
).first()
if rv is not None:
return False
rv = OpenIDUserNonce(server_url=server_url, timestamp=timestamp,
salt=salt)
db_session.add(rv)
db_session.commit()
return True
def cleanupNonces(self):
try:
return OpenIDUserNonce.query.filter(
OpenIDUserNonce.timestamp <= int(time() - nonce.SKEW)
).delete()
finally:
db_session.commit()
def cleanupAssociations(self):
try:
return OpenIDAssociation.query.filter(
OpenIDAssociation.lifetime < int(time())
).delete()
finally:
db_session.commit()
# -*- coding: utf-8 -*-
import os
from whoosh import highlight, analysis, qparser
from whoosh.support.charset import accent_map
from flask import Markup
from flask_website import app
from werkzeug import import_string
def open_index():
from whoosh import index, fields as f
if os.path.isdir(app.config['WHOOSH_INDEX']):
return index.open_dir(app.config['WHOOSH_INDEX'])
os.mkdir(app.config['WHOOSH_INDEX'])
analyzer = analysis.StemmingAnalyzer() | analysis.CharsetFilter(accent_map)
schema = f.Schema(
url=f.ID(stored=True, unique=True),
id=f.ID(stored=True),
title=f.TEXT(stored=True, field_boost=2.0, analyzer=analyzer),
type=f.ID(stored=True),
keywords=f.KEYWORD(commas=True),
content=f.TEXT(analyzer=analyzer)
)
return index.create_in(app.config['WHOOSH_INDEX'], schema)
index = open_index()
class Indexable(object):
search_document_kind = None
def add_to_search_index(self, writer):
writer.add_document(url=unicode(self.url),
type=self.search_document_type,
**self.get_search_document())
@classmethod
def describe_search_result(cls, result):
return None
@property
def search_document_type(self):
cls = type(self)
return cls.__module__ + u'.' + cls.__name__
def get_search_document(self):
raise NotImplementedError()
def remove_from_search_index(self, writer):
writer.delete_by_term('url', unicode(self.url))
def highlight_all(result, field):
text = result[field]
return Markup(highlight.Highlighter(
fragmenter=highlight.WholeFragmenter(),
formatter=result.results.highlighter.formatter)
.highlight_hit(result, field, text=text)) or text
class SearchResult(object):
def __init__(self, result):
self.url = result['url']
self.title_text = result['title']
self.title = highlight_all(result, 'title')
cls = import_string(result['type'])
self.kind = cls.search_document_kind
self.description = cls.describe_search_result(result)
class SearchResultPage(object):
def __init__(self, results, page):
self.page = page
if results is None:
self.results = []
self.pages = 1
self.total = 0
else:
self.results = [SearchResult(r) for r in results]
self.pages = results.pagecount
self.total = results.total
def __iter__(self):
return iter(self.results)
def search(query, page=1, per_page=20):
with index.searcher() as s:
qp = qparser.MultifieldParser(['title', 'content'], index.schema)
q = qp.parse(unicode(query))
try:
result_page = s.search_page(q, page, pagelen=per_page)
except ValueError:
if page == 1:
return SearchResultPage(None, page)
return None
results = result_page.results
results.highlighter.fragmenter.maxchars = 512
results.highlighter.fragmenter.surround = 40
results.highlighter.formatter = highlight.HtmlFormatter('em',
classname='search-match', termclass='search-term',
between=u'<span class=ellipsis> … </span>')
return SearchResultPage(result_page, page)
def update_model_based_indexes(session, flush_context):
"""Called by a session event, updates the model based documents."""
to_delete = []
to_add = []
for model in session.new:
if isinstance(model, Indexable):
to_add.append(model)
for model in session.dirty:
if isinstance(model, Indexable):
to_delete.append(model)
to_add.append(model)
for model in session.dirty:
if isinstance(model, Indexable):
to_delete.append(model)
if not (to_delete or to_add):
return
writer = index.writer()
for model in to_delete:
model.remove_from_search_index(writer)
for model in to_add:
model.add_to_search_index(writer)
writer.commit()
def update_documentation_index():
from flask_website.docs import DocumentationPage
writer = index.writer()
for page in DocumentationPage.iter_pages():
page.remove_from_search_index(writer)
page.add_to_search_index(writer)
writer.commit()
def reindex_snippets():
from flask_website.database import Snippet
writer = index.writer()
for snippet in Snippet.query.all():
snippet.remove_from_search_index(writer)
snippet.add_to_search_index(writer)
writer.commit()
from __future__ import with_statement
from flask import Blueprint, render_template, redirect
mod = Blueprint('mailinglist', __name__, url_prefix='/mailinglist')
@mod.route('/')
def index():
return render_template('mailinglist/index.html')
@mod.route('/archive/', defaults={'page': 1})
@mod.route('/archive/page/<int:page>/')
def archive(page):
return redirect('http://librelist.com/browser/flask/')
@mod.route('/archive/<int:year>/<int:month>/<int:day>/<slug>/')
def show_thread(year, month, day, slug):
return redirect('http://librelist.com/browser/flask/%s/%s/%s/%s'
% (year, month, day, slug))
from flask import Blueprint, render_template, jsonify, redirect, \
url_for
from flask_website.utils import request_wants_json
from flask_website.listings.extensions import extensions, unlisted
mod = Blueprint('extensions', __name__, url_prefix='/extensions')
@mod.route('/')
def index():
if request_wants_json():
return jsonify(extensions=[ext.to_json() for ext in extensions],
unlisted_extensions=[ext.to_json() for ext in unlisted])
return render_template('extensions/index.html', extensions=extensions)
@mod.route('/creating/')
def creating():
return redirect(url_for('docs.show', page='extensiondev'), 301)
from flask import Blueprint, render_template, jsonify
from flask_website.utils import request_wants_json
from flask_website.listings.projects import projects
mod = Blueprint('community', __name__, url_prefix='/community')
@mod.route('/')
def index():
return render_template('community/index.html')
@mod.route('/irc/')
def irc():
return render_template('community/irc.html')
@mod.route('/badges/')
def badges():
return render_template('community/badges.html')
@mod.route('/poweredby/')
def poweredby():
if request_wants_json():
return jsonify((k, [p.to_json() for p in v])
for k, v in projects.iteritems())
return render_template('community/poweredby.html', projects=projects)
@mod.route('/logos/')
def logos():
return render_template('community/logos.html')
# -*- coding: utf-8 -*-
from flask import Blueprint, abort, flash, g, jsonify, redirect, \
render_template, request, url_for
from flask_website.utils import format_creole, request_wants_json, \
requires_admin, requires_login
from flask_website.database import Category, Comment, Snippet, db_session
mod = Blueprint('snippets', __name__, url_prefix='/snippets')
@mod.route('/')
def index():
return render_template('snippets/index.html',
categories=Category.query.order_by(Category.name).all())
@mod.route('/<int:id>/', methods=['GET', 'POST'])
def show(id):
snippet = Snippet.query.get(id)
if snippet is None:
abort(404)
if request_wants_json():
return jsonify(snippet=snippet.to_json())
if request.method == 'POST':
title = request.form['title']
text = request.form['text']
if text:
db_session.add(Comment(snippet, g.user, title, text))
db_session.commit()
flash(u'Your comment was added')
return redirect(snippet.url)
return render_template('snippets/show.html', snippet=snippet)
@mod.route('/comments/<int:id>/', methods=['GET', 'POST'])
@requires_admin
def edit_comment(id):
comment = Comment.query.get(id)
if comment is None:
abort(404)
snippet = comment.snippet
form = dict(title=comment.title, text=comment.text)
if request.method == 'POST':
if 'delete' in request.form:
db_session.delete(comment)
db_session.commit()
flash(u'Comment was deleted.')
return redirect(snippet.url)
elif 'cancel' in request.form:
return redirect(snippet.url)
form['title'] = request.form['title']
form['text'] = request.form['text']
if not form['text']:
flash(u'Error: comment text is required.')
else:
comment.title = form['title']
comment.text = form['text']
db_session.commit()
flash(u'Comment was updated.')
return redirect(snippet.url)
return render_template('snippets/edit_comment.html', form=form,
comment=comment)
@mod.route('/edit/<int:id>/', methods=['GET', 'POST'])
@requires_login
def edit(id):
snippet = Snippet.query.get(id)
if snippet is None:
abort(404)
if g.user is None or (not g.user.is_admin and snippet.author != g.user):
abort(401)
preview = None
form = dict(title=snippet.title, body=snippet.body,
category=snippet.category.id)
if request.method == 'POST':
form['title'] = request.form['title']
form['body'] = request.form['body']
form['category'] = request.form.get('category', type=int)
if 'preview' in request.form:
preview = format_creole(request.form['body'])
elif 'delete' in request.form:
for comment in snippet.comments:
db_session.delete(comment)
db_session.delete(snippet)
db_session.commit()
flash(u'Your snippet was deleted')
return redirect(url_for('snippets.index'))
else:
category_id = request.form.get('category', type=int)
if not form['body']:
flash(u'Error: you have to enter a snippet')
else:
category = Category.query.get(category_id)
if category is not None:
snippet.title = form['title']
snippet.body = form['body']
snippet.category = category
db_session.commit()
flash(u'Your snippet was modified')
return redirect(snippet.url)
return render_template('snippets/edit.html',
snippet=snippet, preview=preview, form=form,
categories=Category.query.order_by(Category.name).all())
@mod.route('/category/<slug>/')
def category(slug):
category = Category.query.filter_by(slug=slug).first()
if category is None:
abort(404)
snippets = category.snippets.order_by(Snippet.title).all()
if request_wants_json():
return jsonify(category=category.to_json(),
snippets=[s.id for s in snippets])
return render_template('snippets/category.html', category=category,
snippets=snippets)
from flask import Blueprint, render_template, session, redirect, url_for, \
request, flash, g, jsonify, abort
from flask_openid import COMMON_PROVIDERS
from flask_website import oid
from flask_website.search import search as perform_search
from flask_website.utils import requires_login, request_wants_json
from flask_website.database import db_session, User
from flask_website.listings.releases import releases
mod = Blueprint('general', __name__)
@mod.route('/')
def index():
if request_wants_json():
return jsonify(releases=[r.to_json() for r in releases])
return render_template(
'general/index.html',
latest_release=releases[-1],
# pdf link does not redirect, needs version
# docs version only includes major.minor
docs_pdf_version='.'.join(releases[-1].version.split('.', 2)[:2])
)
@mod.route('/search/')
def search():
q = request.args.get('q') or ''
page = request.args.get('page', type=int) or 1
results = None
if q:
results = perform_search(q, page=page)
if results is None:
abort(404)
return render_template('general/search.html', results=results, q=q)
@mod.route('/logout/')
def logout():
if 'openid' in session:
flash(u'Logged out')
del session['openid']
return redirect(request.referrer or url_for('general.index'))
@mod.route('/login/', methods=['GET', 'POST'])
@oid.loginhandler
def login():
if g.user is not None:
return redirect(url_for('general.index'))
if 'cancel' in request.form:
flash(u'Cancelled. The OpenID was not changed.')
return redirect(oid.get_next_url())
openid = request.values.get('openid')
if not openid:
openid = COMMON_PROVIDERS.get(request.args.get('provider'))
if openid:
return oid.try_login(openid, ask_for=['fullname', 'nickname'])
error = oid.fetch_error()
if error:
flash(u'Error: ' + error)
return render_template('general/login.html', next=oid.get_next_url())
@mod.route('/first-login/', methods=['GET', 'POST'])
def first_login():
if g.user is not None or 'openid' not in session:
return redirect(url_for('.login'))
if request.method == 'POST':
if 'cancel' in request.form:
del session['openid']
flash(u'Login was aborted')
return redirect(url_for('general.login'))
db_session.add(User(request.form['name'], session['openid']))
db_session.commit()
flash(u'Successfully created profile and logged in')
return redirect(oid.get_next_url())
return render_template('general/first_login.html',
next=oid.get_next_url(),
openid=session['openid'])
@mod.route('/profile/', methods=['GET', 'POST'])
@requires_login
def profile():
name = g.user.name
if request.method == 'POST':
name = request.form['name'].strip()
if not name:
flash(u'Error: a name is required')
else:
g.user.name = name
db_session.commit()
flash(u'User profile updated')
return redirect(url_for('.index'))
return render_template('general/profile.html', name=name)
@mod.route('/profile/change-openid/', methods=['GET', 'POST'])
@requires_login
@oid.loginhandler
def change_openid():
if request.method == 'POST':
if 'cancel' in request.form:
flash(u'Cancelled. The OpenID was not changed.')
return redirect(oid.get_next_url())
openid = request.values.get('openid')
if not openid:
openid = COMMON_PROVIDERS.get(request.args.get('provider'))
if openid:
return oid.try_login(openid)
error = oid.fetch_error()
if error:
flash(u'Error: ' + error)
return render_template('general/change_openid.html',
next=oid.get_next_url())
@oid.after_login
def create_or_login(resp):
session['openid'] = resp.identity_url
user = g.user or User.query.filter_by(openid=resp.identity_url).first()
if user is None:
return redirect(url_for('.first_login', next=oid.get_next_url(),
name=resp.fullname or resp.nickname))
if user.openid != resp.identity_url:
user.openid = resp.identity_url
db_session.commit()
flash(u'OpenID identity changed')
else:
flash(u'Successfully signed in')
return redirect(oid.get_next_url())
| [
1,
529,
9507,
29958,
4836,
2283,
29889,
2272,
13,
3166,
29784,
29918,
22942,
1053,
623,
13,
932,
29889,
3389,
29898,
8382,
29922,
5574,
29897,
13,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
3166,
29784,
29918,
22942,
1053,
623,
13,
3166,
29784,
29918,
22942,
29889,
4478,
1053,
2767,
29918,
12663,
29918,
2248,
13,
2541,
623,
29889,
1688,
29918,
3827,
29918,
4703,
7295,
13,
1678,
2767,
29918,
12663,
29918,
2248,
580,
13,
13,
5215,
2897,
13,
13,
29918,
6707,
381,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
876,
13,
13,
18525,
353,
7700,
13,
13,
1660,
22245,
29911,
29918,
10818,
353,
525,
1688,
1989,
29915,
13,
25832,
27982,
29918,
15551,
353,
525,
22793,
597,
22208,
718,
2897,
29889,
2084,
29889,
7122,
7373,
6707,
381,
29892,
525,
1579,
1278,
29899,
22942,
29889,
2585,
1495,
13,
25832,
27982,
29918,
6007,
8186,
1783,
29918,
14094,
27946,
353,
6571,
13,
3035,
16173,
29903,
353,
14671,
29920,
575,
300,
18959,
1124,
597,
29880,
1682,
398,
29878,
29889,
29886,
542,
3634,
29889,
990,
29914,
11287,
13,
13,
29956,
8187,
3267,
29950,
29918,
27992,
353,
2897,
29889,
2084,
29889,
7122,
7373,
6707,
381,
29892,
525,
1579,
1278,
29899,
22942,
29889,
15970,
10578,
1495,
13,
28665,
5005,
3919,
8098,
29918,
10145,
353,
2897,
29889,
2084,
29889,
7122,
7373,
6707,
381,
29892,
525,
6995,
1579,
1278,
29914,
2640,
19891,
4282,
29914,
3972,
1420,
1495,
13,
13,
6144,
2897,
13,
13,
29937,
29784,
29891,
17752,
29889,
29871,
29784,
29891,
19484,
1860,
3114,
2729,
373,
260,
4524,
3114,
13,
3166,
19484,
1860,
29889,
3293,
1053,
22135,
13,
3166,
19484,
1860,
29889,
6979,
1053,
7670,
1742,
29892,
4408,
29892,
461,
29892,
1714,
29892,
4829,
29892,
320,
13,
268,
9681,
29892,
6607,
1061,
29892,
3251,
293,
29892,
806,
3246,
3535,
29892,
349,
18049,
29884,
362,
29892,
5901,
29892,
5449,
284,
13,
13,
13,
1990,
2379,
1278,
29891,
5568,
29898,
5568,
1125,
13,
1678,
3239,
29918,
2780,
353,
12305,
29888,
29947,
29888,
29947,
29888,
29947,
29908,
13,
1678,
2322,
29918,
3293,
353,
5124,
13,
13,
1678,
11949,
353,
426,
13,
4706,
396,
1939,
6590,
770,
363,
278,
1494,
29901,
13,
4706,
396,
1626,
29901,
462,
268,
12633,
396,
770,
29901,
29871,
6629,
13,
4706,
806,
3246,
3535,
29901,
18884,
376,
15614,
396,
29888,
29947,
29888,
29947,
29888,
29947,
613,
418,
396,
770,
29901,
525,
29893,
29915,
13,
4706,
4829,
29901,
462,
268,
12305,
29874,
29946,
29900,
29900,
29900,
29900,
5139,
21968,
1389,
29906,
29929,
29906,
29929,
613,
396,
770,
29901,
525,
3127,
29915,
13,
4706,
5901,
29901,
462,
268,
12305,
29900,
29900,
29900,
29900,
29900,
29900,
613,
18884,
396,
770,
525,
29916,
29915,
13,
13,
4706,
461,
29901,
462,
259,
376,
2410,
293,
396,
29947,
29888,
29945,
29929,
29900,
29906,
613,
396,
770,
29901,
525,
29883,
29915,
13,
4706,
461,
29889,
6572,
15439,
29901,
965,
376,
1217,
2410,
293,
613,
539,
396,
770,
29901,
525,
6814,
29915,
13,
13,
4706,
7670,
1742,
29901,
462,
259,
376,
8934,
396,
29900,
29900,
29946,
29946,
29953,
29896,
613,
259,
396,
770,
29901,
525,
29895,
29915,
13,
4706,
7670,
1742,
29889,
12075,
424,
29901,
3986,
376,
8934,
396,
29900,
29900,
29946,
29946,
29953,
29896,
613,
259,
396,
770,
29901,
525,
12192,
29915,
13,
4706,
7670,
1742,
29889,
6185,
23838,
29901,
539,
376,
8934,
396,
29900,
29900,
29946,
29946,
29953,
29896,
613,
259,
396,
770,
29901,
525,
29895,
29881,
29915,
13,
4706,
7670,
1742,
29889,
23335,
29901,
308,
376,
8934,
396,
29900,
29900,
29946,
29946,
29953,
29896,
613,
259,
396,
770,
29901,
525,
3959,
29915,
13,
4706,
7670,
1742,
29889,
29925,
344,
5333,
29901,
9651,
376,
8934,
396,
29900,
29900,
29946,
29946,
29953,
29896,
613,
259,
396,
770,
29901,
525,
29895,
29886,
29915,
13,
4706,
7670,
1742,
29889,
1666,
9841,
29901,
3986,
376,
8934,
396,
29900,
29900,
29946,
29946,
29953,
29896,
613,
259,
396,
770,
29901,
525,
12748,
29915,
13,
4706,
7670,
1742,
29889,
1542,
29901,
795,
376,
8934,
396,
29900,
29900,
29946,
29946,
29953,
29896,
613,
259,
396,
770,
29901,
525,
1193,
29915,
13,
13,
4706,
6607,
1061,
29901,
462,
29871,
12305,
29945,
29947,
29906,
29947,
29900,
29900,
613,
259,
396,
770,
29901,
525,
29877,
29915,
13,
4706,
6607,
1061,
29889,
14463,
29901,
632,
376,
8934,
396,
29900,
29900,
29946,
29946,
29953,
29896,
613,
259,
396,
770,
29901,
525,
340,
29915,
448,
763,
29361,
13,
13,
4706,
349,
18049,
29884,
362,
29901,
1669,
376,
8934,
396,
29900,
29900,
29900,
29900,
29900,
29900,
613,
259,
396,
770,
29901,
525,
29886,
29915,
13,
13,
4706,
396,
1363,
4266,
2983,
1316,
408,
4408,
29889,
2385,
29892,
4408,
29889,
6678,
29892,
2992,
29889,
13,
4706,
396,
526,
451,
14831,
408,
1316,
2678,
297,
278,
13755,
29892,
591,
6755,
963,
13,
4706,
396,
304,
1106,
278,
1021,
408,
15311,
3651,
29889,
13,
4706,
4408,
29901,
462,
418,
12305,
29900,
29900,
29900,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
29876,
29915,
13,
4706,
4408,
29889,
6708,
29901,
9651,
12305,
29883,
29946,
29874,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
1056,
29915,
448,
304,
367,
337,
11292,
13,
4706,
4408,
29889,
3727,
2782,
262,
29901,
795,
12305,
29900,
29900,
29946,
29946,
29953,
29896,
613,
4706,
396,
770,
29901,
525,
9877,
29915,
13,
4706,
4408,
29889,
3727,
2782,
262,
29889,
29925,
344,
5333,
29901,
539,
12305,
29941,
29946,
29953,
29945,
29874,
29946,
613,
4706,
396,
770,
29901,
525,
25288,
29915,
13,
4706,
4408,
29889,
2385,
29901,
18884,
12305,
29900,
29900,
29900,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
17608,
29915,
448,
304,
367,
337,
11292,
13,
4706,
4408,
29889,
12075,
424,
29901,
632,
12305,
29900,
29900,
29900,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
1217,
29915,
448,
304,
367,
337,
11292,
13,
4706,
4408,
29889,
6185,
272,
1061,
29901,
9651,
12305,
29947,
29947,
29947,
613,
965,
396,
770,
29901,
525,
299,
29915,
448,
304,
367,
337,
11292,
13,
4706,
4408,
29889,
6691,
29901,
1669,
12305,
346,
29945,
29883,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
1240,
29915,
13,
4706,
4408,
29889,
2451,
29901,
9651,
376,
8934,
396,
617,
29900,
29900,
29900,
29900,
613,
259,
396,
770,
29901,
525,
484,
29915,
13,
4706,
4408,
29889,
6678,
29901,
632,
12305,
29900,
29900,
29900,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
29876,
29888,
29915,
13,
4706,
4408,
29889,
4854,
29901,
632,
12305,
29900,
29900,
29900,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
2272,
29915,
13,
4706,
4408,
29889,
4775,
29901,
18884,
12305,
29888,
29945,
29955,
29929,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
12938,
29915,
13,
4706,
4408,
29889,
23335,
29901,
9651,
12305,
29900,
29900,
29900,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
15755,
29915,
448,
304,
367,
337,
11292,
13,
4706,
4408,
29889,
16107,
29901,
18884,
12305,
29900,
29900,
29900,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
23818,
29915,
13,
4706,
4408,
29889,
8176,
29901,
462,
29871,
376,
8934,
396,
29900,
29900,
29946,
29946,
29953,
29896,
613,
259,
396,
770,
29901,
525,
593,
29915,
448,
763,
263,
13553,
13,
4706,
4408,
29889,
16174,
29901,
632,
12305,
29900,
29900,
29900,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
29876,
29894,
29915,
448,
304,
367,
337,
11292,
13,
4706,
4408,
29889,
16174,
29889,
2385,
29901,
539,
12305,
29900,
29900,
29900,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
7071,
29915,
448,
304,
367,
337,
11292,
13,
4706,
4408,
29889,
16174,
29889,
12756,
29901,
418,
12305,
29900,
29900,
29900,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
29894,
29887,
29915,
448,
304,
367,
337,
11292,
13,
4706,
4408,
29889,
16174,
29889,
4998,
29901,
1678,
12305,
29900,
29900,
29900,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
1403,
29915,
448,
304,
367,
337,
11292,
13,
13,
4706,
9681,
29901,
462,
1678,
12305,
29929,
29929,
29900,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
29885,
29915,
13,
13,
4706,
5449,
284,
29901,
462,
259,
12305,
29900,
29900,
29900,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
29880,
29915,
13,
4706,
5449,
284,
29889,
2539,
29901,
795,
12305,
29900,
29900,
29900,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
430,
29915,
13,
13,
4706,
1714,
29901,
462,
1678,
12305,
29946,
29872,
29929,
29874,
29900,
29953,
613,
4706,
396,
770,
29901,
525,
29879,
29915,
13,
4706,
1714,
29889,
5841,
24667,
29901,
965,
12305,
29946,
29872,
29929,
29874,
29900,
29953,
613,
4706,
396,
770,
29901,
525,
20778,
29915,
13,
4706,
1714,
29889,
5914,
29901,
1669,
12305,
29946,
29872,
29929,
29874,
29900,
29953,
613,
4706,
396,
770,
29901,
525,
1557,
29915,
13,
4706,
1714,
29889,
14526,
29901,
18884,
376,
2410,
293,
396,
29947,
29888,
29945,
29929,
29900,
29906,
613,
396,
770,
29901,
525,
4928,
29915,
448,
763,
263,
3440,
13,
4706,
1714,
29889,
11843,
29901,
632,
12305,
29946,
29872,
29929,
29874,
29900,
29953,
613,
4706,
396,
770,
29901,
525,
29879,
29906,
29915,
13,
4706,
1714,
29889,
14190,
5738,
29901,
632,
12305,
29946,
29872,
29929,
29874,
29900,
29953,
613,
4706,
396,
770,
29901,
525,
344,
29915,
13,
4706,
1714,
29889,
29950,
14561,
542,
29901,
9651,
12305,
29946,
29872,
29929,
29874,
29900,
29953,
613,
4706,
396,
770,
29901,
525,
845,
29915,
13,
4706,
1714,
29889,
4074,
3733,
29901,
965,
12305,
29946,
29872,
29929,
29874,
29900,
29953,
613,
4706,
396,
770,
29901,
525,
1039,
29915,
13,
4706,
1714,
29889,
16107,
29901,
795,
12305,
29946,
29872,
29929,
29874,
29900,
29953,
613,
4706,
396,
770,
29901,
525,
29879,
29916,
29915,
13,
4706,
1714,
29889,
4597,
735,
29901,
795,
12305,
29946,
29872,
29929,
29874,
29900,
29953,
613,
4706,
396,
770,
29901,
525,
21935,
29915,
13,
4706,
1714,
29889,
15771,
29901,
632,
12305,
29946,
29872,
29929,
29874,
29900,
29953,
613,
4706,
396,
770,
29901,
525,
29879,
29896,
29915,
13,
4706,
1714,
29889,
14730,
29901,
632,
12305,
29946,
29872,
29929,
29874,
29900,
29953,
613,
4706,
396,
770,
29901,
525,
893,
29915,
13,
13,
4706,
3251,
293,
29901,
462,
259,
12305,
29900,
29900,
29900,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
29887,
29915,
13,
4706,
3251,
293,
29889,
2772,
22742,
29901,
965,
12305,
29874,
29946,
29900,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
29887,
29881,
29915,
13,
4706,
3251,
293,
29889,
6026,
561,
29901,
795,
376,
2410,
293,
396,
29900,
29900,
29900,
29900,
29900,
29900,
613,
396,
770,
29901,
525,
479,
29915,
13,
4706,
3251,
293,
29889,
2392,
29901,
632,
12305,
1389,
29906,
29929,
29906,
29929,
613,
4706,
396,
770,
29901,
525,
629,
29915,
13,
4706,
3251,
293,
29889,
5494,
292,
29901,
965,
376,
8934,
396,
29900,
29900,
29900,
29900,
29947,
29900,
613,
259,
396,
770,
29901,
525,
12443,
29915,
13,
4706,
3251,
293,
29889,
17491,
287,
29901,
3986,
12305,
29900,
29900,
29909,
29900,
29900,
29900,
613,
4706,
396,
770,
29901,
525,
3146,
29915,
13,
4706,
3251,
293,
29889,
6466,
29901,
9651,
12305,
29947,
29947,
29947,
613,
965,
396,
770,
29901,
525,
1484,
29915,
13,
4706,
3251,
293,
29889,
18571,
415,
29901,
9651,
12305,
29955,
29946,
29945,
29941,
29941,
29946,
613,
4706,
396,
770,
29901,
525,
29887,
29886,
29915,
13,
4706,
3251,
293,
29889,
5015,
549,
29901,
9651,
376,
8934,
396,
29900,
29900,
29900,
29900,
29900,
29900,
613,
259,
396,
770,
29901,
525,
3174,
29915,
13,
4706,
3251,
293,
29889,
4035,
2813,
292,
29901,
4706,
376,
8934,
396,
29947,
29900,
29900,
29900,
29947,
29900,
613,
259,
396,
770,
29901,
525,
2543,
29915,
13,
4706,
3251,
293,
29889,
11591,
1627,
29901,
308,
376,
8934,
396,
29874,
29946,
29900,
29900,
29900,
29900,
613,
259,
396,
770,
29901,
525,
4141,
29915,
13,
1678,
500,
13,
13,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
3142,
5510,
1053,
3142,
5510,
13,
3166,
23085,
13289,
1053,
3142,
29918,
1396,
13,
3166,
29784,
1053,
4485,
786,
13,
13,
13,
1990,
7338,
2673,
29898,
3318,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
29892,
4148,
29892,
6139,
29892,
13,
462,
18546,
29922,
8516,
29892,
6315,
8205,
29922,
8516,
29892,
2586,
21454,
29922,
8516,
29892,
10561,
29922,
8516,
29892,
4700,
29922,
8516,
29892,
13,
462,
23454,
29922,
8824,
29892,
11486,
29922,
8516,
1125,
13,
4706,
1583,
29889,
978,
353,
1024,
13,
4706,
1583,
29889,
8921,
353,
4148,
13,
4706,
1583,
29889,
8216,
353,
4485,
786,
29898,
8216,
29897,
13,
4706,
1583,
29889,
3292,
353,
18546,
13,
4706,
1583,
29889,
5559,
8205,
353,
6315,
8205,
13,
4706,
1583,
29889,
2966,
21454,
353,
2586,
21454,
13,
4706,
1583,
29889,
2640,
353,
10561,
13,
4706,
1583,
29889,
22942,
353,
4700,
13,
4706,
1583,
29889,
9961,
1490,
353,
23454,
13,
4706,
1583,
29889,
16953,
353,
11486,
13,
13,
1678,
822,
304,
29918,
3126,
29898,
1311,
1125,
13,
4706,
364,
29894,
353,
24987,
29898,
1311,
467,
8552,
580,
13,
4706,
364,
29894,
1839,
8216,
2033,
353,
29104,
29898,
15291,
1839,
8216,
11287,
13,
4706,
736,
364,
29894,
13,
13,
1678,
732,
6799,
13,
1678,
822,
282,
1478,
29875,
29898,
1311,
1125,
13,
4706,
736,
525,
1124,
597,
29886,
1478,
29875,
29889,
4691,
29889,
990,
29914,
29886,
1478,
29875,
22584,
29879,
29915,
1273,
3142,
29918,
1396,
29898,
1311,
29889,
978,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1574,
2974,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
2640,
29901,
13,
9651,
736,
3142,
5510,
29898,
1311,
29889,
2640,
9601,
29896,
29962,
13,
13,
13,
29937,
910,
1051,
3743,
599,
17752,
393,
892,
23454,
408,
1532,
408,
1906,
607,
13,
29937,
4502,
18028,
29889,
13,
24299,
353,
518,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
6585,
1367,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
2528,
29879,
529,
29874,
2822,
543,
1124,
597,
3150,
333,
29889,
1212,
29914,
1013,
6585,
1367,
829,
29874,
29958,
2304,
304,
2379,
1278,
29889,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
29885,
1169,
16099,
10349,
29914,
1579,
1278,
29899,
3150,
333,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
6585,
1367,
29914,
742,
13,
4706,
11486,
2433,
4907,
13,
9651,
13899,
1472,
6139,
29892,
4567,
6987,
29889,
13,
4706,
14550,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29933,
1107,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
2528,
29879,
474,
29896,
29947,
29876,
29914,
29880,
29896,
29900,
29876,
2304,
304,
2379,
1278,
29892,
2729,
373,
13,
9651,
529,
29874,
2822,
29922,
1124,
597,
28727,
29889,
287,
9396,
497,
29889,
990,
3779,
28727,
829,
29874,
29958,
322,
13,
9651,
529,
29874,
2822,
29922,
1124,
597,
2272,
17559,
29889,
28315,
29889,
1212,
3779,
2272,
17559,
829,
29874,
15513,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
29885,
1169,
16099,
10349,
29914,
1579,
1278,
29899,
28727,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29933,
1107,
29914,
742,
13,
4706,
23454,
29922,
5574,
29892,
13,
4706,
11486,
2433,
4907,
13,
9651,
1128,
304,
11157,
29901,
788,
263,
2253,
1472,
6139,
304,
278,
2446,
6507,
29889,
13,
4706,
14550,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
4176,
2499,
305,
6764,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
2528,
529,
29874,
2822,
543,
1124,
597,
1636,
29889,
2850,
284,
305,
6764,
29889,
990,
29914,
1013,
4176,
2499,
305,
6764,
829,
29874,
29958,
2304,
304,
2379,
1278,
13,
9651,
411,
18428,
5285,
322,
1371,
414,
304,
21092,
3619,
1856,
671,
4251,
29889,
13,
9651,
11019,
5680,
3160,
29901,
829,
29886,
29958,
13,
9651,
529,
352,
29958,
13,
9651,
529,
492,
29958,
13554,
2295,
3864,
697,
470,
901,
2566,
12368,
21106,
492,
29958,
13,
9651,
529,
492,
29958,
2697,
701,
21396,
16505,
287,
304,
278,
2009,
29914,
5327,
11412,
21106,
492,
29958,
13,
9651,
529,
492,
29958,
2481,
9365,
322,
5702,
1904,
3620,
363,
13490,
21106,
492,
29958,
13,
9651,
1533,
352,
29958,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
29885,
1169,
16099,
10349,
29914,
1579,
1278,
29899,
2850,
284,
305,
6764,
742,
13,
4706,
10561,
2433,
1124,
597,
1579,
1278,
29899,
2850,
284,
305,
6764,
29889,
29886,
542,
3634,
29889,
990,
29914,
742,
13,
4706,
23454,
29922,
5574,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29924,
4481,
403,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
5299,
29874,
2822,
543,
1124,
597,
1636,
29889,
2850,
284,
305,
6764,
29889,
990,
29914,
1013,
4176,
2499,
305,
6764,
829,
29874,
29958,
2566,
13,
9651,
9725,
800,
363,
2379,
1278,
8324,
773,
13,
9651,
529,
29874,
2822,
543,
991,
597,
744,
8337,
293,
29889,
949,
386,
287,
12332,
29889,
990,
29914,
1013,
29909,
2409,
29890,
293,
829,
29874,
15513,
450,
13,
9651,
2566,
6931,
526,
4944,
408,
1899,
1196,
6273,
363,
13,
9651,
529,
29874,
2822,
543,
991,
597,
1579,
1278,
29899,
2154,
29889,
949,
386,
287,
12332,
29889,
990,
29914,
1013,
8754,
1278,
29899,
4081,
829,
29874,
15513,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
29885,
335,
2491,
629,
262,
2552,
29914,
1579,
1278,
29899,
26983,
403,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29924,
4481,
403,
29914,
742,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
9165,
29899,
29934,
9026,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
2528,
29879,
529,
29874,
2822,
543,
1124,
597,
1636,
29889,
3134,
29878,
6739,
29889,
510,
29914,
1013,
9165,
29899,
29934,
9026,
829,
29874,
29958,
2304,
304,
2379,
1278,
29889,
13,
4706,
6629,
742,
13,
4706,
2586,
21454,
2433,
29500,
303,
555,
29914,
1579,
1278,
29899,
3134,
29899,
29878,
6739,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
9165,
29899,
29934,
9026,
29914,
742,
13,
4706,
23454,
29922,
5574,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29907,
3222,
4051,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
2528,
29879,
529,
29874,
2822,
543,
1124,
597,
29883,
3222,
2585,
29889,
4288,
29889,
990,
29914,
1013,
29907,
3222,
4051,
829,
29874,
29958,
2304,
304,
2379,
1278,
29889,
13,
4706,
6629,
742,
13,
4706,
2586,
21454,
2433,
29500,
303,
555,
29914,
1579,
1278,
29899,
29883,
3222,
2585,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29907,
3222,
4051,
29914,
742,
13,
4706,
23454,
29922,
5574,
29892,
13,
4706,
11486,
2433,
4907,
13,
9651,
1670,
338,
884,
2379,
1278,
29899,
29907,
3222,
4051,
13117,
29889,
29871,
9134,
526,
2691,
1363,
896,
526,
13,
9651,
2599,
1422,
2712,
29892,
541,
278,
7480,
338,
451,
3447,
23454,
29889,
13,
4706,
14550,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
17553,
29879,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
8754,
1278,
29899,
17553,
29879,
6511,
596,
2280,
304,
8525,
14981,
322,
13,
9651,
29497,
4386,
934,
6441,
292,
322,
16330,
278,
20373,
2066,
29889,
13,
9651,
887,
508,
1653,
1422,
6166,
310,
6441,
29879,
448,
697,
363,
1842,
13,
9651,
10641,
1860,
29892,
697,
363,
20612,
29892,
2992,
29889,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
3317,
29883,
1309,
509,
21909,
29914,
1579,
1278,
29899,
9009,
29879,
742,
13,
4706,
10561,
2433,
991,
597,
1579,
1278,
29899,
9009,
29879,
29889,
949,
386,
287,
12332,
29889,
990,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
23454,
29922,
5574,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
1349,
13826,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
8754,
1278,
29899,
1349,
13826,
3732,
372,
4780,
363,
596,
2280,
304,
2304,
13,
9651,
263,
9377,
3464,
310,
21712,
29889,
13,
4706,
6629,
742,
13,
4706,
2586,
21454,
2433,
29500,
303,
555,
29914,
1579,
1278,
29899,
386,
13826,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
1349,
13826,
29914,
742,
13,
4706,
23454,
29922,
5574,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29907,
3222,
4051,
13117,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
2528,
29879,
529,
29874,
2822,
543,
1124,
597,
1636,
29889,
29883,
3222,
2585,
7354,
29889,
990,
29914,
1013,
29907,
3222,
4051,
13117,
829,
29874,
29958,
2304,
304,
2379,
1278,
29889,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
29879,
381,
29876,
29914,
1579,
1278,
29899,
29883,
3222,
2585,
7354,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29907,
3222,
4051,
13117,
22208,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29954,
575,
2918,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
2528,
29879,
2304,
363,
278,
529,
29874,
2822,
543,
1124,
597,
17397,
2918,
29889,
287,
9396,
497,
29889,
990,
29914,
1013,
29954,
575,
2918,
829,
29874,
29958,
13,
9651,
1350,
572,
1218,
4086,
304,
2379,
1278,
8324,
29889,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
24157,
29914,
1579,
1278,
29899,
17397,
2918,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29954,
575,
2918,
29914,
742,
13,
4706,
23454,
29922,
5574,
29892,
13,
4706,
11486,
2433,
4907,
13,
9651,
910,
338,
278,
937,
4472,
6012,
6081,
29889,
29871,
1932,
4045,
2041,
13,
9651,
2820,
372,
723,
367,
263,
1781,
2969,
304,
11097,
373,
263,
3619,
5067,
29889,
13,
4706,
14550,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
14925,
742,
12801,
5813,
29958,
313,
11600,
491,
529,
5813,
12948,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
29924,
6926,
9348,
611,
2719,
515,
2379,
1278,
8324,
1407,
4780,
322,
13,
9651,
756,
884,
2304,
363,
443,
27958,
292,
29889,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
29885,
1131,
786,
3859,
29914,
1579,
1278,
29899,
2549,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
14925,
29914,
742,
13,
4706,
23454,
29922,
5574,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29956,
8969,
742,
12801,
5813,
29958,
313,
11600,
491,
529,
5813,
12948,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
8754,
1278,
29899,
29956,
8969,
16688,
2560,
13465,
411,
399,
29911,
12605,
29889,
910,
13,
9651,
13465,
7805,
13136,
315,
14098,
29943,
11415,
363,
7621,
6993,
29889,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
1175,
4006,
29914,
1579,
1278,
29899,
29893,
13264,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29956,
8969,
29914,
742,
13,
4706,
23454,
29922,
5574,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
3057,
292,
742,
318,
29915,
29966,
5813,
29958,
313,
11600,
491,
529,
5813,
12948,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
1576,
2379,
1278,
29899,
3057,
292,
6081,
8128,
5190,
6724,
3667,
1907,
363,
2379,
1278,
29889,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
4758,
375,
29914,
1579,
1278,
29899,
13424,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
3057,
292,
29914,
742,
13,
4706,
23454,
29922,
5574,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
4081,
742,
12801,
5813,
29958,
313,
11600,
491,
529,
5813,
12948,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
1576,
2379,
1278,
29899,
4081,
6081,
8128,
2304,
363,
5007,
7029,
13,
9651,
12078,
297,
2379,
1278,
29889,
739,
3913,
1852,
5510,
304,
6088,
1899,
1196,
6273,
29889,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
371,
6387,
29939,
29914,
1579,
1278,
29899,
2154,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
4081,
29914,
742,
13,
4706,
23454,
29922,
5574,
29892,
13,
4706,
11486,
2433,
4907,
13,
9651,
2379,
1278,
29899,
26525,
756,
777,
25457,
29889,
29871,
10056,
393,
746,
2134,
1747,
13,
9651,
2379,
1278,
29899,
26525,
470,
2788,
9741,
29889,
13,
4706,
14550,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
1579,
1278,
29899,
2222,
4268,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
319,
2319,
2379,
1278,
6081,
393,
3732,
372,
4780,
304,
671,
13,
795,
529,
29874,
2822,
29922,
1124,
597,
2222,
4268,
29889,
990,
3779,
29931,
404,
19407,
829,
29874,
29958,
411,
596,
13,
795,
2379,
1278,
2280,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
29879,
29606,
29889,
2966,
21454,
29889,
990,
29914,
1579,
1278,
29899,
2222,
4268,
29914,
742,
13,
4706,
2586,
21454,
2433,
29879,
29606,
29914,
1579,
1278,
29899,
2222,
4268,
742,
13,
4706,
11486,
2433,
4907,
13,
9651,
4358,
1717,
3577,
6139,
29892,
1661,
535,
689,
292,
3577,
1024,
29892,
947,
451,
13,
9651,
1101,
3918,
3450,
6865,
313,
2344,
29918,
2222,
4268,
2012,
310,
3109,
4268,
467,
13,
13,
9651,
10056,
287,
363,
443,
1761,
292,
29892,
16710,
1873,
881,
6507,
408,
13,
9651,
376,
8754,
1278,
29899,
29931,
404,
19407,
29908,
411,
263,
14670,
292,
3450,
322,
4343,
9741,
16285,
29892,
13,
9651,
408,
1532,
408,
263,
1243,
13495,
29889,
13,
4706,
14550,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
9832,
1772,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
9832,
1772,
13812,
18094,
363,
2379,
1278,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
9832,
1772,
742,
13,
4706,
2586,
21454,
2433,
29874,
2142,
845,
279,
29914,
1579,
1278,
29899,
1037,
1772,
29899,
3396,
742,
13,
4706,
23454,
29922,
5574,
29892,
13,
4706,
11486,
2433,
4907,
13,
9651,
2379,
1278,
29899,
9802,
3204,
322,
445,
881,
6232,
3450,
29892,
2050,
393,
746,
13,
9651,
2134,
1747,
2379,
1278,
29899,
9802,
3204,
13,
4706,
14550,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
10408,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
2528,
29879,
7090,
2304,
304,
596,
2379,
1278,
2280,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
10408,
742,
13,
4706,
18546,
2433,
386,
1943,
28685,
29914,
1579,
1278,
29899,
8173,
742,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
4040,
26706,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
18415,
10643,
363,
2379,
1278,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
4040,
26706,
742,
13,
4706,
18546,
2433,
29885,
1131,
786,
3859,
29914,
1579,
1278,
29899,
558,
26706,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29999,
264,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
8754,
1278,
29899,
29999,
264,
6511,
366,
304,
671,
10772,
29999,
264,
3025,
2379,
1278,
29899,
4081,
8260,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29999,
264,
29914,
742,
13,
4706,
18546,
2433,
29883,
6119,
4600,
29914,
1579,
1278,
29899,
2256,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
17046,
29899,
1523,
2139,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
28451,
19574,
1375,
11057,
29892,
4145,
1475,
29892,
322,
6910,
596,
2294,
6783,
13,
795,
322,
8286,
21608,
29889,
8502,
15337,
29899,
1523,
2139,
272,
363,
2379,
1278,
29889,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
284,
273,
3391,
13650,
29914,
1579,
1278,
29899,
7959,
29899,
510,
2139,
742,
13,
4706,
10561,
2433,
991,
597,
3292,
29889,
510,
29914,
284,
273,
3391,
13650,
29914,
1579,
1278,
29899,
7959,
29899,
510,
2139,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
2887,
7224,
742,
318,
29915,
29966,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
17100,
1078,
278,
1856,
16596,
3489,
411,
2379,
1278,
29892,
4417,
2304,
363,
13,
795,
2778,
3460,
29892,
1375,
9215,
322,
22520,
6783,
322,
12728,
2066,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
1379,
1867,
261,
571,
29889,
978,
29914,
2640,
29914,
1579,
1278,
29899,
16596,
29914,
742,
13,
4706,
18546,
2433,
2460,
10792,
29906,
29895,
29914,
1579,
1278,
29899,
16596,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
12300,
3220,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
530,
6081,
393,
16785,
385,
2380,
1813,
363,
596,
2379,
1278,
13,
795,
2280,
6336,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
12300,
3220,
29914,
742,
13,
4706,
18546,
2433,
1491,
17179,
29914,
1579,
1278,
29899,
6921,
2248,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29907,
295,
708,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
14227,
708,
13465,
363,
2379,
1278,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
1278,
29889,
3292,
29889,
510,
29914,
2242,
708,
29914,
742,
13,
4706,
18546,
2433,
1278,
29914,
1579,
1278,
29899,
2242,
708,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29907,
943,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
11189,
22118,
18981,
1383,
4362,
313,
29907,
24125,
29897,
29871,
363,
29784,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
1579,
1278,
29899,
29883,
943,
29889,
949,
386,
287,
12332,
29889,
990,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
18546,
2433,
29893,
2252,
22138,
262,
29914,
1579,
1278,
29899,
29883,
943,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
29943,
307,
2256,
29899,
8754,
1278,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
12362,
10947,
263,
2379,
1278,
2280,
964,
263,
731,
310,
2294,
2066,
29889,
13,
795,
450,
1121,
508,
367,
17791,
1728,
738,
1923,
29899,
2975,
7047,
13,
795,
916,
1135,
263,
13807,
1856,
1923,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
29943,
307,
2256,
29899,
8754,
1278,
29914,
742,
13,
4706,
18546,
2433,
8942,
265,
29903,
481,
262,
29914,
29943,
307,
2256,
29899,
8754,
1278,
742,
13,
4706,
23454,
29922,
5574,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29943,
5066,
27514,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
9133,
2247,
12151,
2294,
6515,
304,
263,
2379,
1278,
2280,
29892,
2729,
373,
1426,
13,
795,
2066,
408,
15869,
304,
263,
1104,
1288,
2566,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29943,
5066,
27514,
29914,
742,
13,
4706,
18546,
2433,
8942,
265,
29903,
481,
262,
29914,
8754,
1278,
29899,
29943,
5066,
27514,
742,
13,
4706,
23454,
29922,
5574,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
8754,
5416,
4051,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
2379,
5416,
4051,
2130,
363,
2379,
1278,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
8754,
5416,
4051,
29914,
742,
13,
4706,
2586,
21454,
2433,
29874,
2142,
845,
279,
29914,
1579,
1278,
29899,
25044,
2205,
29890,
29899,
3396,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
5589,
262,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
1576,
2379,
1278,
29899,
5589,
262,
6081,
8128,
2560,
3667,
1907,
363,
6724,
596,
7190,
297,
2379,
1278,
2280,
636,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
4758,
375,
29914,
1579,
1278,
29899,
5589,
262,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
5589,
262,
29914,
742,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29954,
5705,
14873,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
18285,
6081,
363,
2379,
1278,
304,
1207,
773,
4989,
9046,
279,
4780,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29954,
5705,
14873,
29914,
742,
13,
4706,
18546,
2433,
5617,
29920,
578,
4161,
29914,
8754,
1278,
29899,
29954,
5705,
14873,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
7020,
5627,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
2379,
1278,
29899,
7020,
5627,
338,
385,
6081,
393,
6511,
25706,
322,
4780,
13,
795,
5132,
29899,
6194,
12623,
310,
4544,
9830,
27421,
322,
2989,
4544,
10701,
13,
795,
773,
263,
16424,
5877,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
21355,
29920,
29889,
3292,
29889,
510,
29914,
1579,
1278,
29899,
1420,
16409,
29914,
742,
13,
4706,
18546,
2433,
21355,
29920,
29914,
1579,
1278,
29899,
1420,
16409,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29924,
7443,
2499,
305,
6764,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
3462,
2379,
1278,
2304,
363,
29004,
773,
18294,
2499,
305,
6764,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29924,
7443,
2499,
305,
6764,
29914,
742,
13,
4706,
18546,
2433,
29883,
711,
10492,
314,
29914,
1579,
1278,
29899,
29885,
7443,
284,
305,
6764,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
11862,
12229,
1646,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
319,
2011,
310,
278,
15337,
4744,
29840,
304,
2379,
1278,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
991,
597,
3292,
29889,
510,
29914,
29885,
16773,
29914,
1579,
1278,
29899,
8382,
10154,
1646,
742,
13,
4706,
18546,
2433,
29885,
16773,
29914,
1579,
1278,
29899,
8382,
10154,
1646,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
11049,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
2379,
1278,
29899,
11049,
8128,
1404,
4867,
10643,
363,
2379,
1278,
29889,
739,
13,
795,
17766,
278,
3619,
9595,
310,
12183,
297,
29892,
12183,
714,
29892,
322,
13,
795,
6456,
292,
596,
4160,
29915,
21396,
975,
10410,
23704,
310,
931,
29889,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
3317,
29883,
1309,
509,
21909,
29914,
1579,
1278,
29899,
7507,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
11049,
29914,
742,
13,
4706,
23454,
29922,
5574,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
13228,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
2379,
1278,
29899,
13228,
338,
385,
9426,
630,
2379,
1278,
6081,
607,
12778,
13,
795,
6996,
6993,
322,
10760,
5680,
304,
596,
2379,
1278,
11446,
13,
795,
9098,
322,
5948,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
991,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
13228,
29914,
742,
13,
4706,
18546,
2433,
29885,
1131,
786,
3859,
29914,
1579,
1278,
29899,
8926,
29915,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
2451,
284,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
3462,
29879,
8960,
284,
2304,
304,
2379,
1278,
8324,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
2451,
284,
29914,
742,
13,
4706,
18546,
2433,
29926,
29920,
3451,
295,
29914,
1579,
1278,
29899,
11739,
284,
742,
13,
4706,
23454,
29922,
5574,
29892,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29933,
29883,
4641,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
350,
29883,
4641,
2304,
363,
756,
2790,
27630,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29933,
29883,
4641,
29914,
742,
13,
4706,
18546,
2433,
3317,
29883,
1309,
509,
21909,
29914,
1579,
1278,
29899,
12328,
4641,
742,
13,
4706,
23454,
29922,
5574,
29892,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29924,
7443,
13117,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
2379,
1278,
6081,
304,
2253,
22782,
18294,
13117,
964,
2379,
1278,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29924,
7443,
13117,
29914,
742,
13,
4706,
18546,
2433,
4758,
375,
29914,
1579,
1278,
29899,
29885,
549,
554,
277,
29915,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
12739,
29923,
29899,
29924,
2172,
29899,
1184,
1777,
261,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
2379,
1278,
13465,
310,
330,
3660,
29918,
1195,
29875,
29918,
771,
1777,
261,
363,
5087,
2401,
10863,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
12739,
29923,
29899,
29924,
2172,
29899,
1184,
1777,
261,
742,
13,
4706,
18546,
2433,
3364,
29891,
29914,
1579,
1278,
29899,
3249,
29872,
29899,
1195,
29875,
29899,
771,
1777,
261,
29915,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
12754,
742,
525,
8754,
1278,
29899,
12754,
3815,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
15427,
322,
21103,
1821,
19185,
5067,
6890,
363,
2379,
1278,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
1579,
1278,
29899,
6406,
29889,
949,
386,
287,
12332,
29889,
990,
29914,
264,
29914,
12333,
29914,
2248,
29889,
1420,
742,
13,
4706,
18546,
2433,
1579,
1278,
29899,
6406,
29914,
1579,
1278,
29899,
6406,
29915,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29999,
29949,
4051,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
4803,
278,
796,
29949,
4051,
411,
2379,
1278,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29999,
29949,
4051,
29914,
742,
13,
4706,
18546,
2433,
24157,
29914,
1579,
1278,
29899,
29920,
10396,
742,
13,
4706,
23454,
29922,
5574,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29925,
3905,
705,
29872,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
17100,
1078,
2379,
1278,
322,
278,
1236,
29872,
705,
29872,
470,
29885,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
3090,
793,
280,
9633,
29889,
510,
29914,
2640,
29914,
1579,
1278,
29899,
412,
29872,
705,
29872,
29914,
2248,
29889,
1420,
742,
13,
4706,
18546,
2433,
10936,
9633,
29914,
1579,
1278,
29899,
412,
29872,
705,
29872,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29931,
1803,
24551,
742,
525,
29866,
29892,
529,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
3462,
365,
1803,
24551,
2304,
363,
2379,
1278,
13,
4706,
6629,
742,
13,
4706,
396,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29931,
1803,
24551,
29914,
742,
13,
4706,
18546,
2433,
29881,
29939,
1195,
29882,
29914,
1579,
1278,
29899,
13650,
24551,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29903,
823,
1165,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
2379,
1278,
13465,
363,
317,
823,
1165,
29892,
13,
795,
263,
5132,
29914,
17038,
3489,
393,
3732,
18891,
4780,
304,
671,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29903,
823,
1165,
29914,
742,
13,
4706,
18546,
2433,
1028,
424,
744,
5750,
29914,
1579,
1278,
29899,
29879,
823,
1165,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29928,
25936,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
2379,
1278,
29899,
29928,
25936,
8128,
8492,
363,
5214,
13,
795,
2560,
322,
21103,
1821,
4113,
19510,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
1324,
273,
561,
861,
29889,
3292,
29889,
510,
29914,
8754,
1278,
29899,
29928,
25936,
29914,
742,
13,
4706,
18546,
2433,
1324,
273,
561,
861,
29914,
8754,
1278,
29899,
29928,
25936,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
2008,
29874,
18498,
29888,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
14070,
18498,
29888,
338,
263,
2379,
1278,
6081,
363,
5557,
292,
13,
795,
4891,
29899,
2746,
2009,
18879,
708,
313,
9295,
29934,
29943,
467,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
2008,
29874,
18498,
29888,
29914,
742,
13,
4706,
18546,
2433,
3317,
29883,
1309,
509,
21909,
29914,
1579,
1278,
29899,
344,
294,
332,
29888,
742,
13,
4706,
23454,
29922,
5574,
29892,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29925,
2592,
22110,
10578,
742,
12801,
5813,
29958,
669,
529,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
319,
2989,
29899,
726,
2740,
6012,
773,
349,
2592,
6323,
29924,
322,
11644,
10578,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
991,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29925,
2592,
22110,
10578,
29914,
742,
13,
4706,
18546,
2433,
2388,
568,
292,
29914,
1579,
1278,
29899,
1112,
5693,
1251,
10578,
742,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
19737,
29924,
7443,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
2379,
1278,
29899,
19737,
29924,
7443,
28635,
2710,
2379,
1278,
322,
10772,
29924,
7443,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
949,
386,
287,
12332,
29889,
990,
29914,
2640,
29914,
1579,
1278,
29899,
29886,
962,
7443,
29914,
742,
13,
4706,
18546,
2433,
13891,
307,
5173,
29914,
1579,
1278,
29899,
29886,
962,
7443,
742,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29934,
2156,
272,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
2379,
1278,
29899,
29934,
2156,
272,
8128,
2304,
363,
4417,
1153,
415,
943,
13,
795,
304,
2379,
1278,
8871,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29934,
2156,
272,
29914,
742,
13,
4706,
18546,
2433,
29881,
552,
3488,
29914,
1579,
1278,
29899,
336,
415,
272,
742,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
2713,
13841,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
2379,
1278,
29899,
2713,
13841,
28635,
2710,
2379,
1278,
322,
278,
5132,
3918,
3489,
13,
795,
421,
845,
13841,
29952,
3883,
29892,
363,
1407,
2560,
313,
28544,
29897,
694,
29899,
10836,
1820,
29899,
1767,
13,
795,
8635,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
2713,
13841,
29914,
742,
13,
4706,
18546,
2433,
29926,
1280,
3137,
29914,
1579,
1278,
29899,
845,
13841,
742,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
1525,
1254,
1319,
742,
525,
27418,
14876,
3450,
8583,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
8754,
1278,
29899,
1525,
1254,
1319,
8128,
278,
5214,
10930,
363,
4969,
263,
2107,
16759,
3450,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
991,
597,
1579,
1278,
29899,
5060,
1319,
29889,
949,
386,
287,
12332,
29889,
990,
29914,
742,
13,
4706,
18546,
2433,
1579,
1278,
29899,
5060,
1319,
29914,
1579,
1278,
29899,
5060,
1319,
742,
13,
4706,
23454,
29922,
5574,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
15078,
2222,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
8754,
1278,
29899,
15078,
2222,
8128,
2560,
12623,
310,
830,
1254,
1319,
23649,
363,
13,
795,
2566,
4733,
3342,
773,
2379,
1278,
29899,
4176,
2499,
305,
6764,
29889,
450,
5759,
13,
795,
23649,
3638,
322,
7150,
7191,
297,
4663,
3402,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
949,
386,
287,
12332,
29889,
990,
29914,
2640,
29914,
1579,
1278,
29899,
5060,
2222,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
18546,
2433,
29926,
29888,
682,
1379,
29914,
1579,
1278,
29899,
5060,
2222,
742,
13,
4706,
23454,
29922,
5574,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
18650,
9154,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
29903,
1691,
2379,
1278,
5285,
21274,
363,
2439,
9154,
29899,
267,
802,
5177,
3651,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
1717,
29876,
621,
276,
2784,
29914,
1579,
1278,
29899,
2276,
9154,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29924,
4614,
742,
12801,
5813,
10202,
529,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
3596,
1242,
363,
529,
29874,
2822,
543,
1124,
597,
1636,
29889,
29885,
557,
327,
331,
9884,
29889,
990,
29914,
1013,
29924,
4614,
17475,
829,
29874,
29958,
13,
9651,
304,
367,
1304,
2012,
310,
29779,
1764,
29906,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
29890,
575,
295,
1004,
29914,
1579,
1278,
29899,
29885,
4614,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
29924,
4614,
29914,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
4806,
8995,
11816,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
9984,
11328,
411,
529,
29874,
2822,
543,
1124,
597,
705,
8995,
2158,
29889,
990,
29914,
1013,
4806,
8995,
11816,
829,
29874,
29958,
13,
1669,
297,
596,
2379,
1278,
623,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
4806,
8995,
11816,
29914,
742,
13,
4706,
18546,
2433,
8942,
265,
29903,
481,
262,
29914,
8754,
1278,
29899,
4806,
8995,
11816,
742,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
2385,
29891,
742,
525,
23923,
11607,
21139,
433,
29877,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
2385,
2729,
8386,
363,
2379,
1278,
29889,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
481,
5526,
29891,
29914,
1579,
1278,
29899,
1990,
29891,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
2385,
29891,
29914,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
3609,
3057,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
7270,
1907,
363,
6724,
2379,
1278,
8324,
411,
13,
1669,
529,
29874,
2822,
543,
1124,
597,
2676,
1688,
29889,
949,
386,
287,
12332,
29889,
990,
29914,
264,
29914,
12333,
29914,
1013,
3609,
3057,
829,
29874,
15513,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
279,
2480,
586,
436,
29914,
1579,
1278,
29899,
2676,
1688,
742,
13,
4706,
10561,
2433,
1124,
597,
1579,
1278,
29899,
2676,
1688,
29889,
949,
386,
287,
12332,
29889,
990,
29914,
742,
13,
4706,
23454,
29922,
8824,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29924,
275,
8245,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
319,
2560,
6081,
304,
22782,
278,
13,
9651,
529,
29874,
2822,
543,
1124,
597,
26737,
8245,
29889,
29953,
29896,
29929,
29906,
29946,
29889,
12938,
29914,
1013,
29924,
275,
8245,
829,
29874,
29958,
3883,
363,
29497,
13,
9651,
13755,
4485,
3204,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
991,
597,
1579,
1278,
29899,
26737,
8245,
29889,
949,
386,
287,
12332,
29889,
990,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
18546,
2433,
2976,
292,
29893,
4369,
19415,
29914,
1579,
1278,
29899,
26737,
8245,
742,
13,
4706,
23454,
29922,
5574,
29892,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29928,
749,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
1938,
292,
278,
438,
6444,
17948,
411,
3114,
773,
2379,
1278,
29892,
7274,
29892,
322,
288,
5150,
1982,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
991,
597,
1579,
1278,
29899,
29881,
749,
29889,
949,
386,
287,
12332,
29889,
990,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
18546,
2433,
2976,
292,
29893,
4369,
19415,
29914,
1579,
1278,
29899,
29881,
749,
742,
13,
4706,
23454,
29922,
5574,
29892,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29903,
1660,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29874,
2822,
543,
1124,
597,
1636,
29889,
1420,
29945,
307,
4684,
29889,
510,
29914,
264,
29914,
12631,
29879,
29914,
3696,
4993,
29914,
6500,
1199,
29914,
1013,
13,
9651,
5656,
28048,
28488,
829,
29874,
29958,
363,
2379,
1278,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
991,
597,
1579,
1278,
29899,
29879,
344,
29889,
949,
386,
287,
12332,
29889,
990,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
18546,
2433,
2976,
292,
29893,
4369,
19415,
29914,
1579,
1278,
29899,
29879,
344,
742,
13,
4706,
23454,
29922,
5574,
29892,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29931,
19657,
742,
12801,
5813,
29958,
742,
13,
795,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
2528,
29879,
390,
14830,
326,
11407,
2304,
304,
2379,
1278,
29889,
13,
9651,
18601,
29879,
263,
17127,
519,
8635,
14998,
411,
20240,
363,
13,
9651,
297,
29899,
14834,
29892,
29825,
322,
2626,
8173,
29889,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
5711,
29874,
1607,
29872,
29914,
1579,
1278,
29899,
2576,
1524,
742,
13,
4706,
10561,
2433,
1124,
597,
1579,
1278,
29899,
2576,
1524,
29889,
949,
386,
287,
12332,
29889,
990,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
23454,
29922,
8824,
29892,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
2659,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
8701,
13902,
4911,
16535,
15057,
363,
2379,
1278,
29901,
13,
9651,
12577,
29892,
10811,
3568,
4876,
29892,
19130,
29892,
10726,
8952,
29892,
10726,
4800,
29892,
383,
990,
327,
4800,
29892,
13,
9651,
1528,
280,
29899,
6707,
13361,
2133,
322,
4623,
2133,
29889,
13,
4706,
6629,
742,
13,
4706,
18546,
2433,
1847,
386,
601,
29914,
1579,
1278,
29899,
1792,
742,
13,
4706,
10561,
2433,
1124,
597,
1579,
1278,
29899,
1792,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
742,
13,
4706,
23454,
29922,
5574,
29892,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29963,
423,
742,
525,
6156,
1164,
3383,
529,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
18884,
9133,
2247,
263,
5941,
29892,
2560,
3988,
21398,
6890,
363,
15678,
2379,
1278,
13,
18884,
2401,
5795,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
1579,
1278,
29899,
6071,
29889,
578,
265,
29889,
4282,
742,
13,
4706,
18546,
2433,
1366,
275,
578,
265,
29914,
8754,
1278,
29899,
29963,
423,
742,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
3010,
797,
21494,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
1184,
29894,
2247,
21556,
373,
3758,
9365,
313,
4746,
3758,
2499,
305,
6764,
29897,
8283,
13,
632,
363,
1269,
2009,
21106,
29886,
29958,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
991,
597,
3292,
29889,
510,
29914,
1217,
895,
29914,
1579,
1278,
29899,
1972,
1144,
1103,
742,
13,
4706,
18546,
2433,
1217,
895,
29914,
1579,
1278,
29899,
1972,
1144,
1103,
742,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
855,
555,
2084,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
2528,
24444,
2084,
1404,
10643,
29892,
10760,
29892,
13,
9651,
322,
28733,
304,
2379,
1278,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
1579,
1278,
29899,
303,
555,
2084,
29889,
949,
386,
287,
12332,
29889,
990,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
18546,
2433,
303,
555,
2084,
29914,
303,
555,
2084,
29899,
1579,
1278,
29915,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29909,
808,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
2379,
1278,
29899,
29909,
808,
3732,
372,
4780,
304,
2436,
16631,
382,
1859,
11446,
411,
2379,
1278,
322,
13,
795,
278,
4827,
29874,
4971,
6090,
26240,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
1579,
1278,
29899,
1278,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
18546,
2433,
29926,
6547,
29893,
354,
7367,
29914,
1579,
1278,
29899,
1278,
29915,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
15078,
29899,
7249,
8787,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
8878,
16759,
23649,
1494,
278,
13,
795,
529,
29874,
2822,
543,
1124,
597,
3126,
2754,
29889,
990,
29914,
4830,
29914,
1013,
7249,
8787,
829,
29874,
29958,
13,
795,
21992,
411,
263,
13988,
848,
7546,
1788,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
1579,
1278,
29899,
5060,
29899,
3126,
2754,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
18546,
2433,
2460,
14868,
3780,
29914,
1579,
1278,
29899,
5060,
29899,
3126,
2754,
29915,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
8132,
1988,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
1174,
519,
16698,
1988,
10760,
363,
596,
1856,
932,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
991,
597,
1579,
1278,
29899,
29879,
8807,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
2586,
21454,
2433,
559,
4672,
14318,
29914,
1579,
1278,
29918,
29879,
8807,
29915,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29903,
3707,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
2379,
1278,
29899,
29879,
3707,
28936,
4780,
2130,
304,
278,
16759,
3450,
297,
278,
6692,
10454,
306,
9375,
29924,
7481,
13,
795,
411,
278,
1371,
310,
278,
529,
29874,
2822,
543,
1124,
597,
3292,
29889,
510,
29914,
6050,
29893,
29900,
29914,
29886,
952,
3707,
1013,
29886,
952,
3707,
3489,
829,
29874,
15513,
13,
795,
19814,
29892,
372,
11286,
438,
6444,
363,
263,
409,
314,
2222,
10760,
847,
28733,
7271,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
1579,
1278,
29899,
29879,
3707,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
18546,
2433,
6050,
29893,
29900,
29914,
1579,
1278,
29899,
29879,
3707,
29915,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
1579,
1278,
29899,
1989,
15126,
557,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
8754,
1278,
6081,
363,
13,
9651,
529,
29874,
2822,
29922,
991,
597,
1636,
29889,
1989,
15126,
557,
29889,
990,
29958,
2558,
15126,
557,
829,
29874,
29958,
13465,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
991,
597,
3292,
29889,
510,
29914,
19426,
309,
649,
29882,
16129,
29914,
1579,
1278,
29899,
1989,
15126,
557,
29914,
10054,
29914,
6207,
29914,
16310,
2303,
29889,
3487,
742,
13,
4706,
18546,
2433,
19426,
309,
649,
29882,
16129,
29914,
1579,
1278,
29899,
1989,
15126,
557,
742,
13,
1678,
10353,
1678,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
14925,
1884,
24204,
742,
525,
14925,
1884,
24204,
29892,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
2379,
1278,
29899,
14925,
1884,
24204,
8128,
385,
4780,
982,
304,
1246,
278,
18623,
1884,
24204,
3450,
607,
2854,
1078,
565,
385,
4876,
3211,
338,
263,
2854,
697,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
991,
597,
1579,
1278,
29899,
2549,
1884,
3084,
1061,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
18546,
2433,
14925,
1884,
24204,
29914,
8754,
1278,
29918,
14925,
1884,
24204,
29915,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
15063,
8028,
742,
525,
29954,
8903,
2718,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
5020,
1359,
934,
297,
2379,
1278,
2280,
411,
529,
29874,
2822,
543,
1124,
597,
8865,
8028,
1315,
29889,
510,
1013,
15063,
8028,
29889,
1315,
829,
29874,
15513,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
991,
597,
1579,
1278,
29899,
8865,
8028,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
18546,
2433,
7979,
29891,
492,
29914,
1579,
1278,
29899,
8865,
8028,
742,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
7077,
15280,
742,
525,
29954,
8903,
2718,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
529,
29874,
2822,
543,
991,
597,
384,
15204,
29889,
510,
1013,
7077,
15280,
829,
29874,
29958,
13465,
363,
2379,
1278,
29892,
3704,
1967,
29871,
13,
795,
6441,
29892,
775,
5877,
12141,
322,
901,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
991,
597,
1579,
1278,
29899,
384,
15204,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
18546,
2433,
7979,
29891,
492,
29914,
1579,
1278,
29899,
384,
15204,
742,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
20967,
5698,
29899,
8754,
1278,
742,
525,
29954,
8903,
2718,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
529,
29874,
2822,
543,
991,
597,
657,
8704,
29889,
510,
29914,
1013,
20967,
5698,
29871,
29946,
829,
29874,
29958,
16876,
363,
2379,
1278,
29914,
29967,
262,
1764,
29906,
29889,
29871,
13,
795,
16564,
373,
2379,
1278,
29899,
20967,
5698,
29892,
541,
301,
14643,
322,
2253,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
991,
597,
8704,
29899,
1579,
1278,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
18546,
2433,
7979,
29891,
492,
29914,
8704,
29899,
1579,
1278,
742,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29909,
9046,
1503,
742,
525,
29954,
8903,
2718,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
2178,
1029,
14873,
1176,
4097,
297,
697,
2058,
29889,
512,
22368,
29901,
13,
795,
529,
352,
29958,
13,
18884,
529,
492,
29958,
4592,
1029,
14873,
829,
492,
29958,
13,
18884,
529,
492,
29958,
29954,
5705,
14873,
829,
492,
29958,
13,
18884,
529,
492,
29958,
21860,
1148,
1161,
829,
492,
29958,
13,
18884,
529,
492,
29958,
6295,
1455,
5745,
1029,
14873,
829,
492,
29958,
13,
18884,
529,
492,
29958,
7648,
4144,
12623,
829,
492,
29958,
13,
18884,
529,
492,
29958,
29909,
9046,
279,
274,
1336,
829,
492,
29958,
13,
795,
1533,
352,
29958,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
991,
597,
1579,
1278,
29899,
485,
271,
1503,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
18546,
2433,
7979,
29891,
492,
29914,
1579,
1278,
29899,
485,
271,
1503,
742,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
2713,
598,
742,
525,
29954,
8903,
2718,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
6204,
5264,
6232,
4163,
297,
29779,
1764,
29906,
4472,
2729,
373,
29871,
13,
795,
529,
29874,
2822,
543,
991,
597,
3292,
29889,
510,
29914,
957,
3009,
29914,
13653,
29889,
1315,
29914,
1013,
13653,
29889,
1315,
829,
29874,
15513,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
991,
597,
1579,
1278,
29899,
13653,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
18546,
2433,
7979,
29891,
492,
29914,
1579,
1278,
29899,
13653,
742,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29925,
336,
300,
272,
713,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
3450,
6993,
881,
367,
4549,
29892,
2560,
29892,
322,
18378,
763,
263,
5917,
13,
795,
5682,
291,
653,
29889,
910,
3577,
263,
9893,
304,
3867,
393,
29889,
5293,
435,
17755,
18897,
408,
13,
795,
8762,
491,
10772,
29967,
17755,
29892,
29784,
29899,
29886,
336,
300,
272,
713,
3913,
263,
1407,
2560,
13,
795,
5067,
304,
1207,
1854,
393,
278,
4160,
17378,
596,
3450,
30010,
29879,
13,
795,
1095,
9748,
526,
25161,
287,
411,
278,
1959,
16178,
363,
2130,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
1579,
1278,
29899,
29886,
336,
300,
272,
713,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
18546,
2433,
29881,
375,
1193,
16950,
29914,
1579,
1278,
29899,
29886,
336,
300,
272,
713,
742,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
7185,
2105,
292,
29928,
1161,
3377,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
2379,
1278,
29899,
7185,
2105,
292,
29928,
1161,
3377,
338,
385,
6081,
393,
16688,
29871,
29941,
1667,
13303,
1907,
411,
2217,
7225,
515,
278,
29871,
13,
795,
2379,
1278,
13897,
29901,
13,
795,
529,
324,
29958,
13,
18884,
529,
492,
29958,
7185,
2105,
322,
7604,
675,
278,
4180,
310,
263,
2379,
1278,
2280,
21106,
492,
29958,
13,
18884,
529,
492,
29958,
7185,
2105,
322,
7604,
675,
278,
1243,
23746,
21106,
492,
29958,
13,
18884,
529,
492,
29958,
28916,
4805,
2472,
1048,
2009,
714,
27801,
313,
24830,
607,
526,
20312,
1135,
4226,
467,
829,
492,
29958,
13,
795,
1533,
324,
29958,
13,
9651,
1533,
29886,
29958,
13,
9651,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
1579,
1278,
29899,
3712,
2105,
292,
14592,
3377,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
742,
13,
4706,
18546,
2433,
1579,
1278,
29899,
14592,
3377,
29914,
8754,
1278,
29899,
7185,
2105,
292,
29928,
1161,
3377,
29915,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29928,
2572,
2219,
29939,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
3247,
16926,
529,
29874,
2822,
543,
991,
597,
29881,
2572,
2219,
29939,
29889,
601,
29914,
1013,
29928,
2572,
2219,
29939,
829,
29874,
29958,
3414,
9521,
297,
596,
13,
9651,
2379,
1278,
1856,
623,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
991,
597,
1579,
1278,
29899,
29881,
2572,
2219,
29939,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
742,
13,
4706,
6315,
8205,
2433,
991,
597,
5559,
8205,
29889,
510,
29914,
2596,
815,
29914,
1579,
1278,
29899,
29881,
2572,
2219,
29939,
742,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
7900,
22137,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
632,
16657,
363,
5214,
9678,
1288,
11446,
773,
13,
632,
2379,
1278,
322,
3450,
29889,
23869,
411,
13465,
363,
5087,
4007,
22137,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
1579,
1278,
29899,
465,
22137,
29889,
949,
386,
287,
12332,
29889,
601,
29914,
264,
29914,
12333,
29914,
742,
13,
4706,
18546,
2433,
2484,
621,
1774,
29914,
1579,
1278,
29899,
465,
22137,
29915,
13,
1678,
10353,
13,
29962,
13,
13,
13,
29937,
910,
338,
263,
1051,
310,
17752,
393,
338,
5279,
22225,
515,
18028,
322,
411,
13,
29937,
393,
884,
451,
23454,
29889,
29871,
960,
385,
6081,
10614,
701,
1244,
372,
881,
16710,
304,
13,
29937,
367,
9904,
29889,
13,
348,
1761,
287,
353,
518,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
26525,
742,
525,
3492,
865,
4088,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
2379,
1278,
29899,
7387,
3867,
777,
10643,
419,
4167,
363,
29784,
2729,
13,
795,
2060,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
26525,
29914,
742,
13,
4706,
2586,
21454,
2433,
6293,
865,
9292,
29914,
1579,
1278,
29899,
7387,
742,
13,
4706,
23454,
29922,
8824,
29892,
13,
4706,
11486,
2433,
4907,
13,
9651,
830,
622,
287,
1363,
310,
4567,
6139,
297,
10772,
2227,
29892,
15998,
5626,
13,
9651,
411,
278,
5106,
313,
27259,
2343,
9012,
29892,
6355,
28408,
2992,
1846,
322,
263,
13,
9651,
2498,
1067,
1161,
310,
9863,
411,
278,
2379,
1278,
29899,
4081,
3577,
29889,
13,
9651,
365,
2620,
881,
451,
367,
263,
1108,
29892,
541,
278,
5106,
881,
13,
9651,
11157,
29889,
29871,
1152,
18028,
29892,
278,
6081,
13897,
881,
3117,
13,
9651,
5353,
278,
6081,
373,
278,
611,
6504,
1761,
411,
4045,
29889,
13,
13,
9651,
383,
2806,
837,
487,
372,
884,
756,
385,
19710,
15443,
411,
385,
8340,
10422,
29889,
13,
4706,
14550,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29967,
262,
1764,
29906,
5647,
1581,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
4706,
6629,
742,
13,
4706,
10561,
29922,
8516,
29892,
13,
4706,
18546,
2433,
29881,
1054,
728,
29914,
1579,
1278,
29899,
28789,
1764,
29906,
1062,
1581,
742,
13,
4706,
23454,
29922,
8824,
29892,
13,
4706,
11486,
2433,
4907,
13,
9651,
2401,
15451,
304,
367,
766,
1285,
262,
6742,
29889,
13,
13,
9651,
501,
3471,
559,
451,
6924,
29892,
15833,
29891,
5314,
29892,
947,
451,
4505,
263,
1108,
13,
9651,
393,
1033,
451,
367,
7484,
411,
2379,
1278,
3528,
29889,
29871,
306,
7755,
372,
338,
304,
16226,
13,
9651,
916,
17752,
29892,
541,
393,
881,
367,
15648,
373,
278,
611,
6504,
1761,
29889,
13,
4706,
14550,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
9802,
3204,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
910,
338,
263,
2319,
3883,
304,
263,
2791,
3204,
9068,
4175,
964,
596,
13,
795,
29784,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
4691,
3069,
287,
29889,
990,
29914,
8754,
1278,
29899,
9802,
3204,
29914,
742,
13,
4706,
18546,
2433,
29881,
1054,
728,
29914,
1579,
1278,
29899,
3502,
3204,
742,
13,
4706,
23454,
29922,
8824,
29892,
13,
4706,
11486,
2433,
4907,
13,
9651,
10878,
367,
2107,
363,
427,
1761,
292,
541,
372,
881,
1101,
278,
3450,
310,
13,
9651,
2379,
1278,
29899,
9832,
1772,
29889,
29871,
19065,
393,
29892,
278,
1574,
19651,
526,
451,
2854,
364,
303,
313,
3389,
13,
9651,
1549,
364,
303,
29906,
1420,
304,
1074,
278,
2228,
29897,
322,
372,
338,
4567,
6987,
29889,
13,
9651,
13466,
2691,
4248,
13,
4706,
14550,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
1579,
1278,
29899,
26045,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
319,
4333,
310,
3988,
29899,
12817,
3168,
363,
2379,
1278,
8324,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
29879,
29606,
29889,
2966,
21454,
29889,
990,
29914,
1579,
1278,
29899,
26045,
29914,
742,
13,
4706,
2586,
21454,
2433,
29879,
29606,
29914,
1579,
1278,
29899,
26045,
742,
13,
4706,
23454,
29922,
8824,
29892,
13,
4706,
11486,
2433,
4907,
13,
9651,
4358,
1717,
10772,
2227,
2380,
322,
1661,
29899,
535,
689,
292,
6081,
1024,
29889,
29871,
16809,
304,
278,
13,
9651,
2319,
5680,
300,
445,
471,
884,
628,
12652,
515,
278,
1051,
29889,
29871,
739,
471,
13,
9651,
727,
9251,
1434,
278,
2134,
791,
1889,
471,
9129,
29889,
13,
4706,
14550,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
29907,
2696,
3905,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
15854,
19574,
6633,
315,
2696,
3905,
4081,
2066,
1550,
14338,
411,
13,
795,
278,
2379,
1278,
6890,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
29922,
8516,
29892,
13,
4706,
23454,
29922,
8824,
29892,
13,
4706,
11486,
2433,
4907,
13,
9651,
1551,
278,
611,
6504,
1051,
29892,
4148,
16726,
372,
29915,
29879,
29784,
29899,
2222,
4268,
411,
263,
13,
9651,
1422,
3858,
29889,
29871,
1939,
269,
561,
14668,
29899,
6707,
10561,
29892,
925,
263,
12618,
1400,
29889,
29871,
1939,
13,
9651,
970,
368,
15579,
9810,
1192,
6858,
6464,
373,
13,
9651,
2253,
18137,
29889,
990,
29889,
13,
4706,
14550,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
8754,
1278,
29899,
13296,
29878,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
13,
795,
3462,
4956,
29878,
2304,
304,
2379,
1278,
773,
282,
952,
324,
29878,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
29922,
8516,
29892,
13,
4706,
18546,
2433,
14043,
340,
8336,
13371,
29914,
1579,
1278,
29899,
2929,
29878,
742,
13,
4706,
11486,
2433,
4907,
13,
9651,
23004,
368,
429,
10590,
282,
952,
324,
29878,
3450,
297,
2379,
1278,
6081,
4766,
29892,
322,
775,
338,
13,
9651,
5802,
29899,
2040,
29889,
29871,
739,
425,
4684,
5106,
322,
6987,
29889,
13,
4706,
14550,
13,
1678,
10353,
13,
1678,
7338,
2673,
877,
1579,
1278,
29899,
2395,
9600,
742,
12801,
5813,
29958,
742,
13,
4706,
6139,
2433,
4907,
13,
9651,
529,
29886,
29958,
29909,
2319,
2379,
1278,
6081,
363,
4417,
13,
9651,
529,
29874,
2822,
29922,
1124,
597,
264,
29889,
6011,
29889,
990,
29914,
4594,
29914,
9295,
29934,
29943,
29958,
9295,
29934,
29943,
829,
29874,
29958,
13047,
29889,
13,
4706,
6629,
742,
13,
4706,
10561,
2433,
1124,
597,
29879,
29606,
29889,
2966,
21454,
29889,
990,
29914,
1579,
1278,
29899,
2395,
9600,
29914,
742,
13,
4706,
2586,
21454,
2433,
29879,
29606,
29914,
1579,
1278,
29899,
2395,
9600,
742,
13,
4706,
11486,
2433,
4907,
13,
9651,
853,
1761,
287,
1363,
20955,
278,
2379,
1278,
29899,
2008,
29874,
18498,
29888,
6081,
29889,
13,
4706,
14550,
13,
1678,
10353,
13,
29962,
13,
13,
13,
24299,
29889,
6605,
29898,
1989,
29922,
2892,
921,
29901,
921,
29889,
978,
29889,
13609,
3101,
13,
348,
1761,
287,
29889,
6605,
29898,
1989,
29922,
2892,
921,
29901,
921,
29889,
978,
29889,
13609,
3101,
13,
13,
3166,
3142,
5510,
1053,
3142,
7122,
13,
13,
13,
2974,
353,
525,
991,
597,
29886,
1478,
29875,
29889,
990,
22208,
13,
16432,
29918,
2084,
353,
8207,
4836,
29914,
8754,
1278,
22584,
29879,
22208,
13,
13,
13,
1990,
23708,
29898,
3318,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1873,
1125,
13,
4706,
1583,
29889,
3259,
353,
1873,
13,
13,
1678,
822,
304,
29918,
3126,
29898,
1311,
1125,
13,
4706,
736,
9657,
29898,
3259,
29922,
1311,
29889,
3259,
29892,
13,
462,
1678,
9493,
29918,
2271,
29922,
1311,
29889,
16432,
29918,
2271,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
9493,
29918,
2271,
29898,
1311,
1125,
13,
4706,
736,
3142,
7122,
29898,
2974,
29892,
9493,
29918,
2084,
1273,
1583,
29889,
3259,
29897,
13,
13,
13,
276,
17836,
353,
2910,
29898,
19729,
29892,
518,
13,
1678,
525,
29900,
29889,
29896,
742,
13,
1678,
525,
29900,
29889,
29906,
742,
13,
1678,
525,
29900,
29889,
29941,
742,
13,
1678,
525,
29900,
29889,
29941,
29889,
29896,
742,
13,
1678,
525,
29900,
29889,
29946,
742,
13,
1678,
525,
29900,
29889,
29945,
742,
13,
1678,
525,
29900,
29889,
29945,
29889,
29896,
742,
13,
1678,
525,
29900,
29889,
29945,
29889,
29906,
742,
13,
1678,
525,
29900,
29889,
29953,
742,
13,
1678,
525,
29900,
29889,
29953,
29889,
29896,
742,
13,
1678,
525,
29900,
29889,
29955,
742,
13,
1678,
525,
29900,
29889,
29955,
29889,
29896,
742,
13,
1678,
525,
29900,
29889,
29955,
29889,
29906,
742,
13,
1678,
525,
29900,
29889,
29947,
742,
13,
1678,
525,
29900,
29889,
29947,
29889,
29896,
742,
13,
1678,
525,
29900,
29889,
29929,
742,
13,
1678,
525,
29900,
29889,
29896,
29900,
742,
13,
1678,
525,
29900,
29889,
29896,
29900,
29889,
29896,
742,
13,
1678,
525,
29900,
29889,
29896,
29896,
742,
13,
1678,
525,
29900,
29889,
29896,
29896,
29889,
29896,
742,
13,
1678,
525,
29900,
29889,
29896,
29906,
742,
13,
1678,
525,
29900,
29889,
29896,
29906,
29889,
29896,
742,
13,
1678,
525,
29900,
29889,
29896,
29906,
29889,
29906,
742,
13,
1678,
525,
29900,
29889,
29896,
29906,
29889,
29941,
742,
13,
1678,
525,
29900,
29889,
29896,
29906,
29889,
29946,
742,
13,
1678,
525,
29896,
29889,
29900,
742,
13,
1678,
525,
29896,
29889,
29900,
29889,
29896,
742,
13,
1678,
525,
29896,
29889,
29900,
29889,
29906,
742,
13,
2314,
13,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
3142,
5510,
1053,
3142,
5510,
13,
3166,
29784,
1053,
4485,
786,
13,
13,
13,
1990,
8010,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
29892,
3142,
29892,
6139,
29892,
2752,
29922,
8516,
1125,
13,
4706,
1583,
29889,
978,
353,
1024,
13,
4706,
1583,
29889,
2271,
353,
3142,
13,
4706,
1583,
29889,
8216,
353,
4485,
786,
29898,
8216,
29897,
13,
4706,
1583,
29889,
4993,
353,
2752,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3495,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
2271,
338,
451,
6213,
29901,
13,
9651,
736,
3142,
5510,
29898,
1311,
29889,
2271,
9601,
29896,
29962,
13,
13,
1678,
732,
6799,
13,
1678,
822,
2752,
3069,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
4993,
338,
451,
6213,
29901,
13,
9651,
736,
3142,
5510,
29898,
1311,
29889,
4993,
9601,
29896,
29962,
13,
13,
1678,
822,
304,
29918,
3126,
29898,
1311,
1125,
13,
4706,
364,
29894,
353,
24987,
29898,
1311,
467,
8552,
580,
13,
4706,
364,
29894,
1839,
8216,
2033,
353,
29104,
29898,
15291,
1839,
8216,
11287,
13,
4706,
736,
364,
29894,
13,
13,
13,
16418,
353,
426,
13,
1678,
525,
2676,
16315,
2396,
518,
13,
4706,
8010,
877,
8754,
1278,
13253,
742,
525,
1124,
597,
1579,
1278,
29889,
29886,
542,
3634,
29889,
990,
29914,
742,
14550,
13,
9651,
529,
29886,
29958,
13,
795,
450,
4700,
310,
278,
2379,
1278,
9200,
4468,
3528,
3704,
278,
13,
795,
611,
6504,
1761,
5067,
29892,
11534,
18871,
322,
6081,
21235,
29889,
13,
4706,
14550,
511,
13,
4706,
8010,
877,
29933,
1266,
265,
2272,
742,
525,
1124,
597,
1182,
523,
265,
2272,
29889,
990,
29914,
742,
14550,
13,
9651,
529,
29886,
29958,
13,
795,
450,
4700,
310,
278,
29258,
265,
5132,
4911,
6431,
13,
4706,
6629,
742,
2752,
2433,
1124,
597,
3292,
29889,
510,
29914,
29926,
29946,
29885,
347,
29914,
1182,
523,
265,
2272,
29889,
990,
29914,
5477,
13,
4706,
8010,
29898,
29884,
29915,
29879,
298,
288,
364,
321,
16088,
7047,
5849,
742,
525,
1124,
597,
845,
487,
29889,
915,
29914,
742,
14550,
13,
9651,
529,
29886,
29958,
12521,
1971,
403,
4700,
310,
1383,
487,
18540,
14650,
29889,
13,
4706,
14550,
511,
13,
4706,
8010,
29898,
29884,
29915,
1672,
7077,
29979,
27269,
29889,
24826,
742,
525,
991,
597,
1636,
29889,
20821,
6293,
29889,
24826,
29914,
742,
14550,
13,
9651,
529,
29886,
29958,
13,
795,
16641,
7077,
29979,
27269,
29889,
24826,
338,
263,
330,
3504,
8986,
7155,
5073,
322,
1856,
29920,
457,
13,
795,
23425,
11149,
11915,
322,
2898,
7679,
29889,
4001,
29871,
29906,
29900,
29896,
29906,
278,
23366,
29879,
322,
13,
795,
1634,
272,
2153,
3867,
1009,
11621,
414,
411,
9763,
29892,
21804,
29892,
4682,
13,
795,
3697,
322,
1006,
7406,
29889,
13,
4706,
14550,
511,
13,
4706,
8010,
29898,
29884,
29915,
10095,
284,
29903,
2272,
742,
525,
991,
597,
1636,
29889,
2527,
284,
1028,
29891,
29889,
311,
29914,
742,
14550,
13,
9651,
529,
29886,
29958,
13,
795,
24992,
29903,
2272,
29889,
311,
338,
278,
2011,
25648,
4700,
310,
263,
330,
3504,
298,
711,
1609,
13,
795,
17739,
261,
23425,
14364,
20612,
310,
11915,
22706,
29892,
13,
795,
29482,
1338,
29892,
13568,
8995,
13064,
1080,
322,
6776,
1456,
29889,
13,
4706,
14550,
511,
13,
4706,
8010,
877,
1349,
1943,
375,
29933,
20333,
29879,
13253,
742,
525,
1124,
597,
386,
1943,
28685,
29889,
510,
29914,
742,
318,
12008,
13,
9651,
529,
29886,
29958,
13,
795,
16224,
4700,
310,
498,
1943,
375,
29933,
29889,
13,
4706,
14550,
511,
13,
4706,
8010,
877,
10358,
1041,
29880,
688,
742,
525,
1124,
597,
2204,
1041,
29880,
688,
29889,
510,
29914,
742,
318,
12008,
13,
9651,
529,
29886,
29958,
13,
795,
319,
29784,
29899,
13519,
287,
9418,
29899,
24911,
628,
14803,
17432,
13,
4706,
14550,
511,
13,
4706,
8010,
877,
29928,
327,
2713,
598,
742,
525,
1124,
597,
6333,
13653,
29889,
277,
29914,
742,
318,
12008,
13,
9651,
529,
29886,
29958,
13,
795,
5329,
635,
18225,
4700,
363,
19383,
8074,
29914,
2525,
861,
8329,
2066,
29889,
13,
4706,
14550,
511,
13,
4706,
8010,
29898,
13,
9651,
525,
29879,
459,
1656,
742,
525,
1124,
597,
29879,
459,
1656,
29889,
510,
29914,
742,
13,
9651,
12801,
29886,
29958,
17033,
310,
278,
5132,
13563,
5716,
373,
10292,
28845,
29889,
525,
13,
9651,
525,
797,
27722,
438,
6444,
10760,
29892,
263,
281,
10058,
29892,
322,
263,
15678,
29892,
525,
13,
9651,
525,
4478,
519,
1051,
310,
376,
3068,
265,
936,
29908,
6089,
304,
5132,
525,
13,
9651,
525,
2619,
373,
7791,
21106,
29886,
29958,
742,
13,
9651,
2752,
2433,
991,
597,
3292,
29889,
510,
29914,
29879,
459,
1656,
29914,
29879,
459,
1656,
29899,
2746,
29915,
13,
4706,
1723,
13,
1678,
21251,
13,
1678,
525,
13371,
2396,
518,
13,
4706,
8010,
877,
29882,
29887,
29899,
27828,
742,
6213,
29892,
14550,
13,
9651,
529,
29886,
29958,
13,
795,
298,
29887,
29899,
27828,
338,
263,
775,
9076,
1788,
363,
29389,
616,
29889,
29871,
739,
338,
3625,
13,
795,
402,
7390,
29906,
19405,
29889,
13,
4706,
6629,
742,
2752,
2433,
1124,
597,
2966,
21454,
29889,
990,
29914,
29879,
29606,
29914,
29882,
29887,
29899,
27828,
29914,
5477,
13,
4706,
8010,
877,
29934,
29891,
845,
29883,
403,
742,
6213,
29892,
14550,
13,
9651,
529,
29886,
29958,
13,
795,
15586,
845,
29883,
403,
338,
263,
2379,
1278,
3081,
287,
11417,
2109,
411,
2752,
401,
13,
795,
3625,
29889,
13,
4706,
6629,
742,
2752,
2433,
1124,
597,
2966,
21454,
29889,
990,
29914,
29500,
303,
555,
29914,
719,
845,
29883,
403,
29914,
5477,
13,
4706,
8010,
29898,
29884,
29915,
30104,
2596,
688,
7118,
7670,
1742,
317,
12981,
602,
21704,
742,
6213,
29892,
318,
12008,
13,
9651,
529,
29886,
29958,
13,
795,
19999,
688,
7118,
338,
263,
3889,
5780,
393,
16035,
277,
278,
5087,
13,
795,
4368,
4663,
3450,
304,
679,
13553,
7014,
363,
596,
2740,
9999,
292,
13,
795,
11531,
313,
29925,
9026,
470,
3725,
29949,
467,
13,
4706,
6629,
742,
2752,
2433,
1124,
597,
2966,
21454,
29889,
990,
29914,
267,
6698,
2049,
29914,
431,
414,
688,
7118,
5477,
13,
4706,
8010,
877,
25559,
896,
321,
655,
2356,
592,
29973,
742,
6213,
29892,
14550,
13,
9651,
529,
29886,
29958,
13,
795,
319,
20629,
29899,
2746,
363,
8454,
5087,
29915,
29879,
402,
14925,
8343,
411,
438,
5150,
29889,
13,
4706,
6629,
742,
2752,
2433,
1124,
597,
3292,
29889,
510,
29914,
1915,
16575,
7888,
29914,
2603,
2356,
29899,
1004,
5477,
13,
4706,
8010,
877,
7301,
279,
29889,
29895,
29999,
742,
6213,
29892,
14550,
13,
9651,
529,
29886,
29958,
13,
1669,
18512,
366,
671,
4856,
1683,
29915,
29879,
6601,
322,
1284,
1554,
13,
1669,
28539,
322,
8031,
29889,
29871,
14491,
372,
373,
5240,
279,
29889,
29895,
29999,
1728,
2534,
13,
1669,
304,
3896,
596,
16140,
29889,
13,
4706,
6629,
742,
2752,
2433,
1124,
597,
2966,
21454,
29889,
990,
29914,
29880,
1992,
29918,
279,
2455,
29914,
26294,
29920,
5477,
13,
4706,
8010,
877,
11096,
3381,
742,
6213,
29892,
318,
12008,
13,
9651,
529,
29886,
29958,
13,
795,
7809,
3381,
338,
263,
17432,
310,
263,
1532,
29899,
5203,
5881,
3748,
29889,
13,
4706,
6629,
742,
2752,
2433,
991,
597,
2966,
21454,
29889,
990,
29914,
29916,
272,
1165,
1165,
29914,
3129,
3381,
29914,
5477,
13,
4706,
8010,
877,
29926,
277,
29894,
15580,
742,
6213,
29892,
14550,
13,
9651,
529,
29886,
29958,
13,
795,
1856,
29899,
6707,
5780,
304,
16096,
278,
1962,
310,
10772,
19737,
435,
1806,
1480,
13,
4706,
6629,
742,
2752,
2433,
991,
597,
2966,
21454,
29889,
990,
29914,
29886,
1478,
29891,
29914,
29926,
277,
29894,
15580,
5477,
13,
4706,
8010,
877,
14073,
29882,
29887,
742,
525,
1124,
597,
14073,
29882,
29887,
29889,
990,
29914,
742,
14550,
13,
9651,
529,
29886,
29958,
13,
795,
319,
2778,
2764,
616,
2729,
12618,
6012,
29889,
13,
4706,
6629,
742,
2752,
2433,
991,
597,
3292,
29889,
510,
29914,
1929,
4271,
28402,
1144,
29914,
14073,
29882,
29887,
5477,
13,
4706,
8010,
877,
5935,
3601,
29899,
2676,
742,
6213,
29892,
14550,
13,
9651,
529,
29886,
29958,
13,
795,
349,
1367,
15830,
1027,
9183,
29889,
13,
4706,
6629,
742,
2752,
2433,
991,
597,
3292,
29889,
510,
29914,
1929,
4271,
28402,
1144,
29914,
5935,
3601,
29899,
2676,
5477,
13,
4706,
8010,
877,
10493,
29933,
262,
742,
525,
1124,
597,
1124,
2109,
29889,
990,
29914,
742,
318,
12008,
13,
9651,
529,
29886,
29958,
13,
795,
530,
7331,
2009,
669,
2933,
2669,
29889,
13,
4706,
6629,
742,
2752,
2433,
991,
597,
3292,
29889,
510,
29914,
1717,
29876,
621,
276,
2784,
29914,
1124,
2109,
5477,
13,
4706,
8010,
877,
8754,
1278,
29899,
29925,
4350,
2109,
742,
6213,
29892,
318,
12008,
13,
9651,
529,
29886,
29958,
13,
795,
349,
4350,
2109,
623,
411,
2379,
1278,
322,
263,
2846,
17752,
393,
947,
13327,
13,
795,
4511,
408,
1532,
408,
1855,
2230,
5503,
25913,
411,
9909,
29889,
601,
13,
795,
322,
8740,
29887,
824,
1300,
29889,
13,
4706,
6629,
742,
2752,
2433,
991,
597,
3292,
29889,
510,
29914,
29885,
1169,
16099,
10349,
29914,
1579,
1278,
29899,
16179,
2109,
5477,
13,
4706,
8010,
877,
1482,
3844,
2004,
742,
6213,
29892,
318,
12008,
13,
9651,
529,
29886,
29958,
13,
795,
319,
447,
4937,
15753,
29914,
1127,
27423,
17432,
3971,
411,
2379,
1278,
322,
13,
795,
5164,
2379,
1278,
17752,
29889,
13,
4706,
6629,
742,
2752,
2433,
991,
597,
2966,
21454,
29889,
990,
29914,
18386,
29926,
562,
29914,
1482,
3844,
2004,
5477,
13,
4706,
8010,
877,
2568,
1417,
742,
525,
991,
597,
657,
513,
1417,
29889,
601,
29914,
742,
318,
12008,
13,
9651,
529,
29886,
29958,
13,
795,
1894,
1417,
338,
263,
2989,
29899,
29888,
839,
3192,
11781,
322,
21362,
10643,
13,
795,
1788,
8906,
472,
315,
1001,
29940,
29889,
739,
7805,
12862,
5680,
1316,
13,
795,
408,
13465,
411,
11465,
1230,
6757,
29892,
263,
7079,
1788,
13,
795,
322,
2304,
363,
5886,
29949,
29899,
6707,
10760,
29889,
13,
4706,
6629,
742,
2752,
2433,
991,
597,
3292,
29889,
510,
29914,
513,
1417,
29914,
513,
1417,
29914,
5477,
13,
4706,
8010,
877,
29903,
388,
10994,
742,
525,
1124,
597,
20834,
12199,
29889,
12199,
1579,
1278,
29889,
510,
742,
318,
12008,
13,
9651,
529,
29886,
29958,
13,
795,
319,
2560,
2643,
7613,
29889,
13,
4706,
6629,
742,
2752,
2433,
991,
597,
3292,
29889,
510,
29914,
7979,
29891,
492,
29914,
20834,
12199,
5477,
13,
4706,
8010,
877,
10358,
2491,
468,
742,
525,
1124,
597,
2204,
2491,
468,
29889,
12199,
1579,
1278,
29889,
510,
742,
318,
12008,
13,
9651,
529,
29886,
29958,
13,
795,
319,
12618,
6012,
393,
11286,
7663,
322,
6503,
10643,
29889,
13,
4706,
6629,
742,
2752,
2433,
991,
597,
3292,
29889,
510,
29914,
7979,
29891,
492,
29914,
2204,
2491,
468,
5477,
13,
4706,
8010,
877,
2499,
2404,
29891,
742,
525,
1124,
597,
10336,
29891,
29889,
12199,
1579,
1278,
29889,
510,
742,
318,
12008,
13,
9651,
529,
29886,
29958,
13,
795,
319,
2989,
29899,
14394,
29881,
15373,
29899,
845,
4362,
5264,
28127,
29889,
13,
4706,
6629,
742,
2752,
2433,
991,
597,
3292,
29889,
510,
29914,
7979,
29891,
492,
29914,
10336,
29891,
5477,
13,
4706,
8010,
877,
29911,
8144,
1608,
742,
525,
1124,
597,
29873,
8144,
1608,
29889,
12199,
1579,
1278,
29889,
510,
742,
318,
12008,
13,
9651,
529,
29886,
29958,
13,
795,
319,
304,
29899,
1867,
2280,
10703,
408,
317,
7228,
29892,
372,
11286,
29871,
13,
795,
474,
29896,
29947,
29876,
313,
8754,
1278,
29899,
29933,
1107,
29897,
322,
8128,
1856,
23649,
29889,
13,
4706,
6629,
742,
2752,
2433,
991,
597,
3292,
29889,
510,
29914,
7979,
29891,
492,
29914,
29873,
8144,
1608,
5477,
13,
4706,
8010,
877,
9694,
1451,
271,
742,
525,
1124,
597,
12510,
271,
29889,
12199,
1579,
1278,
29889,
510,
742,
318,
12008,
13,
9651,
529,
29886,
29958,
13,
795,
319,
13563,
5716,
2729,
373,
2563,
11373,
313,
8754,
1278,
29899,
11373,
29899,
5971,
511,
27431,
2955,
29871,
13,
795,
411,
4485,
3204,
2304,
322,
775,
5877,
12141,
292,
29889,
13,
4706,
6629,
742,
2752,
2433,
991,
597,
3292,
29889,
510,
29914,
7979,
29891,
492,
29914,
12510,
271,
5477,
13,
1678,
4514,
13,
13,
29913,
13,
13,
29937,
1797,
9279,
491,
1024,
13,
1454,
903,
7320,
297,
9279,
29889,
1524,
5975,
7295,
13,
1678,
903,
7320,
29889,
6605,
29898,
1989,
29922,
2892,
921,
29901,
921,
29889,
978,
29889,
13609,
3101,
13,
6144,
903,
7320,
13,
13,
3166,
12865,
1053,
12865,
13,
3166,
4576,
284,
305,
6764,
1053,
1653,
29918,
10599,
29892,
12481,
29892,
8102,
29892,
1714,
29892,
12315,
29892,
320,
13,
268,
19358,
2558,
29892,
1741,
13,
3166,
4576,
284,
305,
6764,
29889,
555,
1053,
16505,
287,
29918,
7924,
29892,
4867,
28107,
29892,
1250,
999,
29892,
8220,
13,
3166,
4576,
284,
305,
6764,
29889,
1062,
29889,
311,
16544,
1230,
1053,
7669,
1230,
29918,
3188,
13,
13,
3166,
23085,
13289,
1053,
22152,
29918,
6799,
29892,
1732,
29918,
1256,
13,
13,
3166,
29784,
1053,
3142,
29918,
1454,
29892,
4485,
786,
13,
3166,
29784,
29918,
22942,
1053,
623,
29892,
2740,
13,
13,
10599,
353,
1653,
29918,
10599,
29898,
932,
29889,
2917,
1839,
25832,
27982,
29918,
15551,
7464,
13,
462,
539,
3588,
29918,
2523,
356,
29922,
5574,
29892,
13,
462,
539,
3579,
932,
29889,
2917,
1839,
25832,
27982,
29918,
6007,
8186,
1783,
29918,
14094,
27946,
11287,
13,
2585,
29918,
7924,
353,
16505,
287,
29918,
7924,
29898,
7924,
28107,
29898,
6921,
15060,
29922,
8824,
29892,
13,
462,
462,
308,
1120,
974,
29880,
1878,
29922,
8824,
29892,
13,
462,
462,
308,
7868,
29922,
10599,
876,
13,
13,
1753,
2069,
29918,
2585,
7295,
13,
1678,
8125,
29889,
19635,
29889,
3258,
29918,
497,
29898,
5355,
29922,
10599,
29897,
13,
13,
13,
3195,
353,
7669,
1230,
29918,
3188,
29898,
978,
2433,
3195,
1495,
13,
3195,
29889,
1972,
353,
4833,
29918,
7924,
29889,
1972,
29918,
6799,
580,
13,
13,
13,
1990,
4911,
29898,
3195,
1125,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
7193,
29915,
13,
1678,
1178,
353,
12481,
877,
1792,
29918,
333,
742,
8102,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
1722,
333,
353,
12481,
877,
3150,
333,
742,
1714,
29898,
29906,
29900,
29900,
876,
13,
1678,
1024,
353,
12481,
29898,
1231,
29898,
29906,
29900,
29900,
876,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
29892,
1722,
333,
1125,
13,
4706,
1583,
29889,
978,
353,
1024,
13,
4706,
1583,
29889,
3150,
333,
353,
1722,
333,
13,
13,
1678,
822,
304,
29918,
3126,
29898,
1311,
1125,
13,
4706,
736,
9657,
29898,
978,
29922,
1311,
29889,
978,
29892,
338,
29918,
6406,
29922,
1311,
29889,
275,
29918,
6406,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
338,
29918,
6406,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
3150,
333,
297,
623,
29889,
2917,
1839,
3035,
16173,
29903,
2033,
13,
13,
1678,
822,
4770,
1837,
12035,
1311,
29892,
916,
1125,
13,
4706,
736,
1134,
29898,
1311,
29897,
338,
1134,
29898,
1228,
29897,
322,
1583,
29889,
333,
1275,
916,
29889,
333,
13,
13,
1678,
822,
4770,
484,
12035,
1311,
29892,
916,
1125,
13,
4706,
736,
451,
1583,
17255,
1837,
12035,
1228,
29897,
13,
13,
13,
1990,
17943,
29898,
3195,
1125,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
20683,
29915,
13,
1678,
1178,
353,
12481,
877,
7320,
29918,
333,
742,
8102,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
1024,
353,
12481,
29898,
1231,
29898,
29945,
29900,
876,
13,
1678,
2243,
688,
353,
12481,
29898,
1231,
29898,
29945,
29900,
876,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
1125,
13,
4706,
1583,
29889,
978,
353,
1024,
13,
4706,
1583,
29889,
29517,
353,
17411,
4286,
7122,
29898,
978,
29889,
5451,
16655,
13609,
580,
13,
13,
1678,
822,
304,
29918,
3126,
29898,
1311,
1125,
13,
4706,
736,
9657,
29898,
978,
29922,
1311,
29889,
978,
29892,
2243,
688,
29922,
1311,
29889,
29517,
29892,
2302,
29922,
1311,
29889,
2798,
29897,
13,
13,
1678,
732,
29883,
3791,
29918,
6799,
13,
1678,
822,
2302,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
29879,
1240,
27421,
29889,
2798,
580,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3142,
29898,
1311,
1125,
13,
4706,
736,
3142,
29918,
1454,
877,
29879,
1240,
27421,
29889,
7320,
742,
2243,
688,
29922,
1311,
29889,
29517,
29897,
13,
13,
13,
1990,
317,
1240,
7988,
29898,
3195,
29892,
2740,
29889,
3220,
519,
1125,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
29879,
1240,
27421,
29915,
13,
1678,
1178,
353,
12481,
877,
29879,
1240,
7988,
29918,
333,
742,
8102,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
4148,
29918,
333,
353,
12481,
29898,
7798,
29892,
19358,
2558,
877,
7193,
29889,
1792,
29918,
333,
8785,
13,
1678,
7663,
29918,
333,
353,
12481,
29898,
7798,
29892,
19358,
2558,
877,
20683,
29889,
7320,
29918,
333,
8785,
13,
1678,
3611,
353,
12481,
29898,
1231,
29898,
29906,
29900,
29900,
876,
13,
1678,
3573,
353,
12481,
29898,
1231,
29897,
13,
1678,
2529,
29918,
1256,
353,
12481,
29898,
11384,
29897,
13,
13,
1678,
4148,
353,
8220,
29898,
2659,
29892,
1250,
999,
29922,
1627,
999,
877,
29879,
1240,
27421,
742,
17366,
2433,
16626,
8785,
13,
1678,
7663,
353,
8220,
29898,
10900,
29892,
1250,
999,
29922,
1627,
999,
877,
29879,
1240,
27421,
742,
17366,
2433,
16626,
8785,
13,
13,
1678,
2740,
29918,
3225,
29918,
14380,
353,
525,
29879,
1240,
7988,
29915,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4148,
29892,
3611,
29892,
3573,
29892,
7663,
1125,
13,
4706,
1583,
29889,
8921,
353,
4148,
13,
4706,
1583,
29889,
3257,
353,
3611,
13,
4706,
1583,
29889,
2587,
353,
3573,
13,
4706,
1583,
29889,
7320,
353,
7663,
13,
4706,
1583,
29889,
5467,
29918,
1256,
353,
12865,
29889,
329,
29883,
3707,
580,
13,
13,
1678,
822,
304,
29918,
3126,
29898,
1311,
1125,
13,
4706,
736,
9657,
29898,
333,
29922,
1311,
29889,
333,
29892,
3611,
29922,
1311,
29889,
3257,
29892,
13,
462,
1678,
3573,
29922,
2523,
356,
29898,
1311,
29889,
9482,
287,
29918,
2587,
511,
13,
462,
1678,
2529,
29918,
1256,
29922,
1124,
29918,
1256,
29898,
1311,
29889,
5467,
29918,
1256,
511,
13,
462,
1678,
6589,
11759,
29883,
29889,
517,
29918,
3126,
580,
363,
274,
297,
1583,
29889,
21032,
1402,
13,
462,
1678,
4148,
29922,
1311,
29889,
8921,
29889,
517,
29918,
3126,
3285,
13,
462,
1678,
7663,
29922,
1311,
29889,
7320,
29889,
29517,
29897,
13,
13,
1678,
822,
679,
29918,
4478,
29918,
3225,
29898,
1311,
1125,
13,
4706,
736,
9657,
29898,
13,
9651,
1178,
29922,
2523,
356,
29898,
1311,
29889,
333,
511,
13,
9651,
3611,
29922,
1311,
29889,
3257,
29892,
13,
9651,
29361,
11759,
1311,
29889,
7320,
29889,
978,
1402,
13,
9651,
2793,
29922,
1311,
29889,
2587,
13,
4706,
1723,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
8453,
29918,
4478,
29918,
2914,
29898,
25932,
29892,
1121,
1125,
13,
4706,
5446,
353,
1067,
29879,
29889,
1972,
29889,
657,
29898,
524,
29898,
2914,
1839,
333,
25901,
13,
4706,
565,
5446,
338,
451,
6213,
29901,
13,
9651,
1426,
353,
5446,
29889,
9482,
287,
29918,
2587,
29889,
303,
374,
415,
810,
580,
13,
9651,
736,
4485,
786,
29898,
2914,
29889,
28970,
29879,
877,
3051,
742,
1426,
29922,
726,
876,
470,
6213,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3142,
29898,
1311,
1125,
13,
4706,
736,
3142,
29918,
1454,
877,
29879,
1240,
27421,
29889,
4294,
742,
1178,
29922,
1311,
29889,
333,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
13751,
29918,
2587,
29898,
1311,
1125,
13,
4706,
515,
29784,
29918,
22942,
29889,
13239,
1053,
3402,
29918,
1037,
1772,
13,
4706,
736,
3402,
29918,
1037,
1772,
29898,
1311,
29889,
2587,
29897,
13,
13,
13,
1990,
461,
29898,
3195,
1125,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
21032,
29915,
13,
1678,
1178,
353,
12481,
877,
9342,
29918,
333,
742,
8102,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
11534,
29918,
333,
353,
12481,
29898,
7798,
29892,
19358,
2558,
877,
29879,
1240,
27421,
29889,
29879,
1240,
7988,
29918,
333,
8785,
13,
1678,
4148,
29918,
333,
353,
12481,
29898,
7798,
29892,
19358,
2558,
877,
7193,
29889,
1792,
29918,
333,
8785,
13,
1678,
3611,
353,
12481,
29898,
1231,
29898,
29906,
29900,
29900,
876,
13,
1678,
1426,
353,
12481,
29898,
1231,
29897,
13,
1678,
2529,
29918,
1256,
353,
12481,
29898,
11384,
29897,
13,
13,
1678,
11534,
353,
8220,
29898,
29903,
1240,
7988,
29892,
1250,
999,
29922,
1627,
999,
877,
21032,
742,
17366,
29922,
5574,
876,
13,
1678,
4148,
353,
8220,
29898,
2659,
29892,
1250,
999,
29922,
1627,
999,
877,
21032,
742,
17366,
2433,
16626,
8785,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
11534,
29892,
4148,
29892,
3611,
29892,
1426,
1125,
13,
4706,
1583,
29889,
29879,
1240,
7988,
353,
11534,
13,
4706,
1583,
29889,
8921,
353,
4148,
13,
4706,
1583,
29889,
3257,
353,
3611,
13,
4706,
1583,
29889,
726,
353,
1426,
13,
4706,
1583,
29889,
5467,
29918,
1256,
353,
12865,
29889,
329,
29883,
3707,
580,
13,
13,
1678,
822,
304,
29918,
3126,
29898,
1311,
1125,
13,
4706,
736,
9657,
29898,
8921,
29922,
1311,
29889,
8921,
29889,
517,
29918,
3126,
3285,
13,
462,
1678,
3611,
29922,
1311,
29889,
3257,
29892,
13,
462,
1678,
2529,
29918,
1256,
29922,
1124,
29918,
1256,
29898,
1311,
29889,
5467,
29918,
1256,
511,
13,
462,
1678,
1426,
29922,
2523,
356,
29898,
1311,
29889,
9482,
287,
29918,
726,
876,
13,
13,
1678,
732,
6799,
13,
1678,
822,
13751,
29918,
726,
29898,
1311,
1125,
13,
4706,
515,
29784,
29918,
22942,
29889,
13239,
1053,
3402,
29918,
1037,
1772,
13,
4706,
736,
3402,
29918,
1037,
1772,
29898,
1311,
29889,
726,
29897,
13,
13,
13,
1990,
4673,
1367,
29254,
362,
29898,
3195,
1125,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
3150,
333,
29918,
21264,
800,
29915,
13,
1678,
1178,
353,
12481,
877,
21264,
362,
29918,
333,
742,
8102,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
1923,
29918,
2271,
353,
12481,
29898,
1231,
29898,
29896,
29900,
29906,
29946,
876,
13,
1678,
4386,
353,
12481,
29898,
1231,
29898,
29906,
29945,
29945,
876,
13,
1678,
7035,
353,
12481,
29898,
1231,
29898,
29906,
29945,
29945,
876,
13,
1678,
16610,
353,
12481,
29898,
7798,
29897,
13,
1678,
25423,
353,
12481,
29898,
7798,
29897,
13,
1678,
1223,
542,
29918,
1853,
353,
12481,
29898,
1231,
29898,
29953,
29946,
876,
13,
13,
13,
1990,
4673,
1367,
2659,
29940,
10646,
29898,
3195,
1125,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
3150,
333,
29918,
1792,
29918,
5464,
778,
29915,
13,
1678,
1178,
353,
12481,
877,
1792,
29918,
5464,
346,
29918,
333,
742,
8102,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
1923,
29918,
2271,
353,
12481,
29898,
1231,
29898,
29896,
29900,
29906,
29946,
876,
13,
1678,
14334,
353,
12481,
29898,
7798,
29897,
13,
1678,
15795,
353,
12481,
29898,
1231,
29898,
29946,
29900,
876,
13,
13,
13,
3696,
29889,
20631,
29898,
2585,
29918,
7924,
29892,
525,
7045,
29918,
23126,
742,
2740,
29889,
5504,
29918,
4299,
29918,
6707,
29918,
2248,
267,
29897,
13,
13,
3166,
12865,
1053,
12865,
13,
3166,
29784,
1053,
2379,
1278,
29892,
4867,
29892,
330,
29892,
4050,
29918,
6886,
13,
3166,
29784,
29918,
3150,
333,
1053,
4673,
1367,
13,
13,
932,
353,
2379,
1278,
22168,
978,
1649,
29897,
13,
932,
29889,
2917,
29889,
3166,
29918,
3318,
877,
22942,
2917,
1495,
13,
13,
3166,
29784,
29918,
22942,
29889,
3150,
333,
29918,
5150,
1053,
5470,
6585,
1367,
9044,
13,
3398,
353,
4673,
1367,
29898,
932,
29892,
3787,
29918,
14399,
29922,
9112,
6585,
1367,
9044,
29897,
13,
13,
13,
29992,
932,
29889,
2704,
13789,
29898,
29946,
29900,
29946,
29897,
13,
1753,
451,
29918,
11940,
29898,
2704,
1125,
13,
1678,
736,
4050,
29918,
6886,
877,
29946,
29900,
29946,
29889,
1420,
5477,
29871,
29946,
29900,
29946,
13,
13,
13,
29992,
932,
29889,
11083,
29918,
3827,
13,
1753,
2254,
29918,
3784,
29918,
1792,
7295,
13,
1678,
330,
29889,
1792,
353,
4911,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
3150,
333,
29922,
7924,
1839,
3150,
333,
2033,
467,
4102,
580,
320,
13,
4706,
565,
525,
3150,
333,
29915,
297,
4867,
1683,
6213,
13,
13,
13,
29992,
932,
29889,
371,
538,
776,
29918,
3827,
13,
1753,
3349,
29918,
2585,
29918,
7924,
29898,
11739,
1125,
13,
1678,
4833,
29918,
7924,
29889,
5992,
580,
13,
13,
13,
29992,
932,
29889,
4703,
29918,
26482,
13,
1753,
1857,
29918,
6360,
7295,
13,
1678,
736,
11117,
3784,
29918,
6360,
2396,
12865,
29889,
329,
29883,
3707,
2141,
6360,
29913,
13,
13,
13,
932,
29889,
1202,
29918,
2271,
29918,
7491,
11219,
2640,
29914,
742,
16248,
2433,
2640,
29889,
2248,
742,
2048,
29918,
6194,
29922,
5574,
29897,
13,
932,
29889,
1202,
29918,
2271,
29918,
7491,
11219,
2640,
29914,
29966,
2084,
29901,
3488,
20690,
742,
16248,
2433,
2640,
29889,
4294,
742,
13,
462,
2048,
29918,
6194,
29922,
5574,
29897,
13,
932,
29889,
1202,
29918,
2271,
29918,
7491,
11219,
2640,
29914,
29966,
3259,
29958,
6294,
25694,
29914,
8754,
1278,
29889,
5140,
742,
16248,
2433,
2640,
29889,
5140,
742,
13,
462,
2048,
29918,
6194,
29922,
5574,
29897,
13,
13,
3166,
29784,
29918,
22942,
29889,
7406,
1053,
2498,
13,
3166,
29784,
29918,
22942,
29889,
7406,
1053,
7881,
13,
3166,
29784,
29918,
22942,
29889,
7406,
1053,
611,
6504,
1761,
13,
3166,
29784,
29918,
22942,
29889,
7406,
1053,
9830,
27421,
13,
3166,
29784,
29918,
22942,
29889,
7406,
1053,
17752,
13,
932,
29889,
9573,
29918,
9539,
2158,
29898,
17492,
29889,
1545,
29897,
13,
932,
29889,
9573,
29918,
9539,
2158,
29898,
23834,
29889,
1545,
29897,
13,
932,
29889,
9573,
29918,
9539,
2158,
29898,
2549,
292,
1761,
29889,
1545,
29897,
13,
932,
29889,
9573,
29918,
9539,
2158,
29898,
29879,
1240,
27421,
29889,
1545,
29897,
13,
932,
29889,
9573,
29918,
9539,
2158,
29898,
24299,
29889,
1545,
29897,
13,
13,
3166,
29784,
29918,
22942,
29889,
9803,
1053,
4911,
29892,
4833,
29918,
7924,
13,
3166,
29784,
29918,
22942,
1053,
3667,
29879,
13,
13,
932,
29889,
28789,
1764,
29918,
6272,
29889,
26705,
1839,
12673,
4830,
2033,
353,
3667,
29879,
29889,
4830,
29918,
12673,
13,
932,
29889,
28789,
1764,
29918,
6272,
29889,
26705,
1839,
1256,
4830,
2033,
353,
3667,
29879,
29889,
4830,
29918,
1256,
13,
932,
29889,
28789,
1764,
29918,
6272,
29889,
26705,
1839,
9346,
287,
2554,
4830,
2033,
353,
3667,
29879,
29889,
4830,
29918,
9346,
287,
2554,
13,
932,
29889,
28789,
1764,
29918,
6272,
29889,
26705,
1839,
4990,
3150,
333,
2033,
353,
3667,
29879,
29889,
4990,
29918,
3150,
333,
13,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
2897,
13,
5215,
337,
13,
3166,
29784,
1053,
3142,
29918,
1454,
29892,
4485,
786,
13,
3166,
29784,
29918,
22942,
1053,
623,
13,
3166,
29784,
29918,
22942,
29889,
4478,
1053,
11374,
519,
13,
13,
29918,
1514,
29918,
2587,
29918,
276,
353,
337,
29889,
12198,
29898,
29878,
12008,
10780,
3844,
29916,
29897,
13,
1678,
529,
3257,
5961,
5575,
7897,
829,
3257,
29958,
5575,
29973,
13,
1678,
529,
4563,
5575,
29973,
1990,
543,
5575,
29973,
2587,
5575,
29973,
5961,
5575,
29897,
13,
1678,
529,
4563,
5575,
29973,
1990,
543,
5575,
29973,
29879,
561,
14668,
2975,
1646,
13,
4907,
1495,
13,
13,
13,
1990,
10854,
362,
5074,
29898,
3220,
519,
1125,
13,
1678,
2740,
29918,
3225,
29918,
14380,
353,
525,
12663,
29915,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2243,
688,
1125,
13,
4706,
1583,
29889,
29517,
353,
2243,
688,
13,
4706,
7876,
353,
2897,
29889,
2084,
29889,
7122,
29898,
932,
29889,
2917,
1839,
28665,
5005,
3919,
8098,
29918,
10145,
7464,
13,
462,
3986,
2243,
688,
29892,
525,
2248,
29889,
1420,
1495,
13,
4706,
411,
1722,
29898,
9144,
29897,
408,
285,
29901,
13,
9651,
8118,
353,
285,
29889,
949,
2141,
13808,
877,
9420,
29899,
29947,
1495,
13,
9651,
3611,
29892,
1426,
353,
903,
1514,
29918,
2587,
29918,
276,
29889,
4478,
29898,
10853,
467,
13155,
580,
13,
4706,
1583,
29889,
3257,
353,
4485,
786,
29898,
3257,
467,
303,
374,
415,
810,
2141,
5451,
29898,
29884,
29915,
30003,
29861,
29900,
1822,
17010,
580,
13,
4706,
1583,
29889,
726,
353,
4485,
786,
29898,
726,
467,
303,
374,
415,
810,
2141,
17010,
2141,
6506,
29898,
29884,
29915,
30497,
742,
318,
29915,
1495,
13,
13,
1678,
822,
679,
29918,
4478,
29918,
3225,
29898,
1311,
1125,
13,
4706,
736,
9657,
29898,
13,
9651,
1178,
29922,
2523,
356,
29898,
1311,
29889,
29517,
511,
13,
9651,
3611,
29922,
1311,
29889,
3257,
29892,
13,
9651,
29361,
11759,
1402,
13,
9651,
2793,
29922,
1311,
29889,
726,
13,
4706,
1723,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3142,
29898,
1311,
1125,
13,
4706,
736,
3142,
29918,
1454,
877,
2640,
29889,
4294,
742,
1813,
29922,
1311,
29889,
29517,
29897,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
8453,
29918,
4478,
29918,
2914,
29898,
25932,
29892,
1121,
1125,
13,
4706,
364,
29894,
353,
1067,
29879,
29898,
2914,
1839,
333,
11287,
13,
4706,
736,
4485,
786,
29898,
2914,
29889,
28970,
29879,
877,
3051,
742,
1426,
29922,
15291,
29889,
726,
876,
470,
6213,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
4256,
29918,
12292,
29898,
25932,
1125,
13,
4706,
2967,
29918,
12083,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
932,
29889,
2917,
1839,
28665,
5005,
3919,
8098,
29918,
10145,
11287,
13,
4706,
363,
4516,
2084,
29892,
4516,
7039,
29892,
977,
264,
1280,
297,
2897,
29889,
20919,
29898,
3188,
29918,
12083,
1125,
13,
9651,
565,
525,
2248,
29889,
1420,
29915,
297,
977,
264,
1280,
29901,
13,
18884,
2243,
688,
353,
4516,
2084,
29961,
2435,
29898,
3188,
29918,
12083,
29897,
718,
29871,
29896,
17531,
13,
18884,
396,
14383,
278,
2380,
1813,
29889,
29871,
19315,
13,
18884,
565,
2243,
688,
29901,
13,
462,
1678,
7709,
10854,
362,
5074,
29898,
29517,
29897,
13,
13,
5215,
337,
13,
5215,
907,
1772,
16680,
13,
3166,
12865,
1053,
12865,
29892,
5335,
287,
2554,
13,
3166,
26943,
2918,
1053,
12856,
13,
3166,
2090,
312,
8789,
1053,
11463,
567,
13,
3166,
907,
1772,
16680,
29889,
17664,
1053,
4721,
7445,
13,
3166,
19484,
1860,
1053,
12141,
13,
3166,
19484,
1860,
29889,
4830,
2153,
1053,
24726,
18522,
13,
3166,
19484,
1860,
29889,
2506,
414,
1053,
679,
29918,
2506,
261,
29918,
1609,
29918,
978,
13,
3166,
19484,
1860,
29889,
4422,
1053,
4134,
17413,
13,
3166,
29784,
1053,
330,
29892,
3142,
29918,
1454,
29892,
11013,
29892,
27450,
29892,
2009,
29892,
6684,
29892,
4485,
786,
13,
3166,
29784,
29918,
22942,
29889,
1579,
1278,
858,
1508,
1053,
2379,
1278,
29891,
5568,
396,
1021,
408,
10561,
13,
13,
13,
2272,
29887,
1860,
29918,
689,
2620,
353,
24726,
18522,
29898,
3293,
29922,
8754,
1278,
29891,
5568,
29897,
13,
13,
29918,
5652,
29918,
5451,
29918,
276,
353,
337,
29889,
12198,
29898,
29878,
29915,
1194,
29879,
28135,
1495,
13,
13,
13,
15307,
2287,
5850,
29909,
29918,
3904,
1806,
29903,
353,
313,
13,
1678,
6702,
6360,
742,
1678,
29941,
29953,
29900,
29900,
334,
29871,
29906,
29946,
334,
29871,
29941,
29953,
29945,
511,
13,
1678,
6702,
10874,
742,
259,
29941,
29953,
29900,
29900,
334,
29871,
29906,
29946,
334,
29871,
29941,
29900,
511,
13,
1678,
6702,
18448,
742,
1678,
29941,
29953,
29900,
29900,
334,
29871,
29906,
29946,
334,
29871,
29955,
511,
13,
1678,
6702,
3250,
742,
268,
29941,
29953,
29900,
29900,
334,
29871,
29906,
29946,
511,
13,
1678,
6702,
18721,
742,
1678,
29941,
29953,
29900,
29900,
511,
13,
1678,
6702,
1195,
1082,
742,
29871,
29953,
29900,
511,
13,
1678,
6702,
7496,
742,
29871,
29896,
29897,
13,
29897,
13,
13,
13,
1990,
5920,
7445,
29898,
6572,
7445,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
2428,
29898,
3399,
7445,
29892,
1583,
467,
1649,
2344,
1649,
877,
1457,
742,
6024,
6224,
29912,
742,
525,
12499,
11287,
13,
13,
1678,
822,
903,
4282,
29898,
1311,
29892,
2730,
29892,
1543,
29918,
8899,
29892,
12471,
1125,
13,
4706,
3454,
353,
1583,
29889,
13087,
29886,
29906,
29889,
1491,
29898,
29878,
12764,
29896,
742,
2730,
29889,
2972,
29898,
29896,
8106,
5451,
9012,
580,
13,
4706,
565,
3454,
322,
3454,
29961,
29900,
1822,
27382,
2541,
14237,
20714,
1125,
13,
9651,
1018,
29901,
13,
18884,
19566,
261,
353,
679,
29918,
2506,
261,
29918,
1609,
29918,
978,
29898,
9012,
29889,
7323,
29898,
29900,
9601,
29906,
29901,
1822,
17010,
3101,
13,
9651,
5174,
4134,
17413,
29901,
13,
18884,
1209,
13,
9651,
1683,
29901,
13,
18884,
736,
4485,
786,
29898,
28970,
29898,
29884,
12764,
29876,
4286,
7122,
29898,
9012,
511,
19566,
261,
29892,
13,
462,
462,
4706,
19484,
1860,
29918,
689,
2620,
876,
13,
4706,
736,
12856,
29889,
4039,
29889,
1457,
29898,
29884,
12764,
29876,
4286,
7122,
29898,
9012,
876,
13,
13,
13,
6341,
29918,
15321,
781,
353,
907,
1772,
16680,
29889,
3258,
29918,
15321,
781,
29898,
1037,
1772,
16680,
29889,
1037,
1772,
29896,
29900,
29918,
3188,
29897,
13,
29937,
15833,
29891,
982,
304,
679,
8177,
310,
1967,
2304,
13,
6341,
29918,
15321,
781,
29889,
2492,
353,
2888,
29918,
15321,
781,
29889,
1217,
29918,
4594,
13,
6341,
29918,
15321,
781,
29889,
1457,
353,
5920,
7445,
580,
13,
13,
13,
29918,
16680,
353,
907,
1772,
16680,
29889,
11726,
29898,
13,
1678,
23725,
29922,
6341,
29918,
15321,
781,
29892,
13,
1678,
1158,
2433,
1420,
29915,
13,
29897,
13,
13,
13,
1753,
3402,
29918,
1037,
1772,
29898,
726,
1125,
13,
1678,
736,
4485,
786,
7373,
16680,
29889,
9482,
29898,
726,
29892,
8025,
29922,
8516,
876,
13,
13,
13,
1753,
6219,
29918,
9012,
29918,
29893,
336,
3262,
29898,
726,
29892,
2920,
29922,
29955,
29946,
29892,
16897,
29922,
29947,
29906,
1125,
13,
1678,
3454,
353,
1426,
29889,
5451,
9012,
580,
13,
1678,
565,
599,
29898,
2435,
29898,
1220,
29897,
5277,
16897,
363,
1196,
297,
3454,
1125,
13,
4706,
736,
3454,
13,
1678,
1121,
353,
5159,
13,
1678,
363,
1196,
297,
3454,
29901,
13,
4706,
565,
7431,
29898,
1220,
29897,
5277,
16897,
29901,
13,
9651,
1121,
29889,
4397,
29898,
1220,
29897,
13,
9651,
6773,
13,
4706,
1196,
29918,
2103,
353,
29871,
29900,
13,
4706,
1196,
29918,
9040,
353,
5159,
13,
4706,
363,
8424,
297,
903,
5652,
29918,
5451,
29918,
276,
29889,
5451,
29898,
1220,
1125,
13,
9651,
1196,
29918,
2103,
4619,
7431,
29898,
12343,
346,
29897,
13,
9651,
565,
1196,
29918,
2103,
1405,
2920,
29901,
13,
18884,
1121,
29889,
4397,
29898,
29884,
29915,
4286,
7122,
29898,
1220,
29918,
9040,
876,
13,
18884,
1196,
29918,
9040,
353,
5159,
13,
18884,
565,
451,
8424,
29889,
790,
3535,
7295,
13,
462,
1678,
1196,
29918,
9040,
29889,
4397,
29898,
12343,
346,
29897,
13,
462,
1678,
1196,
29918,
2103,
353,
7431,
29898,
12343,
346,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
1196,
29918,
2103,
353,
29871,
29900,
13,
9651,
1683,
29901,
13,
18884,
1196,
29918,
9040,
29889,
4397,
29898,
12343,
346,
29897,
13,
4706,
565,
1196,
29918,
9040,
29901,
13,
9651,
1121,
29889,
4397,
29898,
29884,
29915,
4286,
7122,
29898,
1220,
29918,
9040,
876,
13,
1678,
736,
1121,
13,
13,
13,
1753,
2009,
29918,
29893,
1934,
29918,
3126,
7295,
13,
1678,
396,
591,
871,
3544,
4390,
565,
278,
11029,
310,
4390,
338,
7621,
1135,
278,
13,
1678,
396,
11029,
310,
1426,
29914,
1420,
1363,
1426,
29914,
1420,
338,
16389,
304,
2304,
13,
1678,
396,
14376,
393,
3544,
373,
3776,
29930,
13,
1678,
1900,
353,
2009,
29889,
16044,
29918,
29885,
17528,
7384,
320,
13,
4706,
869,
13318,
29918,
4352,
18959,
6214,
29914,
3126,
742,
525,
726,
29914,
1420,
11287,
13,
1678,
736,
1900,
1275,
525,
6214,
29914,
3126,
29915,
322,
320,
13,
539,
2009,
29889,
16044,
29918,
29885,
17528,
7384,
29961,
13318,
29962,
1405,
2009,
29889,
16044,
29918,
29885,
17528,
7384,
1839,
726,
29914,
1420,
2033,
13,
13,
13,
1753,
6858,
29918,
7507,
29898,
29888,
1125,
13,
1678,
732,
29893,
336,
567,
29898,
29888,
29897,
13,
1678,
822,
10200,
630,
29918,
2220,
10456,
5085,
29892,
3579,
19290,
1125,
13,
4706,
565,
330,
29889,
1792,
338,
6213,
29901,
13,
9651,
11013,
29898,
29884,
29915,
3492,
817,
304,
367,
8794,
297,
363,
445,
1813,
29889,
1495,
13,
9651,
736,
6684,
29898,
2271,
29918,
1454,
877,
17492,
29889,
7507,
742,
2446,
29922,
3827,
29889,
2084,
876,
13,
4706,
736,
285,
10456,
5085,
29892,
3579,
19290,
29897,
13,
1678,
736,
10200,
630,
29918,
2220,
13,
13,
13,
1753,
6858,
29918,
6406,
29898,
29888,
1125,
13,
1678,
732,
29893,
336,
567,
29898,
29888,
29897,
13,
1678,
822,
10200,
630,
29918,
2220,
10456,
5085,
29892,
3579,
19290,
1125,
13,
4706,
565,
451,
330,
29889,
1792,
29889,
275,
29918,
6406,
29901,
13,
9651,
27450,
29898,
29946,
29900,
29896,
29897,
13,
4706,
736,
285,
10456,
5085,
29892,
3579,
19290,
29897,
13,
1678,
736,
6858,
29918,
7507,
29898,
19557,
630,
29918,
2220,
29897,
13,
13,
13,
1753,
3402,
29918,
12673,
29898,
6008,
1125,
13,
1678,
736,
11636,
29889,
710,
615,
603,
877,
29995,
29979,
19222,
29885,
19222,
29881,
732,
1273,
29950,
16664,
29924,
1495,
13,
13,
13,
1753,
3402,
29918,
1256,
29898,
6008,
1125,
13,
1678,
736,
11636,
29889,
710,
615,
603,
877,
29995,
29979,
19222,
29885,
19222,
29881,
1495,
13,
13,
13,
1753,
3402,
29918,
9346,
287,
2554,
29898,
4181,
29892,
3803,
1070,
537,
2433,
7496,
742,
16897,
21098,
29947,
29945,
1125,
13,
1678,
565,
338,
8758,
29898,
4181,
29892,
12865,
1125,
13,
4706,
19471,
353,
12865,
29889,
329,
29883,
3707,
580,
448,
19471,
13,
1678,
565,
338,
8758,
29898,
4181,
29892,
5335,
287,
2554,
1125,
13,
4706,
6923,
353,
938,
3552,
4181,
29889,
16700,
334,
29871,
29947,
29953,
29946,
29900,
29900,
29897,
718,
19471,
29889,
23128,
29897,
13,
1678,
1683,
29901,
13,
4706,
6923,
353,
19471,
13,
13,
1678,
363,
5190,
29892,
409,
2395,
29918,
546,
29918,
5441,
297,
323,
8890,
2287,
5850,
29909,
29918,
3904,
1806,
29903,
29901,
13,
4706,
995,
353,
6425,
29898,
23128,
29897,
847,
409,
2395,
29918,
546,
29918,
5441,
13,
4706,
565,
995,
6736,
16897,
470,
5190,
1275,
3803,
1070,
537,
29901,
13,
9651,
565,
5190,
1275,
3803,
1070,
537,
322,
995,
1405,
29871,
29900,
29901,
13,
18884,
995,
353,
4236,
29898,
29896,
29892,
995,
29897,
13,
9651,
995,
353,
938,
29898,
14486,
29898,
1767,
876,
13,
9651,
364,
29894,
353,
318,
29915,
29995,
29879,
1273,
29879,
29915,
1273,
313,
1767,
29892,
5190,
29897,
13,
9651,
565,
995,
2804,
29871,
29896,
29901,
13,
18884,
364,
29894,
4619,
318,
29915,
29879,
29915,
13,
9651,
736,
364,
29894,
13,
1678,
736,
318,
4907,
13,
13,
13,
1753,
2479,
29918,
3150,
333,
29898,
3150,
333,
1125,
13,
1678,
565,
451,
1722,
333,
29901,
13,
4706,
736,
6629,
13,
1678,
364,
29894,
353,
1722,
333,
13,
1678,
565,
364,
29894,
29889,
27382,
2541,
29898,
877,
1124,
597,
742,
525,
991,
597,
8785,
29901,
13,
4706,
364,
29894,
353,
364,
29894,
29889,
5451,
11219,
742,
29871,
29906,
9601,
29899,
29896,
29962,
13,
1678,
736,
364,
29894,
29889,
29878,
17010,
11219,
1495,
13,
13,
3166,
931,
1053,
931,
13,
13,
3166,
1722,
333,
29889,
21264,
362,
1053,
7993,
13,
3166,
1722,
333,
29889,
8899,
29889,
13248,
1053,
4673,
1367,
9044,
13,
3166,
1722,
333,
29889,
8899,
1053,
1661,
346,
13,
13,
3166,
29784,
29918,
22942,
29889,
9803,
1053,
4833,
29918,
7924,
29892,
4673,
1367,
29254,
362,
29892,
320,
13,
268,
4673,
1367,
2659,
29940,
10646,
13,
13,
13,
1990,
5470,
6585,
1367,
9044,
29898,
6585,
1367,
9044,
1125,
13,
1678,
9995,
1888,
9711,
278,
1722,
3787,
363,
278,
4700,
773,
278,
2566,
1213,
15945,
13,
13,
1678,
822,
3787,
29254,
362,
29898,
1311,
29892,
1923,
29918,
2271,
29892,
15477,
1125,
13,
4706,
1223,
542,
353,
4673,
1367,
29254,
362,
29898,
13,
9651,
1923,
29918,
2271,
29922,
2974,
29918,
2271,
29892,
13,
9651,
4386,
29922,
21264,
362,
29889,
8411,
29892,
13,
9651,
7035,
29922,
21264,
362,
29889,
19024,
29889,
12508,
877,
3188,
29953,
29946,
5477,
13,
9651,
16610,
29922,
21264,
362,
29889,
790,
6742,
29892,
13,
9651,
25423,
29922,
21264,
362,
29889,
29880,
361,
5410,
29892,
13,
9651,
1223,
542,
29918,
1853,
29922,
21264,
362,
29889,
21011,
29918,
1853,
13,
4706,
1723,
13,
4706,
4833,
29918,
7924,
29889,
1202,
29898,
21011,
29897,
13,
4706,
4833,
29918,
7924,
29889,
15060,
580,
13,
13,
1678,
822,
679,
29254,
362,
29898,
1311,
29892,
1923,
29918,
2271,
29892,
4386,
29922,
8516,
1125,
13,
4706,
3855,
353,
4673,
1367,
29254,
362,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
2974,
29918,
2271,
29922,
2974,
29918,
2271,
29897,
13,
4706,
565,
4386,
338,
451,
6213,
29901,
13,
9651,
3855,
353,
3855,
29889,
4572,
29918,
1609,
29898,
8411,
29922,
8411,
29897,
13,
4706,
1121,
29918,
21011,
353,
6213,
13,
4706,
363,
2944,
297,
3855,
29889,
497,
7295,
13,
9651,
1223,
542,
353,
7993,
29898,
667,
29889,
8411,
29892,
2944,
29889,
19024,
29889,
13808,
877,
3188,
29953,
29946,
5477,
13,
462,
18884,
2944,
29889,
790,
6742,
29892,
2944,
29889,
29880,
361,
5410,
29892,
2944,
29889,
21011,
29918,
1853,
29897,
13,
9651,
565,
1223,
542,
29889,
657,
9544,
2658,
797,
580,
5277,
29871,
29900,
29901,
13,
18884,
1583,
29889,
5992,
29254,
362,
29898,
2974,
29918,
2271,
29892,
1223,
542,
29889,
8411,
29897,
13,
9651,
1683,
29901,
13,
18884,
1121,
29918,
21011,
353,
1223,
542,
13,
4706,
736,
1121,
29918,
21011,
13,
13,
1678,
822,
3349,
29254,
362,
29898,
1311,
29892,
1923,
29918,
2271,
29892,
4386,
1125,
13,
4706,
1018,
29901,
13,
9651,
736,
4673,
1367,
29254,
362,
29889,
1972,
29889,
4572,
29898,
13,
18884,
313,
6585,
1367,
29254,
362,
29889,
2974,
29918,
2271,
1275,
1923,
29918,
2271,
29897,
669,
13,
18884,
313,
6585,
1367,
29254,
362,
29889,
8411,
1275,
4386,
29897,
13,
9651,
13742,
8143,
580,
13,
4706,
7146,
29901,
13,
9651,
4833,
29918,
7924,
29889,
15060,
580,
13,
13,
1678,
822,
671,
29940,
10646,
29898,
1311,
29892,
1923,
29918,
2271,
29892,
14334,
29892,
15795,
1125,
13,
4706,
565,
6425,
29898,
16394,
448,
931,
3101,
1405,
1661,
346,
29889,
29903,
6059,
29956,
29901,
13,
9651,
736,
7700,
13,
4706,
364,
29894,
353,
4673,
1367,
2659,
29940,
10646,
29889,
1972,
29889,
4572,
29898,
13,
9651,
313,
6585,
1367,
2659,
29940,
10646,
29889,
2974,
29918,
2271,
1275,
1923,
29918,
2271,
29897,
669,
13,
9651,
313,
6585,
1367,
2659,
29940,
10646,
29889,
16394,
1275,
14334,
29897,
669,
13,
9651,
313,
6585,
1367,
2659,
29940,
10646,
29889,
29879,
1997,
1275,
15795,
29897,
13,
4706,
13742,
4102,
580,
13,
4706,
565,
364,
29894,
338,
451,
6213,
29901,
13,
9651,
736,
7700,
13,
4706,
364,
29894,
353,
4673,
1367,
2659,
29940,
10646,
29898,
2974,
29918,
2271,
29922,
2974,
29918,
2271,
29892,
14334,
29922,
16394,
29892,
13,
462,
632,
15795,
29922,
29879,
1997,
29897,
13,
4706,
4833,
29918,
7924,
29889,
1202,
29898,
15291,
29897,
13,
4706,
4833,
29918,
7924,
29889,
15060,
580,
13,
4706,
736,
5852,
13,
13,
1678,
822,
5941,
786,
12283,
778,
29898,
1311,
1125,
13,
4706,
1018,
29901,
13,
9651,
736,
4673,
1367,
2659,
29940,
10646,
29889,
1972,
29889,
4572,
29898,
13,
18884,
4673,
1367,
2659,
29940,
10646,
29889,
16394,
5277,
938,
29898,
2230,
580,
448,
1661,
346,
29889,
29903,
6059,
29956,
29897,
13,
9651,
13742,
8143,
580,
13,
4706,
7146,
29901,
13,
9651,
4833,
29918,
7924,
29889,
15060,
580,
13,
13,
1678,
822,
5941,
786,
29254,
800,
29898,
1311,
1125,
13,
4706,
1018,
29901,
13,
9651,
736,
4673,
1367,
29254,
362,
29889,
1972,
29889,
4572,
29898,
13,
18884,
4673,
1367,
29254,
362,
29889,
29880,
361,
5410,
529,
938,
29898,
2230,
3101,
13,
9651,
13742,
8143,
580,
13,
4706,
7146,
29901,
13,
9651,
4833,
29918,
7924,
29889,
15060,
580,
13,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
2897,
13,
3166,
1058,
10578,
1053,
12141,
29892,
7418,
29892,
3855,
16680,
13,
3166,
1058,
10578,
29889,
5924,
29889,
3090,
842,
1053,
1035,
296,
29918,
1958,
13,
3166,
29784,
1053,
4485,
786,
13,
3166,
29784,
29918,
22942,
1053,
623,
13,
3166,
23085,
13289,
1053,
1053,
29918,
1807,
13,
13,
13,
1753,
1722,
29918,
2248,
7295,
13,
1678,
515,
1058,
10578,
1053,
2380,
29892,
4235,
408,
285,
13,
1678,
565,
2897,
29889,
2084,
29889,
275,
3972,
29898,
932,
29889,
2917,
1839,
29956,
8187,
3267,
29950,
29918,
27992,
2033,
1125,
13,
4706,
736,
2380,
29889,
3150,
29918,
3972,
29898,
932,
29889,
2917,
1839,
29956,
8187,
3267,
29950,
29918,
27992,
11287,
13,
1678,
2897,
29889,
11256,
3972,
29898,
932,
29889,
2917,
1839,
29956,
8187,
3267,
29950,
29918,
27992,
11287,
13,
1678,
16455,
3298,
353,
7418,
29889,
855,
331,
4056,
2744,
14997,
3298,
580,
891,
7418,
29889,
5914,
842,
5072,
29898,
562,
1760,
29918,
1958,
29897,
13,
1678,
10938,
353,
285,
29889,
12763,
29898,
13,
4706,
3142,
29922,
29888,
29889,
1367,
29898,
303,
4395,
29922,
5574,
29892,
5412,
29922,
5574,
511,
13,
4706,
1178,
29922,
29888,
29889,
1367,
29898,
303,
4395,
29922,
5574,
511,
13,
4706,
3611,
29922,
29888,
29889,
16975,
29898,
303,
4395,
29922,
5574,
29892,
1746,
29918,
17079,
29922,
29906,
29889,
29900,
29892,
16455,
3298,
29922,
24209,
3298,
511,
13,
4706,
1134,
29922,
29888,
29889,
1367,
29898,
303,
4395,
29922,
5574,
511,
13,
4706,
29361,
29922,
29888,
29889,
10818,
17013,
29898,
2055,
294,
29922,
5574,
511,
13,
4706,
2793,
29922,
29888,
29889,
16975,
29898,
24209,
3298,
29922,
24209,
3298,
29897,
13,
1678,
1723,
13,
1678,
736,
2380,
29889,
3258,
29918,
262,
29898,
932,
29889,
2917,
1839,
29956,
8187,
3267,
29950,
29918,
27992,
7464,
10938,
29897,
13,
13,
13,
2248,
353,
1722,
29918,
2248,
580,
13,
13,
13,
1990,
11374,
519,
29898,
3318,
1125,
13,
1678,
2740,
29918,
3225,
29918,
14380,
353,
6213,
13,
13,
1678,
822,
788,
29918,
517,
29918,
4478,
29918,
2248,
29898,
1311,
29892,
9227,
1125,
13,
4706,
9227,
29889,
1202,
29918,
3225,
29898,
2271,
29922,
2523,
356,
29898,
1311,
29889,
2271,
511,
13,
462,
9651,
1134,
29922,
1311,
29889,
4478,
29918,
3225,
29918,
1853,
29892,
13,
462,
9651,
3579,
1311,
29889,
657,
29918,
4478,
29918,
3225,
3101,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
8453,
29918,
4478,
29918,
2914,
29898,
25932,
29892,
1121,
1125,
13,
4706,
736,
6213,
13,
13,
1678,
732,
6799,
13,
1678,
822,
2740,
29918,
3225,
29918,
1853,
29898,
1311,
1125,
13,
4706,
1067,
29879,
353,
1134,
29898,
1311,
29897,
13,
4706,
736,
1067,
29879,
17255,
5453,
1649,
718,
318,
4286,
29915,
718,
1067,
29879,
17255,
978,
1649,
13,
13,
1678,
822,
679,
29918,
4478,
29918,
3225,
29898,
1311,
1125,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
580,
13,
13,
1678,
822,
3349,
29918,
3166,
29918,
4478,
29918,
2248,
29898,
1311,
29892,
9227,
1125,
13,
4706,
9227,
29889,
8143,
29918,
1609,
29918,
8489,
877,
2271,
742,
29104,
29898,
1311,
29889,
2271,
876,
13,
13,
13,
1753,
12141,
29918,
497,
29898,
2914,
29892,
1746,
1125,
13,
1678,
1426,
353,
1121,
29961,
2671,
29962,
13,
1678,
736,
4485,
786,
29898,
28970,
29889,
16382,
29880,
14643,
29898,
13,
4706,
9376,
261,
29922,
28970,
29889,
22110,
280,
8752,
261,
3285,
13,
4706,
883,
2620,
29922,
2914,
29889,
9902,
29889,
9812,
29880,
14643,
29889,
689,
2620,
29897,
13,
9651,
869,
28970,
29918,
27342,
29898,
2914,
29892,
1746,
29892,
1426,
29922,
726,
876,
470,
1426,
13,
13,
13,
1990,
11856,
3591,
29898,
3318,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1121,
1125,
13,
4706,
1583,
29889,
2271,
353,
1121,
1839,
2271,
2033,
13,
4706,
1583,
29889,
3257,
29918,
726,
353,
1121,
1839,
3257,
2033,
13,
4706,
1583,
29889,
3257,
353,
12141,
29918,
497,
29898,
2914,
29892,
525,
3257,
1495,
13,
4706,
1067,
29879,
353,
1053,
29918,
1807,
29898,
2914,
1839,
1853,
11287,
13,
4706,
1583,
29889,
14380,
353,
1067,
29879,
29889,
4478,
29918,
3225,
29918,
14380,
13,
4706,
1583,
29889,
8216,
353,
1067,
29879,
29889,
2783,
29581,
29918,
4478,
29918,
2914,
29898,
2914,
29897,
13,
13,
13,
1990,
11856,
3591,
5074,
29898,
3318,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2582,
29892,
1813,
1125,
13,
4706,
1583,
29889,
3488,
353,
1813,
13,
4706,
565,
2582,
338,
6213,
29901,
13,
9651,
1583,
29889,
9902,
353,
5159,
13,
9651,
1583,
29889,
12292,
353,
29871,
29896,
13,
9651,
1583,
29889,
7827,
353,
29871,
29900,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
9902,
353,
518,
7974,
3591,
29898,
29878,
29897,
363,
364,
297,
2582,
29962,
13,
9651,
1583,
29889,
12292,
353,
2582,
29889,
3488,
2798,
13,
9651,
1583,
29889,
7827,
353,
2582,
29889,
7827,
13,
13,
1678,
822,
4770,
1524,
12035,
1311,
1125,
13,
4706,
736,
4256,
29898,
1311,
29889,
9902,
29897,
13,
13,
13,
1753,
2740,
29898,
1972,
29892,
1813,
29922,
29896,
29892,
639,
29918,
3488,
29922,
29906,
29900,
1125,
13,
1678,
411,
2380,
29889,
4478,
261,
580,
408,
269,
29901,
13,
4706,
3855,
29886,
353,
3855,
16680,
29889,
6857,
361,
969,
11726,
18959,
3257,
742,
525,
3051,
7464,
2380,
29889,
11010,
29897,
13,
4706,
3855,
353,
3855,
29886,
29889,
5510,
29898,
2523,
356,
29898,
1972,
876,
13,
4706,
1018,
29901,
13,
9651,
1121,
29918,
3488,
353,
269,
29889,
4478,
29918,
3488,
29898,
29939,
29892,
1813,
29892,
10203,
4498,
29922,
546,
29918,
3488,
29897,
13,
4706,
5174,
7865,
2392,
29901,
13,
9651,
565,
1813,
1275,
29871,
29896,
29901,
13,
18884,
736,
11856,
3591,
5074,
29898,
8516,
29892,
1813,
29897,
13,
9651,
736,
6213,
13,
4706,
2582,
353,
1121,
29918,
3488,
29889,
9902,
13,
4706,
2582,
29889,
9812,
29880,
14643,
29889,
20777,
261,
29889,
3317,
305,
1503,
353,
29871,
29945,
29896,
29906,
13,
4706,
2582,
29889,
9812,
29880,
14643,
29889,
20777,
261,
29889,
29879,
1038,
618,
353,
29871,
29946,
29900,
13,
4706,
2582,
29889,
9812,
29880,
14643,
29889,
689,
2620,
353,
12141,
29889,
10922,
18522,
877,
331,
742,
13,
9651,
770,
978,
2433,
4478,
29899,
4352,
742,
1840,
1990,
2433,
4478,
29899,
8489,
742,
13,
9651,
1546,
29922,
29884,
29915,
29966,
9653,
770,
29922,
5481,
567,
275,
29958,
16088,
1533,
9653,
29958,
1495,
13,
4706,
736,
11856,
3591,
5074,
29898,
2914,
29918,
3488,
29892,
1813,
29897,
13,
13,
13,
1753,
2767,
29918,
4299,
29918,
6707,
29918,
2248,
267,
29898,
7924,
29892,
28371,
29918,
4703,
1125,
13,
1678,
9995,
29907,
4212,
491,
263,
4867,
1741,
29892,
11217,
278,
1904,
2729,
10701,
1213,
15945,
13,
1678,
304,
29918,
8143,
353,
5159,
13,
1678,
304,
29918,
1202,
353,
5159,
13,
1678,
363,
1904,
297,
4867,
29889,
1482,
29901,
13,
4706,
565,
338,
8758,
29898,
4299,
29892,
11374,
519,
1125,
13,
9651,
304,
29918,
1202,
29889,
4397,
29898,
4299,
29897,
13,
13,
1678,
363,
1904,
297,
4867,
29889,
3972,
1017,
29901,
13,
4706,
565,
338,
8758,
29898,
4299,
29892,
11374,
519,
1125,
13,
9651,
304,
29918,
8143,
29889,
4397,
29898,
4299,
29897,
13,
9651,
304,
29918,
1202,
29889,
4397,
29898,
4299,
29897,
13,
13,
1678,
363,
1904,
297,
4867,
29889,
3972,
1017,
29901,
13,
4706,
565,
338,
8758,
29898,
4299,
29892,
11374,
519,
1125,
13,
9651,
304,
29918,
8143,
29889,
4397,
29898,
4299,
29897,
13,
13,
1678,
565,
451,
313,
517,
29918,
8143,
470,
304,
29918,
1202,
1125,
13,
4706,
736,
13,
13,
1678,
9227,
353,
2380,
29889,
13236,
580,
13,
1678,
363,
1904,
297,
304,
29918,
8143,
29901,
13,
4706,
1904,
29889,
5992,
29918,
3166,
29918,
4478,
29918,
2248,
29898,
13236,
29897,
13,
1678,
363,
1904,
297,
304,
29918,
1202,
29901,
13,
4706,
1904,
29889,
1202,
29918,
517,
29918,
4478,
29918,
2248,
29898,
13236,
29897,
13,
1678,
9227,
29889,
15060,
580,
13,
13,
13,
1753,
2767,
29918,
12663,
29918,
2248,
7295,
13,
1678,
515,
29784,
29918,
22942,
29889,
2640,
1053,
10854,
362,
5074,
13,
1678,
9227,
353,
2380,
29889,
13236,
580,
13,
1678,
363,
1813,
297,
10854,
362,
5074,
29889,
1524,
29918,
12292,
7295,
13,
4706,
1813,
29889,
5992,
29918,
3166,
29918,
4478,
29918,
2248,
29898,
13236,
29897,
13,
4706,
1813,
29889,
1202,
29918,
517,
29918,
4478,
29918,
2248,
29898,
13236,
29897,
13,
1678,
9227,
29889,
15060,
580,
13,
13,
13,
1753,
337,
2248,
29918,
29879,
1240,
27421,
7295,
13,
1678,
515,
29784,
29918,
22942,
29889,
9803,
1053,
317,
1240,
7988,
13,
1678,
9227,
353,
2380,
29889,
13236,
580,
13,
1678,
363,
11534,
297,
317,
1240,
7988,
29889,
1972,
29889,
497,
7295,
13,
4706,
11534,
29889,
5992,
29918,
3166,
29918,
4478,
29918,
2248,
29898,
13236,
29897,
13,
4706,
11534,
29889,
1202,
29918,
517,
29918,
4478,
29918,
2248,
29898,
13236,
29897,
13,
1678,
9227,
29889,
15060,
580,
13,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
411,
29918,
20788,
13,
3166,
29784,
1053,
10924,
2158,
29892,
4050,
29918,
6886,
29892,
6684,
13,
13,
13,
1545,
353,
10924,
2158,
877,
2549,
292,
1761,
742,
4770,
978,
1649,
29892,
3142,
29918,
13506,
2433,
29914,
2549,
292,
1761,
1495,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
1495,
13,
1753,
2380,
7295,
13,
1678,
736,
4050,
29918,
6886,
877,
2549,
292,
1761,
29914,
2248,
29889,
1420,
1495,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
10867,
29914,
742,
21274,
3790,
29915,
3488,
2396,
29871,
29896,
1800,
13,
29992,
1545,
29889,
13134,
11219,
10867,
29914,
3488,
29914,
29966,
524,
29901,
3488,
20690,
1495,
13,
1753,
18871,
29898,
3488,
1125,
13,
1678,
736,
6684,
877,
1124,
597,
492,
1030,
1761,
29889,
510,
29914,
15965,
29914,
1579,
1278,
29914,
1495,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
10867,
29914,
29966,
524,
29901,
6360,
20690,
29966,
524,
29901,
10874,
20690,
29966,
524,
29901,
3250,
20690,
29966,
29517,
20690,
1495,
13,
1753,
1510,
29918,
7097,
29898,
6360,
29892,
4098,
29892,
2462,
29892,
2243,
688,
1125,
13,
1678,
736,
6684,
877,
1124,
597,
492,
1030,
1761,
29889,
510,
29914,
15965,
29914,
1579,
1278,
22584,
29879,
22584,
29879,
22584,
29879,
22584,
29879,
29915,
13,
462,
1678,
1273,
313,
6360,
29892,
4098,
29892,
2462,
29892,
2243,
688,
876,
13,
13,
3166,
29784,
1053,
10924,
2158,
29892,
4050,
29918,
6886,
29892,
4390,
1598,
29892,
6684,
29892,
320,
13,
268,
3142,
29918,
1454,
13,
3166,
29784,
29918,
22942,
29889,
13239,
1053,
2009,
29918,
29893,
1934,
29918,
3126,
13,
3166,
29784,
29918,
22942,
29889,
1761,
886,
29889,
24299,
1053,
17752,
29892,
443,
1761,
287,
13,
13,
1545,
353,
10924,
2158,
877,
24299,
742,
4770,
978,
1649,
29892,
3142,
29918,
13506,
2433,
29914,
24299,
1495,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
1495,
13,
1753,
2380,
7295,
13,
1678,
565,
2009,
29918,
29893,
1934,
29918,
3126,
7295,
13,
4706,
736,
4390,
1598,
29898,
24299,
11759,
1062,
29889,
517,
29918,
3126,
580,
363,
1294,
297,
17752,
1402,
13,
462,
539,
443,
1761,
287,
29918,
24299,
11759,
1062,
29889,
517,
29918,
3126,
580,
363,
1294,
297,
443,
1761,
287,
2314,
13,
1678,
736,
4050,
29918,
6886,
877,
24299,
29914,
2248,
29889,
1420,
742,
17752,
29922,
24299,
29897,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
1037,
1218,
29914,
1495,
13,
1753,
4969,
7295,
13,
1678,
736,
6684,
29898,
2271,
29918,
1454,
877,
2640,
29889,
4294,
742,
1813,
2433,
17588,
3359,
5477,
29871,
29941,
29900,
29896,
29897,
13,
13,
3166,
29784,
1053,
10924,
2158,
29892,
4050,
29918,
6886,
29892,
4390,
1598,
13,
3166,
29784,
29918,
22942,
29889,
13239,
1053,
2009,
29918,
29893,
1934,
29918,
3126,
13,
3166,
29784,
29918,
22942,
29889,
1761,
886,
29889,
16418,
1053,
9279,
13,
13,
1545,
353,
10924,
2158,
877,
23834,
742,
4770,
978,
1649,
29892,
3142,
29918,
13506,
2433,
29914,
23834,
1495,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
1495,
13,
1753,
2380,
7295,
13,
1678,
736,
4050,
29918,
6886,
877,
23834,
29914,
2248,
29889,
1420,
1495,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
2076,
29914,
1495,
13,
1753,
29871,
2076,
7295,
13,
1678,
736,
4050,
29918,
6886,
877,
23834,
29914,
2076,
29889,
1420,
1495,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
12313,
2710,
29914,
1495,
13,
1753,
4319,
2710,
7295,
13,
1678,
736,
4050,
29918,
6886,
877,
23834,
29914,
12313,
2710,
29889,
1420,
1495,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
13519,
287,
1609,
29914,
1495,
13,
1753,
3081,
287,
1609,
7295,
13,
1678,
565,
2009,
29918,
29893,
1934,
29918,
3126,
7295,
13,
4706,
736,
4390,
1598,
3552,
29895,
29892,
518,
29886,
29889,
517,
29918,
3126,
580,
363,
282,
297,
325,
2314,
13,
462,
539,
363,
413,
29892,
325,
297,
9279,
29889,
1524,
7076,
3101,
13,
1678,
736,
4050,
29918,
6886,
877,
23834,
29914,
13519,
287,
1609,
29889,
1420,
742,
9279,
29922,
16418,
29897,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
1188,
359,
29914,
1495,
13,
1753,
1480,
359,
7295,
13,
1678,
736,
4050,
29918,
6886,
877,
23834,
29914,
1188,
359,
29889,
1420,
1495,
13,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
29784,
1053,
10924,
2158,
29892,
27450,
29892,
11013,
29892,
330,
29892,
4390,
1598,
29892,
6684,
29892,
320,
13,
1678,
4050,
29918,
6886,
29892,
2009,
29892,
3142,
29918,
1454,
13,
13,
3166,
29784,
29918,
22942,
29889,
13239,
1053,
3402,
29918,
1037,
1772,
29892,
2009,
29918,
29893,
1934,
29918,
3126,
29892,
320,
13,
1678,
6858,
29918,
6406,
29892,
6858,
29918,
7507,
13,
3166,
29784,
29918,
22942,
29889,
9803,
1053,
17943,
29892,
461,
29892,
317,
1240,
7988,
29892,
4833,
29918,
7924,
13,
13,
1545,
353,
10924,
2158,
877,
29879,
1240,
27421,
742,
4770,
978,
1649,
29892,
3142,
29918,
13506,
2433,
29914,
29879,
1240,
27421,
1495,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
1495,
13,
1753,
2380,
7295,
13,
1678,
736,
4050,
29918,
6886,
877,
29879,
1240,
27421,
29914,
2248,
29889,
1420,
742,
13,
4706,
13997,
29922,
10900,
29889,
1972,
29889,
2098,
29918,
1609,
29898,
10900,
29889,
978,
467,
497,
3101,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
29966,
524,
29901,
333,
20690,
742,
3519,
29922,
1839,
7194,
742,
525,
5438,
11287,
13,
1753,
1510,
29898,
333,
1125,
13,
1678,
11534,
353,
317,
1240,
7988,
29889,
1972,
29889,
657,
29898,
333,
29897,
13,
1678,
565,
11534,
338,
6213,
29901,
13,
4706,
27450,
29898,
29946,
29900,
29946,
29897,
13,
1678,
565,
2009,
29918,
29893,
1934,
29918,
3126,
7295,
13,
4706,
736,
4390,
1598,
29898,
29879,
1240,
7988,
29922,
29879,
1240,
7988,
29889,
517,
29918,
3126,
3101,
13,
1678,
565,
2009,
29889,
5696,
1275,
525,
5438,
2396,
13,
4706,
3611,
353,
2009,
29889,
689,
1839,
3257,
2033,
13,
4706,
1426,
353,
2009,
29889,
689,
1839,
726,
2033,
13,
4706,
565,
1426,
29901,
13,
9651,
4833,
29918,
7924,
29889,
1202,
29898,
20001,
29898,
29879,
1240,
7988,
29892,
330,
29889,
1792,
29892,
3611,
29892,
1426,
876,
13,
9651,
4833,
29918,
7924,
29889,
15060,
580,
13,
9651,
11013,
29898,
29884,
29915,
10858,
3440,
471,
2715,
1495,
13,
9651,
736,
6684,
29898,
29879,
1240,
7988,
29889,
2271,
29897,
13,
1678,
736,
4050,
29918,
6886,
877,
29879,
1240,
27421,
29914,
4294,
29889,
1420,
742,
11534,
29922,
29879,
1240,
7988,
29897,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
21032,
29914,
29966,
524,
29901,
333,
20690,
742,
3519,
29922,
1839,
7194,
742,
525,
5438,
11287,
13,
29992,
276,
339,
2658,
29918,
6406,
13,
1753,
3863,
29918,
9342,
29898,
333,
1125,
13,
1678,
3440,
353,
461,
29889,
1972,
29889,
657,
29898,
333,
29897,
13,
1678,
565,
3440,
338,
6213,
29901,
13,
4706,
27450,
29898,
29946,
29900,
29946,
29897,
13,
1678,
11534,
353,
3440,
29889,
29879,
1240,
7988,
13,
1678,
883,
353,
9657,
29898,
3257,
29922,
9342,
29889,
3257,
29892,
1426,
29922,
9342,
29889,
726,
29897,
13,
1678,
565,
2009,
29889,
5696,
1275,
525,
5438,
2396,
13,
4706,
565,
525,
8143,
29915,
297,
2009,
29889,
689,
29901,
13,
9651,
4833,
29918,
7924,
29889,
8143,
29898,
9342,
29897,
13,
9651,
4833,
29918,
7924,
29889,
15060,
580,
13,
9651,
11013,
29898,
29884,
29915,
20001,
471,
11132,
29889,
1495,
13,
9651,
736,
6684,
29898,
29879,
1240,
7988,
29889,
2271,
29897,
13,
4706,
25342,
525,
20713,
29915,
297,
2009,
29889,
689,
29901,
13,
9651,
736,
6684,
29898,
29879,
1240,
7988,
29889,
2271,
29897,
13,
4706,
883,
1839,
3257,
2033,
353,
2009,
29889,
689,
1839,
3257,
2033,
13,
4706,
883,
1839,
726,
2033,
353,
2009,
29889,
689,
1839,
726,
2033,
13,
4706,
565,
451,
883,
1839,
726,
2033,
29901,
13,
9651,
11013,
29898,
29884,
29915,
2392,
29901,
3440,
1426,
338,
3734,
29889,
1495,
13,
4706,
1683,
29901,
13,
9651,
3440,
29889,
3257,
353,
883,
1839,
3257,
2033,
13,
9651,
3440,
29889,
726,
353,
883,
1839,
726,
2033,
13,
9651,
4833,
29918,
7924,
29889,
15060,
580,
13,
9651,
11013,
29898,
29884,
29915,
20001,
471,
4784,
29889,
1495,
13,
9651,
736,
6684,
29898,
29879,
1240,
7988,
29889,
2271,
29897,
13,
1678,
736,
4050,
29918,
6886,
877,
29879,
1240,
27421,
29914,
5628,
29918,
9342,
29889,
1420,
742,
883,
29922,
689,
29892,
13,
462,
965,
3440,
29922,
9342,
29897,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
5628,
29914,
29966,
524,
29901,
333,
20690,
742,
3519,
29922,
1839,
7194,
742,
525,
5438,
11287,
13,
29992,
276,
339,
2658,
29918,
7507,
13,
1753,
3863,
29898,
333,
1125,
13,
1678,
11534,
353,
317,
1240,
7988,
29889,
1972,
29889,
657,
29898,
333,
29897,
13,
1678,
565,
11534,
338,
6213,
29901,
13,
4706,
27450,
29898,
29946,
29900,
29946,
29897,
13,
1678,
565,
330,
29889,
1792,
338,
6213,
470,
313,
1333,
330,
29889,
1792,
29889,
275,
29918,
6406,
322,
11534,
29889,
8921,
2804,
330,
29889,
1792,
1125,
13,
4706,
27450,
29898,
29946,
29900,
29896,
29897,
13,
1678,
25267,
353,
6213,
13,
1678,
883,
353,
9657,
29898,
3257,
29922,
29879,
1240,
7988,
29889,
3257,
29892,
3573,
29922,
29879,
1240,
7988,
29889,
2587,
29892,
13,
18884,
7663,
29922,
29879,
1240,
7988,
29889,
7320,
29889,
333,
29897,
13,
1678,
565,
2009,
29889,
5696,
1275,
525,
5438,
2396,
13,
4706,
883,
1839,
3257,
2033,
353,
2009,
29889,
689,
1839,
3257,
2033,
13,
4706,
883,
1839,
2587,
2033,
353,
2009,
29889,
689,
1839,
2587,
2033,
13,
4706,
883,
1839,
7320,
2033,
353,
2009,
29889,
689,
29889,
657,
877,
7320,
742,
1134,
29922,
524,
29897,
13,
4706,
565,
525,
25347,
29915,
297,
2009,
29889,
689,
29901,
13,
9651,
25267,
353,
3402,
29918,
1037,
1772,
29898,
3827,
29889,
689,
1839,
2587,
11287,
13,
4706,
25342,
525,
8143,
29915,
297,
2009,
29889,
689,
29901,
13,
9651,
363,
3440,
297,
11534,
29889,
21032,
29901,
13,
18884,
4833,
29918,
7924,
29889,
8143,
29898,
9342,
29897,
13,
9651,
4833,
29918,
7924,
29889,
8143,
29898,
29879,
1240,
7988,
29897,
13,
9651,
4833,
29918,
7924,
29889,
15060,
580,
13,
9651,
11013,
29898,
29884,
29915,
10858,
11534,
471,
11132,
1495,
13,
9651,
736,
6684,
29898,
2271,
29918,
1454,
877,
29879,
1240,
27421,
29889,
2248,
8785,
13,
4706,
1683,
29901,
13,
9651,
7663,
29918,
333,
353,
2009,
29889,
689,
29889,
657,
877,
7320,
742,
1134,
29922,
524,
29897,
13,
9651,
565,
451,
883,
1839,
2587,
2033,
29901,
13,
18884,
11013,
29898,
29884,
29915,
2392,
29901,
366,
505,
304,
3896,
263,
11534,
1495,
13,
9651,
1683,
29901,
13,
18884,
7663,
353,
17943,
29889,
1972,
29889,
657,
29898,
7320,
29918,
333,
29897,
13,
18884,
565,
7663,
338,
451,
6213,
29901,
13,
462,
1678,
11534,
29889,
3257,
353,
883,
1839,
3257,
2033,
13,
462,
1678,
11534,
29889,
2587,
353,
883,
1839,
2587,
2033,
13,
462,
1678,
11534,
29889,
7320,
353,
7663,
13,
462,
1678,
4833,
29918,
7924,
29889,
15060,
580,
13,
462,
1678,
11013,
29898,
29884,
29915,
10858,
11534,
471,
9120,
1495,
13,
462,
1678,
736,
6684,
29898,
29879,
1240,
7988,
29889,
2271,
29897,
13,
1678,
736,
4050,
29918,
6886,
877,
29879,
1240,
27421,
29914,
5628,
29889,
1420,
742,
13,
4706,
11534,
29922,
29879,
1240,
7988,
29892,
25267,
29922,
25347,
29892,
883,
29922,
689,
29892,
13,
4706,
13997,
29922,
10900,
29889,
1972,
29889,
2098,
29918,
1609,
29898,
10900,
29889,
978,
467,
497,
3101,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
7320,
29914,
29966,
29517,
20690,
1495,
13,
1753,
7663,
29898,
29517,
1125,
13,
1678,
7663,
353,
17943,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
29517,
29922,
29517,
467,
4102,
580,
13,
1678,
565,
7663,
338,
6213,
29901,
13,
4706,
27450,
29898,
29946,
29900,
29946,
29897,
13,
1678,
9830,
27421,
353,
7663,
29889,
29879,
1240,
27421,
29889,
2098,
29918,
1609,
29898,
29903,
1240,
7988,
29889,
3257,
467,
497,
580,
13,
1678,
565,
2009,
29918,
29893,
1934,
29918,
3126,
7295,
13,
4706,
736,
4390,
1598,
29898,
7320,
29922,
7320,
29889,
517,
29918,
3126,
3285,
13,
462,
539,
9830,
27421,
11759,
29879,
29889,
333,
363,
269,
297,
9830,
27421,
2314,
13,
1678,
736,
4050,
29918,
6886,
877,
29879,
1240,
27421,
29914,
7320,
29889,
1420,
742,
7663,
29922,
7320,
29892,
13,
462,
965,
9830,
27421,
29922,
29879,
1240,
27421,
29897,
13,
13,
3166,
29784,
1053,
10924,
2158,
29892,
4050,
29918,
6886,
29892,
4867,
29892,
6684,
29892,
3142,
29918,
1454,
29892,
320,
13,
268,
2009,
29892,
11013,
29892,
330,
29892,
4390,
1598,
29892,
27450,
13,
3166,
29784,
29918,
3150,
333,
1053,
4810,
7428,
1164,
29918,
8618,
13044,
23598,
13,
3166,
29784,
29918,
22942,
1053,
288,
333,
13,
3166,
29784,
29918,
22942,
29889,
4478,
1053,
2740,
408,
2189,
29918,
4478,
13,
3166,
29784,
29918,
22942,
29889,
13239,
1053,
6858,
29918,
7507,
29892,
2009,
29918,
29893,
1934,
29918,
3126,
13,
3166,
29784,
29918,
22942,
29889,
9803,
1053,
4833,
29918,
7924,
29892,
4911,
13,
3166,
29784,
29918,
22942,
29889,
1761,
886,
29889,
276,
17836,
1053,
27474,
13,
13,
1545,
353,
10924,
2158,
877,
17492,
742,
4770,
978,
1649,
29897,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
1495,
13,
1753,
2380,
7295,
13,
1678,
565,
2009,
29918,
29893,
1934,
29918,
3126,
7295,
13,
4706,
736,
4390,
1598,
29898,
276,
17836,
11759,
29878,
29889,
517,
29918,
3126,
580,
363,
364,
297,
27474,
2314,
13,
13,
1678,
736,
4050,
29918,
6886,
29898,
13,
4706,
525,
17492,
29914,
2248,
29889,
1420,
742,
13,
4706,
9281,
29918,
14096,
29922,
276,
17836,
14352,
29896,
1402,
13,
4706,
396,
13552,
1544,
947,
451,
6684,
29892,
4225,
1873,
13,
4706,
396,
10561,
1873,
871,
7805,
4655,
29889,
1195,
272,
13,
4706,
10561,
29918,
5140,
29918,
3259,
2433,
29889,
4286,
7122,
29898,
276,
17836,
14352,
29896,
1822,
3259,
29889,
5451,
12839,
742,
29871,
29906,
29897,
7503,
29906,
2314,
13,
1678,
1723,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
4478,
29914,
1495,
13,
1753,
2740,
7295,
13,
1678,
3855,
353,
2009,
29889,
5085,
29889,
657,
877,
29939,
1495,
470,
6629,
13,
1678,
1813,
353,
2009,
29889,
5085,
29889,
657,
877,
3488,
742,
1134,
29922,
524,
29897,
470,
29871,
29896,
13,
1678,
2582,
353,
6213,
13,
1678,
565,
3855,
29901,
13,
4706,
2582,
353,
2189,
29918,
4478,
29898,
29939,
29892,
1813,
29922,
3488,
29897,
13,
4706,
565,
2582,
338,
6213,
29901,
13,
9651,
27450,
29898,
29946,
29900,
29946,
29897,
13,
1678,
736,
4050,
29918,
6886,
877,
17492,
29914,
4478,
29889,
1420,
742,
2582,
29922,
9902,
29892,
3855,
29922,
29939,
29897,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
1188,
449,
29914,
1495,
13,
1753,
1480,
449,
7295,
13,
1678,
565,
525,
3150,
333,
29915,
297,
4867,
29901,
13,
4706,
11013,
29898,
29884,
29915,
3403,
3192,
714,
1495,
13,
4706,
628,
4867,
1839,
3150,
333,
2033,
13,
1678,
736,
6684,
29898,
3827,
29889,
276,
3735,
470,
3142,
29918,
1454,
877,
17492,
29889,
2248,
8785,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
7507,
29914,
742,
3519,
29922,
1839,
7194,
742,
525,
5438,
11287,
13,
29992,
3398,
29889,
7507,
13789,
13,
1753,
6464,
7295,
13,
1678,
565,
330,
29889,
1792,
338,
451,
6213,
29901,
13,
4706,
736,
6684,
29898,
2271,
29918,
1454,
877,
17492,
29889,
2248,
8785,
13,
1678,
565,
525,
20713,
29915,
297,
2009,
29889,
689,
29901,
13,
4706,
11013,
29898,
29884,
29915,
19420,
839,
29889,
450,
4673,
1367,
471,
451,
3939,
29889,
1495,
13,
4706,
736,
6684,
29898,
3398,
29889,
657,
29918,
4622,
29918,
2271,
3101,
13,
1678,
1722,
333,
353,
2009,
29889,
5975,
29889,
657,
877,
3150,
333,
1495,
13,
1678,
565,
451,
1722,
333,
29901,
13,
4706,
1722,
333,
353,
4810,
7428,
1164,
29918,
8618,
13044,
23598,
29889,
657,
29898,
3827,
29889,
5085,
29889,
657,
877,
18121,
8785,
13,
1678,
565,
1722,
333,
29901,
13,
4706,
736,
288,
333,
29889,
2202,
29918,
7507,
29898,
3150,
333,
29892,
2244,
29918,
1454,
29922,
1839,
8159,
978,
742,
525,
19254,
978,
11287,
13,
1678,
1059,
353,
288,
333,
29889,
9155,
29918,
2704,
580,
13,
1678,
565,
1059,
29901,
13,
4706,
11013,
29898,
29884,
29915,
2392,
29901,
525,
718,
1059,
29897,
13,
1678,
736,
4050,
29918,
6886,
877,
17492,
29914,
7507,
29889,
1420,
742,
2446,
29922,
3398,
29889,
657,
29918,
4622,
29918,
2271,
3101,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
4102,
29899,
7507,
29914,
742,
3519,
29922,
1839,
7194,
742,
525,
5438,
11287,
13,
1753,
937,
29918,
7507,
7295,
13,
1678,
565,
330,
29889,
1792,
338,
451,
6213,
470,
525,
3150,
333,
29915,
451,
297,
4867,
29901,
13,
4706,
736,
6684,
29898,
2271,
29918,
1454,
12839,
7507,
8785,
13,
1678,
565,
2009,
29889,
5696,
1275,
525,
5438,
2396,
13,
4706,
565,
525,
20713,
29915,
297,
2009,
29889,
689,
29901,
13,
9651,
628,
4867,
1839,
3150,
333,
2033,
13,
9651,
11013,
29898,
29884,
29915,
11049,
471,
633,
18054,
1495,
13,
9651,
736,
6684,
29898,
2271,
29918,
1454,
877,
17492,
29889,
7507,
8785,
13,
4706,
4833,
29918,
7924,
29889,
1202,
29898,
2659,
29898,
3827,
29889,
689,
1839,
978,
7464,
4867,
1839,
3150,
333,
25901,
13,
4706,
4833,
29918,
7924,
29889,
15060,
580,
13,
4706,
11013,
29898,
29884,
29915,
14191,
3730,
2825,
8722,
322,
13817,
297,
1495,
13,
4706,
736,
6684,
29898,
3398,
29889,
657,
29918,
4622,
29918,
2271,
3101,
13,
1678,
736,
4050,
29918,
6886,
877,
17492,
29914,
4102,
29918,
7507,
29889,
1420,
742,
13,
462,
965,
2446,
29922,
3398,
29889,
657,
29918,
4622,
29918,
2271,
3285,
13,
462,
965,
1722,
333,
29922,
7924,
1839,
3150,
333,
11287,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
10185,
29914,
742,
3519,
29922,
1839,
7194,
742,
525,
5438,
11287,
13,
29992,
276,
339,
2658,
29918,
7507,
13,
1753,
8722,
7295,
13,
1678,
1024,
353,
330,
29889,
1792,
29889,
978,
13,
1678,
565,
2009,
29889,
5696,
1275,
525,
5438,
2396,
13,
4706,
1024,
353,
2009,
29889,
689,
1839,
978,
13359,
17010,
580,
13,
4706,
565,
451,
1024,
29901,
13,
9651,
11013,
29898,
29884,
29915,
2392,
29901,
263,
1024,
338,
3734,
1495,
13,
4706,
1683,
29901,
13,
9651,
330,
29889,
1792,
29889,
978,
353,
1024,
13,
9651,
4833,
29918,
7924,
29889,
15060,
580,
13,
9651,
11013,
29898,
29884,
29915,
2659,
8722,
4784,
1495,
13,
9651,
736,
6684,
29898,
2271,
29918,
1454,
12839,
2248,
8785,
13,
1678,
736,
4050,
29918,
6886,
877,
17492,
29914,
10185,
29889,
1420,
742,
1024,
29922,
978,
29897,
13,
13,
13,
29992,
1545,
29889,
13134,
11219,
10185,
29914,
3167,
29899,
3150,
333,
29914,
742,
3519,
29922,
1839,
7194,
742,
525,
5438,
11287,
13,
29992,
276,
339,
2658,
29918,
7507,
13,
29992,
3398,
29889,
7507,
13789,
13,
1753,
1735,
29918,
3150,
333,
7295,
13,
1678,
565,
2009,
29889,
5696,
1275,
525,
5438,
2396,
13,
4706,
565,
525,
20713,
29915,
297,
2009,
29889,
689,
29901,
13,
9651,
11013,
29898,
29884,
29915,
19420,
839,
29889,
450,
4673,
1367,
471,
451,
3939,
29889,
1495,
13,
9651,
736,
6684,
29898,
3398,
29889,
657,
29918,
4622,
29918,
2271,
3101,
13,
1678,
1722,
333,
353,
2009,
29889,
5975,
29889,
657,
877,
3150,
333,
1495,
13,
1678,
565,
451,
1722,
333,
29901,
13,
4706,
1722,
333,
353,
4810,
7428,
1164,
29918,
8618,
13044,
23598,
29889,
657,
29898,
3827,
29889,
5085,
29889,
657,
877,
18121,
8785,
13,
1678,
565,
1722,
333,
29901,
13,
4706,
736,
288,
333,
29889,
2202,
29918,
7507,
29898,
3150,
333,
29897,
13,
1678,
1059,
353,
288,
333,
29889,
9155,
29918,
2704,
580,
13,
1678,
565,
1059,
29901,
13,
4706,
11013,
29898,
29884,
29915,
2392,
29901,
525,
718,
1059,
29897,
13,
1678,
736,
4050,
29918,
6886,
877,
17492,
29914,
3167,
29918,
3150,
333,
29889,
1420,
742,
13,
462,
965,
2446,
29922,
3398,
29889,
657,
29918,
4622,
29918,
2271,
3101,
13,
13,
13,
29992,
3398,
29889,
7045,
29918,
7507,
13,
1753,
1653,
29918,
272,
29918,
7507,
29898,
13713,
1125,
13,
1678,
4867,
1839,
3150,
333,
2033,
353,
4613,
29889,
22350,
29918,
2271,
13,
1678,
1404,
353,
330,
29889,
1792,
470,
4911,
29889,
1972,
29889,
4572,
29918,
1609,
29898,
3150,
333,
29922,
13713,
29889,
22350,
29918,
2271,
467,
4102,
580,
13,
1678,
565,
1404,
338,
6213,
29901,
13,
4706,
736,
6684,
29898,
2271,
29918,
1454,
12839,
4102,
29918,
7507,
742,
2446,
29922,
3398,
29889,
657,
29918,
4622,
29918,
2271,
3285,
13,
462,
18884,
1024,
29922,
13713,
29889,
8159,
978,
470,
4613,
29889,
19254,
978,
876,
13,
1678,
565,
1404,
29889,
3150,
333,
2804,
4613,
29889,
22350,
29918,
2271,
29901,
13,
4706,
1404,
29889,
3150,
333,
353,
4613,
29889,
22350,
29918,
2271,
13,
4706,
4833,
29918,
7924,
29889,
15060,
580,
13,
4706,
11013,
29898,
29884,
29915,
6585,
1367,
10110,
3939,
1495,
13,
1678,
1683,
29901,
13,
4706,
11013,
29898,
29884,
29915,
14191,
3730,
8794,
297,
1495,
13,
1678,
736,
6684,
29898,
3398,
29889,
657,
29918,
4622,
29918,
2271,
3101,
13,
13,
2
] |
vfoot/graphics/__init__.py | filipecn/vfoot | 0 | 17476 | import glfw
import OpenGL.GL as gl
import imgui
from imgui.integrations.glfw import GlfwRenderer
def app(render):
imgui.create_context()
window = impl_glfw_init()
impl = GlfwRenderer(window)
while not glfw.window_should_close(window):
glfw.poll_events()
impl.process_inputs()
gl.glClearColor(.2, .5, .2, 0.6)
gl.glClear(gl.GL_COLOR_BUFFER_BIT)
imgui.new_frame()
render()
imgui.render()
impl.render(imgui.get_draw_data())
glfw.swap_buffers(window)
impl.shutdown()
glfw.terminate()
def impl_glfw_init():
width, height = 1280, 720
window_name = "minimal ImGui/GLFW3 example"
if not glfw.init():
print("Could not initialize OpenGL context")
exit(1)
# OS X supports only forward-compatible core profiles from 3.2
glfw.window_hint(glfw.CONTEXT_VERSION_MAJOR, 3)
glfw.window_hint(glfw.CONTEXT_VERSION_MINOR, 3)
glfw.window_hint(glfw.OPENGL_PROFILE, glfw.OPENGL_CORE_PROFILE)
glfw.window_hint(glfw.OPENGL_FORWARD_COMPAT, gl.GL_TRUE)
# Create a windowed mode window and its OpenGL context
window = glfw.create_window(
int(width), int(height), window_name, None, None
)
glfw.make_context_current(window)
if not window:
glfw.terminate()
print("Could not initialize Window")
exit(1)
return window
| [
1,
1053,
3144,
25051,
13,
5215,
29508,
29889,
7239,
408,
3144,
13,
5215,
10153,
1481,
13,
3166,
10153,
1481,
29889,
14146,
800,
29889,
3820,
25051,
1053,
8467,
25051,
21323,
13,
13,
13,
1753,
623,
29898,
9482,
1125,
13,
1678,
10153,
1481,
29889,
3258,
29918,
4703,
580,
13,
1678,
3474,
353,
13374,
29918,
3820,
25051,
29918,
2344,
580,
13,
1678,
13374,
353,
8467,
25051,
21323,
29898,
7165,
29897,
13,
1678,
1550,
451,
3144,
25051,
29889,
7165,
29918,
9344,
29918,
5358,
29898,
7165,
1125,
13,
4706,
3144,
25051,
29889,
29886,
3028,
29918,
13604,
580,
13,
4706,
13374,
29889,
5014,
29918,
2080,
29879,
580,
13,
4706,
3144,
29889,
3820,
18759,
3306,
11891,
29906,
29892,
869,
29945,
29892,
869,
29906,
29892,
29871,
29900,
29889,
29953,
29897,
13,
4706,
3144,
29889,
3820,
18759,
29898,
3820,
29889,
7239,
29918,
15032,
1955,
29918,
7838,
28483,
29918,
22698,
29897,
13,
4706,
10153,
1481,
29889,
1482,
29918,
2557,
580,
13,
4706,
4050,
580,
13,
4706,
10153,
1481,
29889,
9482,
580,
13,
4706,
13374,
29889,
9482,
29898,
2492,
1481,
29889,
657,
29918,
4012,
29918,
1272,
3101,
13,
4706,
3144,
25051,
29889,
26276,
29918,
28040,
414,
29898,
7165,
29897,
13,
1678,
13374,
29889,
845,
329,
3204,
580,
13,
1678,
3144,
25051,
29889,
18821,
403,
580,
13,
13,
13,
1753,
13374,
29918,
3820,
25051,
29918,
2344,
7295,
13,
1678,
2920,
29892,
3171,
353,
29871,
29896,
29906,
29947,
29900,
29892,
29871,
29955,
29906,
29900,
13,
1678,
3474,
29918,
978,
353,
376,
1195,
3039,
1954,
28707,
29914,
7239,
29943,
29956,
29941,
1342,
29908,
13,
13,
1678,
565,
451,
3144,
25051,
29889,
2344,
7295,
13,
4706,
1596,
703,
23323,
451,
11905,
29508,
3030,
1159,
13,
4706,
6876,
29898,
29896,
29897,
13,
13,
1678,
396,
6570,
1060,
11286,
871,
6375,
29899,
23712,
7136,
28723,
515,
29871,
29941,
29889,
29906,
13,
1678,
3144,
25051,
29889,
7165,
29918,
29882,
524,
29898,
3820,
25051,
29889,
6007,
16975,
29918,
16358,
29918,
1529,
29967,
1955,
29892,
29871,
29941,
29897,
13,
1678,
3144,
25051,
29889,
7165,
29918,
29882,
524,
29898,
3820,
25051,
29889,
6007,
16975,
29918,
16358,
29918,
16173,
1955,
29892,
29871,
29941,
29897,
13,
1678,
3144,
25051,
29889,
7165,
29918,
29882,
524,
29898,
3820,
25051,
29889,
4590,
1430,
7239,
29918,
8618,
7724,
29892,
3144,
25051,
29889,
4590,
1430,
7239,
29918,
3217,
1525,
29918,
8618,
7724,
29897,
13,
13,
1678,
3144,
25051,
29889,
7165,
29918,
29882,
524,
29898,
3820,
25051,
29889,
4590,
1430,
7239,
29918,
22051,
29956,
17011,
29918,
21514,
1299,
29892,
3144,
29889,
7239,
29918,
20652,
29897,
13,
1678,
396,
6204,
263,
3474,
287,
4464,
3474,
322,
967,
29508,
3030,
13,
1678,
3474,
353,
3144,
25051,
29889,
3258,
29918,
7165,
29898,
13,
4706,
938,
29898,
2103,
511,
938,
29898,
3545,
511,
3474,
29918,
978,
29892,
6213,
29892,
6213,
13,
1678,
1723,
13,
1678,
3144,
25051,
29889,
5675,
29918,
4703,
29918,
3784,
29898,
7165,
29897,
13,
13,
1678,
565,
451,
3474,
29901,
13,
4706,
3144,
25051,
29889,
18821,
403,
580,
13,
4706,
1596,
703,
23323,
451,
11905,
18379,
1159,
13,
4706,
6876,
29898,
29896,
29897,
13,
13,
1678,
736,
3474,
13,
2
] |
gbot/libs/helper.py | dgw/goshu | 5 | 15422 | #!/usr/bin/env python3
# Goshu IRC Bot
# written by <NAME> <<EMAIL>>
# licensed under the ISC license
"""extends several builtin functions and provides helper functions
The default Python library is extensive and well-stocked. There are some
times however, you wish a small task was taken care of for you. This module
if chock full of little extensions and helper functions I've needed while
writing Goshu.
Small, interesting, self-contained functions that can probably be reused
elsewhere.
"""
import collections.abc
import datetime
import imp
import json
import os
import re
import string
import sys
import urllib.parse
from girc.formatting import escape
from http_status import Status
from pyquery import PyQuery as pq
import importlib
import requests
import xml.sax.saxutils as saxutils
import yaml
valid_filename_chars = string.ascii_letters + string.digits + '#._- '
def true_or_false(in_str):
"""Returns True/False if string represents it, else None."""
in_str = in_str.lower()
if in_str.startswith(('true', 'y', '1', 'on')):
return True
elif in_str.startswith(('false', 'n', '0', 'off')):
return False
else:
return None
def split_num(line, chars=' ', maxsplits=1, empty=''):
"""/lazy/ wrapper, to stop us having to bounds-check when splitting.
Arguments:
line -- line to split
chars -- character(s) to split line on
maxsplits -- how many split items are returned
empty -- character to put in place of nothing
Returns:
line.split(chars, items); return value is padded until `maxsplits + 1` number of values
are present"""
line = line.split(chars, maxsplits)
while len(line) <= maxsplits:
line.append(empty)
return line
def is_ok(func, prompt, blank='', clearline=False):
"""Prompt the user for yes/no and returns True/False
Arguments:
prompt -- Prompt for the user
blank -- If True, a blank response will return True, ditto for False, the default ''
will not accept blank responses and ask until the user gives an appropriate
response
Returns:
True if user accepts, False if user does not"""
while True:
ok = func(prompt).lower().strip()
if len(ok) > 0:
if ok[0] == 'y' or ok[0] == 't' or ok[0] == '1': # yes, true, 1
return True
elif ok[0] == 'n' or ok[0] == 'f' or ok[0] == '0': # no, false, 0
return False
else:
if blank is True:
return True
elif blank is False:
return False
def bytes_to_str(bytes, base=2, precision=0):
"""Convert number of bytes to a human-readable format
Arguments:
bytes -- number of bytes
base -- base 2 'regular' multiplexer, or base 10 'storage' multiplexer
precision -- number of decimal places to output
Returns:
Human-readable string such as '1.32M'
"""
if base == 2:
multiplexer = 1024
elif base == 10:
multiplexer = 1000
else:
return None # raise error
precision_string = '%.' + str(precision) + 'f'
mebi_convert = True
if bytes >= (multiplexer ** 4):
terabytes = float(bytes / (multiplexer ** 4))
output = (precision_string % terabytes) + 'T'
elif bytes >= (multiplexer ** 3):
gigabytes = float(bytes / (multiplexer ** 3))
output = (precision_string % gigabytes) + 'G'
elif bytes >= (multiplexer ** 2):
megabytes = float(bytes / (multiplexer ** 2))
output = (precision_string % megabytes) + 'M'
elif bytes >= (multiplexer ** 1):
kilobytes = float(bytes / (multiplexer ** 1))
output = (precision_string % kilobytes) + 'K'
else:
output = (precision_string % float(bytes)) + 'B'
mebi_convert = False
# mebibytes and gibibytes all those weird HDD manufacturer terms
if base == 10 and mebi_convert:
num, base = output[:-1], output[-1]
output = num + base.lower() + 'B'
return output
def time_metric(secs=60, mins=0):
"""Returns user-readable string representing given number of seconds."""
if mins:
secs += (mins * 60)
time = ''
for metric_secs, metric_char in [[7 * 24 * 60 * 60, 'w'],
[24 * 60 * 60, 'd'],
[60 * 60, 'h'],
[60, 'm']]:
if secs > metric_secs:
time += '{}{}'.format(int(secs / metric_secs), metric_char)
secs -= int(secs / metric_secs) * metric_secs
if secs > 0:
time += '{}s'.format(secs)
return time
def metric(num, metric_list=[[10 ** 9, 'B'], [10 ** 6, 'M'], [10 ** 3, 'k']], additive=False):
"""Returns user-readable string representing given value.
Arguments:
num is the base value we're converting.
metric_list is the list of data we're working off.
additive is whether we add the various values together, or separate them.
Return:
a string such as 345K or 23w6d2h53s"""
output = ''
for metric_count, metric_char in metric_list:
if num > metric_count:
if additive:
format_str = '{}{}'
else:
format_str = '{:.1f}{}'
num = (num / metric_count)
if not additive:
num = float(num)
output += format_str.format(num, metric_char)
if not additive:
break
# just in case no output
if output == '':
output = str(num)
return output
def get_url(url, **kwargs):
"""Gets a url, handles all the icky requests stuff."""
try:
if 'timeout' not in kwargs:
kwargs['timeout'] = 20
r = requests.get(url, **kwargs)
r.status = Status(r.status_code)
if not r.ok:
return 'HTTP Error - {code} {name} - {description}'.format(**{
'code': r.status.code,
'name': r.status.name,
'description': r.status.description
})
except requests.exceptions.Timeout:
return 'Connection timed out'
except requests.exceptions.RequestException as x:
return '{}'.format(x.__class__.__name__)
return r
def format_extract(format_json, input_element, format=None, debug=False, fail='Failure'):
if not format:
if 'format' in format_json:
format = format_json['format']
else:
return 'No format for format_extract()'
if 'debug' in format_json:
debug = format_json['debug']
# format-specific settings
if format == 'json':
input_element = json.loads(input_element)
retrieve = json_return
elif format == 'xml':
# ignore xml namespaces
input_element = input_element.replace(' xmlns:', ' xmlnamespace:')
input_element = input_element.replace(' xmlns=', ' xmlnamespace=')
retrieve = xml_return
# format extraction - format kwargs
format_dict = {}
if 'response_dict' in format_json:
for name in format_json['response_dict']:
try:
if isinstance(format_json['response_dict'][name], collections.abc.Callable):
try:
format_dict[name] = format_json['response_dict'][name](format_json,
input_element)
except BaseException as x:
if debug:
return 'Unknown failure: {}'.format(x)
else:
return 'Code error'
else:
format_dict[name] = retrieve(input_element,
format_json['response_dict'][name])
if format_dict[name] is None:
return fail
except KeyError:
if debug:
return 'Fail on {}'.format(name)
else:
return fail
except IndexError:
if debug:
return 'Fail on {}'.format(name)
else:
return fail
try:
return format_json['response'].format(**format_dict)
except KeyError:
if debug:
return 'Fail on format() key'
else:
return fail
except IndexError:
if debug:
return 'Fail on format() index'
else:
return fail
def xml_return(input_xml, selector):
pq_xml = pq(input_xml)
if selector[0] == 'text':
return selector[1]
elif selector[0] == 'text.escape':
return escape(selector[1])
elif selector[0] == 'jquery':
return pq_xml(selector[1]).text()
elif selector[0] == 'jquery.attr':
return pq_xml(selector[1]).attr(selector[2])
def json_return(input_json, selector):
if selector[0] == 'text':
return selector[1]
elif selector[0] == 'text.escape':
return escape(selector[1])
elif selector[0] == 'json.lower':
if len(selector) > 2:
default = selector[2]
else:
default = ""
return str(json_element(input_json, selector[1], default=default)).lower()
elif selector[0] == 'json.quote_plus':
if len(selector) > 2:
default = selector[2]
else:
default = ""
return urllib.parse.quote_plus(str(json_element(input_json, selector[1],
default=default)))
elif selector[0] == 'json.num.metric':
if len(selector) > 2:
default = selector[2]
else:
default = 0
return metric(int(json_element(input_json, selector[1], default=default)))
elif selector[0] == 'json.datetime.fromtimestamp':
if len(selector) > 2:
default = selector[2]
else:
default = 0
ts = json_element(input_json, selector[1], default=default)
return datetime.datetime.fromtimestamp(ts).strftime(selector[2])
elif selector[0] == 'json.dict.returntrue':
keys = []
json_dict = json_element(input_json, selector[1])
for key in json_dict:
if json_dict[key]:
keys.append(key)
return selector[2].join(keys)
# before general json
else:
if len(selector) > 2:
default = selector[2]
else:
default = None
return escape(str(json_element(input_json, selector[1], default=default)))
def json_element(input_dict, query, default=None):
"""Runs through a data structure and returns the selected element."""
for element in query:
is_list_index = isinstance(element, int) and isinstance(input_dict, (list, tuple))
if is_list_index or element in input_dict:
input_dict = input_dict[element]
else:
return default
return input_dict
def filename_escape(unsafe, replace_char='_', valid_chars=valid_filename_chars):
"""Escapes a string to provide a safe local filename
Arguments:
unsafe -- Unsafe string to escape
replace_char -- Character to replace unsafe characters with
valid_chars -- Valid filename characters
Returns:
Safe local filename string
"""
if not unsafe:
return ''
safe = ''
for character in unsafe:
if character in valid_chars:
safe += character
else:
safe += replace_char
return safe
_unescape_map = {
''': "'",
''': "'",
'"': "'",
}
def html_unescape(input):
"""Turns any html-escaped characters back to their normal equivalents."""
output = saxutils.unescape(input)
for char in _unescape_map.keys():
output = output.replace(char, _unescape_map[char])
return output
def utf8_bom(input):
"""Strips BOM from a utf8 string, because open() leaves it in for some reason."""
output = input.replace('\ufeff', '')
return output
class JsonHandler:
def __init__(self, base, folder, attr=None, callback_name=None, ext=None, yaml=False):
if ext:
self.pattern = [x.format(ext) for x in ['*.{}.yaml', '*.{}.json', '*_{}.py']]
else:
self.pattern = ['*.yaml', '*.json', '*.py']
self.base = base
self.attr = attr
self.folder = folder
self.ext = ext
self.callback_name = callback_name
self.yaml = yaml
self.reload()
def spread_new_json(self, new_json):
if self.attr:
setattr(self.base, self.attr, new_json)
if self.callback_name:
getattr(self.base, self.callback_name, None)(new_json)
def reload(self):
new_json = {}
if not os.path.exists(self.folder):
self.spread_new_json(new_json)
return
# loading
folders_to_scan = [self.folder]
# loading list of folders that contain modules
for f in os.listdir(self.folder):
if f == 'disabled':
continue
full_name = os.path.join(self.folder, f)
if os.path.isdir(full_name):
folders_to_scan.append(full_name)
# loading actual modules
for folder in folders_to_scan:
for f in os.listdir(folder):
full_name = os.path.join(folder, f)
if os.path.isfile(full_name):
(extname, ext) = os.path.splitext(full_name)
if ext.lower() not in ['.json', '.yaml']:
continue
# check for loader-specific extension
if self.ext:
name, ext = os.path.splitext(extname)
pyfile = '{}_{}'.format('.'.join(name.split(os.sep)), self.ext)
# not really our module
if ext != os.extsep + self.ext:
continue
else:
name, ext = extname, ''
pyfile = '.'.join(name[2:].split(os.sep))
# NOTE: this is static, and that is bad
pyfile = pyfile.lstrip('..modules.')
# py file
if self.yaml:
try:
module = importlib.import_module(pyfile)
imp.reload(module) # so reloading works
# we should capture this and output errors to stderr
except:
pass
# yaml / json
with open(full_name, encoding='utf-8') as js_f:
if self.yaml:
try:
info = yaml.load(js_f.read(), Loader=yaml.FullLoader)
# we should capture this and output errors to stderr
except Exception as ex:
print('failed to load YAML file', full_name, ':', ex)
continue
else:
info = json.loads(js_f.read())
# set module name and info
if 'name' not in info:
new_name = name.split('/')[-1].split('\\')[-1]
info['name'] = [new_name]
new_json[info['name'][0]] = info
# set info on base object and / or call callback
self.spread_new_json(new_json)
# timedelta functions
_td_str_map = [
('d', 'days'),
('h', 'hours'),
('m', 'minutes'),
('s', 'seconds'),
]
_str_td = r''
for istr, td in _td_str_map:
_str_td += r'\s*(?:(?P<' + td + r'>[0-9]+)\s*' + istr + r')?'
_TD_STR_REGEX = re.compile(_str_td)
def timedelta_to_string(delta):
"""Converts a timedelta dict to a string."""
td_string = ''
for istr, td in _td_str_map:
if td in delta:
td_string += str(delta[td])
td_string += istr
return td_string
def string_to_timedelta(td_string):
"""Converts a string to a timedelta dict."""
match = _TD_STR_REGEX.match(td_string)
delta = {}
for istr, td in _td_str_map:
if match.group(td):
if '.' in match.group(td):
val = float(match.group(td))
else:
val = int(match.group(td))
delta[td] = val
return delta
# path
def add_path(path):
if path not in sys.path:
sys.path.insert(0, path)
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
402,
359,
6905,
306,
10363,
11273,
13,
29937,
3971,
491,
529,
5813,
29958,
3532,
26862,
6227,
6778,
13,
29937,
7794,
21144,
1090,
278,
306,
7187,
19405,
13,
15945,
29908,
1062,
1975,
3196,
4240,
262,
3168,
322,
8128,
16876,
3168,
13,
13,
1576,
2322,
5132,
3489,
338,
20607,
322,
1532,
29899,
17712,
287,
29889,
1670,
526,
777,
13,
3706,
3138,
29892,
366,
6398,
263,
2319,
3414,
471,
4586,
2562,
310,
363,
366,
29889,
910,
3883,
13,
361,
521,
1698,
2989,
310,
2217,
17752,
322,
16876,
3168,
306,
29915,
345,
4312,
1550,
13,
16554,
402,
359,
6905,
29889,
13,
13,
12636,
497,
29892,
8031,
29892,
1583,
29899,
1285,
7114,
3168,
393,
508,
3117,
367,
337,
3880,
13,
2870,
3062,
29889,
13,
15945,
29908,
13,
13,
5215,
16250,
29889,
10736,
13,
5215,
12865,
13,
5215,
2411,
13,
5215,
4390,
13,
5215,
2897,
13,
5215,
337,
13,
5215,
1347,
13,
5215,
10876,
13,
5215,
3142,
1982,
29889,
5510,
13,
13,
3166,
330,
2076,
29889,
689,
23980,
1053,
10169,
13,
3166,
1732,
29918,
4882,
1053,
16034,
13,
3166,
11451,
1972,
1053,
10772,
3010,
408,
282,
29939,
13,
5215,
1053,
1982,
13,
5215,
7274,
13,
5215,
4903,
29889,
29879,
1165,
29889,
29879,
1165,
13239,
408,
872,
29916,
13239,
13,
5215,
343,
8807,
13,
13,
13,
3084,
29918,
9507,
29918,
305,
1503,
353,
1347,
29889,
294,
18869,
29918,
1026,
2153,
718,
1347,
29889,
7501,
1169,
718,
16321,
3032,
29899,
525,
13,
13,
13,
1753,
1565,
29918,
272,
29918,
4541,
29898,
262,
29918,
710,
1125,
13,
1678,
9995,
11609,
29879,
5852,
29914,
8824,
565,
1347,
11524,
372,
29892,
1683,
6213,
1213,
15945,
13,
1678,
297,
29918,
710,
353,
297,
29918,
710,
29889,
13609,
580,
13,
13,
1678,
565,
297,
29918,
710,
29889,
27382,
2541,
29898,
877,
3009,
742,
525,
29891,
742,
525,
29896,
742,
525,
265,
8785,
29901,
13,
4706,
736,
5852,
13,
1678,
25342,
297,
29918,
710,
29889,
27382,
2541,
29898,
877,
4541,
742,
525,
29876,
742,
525,
29900,
742,
525,
2696,
8785,
29901,
13,
4706,
736,
7700,
13,
1678,
1683,
29901,
13,
4706,
736,
6213,
13,
13,
13,
1753,
6219,
29918,
1949,
29898,
1220,
29892,
22524,
2433,
13420,
4236,
23579,
1169,
29922,
29896,
29892,
4069,
2433,
29374,
13,
1678,
9995,
29914,
433,
1537,
29914,
14476,
29892,
304,
5040,
502,
2534,
304,
13451,
29899,
3198,
746,
24368,
29889,
13,
13,
1678,
11842,
9331,
29901,
13,
1678,
1196,
1192,
1196,
304,
6219,
13,
1678,
22524,
1192,
2931,
29898,
29879,
29897,
304,
6219,
1196,
373,
13,
1678,
4236,
23579,
1169,
1192,
920,
1784,
6219,
4452,
526,
4133,
13,
1678,
4069,
1192,
2931,
304,
1925,
297,
2058,
310,
3078,
13,
13,
1678,
16969,
29901,
13,
1678,
1196,
29889,
5451,
29898,
305,
1503,
29892,
4452,
416,
736,
995,
338,
282,
23959,
2745,
421,
3317,
23579,
1169,
718,
29871,
29896,
29952,
1353,
310,
1819,
13,
1678,
526,
2198,
15945,
29908,
13,
1678,
1196,
353,
1196,
29889,
5451,
29898,
305,
1503,
29892,
4236,
23579,
1169,
29897,
13,
1678,
1550,
7431,
29898,
1220,
29897,
5277,
4236,
23579,
1169,
29901,
13,
4706,
1196,
29889,
4397,
29898,
6310,
29897,
13,
13,
1678,
736,
1196,
13,
13,
13,
1753,
338,
29918,
554,
29898,
9891,
29892,
9508,
29892,
9654,
2433,
742,
2821,
1220,
29922,
8824,
1125,
13,
1678,
9995,
18571,
415,
278,
1404,
363,
4874,
29914,
1217,
322,
3639,
5852,
29914,
8824,
13,
13,
1678,
11842,
9331,
29901,
13,
1678,
9508,
1192,
9705,
415,
363,
278,
1404,
13,
1678,
9654,
1192,
960,
5852,
29892,
263,
9654,
2933,
674,
736,
5852,
29892,
6309,
517,
363,
7700,
29892,
278,
2322,
6629,
13,
632,
674,
451,
3544,
9654,
20890,
322,
2244,
2745,
278,
1404,
4076,
385,
8210,
13,
632,
2933,
13,
13,
1678,
16969,
29901,
13,
1678,
5852,
565,
1404,
21486,
29892,
7700,
565,
1404,
947,
451,
15945,
29908,
13,
1678,
1550,
5852,
29901,
13,
4706,
3431,
353,
3653,
29898,
14032,
415,
467,
13609,
2141,
17010,
580,
13,
13,
4706,
565,
7431,
29898,
554,
29897,
1405,
29871,
29900,
29901,
13,
9651,
565,
3431,
29961,
29900,
29962,
1275,
525,
29891,
29915,
470,
3431,
29961,
29900,
29962,
1275,
525,
29873,
29915,
470,
3431,
29961,
29900,
29962,
1275,
525,
29896,
2396,
29871,
396,
4874,
29892,
1565,
29892,
29871,
29896,
13,
18884,
736,
5852,
13,
9651,
25342,
3431,
29961,
29900,
29962,
1275,
525,
29876,
29915,
470,
3431,
29961,
29900,
29962,
1275,
525,
29888,
29915,
470,
3431,
29961,
29900,
29962,
1275,
525,
29900,
2396,
29871,
396,
694,
29892,
2089,
29892,
29871,
29900,
13,
18884,
736,
7700,
13,
13,
4706,
1683,
29901,
13,
9651,
565,
9654,
338,
5852,
29901,
13,
18884,
736,
5852,
13,
9651,
25342,
9654,
338,
7700,
29901,
13,
18884,
736,
7700,
13,
13,
13,
1753,
6262,
29918,
517,
29918,
710,
29898,
13193,
29892,
2967,
29922,
29906,
29892,
16716,
29922,
29900,
1125,
13,
1678,
9995,
18455,
1353,
310,
6262,
304,
263,
5199,
29899,
949,
519,
3402,
13,
13,
1678,
11842,
9331,
29901,
13,
1678,
6262,
1192,
1353,
310,
6262,
13,
1678,
2967,
1192,
2967,
29871,
29906,
525,
15227,
29915,
2999,
29916,
261,
29892,
470,
2967,
29871,
29896,
29900,
525,
12925,
29915,
2999,
29916,
261,
13,
1678,
16716,
1192,
1353,
310,
13677,
7600,
304,
1962,
13,
13,
1678,
16969,
29901,
13,
1678,
12968,
29899,
949,
519,
1347,
1316,
408,
525,
29896,
29889,
29941,
29906,
29924,
29915,
13,
13,
1678,
9995,
13,
1678,
565,
2967,
1275,
29871,
29906,
29901,
13,
4706,
2999,
29916,
261,
353,
29871,
29896,
29900,
29906,
29946,
13,
1678,
25342,
2967,
1275,
29871,
29896,
29900,
29901,
13,
4706,
2999,
29916,
261,
353,
29871,
29896,
29900,
29900,
29900,
13,
1678,
1683,
29901,
13,
4706,
736,
6213,
29871,
396,
12020,
1059,
13,
13,
1678,
16716,
29918,
1807,
353,
14210,
6169,
718,
851,
29898,
17990,
2459,
29897,
718,
525,
29888,
29915,
13,
1678,
592,
5365,
29918,
13441,
353,
5852,
13,
13,
1678,
565,
6262,
6736,
313,
9910,
10709,
261,
3579,
29871,
29946,
1125,
13,
4706,
1935,
10798,
2167,
353,
5785,
29898,
13193,
847,
313,
9910,
10709,
261,
3579,
29871,
29946,
876,
13,
4706,
1962,
353,
313,
17990,
2459,
29918,
1807,
1273,
1935,
10798,
2167,
29897,
718,
525,
29911,
29915,
13,
13,
1678,
25342,
6262,
6736,
313,
9910,
10709,
261,
3579,
29871,
29941,
1125,
13,
4706,
19340,
10798,
2167,
353,
5785,
29898,
13193,
847,
313,
9910,
10709,
261,
3579,
29871,
29941,
876,
13,
4706,
1962,
353,
313,
17990,
2459,
29918,
1807,
1273,
19340,
10798,
2167,
29897,
718,
525,
29954,
29915,
13,
13,
1678,
25342,
6262,
6736,
313,
9910,
10709,
261,
3579,
29871,
29906,
1125,
13,
4706,
4508,
10798,
2167,
353,
5785,
29898,
13193,
847,
313,
9910,
10709,
261,
3579,
29871,
29906,
876,
13,
4706,
1962,
353,
313,
17990,
2459,
29918,
1807,
1273,
4508,
10798,
2167,
29897,
718,
525,
29924,
29915,
13,
13,
1678,
25342,
6262,
6736,
313,
9910,
10709,
261,
3579,
29871,
29896,
1125,
13,
4706,
4679,
18711,
2167,
353,
5785,
29898,
13193,
847,
313,
9910,
10709,
261,
3579,
29871,
29896,
876,
13,
4706,
1962,
353,
313,
17990,
2459,
29918,
1807,
1273,
4679,
18711,
2167,
29897,
718,
525,
29968,
29915,
13,
13,
1678,
1683,
29901,
13,
4706,
1962,
353,
313,
17990,
2459,
29918,
1807,
1273,
5785,
29898,
13193,
876,
718,
525,
29933,
29915,
13,
4706,
592,
5365,
29918,
13441,
353,
7700,
13,
13,
1678,
396,
592,
18508,
29891,
2167,
322,
330,
747,
747,
29891,
2167,
599,
1906,
13543,
379,
7858,
12012,
9945,
4958,
13,
1678,
565,
2967,
1275,
29871,
29896,
29900,
322,
592,
5365,
29918,
13441,
29901,
13,
4706,
954,
29892,
2967,
353,
1962,
7503,
29899,
29896,
1402,
1962,
14352,
29896,
29962,
13,
4706,
1962,
353,
954,
718,
2967,
29889,
13609,
580,
718,
525,
29933,
29915,
13,
13,
1678,
736,
1962,
13,
13,
13,
1753,
931,
29918,
16414,
29898,
344,
2395,
29922,
29953,
29900,
29892,
286,
1144,
29922,
29900,
1125,
13,
1678,
9995,
11609,
29879,
1404,
29899,
949,
519,
1347,
15783,
2183,
1353,
310,
6923,
1213,
15945,
13,
1678,
565,
286,
1144,
29901,
13,
4706,
409,
2395,
4619,
313,
29885,
1144,
334,
29871,
29953,
29900,
29897,
13,
1678,
931,
353,
6629,
13,
1678,
363,
12714,
29918,
344,
2395,
29892,
12714,
29918,
3090,
297,
5519,
29955,
334,
29871,
29906,
29946,
334,
29871,
29953,
29900,
334,
29871,
29953,
29900,
29892,
525,
29893,
7464,
13,
462,
462,
268,
518,
29906,
29946,
334,
29871,
29953,
29900,
334,
29871,
29953,
29900,
29892,
525,
29881,
7464,
13,
462,
462,
268,
518,
29953,
29900,
334,
29871,
29953,
29900,
29892,
525,
29882,
7464,
13,
462,
462,
268,
518,
29953,
29900,
29892,
525,
29885,
2033,
5387,
13,
4706,
565,
409,
2395,
1405,
12714,
29918,
344,
2395,
29901,
13,
9651,
931,
4619,
22372,
1157,
29913,
4286,
4830,
29898,
524,
29898,
344,
2395,
847,
12714,
29918,
344,
2395,
511,
12714,
29918,
3090,
29897,
13,
9651,
409,
2395,
22361,
938,
29898,
344,
2395,
847,
12714,
29918,
344,
2395,
29897,
334,
12714,
29918,
344,
2395,
13,
1678,
565,
409,
2395,
1405,
29871,
29900,
29901,
13,
4706,
931,
4619,
525,
8875,
29879,
4286,
4830,
29898,
344,
2395,
29897,
13,
1678,
736,
931,
13,
13,
13,
1753,
12714,
29898,
1949,
29892,
12714,
29918,
1761,
29922,
8999,
29896,
29900,
3579,
29871,
29929,
29892,
525,
29933,
7464,
518,
29896,
29900,
3579,
29871,
29953,
29892,
525,
29924,
7464,
518,
29896,
29900,
3579,
29871,
29941,
29892,
525,
29895,
2033,
1402,
788,
3321,
29922,
8824,
1125,
13,
1678,
9995,
11609,
29879,
1404,
29899,
949,
519,
1347,
15783,
2183,
995,
29889,
13,
13,
1678,
11842,
9331,
29901,
13,
1678,
954,
338,
278,
2967,
995,
591,
29915,
276,
17415,
29889,
13,
1678,
12714,
29918,
1761,
338,
278,
1051,
310,
848,
591,
29915,
276,
1985,
1283,
29889,
13,
1678,
788,
3321,
338,
3692,
591,
788,
278,
5164,
1819,
4208,
29892,
470,
5004,
963,
29889,
13,
13,
1678,
7106,
29901,
13,
1678,
263,
1347,
1316,
408,
29871,
29941,
29946,
29945,
29968,
470,
29871,
29906,
29941,
29893,
29953,
29881,
29906,
29882,
29945,
29941,
29879,
15945,
29908,
13,
1678,
1962,
353,
6629,
13,
1678,
363,
12714,
29918,
2798,
29892,
12714,
29918,
3090,
297,
12714,
29918,
1761,
29901,
13,
4706,
565,
954,
1405,
12714,
29918,
2798,
29901,
13,
9651,
565,
788,
3321,
29901,
13,
18884,
3402,
29918,
710,
353,
22372,
1157,
10162,
13,
9651,
1683,
29901,
13,
18884,
3402,
29918,
710,
353,
22372,
29901,
29889,
29896,
29888,
1157,
10162,
13,
13,
9651,
954,
353,
313,
1949,
847,
12714,
29918,
2798,
29897,
13,
9651,
565,
451,
788,
3321,
29901,
13,
18884,
954,
353,
5785,
29898,
1949,
29897,
13,
13,
9651,
1962,
4619,
3402,
29918,
710,
29889,
4830,
29898,
1949,
29892,
12714,
29918,
3090,
29897,
13,
13,
9651,
565,
451,
788,
3321,
29901,
13,
18884,
2867,
13,
13,
1678,
396,
925,
297,
1206,
694,
1962,
13,
1678,
565,
1962,
1275,
525,
2396,
13,
4706,
1962,
353,
851,
29898,
1949,
29897,
13,
13,
1678,
736,
1962,
13,
13,
13,
1753,
679,
29918,
2271,
29898,
2271,
29892,
3579,
19290,
1125,
13,
1678,
9995,
29954,
1691,
263,
3142,
29892,
17766,
599,
278,
29871,
18219,
7274,
6433,
1213,
15945,
13,
1678,
1018,
29901,
13,
4706,
565,
525,
15619,
29915,
451,
297,
9049,
5085,
29901,
13,
9651,
9049,
5085,
1839,
15619,
2033,
353,
29871,
29906,
29900,
13,
4706,
364,
353,
7274,
29889,
657,
29898,
2271,
29892,
3579,
19290,
29897,
13,
4706,
364,
29889,
4882,
353,
16034,
29898,
29878,
29889,
4882,
29918,
401,
29897,
13,
13,
4706,
565,
451,
364,
29889,
554,
29901,
13,
9651,
736,
525,
10493,
4829,
448,
426,
401,
29913,
426,
978,
29913,
448,
426,
8216,
29913,
4286,
4830,
29898,
1068,
29912,
13,
18884,
525,
401,
2396,
364,
29889,
4882,
29889,
401,
29892,
13,
18884,
525,
978,
2396,
364,
29889,
4882,
29889,
978,
29892,
13,
18884,
525,
8216,
2396,
364,
29889,
4882,
29889,
8216,
13,
9651,
5615,
13,
13,
1678,
5174,
7274,
29889,
11739,
29879,
29889,
10851,
29901,
13,
4706,
736,
525,
5350,
5335,
287,
714,
29915,
13,
13,
1678,
5174,
7274,
29889,
11739,
29879,
29889,
3089,
2451,
408,
921,
29901,
13,
4706,
736,
525,
8875,
4286,
4830,
29898,
29916,
17255,
1990,
1649,
17255,
978,
1649,
29897,
13,
13,
1678,
736,
364,
13,
13,
13,
1753,
3402,
29918,
21111,
29898,
4830,
29918,
3126,
29892,
1881,
29918,
5029,
29892,
3402,
29922,
8516,
29892,
4744,
29922,
8824,
29892,
4418,
2433,
24155,
29374,
13,
1678,
565,
451,
3402,
29901,
13,
4706,
565,
525,
4830,
29915,
297,
3402,
29918,
3126,
29901,
13,
9651,
3402,
353,
3402,
29918,
3126,
1839,
4830,
2033,
13,
4706,
1683,
29901,
13,
9651,
736,
525,
3782,
3402,
363,
3402,
29918,
21111,
580,
29915,
13,
13,
1678,
565,
525,
8382,
29915,
297,
3402,
29918,
3126,
29901,
13,
4706,
4744,
353,
3402,
29918,
3126,
1839,
8382,
2033,
13,
13,
1678,
396,
3402,
29899,
14940,
6055,
13,
1678,
565,
3402,
1275,
525,
3126,
2396,
13,
4706,
1881,
29918,
5029,
353,
4390,
29889,
18132,
29898,
2080,
29918,
5029,
29897,
13,
4706,
10563,
353,
4390,
29918,
2457,
13,
1678,
25342,
3402,
1275,
525,
3134,
2396,
13,
4706,
396,
11455,
4903,
2983,
22459,
13,
4706,
1881,
29918,
5029,
353,
1881,
29918,
5029,
29889,
6506,
877,
9463,
29901,
742,
525,
4903,
22377,
29901,
1495,
13,
4706,
1881,
29918,
5029,
353,
1881,
29918,
5029,
29889,
6506,
877,
9463,
29922,
742,
525,
4903,
22377,
29922,
1495,
13,
4706,
10563,
353,
4903,
29918,
2457,
13,
13,
1678,
396,
3402,
4805,
428,
448,
3402,
9049,
5085,
13,
1678,
3402,
29918,
8977,
353,
6571,
13,
13,
1678,
565,
525,
5327,
29918,
8977,
29915,
297,
3402,
29918,
3126,
29901,
13,
4706,
363,
1024,
297,
3402,
29918,
3126,
1839,
5327,
29918,
8977,
2033,
29901,
13,
9651,
1018,
29901,
13,
18884,
565,
338,
8758,
29898,
4830,
29918,
3126,
1839,
5327,
29918,
8977,
2033,
29961,
978,
1402,
16250,
29889,
10736,
29889,
5594,
519,
1125,
13,
462,
1678,
1018,
29901,
13,
462,
4706,
3402,
29918,
8977,
29961,
978,
29962,
353,
3402,
29918,
3126,
1839,
5327,
29918,
8977,
2033,
29961,
978,
850,
4830,
29918,
3126,
29892,
13,
462,
462,
462,
462,
1669,
1881,
29918,
5029,
29897,
13,
462,
1678,
5174,
7399,
2451,
408,
921,
29901,
13,
462,
4706,
565,
4744,
29901,
13,
462,
9651,
736,
525,
14148,
10672,
29901,
6571,
4286,
4830,
29898,
29916,
29897,
13,
462,
4706,
1683,
29901,
13,
462,
9651,
736,
525,
3399,
1059,
29915,
13,
18884,
1683,
29901,
13,
462,
1678,
3402,
29918,
8977,
29961,
978,
29962,
353,
10563,
29898,
2080,
29918,
5029,
29892,
13,
462,
462,
462,
3402,
29918,
3126,
1839,
5327,
29918,
8977,
2033,
29961,
978,
2314,
13,
13,
18884,
565,
3402,
29918,
8977,
29961,
978,
29962,
338,
6213,
29901,
13,
462,
1678,
736,
4418,
13,
9651,
5174,
7670,
2392,
29901,
13,
18884,
565,
4744,
29901,
13,
462,
1678,
736,
525,
16243,
373,
6571,
4286,
4830,
29898,
978,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
736,
4418,
13,
9651,
5174,
11374,
2392,
29901,
13,
18884,
565,
4744,
29901,
13,
462,
1678,
736,
525,
16243,
373,
6571,
4286,
4830,
29898,
978,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
736,
4418,
13,
13,
1678,
1018,
29901,
13,
4706,
736,
3402,
29918,
3126,
1839,
5327,
13359,
4830,
29898,
1068,
4830,
29918,
8977,
29897,
13,
1678,
5174,
7670,
2392,
29901,
13,
4706,
565,
4744,
29901,
13,
9651,
736,
525,
16243,
373,
3402,
580,
1820,
29915,
13,
4706,
1683,
29901,
13,
9651,
736,
4418,
13,
1678,
5174,
11374,
2392,
29901,
13,
4706,
565,
4744,
29901,
13,
9651,
736,
525,
16243,
373,
3402,
580,
2380,
29915,
13,
4706,
1683,
29901,
13,
9651,
736,
4418,
13,
13,
13,
1753,
4903,
29918,
2457,
29898,
2080,
29918,
3134,
29892,
11764,
1125,
13,
1678,
282,
29939,
29918,
3134,
353,
282,
29939,
29898,
2080,
29918,
3134,
29897,
13,
13,
1678,
565,
11764,
29961,
29900,
29962,
1275,
525,
726,
2396,
13,
4706,
736,
11764,
29961,
29896,
29962,
13,
1678,
25342,
11764,
29961,
29900,
29962,
1275,
525,
726,
29889,
21587,
2396,
13,
4706,
736,
10169,
29898,
14357,
29961,
29896,
2314,
13,
1678,
25342,
11764,
29961,
29900,
29962,
1275,
525,
5880,
2396,
13,
4706,
736,
282,
29939,
29918,
3134,
29898,
14357,
29961,
29896,
14664,
726,
580,
13,
1678,
25342,
11764,
29961,
29900,
29962,
1275,
525,
5880,
29889,
5552,
2396,
13,
4706,
736,
282,
29939,
29918,
3134,
29898,
14357,
29961,
29896,
14664,
5552,
29898,
14357,
29961,
29906,
2314,
13,
13,
13,
1753,
4390,
29918,
2457,
29898,
2080,
29918,
3126,
29892,
11764,
1125,
13,
1678,
565,
11764,
29961,
29900,
29962,
1275,
525,
726,
2396,
13,
4706,
736,
11764,
29961,
29896,
29962,
13,
1678,
25342,
11764,
29961,
29900,
29962,
1275,
525,
726,
29889,
21587,
2396,
13,
4706,
736,
10169,
29898,
14357,
29961,
29896,
2314,
13,
1678,
25342,
11764,
29961,
29900,
29962,
1275,
525,
3126,
29889,
13609,
2396,
13,
4706,
565,
7431,
29898,
14357,
29897,
1405,
29871,
29906,
29901,
13,
9651,
2322,
353,
11764,
29961,
29906,
29962,
13,
4706,
1683,
29901,
13,
9651,
2322,
353,
5124,
13,
4706,
736,
851,
29898,
3126,
29918,
5029,
29898,
2080,
29918,
3126,
29892,
11764,
29961,
29896,
1402,
2322,
29922,
4381,
8106,
13609,
580,
13,
1678,
25342,
11764,
29961,
29900,
29962,
1275,
525,
3126,
29889,
1396,
29918,
11242,
2396,
13,
4706,
565,
7431,
29898,
14357,
29897,
1405,
29871,
29906,
29901,
13,
9651,
2322,
353,
11764,
29961,
29906,
29962,
13,
4706,
1683,
29901,
13,
9651,
2322,
353,
5124,
13,
4706,
736,
3142,
1982,
29889,
5510,
29889,
1396,
29918,
11242,
29898,
710,
29898,
3126,
29918,
5029,
29898,
2080,
29918,
3126,
29892,
11764,
29961,
29896,
1402,
13,
462,
462,
462,
4706,
2322,
29922,
4381,
4961,
13,
1678,
25342,
11764,
29961,
29900,
29962,
1275,
525,
3126,
29889,
1949,
29889,
16414,
2396,
13,
4706,
565,
7431,
29898,
14357,
29897,
1405,
29871,
29906,
29901,
13,
9651,
2322,
353,
11764,
29961,
29906,
29962,
13,
4706,
1683,
29901,
13,
9651,
2322,
353,
29871,
29900,
13,
4706,
736,
12714,
29898,
524,
29898,
3126,
29918,
5029,
29898,
2080,
29918,
3126,
29892,
11764,
29961,
29896,
1402,
2322,
29922,
4381,
4961,
13,
1678,
25342,
11764,
29961,
29900,
29962,
1275,
525,
3126,
29889,
12673,
29889,
3166,
16394,
2396,
13,
4706,
565,
7431,
29898,
14357,
29897,
1405,
29871,
29906,
29901,
13,
9651,
2322,
353,
11764,
29961,
29906,
29962,
13,
4706,
1683,
29901,
13,
9651,
2322,
353,
29871,
29900,
13,
4706,
18696,
353,
4390,
29918,
5029,
29898,
2080,
29918,
3126,
29892,
11764,
29961,
29896,
1402,
2322,
29922,
4381,
29897,
13,
4706,
736,
12865,
29889,
12673,
29889,
3166,
16394,
29898,
1372,
467,
710,
615,
603,
29898,
14357,
29961,
29906,
2314,
13,
1678,
25342,
11764,
29961,
29900,
29962,
1275,
525,
3126,
29889,
8977,
29889,
2457,
3009,
2396,
13,
4706,
6611,
353,
5159,
13,
4706,
4390,
29918,
8977,
353,
4390,
29918,
5029,
29898,
2080,
29918,
3126,
29892,
11764,
29961,
29896,
2314,
13,
4706,
363,
1820,
297,
4390,
29918,
8977,
29901,
13,
9651,
565,
4390,
29918,
8977,
29961,
1989,
5387,
13,
18884,
6611,
29889,
4397,
29898,
1989,
29897,
13,
4706,
736,
11764,
29961,
29906,
1822,
7122,
29898,
8149,
29897,
13,
1678,
396,
1434,
2498,
4390,
13,
1678,
1683,
29901,
13,
4706,
565,
7431,
29898,
14357,
29897,
1405,
29871,
29906,
29901,
13,
9651,
2322,
353,
11764,
29961,
29906,
29962,
13,
4706,
1683,
29901,
13,
9651,
2322,
353,
6213,
13,
4706,
736,
10169,
29898,
710,
29898,
3126,
29918,
5029,
29898,
2080,
29918,
3126,
29892,
11764,
29961,
29896,
1402,
2322,
29922,
4381,
4961,
13,
13,
13,
1753,
4390,
29918,
5029,
29898,
2080,
29918,
8977,
29892,
2346,
29892,
2322,
29922,
8516,
1125,
13,
1678,
9995,
6558,
29879,
1549,
263,
848,
3829,
322,
3639,
278,
4629,
1543,
1213,
15945,
13,
1678,
363,
1543,
297,
2346,
29901,
13,
4706,
338,
29918,
1761,
29918,
2248,
353,
338,
8758,
29898,
5029,
29892,
938,
29897,
322,
338,
8758,
29898,
2080,
29918,
8977,
29892,
313,
1761,
29892,
18761,
876,
13,
4706,
565,
338,
29918,
1761,
29918,
2248,
470,
1543,
297,
1881,
29918,
8977,
29901,
13,
9651,
1881,
29918,
8977,
353,
1881,
29918,
8977,
29961,
5029,
29962,
13,
4706,
1683,
29901,
13,
9651,
736,
2322,
13,
1678,
736,
1881,
29918,
8977,
13,
13,
13,
1753,
10422,
29918,
21587,
29898,
348,
11177,
29892,
5191,
29918,
3090,
2433,
29918,
742,
2854,
29918,
305,
1503,
29922,
3084,
29918,
9507,
29918,
305,
1503,
1125,
13,
1678,
9995,
29923,
1557,
11603,
263,
1347,
304,
3867,
263,
9109,
1887,
10422,
13,
13,
26915,
29901,
13,
348,
11177,
1192,
853,
11177,
1347,
304,
10169,
13,
6506,
29918,
3090,
1192,
26804,
304,
5191,
25110,
4890,
411,
13,
3084,
29918,
305,
1503,
1192,
15758,
10422,
4890,
13,
13,
11609,
29879,
29901,
13,
17618,
1725,
1887,
10422,
1347,
13,
13,
15945,
29908,
13,
1678,
565,
451,
25110,
29901,
13,
4706,
736,
6629,
13,
1678,
9109,
353,
6629,
13,
1678,
363,
2931,
297,
25110,
29901,
13,
4706,
565,
2931,
297,
2854,
29918,
305,
1503,
29901,
13,
9651,
9109,
4619,
2931,
13,
4706,
1683,
29901,
13,
9651,
9109,
4619,
5191,
29918,
3090,
13,
1678,
736,
9109,
13,
13,
29918,
7844,
5738,
29918,
1958,
353,
426,
13,
1678,
525,
9137,
29941,
29929,
29936,
2396,
13577,
613,
13,
1678,
525,
9137,
29900,
29941,
29929,
29936,
2396,
13577,
613,
13,
1678,
525,
29987,
23083,
29936,
2396,
13577,
613,
13,
29913,
13,
13,
13,
1753,
3472,
29918,
7844,
5738,
29898,
2080,
1125,
13,
1678,
9995,
27407,
29879,
738,
3472,
29899,
267,
5030,
287,
4890,
1250,
304,
1009,
4226,
5737,
1237,
1213,
15945,
13,
1678,
1962,
353,
872,
29916,
13239,
29889,
7844,
5738,
29898,
2080,
29897,
13,
1678,
363,
1373,
297,
903,
7844,
5738,
29918,
1958,
29889,
8149,
7295,
13,
4706,
1962,
353,
1962,
29889,
6506,
29898,
3090,
29892,
903,
7844,
5738,
29918,
1958,
29961,
3090,
2314,
13,
1678,
736,
1962,
13,
13,
13,
1753,
23616,
29947,
29918,
29890,
290,
29898,
2080,
1125,
13,
1678,
9995,
855,
374,
567,
350,
6488,
515,
263,
23616,
29947,
1347,
29892,
1363,
1722,
580,
11308,
372,
297,
363,
777,
2769,
1213,
15945,
13,
1678,
1962,
353,
1881,
29889,
6506,
28909,
1137,
12352,
742,
27255,
13,
1678,
736,
1962,
13,
13,
13,
1990,
14355,
4598,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2967,
29892,
4138,
29892,
12421,
29922,
8516,
29892,
6939,
29918,
978,
29922,
8516,
29892,
1294,
29922,
8516,
29892,
343,
8807,
29922,
8824,
1125,
13,
4706,
565,
1294,
29901,
13,
9651,
1583,
29889,
11037,
353,
518,
29916,
29889,
4830,
29898,
1062,
29897,
363,
921,
297,
6024,
10521,
29912,
1836,
25162,
742,
525,
10521,
29912,
1836,
3126,
742,
525,
29930,
648,
1836,
2272,
2033,
29962,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
11037,
353,
6024,
10521,
25162,
742,
525,
10521,
3126,
742,
525,
10521,
2272,
2033,
13,
4706,
1583,
29889,
3188,
353,
2967,
13,
4706,
1583,
29889,
5552,
353,
12421,
13,
4706,
1583,
29889,
12083,
353,
4138,
13,
4706,
1583,
29889,
1062,
353,
1294,
13,
4706,
1583,
29889,
14035,
29918,
978,
353,
6939,
29918,
978,
13,
4706,
1583,
29889,
25162,
353,
343,
8807,
13,
13,
4706,
1583,
29889,
28120,
580,
13,
13,
1678,
822,
9677,
29918,
1482,
29918,
3126,
29898,
1311,
29892,
716,
29918,
3126,
1125,
13,
4706,
565,
1583,
29889,
5552,
29901,
13,
9651,
731,
5552,
29898,
1311,
29889,
3188,
29892,
1583,
29889,
5552,
29892,
716,
29918,
3126,
29897,
13,
13,
4706,
565,
1583,
29889,
14035,
29918,
978,
29901,
13,
9651,
679,
5552,
29898,
1311,
29889,
3188,
29892,
1583,
29889,
14035,
29918,
978,
29892,
6213,
5033,
1482,
29918,
3126,
29897,
13,
13,
1678,
822,
19763,
29898,
1311,
1125,
13,
4706,
716,
29918,
3126,
353,
6571,
13,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
1311,
29889,
12083,
1125,
13,
9651,
1583,
29889,
1028,
949,
29918,
1482,
29918,
3126,
29898,
1482,
29918,
3126,
29897,
13,
9651,
736,
13,
13,
4706,
396,
8363,
13,
4706,
16495,
29918,
517,
29918,
16192,
353,
518,
1311,
29889,
12083,
29962,
13,
13,
4706,
396,
8363,
1051,
310,
16495,
393,
1712,
10585,
13,
4706,
363,
285,
297,
2897,
29889,
1761,
3972,
29898,
1311,
29889,
12083,
1125,
13,
9651,
565,
285,
1275,
525,
18279,
2396,
13,
18884,
6773,
13,
13,
9651,
2989,
29918,
978,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
12083,
29892,
285,
29897,
13,
9651,
565,
2897,
29889,
2084,
29889,
275,
3972,
29898,
8159,
29918,
978,
1125,
13,
18884,
16495,
29918,
517,
29918,
16192,
29889,
4397,
29898,
8159,
29918,
978,
29897,
13,
13,
4706,
396,
8363,
3935,
10585,
13,
4706,
363,
4138,
297,
16495,
29918,
517,
29918,
16192,
29901,
13,
9651,
363,
285,
297,
2897,
29889,
1761,
3972,
29898,
12083,
1125,
13,
18884,
2989,
29918,
978,
353,
2897,
29889,
2084,
29889,
7122,
29898,
12083,
29892,
285,
29897,
13,
18884,
565,
2897,
29889,
2084,
29889,
275,
1445,
29898,
8159,
29918,
978,
1125,
13,
462,
1678,
313,
1062,
978,
29892,
1294,
29897,
353,
2897,
29889,
2084,
29889,
23579,
568,
486,
29898,
8159,
29918,
978,
29897,
13,
462,
1678,
565,
1294,
29889,
13609,
580,
451,
297,
518,
4286,
3126,
742,
15300,
25162,
2033,
29901,
13,
462,
4706,
6773,
13,
13,
462,
1678,
396,
1423,
363,
23466,
29899,
14940,
6081,
13,
462,
1678,
565,
1583,
29889,
1062,
29901,
13,
462,
4706,
1024,
29892,
1294,
353,
2897,
29889,
2084,
29889,
23579,
568,
486,
29898,
1062,
978,
29897,
13,
462,
4706,
11451,
1445,
353,
22372,
3227,
29913,
4286,
4830,
12839,
4286,
7122,
29898,
978,
29889,
5451,
29898,
359,
29889,
19570,
8243,
1583,
29889,
1062,
29897,
13,
13,
462,
4706,
396,
451,
2289,
1749,
3883,
13,
462,
4706,
565,
1294,
2804,
2897,
29889,
1062,
19570,
718,
1583,
29889,
1062,
29901,
13,
462,
9651,
6773,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
1024,
29892,
1294,
353,
1294,
978,
29892,
6629,
13,
462,
4706,
11451,
1445,
353,
15300,
4286,
7122,
29898,
978,
29961,
29906,
29901,
1822,
5451,
29898,
359,
29889,
19570,
876,
13,
13,
462,
1678,
396,
6058,
29923,
29901,
445,
338,
2294,
29892,
322,
393,
338,
4319,
13,
462,
1678,
11451,
1445,
353,
11451,
1445,
29889,
29880,
17010,
877,
636,
7576,
29889,
1495,
13,
13,
462,
1678,
396,
11451,
934,
13,
462,
1678,
565,
1583,
29889,
25162,
29901,
13,
462,
4706,
1018,
29901,
13,
462,
9651,
3883,
353,
1053,
1982,
29889,
5215,
29918,
5453,
29898,
2272,
1445,
29897,
13,
462,
9651,
2411,
29889,
28120,
29898,
5453,
29897,
29871,
396,
577,
337,
13234,
1736,
13,
462,
4706,
396,
591,
881,
10446,
445,
322,
1962,
4436,
304,
380,
20405,
13,
462,
4706,
5174,
29901,
13,
462,
9651,
1209,
13,
13,
462,
1678,
396,
343,
8807,
847,
4390,
13,
462,
1678,
411,
1722,
29898,
8159,
29918,
978,
29892,
8025,
2433,
9420,
29899,
29947,
1495,
408,
6965,
29918,
29888,
29901,
13,
462,
4706,
565,
1583,
29889,
25162,
29901,
13,
462,
9651,
1018,
29901,
13,
462,
18884,
5235,
353,
343,
8807,
29889,
1359,
29898,
1315,
29918,
29888,
29889,
949,
3285,
4309,
1664,
29922,
25162,
29889,
13658,
10036,
29897,
13,
462,
9651,
396,
591,
881,
10446,
445,
322,
1962,
4436,
304,
380,
20405,
13,
462,
9651,
5174,
8960,
408,
429,
29901,
13,
462,
18884,
1596,
877,
26061,
304,
2254,
612,
23956,
934,
742,
2989,
29918,
978,
29892,
525,
29901,
742,
429,
29897,
13,
462,
18884,
6773,
13,
462,
4706,
1683,
29901,
13,
462,
9651,
5235,
353,
4390,
29889,
18132,
29898,
1315,
29918,
29888,
29889,
949,
3101,
13,
13,
462,
1678,
396,
731,
3883,
1024,
322,
5235,
13,
462,
1678,
565,
525,
978,
29915,
451,
297,
5235,
29901,
13,
462,
4706,
716,
29918,
978,
353,
1024,
29889,
5451,
11219,
1495,
14352,
29896,
1822,
5451,
877,
1966,
1495,
14352,
29896,
29962,
13,
462,
4706,
5235,
1839,
978,
2033,
353,
518,
1482,
29918,
978,
29962,
13,
13,
462,
1678,
716,
29918,
3126,
29961,
3888,
1839,
978,
2033,
29961,
29900,
5262,
353,
5235,
13,
13,
4706,
396,
731,
5235,
373,
2967,
1203,
322,
847,
470,
1246,
6939,
13,
4706,
1583,
29889,
1028,
949,
29918,
1482,
29918,
3126,
29898,
1482,
29918,
3126,
29897,
13,
13,
13,
29937,
5335,
287,
2554,
3168,
13,
29918,
1594,
29918,
710,
29918,
1958,
353,
518,
13,
1678,
6702,
29881,
742,
525,
16700,
5477,
13,
1678,
6702,
29882,
742,
525,
29882,
2470,
5477,
13,
1678,
6702,
29885,
742,
525,
1195,
2667,
5477,
13,
1678,
6702,
29879,
742,
525,
23128,
5477,
13,
29962,
13,
13,
29918,
710,
29918,
1594,
353,
364,
4907,
13,
1454,
338,
509,
29892,
22599,
297,
903,
1594,
29918,
710,
29918,
1958,
29901,
13,
1678,
903,
710,
29918,
1594,
4619,
364,
12764,
29879,
29930,
10780,
5919,
29973,
29925,
26717,
718,
22599,
718,
364,
11041,
29961,
29900,
29899,
29929,
10062,
2144,
29879,
29930,
29915,
718,
338,
509,
718,
364,
1495,
17901,
13,
13,
29918,
24495,
29918,
10810,
29918,
1525,
1692,
29990,
353,
337,
29889,
12198,
7373,
710,
29918,
1594,
29897,
13,
13,
13,
1753,
5335,
287,
2554,
29918,
517,
29918,
1807,
29898,
4181,
1125,
13,
1678,
9995,
1168,
369,
1372,
263,
5335,
287,
2554,
9657,
304,
263,
1347,
1213,
15945,
13,
1678,
22599,
29918,
1807,
353,
6629,
13,
1678,
363,
338,
509,
29892,
22599,
297,
903,
1594,
29918,
710,
29918,
1958,
29901,
13,
4706,
565,
22599,
297,
19471,
29901,
13,
9651,
22599,
29918,
1807,
4619,
851,
29898,
4181,
29961,
1594,
2314,
13,
9651,
22599,
29918,
1807,
4619,
338,
509,
13,
13,
1678,
736,
22599,
29918,
1807,
13,
13,
13,
1753,
1347,
29918,
517,
29918,
9346,
287,
2554,
29898,
1594,
29918,
1807,
1125,
13,
1678,
9995,
1168,
369,
1372,
263,
1347,
304,
263,
5335,
287,
2554,
9657,
1213,
15945,
13,
1678,
1993,
353,
903,
24495,
29918,
10810,
29918,
1525,
1692,
29990,
29889,
4352,
29898,
1594,
29918,
1807,
29897,
13,
1678,
19471,
353,
6571,
13,
1678,
363,
338,
509,
29892,
22599,
297,
903,
1594,
29918,
710,
29918,
1958,
29901,
13,
4706,
565,
1993,
29889,
2972,
29898,
1594,
1125,
13,
9651,
565,
525,
6169,
297,
1993,
29889,
2972,
29898,
1594,
1125,
13,
18884,
659,
353,
5785,
29898,
4352,
29889,
2972,
29898,
1594,
876,
13,
9651,
1683,
29901,
13,
18884,
659,
353,
938,
29898,
4352,
29889,
2972,
29898,
1594,
876,
13,
9651,
19471,
29961,
1594,
29962,
353,
659,
13,
1678,
736,
19471,
13,
13,
13,
29937,
2224,
13,
1753,
788,
29918,
2084,
29898,
2084,
1125,
13,
1678,
565,
2224,
451,
297,
10876,
29889,
2084,
29901,
13,
4706,
10876,
29889,
2084,
29889,
7851,
29898,
29900,
29892,
2224,
29897,
13,
2
] |
teams/api/views/teams_views.py | Onlynfk/Freshdesk-CRM-Platform | 0 | 174964 | <filename>teams/api/views/teams_views.py
from rest_framework import generics
from rest_framework.permissions import IsAuthenticated
from teams.api.serializers.teams_serializers import TeamSerializer
from teams.models import Teams
class TeamAPIList(generics.ListAPIView):
permission_classes = [IsAuthenticated]
queryset = Teams.objects.all().order_by('-created_on')
serializer_class = TeamSerializer
class CreateTeam(generics.CreateAPIView):
permission_classes = [IsAuthenticated]
queryset = Teams.objects.all()
serializer_class = TeamSerializer
class UpdateTeam(generics.UpdateAPIView):
permission_classes = [IsAuthenticated]
queryset = Teams.objects.all()
serializer_class = TeamSerializer
class RetrieveTeam(generics.RetrieveAPIView):
permission_classes = [IsAuthenticated]
queryset = Teams.objects.all()
serializer_class = TeamSerializer
class DestroyTeam(generics.DestroyAPIView):
permission_classes = [IsAuthenticated]
queryset = Teams.objects.all()
serializer_class = TeamSerializer
| [
1,
529,
9507,
29958,
371,
2232,
29914,
2754,
29914,
7406,
29914,
371,
2232,
29918,
7406,
29889,
2272,
13,
3166,
1791,
29918,
4468,
1053,
1176,
1199,
30004,
13,
3166,
1791,
29918,
4468,
29889,
17858,
6847,
1053,
1317,
6444,
4173,
630,
30004,
13,
3166,
10907,
29889,
2754,
29889,
15550,
19427,
29889,
371,
2232,
29918,
15550,
19427,
1053,
8583,
17679,
30004,
13,
3166,
10907,
29889,
9794,
1053,
23570,
30004,
13,
30004,
13,
30004,
13,
1990,
8583,
8787,
1293,
29898,
4738,
1199,
29889,
1293,
8787,
1043,
1125,
30004,
13,
1678,
10751,
29918,
13203,
353,
518,
3624,
6444,
4173,
630,
29962,
30004,
13,
1678,
2346,
842,
353,
23570,
29889,
12650,
29889,
497,
2141,
2098,
29918,
1609,
877,
29899,
11600,
29918,
265,
1495,
30004,
13,
1678,
7797,
3950,
29918,
1990,
353,
8583,
17679,
30004,
13,
30004,
13,
30004,
13,
1990,
6204,
19409,
29898,
4738,
1199,
29889,
4391,
8787,
1043,
1125,
30004,
13,
1678,
10751,
29918,
13203,
353,
518,
3624,
6444,
4173,
630,
29962,
30004,
13,
1678,
2346,
842,
353,
23570,
29889,
12650,
29889,
497,
26471,
13,
1678,
7797,
3950,
29918,
1990,
353,
8583,
17679,
30004,
13,
30004,
13,
30004,
13,
1990,
10318,
19409,
29898,
4738,
1199,
29889,
6422,
8787,
1043,
1125,
30004,
13,
1678,
10751,
29918,
13203,
353,
518,
3624,
6444,
4173,
630,
29962,
30004,
13,
1678,
2346,
842,
353,
23570,
29889,
12650,
29889,
497,
26471,
13,
1678,
7797,
3950,
29918,
1990,
353,
8583,
17679,
30004,
13,
30004,
13,
30004,
13,
1990,
4649,
29878,
2418,
19409,
29898,
4738,
1199,
29889,
8015,
29878,
2418,
8787,
1043,
1125,
30004,
13,
1678,
10751,
29918,
13203,
353,
518,
3624,
6444,
4173,
630,
29962,
30004,
13,
1678,
2346,
842,
353,
23570,
29889,
12650,
29889,
497,
26471,
13,
1678,
7797,
3950,
29918,
1990,
353,
8583,
17679,
30004,
13,
30004,
13,
30004,
13,
1990,
15435,
4727,
19409,
29898,
4738,
1199,
29889,
14994,
4727,
8787,
1043,
1125,
30004,
13,
1678,
10751,
29918,
13203,
353,
518,
3624,
6444,
4173,
630,
29962,
30004,
13,
1678,
2346,
842,
353,
23570,
29889,
12650,
29889,
497,
26471,
13,
1678,
7797,
3950,
29918,
1990,
353,
8583,
17679,
30004,
13,
2
] |
examples/vanilla/multiple_defaults_vs_ar.py | pfistfl/openml-defaults | 1 | 63638 | import arff
import argparse
import json
import logging
import numpy as np
import openmlcontrib
import openmldefaults
import os
import pandas as pd
# SSHFS NEMO FREIBURG:
# sshfs <EMAIL>:/rigel/home/jv2657/experiments ~/habanero_experiments
#
# SSHFS GRACE LEIDEN:
# ssh -f -N -L 1233:grace.liacs.nl:22 <EMAIL>
# sshfs -p 1233 vanrijn@localhost:/home/vanrijn/experiments ~/grace_experiments
def parse_args():
metadata_file_text_classification = os.path.expanduser('../../data/text_classification.arff')
parser = argparse.ArgumentParser(description='Creates an ARFF file')
parser.add_argument('--output_directory', type=str, help='directory to store output',
default=os.path.expanduser('~/experiments/openml-defaults/at_vs_ar/'))
parser.add_argument('--task_idx', type=int)
parser.add_argument('--metadata_files', type=str, nargs='+', default=[metadata_file_text_classification])
parser.add_argument('--scoring', type=str, default='missclassification_rate')
parser.add_argument('--search_space_identifier', type=str, default='ferreira')
parser.add_argument('--minimize', action='store_true', default=True)
parser.add_argument('--normalize_base', type=str, default=None)
parser.add_argument('--normalize_a3r', type=str, default=None)
parser.add_argument('--a3r_r', type=int, default=2)
parser.add_argument('--aggregate', type=str, choices=openmldefaults.experiments.AGGREGATES, default='sum')
parser.add_argument('--n_defaults', type=int, default=384)
parser.add_argument('--n_estimators', type=int, default=64)
parser.add_argument('--minimum_evals', type=int, default=128)
parser.add_argument('--random_iterations', type=int, default=1)
parser.add_argument('--run_on_surrogates', action='store_true', default=True)
parser.add_argument('--task_limit', type=int, default=None, help='For speed')
parser.add_argument('--task_id_column', default='dataset', type=str)
parser.add_argument('--override_parameters', type=str)
args_ = parser.parse_args()
return args_
def run(args):
root = logging.getLogger()
root.setLevel(logging.INFO)
task_ids = None
for arff_file in args.metadata_files:
with open(arff_file, 'r') as fp:
df = openmlcontrib.meta.arff_to_dataframe(arff.load(fp), None)
if task_ids is None:
task_ids = np.sort(np.unique(df[args.task_id_column].values))
else:
task_ids = np.sort(np.unique(np.append(task_ids, df[args.task_id_column].values)))
logging.info('Task ids: %s' % task_ids)
if args.task_idx is None:
task_ids_to_process = task_ids
else:
task_ids_to_process = [task_ids[args.task_idx]]
# run random search
for random_seed in range(args.random_iterations):
for task_id in task_ids_to_process:
openmldefaults.experiments.run_vanilla_surrogates_on_task(
task_id=task_id,
models=[openmldefaults.models.AverageRankDefaults(), openmldefaults.models.ActiveTestingDefaults()],
use_surrogates=False,
random_seed=random_seed,
search_space_identifier=args.search_space_identifier,
metadata_files=args.metadata_files,
scoring=args.scoring,
minimize_measure=args.minimize,
n_defaults=args.n_defaults,
aggregate=args.aggregate,
a3r_r=args.a3r_r,
normalize_base=args.normalize_base,
normalize_a3r=args.normalize_a3r,
surrogate_n_estimators=args.n_estimators,
surrogate_minimum_evals=args.minimum_evals,
runtime_column='runtime',
consider_a3r=True,
evaluate_on_surrogate=args.run_on_surrogates,
task_limit=args.task_limit,
output_directory=args.output_directory,
task_id_column=args.task_id_column,
skip_row_check=True,
override_parameters=json.loads(args.override_parameters) if args.override_parameters else None
)
if __name__ == '__main__':
pd.options.mode.chained_assignment = 'raise'
run(parse_args())
| [
1,
1053,
564,
600,
13,
5215,
1852,
5510,
13,
5215,
4390,
13,
5215,
12183,
13,
5215,
12655,
408,
7442,
13,
5215,
1722,
828,
21570,
13,
5215,
1722,
828,
4381,
29879,
13,
5215,
2897,
13,
5215,
11701,
408,
10518,
13,
13,
13,
29937,
22343,
9998,
14693,
6720,
383,
1525,
8979,
4574,
29954,
29901,
13,
29937,
13927,
5847,
529,
26862,
6227,
29958,
8419,
8966,
295,
29914,
5184,
29914,
29926,
29894,
29906,
29953,
29945,
29955,
29914,
735,
546,
7862,
3695,
29914,
7308,
273,
1489,
29918,
735,
546,
7862,
13,
29937,
13,
29937,
22343,
9998,
18016,
11538,
11060,
1367,
1430,
29901,
13,
29937,
13927,
448,
29888,
448,
29940,
448,
29931,
29871,
29896,
29906,
29941,
29941,
29901,
3874,
346,
29889,
4456,
2395,
29889,
12938,
29901,
29906,
29906,
529,
26862,
6227,
29958,
13,
29937,
13927,
5847,
448,
29886,
29871,
29896,
29906,
29941,
29941,
1109,
4927,
29876,
29992,
7640,
8419,
5184,
29914,
3703,
4927,
29876,
29914,
735,
546,
7862,
3695,
29914,
3874,
346,
29918,
735,
546,
7862,
13,
1753,
6088,
29918,
5085,
7295,
13,
1678,
15562,
29918,
1445,
29918,
726,
29918,
1990,
2450,
353,
2897,
29889,
2084,
29889,
18837,
1792,
877,
21546,
1272,
29914,
726,
29918,
1990,
2450,
29889,
279,
600,
1495,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
29898,
8216,
2433,
9832,
1078,
385,
9033,
4198,
934,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
4905,
29918,
12322,
742,
1134,
29922,
710,
29892,
1371,
2433,
12322,
304,
3787,
1962,
742,
13,
462,
4706,
2322,
29922,
359,
29889,
2084,
29889,
18837,
1792,
877,
20038,
735,
546,
7862,
29914,
3150,
828,
29899,
4381,
29879,
29914,
271,
29918,
4270,
29918,
279,
29914,
8785,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
7662,
29918,
13140,
742,
1134,
29922,
524,
29897,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
19635,
29918,
5325,
742,
1134,
29922,
710,
29892,
302,
5085,
2433,
29974,
742,
2322,
11759,
19635,
29918,
1445,
29918,
726,
29918,
1990,
2450,
2314,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
1557,
8253,
742,
1134,
29922,
710,
29892,
2322,
2433,
9894,
1990,
2450,
29918,
10492,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
4478,
29918,
3493,
29918,
25378,
742,
1134,
29922,
710,
29892,
2322,
2433,
571,
276,
3055,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
1195,
326,
675,
742,
3158,
2433,
8899,
29918,
3009,
742,
2322,
29922,
5574,
29897,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
8945,
675,
29918,
3188,
742,
1134,
29922,
710,
29892,
2322,
29922,
8516,
29897,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
8945,
675,
29918,
29874,
29941,
29878,
742,
1134,
29922,
710,
29892,
2322,
29922,
8516,
29897,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
29874,
29941,
29878,
29918,
29878,
742,
1134,
29922,
524,
29892,
2322,
29922,
29906,
29897,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
26193,
403,
742,
1134,
29922,
710,
29892,
19995,
29922,
3150,
828,
4381,
29879,
29889,
735,
546,
7862,
29889,
10051,
29954,
18166,
1299,
2890,
29892,
2322,
2433,
2083,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
29876,
29918,
4381,
29879,
742,
1134,
29922,
524,
29892,
2322,
29922,
29941,
29947,
29946,
29897,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
29876,
29918,
342,
326,
4097,
742,
1134,
29922,
524,
29892,
2322,
29922,
29953,
29946,
29897,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
1195,
12539,
29918,
14513,
29879,
742,
1134,
29922,
524,
29892,
2322,
29922,
29896,
29906,
29947,
29897,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
8172,
29918,
1524,
800,
742,
1134,
29922,
524,
29892,
2322,
29922,
29896,
29897,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
3389,
29918,
265,
29918,
7610,
9102,
1078,
742,
3158,
2433,
8899,
29918,
3009,
742,
2322,
29922,
5574,
29897,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
7662,
29918,
13400,
742,
1134,
29922,
524,
29892,
2322,
29922,
8516,
29892,
1371,
2433,
2831,
6210,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
7662,
29918,
333,
29918,
4914,
742,
2322,
2433,
24713,
742,
1134,
29922,
710,
29897,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
15752,
29918,
16744,
742,
1134,
29922,
710,
29897,
13,
1678,
6389,
29918,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
1678,
736,
6389,
29918,
13,
13,
13,
1753,
1065,
29898,
5085,
1125,
13,
1678,
3876,
353,
12183,
29889,
657,
16363,
580,
13,
1678,
3876,
29889,
842,
10108,
29898,
21027,
29889,
11690,
29897,
13,
13,
1678,
3414,
29918,
4841,
353,
6213,
13,
1678,
363,
564,
600,
29918,
1445,
297,
6389,
29889,
19635,
29918,
5325,
29901,
13,
4706,
411,
1722,
29898,
279,
600,
29918,
1445,
29892,
525,
29878,
1495,
408,
285,
29886,
29901,
13,
9651,
4489,
353,
1722,
828,
21570,
29889,
7299,
29889,
279,
600,
29918,
517,
29918,
1272,
2557,
29898,
279,
600,
29889,
1359,
29898,
18091,
511,
6213,
29897,
13,
9651,
565,
3414,
29918,
4841,
338,
6213,
29901,
13,
18884,
3414,
29918,
4841,
353,
7442,
29889,
6605,
29898,
9302,
29889,
13092,
29898,
2176,
29961,
5085,
29889,
7662,
29918,
333,
29918,
4914,
1822,
5975,
876,
13,
9651,
1683,
29901,
13,
18884,
3414,
29918,
4841,
353,
7442,
29889,
6605,
29898,
9302,
29889,
13092,
29898,
9302,
29889,
4397,
29898,
7662,
29918,
4841,
29892,
4489,
29961,
5085,
29889,
7662,
29918,
333,
29918,
4914,
1822,
5975,
4961,
13,
1678,
12183,
29889,
3888,
877,
5398,
18999,
29901,
1273,
29879,
29915,
1273,
3414,
29918,
4841,
29897,
13,
1678,
565,
6389,
29889,
7662,
29918,
13140,
338,
6213,
29901,
13,
4706,
3414,
29918,
4841,
29918,
517,
29918,
5014,
353,
3414,
29918,
4841,
13,
1678,
1683,
29901,
13,
4706,
3414,
29918,
4841,
29918,
517,
29918,
5014,
353,
518,
7662,
29918,
4841,
29961,
5085,
29889,
7662,
29918,
13140,
5262,
13,
13,
1678,
396,
1065,
4036,
2740,
13,
1678,
363,
4036,
29918,
26776,
297,
3464,
29898,
5085,
29889,
8172,
29918,
1524,
800,
1125,
13,
13,
4706,
363,
3414,
29918,
333,
297,
3414,
29918,
4841,
29918,
517,
29918,
5014,
29901,
13,
9651,
1722,
828,
4381,
29879,
29889,
735,
546,
7862,
29889,
3389,
29918,
3703,
2911,
29918,
7610,
9102,
1078,
29918,
265,
29918,
7662,
29898,
13,
18884,
3414,
29918,
333,
29922,
7662,
29918,
333,
29892,
13,
18884,
4733,
11759,
3150,
828,
4381,
29879,
29889,
9794,
29889,
29909,
19698,
29934,
804,
24863,
3285,
1722,
828,
4381,
29879,
29889,
9794,
29889,
9966,
3057,
292,
24863,
580,
1402,
13,
18884,
671,
29918,
7610,
9102,
1078,
29922,
8824,
29892,
13,
18884,
4036,
29918,
26776,
29922,
8172,
29918,
26776,
29892,
13,
18884,
2740,
29918,
3493,
29918,
25378,
29922,
5085,
29889,
4478,
29918,
3493,
29918,
25378,
29892,
13,
18884,
15562,
29918,
5325,
29922,
5085,
29889,
19635,
29918,
5325,
29892,
13,
18884,
26654,
29922,
5085,
29889,
1557,
8253,
29892,
13,
18884,
6260,
675,
29918,
26658,
29922,
5085,
29889,
1195,
326,
675,
29892,
13,
18884,
302,
29918,
4381,
29879,
29922,
5085,
29889,
29876,
29918,
4381,
29879,
29892,
13,
18884,
20431,
29922,
5085,
29889,
26193,
403,
29892,
13,
18884,
263,
29941,
29878,
29918,
29878,
29922,
5085,
29889,
29874,
29941,
29878,
29918,
29878,
29892,
13,
18884,
4226,
675,
29918,
3188,
29922,
5085,
29889,
8945,
675,
29918,
3188,
29892,
13,
18884,
4226,
675,
29918,
29874,
29941,
29878,
29922,
5085,
29889,
8945,
675,
29918,
29874,
29941,
29878,
29892,
13,
18884,
1190,
9102,
403,
29918,
29876,
29918,
342,
326,
4097,
29922,
5085,
29889,
29876,
29918,
342,
326,
4097,
29892,
13,
18884,
1190,
9102,
403,
29918,
1195,
12539,
29918,
14513,
29879,
29922,
5085,
29889,
1195,
12539,
29918,
14513,
29879,
29892,
13,
18884,
10073,
29918,
4914,
2433,
15634,
742,
13,
18884,
2050,
29918,
29874,
29941,
29878,
29922,
5574,
29892,
13,
18884,
14707,
29918,
265,
29918,
7610,
9102,
403,
29922,
5085,
29889,
3389,
29918,
265,
29918,
7610,
9102,
1078,
29892,
13,
18884,
3414,
29918,
13400,
29922,
5085,
29889,
7662,
29918,
13400,
29892,
13,
18884,
1962,
29918,
12322,
29922,
5085,
29889,
4905,
29918,
12322,
29892,
13,
18884,
3414,
29918,
333,
29918,
4914,
29922,
5085,
29889,
7662,
29918,
333,
29918,
4914,
29892,
13,
18884,
14383,
29918,
798,
29918,
3198,
29922,
5574,
29892,
13,
18884,
5712,
29918,
16744,
29922,
3126,
29889,
18132,
29898,
5085,
29889,
15752,
29918,
16744,
29897,
565,
6389,
29889,
15752,
29918,
16744,
1683,
6213,
13,
9651,
1723,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
10518,
29889,
6768,
29889,
8513,
29889,
305,
7114,
29918,
465,
10194,
353,
525,
22692,
29915,
13,
1678,
1065,
29898,
5510,
29918,
5085,
3101,
13,
2
] |
exps/algos-v2/bohb.py | PeterouZh/AutoDL-Projects | 0 | 86761 | ##################################################
# Copyright (c) <NAME> [GitHub D-X-Y], 2020 #
###################################################################
# BOHB: Robust and Efficient Hyperparameter Optimization at Scale #
# required to install hpbandster ##################################
# pip install hpbandster ##################################
###################################################################
# OMP_NUM_THREADS=4 python exps/algos-v2/bohb.py --search_space tss --dataset cifar10 --num_samples 4 --random_fraction 0.0 --bandwidth_factor 3 --rand_seed 1
# OMP_NUM_THREADS=4 python exps/algos-v2/bohb.py --search_space sss --dataset cifar10 --num_samples 4 --random_fraction 0.0 --bandwidth_factor 3 --rand_seed 1
###################################################################
import os, sys, time, random, argparse, collections
from copy import deepcopy
from pathlib import Path
import torch
lib_dir = (Path(__file__).parent / '..' / '..' / 'lib').resolve()
if str(lib_dir) not in sys.path: sys.path.insert(0, str(lib_dir))
from config_utils import load_config
from datasets import get_datasets, SearchDataset
from procedures import prepare_seed, prepare_logger
from log_utils import AverageMeter, time_string, convert_secs2time
from nas_201_api import NASBench201API, NASBench301API
from models import CellStructure, get_search_spaces
# BOHB: Robust and Efficient Hyperparameter Optimization at Scale, ICML 2018
import ConfigSpace
from hpbandster.optimizers.bohb import BOHB
import hpbandster.core.nameserver as hpns
from hpbandster.core.worker import Worker
def get_topology_config_space(search_space, max_nodes=4):
cs = ConfigSpace.ConfigurationSpace()
#edge2index = {}
for i in range(1, max_nodes):
for j in range(i):
node_str = '{:}<-{:}'.format(i, j)
cs.add_hyperparameter(ConfigSpace.CategoricalHyperparameter(node_str, search_space))
return cs
def get_size_config_space(search_space):
cs = ConfigSpace.ConfigurationSpace()
for ilayer in range(search_space['numbers']):
node_str = 'layer-{:}'.format(ilayer)
cs.add_hyperparameter(ConfigSpace.CategoricalHyperparameter(node_str, search_space['candidates']))
return cs
def config2topology_func(max_nodes=4):
def config2structure(config):
genotypes = []
for i in range(1, max_nodes):
xlist = []
for j in range(i):
node_str = '{:}<-{:}'.format(i, j)
op_name = config[node_str]
xlist.append((op_name, j))
genotypes.append( tuple(xlist) )
return CellStructure( genotypes )
return config2structure
def config2size_func(search_space):
def config2structure(config):
channels = []
for ilayer in range(search_space['numbers']):
node_str = 'layer-{:}'.format(ilayer)
channels.append(str(config[node_str]))
return ':'.join(channels)
return config2structure
class MyWorker(Worker):
def __init__(self, *args, convert_func=None, dataset=None, api=None, **kwargs):
super().__init__(*args, **kwargs)
self.convert_func = convert_func
self._dataset = dataset
self._api = api
self.total_times = []
self.trajectory = []
def compute(self, config, budget, **kwargs):
arch = self.convert_func( config )
accuracy, latency, time_cost, total_time = self._api.simulate_train_eval(arch, self._dataset, iepoch=int(budget)-1, hp='12')
self.trajectory.append((accuracy, arch))
self.total_times.append(total_time)
return ({'loss': 100 - accuracy,
'info': self._api.query_index_by_arch(arch)})
def main(xargs, api):
torch.set_num_threads(4)
prepare_seed(xargs.rand_seed)
logger = prepare_logger(args)
logger.log('{:} use api : {:}'.format(time_string(), api))
api.reset_time()
search_space = get_search_spaces(xargs.search_space, 'nas-bench-301')
if xargs.search_space == 'tss':
cs = get_topology_config_space(search_space)
config2structure = config2topology_func()
else:
cs = get_size_config_space(search_space)
config2structure = config2size_func(search_space)
hb_run_id = '0'
NS = hpns.NameServer(run_id=hb_run_id, host='localhost', port=0)
ns_host, ns_port = NS.start()
num_workers = 1
workers = []
for i in range(num_workers):
w = MyWorker(nameserver=ns_host, nameserver_port=ns_port, convert_func=config2structure, dataset=xargs.dataset, api=api, run_id=hb_run_id, id=i)
w.run(background=True)
workers.append(w)
start_time = time.time()
bohb = BOHB(configspace=cs, run_id=hb_run_id,
eta=3, min_budget=1, max_budget=12,
nameserver=ns_host,
nameserver_port=ns_port,
num_samples=xargs.num_samples,
random_fraction=xargs.random_fraction, bandwidth_factor=xargs.bandwidth_factor,
ping_interval=10, min_bandwidth=xargs.min_bandwidth)
results = bohb.run(xargs.n_iters, min_n_workers=num_workers)
bohb.shutdown(shutdown_workers=True)
NS.shutdown()
# print('There are {:} runs.'.format(len(results.get_all_runs())))
# workers[0].total_times
# workers[0].trajectory
current_best_index = []
for idx in range(len(workers[0].trajectory)):
trajectory = workers[0].trajectory[:idx+1]
arch = max(trajectory, key=lambda x: x[0])[1]
current_best_index.append(api.query_index_by_arch(arch))
best_arch = max(workers[0].trajectory, key=lambda x: x[0])[1]
logger.log('Best found configuration: {:} within {:.3f} s'.format(best_arch, workers[0].total_times[-1]))
info = api.query_info_str_by_arch(best_arch, '200' if xargs.search_space == 'tss' else '90')
logger.log('{:}'.format(info))
logger.log('-'*100)
logger.close()
return logger.log_dir, current_best_index, workers[0].total_times
if __name__ == '__main__':
parser = argparse.ArgumentParser("BOHB: Robust and Efficient Hyperparameter Optimization at Scale")
parser.add_argument('--dataset', type=str, choices=['cifar10', 'cifar100', 'ImageNet16-120'], help='Choose between Cifar10/100 and ImageNet-16.')
# general arg
parser.add_argument('--search_space', type=str, choices=['tss', 'sss'], help='Choose the search space.')
parser.add_argument('--time_budget', type=int, default=20000, help='The total time cost budge for searching (in seconds).')
parser.add_argument('--loops_if_rand', type=int, default=500, help='The total runs for evaluation.')
# BOHB
parser.add_argument('--strategy', default="sampling", type=str, nargs='?', help='optimization strategy for the acquisition function')
parser.add_argument('--min_bandwidth', default=.3, type=float, nargs='?', help='minimum bandwidth for KDE')
parser.add_argument('--num_samples', default=64, type=int, nargs='?', help='number of samples for the acquisition function')
parser.add_argument('--random_fraction', default=.33, type=float, nargs='?', help='fraction of random configurations')
parser.add_argument('--bandwidth_factor', default=3, type=int, nargs='?', help='factor multiplied to the bandwidth')
parser.add_argument('--n_iters', default=300, type=int, nargs='?', help='number of iterations for optimization method')
# log
parser.add_argument('--save_dir', type=str, default='./output/search', help='Folder to save checkpoints and log.')
parser.add_argument('--rand_seed', type=int, default=-1, help='manual seed')
args = parser.parse_args()
if args.search_space == 'tss':
api = NASBench201API(verbose=False)
elif args.search_space == 'sss':
api = NASBench301API(verbose=False)
else:
raise ValueError('Invalid search space : {:}'.format(args.search_space))
args.save_dir = os.path.join('{:}-{:}'.format(args.save_dir, args.search_space), args.dataset, 'BOHB')
print('save-dir : {:}'.format(args.save_dir))
if args.rand_seed < 0:
save_dir, all_info = None, collections.OrderedDict()
for i in range(args.loops_if_rand):
print ('{:} : {:03d}/{:03d}'.format(time_string(), i, args.loops_if_rand))
args.rand_seed = random.randint(1, 100000)
save_dir, all_archs, all_total_times = main(args, api)
all_info[i] = {'all_archs': all_archs,
'all_total_times': all_total_times}
save_path = save_dir / 'results.pth'
print('save into {:}'.format(save_path))
torch.save(all_info, save_path)
else:
main(args, api)
| [
1,
835,
13383,
13383,
7346,
4136,
2277,
29937,
13,
29937,
14187,
1266,
313,
29883,
29897,
529,
5813,
29958,
518,
28712,
16046,
360,
29899,
29990,
29899,
29979,
1402,
29871,
29906,
29900,
29906,
29900,
396,
13,
13383,
13383,
13383,
13383,
2277,
29937,
13,
29937,
16437,
29950,
29933,
29901,
6417,
504,
322,
382,
4543,
26078,
15501,
20693,
326,
2133,
472,
2522,
744,
396,
13,
29937,
3734,
304,
2601,
298,
29886,
4980,
2475,
835,
13383,
7346,
4136,
2277,
29937,
13,
29937,
8450,
2601,
298,
29886,
4980,
2475,
308,
835,
13383,
7346,
4136,
2277,
29937,
13,
13383,
13383,
13383,
13383,
2277,
29937,
13,
29937,
438,
3580,
29918,
13967,
29918,
4690,
16310,
29903,
29922,
29946,
3017,
429,
567,
29914,
9564,
359,
29899,
29894,
29906,
29914,
833,
29882,
29890,
29889,
2272,
1192,
4478,
29918,
3493,
260,
893,
1192,
24713,
274,
361,
279,
29896,
29900,
1192,
1949,
29918,
27736,
29871,
29946,
1192,
8172,
29918,
29888,
13857,
29871,
29900,
29889,
29900,
1192,
4980,
2103,
29918,
19790,
29871,
29941,
1192,
9502,
29918,
26776,
29871,
29896,
13,
29937,
438,
3580,
29918,
13967,
29918,
4690,
16310,
29903,
29922,
29946,
3017,
429,
567,
29914,
9564,
359,
29899,
29894,
29906,
29914,
833,
29882,
29890,
29889,
2272,
1192,
4478,
29918,
3493,
269,
893,
1192,
24713,
274,
361,
279,
29896,
29900,
1192,
1949,
29918,
27736,
29871,
29946,
1192,
8172,
29918,
29888,
13857,
29871,
29900,
29889,
29900,
1192,
4980,
2103,
29918,
19790,
29871,
29941,
1192,
9502,
29918,
26776,
29871,
29896,
13,
13383,
13383,
13383,
13383,
2277,
29937,
13,
5215,
2897,
29892,
10876,
29892,
931,
29892,
4036,
29892,
1852,
5510,
29892,
16250,
13,
3166,
3509,
1053,
6483,
8552,
13,
3166,
2224,
1982,
1053,
10802,
13,
5215,
4842,
305,
13,
1982,
29918,
3972,
353,
313,
2605,
22168,
1445,
1649,
467,
3560,
847,
525,
636,
29915,
847,
525,
636,
29915,
847,
525,
1982,
2824,
17863,
580,
13,
361,
851,
29898,
1982,
29918,
3972,
29897,
451,
297,
10876,
29889,
2084,
29901,
10876,
29889,
2084,
29889,
7851,
29898,
29900,
29892,
851,
29898,
1982,
29918,
3972,
876,
13,
3166,
2295,
29918,
13239,
1053,
2254,
29918,
2917,
13,
3166,
20035,
268,
1053,
679,
29918,
14538,
1691,
29892,
11856,
16390,
24541,
13,
3166,
28648,
259,
1053,
19012,
29918,
26776,
29892,
19012,
29918,
21707,
13,
3166,
1480,
29918,
13239,
1678,
1053,
319,
19698,
29924,
1308,
29892,
931,
29918,
1807,
29892,
3588,
29918,
344,
2395,
29906,
2230,
13,
3166,
8281,
29918,
29906,
29900,
29896,
29918,
2754,
29871,
1053,
8598,
1744,
264,
305,
29906,
29900,
29896,
8787,
29892,
8598,
1744,
264,
305,
29941,
29900,
29896,
8787,
13,
3166,
4733,
539,
1053,
19413,
5015,
12425,
29892,
679,
29918,
4478,
29918,
22854,
13,
29937,
16437,
29950,
29933,
29901,
6417,
504,
322,
382,
4543,
26078,
15501,
20693,
326,
2133,
472,
2522,
744,
29892,
18340,
1988,
29871,
29906,
29900,
29896,
29947,
13,
5215,
12782,
14936,
13,
3166,
298,
29886,
4980,
2475,
29889,
20640,
19427,
29889,
833,
29882,
29890,
1053,
16437,
29950,
29933,
13,
5215,
298,
29886,
4980,
2475,
29889,
3221,
29889,
7039,
261,
369,
408,
298,
29886,
1983,
13,
3166,
298,
29886,
4980,
2475,
29889,
3221,
29889,
24602,
1053,
5244,
261,
13,
13,
13,
1753,
679,
29918,
3332,
3002,
29918,
2917,
29918,
3493,
29898,
4478,
29918,
3493,
29892,
4236,
29918,
18010,
29922,
29946,
1125,
13,
29871,
5939,
353,
12782,
14936,
29889,
8614,
14936,
580,
13,
29871,
396,
12864,
29906,
2248,
259,
353,
6571,
13,
29871,
363,
474,
297,
3464,
29898,
29896,
29892,
4236,
29918,
18010,
1125,
13,
1678,
363,
432,
297,
3464,
29898,
29875,
1125,
13,
418,
2943,
29918,
710,
353,
22372,
3854,
16406,
29912,
3854,
4286,
4830,
29898,
29875,
29892,
432,
29897,
13,
418,
5939,
29889,
1202,
29918,
24947,
15501,
29898,
3991,
14936,
29889,
29907,
20440,
936,
26322,
546,
15501,
29898,
3177,
29918,
710,
29892,
2740,
29918,
3493,
876,
13,
29871,
736,
5939,
13,
13,
13,
1753,
679,
29918,
2311,
29918,
2917,
29918,
3493,
29898,
4478,
29918,
3493,
1125,
13,
29871,
5939,
353,
12782,
14936,
29889,
8614,
14936,
580,
13,
29871,
363,
980,
2747,
297,
3464,
29898,
4478,
29918,
3493,
1839,
20326,
2033,
1125,
13,
1678,
2943,
29918,
710,
353,
525,
13148,
29899,
29912,
3854,
4286,
4830,
29898,
309,
2747,
29897,
13,
1678,
5939,
29889,
1202,
29918,
24947,
15501,
29898,
3991,
14936,
29889,
29907,
20440,
936,
26322,
546,
15501,
29898,
3177,
29918,
710,
29892,
2740,
29918,
3493,
1839,
29883,
5380,
1078,
25901,
13,
29871,
736,
5939,
13,
13,
13,
1753,
2295,
29906,
3332,
3002,
29918,
9891,
29898,
3317,
29918,
18010,
29922,
29946,
1125,
13,
29871,
822,
2295,
29906,
23905,
29898,
2917,
1125,
13,
1678,
2531,
327,
7384,
353,
5159,
13,
1678,
363,
474,
297,
3464,
29898,
29896,
29892,
4236,
29918,
18010,
1125,
13,
418,
921,
1761,
353,
5159,
13,
418,
363,
432,
297,
3464,
29898,
29875,
1125,
13,
4706,
2943,
29918,
710,
353,
22372,
3854,
16406,
29912,
3854,
4286,
4830,
29898,
29875,
29892,
432,
29897,
13,
4706,
1015,
29918,
978,
353,
2295,
29961,
3177,
29918,
710,
29962,
13,
4706,
921,
1761,
29889,
4397,
3552,
459,
29918,
978,
29892,
432,
876,
13,
418,
2531,
327,
7384,
29889,
4397,
29898,
18761,
29898,
29916,
1761,
29897,
1723,
13,
1678,
736,
19413,
5015,
12425,
29898,
2531,
327,
7384,
1723,
13,
29871,
736,
2295,
29906,
23905,
13,
13,
13,
1753,
2295,
29906,
2311,
29918,
9891,
29898,
4478,
29918,
3493,
1125,
13,
29871,
822,
2295,
29906,
23905,
29898,
2917,
1125,
13,
1678,
18196,
353,
5159,
13,
1678,
363,
980,
2747,
297,
3464,
29898,
4478,
29918,
3493,
1839,
20326,
2033,
1125,
13,
418,
2943,
29918,
710,
353,
525,
13148,
29899,
29912,
3854,
4286,
4830,
29898,
309,
2747,
29897,
13,
418,
18196,
29889,
4397,
29898,
710,
29898,
2917,
29961,
3177,
29918,
710,
12622,
13,
1678,
736,
525,
29901,
4286,
7122,
29898,
305,
12629,
29897,
13,
29871,
736,
2295,
29906,
23905,
13,
13,
13,
1990,
1619,
16164,
29898,
16164,
1125,
13,
13,
29871,
822,
4770,
2344,
12035,
1311,
29892,
334,
5085,
29892,
3588,
29918,
9891,
29922,
8516,
29892,
8783,
29922,
8516,
29892,
7882,
29922,
8516,
29892,
3579,
19290,
1125,
13,
1678,
2428,
2141,
1649,
2344,
1649,
10456,
5085,
29892,
3579,
19290,
29897,
13,
1678,
1583,
29889,
13441,
29918,
9891,
259,
353,
3588,
29918,
9891,
13,
1678,
1583,
3032,
24713,
539,
353,
8783,
13,
1678,
1583,
3032,
2754,
965,
353,
7882,
13,
1678,
1583,
29889,
7827,
29918,
3706,
1678,
353,
5159,
13,
1678,
1583,
29889,
3018,
622,
706,
268,
353,
5159,
13,
13,
29871,
822,
10272,
29898,
1311,
29892,
2295,
29892,
23562,
29892,
3579,
19290,
1125,
13,
1678,
3190,
29871,
353,
1583,
29889,
13441,
29918,
9891,
29898,
2295,
1723,
13,
1678,
13600,
29892,
23316,
1270,
29892,
931,
29918,
18253,
29892,
3001,
29918,
2230,
353,
1583,
3032,
2754,
29889,
3601,
5987,
29918,
14968,
29918,
14513,
29898,
1279,
29892,
1583,
3032,
24713,
29892,
19282,
1129,
305,
29922,
524,
29898,
15841,
657,
6817,
29896,
29892,
298,
29886,
2433,
29896,
29906,
1495,
13,
1678,
1583,
29889,
3018,
622,
706,
29889,
4397,
3552,
562,
2764,
4135,
29892,
3190,
876,
13,
1678,
1583,
29889,
7827,
29918,
3706,
29889,
4397,
29898,
7827,
29918,
2230,
29897,
13,
1678,
736,
313,
10998,
6758,
2396,
29871,
29896,
29900,
29900,
448,
13600,
29892,
13,
632,
525,
3888,
2396,
1583,
3032,
2754,
29889,
1972,
29918,
2248,
29918,
1609,
29918,
1279,
29898,
1279,
26972,
13,
13,
13,
1753,
1667,
29898,
29916,
5085,
29892,
7882,
1125,
13,
29871,
4842,
305,
29889,
842,
29918,
1949,
29918,
28993,
29898,
29946,
29897,
13,
29871,
19012,
29918,
26776,
29898,
29916,
5085,
29889,
9502,
29918,
26776,
29897,
13,
29871,
17927,
353,
19012,
29918,
21707,
29898,
5085,
29897,
13,
13,
29871,
17927,
29889,
1188,
877,
29912,
3854,
671,
7882,
584,
426,
3854,
4286,
4830,
29898,
2230,
29918,
1807,
3285,
7882,
876,
13,
29871,
7882,
29889,
12071,
29918,
2230,
580,
13,
29871,
2740,
29918,
3493,
353,
679,
29918,
4478,
29918,
22854,
29898,
29916,
5085,
29889,
4478,
29918,
3493,
29892,
525,
22911,
29899,
1785,
305,
29899,
29941,
29900,
29896,
1495,
13,
29871,
565,
921,
5085,
29889,
4478,
29918,
3493,
1275,
525,
29873,
893,
2396,
13,
1678,
5939,
353,
679,
29918,
3332,
3002,
29918,
2917,
29918,
3493,
29898,
4478,
29918,
3493,
29897,
13,
1678,
2295,
29906,
23905,
353,
2295,
29906,
3332,
3002,
29918,
9891,
580,
13,
29871,
1683,
29901,
13,
1678,
5939,
353,
679,
29918,
2311,
29918,
2917,
29918,
3493,
29898,
4478,
29918,
3493,
29897,
13,
1678,
2295,
29906,
23905,
353,
2295,
29906,
2311,
29918,
9891,
29898,
4478,
29918,
3493,
29897,
13,
259,
13,
29871,
298,
29890,
29918,
3389,
29918,
333,
353,
525,
29900,
29915,
13,
13,
29871,
3865,
353,
298,
29886,
1983,
29889,
1170,
6004,
29898,
3389,
29918,
333,
29922,
29882,
29890,
29918,
3389,
29918,
333,
29892,
3495,
2433,
7640,
742,
2011,
29922,
29900,
29897,
13,
29871,
17534,
29918,
3069,
29892,
17534,
29918,
637,
353,
3865,
29889,
2962,
580,
13,
29871,
954,
29918,
1287,
414,
353,
29871,
29896,
13,
13,
29871,
17162,
353,
5159,
13,
29871,
363,
474,
297,
3464,
29898,
1949,
29918,
1287,
414,
1125,
13,
1678,
281,
353,
1619,
16164,
29898,
7039,
261,
369,
29922,
1983,
29918,
3069,
29892,
2983,
261,
369,
29918,
637,
29922,
1983,
29918,
637,
29892,
3588,
29918,
9891,
29922,
2917,
29906,
23905,
29892,
8783,
29922,
29916,
5085,
29889,
24713,
29892,
7882,
29922,
2754,
29892,
1065,
29918,
333,
29922,
29882,
29890,
29918,
3389,
29918,
333,
29892,
1178,
29922,
29875,
29897,
13,
1678,
281,
29889,
3389,
29898,
7042,
29922,
5574,
29897,
13,
1678,
17162,
29889,
4397,
29898,
29893,
29897,
13,
13,
29871,
1369,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
29871,
1045,
29882,
29890,
353,
16437,
29950,
29933,
29898,
2917,
3493,
29922,
2395,
29892,
1065,
29918,
333,
29922,
29882,
29890,
29918,
3389,
29918,
333,
29892,
13,
418,
634,
29874,
29922,
29941,
29892,
1375,
29918,
15841,
657,
29922,
29896,
29892,
4236,
29918,
15841,
657,
29922,
29896,
29906,
29892,
13,
418,
2983,
261,
369,
29922,
1983,
29918,
3069,
29892,
13,
418,
2983,
261,
369,
29918,
637,
29922,
1983,
29918,
637,
29892,
13,
418,
954,
29918,
27736,
29922,
29916,
5085,
29889,
1949,
29918,
27736,
29892,
13,
418,
4036,
29918,
29888,
13857,
29922,
29916,
5085,
29889,
8172,
29918,
29888,
13857,
29892,
3719,
2103,
29918,
19790,
29922,
29916,
5085,
29889,
4980,
2103,
29918,
19790,
29892,
13,
418,
24543,
29918,
19207,
29922,
29896,
29900,
29892,
1375,
29918,
4980,
2103,
29922,
29916,
5085,
29889,
1195,
29918,
4980,
2103,
29897,
13,
259,
13,
29871,
2582,
353,
1045,
29882,
29890,
29889,
3389,
29898,
29916,
5085,
29889,
29876,
29918,
277,
414,
29892,
1375,
29918,
29876,
29918,
1287,
414,
29922,
1949,
29918,
1287,
414,
29897,
13,
13,
29871,
1045,
29882,
29890,
29889,
845,
329,
3204,
29898,
845,
329,
3204,
29918,
1287,
414,
29922,
5574,
29897,
13,
29871,
3865,
29889,
845,
329,
3204,
580,
13,
13,
29871,
396,
1596,
877,
8439,
526,
426,
3854,
6057,
29889,
4286,
4830,
29898,
2435,
29898,
9902,
29889,
657,
29918,
497,
29918,
3389,
29879,
580,
4961,
13,
29871,
396,
17162,
29961,
29900,
1822,
7827,
29918,
3706,
13,
29871,
396,
17162,
29961,
29900,
1822,
3018,
622,
706,
13,
29871,
1857,
29918,
13318,
29918,
2248,
353,
5159,
13,
29871,
363,
22645,
297,
3464,
29898,
2435,
29898,
1287,
414,
29961,
29900,
1822,
3018,
622,
706,
22164,
13,
1678,
23324,
706,
353,
17162,
29961,
29900,
1822,
3018,
622,
706,
7503,
13140,
29974,
29896,
29962,
13,
1678,
3190,
353,
4236,
29898,
3018,
622,
706,
29892,
1820,
29922,
2892,
921,
29901,
921,
29961,
29900,
2314,
29961,
29896,
29962,
13,
1678,
1857,
29918,
13318,
29918,
2248,
29889,
4397,
29898,
2754,
29889,
1972,
29918,
2248,
29918,
1609,
29918,
1279,
29898,
1279,
876,
13,
259,
13,
29871,
1900,
29918,
1279,
353,
4236,
29898,
1287,
414,
29961,
29900,
1822,
3018,
622,
706,
29892,
1820,
29922,
2892,
921,
29901,
921,
29961,
29900,
2314,
29961,
29896,
29962,
13,
29871,
17927,
29889,
1188,
877,
25353,
1476,
5285,
29901,
426,
3854,
2629,
12365,
29889,
29941,
29888,
29913,
269,
4286,
4830,
29898,
13318,
29918,
1279,
29892,
17162,
29961,
29900,
1822,
7827,
29918,
3706,
14352,
29896,
12622,
13,
29871,
5235,
353,
7882,
29889,
1972,
29918,
3888,
29918,
710,
29918,
1609,
29918,
1279,
29898,
13318,
29918,
1279,
29892,
525,
29906,
29900,
29900,
29915,
565,
921,
5085,
29889,
4478,
29918,
3493,
1275,
525,
29873,
893,
29915,
1683,
525,
29929,
29900,
1495,
13,
29871,
17927,
29889,
1188,
877,
29912,
3854,
4286,
4830,
29898,
3888,
876,
13,
29871,
17927,
29889,
1188,
877,
29899,
29915,
29930,
29896,
29900,
29900,
29897,
13,
29871,
17927,
29889,
5358,
580,
13,
13,
29871,
736,
17927,
29889,
1188,
29918,
3972,
29892,
1857,
29918,
13318,
29918,
2248,
29892,
17162,
29961,
29900,
1822,
7827,
29918,
3706,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
29871,
13812,
353,
1852,
5510,
29889,
15730,
11726,
703,
8456,
29950,
29933,
29901,
6417,
504,
322,
382,
4543,
26078,
15501,
20693,
326,
2133,
472,
2522,
744,
1159,
13,
29871,
13812,
29889,
1202,
29918,
23516,
877,
489,
24713,
742,
9651,
1134,
29922,
710,
29892,
29871,
19995,
29922,
1839,
29883,
361,
279,
29896,
29900,
742,
525,
29883,
361,
279,
29896,
29900,
29900,
742,
525,
2940,
6779,
29896,
29953,
29899,
29896,
29906,
29900,
7464,
1371,
2433,
15954,
852,
1546,
315,
361,
279,
29896,
29900,
29914,
29896,
29900,
29900,
322,
7084,
6779,
29899,
29896,
29953,
29889,
1495,
13,
29871,
396,
2498,
1852,
13,
29871,
13812,
29889,
1202,
29918,
23516,
877,
489,
4478,
29918,
3493,
742,
539,
1134,
29922,
710,
29892,
29871,
19995,
29922,
1839,
29873,
893,
742,
525,
893,
29879,
7464,
1371,
2433,
15954,
852,
278,
2740,
2913,
29889,
1495,
13,
29871,
13812,
29889,
1202,
29918,
23516,
877,
489,
2230,
29918,
15841,
657,
742,
4706,
1134,
29922,
524,
29892,
29871,
2322,
29922,
29906,
29900,
29900,
29900,
29900,
29892,
1371,
2433,
1576,
3001,
931,
3438,
8619,
479,
363,
11975,
313,
262,
6923,
467,
1495,
13,
29871,
13812,
29889,
1202,
29918,
23516,
877,
489,
417,
3554,
29918,
361,
29918,
9502,
742,
418,
1134,
29922,
524,
29892,
29871,
2322,
29922,
29945,
29900,
29900,
29892,
1371,
2433,
1576,
3001,
6057,
363,
17983,
29889,
1495,
13,
29871,
396,
16437,
29950,
29933,
13,
29871,
13812,
29889,
1202,
29918,
23516,
877,
489,
710,
8963,
742,
2322,
543,
13445,
10335,
613,
29871,
1134,
29922,
710,
29892,
302,
5085,
2433,
29973,
742,
1371,
2433,
20640,
2133,
13705,
363,
278,
1274,
23493,
740,
1495,
13,
29871,
13812,
29889,
1202,
29918,
23516,
877,
489,
1195,
29918,
4980,
2103,
742,
1678,
2322,
21098,
29941,
29892,
29871,
1134,
29922,
7411,
29892,
302,
5085,
2433,
29973,
742,
1371,
2433,
1195,
12539,
3719,
2103,
363,
476,
2287,
1495,
13,
29871,
13812,
29889,
1202,
29918,
23516,
877,
489,
1949,
29918,
27736,
742,
418,
2322,
29922,
29953,
29946,
29892,
29871,
1134,
29922,
524,
29892,
302,
5085,
2433,
29973,
742,
1371,
2433,
4537,
310,
11916,
363,
278,
1274,
23493,
740,
1495,
13,
29871,
13812,
29889,
1202,
29918,
23516,
877,
489,
8172,
29918,
29888,
13857,
742,
29871,
2322,
21098,
29941,
29941,
29892,
1134,
29922,
7411,
29892,
302,
5085,
2433,
29973,
742,
1371,
2433,
29888,
13857,
310,
4036,
22920,
1495,
13,
29871,
13812,
29889,
1202,
29918,
23516,
877,
489,
4980,
2103,
29918,
19790,
742,
2322,
29922,
29941,
29892,
259,
1134,
29922,
524,
29892,
302,
5085,
2433,
29973,
742,
1371,
2433,
19790,
6674,
2957,
304,
278,
3719,
2103,
1495,
13,
29871,
13812,
29889,
1202,
29918,
23516,
877,
489,
29876,
29918,
277,
414,
742,
3986,
2322,
29922,
29941,
29900,
29900,
29892,
1134,
29922,
524,
29892,
302,
5085,
2433,
29973,
742,
1371,
2433,
4537,
310,
24372,
363,
13883,
1158,
1495,
13,
29871,
396,
1480,
13,
29871,
13812,
29889,
1202,
29918,
23516,
877,
489,
7620,
29918,
3972,
742,
965,
1134,
29922,
710,
29892,
29871,
2322,
2433,
6904,
4905,
29914,
4478,
742,
1371,
2433,
12924,
304,
4078,
1423,
9748,
322,
1480,
29889,
1495,
13,
29871,
13812,
29889,
1202,
29918,
23516,
877,
489,
9502,
29918,
26776,
742,
3986,
1134,
29922,
524,
29892,
29871,
2322,
10457,
29896,
29892,
1371,
2433,
11288,
16717,
1495,
13,
29871,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
259,
13,
29871,
565,
6389,
29889,
4478,
29918,
3493,
1275,
525,
29873,
893,
2396,
13,
1678,
7882,
353,
8598,
1744,
264,
305,
29906,
29900,
29896,
8787,
29898,
369,
15828,
29922,
8824,
29897,
13,
29871,
25342,
6389,
29889,
4478,
29918,
3493,
1275,
525,
893,
29879,
2396,
13,
1678,
7882,
353,
8598,
1744,
264,
305,
29941,
29900,
29896,
8787,
29898,
369,
15828,
29922,
8824,
29897,
13,
29871,
1683,
29901,
13,
1678,
12020,
7865,
2392,
877,
13919,
2740,
2913,
584,
426,
3854,
4286,
4830,
29898,
5085,
29889,
4478,
29918,
3493,
876,
13,
13,
29871,
6389,
29889,
7620,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
877,
29912,
3854,
29899,
29912,
3854,
4286,
4830,
29898,
5085,
29889,
7620,
29918,
3972,
29892,
6389,
29889,
4478,
29918,
3493,
511,
6389,
29889,
24713,
29892,
525,
8456,
29950,
29933,
1495,
13,
29871,
1596,
877,
7620,
29899,
3972,
584,
426,
3854,
4286,
4830,
29898,
5085,
29889,
7620,
29918,
3972,
876,
13,
13,
29871,
565,
6389,
29889,
9502,
29918,
26776,
529,
29871,
29900,
29901,
13,
1678,
4078,
29918,
3972,
29892,
599,
29918,
3888,
353,
6213,
29892,
16250,
29889,
7514,
287,
21533,
580,
13,
1678,
363,
474,
297,
3464,
29898,
5085,
29889,
417,
3554,
29918,
361,
29918,
9502,
1125,
13,
418,
1596,
6702,
29912,
3854,
584,
12365,
29900,
29941,
29881,
6822,
25641,
29900,
29941,
29881,
29913,
4286,
4830,
29898,
2230,
29918,
1807,
3285,
474,
29892,
6389,
29889,
417,
3554,
29918,
361,
29918,
9502,
876,
13,
418,
6389,
29889,
9502,
29918,
26776,
353,
4036,
29889,
9502,
524,
29898,
29896,
29892,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
29897,
13,
418,
4078,
29918,
3972,
29892,
599,
29918,
1279,
29879,
29892,
599,
29918,
7827,
29918,
3706,
353,
1667,
29898,
5085,
29892,
7882,
29897,
13,
418,
599,
29918,
3888,
29961,
29875,
29962,
353,
11117,
497,
29918,
1279,
29879,
2396,
599,
29918,
1279,
29879,
29892,
13,
462,
268,
525,
497,
29918,
7827,
29918,
3706,
2396,
599,
29918,
7827,
29918,
3706,
29913,
13,
1678,
4078,
29918,
2084,
353,
4078,
29918,
3972,
847,
525,
9902,
29889,
29886,
386,
29915,
13,
1678,
1596,
877,
7620,
964,
426,
3854,
4286,
4830,
29898,
7620,
29918,
2084,
876,
13,
1678,
4842,
305,
29889,
7620,
29898,
497,
29918,
3888,
29892,
4078,
29918,
2084,
29897,
13,
29871,
1683,
29901,
13,
1678,
1667,
29898,
5085,
29892,
7882,
29897,
13,
2
] |
accounts/models.py | olamijinadebayo/hood-watch | 0 | 175888 | <reponame>olamijinadebayo/hood-watch<filename>accounts/models.py
from django.db import models
from django.contrib import auth
# Create your models here.
class User(auth.models.User, auth.models.PermissionsMixin):
'''
This will initialize the user class which inherits classes
from the django.contrib class
'''
def __str__(self):
'''
This is a string reperesentation of each user
'''
return "@{}".format(self.username)
| [
1,
529,
276,
1112,
420,
29958,
324,
314,
823,
1099,
16529,
388,
29877,
29914,
6614,
29899,
12344,
29966,
9507,
29958,
10149,
29879,
29914,
9794,
29889,
2272,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
3166,
9557,
29889,
21570,
1053,
4817,
13,
29937,
6204,
596,
4733,
1244,
29889,
13,
13,
13,
1990,
4911,
29898,
5150,
29889,
9794,
29889,
2659,
29892,
4817,
29889,
9794,
29889,
15737,
6847,
29924,
861,
262,
1125,
13,
1678,
14550,
13,
1678,
910,
674,
11905,
278,
1404,
770,
607,
7846,
1169,
4413,
13,
1678,
515,
278,
9557,
29889,
21570,
770,
13,
1678,
14550,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
14550,
13,
4706,
910,
338,
263,
1347,
337,
546,
1329,
362,
310,
1269,
1404,
13,
4706,
14550,
13,
4706,
736,
17962,
8875,
1642,
4830,
29898,
1311,
29889,
6786,
29897,
13,
2
] |
tests/bitly/*REPL* [python].py | goldsborough/lnk | 3 | 27166 | Python 3.5.0 (default, Sep 14 2015, 02:37:27)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> a = [{'a': 1}, {'b': 2}]
>>> sorted(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unorderable types: dict() < dict()
>>> b = [{'b': 2}, {'a': 1}] | [
1,
5132,
29871,
29941,
29889,
29945,
29889,
29900,
313,
4381,
29892,
29639,
29871,
29896,
29946,
29871,
29906,
29900,
29896,
29945,
29892,
29871,
29900,
29906,
29901,
29941,
29955,
29901,
29906,
29955,
29897,
29871,
13,
29961,
29954,
4174,
29871,
29946,
29889,
29906,
29889,
29896,
3831,
271,
1821,
12113,
27624,
9219,
29871,
29953,
29889,
29896,
29889,
29900,
313,
695,
574,
29899,
29953,
29900,
29906,
29889,
29900,
29889,
29945,
29941,
4638,
373,
5424,
5080,
13,
1542,
376,
8477,
613,
376,
8552,
1266,
613,
376,
11944,
1169,
29908,
470,
376,
506,
1947,
29908,
363,
901,
2472,
29889,
13,
6778,
29958,
263,
353,
518,
10998,
29874,
2396,
29871,
29896,
1118,
11117,
29890,
2396,
29871,
29906,
6525,
13,
6778,
29958,
12705,
29898,
29874,
29897,
29871,
13,
11591,
1627,
313,
3242,
7786,
1246,
1833,
1125,
13,
29871,
3497,
9872,
4172,
262,
28341,
1196,
29871,
29896,
29892,
297,
529,
5453,
29958,
13,
1542,
2392,
29901,
443,
2098,
519,
4072,
29901,
9657,
580,
529,
9657,
580,
13,
6778,
29958,
289,
353,
518,
10998,
29890,
2396,
29871,
29906,
1118,
11117,
29874,
2396,
29871,
29896,
6525,
2
] |
src/stk/molecular/topology_graphs/topology_graph/topology_graph/__init__.py | stevenbennett96/stk | 21 | 104231 | <reponame>stevenbennett96/stk
from .topology_graph import * # noqa
| [
1,
529,
276,
1112,
420,
29958,
1655,
854,
1785,
20764,
29929,
29953,
29914,
303,
29895,
13,
3166,
869,
3332,
3002,
29918,
4262,
1053,
334,
29871,
396,
694,
25621,
13,
2
] |
http_shadow/__init__.py | abador/http-shadow | 0 | 13391 | <gh_stars>0
from .backend import Backend
from .thread import HttpPool
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
869,
27852,
1053,
7437,
355,
13,
3166,
869,
7097,
1053,
9056,
11426,
13,
2
] |
Translocations_Detector/mAP/Scalable_mean_avg_precision.py | dariodematties/NANOPORE_TRANSLOCATIOS | 0 | 97749 | <filename>Translocations_Detector/mAP/Scalable_mean_avg_precision.py
# Mean average precision (mAP) computation
# Source from this amazing tutorial by <NAME>
# https://github.com/aladdinpersson/Machine-Learning-Collection/blob/master/ML/Pytorch/object_detection/metrics/mean_avg_precision.py
# But I modified it to make it scalable
import sys
import torch
from collections import Counter
sys.path.append('./mAP')
from Scalable_IoU import intersection_over_union
def mean_average_precision(
device, pred_segments, true_segments, iou_threshold=0.5, seg_format="mix", num_classes=1
):
"""
Calculates mean average precision
Parameters:
device (str): the device used in the run
pred_segments (list): list of lists containing all bsegments with each bsegments
specified as [train_idx, class_prediction, prob_score, x1, x2]
true_segments (list): Similar as pred_segments except all the correct ones
iou_threshold (float): threshold where predicted bsegments is correct
segment_format (str): mix/midpoint/extremes, if (left,w) or (center,w) or (left,right) are respectively used to specify bsegments
num_classes (int): number of classes
Returns:
float: mAP value across all classes given a specific IoU threshold
"""
# list storing all AP for respective classes
average_precisions = []
# used for numerical stability later on
epsilon = 1e-6
for c in range(num_classes):
detections = []
ground_truths = []
# Go through all predictions and targets,
# and only add the ones that belong to the
# current class c
for detection in pred_segments:
if detection[1] == c:
detections.append(detection)
for true_segment in true_segments:
if true_segment[1] == c:
ground_truths.append(true_segment)
# find the amount of bsegments for each training example
# Counter here finds how many ground truth bsegments we get
# for each training example, so let's say wind 0 has 3,
# wind 1 has 5 then we will obtain a dictionary with:
# amount_bsegments = {0:3, 1:5}
amount_bsegments = Counter([gt[0] for gt in ground_truths])
# We then go through each key, val in this dictionary
# and convert to the following (w.r.t same example):
# ammount_bsegments = {0:torch.tensor[0,0,0], 1:torch.tensor[0,0,0,0,0]}
for key, val in amount_bsegments.items():
amount_bsegments[key] = torch.zeros(val)
# sort by segment probabilities which is index 2
detections.sort(key=lambda x: x[2], reverse=True)
TP = torch.zeros((len(detections)))
FP = torch.zeros((len(detections)))
total_true_bsegments = len(ground_truths)
# If none exists for this class then we can safely skip
if total_true_bsegments == 0:
continue
ground_truths = torch.tensor(ground_truths)
for detection_idx, detection in enumerate(detections):
detection = torch.tensor(detection)
# Only take out the ground_truths that have the same
# training idx as detection
loc = detection[0] == ground_truths[:,0]
ground_truth_wind = ground_truths[loc]
num_gts = ground_truth_wind.shape[0]
best_iou = 0
if num_gts > 0:
iou = intersection_over_union(
torch.unsqueeze(detection[3:],0).to(device),
ground_truth_wind[:,3:].to(device),
segment_format=seg_format,
)
best_iou = torch.max(iou)
best_gt_idx = torch.argmax(iou)
if best_iou > iou_threshold:
# only detect ground truth detection once
if amount_bsegments[int(detection[0])][best_gt_idx] == 0:
# true positive and add this bounding segment to seen
TP[detection_idx] = 1
amount_bsegments[int(detection[0])][best_gt_idx] = 1
else:
FP[detection_idx] = 1
# if IOU is lower then the detection is a false positive
else:
FP[detection_idx] = 1
TP_cumsum = torch.cumsum(TP, dim=0)
FP_cumsum = torch.cumsum(FP, dim=0)
recalls = TP_cumsum / (total_true_bsegments + epsilon)
precisions = TP_cumsum / (TP_cumsum + FP_cumsum + epsilon)
precisions = torch.cat((torch.tensor([1]).type(torch.float32), precisions))
recalls = torch.cat((torch.tensor([0]).type(torch.float32), recalls))
# torch.trapz for numerical integration
average_precisions.append(torch.trapz(precisions, recalls))
return sum(average_precisions) / len(average_precisions)
| [
1,
529,
9507,
29958,
4300,
2029,
800,
29918,
6362,
3019,
29914,
29885,
3301,
29914,
29636,
519,
29918,
12676,
29918,
485,
29887,
29918,
17990,
2459,
29889,
2272,
13,
29937,
16316,
6588,
16716,
313,
29885,
3301,
29897,
16287,
13,
29937,
7562,
515,
445,
21863,
292,
9673,
491,
529,
5813,
29958,
13,
29937,
2045,
597,
3292,
29889,
510,
29914,
284,
1202,
262,
6774,
1100,
29914,
29076,
29899,
29931,
799,
1076,
29899,
7196,
29914,
10054,
29914,
6207,
29914,
1988,
29914,
29925,
3637,
25350,
29914,
3318,
29918,
29881,
2650,
428,
29914,
2527,
10817,
29914,
12676,
29918,
485,
29887,
29918,
17990,
2459,
29889,
2272,
13,
29937,
1205,
306,
9120,
372,
304,
1207,
372,
8716,
519,
13,
5215,
10876,
13,
5215,
4842,
305,
13,
3166,
16250,
1053,
315,
5336,
13,
13,
9675,
29889,
2084,
29889,
4397,
877,
6904,
29885,
3301,
1495,
13,
3166,
317,
1052,
519,
29918,
29902,
29877,
29965,
1053,
17686,
29918,
957,
29918,
13094,
13,
13,
1753,
2099,
29918,
12483,
482,
29918,
17990,
2459,
29898,
13,
4706,
4742,
29892,
4450,
29918,
10199,
1860,
29892,
1565,
29918,
10199,
1860,
29892,
474,
283,
29918,
386,
12268,
29922,
29900,
29889,
29945,
29892,
2377,
29918,
4830,
543,
28084,
613,
954,
29918,
13203,
29922,
29896,
13,
1125,
13,
1678,
9995,
13,
1678,
20535,
1078,
2099,
6588,
16716,
29871,
13,
13,
1678,
12662,
2699,
29901,
13,
4706,
4742,
313,
710,
1125,
278,
4742,
1304,
297,
278,
1065,
13,
4706,
4450,
29918,
10199,
1860,
313,
1761,
1125,
1051,
310,
8857,
6943,
599,
289,
10199,
1860,
411,
1269,
289,
10199,
1860,
13,
4706,
6790,
408,
518,
14968,
29918,
13140,
29892,
770,
29918,
11965,
2463,
29892,
2070,
29918,
13628,
29892,
921,
29896,
29892,
921,
29906,
29962,
13,
4706,
1565,
29918,
10199,
1860,
313,
1761,
1125,
13999,
408,
4450,
29918,
10199,
1860,
5174,
599,
278,
1959,
6743,
29871,
13,
4706,
474,
283,
29918,
386,
12268,
313,
7411,
1125,
16897,
988,
25383,
289,
10199,
1860,
338,
1959,
13,
4706,
10768,
29918,
4830,
313,
710,
1125,
6837,
29914,
6563,
3149,
29914,
1062,
1745,
267,
29892,
565,
313,
1563,
29892,
29893,
29897,
470,
313,
5064,
29892,
29893,
29897,
470,
313,
1563,
29892,
1266,
29897,
526,
8307,
1304,
304,
6084,
289,
10199,
1860,
13,
4706,
954,
29918,
13203,
313,
524,
1125,
1353,
310,
4413,
13,
13,
1678,
16969,
29901,
13,
4706,
5785,
29901,
286,
3301,
995,
4822,
599,
4413,
2183,
263,
2702,
22244,
29965,
16897,
29871,
13,
1678,
9995,
13,
13,
1678,
396,
1051,
15446,
599,
12279,
363,
18067,
4413,
13,
1678,
6588,
29918,
1457,
3476,
1080,
353,
5159,
13,
13,
1678,
396,
1304,
363,
16259,
25806,
2678,
373,
13,
1678,
321,
3232,
353,
29871,
29896,
29872,
29899,
29953,
13,
13,
1678,
363,
274,
297,
3464,
29898,
1949,
29918,
13203,
1125,
13,
4706,
1439,
29872,
1953,
353,
5159,
13,
4706,
5962,
29918,
509,
2806,
29879,
353,
5159,
13,
13,
4706,
396,
2921,
1549,
599,
27303,
322,
22525,
29892,
13,
4706,
396,
322,
871,
788,
278,
6743,
393,
6852,
304,
278,
13,
4706,
396,
1857,
770,
274,
13,
4706,
363,
15326,
297,
4450,
29918,
10199,
1860,
29901,
13,
9651,
565,
15326,
29961,
29896,
29962,
1275,
274,
29901,
13,
18884,
1439,
29872,
1953,
29889,
4397,
29898,
29881,
2650,
428,
29897,
13,
13,
4706,
363,
1565,
29918,
28192,
297,
1565,
29918,
10199,
1860,
29901,
13,
9651,
565,
1565,
29918,
28192,
29961,
29896,
29962,
1275,
274,
29901,
13,
18884,
5962,
29918,
509,
2806,
29879,
29889,
4397,
29898,
3009,
29918,
28192,
29897,
13,
13,
13,
4706,
396,
1284,
278,
5253,
310,
289,
10199,
1860,
363,
1269,
6694,
1342,
13,
4706,
396,
315,
5336,
1244,
14061,
920,
1784,
5962,
8760,
289,
10199,
1860,
591,
679,
13,
4706,
396,
363,
1269,
6694,
1342,
29892,
577,
1235,
29915,
29879,
1827,
8805,
29871,
29900,
756,
29871,
29941,
29892,
13,
4706,
396,
8805,
29871,
29896,
756,
29871,
29945,
769,
591,
674,
4017,
263,
8600,
411,
29901,
13,
4706,
396,
5253,
29918,
29890,
10199,
1860,
353,
426,
29900,
29901,
29941,
29892,
29871,
29896,
29901,
29945,
29913,
13,
4706,
5253,
29918,
29890,
10199,
1860,
353,
315,
5336,
4197,
4141,
29961,
29900,
29962,
363,
330,
29873,
297,
5962,
29918,
509,
2806,
29879,
2314,
13,
13,
4706,
396,
1334,
769,
748,
1549,
1269,
1820,
29892,
659,
297,
445,
8600,
13,
4706,
396,
322,
3588,
304,
278,
1494,
313,
29893,
29889,
29878,
29889,
29873,
1021,
1342,
1125,
13,
4706,
396,
626,
16476,
29918,
29890,
10199,
1860,
353,
426,
29900,
29901,
7345,
305,
29889,
20158,
29961,
29900,
29892,
29900,
29892,
29900,
1402,
29871,
29896,
29901,
7345,
305,
29889,
20158,
29961,
29900,
29892,
29900,
29892,
29900,
29892,
29900,
29892,
29900,
12258,
13,
4706,
363,
1820,
29892,
659,
297,
5253,
29918,
29890,
10199,
1860,
29889,
7076,
7295,
13,
9651,
5253,
29918,
29890,
10199,
1860,
29961,
1989,
29962,
353,
4842,
305,
29889,
3298,
359,
29898,
791,
29897,
13,
13,
4706,
396,
2656,
491,
10768,
2070,
11614,
607,
338,
2380,
29871,
29906,
13,
4706,
1439,
29872,
1953,
29889,
6605,
29898,
1989,
29922,
2892,
921,
29901,
921,
29961,
29906,
1402,
11837,
29922,
5574,
29897,
13,
4706,
323,
29925,
353,
4842,
305,
29889,
3298,
359,
3552,
2435,
29898,
29881,
2650,
1953,
4961,
13,
4706,
383,
29925,
353,
4842,
305,
29889,
3298,
359,
3552,
2435,
29898,
29881,
2650,
1953,
4961,
13,
4706,
3001,
29918,
3009,
29918,
29890,
10199,
1860,
353,
7431,
29898,
2057,
29918,
509,
2806,
29879,
29897,
13,
13,
4706,
396,
960,
5642,
4864,
363,
445,
770,
769,
591,
508,
23511,
14383,
13,
4706,
565,
3001,
29918,
3009,
29918,
29890,
10199,
1860,
1275,
29871,
29900,
29901,
13,
9651,
6773,
13,
13,
4706,
5962,
29918,
509,
2806,
29879,
353,
4842,
305,
29889,
20158,
29898,
2057,
29918,
509,
2806,
29879,
29897,
13,
4706,
363,
15326,
29918,
13140,
29892,
15326,
297,
26985,
29898,
29881,
2650,
1953,
1125,
13,
9651,
15326,
353,
4842,
305,
29889,
20158,
29898,
29881,
2650,
428,
29897,
13,
9651,
396,
9333,
2125,
714,
278,
5962,
29918,
509,
2806,
29879,
393,
505,
278,
1021,
13,
9651,
396,
6694,
22645,
408,
15326,
13,
9651,
1180,
353,
15326,
29961,
29900,
29962,
1275,
5962,
29918,
509,
2806,
29879,
7503,
29892,
29900,
29962,
13,
9651,
5962,
29918,
509,
2806,
29918,
14800,
353,
5962,
29918,
509,
2806,
29879,
29961,
2029,
29962,
13,
13,
9651,
954,
29918,
29887,
1372,
353,
5962,
29918,
509,
2806,
29918,
14800,
29889,
12181,
29961,
29900,
29962,
13,
9651,
1900,
29918,
29875,
283,
353,
29871,
29900,
13,
13,
9651,
565,
954,
29918,
29887,
1372,
1405,
29871,
29900,
29901,
13,
18884,
474,
283,
353,
17686,
29918,
957,
29918,
13094,
29898,
13,
462,
1678,
4842,
305,
29889,
6948,
802,
29872,
911,
29898,
29881,
2650,
428,
29961,
29941,
29901,
1402,
29900,
467,
517,
29898,
10141,
511,
13,
462,
1678,
5962,
29918,
509,
2806,
29918,
14800,
7503,
29892,
29941,
29901,
1822,
517,
29898,
10141,
511,
13,
462,
1678,
10768,
29918,
4830,
29922,
10199,
29918,
4830,
29892,
13,
18884,
1723,
13,
18884,
1900,
29918,
29875,
283,
353,
4842,
305,
29889,
3317,
29898,
29875,
283,
29897,
13,
18884,
1900,
29918,
4141,
29918,
13140,
353,
4842,
305,
29889,
1191,
3317,
29898,
29875,
283,
29897,
13,
13,
9651,
565,
1900,
29918,
29875,
283,
1405,
474,
283,
29918,
386,
12268,
29901,
13,
18884,
396,
871,
6459,
5962,
8760,
15326,
2748,
13,
18884,
565,
5253,
29918,
29890,
10199,
1860,
29961,
524,
29898,
29881,
2650,
428,
29961,
29900,
2314,
3816,
13318,
29918,
4141,
29918,
13140,
29962,
1275,
29871,
29900,
29901,
13,
462,
1678,
396,
1565,
6374,
322,
788,
445,
3216,
292,
10768,
304,
3595,
13,
462,
1678,
323,
29925,
29961,
29881,
2650,
428,
29918,
13140,
29962,
353,
29871,
29896,
13,
462,
1678,
5253,
29918,
29890,
10199,
1860,
29961,
524,
29898,
29881,
2650,
428,
29961,
29900,
2314,
3816,
13318,
29918,
4141,
29918,
13140,
29962,
353,
29871,
29896,
13,
18884,
1683,
29901,
13,
462,
1678,
383,
29925,
29961,
29881,
2650,
428,
29918,
13140,
29962,
353,
29871,
29896,
13,
13,
9651,
396,
565,
10663,
29965,
338,
5224,
769,
278,
15326,
338,
263,
2089,
6374,
13,
9651,
1683,
29901,
13,
18884,
383,
29925,
29961,
29881,
2650,
428,
29918,
13140,
29962,
353,
29871,
29896,
13,
13,
4706,
323,
29925,
29918,
29883,
398,
2083,
353,
4842,
305,
29889,
29883,
398,
2083,
29898,
3557,
29892,
3964,
29922,
29900,
29897,
13,
4706,
383,
29925,
29918,
29883,
398,
2083,
353,
4842,
305,
29889,
29883,
398,
2083,
29898,
26353,
29892,
3964,
29922,
29900,
29897,
13,
4706,
1162,
4293,
353,
323,
29925,
29918,
29883,
398,
2083,
847,
313,
7827,
29918,
3009,
29918,
29890,
10199,
1860,
718,
321,
3232,
29897,
13,
4706,
12132,
1080,
353,
323,
29925,
29918,
29883,
398,
2083,
847,
313,
3557,
29918,
29883,
398,
2083,
718,
383,
29925,
29918,
29883,
398,
2083,
718,
321,
3232,
29897,
13,
4706,
12132,
1080,
353,
4842,
305,
29889,
4117,
3552,
7345,
305,
29889,
20158,
4197,
29896,
14664,
1853,
29898,
7345,
305,
29889,
7411,
29941,
29906,
511,
12132,
1080,
876,
13,
4706,
1162,
4293,
353,
4842,
305,
29889,
4117,
3552,
7345,
305,
29889,
20158,
4197,
29900,
14664,
1853,
29898,
7345,
305,
29889,
7411,
29941,
29906,
511,
1162,
4293,
876,
13,
4706,
396,
4842,
305,
29889,
29873,
2390,
29920,
363,
16259,
13465,
13,
4706,
6588,
29918,
1457,
3476,
1080,
29889,
4397,
29898,
7345,
305,
29889,
29873,
2390,
29920,
29898,
1457,
3476,
1080,
29892,
1162,
4293,
876,
13,
13,
1678,
736,
2533,
29898,
12483,
482,
29918,
1457,
3476,
1080,
29897,
847,
7431,
29898,
12483,
482,
29918,
1457,
3476,
1080,
29897,
13,
2
] |
script/hassfest/translations.py | KingofTown/core | 0 | 124204 | """Validate integration translation files."""
import json
from typing import Dict
import voluptuous as vol
from voluptuous.humanize import humanize_error
from .model import Integration
def data_entry_schema(*, require_title: bool, require_step_title: bool):
"""Generate a data entry schema."""
step_title_class = vol.Required if require_step_title else vol.Optional
data_entry_schema = {
vol.Optional("flow_title"): str,
vol.Required("step"): {
str: {
step_title_class("title"): str,
vol.Optional("description"): str,
vol.Optional("data"): {str: str},
}
},
vol.Optional("error"): {str: str},
vol.Optional("abort"): {str: str},
vol.Optional("create_entry"): {str: str},
}
if require_title:
data_entry_schema[vol.Required("title")] = str
return data_entry_schema
STRINGS_SCHEMA = vol.Schema(
{
vol.Optional("title"): str,
vol.Optional("config"): data_entry_schema(
require_title=False, require_step_title=True
),
vol.Optional("options"): data_entry_schema(
require_title=False, require_step_title=False
),
vol.Optional("device_automation"): {
vol.Optional("action_type"): {str: str},
vol.Optional("condition_type"): {str: str},
vol.Optional("trigger_type"): {str: str},
vol.Optional("trigger_subtype"): {str: str},
},
vol.Optional("state"): {str: str},
}
)
AUTH_SCHEMA = vol.Schema(
{
vol.Optional("mfa_setup"): {
str: data_entry_schema(require_title=True, require_step_title=True)
}
}
)
ONBOARDING_SCHEMA = vol.Schema({vol.Required("area"): {str: str}})
def validate_translation_file(integration: Integration):
"""Validate translation files for integration."""
strings_file = integration.path / "strings.json"
if not strings_file.is_file():
return
strings = json.loads(strings_file.read_text())
if integration.domain == "auth":
schema = AUTH_SCHEMA
elif integration.domain == "onboarding":
schema = ONBOARDING_SCHEMA
else:
schema = STRINGS_SCHEMA
try:
schema(strings)
except vol.Invalid as err:
integration.add_error(
"translations", f"Invalid strings.json: {humanize_error(strings, err)}"
)
def validate(integrations: Dict[str, Integration], config):
"""Handle JSON files inside integrations."""
for integration in integrations.values():
validate_translation_file(integration)
| [
1,
9995,
7211,
403,
13465,
13962,
2066,
1213,
15945,
13,
5215,
4390,
13,
3166,
19229,
1053,
360,
919,
13,
13,
5215,
1700,
21245,
17269,
408,
1700,
13,
3166,
1700,
21245,
17269,
29889,
26029,
675,
1053,
5199,
675,
29918,
2704,
13,
13,
3166,
869,
4299,
1053,
17100,
362,
13,
13,
13,
1753,
848,
29918,
8269,
29918,
11010,
10456,
29892,
1996,
29918,
3257,
29901,
6120,
29892,
1996,
29918,
10568,
29918,
3257,
29901,
6120,
1125,
13,
1678,
9995,
5631,
403,
263,
848,
6251,
10938,
1213,
15945,
13,
1678,
4331,
29918,
3257,
29918,
1990,
353,
1700,
29889,
19347,
565,
1996,
29918,
10568,
29918,
3257,
1683,
1700,
29889,
27636,
13,
1678,
848,
29918,
8269,
29918,
11010,
353,
426,
13,
4706,
1700,
29889,
27636,
703,
1731,
29918,
3257,
29908,
1125,
851,
29892,
13,
4706,
1700,
29889,
19347,
703,
10568,
29908,
1125,
426,
13,
9651,
851,
29901,
426,
13,
18884,
4331,
29918,
3257,
29918,
1990,
703,
3257,
29908,
1125,
851,
29892,
13,
18884,
1700,
29889,
27636,
703,
8216,
29908,
1125,
851,
29892,
13,
18884,
1700,
29889,
27636,
703,
1272,
29908,
1125,
426,
710,
29901,
851,
1118,
13,
9651,
500,
13,
4706,
2981,
13,
4706,
1700,
29889,
27636,
703,
2704,
29908,
1125,
426,
710,
29901,
851,
1118,
13,
4706,
1700,
29889,
27636,
703,
370,
441,
29908,
1125,
426,
710,
29901,
851,
1118,
13,
4706,
1700,
29889,
27636,
703,
3258,
29918,
8269,
29908,
1125,
426,
710,
29901,
851,
1118,
13,
1678,
500,
13,
1678,
565,
1996,
29918,
3257,
29901,
13,
4706,
848,
29918,
8269,
29918,
11010,
29961,
1555,
29889,
19347,
703,
3257,
13531,
353,
851,
13,
13,
1678,
736,
848,
29918,
8269,
29918,
11010,
13,
13,
13,
20785,
29903,
29918,
29903,
3210,
26862,
353,
1700,
29889,
12763,
29898,
13,
1678,
426,
13,
4706,
1700,
29889,
27636,
703,
3257,
29908,
1125,
851,
29892,
13,
4706,
1700,
29889,
27636,
703,
2917,
29908,
1125,
848,
29918,
8269,
29918,
11010,
29898,
13,
9651,
1996,
29918,
3257,
29922,
8824,
29892,
1996,
29918,
10568,
29918,
3257,
29922,
5574,
13,
4706,
10353,
13,
4706,
1700,
29889,
27636,
703,
6768,
29908,
1125,
848,
29918,
8269,
29918,
11010,
29898,
13,
9651,
1996,
29918,
3257,
29922,
8824,
29892,
1996,
29918,
10568,
29918,
3257,
29922,
8824,
13,
4706,
10353,
13,
4706,
1700,
29889,
27636,
703,
10141,
29918,
17405,
362,
29908,
1125,
426,
13,
9651,
1700,
29889,
27636,
703,
2467,
29918,
1853,
29908,
1125,
426,
710,
29901,
851,
1118,
13,
9651,
1700,
29889,
27636,
703,
16122,
29918,
1853,
29908,
1125,
426,
710,
29901,
851,
1118,
13,
9651,
1700,
29889,
27636,
703,
21001,
29918,
1853,
29908,
1125,
426,
710,
29901,
851,
1118,
13,
9651,
1700,
29889,
27636,
703,
21001,
29918,
1491,
1853,
29908,
1125,
426,
710,
29901,
851,
1118,
13,
4706,
2981,
13,
4706,
1700,
29889,
27636,
703,
3859,
29908,
1125,
426,
710,
29901,
851,
1118,
13,
1678,
500,
13,
29897,
13,
13,
20656,
29950,
29918,
29903,
3210,
26862,
353,
1700,
29889,
12763,
29898,
13,
1678,
426,
13,
4706,
1700,
29889,
27636,
703,
29885,
5444,
29918,
14669,
29908,
1125,
426,
13,
9651,
851,
29901,
848,
29918,
8269,
29918,
11010,
29898,
12277,
29918,
3257,
29922,
5574,
29892,
1996,
29918,
10568,
29918,
3257,
29922,
5574,
29897,
13,
4706,
500,
13,
1678,
500,
13,
29897,
13,
13,
1164,
8456,
17011,
4214,
29918,
29903,
3210,
26862,
353,
1700,
29889,
12763,
3319,
1555,
29889,
19347,
703,
6203,
29908,
1125,
426,
710,
29901,
851,
24289,
13,
13,
13,
1753,
12725,
29918,
3286,
18411,
29918,
1445,
29898,
27925,
29901,
17100,
362,
1125,
13,
1678,
9995,
7211,
403,
13962,
2066,
363,
13465,
1213,
15945,
13,
1678,
6031,
29918,
1445,
353,
13465,
29889,
2084,
847,
376,
19651,
29889,
3126,
29908,
13,
13,
1678,
565,
451,
6031,
29918,
1445,
29889,
275,
29918,
1445,
7295,
13,
4706,
736,
13,
13,
1678,
6031,
353,
4390,
29889,
18132,
29898,
19651,
29918,
1445,
29889,
949,
29918,
726,
3101,
13,
13,
1678,
565,
13465,
29889,
7247,
1275,
376,
5150,
1115,
13,
4706,
10938,
353,
26524,
29950,
29918,
29903,
3210,
26862,
13,
1678,
25342,
13465,
29889,
7247,
1275,
376,
265,
3377,
292,
1115,
13,
4706,
10938,
353,
6732,
8456,
17011,
4214,
29918,
29903,
3210,
26862,
13,
1678,
1683,
29901,
13,
4706,
10938,
353,
29486,
4214,
29903,
29918,
29903,
3210,
26862,
13,
13,
1678,
1018,
29901,
13,
4706,
10938,
29898,
19651,
29897,
13,
1678,
5174,
1700,
29889,
13919,
408,
4589,
29901,
13,
4706,
13465,
29889,
1202,
29918,
2704,
29898,
13,
9651,
376,
3286,
29880,
800,
613,
285,
29908,
13919,
6031,
29889,
3126,
29901,
426,
26029,
675,
29918,
2704,
29898,
19651,
29892,
4589,
2915,
29908,
13,
4706,
1723,
13,
13,
13,
1753,
12725,
29898,
14146,
800,
29901,
360,
919,
29961,
710,
29892,
17100,
362,
1402,
2295,
1125,
13,
1678,
9995,
13554,
4663,
2066,
2768,
3990,
800,
1213,
15945,
13,
1678,
363,
13465,
297,
3990,
800,
29889,
5975,
7295,
13,
4706,
12725,
29918,
3286,
18411,
29918,
1445,
29898,
27925,
29897,
13,
2
] |
python/paddle/fluid/contrib/slim/tests/test_imperative_ptq.py | SmirnovKol/Paddle | 0 | 139468 | <reponame>SmirnovKol/Paddle
# copyright (c) 2018 paddlepaddle authors. all rights reserved.
#
# licensed under the apache license, version 2.0 (the "license");
# you may not use this file except in compliance with the license.
# you may obtain a copy of the license at
#
# http://www.apache.org/licenses/license-2.0
#
# unless required by applicable law or agreed to in writing, software
# distributed under the license is distributed on an "as is" basis,
# without warranties or conditions of any kind, either express or implied.
# see the license for the specific language governing permissions and
# limitations under the license.
from __future__ import print_function
import os
import numpy as np
import random
import shutil
import time
import unittest
import copy
import logging
import paddle.nn as nn
import paddle
import paddle.fluid as fluid
from paddle.fluid.contrib.slim.quantization import *
from paddle.fluid.log_helper import get_logger
from paddle.dataset.common import download
from paddle.fluid.framework import _test_eager_guard
from imperative_test_utils import fix_model_dict, ImperativeLenet, ImperativeLinearBn
from imperative_test_utils import ImperativeLinearBn_hook
_logger = get_logger(__name__,
logging.INFO,
fmt='%(asctime)s-%(levelname)s: %(message)s')
class TestFuseLinearBn(unittest.TestCase):
"""
Fuse the linear and bn layers, and then quantize the model.
"""
def test_fuse(self):
model = ImperativeLinearBn()
model_h = ImperativeLinearBn_hook()
inputs = paddle.randn((3, 10), dtype="float32")
config = PTQConfig(AbsmaxQuantizer(), AbsmaxQuantizer())
ptq = ImperativePTQ(config)
f_l = [['linear', 'bn']]
quant_model = ptq.quantize(model, fuse=True, fuse_list=f_l)
quant_h = ptq.quantize(model_h, fuse=True, fuse_list=f_l)
for name, layer in quant_model.named_sublayers():
if name in f_l:
assert not (isinstance(layer, nn.BatchNorm1D)
or isinstance(layer, nn.BatchNorm2D))
out = model(inputs)
out_h = model_h(inputs)
out_quant = quant_model(inputs)
out_quant_h = quant_h(inputs)
cos_sim_func = nn.CosineSimilarity(axis=0)
print('fuse linear+bn', cos_sim_func(out.flatten(),
out_quant.flatten()))
print(cos_sim_func(out_h.flatten(), out_quant_h.flatten()))
class TestImperativePTQ(unittest.TestCase):
"""
"""
@classmethod
def setUpClass(cls):
timestamp = time.strftime('%Y-%m-%d-%H-%M-%S', time.localtime())
cls.root_path = os.path.join(os.getcwd(), "imperative_ptq_" + timestamp)
cls.save_path = os.path.join(cls.root_path, "model")
cls.download_path = 'dygraph_int8/download'
cls.cache_folder = os.path.expanduser('~/.cache/paddle/dataset/' +
cls.download_path)
cls.lenet_url = "https://paddle-inference-dist.cdn.bcebos.com/int8/unittest_model_data/lenet_pretrained.tar.gz"
cls.lenet_md5 = "953b802fb73b52fae42896e3c24f0afb"
seed = 1
np.random.seed(seed)
paddle.static.default_main_program().random_seed = seed
paddle.static.default_startup_program().random_seed = seed
@classmethod
def tearDownClass(cls):
try:
pass
# shutil.rmtree(cls.root_path)
except Exception as e:
print("Failed to delete {} due to {}".format(cls.root_path, str(e)))
def cache_unzipping(self, target_folder, zip_path):
if not os.path.exists(target_folder):
cmd = 'mkdir {0} && tar xf {1} -C {0}'.format(
target_folder, zip_path)
os.system(cmd)
def download_model(self, data_url, data_md5, folder_name):
download(data_url, self.download_path, data_md5)
file_name = data_url.split('/')[-1]
zip_path = os.path.join(self.cache_folder, file_name)
print('Data is downloaded at {0}'.format(zip_path))
data_cache_folder = os.path.join(self.cache_folder, folder_name)
self.cache_unzipping(data_cache_folder, zip_path)
return data_cache_folder
def set_vars(self):
config = PTQConfig(AbsmaxQuantizer(), AbsmaxQuantizer())
self.ptq = ImperativePTQ(config)
self.batch_num = 10
self.batch_size = 10
self.eval_acc_top1 = 0.95
# the input, output and weight thresholds of quantized op
self.gt_thresholds = {
'conv2d_0': [[1.0], [0.37673383951187134], [0.10933732241392136]],
'batch_norm2d_0': [[0.37673383951187134], [0.44249194860458374]],
're_lu_0': [[0.44249194860458374], [0.25804123282432556]],
'max_pool2d_0': [[0.25804123282432556], [0.25804123282432556]],
'linear_0': [[1.7058950662612915], [14.405526161193848],
[0.4373355209827423]],
'add_0': [[1.7058950662612915, 0.0], [1.7058950662612915]],
}
def model_test(self, model, batch_num=-1, batch_size=8):
model.eval()
test_reader = paddle.batch(paddle.dataset.mnist.test(),
batch_size=batch_size)
eval_acc_top1_list = []
for batch_id, data in enumerate(test_reader()):
x_data = np.array([x[0].reshape(1, 28, 28)
for x in data]).astype('float32')
y_data = np.array([x[1]
for x in data]).astype('int64').reshape(-1, 1)
img = paddle.to_tensor(x_data)
label = paddle.to_tensor(y_data)
out = model(img)
acc_top1 = fluid.layers.accuracy(input=out, label=label, k=1)
acc_top5 = fluid.layers.accuracy(input=out, label=label, k=5)
eval_acc_top1_list.append(float(acc_top1.numpy()))
if batch_id % 50 == 0:
_logger.info("Test | At step {}: acc1 = {:}, acc5 = {:}".format(
batch_id, acc_top1.numpy(), acc_top5.numpy()))
if batch_num > 0 and batch_id + 1 >= batch_num:
break
eval_acc_top1 = sum(eval_acc_top1_list) / len(eval_acc_top1_list)
return eval_acc_top1
def program_test(self, program_path, batch_num=-1, batch_size=8):
exe = paddle.static.Executor(paddle.CPUPlace())
[inference_program, feed_target_names, fetch_targets
] = (paddle.static.load_inference_model(program_path, exe))
test_reader = paddle.batch(paddle.dataset.mnist.test(),
batch_size=batch_size)
top1_correct_num = 0.
total_num = 0.
for batch_id, data in enumerate(test_reader()):
img = np.array([x[0].reshape(1, 28, 28)
for x in data]).astype('float32')
label = np.array([x[1] for x in data]).astype('int64')
feed = {feed_target_names[0]: img}
results = exe.run(inference_program,
feed=feed,
fetch_list=fetch_targets)
pred = np.argmax(results[0], axis=1)
top1_correct_num += np.sum(np.equal(pred, label))
total_num += len(img)
if total_num % 50 == 49:
_logger.info("Test | Test num {}: acc1 = {:}".format(
total_num, top1_correct_num / total_num))
if batch_num > 0 and batch_id + 1 >= batch_num:
break
return top1_correct_num / total_num
def func_ptq(self):
start_time = time.time()
self.set_vars()
# Load model
params_path = self.download_model(self.lenet_url, self.lenet_md5,
"lenet")
params_path += "/lenet_pretrained/lenet.pdparams"
model = ImperativeLenet()
model_state_dict = paddle.load(params_path)
model.set_state_dict(model_state_dict)
# Quantize, calibrate and save
quant_model = self.ptq.quantize(model)
before_acc_top1 = self.model_test(quant_model, self.batch_num,
self.batch_size)
input_spec = [
paddle.static.InputSpec(shape=[None, 1, 28, 28], dtype='float32')
]
self.ptq.save_quantized_model(model=quant_model,
path=self.save_path,
input_spec=input_spec)
print('Quantized model saved in {%s}' % self.save_path)
after_acc_top1 = self.model_test(quant_model, self.batch_num,
self.batch_size)
paddle.enable_static()
infer_acc_top1 = self.program_test(self.save_path, self.batch_num,
self.batch_size)
paddle.disable_static()
# Check
print('Before converted acc_top1: %s' % before_acc_top1)
print('After converted acc_top1: %s' % after_acc_top1)
print('Infer acc_top1: %s' % infer_acc_top1)
self.assertTrue(after_acc_top1 >= self.eval_acc_top1,
msg="The test acc {%f} is less than {%f}." %
(after_acc_top1, self.eval_acc_top1))
self.assertTrue(infer_acc_top1 >= after_acc_top1,
msg='The acc is lower after converting model.')
end_time = time.time()
print("total time: %ss \n" % (end_time - start_time))
def test_ptq(self):
with _test_eager_guard():
self.func_ptq()
self.func_ptq()
class TestImperativePTQfuse(TestImperativePTQ):
def func_ptq(self):
start_time = time.time()
self.set_vars()
# Load model
params_path = self.download_model(self.lenet_url, self.lenet_md5,
"lenet")
params_path += "/lenet_pretrained/lenet.pdparams"
model = ImperativeLenet()
model_state_dict = paddle.load(params_path)
model.set_state_dict(model_state_dict)
# Quantize, calibrate and save
f_l = [['features.0', 'features.1'], ['features.4', 'features.5']]
quant_model = self.ptq.quantize(model, fuse=True, fuse_list=f_l)
for name, layer in quant_model.named_sublayers():
if name in f_l:
assert not (isinstance(layer, nn.BatchNorm1D)
or isinstance(layer, nn.BatchNorm2D))
before_acc_top1 = self.model_test(quant_model, self.batch_num,
self.batch_size)
input_spec = [
paddle.static.InputSpec(shape=[None, 1, 28, 28], dtype='float32')
]
self.ptq.save_quantized_model(model=quant_model,
path=self.save_path,
input_spec=input_spec)
print('Quantized model saved in {%s}' % self.save_path)
after_acc_top1 = self.model_test(quant_model, self.batch_num,
self.batch_size)
paddle.enable_static()
infer_acc_top1 = self.program_test(self.save_path, self.batch_num,
self.batch_size)
paddle.disable_static()
# Check
print('Before converted acc_top1: %s' % before_acc_top1)
print('After converted acc_top1: %s' % after_acc_top1)
print('Infer acc_top1: %s' % infer_acc_top1)
#Check whether the quant_model is correct after converting.
#The acc of quantized model should be higher than 0.95.
self.assertTrue(after_acc_top1 >= self.eval_acc_top1,
msg="The test acc {%f} is less than {%f}." %
(after_acc_top1, self.eval_acc_top1))
#Check the saved infer_model.The acc of infer model
#should not be lower than the one of dygraph model.
self.assertTrue(infer_acc_top1 >= after_acc_top1,
msg='The acc is lower after converting model.')
end_time = time.time()
print("total time: %ss \n" % (end_time - start_time))
def test_ptq(self):
with _test_eager_guard():
self.func_ptq()
self.func_ptq()
class TestImperativePTQHist(TestImperativePTQ):
def set_vars(self):
config = PTQConfig(HistQuantizer(), AbsmaxQuantizer())
self.ptq = ImperativePTQ(config)
self.batch_num = 10
self.batch_size = 10
self.eval_acc_top1 = 0.98
self.gt_thresholds = {
'conv2d_0': [[0.99853515625], [0.35732391771364225],
[0.10933732241392136]],
'batch_norm2d_0': [[0.35732391771364225], [0.4291427868761275]],
're_lu_0': [[0.4291427868761275], [0.2359918110742001]],
'max_pool2d_0': [[0.2359918110742001], [0.25665526917146053]],
'linear_0': [[1.7037603475152991], [14.395224522473026],
[0.4373355209827423]],
'add_0': [[1.7037603475152991, 0.0], [1.7037603475152991]],
}
class TestImperativePTQKL(TestImperativePTQ):
def set_vars(self):
config = PTQConfig(KLQuantizer(), PerChannelAbsmaxQuantizer())
self.ptq = ImperativePTQ(config)
self.batch_num = 10
self.batch_size = 10
self.eval_acc_top1 = 1.0
conv2d_1_wt_thresholds = [
0.18116560578346252, 0.17079241573810577, 0.1702047884464264,
0.179476797580719, 0.1454375684261322, 0.22981858253479004
]
self.gt_thresholds = {
'conv2d_0': [[0.99267578125], [0.37695913558696836]],
'conv2d_1': [[0.19189296757394914], [0.24514256547263358],
[conv2d_1_wt_thresholds]],
'batch_norm2d_0': [[0.37695913558696836], [0.27462541429440535]],
're_lu_0': [[0.27462541429440535], [0.19189296757394914]],
'max_pool2d_0': [[0.19189296757394914], [0.19189296757394914]],
'linear_0': [[1.2839322163611087], [8.957185942414352]],
'add_0': [[1.2839322163611087, 0.0], [1.2839322163611087]],
}
if __name__ == '__main__':
unittest.main()
| [
1,
529,
276,
1112,
420,
29958,
29903,
11038,
13715,
29968,
324,
29914,
29925,
22352,
13,
29937,
259,
3509,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29947,
282,
22352,
29886,
22352,
15717,
29889,
599,
10462,
21676,
29889,
13,
29937,
13,
29937,
7794,
21144,
1090,
278,
12641,
19405,
29892,
1873,
29871,
29906,
29889,
29900,
313,
1552,
376,
506,
1947,
1496,
13,
29937,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19405,
29889,
13,
29937,
366,
1122,
4017,
263,
3509,
310,
278,
19405,
472,
13,
29937,
13,
29937,
268,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
506,
1947,
29899,
29906,
29889,
29900,
13,
29937,
13,
29937,
6521,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
13235,
1090,
278,
19405,
338,
13235,
373,
385,
376,
294,
338,
29908,
8405,
29892,
13,
29937,
1728,
1370,
21867,
583,
470,
5855,
310,
738,
2924,
29892,
2845,
4653,
470,
2411,
2957,
29889,
13,
29937,
1074,
278,
19405,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
27028,
1090,
278,
19405,
29889,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
13,
5215,
2897,
13,
5215,
12655,
408,
7442,
13,
5215,
4036,
13,
5215,
528,
4422,
13,
5215,
931,
13,
5215,
443,
27958,
13,
5215,
3509,
13,
5215,
12183,
13,
13,
5215,
282,
22352,
29889,
15755,
408,
302,
29876,
13,
5215,
282,
22352,
13,
5215,
282,
22352,
29889,
1579,
5416,
408,
22576,
13,
3166,
282,
22352,
29889,
1579,
5416,
29889,
21570,
29889,
2536,
326,
29889,
12150,
2133,
1053,
334,
13,
3166,
282,
22352,
29889,
1579,
5416,
29889,
1188,
29918,
20907,
1053,
679,
29918,
21707,
13,
3166,
282,
22352,
29889,
24713,
29889,
9435,
1053,
5142,
13,
3166,
282,
22352,
29889,
1579,
5416,
29889,
4468,
1053,
903,
1688,
29918,
29872,
1875,
29918,
17728,
13,
13,
3166,
10112,
1230,
29918,
1688,
29918,
13239,
1053,
2329,
29918,
4299,
29918,
8977,
29892,
12607,
1230,
21515,
300,
29892,
12607,
1230,
12697,
29933,
29876,
13,
3166,
10112,
1230,
29918,
1688,
29918,
13239,
1053,
12607,
1230,
12697,
29933,
29876,
29918,
20849,
13,
13,
29918,
21707,
353,
679,
29918,
21707,
22168,
978,
1649,
29892,
13,
462,
268,
12183,
29889,
11690,
29892,
13,
462,
268,
19200,
2433,
29995,
29898,
294,
312,
603,
29897,
29879,
19222,
29898,
5563,
978,
29897,
29879,
29901,
1273,
29898,
4906,
29897,
29879,
1495,
13,
13,
13,
1990,
4321,
29943,
1509,
12697,
29933,
29876,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
9995,
13,
1678,
383,
1509,
278,
5608,
322,
289,
29876,
15359,
29892,
322,
769,
4323,
675,
278,
1904,
29889,
13,
1678,
9995,
13,
13,
1678,
822,
1243,
29918,
29888,
1509,
29898,
1311,
1125,
13,
4706,
1904,
353,
12607,
1230,
12697,
29933,
29876,
580,
13,
4706,
1904,
29918,
29882,
353,
12607,
1230,
12697,
29933,
29876,
29918,
20849,
580,
13,
4706,
10970,
353,
282,
22352,
29889,
9502,
29876,
3552,
29941,
29892,
29871,
29896,
29900,
511,
26688,
543,
7411,
29941,
29906,
1159,
13,
4706,
2295,
353,
349,
29911,
29984,
3991,
29898,
4920,
29879,
3317,
22930,
3950,
3285,
24650,
3317,
22930,
3950,
3101,
13,
4706,
19592,
29939,
353,
12607,
1230,
7982,
29984,
29898,
2917,
29897,
13,
4706,
285,
29918,
29880,
353,
518,
1839,
10660,
742,
525,
11197,
2033,
29962,
13,
4706,
4323,
29918,
4299,
353,
19592,
29939,
29889,
12150,
675,
29898,
4299,
29892,
285,
1509,
29922,
5574,
29892,
285,
1509,
29918,
1761,
29922,
29888,
29918,
29880,
29897,
13,
4706,
4323,
29918,
29882,
353,
19592,
29939,
29889,
12150,
675,
29898,
4299,
29918,
29882,
29892,
285,
1509,
29922,
5574,
29892,
285,
1509,
29918,
1761,
29922,
29888,
29918,
29880,
29897,
13,
4706,
363,
1024,
29892,
7546,
297,
4323,
29918,
4299,
29889,
17514,
29918,
1491,
29277,
7295,
13,
9651,
565,
1024,
297,
285,
29918,
29880,
29901,
13,
18884,
4974,
451,
313,
275,
8758,
29898,
13148,
29892,
302,
29876,
29889,
23145,
29940,
555,
29896,
29928,
29897,
13,
462,
9651,
470,
338,
8758,
29898,
13148,
29892,
302,
29876,
29889,
23145,
29940,
555,
29906,
29928,
876,
13,
4706,
714,
353,
1904,
29898,
2080,
29879,
29897,
13,
4706,
714,
29918,
29882,
353,
1904,
29918,
29882,
29898,
2080,
29879,
29897,
13,
4706,
714,
29918,
12150,
353,
4323,
29918,
4299,
29898,
2080,
29879,
29897,
13,
4706,
714,
29918,
12150,
29918,
29882,
353,
4323,
29918,
29882,
29898,
2080,
29879,
29897,
13,
4706,
6776,
29918,
3601,
29918,
9891,
353,
302,
29876,
29889,
29907,
359,
457,
8942,
2327,
537,
29898,
8990,
29922,
29900,
29897,
13,
4706,
1596,
877,
29888,
1509,
5608,
29974,
11197,
742,
6776,
29918,
3601,
29918,
9891,
29898,
449,
29889,
1579,
8606,
3285,
13,
462,
462,
632,
714,
29918,
12150,
29889,
1579,
8606,
22130,
13,
4706,
1596,
29898,
3944,
29918,
3601,
29918,
9891,
29898,
449,
29918,
29882,
29889,
1579,
8606,
3285,
714,
29918,
12150,
29918,
29882,
29889,
1579,
8606,
22130,
13,
13,
13,
1990,
4321,
1888,
546,
1230,
7982,
29984,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
9995,
13,
1678,
9995,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
731,
3373,
2385,
29898,
25932,
1125,
13,
4706,
14334,
353,
931,
29889,
710,
615,
603,
877,
29995,
29979,
19222,
29885,
19222,
29881,
19222,
29950,
19222,
29924,
19222,
29903,
742,
931,
29889,
2997,
2230,
3101,
13,
4706,
1067,
29879,
29889,
4632,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
359,
29889,
657,
29883,
9970,
3285,
376,
26039,
1230,
29918,
415,
29939,
27508,
718,
14334,
29897,
13,
4706,
1067,
29879,
29889,
7620,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
25932,
29889,
4632,
29918,
2084,
29892,
376,
4299,
1159,
13,
13,
4706,
1067,
29879,
29889,
10382,
29918,
2084,
353,
525,
4518,
4262,
29918,
524,
29947,
29914,
10382,
29915,
13,
4706,
1067,
29879,
29889,
8173,
29918,
12083,
353,
2897,
29889,
2084,
29889,
18837,
1792,
877,
30022,
6294,
8173,
29914,
29886,
22352,
29914,
24713,
22208,
718,
13,
462,
462,
795,
1067,
29879,
29889,
10382,
29918,
2084,
29897,
13,
13,
4706,
1067,
29879,
29889,
2435,
300,
29918,
2271,
353,
376,
991,
597,
29886,
22352,
29899,
262,
1659,
29899,
5721,
29889,
13687,
29889,
29890,
346,
27737,
29889,
510,
29914,
524,
29947,
29914,
348,
27958,
29918,
4299,
29918,
1272,
29914,
2435,
300,
29918,
1457,
3018,
1312,
29889,
12637,
29889,
18828,
29908,
13,
4706,
1067,
29879,
29889,
2435,
300,
29918,
3487,
29945,
353,
376,
29929,
29945,
29941,
29890,
29947,
29900,
29906,
14943,
29955,
29941,
29890,
29945,
29906,
29888,
3660,
29946,
29906,
29947,
29929,
29953,
29872,
29941,
29883,
29906,
29946,
29888,
29900,
2142,
29890,
29908,
13,
13,
4706,
16717,
353,
29871,
29896,
13,
4706,
7442,
29889,
8172,
29889,
26776,
29898,
26776,
29897,
13,
4706,
282,
22352,
29889,
7959,
29889,
4381,
29918,
3396,
29918,
8860,
2141,
8172,
29918,
26776,
353,
16717,
13,
4706,
282,
22352,
29889,
7959,
29889,
4381,
29918,
2962,
786,
29918,
8860,
2141,
8172,
29918,
26776,
353,
16717,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
734,
279,
6767,
2385,
29898,
25932,
1125,
13,
4706,
1018,
29901,
13,
9651,
1209,
13,
9651,
396,
528,
4422,
29889,
1758,
8336,
29898,
25932,
29889,
4632,
29918,
2084,
29897,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1596,
703,
17776,
304,
5217,
6571,
2861,
304,
6571,
1642,
4830,
29898,
25932,
29889,
4632,
29918,
2084,
29892,
851,
29898,
29872,
4961,
13,
13,
1678,
822,
7090,
29918,
348,
2526,
3262,
29898,
1311,
29892,
3646,
29918,
12083,
29892,
14319,
29918,
2084,
1125,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
5182,
29918,
12083,
1125,
13,
9651,
9920,
353,
525,
11256,
3972,
426,
29900,
29913,
2607,
9913,
921,
29888,
426,
29896,
29913,
448,
29907,
426,
29900,
29913,
4286,
4830,
29898,
13,
18884,
3646,
29918,
12083,
29892,
14319,
29918,
2084,
29897,
13,
9651,
2897,
29889,
5205,
29898,
9006,
29897,
13,
13,
1678,
822,
5142,
29918,
4299,
29898,
1311,
29892,
848,
29918,
2271,
29892,
848,
29918,
3487,
29945,
29892,
4138,
29918,
978,
1125,
13,
4706,
5142,
29898,
1272,
29918,
2271,
29892,
1583,
29889,
10382,
29918,
2084,
29892,
848,
29918,
3487,
29945,
29897,
13,
4706,
934,
29918,
978,
353,
848,
29918,
2271,
29889,
5451,
11219,
1495,
14352,
29896,
29962,
13,
4706,
14319,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
8173,
29918,
12083,
29892,
934,
29918,
978,
29897,
13,
4706,
1596,
877,
1469,
338,
16532,
472,
426,
29900,
29913,
4286,
4830,
29898,
7554,
29918,
2084,
876,
13,
13,
4706,
848,
29918,
8173,
29918,
12083,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
8173,
29918,
12083,
29892,
4138,
29918,
978,
29897,
13,
4706,
1583,
29889,
8173,
29918,
348,
2526,
3262,
29898,
1272,
29918,
8173,
29918,
12083,
29892,
14319,
29918,
2084,
29897,
13,
4706,
736,
848,
29918,
8173,
29918,
12083,
13,
13,
1678,
822,
731,
29918,
16908,
29898,
1311,
1125,
13,
4706,
2295,
353,
349,
29911,
29984,
3991,
29898,
4920,
29879,
3317,
22930,
3950,
3285,
24650,
3317,
22930,
3950,
3101,
13,
4706,
1583,
29889,
415,
29939,
353,
12607,
1230,
7982,
29984,
29898,
2917,
29897,
13,
13,
4706,
1583,
29889,
16175,
29918,
1949,
353,
29871,
29896,
29900,
13,
4706,
1583,
29889,
16175,
29918,
2311,
353,
29871,
29896,
29900,
13,
4706,
1583,
29889,
14513,
29918,
5753,
29918,
3332,
29896,
353,
29871,
29900,
29889,
29929,
29945,
13,
13,
4706,
396,
278,
1881,
29892,
1962,
322,
7688,
266,
3781,
3361,
310,
4323,
1891,
1015,
13,
4706,
1583,
29889,
4141,
29918,
386,
3781,
3361,
353,
426,
13,
9651,
525,
20580,
29906,
29881,
29918,
29900,
2396,
5519,
29896,
29889,
29900,
1402,
518,
29900,
29889,
29941,
29955,
29953,
29955,
29941,
29941,
29947,
29941,
29929,
29945,
29896,
29896,
29947,
29955,
29896,
29941,
29946,
1402,
518,
29900,
29889,
29896,
29900,
29929,
29941,
29941,
29955,
29941,
29906,
29906,
29946,
29896,
29941,
29929,
29906,
29896,
29941,
29953,
20526,
13,
9651,
525,
16175,
29918,
12324,
29906,
29881,
29918,
29900,
2396,
5519,
29900,
29889,
29941,
29955,
29953,
29955,
29941,
29941,
29947,
29941,
29929,
29945,
29896,
29896,
29947,
29955,
29896,
29941,
29946,
1402,
518,
29900,
29889,
29946,
29946,
29906,
29946,
29929,
29896,
29929,
29946,
29947,
29953,
29900,
29946,
29945,
29947,
29941,
29955,
29946,
20526,
13,
9651,
525,
276,
29918,
6092,
29918,
29900,
2396,
5519,
29900,
29889,
29946,
29946,
29906,
29946,
29929,
29896,
29929,
29946,
29947,
29953,
29900,
29946,
29945,
29947,
29941,
29955,
29946,
1402,
518,
29900,
29889,
29906,
29945,
29947,
29900,
29946,
29896,
29906,
29941,
29906,
29947,
29906,
29946,
29941,
29906,
29945,
29945,
29953,
20526,
13,
9651,
525,
3317,
29918,
10109,
29906,
29881,
29918,
29900,
2396,
5519,
29900,
29889,
29906,
29945,
29947,
29900,
29946,
29896,
29906,
29941,
29906,
29947,
29906,
29946,
29941,
29906,
29945,
29945,
29953,
1402,
518,
29900,
29889,
29906,
29945,
29947,
29900,
29946,
29896,
29906,
29941,
29906,
29947,
29906,
29946,
29941,
29906,
29945,
29945,
29953,
20526,
13,
9651,
525,
10660,
29918,
29900,
2396,
5519,
29896,
29889,
29955,
29900,
29945,
29947,
29929,
29945,
29900,
29953,
29953,
29906,
29953,
29896,
29906,
29929,
29896,
29945,
1402,
518,
29896,
29946,
29889,
29946,
29900,
29945,
29945,
29906,
29953,
29896,
29953,
29896,
29896,
29929,
29941,
29947,
29946,
29947,
1402,
13,
462,
308,
518,
29900,
29889,
29946,
29941,
29955,
29941,
29941,
29945,
29945,
29906,
29900,
29929,
29947,
29906,
29955,
29946,
29906,
29941,
20526,
13,
9651,
525,
1202,
29918,
29900,
2396,
5519,
29896,
29889,
29955,
29900,
29945,
29947,
29929,
29945,
29900,
29953,
29953,
29906,
29953,
29896,
29906,
29929,
29896,
29945,
29892,
29871,
29900,
29889,
29900,
1402,
518,
29896,
29889,
29955,
29900,
29945,
29947,
29929,
29945,
29900,
29953,
29953,
29906,
29953,
29896,
29906,
29929,
29896,
29945,
20526,
13,
4706,
500,
13,
13,
1678,
822,
1904,
29918,
1688,
29898,
1311,
29892,
1904,
29892,
9853,
29918,
1949,
10457,
29896,
29892,
9853,
29918,
2311,
29922,
29947,
1125,
13,
4706,
1904,
29889,
14513,
580,
13,
13,
4706,
1243,
29918,
16950,
353,
282,
22352,
29889,
16175,
29898,
29886,
22352,
29889,
24713,
29889,
23521,
391,
29889,
1688,
3285,
13,
462,
462,
259,
9853,
29918,
2311,
29922,
16175,
29918,
2311,
29897,
13,
13,
4706,
19745,
29918,
5753,
29918,
3332,
29896,
29918,
1761,
353,
5159,
13,
4706,
363,
9853,
29918,
333,
29892,
848,
297,
26985,
29898,
1688,
29918,
16950,
580,
1125,
13,
9651,
921,
29918,
1272,
353,
7442,
29889,
2378,
4197,
29916,
29961,
29900,
1822,
690,
14443,
29898,
29896,
29892,
29871,
29906,
29947,
29892,
29871,
29906,
29947,
29897,
13,
462,
1669,
363,
921,
297,
848,
14664,
579,
668,
877,
7411,
29941,
29906,
1495,
13,
9651,
343,
29918,
1272,
353,
7442,
29889,
2378,
4197,
29916,
29961,
29896,
29962,
13,
462,
1669,
363,
921,
297,
848,
14664,
579,
668,
877,
524,
29953,
29946,
2824,
690,
14443,
6278,
29896,
29892,
29871,
29896,
29897,
13,
13,
9651,
10153,
353,
282,
22352,
29889,
517,
29918,
20158,
29898,
29916,
29918,
1272,
29897,
13,
9651,
3858,
353,
282,
22352,
29889,
517,
29918,
20158,
29898,
29891,
29918,
1272,
29897,
13,
13,
9651,
714,
353,
1904,
29898,
2492,
29897,
13,
9651,
1035,
29918,
3332,
29896,
353,
22576,
29889,
29277,
29889,
562,
2764,
4135,
29898,
2080,
29922,
449,
29892,
3858,
29922,
1643,
29892,
413,
29922,
29896,
29897,
13,
9651,
1035,
29918,
3332,
29945,
353,
22576,
29889,
29277,
29889,
562,
2764,
4135,
29898,
2080,
29922,
449,
29892,
3858,
29922,
1643,
29892,
413,
29922,
29945,
29897,
13,
9651,
19745,
29918,
5753,
29918,
3332,
29896,
29918,
1761,
29889,
4397,
29898,
7411,
29898,
5753,
29918,
3332,
29896,
29889,
23749,
22130,
13,
13,
9651,
565,
9853,
29918,
333,
1273,
29871,
29945,
29900,
1275,
29871,
29900,
29901,
13,
18884,
903,
21707,
29889,
3888,
703,
3057,
891,
2180,
4331,
426,
6177,
1035,
29896,
353,
12365,
1118,
1035,
29945,
353,
426,
3854,
1642,
4830,
29898,
13,
462,
1678,
9853,
29918,
333,
29892,
1035,
29918,
3332,
29896,
29889,
23749,
3285,
1035,
29918,
3332,
29945,
29889,
23749,
22130,
13,
13,
9651,
565,
9853,
29918,
1949,
1405,
29871,
29900,
322,
9853,
29918,
333,
718,
29871,
29896,
6736,
9853,
29918,
1949,
29901,
13,
18884,
2867,
13,
13,
4706,
19745,
29918,
5753,
29918,
3332,
29896,
353,
2533,
29898,
14513,
29918,
5753,
29918,
3332,
29896,
29918,
1761,
29897,
847,
7431,
29898,
14513,
29918,
5753,
29918,
3332,
29896,
29918,
1761,
29897,
13,
13,
4706,
736,
19745,
29918,
5753,
29918,
3332,
29896,
13,
13,
1678,
822,
1824,
29918,
1688,
29898,
1311,
29892,
1824,
29918,
2084,
29892,
9853,
29918,
1949,
10457,
29896,
29892,
9853,
29918,
2311,
29922,
29947,
1125,
13,
4706,
429,
29872,
353,
282,
22352,
29889,
7959,
29889,
13366,
29898,
29886,
22352,
29889,
6271,
4897,
1265,
3101,
13,
4706,
518,
262,
1659,
29918,
8860,
29892,
8343,
29918,
5182,
29918,
7039,
29892,
6699,
29918,
5182,
29879,
13,
308,
4514,
353,
313,
29886,
22352,
29889,
7959,
29889,
1359,
29918,
262,
1659,
29918,
4299,
29898,
8860,
29918,
2084,
29892,
429,
29872,
876,
13,
13,
4706,
1243,
29918,
16950,
353,
282,
22352,
29889,
16175,
29898,
29886,
22352,
29889,
24713,
29889,
23521,
391,
29889,
1688,
3285,
13,
462,
462,
259,
9853,
29918,
2311,
29922,
16175,
29918,
2311,
29897,
13,
13,
4706,
2246,
29896,
29918,
15728,
29918,
1949,
353,
29871,
29900,
29889,
13,
4706,
3001,
29918,
1949,
353,
29871,
29900,
29889,
13,
4706,
363,
9853,
29918,
333,
29892,
848,
297,
26985,
29898,
1688,
29918,
16950,
580,
1125,
13,
9651,
10153,
353,
7442,
29889,
2378,
4197,
29916,
29961,
29900,
1822,
690,
14443,
29898,
29896,
29892,
29871,
29906,
29947,
29892,
29871,
29906,
29947,
29897,
13,
462,
9651,
363,
921,
297,
848,
14664,
579,
668,
877,
7411,
29941,
29906,
1495,
13,
9651,
3858,
353,
7442,
29889,
2378,
4197,
29916,
29961,
29896,
29962,
363,
921,
297,
848,
14664,
579,
668,
877,
524,
29953,
29946,
1495,
13,
13,
9651,
8343,
353,
426,
18798,
29918,
5182,
29918,
7039,
29961,
29900,
5387,
10153,
29913,
13,
9651,
2582,
353,
429,
29872,
29889,
3389,
29898,
262,
1659,
29918,
8860,
29892,
13,
462,
795,
8343,
29922,
18798,
29892,
13,
462,
795,
6699,
29918,
1761,
29922,
9155,
29918,
5182,
29879,
29897,
13,
13,
9651,
4450,
353,
7442,
29889,
1191,
3317,
29898,
9902,
29961,
29900,
1402,
9685,
29922,
29896,
29897,
13,
9651,
2246,
29896,
29918,
15728,
29918,
1949,
4619,
7442,
29889,
2083,
29898,
9302,
29889,
11745,
29898,
11965,
29892,
3858,
876,
13,
9651,
3001,
29918,
1949,
4619,
7431,
29898,
2492,
29897,
13,
13,
9651,
565,
3001,
29918,
1949,
1273,
29871,
29945,
29900,
1275,
29871,
29946,
29929,
29901,
13,
18884,
903,
21707,
29889,
3888,
703,
3057,
891,
4321,
954,
426,
6177,
1035,
29896,
353,
426,
3854,
1642,
4830,
29898,
13,
462,
1678,
3001,
29918,
1949,
29892,
2246,
29896,
29918,
15728,
29918,
1949,
847,
3001,
29918,
1949,
876,
13,
13,
9651,
565,
9853,
29918,
1949,
1405,
29871,
29900,
322,
9853,
29918,
333,
718,
29871,
29896,
6736,
9853,
29918,
1949,
29901,
13,
18884,
2867,
13,
4706,
736,
2246,
29896,
29918,
15728,
29918,
1949,
847,
3001,
29918,
1949,
13,
13,
1678,
822,
3653,
29918,
415,
29939,
29898,
1311,
1125,
13,
4706,
1369,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
13,
4706,
1583,
29889,
842,
29918,
16908,
580,
13,
13,
4706,
396,
16012,
1904,
13,
4706,
8636,
29918,
2084,
353,
1583,
29889,
10382,
29918,
4299,
29898,
1311,
29889,
2435,
300,
29918,
2271,
29892,
1583,
29889,
2435,
300,
29918,
3487,
29945,
29892,
13,
462,
462,
3986,
376,
2435,
300,
1159,
13,
4706,
8636,
29918,
2084,
4619,
5591,
2435,
300,
29918,
1457,
3018,
1312,
29914,
2435,
300,
29889,
15926,
7529,
29908,
13,
13,
4706,
1904,
353,
12607,
1230,
21515,
300,
580,
13,
4706,
1904,
29918,
3859,
29918,
8977,
353,
282,
22352,
29889,
1359,
29898,
7529,
29918,
2084,
29897,
13,
4706,
1904,
29889,
842,
29918,
3859,
29918,
8977,
29898,
4299,
29918,
3859,
29918,
8977,
29897,
13,
4706,
396,
22746,
675,
29892,
1208,
4626,
403,
322,
4078,
13,
4706,
4323,
29918,
4299,
353,
1583,
29889,
415,
29939,
29889,
12150,
675,
29898,
4299,
29897,
13,
4706,
1434,
29918,
5753,
29918,
3332,
29896,
353,
1583,
29889,
4299,
29918,
1688,
29898,
12150,
29918,
4299,
29892,
1583,
29889,
16175,
29918,
1949,
29892,
13,
462,
462,
3986,
1583,
29889,
16175,
29918,
2311,
29897,
13,
13,
4706,
1881,
29918,
6550,
353,
518,
13,
9651,
282,
22352,
29889,
7959,
29889,
4290,
10299,
29898,
12181,
11759,
8516,
29892,
29871,
29896,
29892,
29871,
29906,
29947,
29892,
29871,
29906,
29947,
1402,
26688,
2433,
7411,
29941,
29906,
1495,
13,
4706,
4514,
13,
4706,
1583,
29889,
415,
29939,
29889,
7620,
29918,
12150,
1891,
29918,
4299,
29898,
4299,
29922,
12150,
29918,
4299,
29892,
13,
462,
462,
418,
2224,
29922,
1311,
29889,
7620,
29918,
2084,
29892,
13,
462,
462,
418,
1881,
29918,
6550,
29922,
2080,
29918,
6550,
29897,
13,
4706,
1596,
877,
22930,
1891,
1904,
7160,
297,
18674,
29879,
10162,
1273,
1583,
29889,
7620,
29918,
2084,
29897,
13,
13,
4706,
1156,
29918,
5753,
29918,
3332,
29896,
353,
1583,
29889,
4299,
29918,
1688,
29898,
12150,
29918,
4299,
29892,
1583,
29889,
16175,
29918,
1949,
29892,
13,
462,
462,
308,
1583,
29889,
16175,
29918,
2311,
29897,
13,
13,
4706,
282,
22352,
29889,
12007,
29918,
7959,
580,
13,
4706,
10115,
29918,
5753,
29918,
3332,
29896,
353,
1583,
29889,
8860,
29918,
1688,
29898,
1311,
29889,
7620,
29918,
2084,
29892,
1583,
29889,
16175,
29918,
1949,
29892,
13,
462,
462,
965,
1583,
29889,
16175,
29918,
2311,
29897,
13,
4706,
282,
22352,
29889,
20472,
29918,
7959,
580,
13,
13,
4706,
396,
5399,
13,
4706,
1596,
877,
18743,
11543,
1035,
29918,
3332,
29896,
29901,
1273,
29879,
29915,
1273,
1434,
29918,
5753,
29918,
3332,
29896,
29897,
13,
4706,
1596,
877,
13555,
11543,
1035,
29918,
3332,
29896,
29901,
1273,
29879,
29915,
1273,
1156,
29918,
5753,
29918,
3332,
29896,
29897,
13,
4706,
1596,
877,
797,
571,
1035,
29918,
3332,
29896,
29901,
1273,
29879,
29915,
1273,
10115,
29918,
5753,
29918,
3332,
29896,
29897,
13,
13,
4706,
1583,
29889,
9294,
5574,
29898,
7045,
29918,
5753,
29918,
3332,
29896,
6736,
1583,
29889,
14513,
29918,
5753,
29918,
3332,
29896,
29892,
13,
462,
4706,
10191,
543,
1576,
1243,
1035,
18674,
29888,
29913,
338,
3109,
1135,
18674,
29888,
29913,
1213,
1273,
13,
462,
4706,
313,
7045,
29918,
5753,
29918,
3332,
29896,
29892,
1583,
29889,
14513,
29918,
5753,
29918,
3332,
29896,
876,
13,
4706,
1583,
29889,
9294,
5574,
29898,
262,
571,
29918,
5753,
29918,
3332,
29896,
6736,
1156,
29918,
5753,
29918,
3332,
29896,
29892,
13,
462,
4706,
10191,
2433,
1576,
1035,
338,
5224,
1156,
17415,
1904,
29889,
1495,
13,
13,
4706,
1095,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
4706,
1596,
703,
7827,
931,
29901,
1273,
893,
320,
29876,
29908,
1273,
313,
355,
29918,
2230,
448,
1369,
29918,
2230,
876,
13,
13,
1678,
822,
1243,
29918,
415,
29939,
29898,
1311,
1125,
13,
4706,
411,
903,
1688,
29918,
29872,
1875,
29918,
17728,
7295,
13,
9651,
1583,
29889,
9891,
29918,
415,
29939,
580,
13,
4706,
1583,
29889,
9891,
29918,
415,
29939,
580,
13,
13,
13,
1990,
4321,
1888,
546,
1230,
7982,
29984,
29888,
1509,
29898,
3057,
1888,
546,
1230,
7982,
29984,
1125,
13,
13,
1678,
822,
3653,
29918,
415,
29939,
29898,
1311,
1125,
13,
4706,
1369,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
13,
4706,
1583,
29889,
842,
29918,
16908,
580,
13,
13,
4706,
396,
16012,
1904,
13,
4706,
8636,
29918,
2084,
353,
1583,
29889,
10382,
29918,
4299,
29898,
1311,
29889,
2435,
300,
29918,
2271,
29892,
1583,
29889,
2435,
300,
29918,
3487,
29945,
29892,
13,
462,
462,
3986,
376,
2435,
300,
1159,
13,
4706,
8636,
29918,
2084,
4619,
5591,
2435,
300,
29918,
1457,
3018,
1312,
29914,
2435,
300,
29889,
15926,
7529,
29908,
13,
13,
4706,
1904,
353,
12607,
1230,
21515,
300,
580,
13,
4706,
1904,
29918,
3859,
29918,
8977,
353,
282,
22352,
29889,
1359,
29898,
7529,
29918,
2084,
29897,
13,
4706,
1904,
29889,
842,
29918,
3859,
29918,
8977,
29898,
4299,
29918,
3859,
29918,
8977,
29897,
13,
4706,
396,
22746,
675,
29892,
1208,
4626,
403,
322,
4078,
13,
4706,
285,
29918,
29880,
353,
518,
1839,
22100,
29889,
29900,
742,
525,
22100,
29889,
29896,
7464,
6024,
22100,
29889,
29946,
742,
525,
22100,
29889,
29945,
2033,
29962,
13,
4706,
4323,
29918,
4299,
353,
1583,
29889,
415,
29939,
29889,
12150,
675,
29898,
4299,
29892,
285,
1509,
29922,
5574,
29892,
285,
1509,
29918,
1761,
29922,
29888,
29918,
29880,
29897,
13,
4706,
363,
1024,
29892,
7546,
297,
4323,
29918,
4299,
29889,
17514,
29918,
1491,
29277,
7295,
13,
9651,
565,
1024,
297,
285,
29918,
29880,
29901,
13,
18884,
4974,
451,
313,
275,
8758,
29898,
13148,
29892,
302,
29876,
29889,
23145,
29940,
555,
29896,
29928,
29897,
13,
462,
9651,
470,
338,
8758,
29898,
13148,
29892,
302,
29876,
29889,
23145,
29940,
555,
29906,
29928,
876,
13,
4706,
1434,
29918,
5753,
29918,
3332,
29896,
353,
1583,
29889,
4299,
29918,
1688,
29898,
12150,
29918,
4299,
29892,
1583,
29889,
16175,
29918,
1949,
29892,
13,
462,
462,
3986,
1583,
29889,
16175,
29918,
2311,
29897,
13,
13,
4706,
1881,
29918,
6550,
353,
518,
13,
9651,
282,
22352,
29889,
7959,
29889,
4290,
10299,
29898,
12181,
11759,
8516,
29892,
29871,
29896,
29892,
29871,
29906,
29947,
29892,
29871,
29906,
29947,
1402,
26688,
2433,
7411,
29941,
29906,
1495,
13,
4706,
4514,
13,
4706,
1583,
29889,
415,
29939,
29889,
7620,
29918,
12150,
1891,
29918,
4299,
29898,
4299,
29922,
12150,
29918,
4299,
29892,
13,
462,
462,
418,
2224,
29922,
1311,
29889,
7620,
29918,
2084,
29892,
13,
462,
462,
418,
1881,
29918,
6550,
29922,
2080,
29918,
6550,
29897,
13,
4706,
1596,
877,
22930,
1891,
1904,
7160,
297,
18674,
29879,
10162,
1273,
1583,
29889,
7620,
29918,
2084,
29897,
13,
13,
4706,
1156,
29918,
5753,
29918,
3332,
29896,
353,
1583,
29889,
4299,
29918,
1688,
29898,
12150,
29918,
4299,
29892,
1583,
29889,
16175,
29918,
1949,
29892,
13,
462,
462,
308,
1583,
29889,
16175,
29918,
2311,
29897,
13,
13,
4706,
282,
22352,
29889,
12007,
29918,
7959,
580,
13,
4706,
10115,
29918,
5753,
29918,
3332,
29896,
353,
1583,
29889,
8860,
29918,
1688,
29898,
1311,
29889,
7620,
29918,
2084,
29892,
1583,
29889,
16175,
29918,
1949,
29892,
13,
462,
462,
965,
1583,
29889,
16175,
29918,
2311,
29897,
13,
4706,
282,
22352,
29889,
20472,
29918,
7959,
580,
13,
13,
4706,
396,
5399,
13,
4706,
1596,
877,
18743,
11543,
1035,
29918,
3332,
29896,
29901,
1273,
29879,
29915,
1273,
1434,
29918,
5753,
29918,
3332,
29896,
29897,
13,
4706,
1596,
877,
13555,
11543,
1035,
29918,
3332,
29896,
29901,
1273,
29879,
29915,
1273,
1156,
29918,
5753,
29918,
3332,
29896,
29897,
13,
4706,
1596,
877,
797,
571,
1035,
29918,
3332,
29896,
29901,
1273,
29879,
29915,
1273,
10115,
29918,
5753,
29918,
3332,
29896,
29897,
13,
13,
4706,
396,
5596,
3692,
278,
4323,
29918,
4299,
338,
1959,
1156,
17415,
29889,
13,
4706,
396,
1576,
1035,
310,
4323,
1891,
1904,
881,
367,
6133,
1135,
29871,
29900,
29889,
29929,
29945,
29889,
13,
4706,
1583,
29889,
9294,
5574,
29898,
7045,
29918,
5753,
29918,
3332,
29896,
6736,
1583,
29889,
14513,
29918,
5753,
29918,
3332,
29896,
29892,
13,
462,
4706,
10191,
543,
1576,
1243,
1035,
18674,
29888,
29913,
338,
3109,
1135,
18674,
29888,
29913,
1213,
1273,
13,
462,
4706,
313,
7045,
29918,
5753,
29918,
3332,
29896,
29892,
1583,
29889,
14513,
29918,
5753,
29918,
3332,
29896,
876,
13,
4706,
396,
5596,
278,
7160,
10115,
29918,
4299,
29889,
1576,
1035,
310,
10115,
1904,
13,
4706,
396,
9344,
451,
367,
5224,
1135,
278,
697,
310,
13475,
4262,
1904,
29889,
13,
4706,
1583,
29889,
9294,
5574,
29898,
262,
571,
29918,
5753,
29918,
3332,
29896,
6736,
1156,
29918,
5753,
29918,
3332,
29896,
29892,
13,
462,
4706,
10191,
2433,
1576,
1035,
338,
5224,
1156,
17415,
1904,
29889,
1495,
13,
13,
4706,
1095,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
4706,
1596,
703,
7827,
931,
29901,
1273,
893,
320,
29876,
29908,
1273,
313,
355,
29918,
2230,
448,
1369,
29918,
2230,
876,
13,
13,
1678,
822,
1243,
29918,
415,
29939,
29898,
1311,
1125,
13,
4706,
411,
903,
1688,
29918,
29872,
1875,
29918,
17728,
7295,
13,
9651,
1583,
29889,
9891,
29918,
415,
29939,
580,
13,
4706,
1583,
29889,
9891,
29918,
415,
29939,
580,
13,
13,
13,
1990,
4321,
1888,
546,
1230,
7982,
29984,
29950,
391,
29898,
3057,
1888,
546,
1230,
7982,
29984,
1125,
13,
13,
1678,
822,
731,
29918,
16908,
29898,
1311,
1125,
13,
4706,
2295,
353,
349,
29911,
29984,
3991,
29898,
29950,
391,
22930,
3950,
3285,
24650,
3317,
22930,
3950,
3101,
13,
4706,
1583,
29889,
415,
29939,
353,
12607,
1230,
7982,
29984,
29898,
2917,
29897,
13,
13,
4706,
1583,
29889,
16175,
29918,
1949,
353,
29871,
29896,
29900,
13,
4706,
1583,
29889,
16175,
29918,
2311,
353,
29871,
29896,
29900,
13,
4706,
1583,
29889,
14513,
29918,
5753,
29918,
3332,
29896,
353,
29871,
29900,
29889,
29929,
29947,
13,
13,
4706,
1583,
29889,
4141,
29918,
386,
3781,
3361,
353,
426,
13,
9651,
525,
20580,
29906,
29881,
29918,
29900,
2396,
5519,
29900,
29889,
29929,
29929,
29947,
29945,
29941,
29945,
29896,
29945,
29953,
29906,
29945,
1402,
518,
29900,
29889,
29941,
29945,
29955,
29941,
29906,
29941,
29929,
29896,
29955,
29955,
29896,
29941,
29953,
29946,
29906,
29906,
29945,
1402,
13,
462,
308,
518,
29900,
29889,
29896,
29900,
29929,
29941,
29941,
29955,
29941,
29906,
29906,
29946,
29896,
29941,
29929,
29906,
29896,
29941,
29953,
20526,
13,
9651,
525,
16175,
29918,
12324,
29906,
29881,
29918,
29900,
2396,
5519,
29900,
29889,
29941,
29945,
29955,
29941,
29906,
29941,
29929,
29896,
29955,
29955,
29896,
29941,
29953,
29946,
29906,
29906,
29945,
1402,
518,
29900,
29889,
29946,
29906,
29929,
29896,
29946,
29906,
29955,
29947,
29953,
29947,
29955,
29953,
29896,
29906,
29955,
29945,
20526,
13,
9651,
525,
276,
29918,
6092,
29918,
29900,
2396,
5519,
29900,
29889,
29946,
29906,
29929,
29896,
29946,
29906,
29955,
29947,
29953,
29947,
29955,
29953,
29896,
29906,
29955,
29945,
1402,
518,
29900,
29889,
29906,
29941,
29945,
29929,
29929,
29896,
29947,
29896,
29896,
29900,
29955,
29946,
29906,
29900,
29900,
29896,
20526,
13,
9651,
525,
3317,
29918,
10109,
29906,
29881,
29918,
29900,
2396,
5519,
29900,
29889,
29906,
29941,
29945,
29929,
29929,
29896,
29947,
29896,
29896,
29900,
29955,
29946,
29906,
29900,
29900,
29896,
1402,
518,
29900,
29889,
29906,
29945,
29953,
29953,
29945,
29945,
29906,
29953,
29929,
29896,
29955,
29896,
29946,
29953,
29900,
29945,
29941,
20526,
13,
9651,
525,
10660,
29918,
29900,
2396,
5519,
29896,
29889,
29955,
29900,
29941,
29955,
29953,
29900,
29941,
29946,
29955,
29945,
29896,
29945,
29906,
29929,
29929,
29896,
1402,
518,
29896,
29946,
29889,
29941,
29929,
29945,
29906,
29906,
29946,
29945,
29906,
29906,
29946,
29955,
29941,
29900,
29906,
29953,
1402,
13,
462,
308,
518,
29900,
29889,
29946,
29941,
29955,
29941,
29941,
29945,
29945,
29906,
29900,
29929,
29947,
29906,
29955,
29946,
29906,
29941,
20526,
13,
9651,
525,
1202,
29918,
29900,
2396,
5519,
29896,
29889,
29955,
29900,
29941,
29955,
29953,
29900,
29941,
29946,
29955,
29945,
29896,
29945,
29906,
29929,
29929,
29896,
29892,
29871,
29900,
29889,
29900,
1402,
518,
29896,
29889,
29955,
29900,
29941,
29955,
29953,
29900,
29941,
29946,
29955,
29945,
29896,
29945,
29906,
29929,
29929,
29896,
20526,
13,
4706,
500,
13,
13,
13,
1990,
4321,
1888,
546,
1230,
7982,
29984,
29968,
29931,
29898,
3057,
1888,
546,
1230,
7982,
29984,
1125,
13,
13,
1678,
822,
731,
29918,
16908,
29898,
1311,
1125,
13,
4706,
2295,
353,
349,
29911,
29984,
3991,
29898,
29968,
29931,
22930,
3950,
3285,
2431,
13599,
4920,
29879,
3317,
22930,
3950,
3101,
13,
4706,
1583,
29889,
415,
29939,
353,
12607,
1230,
7982,
29984,
29898,
2917,
29897,
13,
13,
4706,
1583,
29889,
16175,
29918,
1949,
353,
29871,
29896,
29900,
13,
4706,
1583,
29889,
16175,
29918,
2311,
353,
29871,
29896,
29900,
13,
4706,
1583,
29889,
14513,
29918,
5753,
29918,
3332,
29896,
353,
29871,
29896,
29889,
29900,
13,
13,
4706,
7602,
29906,
29881,
29918,
29896,
29918,
14554,
29918,
386,
3781,
3361,
353,
518,
13,
632,
29900,
29889,
29896,
29947,
29896,
29896,
29953,
29945,
29953,
29900,
29945,
29955,
29947,
29941,
29946,
29953,
29906,
29945,
29906,
29892,
29871,
29900,
29889,
29896,
29955,
29900,
29955,
29929,
29906,
29946,
29896,
29945,
29955,
29941,
29947,
29896,
29900,
29945,
29955,
29955,
29892,
29871,
29900,
29889,
29896,
29955,
29900,
29906,
29900,
29946,
29955,
29947,
29947,
29946,
29946,
29953,
29946,
29906,
29953,
29946,
29892,
13,
632,
29900,
29889,
29896,
29955,
29929,
29946,
29955,
29953,
29955,
29929,
29955,
29945,
29947,
29900,
29955,
29896,
29929,
29892,
29871,
29900,
29889,
29896,
29946,
29945,
29946,
29941,
29955,
29945,
29953,
29947,
29946,
29906,
29953,
29896,
29941,
29906,
29906,
29892,
29871,
29900,
29889,
29906,
29906,
29929,
29947,
29896,
29947,
29945,
29947,
29906,
29945,
29941,
29946,
29955,
29929,
29900,
29900,
29946,
13,
4706,
4514,
13,
4706,
1583,
29889,
4141,
29918,
386,
3781,
3361,
353,
426,
13,
9651,
525,
20580,
29906,
29881,
29918,
29900,
2396,
5519,
29900,
29889,
29929,
29929,
29906,
29953,
29955,
29945,
29955,
29947,
29896,
29906,
29945,
1402,
518,
29900,
29889,
29941,
29955,
29953,
29929,
29945,
29929,
29896,
29941,
29945,
29945,
29947,
29953,
29929,
29953,
29947,
29941,
29953,
20526,
13,
9651,
525,
20580,
29906,
29881,
29918,
29896,
2396,
5519,
29900,
29889,
29896,
29929,
29896,
29947,
29929,
29906,
29929,
29953,
29955,
29945,
29955,
29941,
29929,
29946,
29929,
29896,
29946,
1402,
518,
29900,
29889,
29906,
29946,
29945,
29896,
29946,
29906,
29945,
29953,
29945,
29946,
29955,
29906,
29953,
29941,
29941,
29945,
29947,
1402,
13,
462,
308,
518,
20580,
29906,
29881,
29918,
29896,
29918,
14554,
29918,
386,
3781,
3361,
20526,
13,
9651,
525,
16175,
29918,
12324,
29906,
29881,
29918,
29900,
2396,
5519,
29900,
29889,
29941,
29955,
29953,
29929,
29945,
29929,
29896,
29941,
29945,
29945,
29947,
29953,
29929,
29953,
29947,
29941,
29953,
1402,
518,
29900,
29889,
29906,
29955,
29946,
29953,
29906,
29945,
29946,
29896,
29946,
29906,
29929,
29946,
29946,
29900,
29945,
29941,
29945,
20526,
13,
9651,
525,
276,
29918,
6092,
29918,
29900,
2396,
5519,
29900,
29889,
29906,
29955,
29946,
29953,
29906,
29945,
29946,
29896,
29946,
29906,
29929,
29946,
29946,
29900,
29945,
29941,
29945,
1402,
518,
29900,
29889,
29896,
29929,
29896,
29947,
29929,
29906,
29929,
29953,
29955,
29945,
29955,
29941,
29929,
29946,
29929,
29896,
29946,
20526,
13,
9651,
525,
3317,
29918,
10109,
29906,
29881,
29918,
29900,
2396,
5519,
29900,
29889,
29896,
29929,
29896,
29947,
29929,
29906,
29929,
29953,
29955,
29945,
29955,
29941,
29929,
29946,
29929,
29896,
29946,
1402,
518,
29900,
29889,
29896,
29929,
29896,
29947,
29929,
29906,
29929,
29953,
29955,
29945,
29955,
29941,
29929,
29946,
29929,
29896,
29946,
20526,
13,
9651,
525,
10660,
29918,
29900,
2396,
5519,
29896,
29889,
29906,
29947,
29941,
29929,
29941,
29906,
29906,
29896,
29953,
29941,
29953,
29896,
29896,
29900,
29947,
29955,
1402,
518,
29947,
29889,
29929,
29945,
29955,
29896,
29947,
29945,
29929,
29946,
29906,
29946,
29896,
29946,
29941,
29945,
29906,
20526,
13,
9651,
525,
1202,
29918,
29900,
2396,
5519,
29896,
29889,
29906,
29947,
29941,
29929,
29941,
29906,
29906,
29896,
29953,
29941,
29953,
29896,
29896,
29900,
29947,
29955,
29892,
29871,
29900,
29889,
29900,
1402,
518,
29896,
29889,
29906,
29947,
29941,
29929,
29941,
29906,
29906,
29896,
29953,
29941,
29953,
29896,
29896,
29900,
29947,
29955,
20526,
13,
4706,
500,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
443,
27958,
29889,
3396,
580,
13,
2
] |
examples/test_buckcol.py | Tarheel-Formal-Methods/kaa-optimize | 0 | 71187 | from models.buckcol import BuckCol_UnitBox
from kaa.experi_init import *
from kaa.timer import Timer
def test_box_BuckCol():
num_steps = 4
model = BuckCol_UnitBox()
experi_input = dict(model=model,
strat=None,
label=f"BuckCol Box Reachable Set",
num_steps=num_steps)
experi = PhasePlotExperiment(experi_input)
experi.execute(0, 1, plot_border_traj=True)
Timer.generate_stats()
def test_sliding_equal_BuckCol():
num_steps = 60
model = BuckCol_UnitBox()
test_equal_sliding_strat(model, num_steps)
def test_max_sliding_lin_strat_BuckCol():
num_steps = 20
model = BuckCol_UnitBox()
test_max_sliding_lin_strat(model, num_steps)
def test_pca_dominant_BuckCol():
num_steps = 20
model = BuckCol_UnitBox()
use_supp = True
use_pregen = False
num_trajs = 5000
pca_strat = SlidingPCAStrat(model, lifespan=5)
lin_strat = SlidingLinStrat(model, lifespan=15)
experi_input = dict(model=model,
strat=MultiStrategy(pca_strat, lin_strat),
label=f"SlidingPCA Size 15, SlidingLin Size 5",
supp_mode = use_supp,
pregen_mode = use_pregen,
num_trajs=num_trajs,
num_steps=num_steps-1,
max_steps=num_steps)
if use_supp:
file_identifier = "(SUPP)"
elif use_pregen:
file_identifier = f"(PREGEN: {num_trajs})"
else:
file_identifier = "(RAND)"
experi = PhasePlotExperiment(experi_input)
experi.execute(0, 1, plot_border_traj=True)
Timer.generate_stats()
| [
1,
515,
4733,
29889,
2423,
384,
1054,
1053,
16281,
1625,
29918,
8325,
3313,
13,
3166,
413,
7340,
29889,
735,
546,
29875,
29918,
2344,
1053,
334,
13,
13,
3166,
413,
7340,
29889,
20404,
1053,
29168,
13,
13,
1753,
1243,
29918,
1884,
29918,
29933,
2707,
1625,
7295,
13,
1678,
954,
29918,
24530,
353,
29871,
29946,
13,
13,
1678,
1904,
353,
16281,
1625,
29918,
8325,
3313,
580,
13,
13,
1678,
2902,
29875,
29918,
2080,
353,
9657,
29898,
4299,
29922,
4299,
29892,
13,
462,
4706,
26742,
29922,
8516,
29892,
13,
462,
4706,
3858,
29922,
29888,
29908,
29933,
2707,
1625,
11773,
830,
496,
519,
3789,
613,
13,
462,
4706,
954,
29918,
24530,
29922,
1949,
29918,
24530,
29897,
13,
13,
1678,
2902,
29875,
353,
1963,
559,
20867,
1252,
15362,
29898,
735,
546,
29875,
29918,
2080,
29897,
13,
1678,
2902,
29875,
29889,
7978,
29898,
29900,
29892,
29871,
29896,
29892,
6492,
29918,
11466,
29918,
3018,
29926,
29922,
5574,
29897,
13,
1678,
29168,
29889,
17158,
29918,
16202,
580,
13,
13,
1753,
1243,
29918,
2536,
4821,
29918,
11745,
29918,
29933,
2707,
1625,
7295,
13,
1678,
954,
29918,
24530,
353,
29871,
29953,
29900,
13,
1678,
1904,
353,
29871,
16281,
1625,
29918,
8325,
3313,
580,
13,
1678,
1243,
29918,
11745,
29918,
2536,
4821,
29918,
710,
271,
29898,
4299,
29892,
954,
29918,
24530,
29897,
13,
13,
1753,
1243,
29918,
3317,
29918,
2536,
4821,
29918,
1915,
29918,
710,
271,
29918,
29933,
2707,
1625,
7295,
13,
1678,
954,
29918,
24530,
353,
29871,
29906,
29900,
13,
1678,
1904,
353,
29871,
16281,
1625,
29918,
8325,
3313,
580,
13,
1678,
1243,
29918,
3317,
29918,
2536,
4821,
29918,
1915,
29918,
710,
271,
29898,
4299,
29892,
954,
29918,
24530,
29897,
13,
13,
1753,
1243,
29918,
29886,
1113,
29918,
24130,
424,
29918,
29933,
2707,
1625,
7295,
13,
1678,
954,
29918,
24530,
353,
29871,
29906,
29900,
13,
1678,
1904,
353,
16281,
1625,
29918,
8325,
3313,
580,
13,
13,
1678,
671,
29918,
19303,
353,
5852,
13,
1678,
671,
29918,
1457,
1885,
353,
7700,
13,
13,
1678,
954,
29918,
3018,
1315,
353,
29871,
29945,
29900,
29900,
29900,
13,
13,
1678,
282,
1113,
29918,
710,
271,
353,
14866,
4821,
9026,
3289,
26614,
29898,
4299,
29892,
11747,
267,
8357,
29922,
29945,
29897,
13,
1678,
6276,
29918,
710,
271,
353,
14866,
4821,
11667,
5015,
271,
29898,
4299,
29892,
11747,
267,
8357,
29922,
29896,
29945,
29897,
13,
13,
1678,
2902,
29875,
29918,
2080,
353,
9657,
29898,
4299,
29922,
4299,
29892,
13,
462,
4706,
26742,
29922,
15329,
26910,
29898,
29886,
1113,
29918,
710,
271,
29892,
6276,
29918,
710,
271,
511,
13,
462,
4706,
3858,
29922,
29888,
29908,
16973,
4821,
29925,
5454,
21179,
29871,
29896,
29945,
29892,
14866,
4821,
11667,
21179,
29871,
29945,
613,
13,
462,
4706,
1462,
29918,
8513,
353,
671,
29918,
19303,
29892,
13,
462,
4706,
758,
1885,
29918,
8513,
353,
671,
29918,
1457,
1885,
29892,
13,
462,
4706,
954,
29918,
3018,
1315,
29922,
1949,
29918,
3018,
1315,
29892,
13,
462,
4706,
954,
29918,
24530,
29922,
1949,
29918,
24530,
29899,
29896,
29892,
13,
462,
4706,
4236,
29918,
24530,
29922,
1949,
29918,
24530,
29897,
13,
13,
1678,
565,
671,
29918,
19303,
29901,
13,
4706,
934,
29918,
25378,
353,
18227,
29903,
4897,
29925,
5513,
13,
1678,
25342,
671,
29918,
1457,
1885,
29901,
13,
4706,
934,
29918,
25378,
353,
285,
29908,
29898,
15094,
24647,
29901,
426,
1949,
29918,
3018,
1315,
1800,
29908,
13,
1678,
1683,
29901,
13,
4706,
934,
29918,
25378,
353,
18227,
29934,
9468,
5513,
13,
13,
1678,
2902,
29875,
353,
1963,
559,
20867,
1252,
15362,
29898,
735,
546,
29875,
29918,
2080,
29897,
13,
1678,
2902,
29875,
29889,
7978,
29898,
29900,
29892,
29871,
29896,
29892,
6492,
29918,
11466,
29918,
3018,
29926,
29922,
5574,
29897,
13,
1678,
29168,
29889,
17158,
29918,
16202,
580,
13,
2
] |
destiny_timelost/constants.py | dmfigol/destiny-timelost | 0 | 125118 | <gh_stars>0
GOOGLE_SHEET_URL = (
"https://sheets.googleapis.com/v4/spreadsheets/{sheet_id}/values/{table_name}"
)
LOGGING_DICT = {
"version": 1,
"disable_existing_loggers": False,
"formatters": {"standard": {"format": "%(message)s"}},
"handlers": {
"file": {
"level": "INFO",
"class": "logging.handlers.RotatingFileHandler",
"filename": "app.log",
"maxBytes": 1024 * 1024 * 5,
"backupCount": 5,
"formatter": "standard",
},
"console": {
"level": "INFO",
"class": "logging.StreamHandler",
"stream": "ext://sys.stdout",
"formatter": "standard",
},
},
"loggers": {},
"root": {"handlers": ["file"], "level": "INFO"},
}
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
17080,
29949,
29954,
1307,
29918,
7068,
29923,
2544,
29918,
4219,
353,
313,
13,
1678,
376,
991,
597,
19360,
29889,
15947,
29889,
510,
29914,
29894,
29946,
29914,
1028,
949,
19360,
19248,
9855,
29918,
333,
6822,
5975,
19248,
2371,
29918,
978,
5038,
13,
29897,
13,
13,
14480,
29954,
4214,
29918,
4571,
1783,
353,
426,
13,
1678,
376,
3259,
1115,
29871,
29896,
29892,
13,
1678,
376,
20472,
29918,
735,
15423,
29918,
1188,
5743,
1115,
7700,
29892,
13,
1678,
376,
4830,
2153,
1115,
8853,
15770,
1115,
8853,
4830,
1115,
11860,
29898,
4906,
29897,
29879,
29908,
11656,
13,
1678,
376,
3179,
9306,
1115,
426,
13,
4706,
376,
1445,
1115,
426,
13,
9651,
376,
5563,
1115,
376,
11690,
613,
13,
9651,
376,
1990,
1115,
376,
21027,
29889,
3179,
9306,
29889,
21281,
1218,
2283,
4598,
613,
13,
9651,
376,
9507,
1115,
376,
932,
29889,
1188,
613,
13,
9651,
376,
3317,
11207,
1115,
29871,
29896,
29900,
29906,
29946,
334,
29871,
29896,
29900,
29906,
29946,
334,
29871,
29945,
29892,
13,
9651,
376,
1627,
786,
3981,
1115,
29871,
29945,
29892,
13,
9651,
376,
689,
2620,
1115,
376,
15770,
613,
13,
4706,
2981,
13,
4706,
376,
11058,
1115,
426,
13,
9651,
376,
5563,
1115,
376,
11690,
613,
13,
9651,
376,
1990,
1115,
376,
21027,
29889,
3835,
4598,
613,
13,
9651,
376,
5461,
1115,
376,
1062,
597,
9675,
29889,
25393,
613,
13,
9651,
376,
689,
2620,
1115,
376,
15770,
613,
13,
4706,
2981,
13,
1678,
2981,
13,
1678,
376,
1188,
5743,
1115,
24335,
13,
1678,
376,
4632,
1115,
8853,
3179,
9306,
1115,
6796,
1445,
12436,
376,
5563,
1115,
376,
11690,
10758,
13,
29913,
13,
2
] |
HW1/main.py | mapa17/LearningFromData | 0 | 43721 | <filename>HW1/main.py
# -*- coding: utf-8 -*-
"""
Created on Fri Nov 20 18:28:50 2015
@author: <NAME> , <EMAIL>
Homework Assignment from https://work.caltech.edu/telecourse.html
Simple Perceptron Learning Model Algorithm
"""
import sys
import errno
import random
def main(argv):
if len(argv) < 2:
print('Please specify the number of random Training sample Points N')
print('Usage %s N' % argv[0])
sys.exit(errno.EINVAL)
trainingData = createTestData(N)
def createTestData(N):
#Sample N random values in the range x =[-1,1], y=[-1,1], and asign them two either
#group 0, or 1 depending if the are left of x = 0 or right of it.
coordinates = [(-1.0 + random.random()*2.0, -1.0 + random.random()*2.0) for x in range(N)]
points = [ (p[0], p[1], 0) if p[0] < 0.0 else (p[0], p[1], 1) for p in coordinates]
return points
if __name__ == '__main__':
main(sys.argv) | [
1,
529,
9507,
29958,
29950,
29956,
29896,
29914,
3396,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
20399,
373,
11169,
2864,
29871,
29906,
29900,
29871,
29896,
29947,
29901,
29906,
29947,
29901,
29945,
29900,
29871,
29906,
29900,
29896,
29945,
13,
13,
29992,
8921,
29901,
529,
5813,
29958,
1919,
529,
26862,
6227,
29958,
13,
13,
11184,
1287,
4007,
10194,
515,
2045,
597,
1287,
29889,
1052,
11345,
29889,
6085,
29914,
15494,
15775,
29889,
1420,
13,
13,
15427,
2431,
1547,
1617,
29257,
8125,
29068,
13,
15945,
29908,
13,
5215,
10876,
13,
5215,
4589,
1217,
13,
5215,
4036,
13,
13,
13,
1753,
1667,
29898,
19218,
1125,
13,
1678,
565,
7431,
29898,
19218,
29897,
529,
29871,
29906,
29901,
13,
4706,
1596,
877,
12148,
6084,
278,
1353,
310,
4036,
26101,
4559,
8984,
29879,
405,
1495,
13,
4706,
1596,
877,
27573,
1273,
29879,
405,
29915,
1273,
1852,
29894,
29961,
29900,
2314,
13,
4706,
10876,
29889,
13322,
29898,
3127,
1217,
29889,
29923,
1177,
8932,
29897,
13,
268,
13,
1678,
6694,
1469,
353,
1653,
3057,
1469,
29898,
29940,
29897,
13,
268,
13,
13,
1753,
1653,
3057,
1469,
29898,
29940,
1125,
13,
1678,
396,
17708,
405,
4036,
1819,
297,
278,
3464,
921,
353,
14352,
29896,
29892,
29896,
1402,
343,
11759,
29899,
29896,
29892,
29896,
1402,
322,
408,
647,
963,
1023,
2845,
13,
1678,
396,
2972,
29871,
29900,
29892,
470,
29871,
29896,
8679,
565,
278,
526,
2175,
310,
921,
353,
29871,
29900,
470,
1492,
310,
372,
29889,
13,
1678,
10350,
353,
518,
6278,
29896,
29889,
29900,
718,
4036,
29889,
8172,
580,
29930,
29906,
29889,
29900,
29892,
448,
29896,
29889,
29900,
718,
4036,
29889,
8172,
580,
29930,
29906,
29889,
29900,
29897,
363,
921,
297,
3464,
29898,
29940,
4638,
13,
1678,
3291,
353,
518,
313,
29886,
29961,
29900,
1402,
282,
29961,
29896,
1402,
29871,
29900,
29897,
565,
282,
29961,
29900,
29962,
529,
29871,
29900,
29889,
29900,
1683,
313,
29886,
29961,
29900,
1402,
282,
29961,
29896,
1402,
29871,
29896,
29897,
363,
282,
297,
10350,
29962,
13,
1678,
736,
3291,
13,
268,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
29898,
9675,
29889,
19218,
29897,
2
] |
umlawuli/urls.py | mrdvince/dgenie | 0 | 186739 | <filename>umlawuli/urls.py
from django.urls import include, path
from . import views
urlpatterns = [
path("", include("common.urls")),
path("admins/", views.admin_api_view, name="admins"),
path("users/", views.users_api_view, name="users"),
]
| [
1,
529,
9507,
29958,
398,
10653,
14549,
29914,
26045,
29889,
2272,
13,
3166,
9557,
29889,
26045,
1053,
3160,
29892,
2224,
13,
13,
3166,
869,
1053,
8386,
13,
13,
2271,
11037,
29879,
353,
518,
13,
1678,
2224,
703,
613,
3160,
703,
9435,
29889,
26045,
1159,
511,
13,
1678,
2224,
703,
328,
29885,
1144,
29914,
613,
8386,
29889,
6406,
29918,
2754,
29918,
1493,
29892,
1024,
543,
328,
29885,
1144,
4968,
13,
1678,
2224,
703,
7193,
29914,
613,
8386,
29889,
7193,
29918,
2754,
29918,
1493,
29892,
1024,
543,
7193,
4968,
13,
29962,
13,
2
] |
110.py | whoophee/DCP | 2 | 62020 | <reponame>whoophee/DCP<filename>110.py
# This problem was asked by Facebook.
# Given a binary tree, return all paths from the root to leaves.
# For example, given the tree
# 1
# / \
# 2 3
# / \
# 4 5
# it should return [[1, 2], [1, 3, 4], [1, 3, 5]].
####
class Node:
def __init__(self, val = None, left = None, right = None):
self.val = val
self.left = left
self.right = right
l1 = Node(5)
l2 = Node(3)
l3 = Node(7)
l4 = Node(4)
m1 = Node(2, l1, l2)
m2 = Node(1, l3, l4)
root = Node(6, m1, m2)
####
def paths(root):
# if no node, it does not contribute to the path
if not root:
return []
# if leaf node, return node as is
if not root.left and not root.right:
return [[root.val]]
# generate paths to the left and right of current node
p = paths(root.left) + paths(root.right)
# prepend current value to generated paths
p = [[root.val] + p[i] for i in range(len(p))]
return p
####
print(paths(root))
| [
1,
529,
276,
1112,
420,
29958,
15970,
29148,
29872,
29914,
29928,
6271,
29966,
9507,
29958,
29896,
29896,
29900,
29889,
2272,
13,
29937,
910,
1108,
471,
4433,
491,
13327,
29889,
13,
29937,
11221,
263,
7581,
5447,
29892,
736,
599,
10898,
515,
278,
3876,
304,
11308,
29889,
13,
29937,
1152,
1342,
29892,
2183,
278,
5447,
13,
29937,
268,
29896,
13,
29937,
259,
847,
320,
13,
29937,
259,
29906,
1678,
29941,
13,
29937,
268,
847,
320,
13,
29937,
268,
29946,
1678,
29945,
13,
29937,
372,
881,
736,
5519,
29896,
29892,
29871,
29906,
1402,
518,
29896,
29892,
29871,
29941,
29892,
29871,
29946,
1402,
518,
29896,
29892,
29871,
29941,
29892,
29871,
29945,
29962,
1822,
13,
4136,
13,
1990,
9071,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
659,
353,
6213,
29892,
2175,
353,
6213,
29892,
1492,
353,
6213,
1125,
13,
4706,
1583,
29889,
791,
353,
659,
13,
4706,
1583,
29889,
1563,
353,
2175,
13,
4706,
1583,
29889,
1266,
353,
1492,
13,
13,
29880,
29896,
353,
9071,
29898,
29945,
29897,
13,
29880,
29906,
353,
9071,
29898,
29941,
29897,
13,
29880,
29941,
353,
9071,
29898,
29955,
29897,
13,
29880,
29946,
353,
9071,
29898,
29946,
29897,
13,
29885,
29896,
353,
9071,
29898,
29906,
29892,
301,
29896,
29892,
301,
29906,
29897,
13,
29885,
29906,
353,
9071,
29898,
29896,
29892,
301,
29941,
29892,
301,
29946,
29897,
13,
4632,
353,
9071,
29898,
29953,
29892,
286,
29896,
29892,
286,
29906,
29897,
13,
4136,
13,
1753,
10898,
29898,
4632,
1125,
13,
1678,
396,
565,
694,
2943,
29892,
372,
947,
451,
29126,
304,
278,
2224,
13,
1678,
565,
451,
3876,
29901,
13,
4706,
736,
5159,
13,
1678,
396,
565,
20447,
2943,
29892,
736,
2943,
408,
338,
13,
1678,
565,
451,
3876,
29889,
1563,
322,
451,
3876,
29889,
1266,
29901,
13,
4706,
736,
5519,
4632,
29889,
791,
5262,
13,
1678,
396,
5706,
10898,
304,
278,
2175,
322,
1492,
310,
1857,
2943,
13,
1678,
282,
353,
10898,
29898,
4632,
29889,
1563,
29897,
718,
10898,
29898,
4632,
29889,
1266,
29897,
13,
1678,
396,
8273,
355,
1857,
995,
304,
5759,
10898,
13,
1678,
282,
353,
5519,
4632,
29889,
791,
29962,
718,
282,
29961,
29875,
29962,
363,
474,
297,
3464,
29898,
2435,
29898,
29886,
28166,
13,
1678,
736,
282,
13,
4136,
13,
2158,
29898,
24772,
29898,
4632,
876,
13,
2
] |
example2.py | jwllee/pygame-menu | 0 | 154333 | # coding=utf-8
"""
pygame-menu
https://github.com/ppizarror/pygame-menu
EXAMPLE 2
Game menu with 3 difficulty options.
License:
-------------------------------------------------------------------------------
The MIT License (MIT)
Copyright 2017-2019 <NAME>. @ppizarror
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.
-------------------------------------------------------------------------------
"""
# Import libraries
from random import randrange
import os
# Import pygame
import pygame
import pygameMenu
ABOUT = ['pygameMenu {0}'.format(pygameMenu.__version__),
'Author: {0}'.format(pygameMenu.__author__),
pygameMenu.locals.PYGAMEMENU_TEXT_NEWLINE,
'Email: {0}'.format(pygameMenu.__email__)]
COLOR_BACKGROUND = (128, 0, 128)
COLOR_BLACK = (0, 0, 0)
COLOR_WHITE = (255, 255, 255)
FPS = 60.0
MENU_BACKGROUND_COLOR = (228, 55, 36)
WINDOW_SIZE = (640, 480)
# -----------------------------------------------------------------------------
# Init pygame
# -----------------------------------------------------------------------------
pygame.init()
os.environ['SDL_VIDEO_CENTERED'] = '1'
# Create pygame screen and objects
surface = pygame.display.set_mode(WINDOW_SIZE)
pygame.display.set_caption('PygameMenu Example 2')
clock = pygame.time.Clock()
dt = 1 / FPS
# Global variables
DIFFICULTY = ['EASY']
# -----------------------------------------------------------------------------
# Methods
# -----------------------------------------------------------------------------
def change_difficulty(value, d):
"""
Change difficulty of the game.
:param value: Tuple containing the data of the selected object
:type value: tuple
:param d: Optional parameter passed as argument to add_selector
:type d: basestring
:return: None
"""
selected, index = value
print('Selected difficulty: "{0}" ({1}) at index {2}'.format(selected, d, index))
DIFFICULTY[0] = d
def random_color():
"""
Return random color.
:return: Color tuple
:rtype: tuple
"""
return randrange(0, 255), randrange(0, 255), randrange(0, 255)
def play_function(difficulty, font):
"""
Main game function.
:param difficulty: Difficulty of the game
:type difficulty: basestring
:param font: Pygame font
:type font: pygame._font.Font
:return: None
"""
difficulty = difficulty[0]
assert isinstance(difficulty, str)
if difficulty == 'EASY':
f = font.render('Playing as baby', 1, COLOR_WHITE)
elif difficulty == 'MEDIUM':
f = font.render('Playing as normie', 1, COLOR_WHITE)
elif difficulty == 'HARD':
f = font.render('Playing as god', 1, COLOR_WHITE)
else:
raise Exception('Unknown difficulty {0}'.format(difficulty))
# Draw random color and text
bg_color = random_color()
f_width = f.get_size()[0]
# Reset main menu and disable
# You also can set another menu, like a 'pause menu', or just use the same
# main_menu as the menu that will check all your input.
main_menu.disable()
main_menu.reset(1)
while True:
# Clock tick
clock.tick(60)
# Application events
playevents = pygame.event.get()
for e in playevents:
if e.type == pygame.QUIT:
exit()
elif e.type == pygame.KEYDOWN:
if e.key == pygame.K_ESCAPE and main_menu.is_disabled():
main_menu.enable()
# Quit this function, then skip to loop of main-menu on line 260
return
# Pass events to main_menu
main_menu.mainloop(playevents)
# Continue playing
surface.fill(bg_color)
surface.blit(f, ((WINDOW_SIZE[0] - f_width) / 2, WINDOW_SIZE[1] / 2))
pygame.display.flip()
def main_background():
"""
Function used by menus, draw on background while menu is active.
:return: None
"""
surface.fill(COLOR_BACKGROUND)
# -----------------------------------------------------------------------------
# Create menus
# -----------------------------------------------------------------------------
# Play menu
play_menu = pygameMenu.Menu(surface,
bgfun=main_background,
color_selected=COLOR_WHITE,
font=pygameMenu.fonts.FONT_BEBAS,
font_color=COLOR_BLACK,
font_size=30,
menu_alpha=100,
menu_color=MENU_BACKGROUND_COLOR,
menu_height=int(WINDOW_SIZE[1] * 0.6),
menu_width=int(WINDOW_SIZE[0] * 0.7),
onclose=pygameMenu.events.PYGAME_MENU_DISABLE_CLOSE,
option_shadow=False,
title='Play menu',
window_height=WINDOW_SIZE[1],
window_width=WINDOW_SIZE[0]
)
# When pressing return -> play(DIFFICULTY[0], font)
play_menu.add_option('Start',
play_function,
DIFFICULTY,
pygame.font.Font(pygameMenu.fonts.FONT_FRANCHISE, 30))
play_menu.add_selector('Select difficulty',
[('1 - Easy', 'EASY'),
('2 - Medium', 'MEDIUM'),
('3 - Hard', 'HARD')],
onchange=change_difficulty)
play_menu.add_option('Return to main menu', pygameMenu.events.PYGAME_MENU_BACK)
# About menu
about_menu = pygameMenu.TextMenu(surface,
bgfun=main_background,
color_selected=COLOR_WHITE,
font=pygameMenu.fonts.FONT_BEBAS,
font_color=COLOR_BLACK,
font_size_title=30,
font_title=pygameMenu.fonts.FONT_8BIT,
menu_color=MENU_BACKGROUND_COLOR,
menu_color_title=COLOR_WHITE,
menu_height=int(WINDOW_SIZE[1] * 0.6),
menu_width=int(WINDOW_SIZE[0] * 0.6),
onclose=pygameMenu.events.PYGAME_MENU_DISABLE_CLOSE,
option_shadow=False,
text_color=COLOR_BLACK,
text_fontsize=20,
title='About',
window_height=WINDOW_SIZE[1],
window_width=WINDOW_SIZE[0]
)
for m in ABOUT:
about_menu.add_line(m)
about_menu.add_line(pygameMenu.locals.PYGAMEMENU_TEXT_NEWLINE)
about_menu.add_option('Return to menu', pygameMenu.events.PYGAME_MENU_BACK)
# Main menu
main_menu = pygameMenu.Menu(surface,
bgfun=main_background,
color_selected=COLOR_WHITE,
font=pygameMenu.fonts.FONT_BEBAS,
font_color=COLOR_BLACK,
font_size=30,
menu_alpha=100,
menu_color=MENU_BACKGROUND_COLOR,
menu_height=int(WINDOW_SIZE[1] * 0.6),
menu_width=int(WINDOW_SIZE[0] * 0.6),
onclose=pygameMenu.events.PYGAME_MENU_DISABLE_CLOSE,
option_shadow=False,
title='Main menu',
window_height=WINDOW_SIZE[1],
window_width=WINDOW_SIZE[0]
)
main_menu.add_option('Play', play_menu)
main_menu.add_option('About', about_menu)
main_menu.add_option('Quit', pygameMenu.events.PYGAME_MENU_EXIT)
# -----------------------------------------------------------------------------
# Main loop
# -----------------------------------------------------------------------------
while True:
# Tick
clock.tick(60)
# Paint background
main_background()
# Application events
events = pygame.event.get()
for event in events:
if event.type == pygame.QUIT:
exit()
# Main menu
main_menu.mainloop(events)
# Flip surface
pygame.display.flip()
| [
1,
396,
14137,
29922,
9420,
29899,
29947,
13,
15945,
29908,
13,
2272,
11802,
29899,
6510,
13,
991,
597,
3292,
29889,
510,
29914,
407,
15356,
729,
29914,
2272,
11802,
29899,
6510,
13,
13,
5746,
19297,
1307,
29871,
29906,
13,
14199,
6143,
411,
29871,
29941,
14656,
3987,
29889,
13,
13,
29931,
293,
1947,
29901,
13,
2683,
2683,
2683,
2683,
9072,
5634,
13,
1576,
341,
1806,
19245,
313,
26349,
29897,
13,
11882,
1266,
29871,
29906,
29900,
29896,
29955,
29899,
29906,
29900,
29896,
29929,
529,
5813,
15513,
732,
407,
15356,
729,
13,
13,
27293,
338,
1244,
1609,
16896,
29892,
3889,
310,
8323,
29892,
304,
738,
2022,
4017,
292,
263,
13,
8552,
310,
445,
7047,
322,
6942,
5106,
2066,
313,
1552,
376,
6295,
14093,
4968,
13,
517,
5376,
297,
278,
18540,
1728,
24345,
29892,
3704,
1728,
29485,
13,
1552,
10462,
304,
671,
29892,
3509,
29892,
6623,
29892,
10366,
29892,
9805,
29892,
1320,
2666,
29892,
269,
803,
1947,
29892,
13,
392,
29914,
272,
19417,
14591,
310,
278,
18540,
29892,
322,
304,
14257,
12407,
304,
6029,
278,
18540,
13,
275,
15252,
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,
17705,
2882,
6227,
11937,
29892,
13,
25039,
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,
19474,
8079,
6323,
2672,
13,
6007,
8186,
9838,
22659,
6093,
7791,
7818,
12982,
1525,
6323,
6093,
501,
1660,
6323,
438,
29911,
4448,
5012,
1964,
4214,
29903,
2672,
6093,
7791,
7818,
12982,
1525,
29889,
13,
2683,
2683,
2683,
2683,
9072,
5634,
13,
15945,
29908,
13,
13,
29937,
16032,
9562,
13,
3166,
4036,
1053,
20088,
3881,
13,
5215,
2897,
13,
13,
29937,
16032,
22028,
13,
5215,
22028,
13,
5215,
22028,
6823,
13,
13,
2882,
12015,
353,
6024,
2272,
11802,
6823,
426,
29900,
29913,
4286,
4830,
29898,
2272,
11802,
6823,
17255,
3259,
1649,
511,
13,
308,
525,
13720,
29901,
426,
29900,
29913,
4286,
4830,
29898,
2272,
11802,
6823,
17255,
8921,
1649,
511,
13,
308,
22028,
6823,
29889,
2997,
29879,
29889,
20055,
12739,
2303,
29924,
1430,
29965,
29918,
16975,
29918,
28577,
18521,
29892,
13,
308,
525,
9823,
29901,
426,
29900,
29913,
4286,
4830,
29898,
2272,
11802,
6823,
17255,
5269,
1649,
4638,
13,
15032,
1955,
29918,
29933,
11375,
29954,
1672,
18783,
353,
313,
29896,
29906,
29947,
29892,
29871,
29900,
29892,
29871,
29896,
29906,
29947,
29897,
13,
15032,
1955,
29918,
13367,
11375,
353,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29897,
13,
15032,
1955,
29918,
25039,
9094,
353,
313,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
29897,
13,
29943,
7024,
353,
29871,
29953,
29900,
29889,
29900,
13,
29924,
1430,
29965,
29918,
29933,
11375,
29954,
1672,
18783,
29918,
15032,
1955,
353,
313,
29906,
29906,
29947,
29892,
29871,
29945,
29945,
29892,
29871,
29941,
29953,
29897,
13,
25152,
3970,
29956,
29918,
14226,
353,
313,
29953,
29946,
29900,
29892,
29871,
29946,
29947,
29900,
29897,
13,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
13,
29937,
10886,
22028,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
13,
2272,
11802,
29889,
2344,
580,
13,
359,
29889,
21813,
1839,
7230,
29931,
29918,
13044,
29923,
29949,
29918,
29907,
3919,
1001,
3352,
2033,
353,
525,
29896,
29915,
13,
13,
29937,
6204,
22028,
4315,
322,
3618,
13,
7610,
2161,
353,
22028,
29889,
4990,
29889,
842,
29918,
8513,
29898,
25152,
3970,
29956,
29918,
14226,
29897,
13,
2272,
11802,
29889,
4990,
29889,
842,
29918,
6671,
877,
29925,
4790,
420,
6823,
8741,
29871,
29906,
1495,
13,
13058,
353,
22028,
29889,
2230,
29889,
29907,
908,
580,
13,
6008,
353,
29871,
29896,
847,
383,
7024,
13,
13,
29937,
12002,
3651,
13,
4571,
4198,
2965,
8647,
29979,
353,
6024,
29923,
3289,
29979,
2033,
13,
13,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
13,
29937,
8108,
29879,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
13,
1753,
1735,
29918,
12765,
3953,
29891,
29898,
1767,
29892,
270,
1125,
13,
1678,
9995,
13,
1678,
10726,
14656,
310,
278,
3748,
29889,
13,
13,
1678,
584,
3207,
995,
29901,
12603,
552,
6943,
278,
848,
310,
278,
4629,
1203,
13,
1678,
584,
1853,
995,
29901,
18761,
13,
1678,
584,
3207,
270,
29901,
28379,
3443,
4502,
408,
2980,
304,
788,
29918,
14357,
13,
1678,
584,
1853,
270,
29901,
2362,
342,
5393,
13,
1678,
584,
2457,
29901,
6213,
13,
1678,
9995,
13,
1678,
4629,
29892,
2380,
353,
995,
13,
1678,
1596,
877,
8592,
14656,
29901,
29850,
29900,
5038,
21313,
29896,
1800,
472,
2380,
426,
29906,
29913,
4286,
4830,
29898,
8391,
29892,
270,
29892,
2380,
876,
13,
1678,
22471,
4198,
2965,
8647,
29979,
29961,
29900,
29962,
353,
270,
13,
13,
13,
1753,
4036,
29918,
2780,
7295,
13,
1678,
9995,
13,
1678,
7106,
4036,
2927,
29889,
13,
13,
1678,
584,
2457,
29901,
9159,
18761,
13,
1678,
584,
29878,
1853,
29901,
18761,
13,
1678,
9995,
13,
1678,
736,
20088,
3881,
29898,
29900,
29892,
29871,
29906,
29945,
29945,
511,
20088,
3881,
29898,
29900,
29892,
29871,
29906,
29945,
29945,
511,
20088,
3881,
29898,
29900,
29892,
29871,
29906,
29945,
29945,
29897,
13,
13,
13,
1753,
1708,
29918,
2220,
29898,
12765,
3953,
29891,
29892,
4079,
1125,
13,
1678,
9995,
13,
1678,
4241,
3748,
740,
29889,
13,
13,
1678,
584,
3207,
14656,
29901,
360,
2593,
3953,
29891,
310,
278,
3748,
13,
1678,
584,
1853,
14656,
29901,
2362,
342,
5393,
13,
1678,
584,
3207,
4079,
29901,
349,
4790,
420,
4079,
13,
1678,
584,
1853,
4079,
29901,
22028,
3032,
5657,
29889,
9824,
13,
1678,
584,
2457,
29901,
6213,
13,
1678,
9995,
13,
1678,
14656,
353,
14656,
29961,
29900,
29962,
13,
1678,
4974,
338,
8758,
29898,
12765,
3953,
29891,
29892,
851,
29897,
13,
13,
1678,
565,
14656,
1275,
525,
29923,
3289,
29979,
2396,
13,
4706,
285,
353,
4079,
29889,
9482,
877,
13454,
292,
408,
24354,
742,
29871,
29896,
29892,
23958,
1955,
29918,
25039,
9094,
29897,
13,
1678,
25342,
14656,
1275,
525,
2303,
4571,
5005,
2396,
13,
4706,
285,
353,
4079,
29889,
9482,
877,
13454,
292,
408,
6056,
347,
742,
29871,
29896,
29892,
23958,
1955,
29918,
25039,
9094,
29897,
13,
1678,
25342,
14656,
1275,
525,
29950,
17011,
2396,
13,
4706,
285,
353,
4079,
29889,
9482,
877,
13454,
292,
408,
7339,
742,
29871,
29896,
29892,
23958,
1955,
29918,
25039,
9094,
29897,
13,
1678,
1683,
29901,
13,
4706,
12020,
8960,
877,
14148,
14656,
426,
29900,
29913,
4286,
4830,
29898,
12765,
3953,
29891,
876,
13,
13,
1678,
396,
18492,
4036,
2927,
322,
1426,
13,
1678,
25989,
29918,
2780,
353,
4036,
29918,
2780,
580,
13,
1678,
285,
29918,
2103,
353,
285,
29889,
657,
29918,
2311,
580,
29961,
29900,
29962,
13,
13,
1678,
396,
2538,
300,
1667,
6143,
322,
11262,
13,
1678,
396,
887,
884,
508,
731,
1790,
6143,
29892,
763,
263,
525,
29886,
1071,
6143,
742,
470,
925,
671,
278,
1021,
13,
1678,
396,
1667,
29918,
6510,
408,
278,
6143,
393,
674,
1423,
599,
596,
1881,
29889,
13,
1678,
1667,
29918,
6510,
29889,
20472,
580,
13,
1678,
1667,
29918,
6510,
29889,
12071,
29898,
29896,
29897,
13,
13,
1678,
1550,
5852,
29901,
13,
13,
4706,
396,
315,
908,
16892,
13,
4706,
12006,
29889,
24667,
29898,
29953,
29900,
29897,
13,
13,
4706,
396,
8427,
4959,
13,
4706,
1708,
13604,
353,
22028,
29889,
3696,
29889,
657,
580,
13,
4706,
363,
321,
297,
1708,
13604,
29901,
13,
9651,
565,
321,
29889,
1853,
1275,
22028,
29889,
13356,
1806,
29901,
13,
18884,
6876,
580,
13,
9651,
25342,
321,
29889,
1853,
1275,
22028,
29889,
10818,
3970,
16048,
29901,
13,
18884,
565,
321,
29889,
1989,
1275,
22028,
29889,
29968,
29918,
2890,
29907,
3301,
29923,
322,
1667,
29918,
6510,
29889,
275,
29918,
18279,
7295,
13,
462,
1678,
1667,
29918,
6510,
29889,
12007,
580,
13,
13,
462,
1678,
396,
751,
277,
445,
740,
29892,
769,
14383,
304,
2425,
310,
1667,
29899,
6510,
373,
1196,
29871,
29906,
29953,
29900,
13,
462,
1678,
736,
13,
13,
4706,
396,
6978,
4959,
304,
1667,
29918,
6510,
13,
4706,
1667,
29918,
6510,
29889,
3396,
7888,
29898,
1456,
13604,
29897,
13,
13,
4706,
396,
2866,
14150,
8743,
13,
4706,
7101,
29889,
5589,
29898,
16264,
29918,
2780,
29897,
13,
4706,
7101,
29889,
2204,
277,
29898,
29888,
29892,
5135,
25152,
3970,
29956,
29918,
14226,
29961,
29900,
29962,
448,
285,
29918,
2103,
29897,
847,
29871,
29906,
29892,
399,
1177,
3970,
29956,
29918,
14226,
29961,
29896,
29962,
847,
29871,
29906,
876,
13,
4706,
22028,
29889,
4990,
29889,
29888,
3466,
580,
13,
13,
13,
1753,
1667,
29918,
7042,
7295,
13,
1678,
9995,
13,
1678,
6680,
1304,
491,
1757,
375,
29892,
4216,
373,
3239,
1550,
6143,
338,
6136,
29889,
13,
13,
1678,
584,
2457,
29901,
6213,
13,
1678,
9995,
13,
1678,
7101,
29889,
5589,
29898,
15032,
1955,
29918,
29933,
11375,
29954,
1672,
18783,
29897,
13,
13,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
13,
29937,
6204,
1757,
375,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
13,
13,
29937,
7412,
6143,
13,
1456,
29918,
6510,
353,
22028,
6823,
29889,
6823,
29898,
7610,
2161,
29892,
13,
462,
9651,
25989,
7692,
29922,
3396,
29918,
7042,
29892,
13,
462,
9651,
2927,
29918,
8391,
29922,
15032,
1955,
29918,
25039,
9094,
29892,
13,
462,
9651,
4079,
29922,
2272,
11802,
6823,
29889,
28586,
29889,
29943,
1164,
29911,
29918,
15349,
29933,
3289,
29892,
13,
462,
9651,
4079,
29918,
2780,
29922,
15032,
1955,
29918,
13367,
11375,
29892,
13,
462,
9651,
4079,
29918,
2311,
29922,
29941,
29900,
29892,
13,
462,
9651,
6143,
29918,
2312,
29922,
29896,
29900,
29900,
29892,
13,
462,
9651,
6143,
29918,
2780,
29922,
29924,
1430,
29965,
29918,
29933,
11375,
29954,
1672,
18783,
29918,
15032,
1955,
29892,
13,
462,
9651,
6143,
29918,
3545,
29922,
524,
29898,
25152,
3970,
29956,
29918,
14226,
29961,
29896,
29962,
334,
29871,
29900,
29889,
29953,
511,
13,
462,
9651,
6143,
29918,
2103,
29922,
524,
29898,
25152,
3970,
29956,
29918,
14226,
29961,
29900,
29962,
334,
29871,
29900,
29889,
29955,
511,
13,
462,
9651,
373,
5358,
29922,
2272,
11802,
6823,
29889,
13604,
29889,
20055,
12739,
2303,
29918,
29924,
1430,
29965,
29918,
23711,
6181,
29918,
29907,
3927,
1660,
29892,
13,
462,
9651,
2984,
29918,
17505,
29922,
8824,
29892,
13,
462,
9651,
3611,
2433,
13454,
6143,
742,
13,
462,
9651,
3474,
29918,
3545,
29922,
25152,
3970,
29956,
29918,
14226,
29961,
29896,
1402,
13,
462,
9651,
3474,
29918,
2103,
29922,
25152,
3970,
29956,
29918,
14226,
29961,
29900,
29962,
13,
462,
9651,
1723,
13,
29937,
1932,
24795,
736,
1599,
1708,
29898,
4571,
4198,
2965,
8647,
29979,
29961,
29900,
1402,
4079,
29897,
13,
1456,
29918,
6510,
29889,
1202,
29918,
3385,
877,
4763,
742,
13,
462,
268,
1708,
29918,
2220,
29892,
13,
462,
268,
22471,
4198,
2965,
8647,
29979,
29892,
13,
462,
268,
22028,
29889,
5657,
29889,
9824,
29898,
2272,
11802,
6823,
29889,
28586,
29889,
29943,
1164,
29911,
29918,
15860,
2190,
3210,
29902,
1660,
29892,
29871,
29941,
29900,
876,
13,
1456,
29918,
6510,
29889,
1202,
29918,
14357,
877,
3549,
14656,
742,
13,
462,
539,
518,
877,
29896,
448,
382,
8995,
742,
525,
29923,
3289,
29979,
5477,
13,
462,
4706,
6702,
29906,
448,
3436,
1974,
742,
525,
2303,
4571,
5005,
5477,
13,
462,
4706,
6702,
29941,
448,
10999,
742,
525,
29950,
17011,
1495,
1402,
13,
462,
539,
373,
3167,
29922,
3167,
29918,
12765,
3953,
29891,
29897,
13,
1456,
29918,
6510,
29889,
1202,
29918,
3385,
877,
11609,
304,
1667,
6143,
742,
22028,
6823,
29889,
13604,
29889,
20055,
12739,
2303,
29918,
29924,
1430,
29965,
29918,
29933,
11375,
29897,
13,
13,
29937,
13611,
6143,
13,
12717,
29918,
6510,
353,
22028,
6823,
29889,
1626,
6823,
29898,
7610,
2161,
29892,
13,
462,
462,
25989,
7692,
29922,
3396,
29918,
7042,
29892,
13,
462,
462,
2927,
29918,
8391,
29922,
15032,
1955,
29918,
25039,
9094,
29892,
13,
462,
462,
4079,
29922,
2272,
11802,
6823,
29889,
28586,
29889,
29943,
1164,
29911,
29918,
15349,
29933,
3289,
29892,
13,
462,
462,
4079,
29918,
2780,
29922,
15032,
1955,
29918,
13367,
11375,
29892,
13,
462,
462,
4079,
29918,
2311,
29918,
3257,
29922,
29941,
29900,
29892,
13,
462,
462,
4079,
29918,
3257,
29922,
2272,
11802,
6823,
29889,
28586,
29889,
29943,
1164,
29911,
29918,
29947,
22698,
29892,
13,
462,
462,
6143,
29918,
2780,
29922,
29924,
1430,
29965,
29918,
29933,
11375,
29954,
1672,
18783,
29918,
15032,
1955,
29892,
13,
462,
462,
6143,
29918,
2780,
29918,
3257,
29922,
15032,
1955,
29918,
25039,
9094,
29892,
13,
462,
462,
6143,
29918,
3545,
29922,
524,
29898,
25152,
3970,
29956,
29918,
14226,
29961,
29896,
29962,
334,
29871,
29900,
29889,
29953,
511,
13,
462,
462,
6143,
29918,
2103,
29922,
524,
29898,
25152,
3970,
29956,
29918,
14226,
29961,
29900,
29962,
334,
29871,
29900,
29889,
29953,
511,
13,
462,
462,
373,
5358,
29922,
2272,
11802,
6823,
29889,
13604,
29889,
20055,
12739,
2303,
29918,
29924,
1430,
29965,
29918,
23711,
6181,
29918,
29907,
3927,
1660,
29892,
13,
462,
462,
2984,
29918,
17505,
29922,
8824,
29892,
13,
462,
462,
1426,
29918,
2780,
29922,
15032,
1955,
29918,
13367,
11375,
29892,
13,
462,
462,
1426,
29918,
5657,
2311,
29922,
29906,
29900,
29892,
13,
462,
462,
3611,
2433,
28173,
742,
13,
462,
462,
3474,
29918,
3545,
29922,
25152,
3970,
29956,
29918,
14226,
29961,
29896,
1402,
13,
462,
462,
3474,
29918,
2103,
29922,
25152,
3970,
29956,
29918,
14226,
29961,
29900,
29962,
13,
462,
462,
1723,
13,
1454,
286,
297,
319,
8456,
2692,
29901,
13,
1678,
1048,
29918,
6510,
29889,
1202,
29918,
1220,
29898,
29885,
29897,
13,
12717,
29918,
6510,
29889,
1202,
29918,
1220,
29898,
2272,
11802,
6823,
29889,
2997,
29879,
29889,
20055,
12739,
2303,
29924,
1430,
29965,
29918,
16975,
29918,
28577,
18521,
29897,
13,
12717,
29918,
6510,
29889,
1202,
29918,
3385,
877,
11609,
304,
6143,
742,
22028,
6823,
29889,
13604,
29889,
20055,
12739,
2303,
29918,
29924,
1430,
29965,
29918,
29933,
11375,
29897,
13,
13,
29937,
4241,
6143,
13,
3396,
29918,
6510,
353,
22028,
6823,
29889,
6823,
29898,
7610,
2161,
29892,
13,
462,
9651,
25989,
7692,
29922,
3396,
29918,
7042,
29892,
13,
462,
9651,
2927,
29918,
8391,
29922,
15032,
1955,
29918,
25039,
9094,
29892,
13,
462,
9651,
4079,
29922,
2272,
11802,
6823,
29889,
28586,
29889,
29943,
1164,
29911,
29918,
15349,
29933,
3289,
29892,
13,
462,
9651,
4079,
29918,
2780,
29922,
15032,
1955,
29918,
13367,
11375,
29892,
13,
462,
9651,
4079,
29918,
2311,
29922,
29941,
29900,
29892,
13,
462,
9651,
6143,
29918,
2312,
29922,
29896,
29900,
29900,
29892,
13,
462,
9651,
6143,
29918,
2780,
29922,
29924,
1430,
29965,
29918,
29933,
11375,
29954,
1672,
18783,
29918,
15032,
1955,
29892,
13,
462,
9651,
6143,
29918,
3545,
29922,
524,
29898,
25152,
3970,
29956,
29918,
14226,
29961,
29896,
29962,
334,
29871,
29900,
29889,
29953,
511,
13,
462,
9651,
6143,
29918,
2103,
29922,
524,
29898,
25152,
3970,
29956,
29918,
14226,
29961,
29900,
29962,
334,
29871,
29900,
29889,
29953,
511,
13,
462,
9651,
373,
5358,
29922,
2272,
11802,
6823,
29889,
13604,
29889,
20055,
12739,
2303,
29918,
29924,
1430,
29965,
29918,
23711,
6181,
29918,
29907,
3927,
1660,
29892,
13,
462,
9651,
2984,
29918,
17505,
29922,
8824,
29892,
13,
462,
9651,
3611,
2433,
6330,
6143,
742,
13,
462,
9651,
3474,
29918,
3545,
29922,
25152,
3970,
29956,
29918,
14226,
29961,
29896,
1402,
13,
462,
9651,
3474,
29918,
2103,
29922,
25152,
3970,
29956,
29918,
14226,
29961,
29900,
29962,
13,
462,
9651,
1723,
13,
3396,
29918,
6510,
29889,
1202,
29918,
3385,
877,
13454,
742,
1708,
29918,
6510,
29897,
13,
3396,
29918,
6510,
29889,
1202,
29918,
3385,
877,
28173,
742,
1048,
29918,
6510,
29897,
13,
3396,
29918,
6510,
29889,
1202,
29918,
3385,
877,
2182,
277,
742,
22028,
6823,
29889,
13604,
29889,
20055,
12739,
2303,
29918,
29924,
1430,
29965,
29918,
5746,
1806,
29897,
13,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
13,
29937,
4241,
2425,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
13,
8000,
5852,
29901,
13,
13,
1678,
396,
323,
860,
13,
1678,
12006,
29889,
24667,
29898,
29953,
29900,
29897,
13,
13,
1678,
396,
349,
2365,
3239,
13,
1678,
1667,
29918,
7042,
580,
13,
13,
1678,
396,
8427,
4959,
13,
1678,
4959,
353,
22028,
29889,
3696,
29889,
657,
580,
13,
1678,
363,
1741,
297,
4959,
29901,
13,
4706,
565,
1741,
29889,
1853,
1275,
22028,
29889,
13356,
1806,
29901,
13,
9651,
6876,
580,
13,
13,
1678,
396,
4241,
6143,
13,
1678,
1667,
29918,
6510,
29889,
3396,
7888,
29898,
13604,
29897,
13,
13,
1678,
396,
383,
3466,
7101,
13,
1678,
22028,
29889,
4990,
29889,
29888,
3466,
580,
13,
2
] |
textpreprocess/__init__.py | dreamvrutik/textclean | 0 | 94692 | <reponame>dreamvrutik/textclean<gh_stars>0
from textpreprocess.process import process
| [
1,
529,
276,
1112,
420,
29958,
29881,
1633,
13416,
329,
638,
29914,
726,
14941,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
1426,
1457,
5014,
29889,
5014,
1053,
1889,
13,
2
] |
DS_Scripts/functionsLoadCSV.py | SoulfulArt/Mapa_Vivo_Producao_Brasil | 0 | 90742 | <reponame>SoulfulArt/Mapa_Vivo_Producao_Brasil
#These are functions and variables that support script loadCSV.py
from os import remove
from os import path
#function that organizes numerical data because some files use , as thousand
#separator or , as decimal separator
def simplifyNumber (df):
df["Producao"] = df["Producao"].astype(str).str.replace(',','.')
df["AreaH"] = df["AreaH"].astype(str).str.replace(',','.')
df["Valor"] = df["Valor"].astype(str).str.replace(',','.')
df["Producao"] = df["Producao"].astype(float)
df["AreaH"] = df["AreaH"].astype(float)
df["Valor"] = df["Valor"].astype(float)
#Rendimento is a function of producao and area
df["Rendimento"] = (df["Producao"]/df["AreaH"])
df["Rendimento"] = round(df["Rendimento"],2)
return df
'''Function that replace letter with accent for letter without accent it can generate
problems in finding cities that are the same but has different accents from the
datasets. Other transformations that are specific of the data that is used in this
project such as '/' for ' e ' were identified as an important substituion to help
data manipulation through the project.'''
def simplifyText (pdSeries):
#it's better to work with homogenous casing
pdSeries = pdSeries.str.lower()
#cities that have name changes
pdSeries = pdSeries.str.replace('fortaleza do tabocão','tabocão')
pdSeries = pdSeries.str.replace('augusto severo','campo grande')
#problems with accent in Portuguese
pdSeries = pdSeries.str.replace('á','a')
pdSeries = pdSeries.str.replace('ã','a')
pdSeries = pdSeries.str.replace('â','a')
pdSeries = pdSeries.str.replace('é','e')
pdSeries = pdSeries.str.replace('ê','e')
pdSeries = pdSeries.str.replace('í','i')
pdSeries = pdSeries.str.replace('ó','o')
pdSeries = pdSeries.str.replace('ô','o')
pdSeries = pdSeries.str.replace('õ','o')
pdSeries = pdSeries.str.replace('ú','u')
pdSeries = pdSeries.str.replace('û','u')
pdSeries = pdSeries.str.replace('ü','u')
pdSeries = pdSeries.str.replace('j','g')
pdSeries = pdSeries.str.replace('-','')
pdSeries = pdSeries.str.replace('y','i') #old portuguese had y
#problems related to Portugese language
pdSeries = pdSeries.str.replace('za','sa') #Izabel x Isabel
pdSeries = pdSeries.str.replace('zo','so') #Brazopolis x Braspolis
pdSeries = pdSeries.str.replace('ze','se') #Euzebia x Eusebia
pdSeries = pdSeries.str.replace('reo','reu') #poxoreu x poxoreo
pdSeries = pdSeries.str.replace('tho','to') #thome x thome
pdSeries = pdSeries.str.replace('tomaz','tomas') #thomaz x thomas
pdSeries = pdSeries.str.replace('thi','ti') #thiago x tiago
pdSeries = pdSeries.str.replace('luiz','luis') #luiz x luis
pdSeries = pdSeries.str.replace('florinea','florinia') #florinea x florinia
pdSeries = pdSeries.str.replace(' moz',' mos') # moz x mos (porto)
pdSeries = pdSeries.str.replace(' luz',' lus') # santa luz x lus
pdSeries = pdSeries.str.replace('cruz','crus') #vera cruz x crus
pdSeries = pdSeries.str.replace('das artes','') #embu das artes x embu
pdSeries = pdSeries.str.replace('terezinha','teresinha') #terezinha x teresinha
#articles
pdSeries = pdSeries.str.replace(' de ','dx')
pdSeries = pdSeries.str.replace(' da ','dx')
pdSeries = pdSeries.str.replace(' do ','dx')
pdSeries = pdSeries.str.replace(' das ','dx')
pdSeries = pdSeries.str.replace(' dos ','dx')
#separator / and e
pdSeries = pdSeries.str.replace('/','e')
pdSeries = pdSeries.str.replace(' ','')
#some cities are comming with state initials
pdSeries = pdSeries.str.replace('(ac)','', regex = False)
pdSeries = pdSeries.str.replace('(al)','', regex = False)
pdSeries = pdSeries.str.replace('(ap)','', regex = False)
pdSeries = pdSeries.str.replace('(am)','', regex = False)
pdSeries = pdSeries.str.replace('(ba)','', regex = False)
pdSeries = pdSeries.str.replace('(ce)','', regex = False)
pdSeries = pdSeries.str.replace('(df)','', regex = False)
pdSeries = pdSeries.str.replace('(es)','', regex = False)
pdSeries = pdSeries.str.replace('(go)','', regex = False)
pdSeries = pdSeries.str.replace('(ma)','', regex = False)
pdSeries = pdSeries.str.replace('(mt)','', regex = False)
pdSeries = pdSeries.str.replace('(ms)','', regex = False)
pdSeries = pdSeries.str.replace('(mg)','', regex = False)
pdSeries = pdSeries.str.replace('(pa)','', regex = False)
pdSeries = pdSeries.str.replace('(pb)','', regex = False)
pdSeries = pdSeries.str.replace('(pr)','', regex = False)
pdSeries = pdSeries.str.replace('(pe)','', regex = False)
pdSeries = pdSeries.str.replace('(pi)','', regex = False)
pdSeries = pdSeries.str.replace('(rj)','', regex = False)
pdSeries = pdSeries.str.replace('(rg)','', regex = False)
pdSeries = pdSeries.str.replace('(rn)','', regex = False)
pdSeries = pdSeries.str.replace('(rs)','', regex = False)
pdSeries = pdSeries.str.replace('(ro)','', regex = False)
pdSeries = pdSeries.str.replace('(rr)','', regex = False)
pdSeries = pdSeries.str.replace('(sc)','', regex = False)
pdSeries = pdSeries.str.replace('(sp)','', regex = False)
pdSeries = pdSeries.str.replace('(se)','', regex = False)
pdSeries = pdSeries.str.replace('(to)','', regex = False)
return pdSeries
#Function cleanDataCSV clens data from a DataFrame
def cleanDataCSV (df):
#Valor Produção (Moeda em Real) must have number values
df = df[df['Valor Produção (Moeda em Real)']!='...']
df = df[df['Valor Produção (Moeda em Real)']!='..']
df = df[df['Valor Produção (Moeda em Real)']!='-']
df = df[df['Nome Lavoura']!='Total']
#Qtd.Produzida can't be NaN, but Valor can
df = df[df["Qtd.Produzida"].notna()]
df = df.reset_index(drop = True)
return df
| [
1,
529,
276,
1112,
420,
29958,
29903,
5059,
1319,
9986,
29914,
3388,
29874,
29918,
29963,
4243,
29918,
23665,
1113,
29877,
29918,
29933,
3417,
309,
13,
29937,
1349,
968,
526,
3168,
322,
3651,
393,
2304,
2471,
2254,
29907,
7597,
29889,
2272,
13,
13,
3166,
2897,
1053,
3349,
13,
3166,
2897,
1053,
2224,
13,
13,
29937,
2220,
393,
2894,
7093,
16259,
848,
1363,
777,
2066,
671,
1919,
408,
10405,
13,
29937,
344,
17954,
470,
1919,
408,
13677,
28128,
13,
13,
1753,
21092,
4557,
313,
2176,
1125,
13,
12,
13,
12,
2176,
3366,
23665,
1113,
29877,
3108,
353,
4489,
3366,
23665,
1113,
29877,
16862,
579,
668,
29898,
710,
467,
710,
29889,
6506,
29317,
3788,
29889,
1495,
13,
12,
2176,
3366,
13799,
29950,
3108,
353,
4489,
3366,
13799,
29950,
16862,
579,
668,
29898,
710,
467,
710,
29889,
6506,
29317,
3788,
29889,
1495,
13,
12,
2176,
3366,
1440,
272,
3108,
353,
4489,
3366,
1440,
272,
16862,
579,
668,
29898,
710,
467,
710,
29889,
6506,
29317,
3788,
29889,
1495,
13,
13,
12,
2176,
3366,
23665,
1113,
29877,
3108,
353,
4489,
3366,
23665,
1113,
29877,
16862,
579,
668,
29898,
7411,
29897,
13,
12,
2176,
3366,
13799,
29950,
3108,
353,
4489,
3366,
13799,
29950,
16862,
579,
668,
29898,
7411,
29897,
13,
12,
2176,
3366,
1440,
272,
3108,
353,
4489,
3366,
1440,
272,
16862,
579,
668,
29898,
7411,
29897,
13,
12,
13,
12,
29937,
29934,
355,
6174,
338,
263,
740,
310,
1391,
1113,
29877,
322,
4038,
13,
12,
2176,
3366,
29934,
355,
6174,
3108,
353,
313,
2176,
3366,
23665,
1113,
29877,
3108,
29914,
2176,
3366,
13799,
29950,
20068,
13,
12,
2176,
3366,
29934,
355,
6174,
3108,
353,
4513,
29898,
2176,
3366,
29934,
355,
6174,
12436,
29906,
29897,
13,
13,
12,
2457,
4489,
13,
13,
12008,
6678,
393,
5191,
5497,
411,
1035,
296,
363,
5497,
1728,
1035,
296,
372,
508,
5706,
13,
17199,
29879,
297,
9138,
14368,
393,
526,
278,
1021,
541,
756,
1422,
1035,
1237,
515,
278,
13,
14538,
1691,
29889,
5901,
29304,
393,
526,
2702,
310,
278,
848,
393,
338,
1304,
297,
445,
13,
4836,
1316,
408,
8207,
29915,
363,
525,
321,
525,
892,
15659,
408,
385,
4100,
5960,
1981,
291,
304,
1371,
13,
1272,
11525,
2785,
1549,
278,
2060,
29889,
12008,
13,
13,
1753,
21092,
1626,
313,
15926,
19204,
1125,
13,
12,
13,
12,
29937,
277,
29915,
29879,
2253,
304,
664,
411,
3632,
6352,
681,
3209,
292,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
13609,
580,
13,
12,
13,
12,
29937,
29883,
1907,
393,
505,
1024,
3620,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
3921,
744,
1362,
437,
4434,
542,
1368,
3788,
3891,
542,
1368,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
2987,
23065,
2775,
29877,
3788,
11108,
1129,
6815,
1495,
12,
13,
12,
13,
13,
12,
29937,
17199,
29879,
411,
1035,
296,
297,
25519,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29976,
3788,
29874,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
30033,
3788,
29874,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
30057,
3788,
29874,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29948,
3788,
29872,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
30037,
3788,
29872,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29983,
3788,
29875,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29980,
3788,
29877,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
30069,
3788,
29877,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
30084,
3788,
29877,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
30030,
3788,
29884,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
30095,
3788,
29884,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29993,
3788,
29884,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29926,
3788,
29887,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29899,
3788,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29891,
3788,
29875,
1495,
396,
1025,
15056,
23053,
750,
343,
13,
12,
13,
12,
29937,
17199,
29879,
4475,
304,
8451,
968,
4086,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
1362,
3788,
4977,
1495,
396,
29902,
29920,
1107,
921,
16543,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
2502,
3788,
578,
1495,
396,
29933,
9504,
13242,
275,
921,
8793,
3733,
275,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
911,
3788,
344,
1495,
396,
29923,
3365,
774,
423,
921,
382,
1509,
15959,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
276,
29877,
3788,
24868,
1495,
396,
1129,
29916,
487,
29884,
921,
772,
29916,
487,
29877,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
386,
29877,
3788,
517,
1495,
396,
386,
608,
921,
266,
608,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
15135,
834,
3788,
15135,
294,
1495,
396,
386,
290,
834,
921,
266,
18902,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
386,
29875,
3788,
2034,
1495,
396,
386,
29875,
4425,
921,
19538,
4425,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
6092,
466,
3788,
29880,
4664,
1495,
396,
6092,
466,
921,
301,
4664,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
1579,
272,
16736,
3788,
1579,
272,
262,
423,
1495,
396,
1579,
272,
16736,
921,
23729,
262,
423,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
286,
2112,
3788,
19767,
1495,
396,
286,
2112,
921,
19767,
313,
637,
29877,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
301,
3365,
3788,
301,
375,
1495,
396,
269,
6949,
301,
3365,
921,
301,
375,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29883,
582,
29920,
3788,
7283,
375,
1495,
396,
28279,
7618,
29920,
921,
2181,
375,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
17370,
1616,
267,
3788,
1495,
396,
1590,
29884,
1697,
1616,
267,
921,
953,
2423,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
357,
6096,
16479,
3788,
357,
267,
16479,
1495,
396,
357,
6096,
16479,
921,
1935,
267,
16479,
13,
12,
13,
12,
29937,
18569,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
316,
525,
5501,
8235,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
1146,
525,
5501,
8235,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
437,
525,
5501,
8235,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
1697,
525,
5501,
8235,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
3248,
525,
5501,
8235,
1495,
13,
13,
12,
29937,
344,
17954,
847,
322,
321,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
11219,
3788,
29872,
1495,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
525,
5501,
1495,
13,
12,
13,
12,
29937,
5372,
14368,
526,
844,
292,
411,
2106,
2847,
29879,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
562,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
284,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
481,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
314,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
2291,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
346,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
2176,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
267,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
1484,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
655,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
4378,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
1516,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
29885,
29887,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
3274,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
24381,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
558,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
412,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
1631,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
29878,
29926,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
11007,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
27539,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
2288,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
307,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
21478,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
1557,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
1028,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
344,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
15926,
19204,
353,
10518,
19204,
29889,
710,
29889,
6506,
877,
29898,
517,
29897,
3788,
742,
6528,
353,
7700,
29897,
13,
12,
12,
12,
13,
12,
2457,
10518,
19204,
13,
12,
12,
13,
29937,
6678,
5941,
1469,
29907,
7597,
1067,
575,
848,
515,
263,
3630,
4308,
13,
13,
1753,
5941,
1469,
29907,
7597,
313,
2176,
1125,
13,
12,
12,
13,
12,
12,
29937,
1440,
272,
7138,
2340,
313,
22638,
8710,
953,
8195,
29897,
1818,
505,
1353,
1819,
13,
12,
12,
2176,
353,
4489,
29961,
2176,
1839,
1440,
272,
7138,
2340,
313,
22638,
8710,
953,
8195,
29897,
2033,
29991,
2433,
856,
2033,
13,
12,
12,
2176,
353,
4489,
29961,
2176,
1839,
1440,
272,
7138,
2340,
313,
22638,
8710,
953,
8195,
29897,
2033,
29991,
2433,
636,
2033,
13,
12,
12,
2176,
353,
4489,
29961,
2176,
1839,
1440,
272,
7138,
2340,
313,
22638,
8710,
953,
8195,
29897,
2033,
29991,
2433,
29899,
2033,
13,
12,
12,
2176,
353,
4489,
29961,
2176,
1839,
29940,
608,
23212,
283,
336,
2033,
29991,
2433,
11536,
2033,
13,
12,
12,
13,
12,
12,
29937,
29984,
1594,
29889,
23665,
29920,
1458,
508,
29915,
29873,
367,
18780,
29892,
541,
2630,
272,
508,
13,
12,
12,
2176,
353,
4489,
29961,
2176,
3366,
29984,
1594,
29889,
23665,
29920,
1458,
16862,
1333,
1056,
580,
29962,
13,
12,
12,
12,
12,
13,
12,
12,
2176,
353,
4489,
29889,
12071,
29918,
2248,
29898,
8865,
353,
5852,
29897,
13,
12,
12,
13,
12,
12,
2457,
4489,
13,
2
] |
forherobj_app/urls.py | chaitphani/ForHerObj-repo | 0 | 35506 | <filename>forherobj_app/urls.py
from django.urls import path
from . import views
urlpatterns = [
path('', views.home, name='home'),
path('login', views.login_fun, name='login'),
path('signup', views.signup, name='signup'),
path('logout', views.logout, name='logout'),
] | [
1,
529,
9507,
29958,
1454,
2276,
5415,
29918,
932,
29914,
26045,
29889,
2272,
13,
3166,
9557,
29889,
26045,
1053,
2224,
13,
3166,
869,
1053,
8386,
13,
13,
13,
2271,
11037,
29879,
353,
518,
13,
13,
1678,
2224,
877,
742,
8386,
29889,
5184,
29892,
1024,
2433,
5184,
5477,
13,
1678,
2224,
877,
7507,
742,
8386,
29889,
7507,
29918,
7692,
29892,
1024,
2433,
7507,
5477,
13,
1678,
2224,
877,
4530,
786,
742,
8386,
29889,
4530,
786,
29892,
1024,
2433,
4530,
786,
5477,
13,
1678,
2224,
877,
1188,
449,
742,
8386,
29889,
1188,
449,
29892,
1024,
2433,
1188,
449,
5477,
13,
13,
29962,
2
] |
robovat/simulation/camera/__init__.py | leobxpan/robovat | 62 | 1606064 | from robovat.simulation.camera.bullet_camera import BulletCamera
| [
1,
515,
10832,
23067,
29889,
3601,
2785,
29889,
26065,
29889,
18850,
29918,
26065,
1053,
8313,
1026,
20717,
13,
2
] |
core/api_shortcode.py | royrogers/operative-framework | 5 | 104044 | <reponame>royrogers/operative-framework
#!/usr/bin/env python
import sys
menu_list_api = {
'list_module': 'API_listmodule',
'use_module': 'API_startmodule',
'requirement_module': 'API_requirementModule'
}
| [
1,
529,
276,
1112,
420,
29958,
4727,
307,
5743,
29914,
3372,
1230,
29899,
4468,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
12,
4691,
13,
13,
5215,
10876,
13,
13,
6510,
29918,
1761,
29918,
2754,
353,
426,
13,
12,
29915,
1761,
29918,
5453,
2396,
525,
8787,
29918,
1761,
5453,
742,
13,
1678,
525,
1509,
29918,
5453,
2396,
525,
8787,
29918,
2962,
5453,
742,
13,
1678,
525,
12277,
358,
29918,
5453,
2396,
525,
8787,
29918,
12277,
358,
7355,
29915,
13,
29913,
13,
13,
2
] |
src/telliot_core/queries/snapshot.py | tellor-io/telliot-core | 9 | 48753 | <gh_stars>1-10
import logging
from dataclasses import dataclass
from telliot_core.dtypes.value_type import ValueType
from telliot_core.queries.abi_query import AbiQuery
logger = logging.getLogger(__name__)
@dataclass
class Snapshot(AbiQuery):
"""Returns the result for a given option ID (a specific proposal) on Snapshot.
An array of values representing the amount of votes (uints) for each vote option should be returned
Attributes:
proposal_id:
Specifies the requested data a of a valid proposal on Snapshot.
see https://docs.snapshot.org/graphql-api for reference
"""
proposal_id: str
#: ABI used for encoding/decoding parameters
abi = [{"name": "proposal_id", "type": "string"}]
@property
def value_type(self) -> ValueType:
"""Data type returned for a Snapshot query.
- `uint256[]`: variable-length array of 256-bit values with 18 decimals of precision
- `packed`: false
"""
return ValueType(abi_type="uint256[]", packed=False)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
12183,
13,
3166,
848,
13203,
1053,
848,
1990,
13,
13,
3166,
260,
5481,
327,
29918,
3221,
29889,
29881,
8768,
29889,
1767,
29918,
1853,
1053,
7865,
1542,
13,
3166,
260,
5481,
327,
29918,
3221,
29889,
339,
6358,
29889,
19266,
29918,
1972,
1053,
1976,
29875,
3010,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
29992,
1272,
1990,
13,
1990,
317,
14551,
29898,
4920,
29875,
3010,
1125,
13,
1678,
9995,
11609,
29879,
278,
1121,
363,
263,
2183,
2984,
3553,
313,
29874,
2702,
24963,
29897,
373,
317,
14551,
29889,
13,
4706,
530,
1409,
310,
1819,
15783,
278,
5253,
310,
18952,
313,
29884,
9466,
29897,
363,
1269,
11719,
2984,
881,
367,
4133,
13,
13,
1678,
6212,
5026,
29901,
13,
4706,
24963,
29918,
333,
29901,
13,
9651,
12048,
11057,
278,
13877,
848,
263,
310,
263,
2854,
24963,
373,
317,
14551,
29889,
13,
13,
1678,
1074,
2045,
597,
2640,
29889,
29879,
14551,
29889,
990,
29914,
4262,
1519,
29899,
2754,
363,
3407,
13,
1678,
9995,
13,
13,
1678,
24963,
29918,
333,
29901,
851,
13,
13,
1678,
396,
29901,
319,
12809,
1304,
363,
8025,
29914,
7099,
3689,
4128,
13,
1678,
633,
29875,
353,
518,
6377,
978,
1115,
376,
771,
1066,
284,
29918,
333,
613,
376,
1853,
1115,
376,
1807,
29908,
6525,
13,
13,
1678,
732,
6799,
13,
1678,
822,
995,
29918,
1853,
29898,
1311,
29897,
1599,
7865,
1542,
29901,
13,
4706,
9995,
1469,
1134,
4133,
363,
263,
317,
14551,
2346,
29889,
13,
13,
4706,
448,
421,
13470,
29906,
29945,
29953,
2636,
6998,
2286,
29899,
2848,
1409,
310,
29871,
29906,
29945,
29953,
29899,
2966,
1819,
411,
29871,
29896,
29947,
1602,
326,
1338,
310,
16716,
13,
4706,
448,
421,
4058,
287,
6998,
2089,
13,
4706,
9995,
13,
13,
4706,
736,
7865,
1542,
29898,
19266,
29918,
1853,
543,
13470,
29906,
29945,
29953,
2636,
613,
4870,
287,
29922,
8824,
29897,
13,
2
] |
samaf/model/EvaluationSinhalaSongsDataset.py | pasinducw/scs-4224-fyp | 1 | 129689 | import os
import math
import torch
import numpy as np
class EvaluationSinhalaSongsDataset(torch.utils.data.Dataset):
def __init__(self, root_dir, trim_seconds=10, indexing=False):
self.dir = root_dir
self.feature_list = sorted(os.listdir(self.dir))
self.trim_seconds = trim_seconds
self.indexing = indexing
self.divisor = 1 if indexing else 10
length = len(self.feature_list)
block_1 = math.floor((length/5.0) * 0.6) * 5 # 60% of originals
block_2 = math.floor((length/5.0) * 0.8) * 5 # 80% of originals
start_index = block_1
end_index = block_2
self.feature_list = self.feature_list[start_index:end_index]
def __len__(self):
return len(self.feature_list) * self.divisor
def __getitem__(self, idx):
if torch.is_tensor(idx):
idx = idx.tolist()
file_id = idx // self.divisor
song_id = self.feature_list[file_id].split(".")[0]
offset_id = idx % self.divisor
song_path = os.path.join(self.dir, self.feature_list[file_id])
_, features = np.load(song_path, allow_pickle=True)
# mfccs = torch.from_numpy(np.load(song_path))
trim_frames = self.trim_seconds * 100
# mfccs = mfccs[:, :trim_frames] # trim song to given number of seconds
all_mfccs = []
features = [features[offset_id]]
for mfccs in features:
# trim song to given number of seconds
mfccs = torch.from_numpy(mfccs[:, :trim_frames])
# converting to shape [M_number_of_mfcc_coefficients, I_MFCC_blocks, T_number_of_steps]
mfccs = mfccs.view(13, -1, 100)
# converting to shape [I_MFCC_blocks, T_number_of_steps, M_number_of_mfcc_coefficients]
mfccs = mfccs.permute(1, 2, 0)
all_mfccs.append(mfccs)
return int(song_id), torch.cat(all_mfccs).float()
| [
1,
1053,
2897,
13,
5215,
5844,
13,
5215,
4842,
305,
13,
5215,
12655,
408,
7442,
13,
13,
13,
1990,
382,
4387,
362,
29903,
262,
29882,
2883,
29903,
24733,
16390,
24541,
29898,
7345,
305,
29889,
13239,
29889,
1272,
29889,
16390,
24541,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3876,
29918,
3972,
29892,
17151,
29918,
23128,
29922,
29896,
29900,
29892,
26190,
29922,
8824,
1125,
13,
4706,
1583,
29889,
3972,
353,
3876,
29918,
3972,
13,
4706,
1583,
29889,
14394,
29918,
1761,
353,
12705,
29898,
359,
29889,
1761,
3972,
29898,
1311,
29889,
3972,
876,
13,
4706,
1583,
29889,
15450,
29918,
23128,
353,
17151,
29918,
23128,
13,
4706,
1583,
29889,
2248,
292,
353,
26190,
13,
13,
4706,
1583,
29889,
4563,
275,
272,
353,
29871,
29896,
565,
26190,
1683,
29871,
29896,
29900,
13,
13,
4706,
3309,
353,
7431,
29898,
1311,
29889,
14394,
29918,
1761,
29897,
13,
4706,
2908,
29918,
29896,
353,
5844,
29889,
14939,
3552,
2848,
29914,
29945,
29889,
29900,
29897,
334,
29871,
29900,
29889,
29953,
29897,
334,
29871,
29945,
29871,
396,
29871,
29953,
29900,
29995,
310,
2441,
29879,
13,
4706,
2908,
29918,
29906,
353,
5844,
29889,
14939,
3552,
2848,
29914,
29945,
29889,
29900,
29897,
334,
29871,
29900,
29889,
29947,
29897,
334,
29871,
29945,
29871,
396,
29871,
29947,
29900,
29995,
310,
2441,
29879,
13,
13,
4706,
1369,
29918,
2248,
353,
2908,
29918,
29896,
13,
4706,
1095,
29918,
2248,
353,
2908,
29918,
29906,
13,
13,
4706,
1583,
29889,
14394,
29918,
1761,
353,
1583,
29889,
14394,
29918,
1761,
29961,
2962,
29918,
2248,
29901,
355,
29918,
2248,
29962,
13,
13,
1678,
822,
4770,
2435,
12035,
1311,
1125,
13,
4706,
736,
7431,
29898,
1311,
29889,
14394,
29918,
1761,
29897,
334,
1583,
29889,
4563,
275,
272,
13,
13,
1678,
822,
4770,
657,
667,
12035,
1311,
29892,
22645,
1125,
13,
4706,
565,
4842,
305,
29889,
275,
29918,
20158,
29898,
13140,
1125,
13,
9651,
22645,
353,
22645,
29889,
25027,
391,
580,
13,
13,
4706,
934,
29918,
333,
353,
22645,
849,
1583,
29889,
4563,
275,
272,
13,
4706,
4823,
29918,
333,
353,
1583,
29889,
14394,
29918,
1761,
29961,
1445,
29918,
333,
1822,
5451,
17350,
1159,
29961,
29900,
29962,
13,
4706,
9210,
29918,
333,
353,
22645,
1273,
1583,
29889,
4563,
275,
272,
13,
13,
4706,
4823,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
3972,
29892,
1583,
29889,
14394,
29918,
1761,
29961,
1445,
29918,
333,
2314,
13,
4706,
17117,
5680,
353,
7442,
29889,
1359,
29898,
21453,
29918,
2084,
29892,
2758,
29918,
23945,
280,
29922,
5574,
29897,
13,
4706,
396,
286,
29888,
617,
29879,
353,
4842,
305,
29889,
3166,
29918,
23749,
29898,
9302,
29889,
1359,
29898,
21453,
29918,
2084,
876,
13,
13,
4706,
17151,
29918,
19935,
353,
1583,
29889,
15450,
29918,
23128,
334,
29871,
29896,
29900,
29900,
13,
4706,
396,
286,
29888,
617,
29879,
353,
286,
29888,
617,
29879,
7503,
29892,
584,
15450,
29918,
19935,
29962,
29871,
396,
17151,
4823,
304,
2183,
1353,
310,
6923,
13,
13,
4706,
599,
29918,
29885,
29888,
617,
29879,
353,
5159,
13,
13,
4706,
5680,
353,
518,
22100,
29961,
10289,
29918,
333,
5262,
13,
13,
4706,
363,
286,
29888,
617,
29879,
297,
5680,
29901,
13,
9651,
396,
17151,
4823,
304,
2183,
1353,
310,
6923,
13,
9651,
286,
29888,
617,
29879,
353,
4842,
305,
29889,
3166,
29918,
23749,
29898,
29885,
29888,
617,
29879,
7503,
29892,
584,
15450,
29918,
19935,
2314,
13,
13,
9651,
396,
17415,
304,
8267,
518,
29924,
29918,
4537,
29918,
974,
29918,
29885,
29888,
617,
29918,
1111,
8462,
29879,
29892,
306,
29918,
29924,
29943,
4174,
29918,
1271,
29879,
29892,
323,
29918,
4537,
29918,
974,
29918,
24530,
29962,
13,
9651,
286,
29888,
617,
29879,
353,
286,
29888,
617,
29879,
29889,
1493,
29898,
29896,
29941,
29892,
448,
29896,
29892,
29871,
29896,
29900,
29900,
29897,
13,
9651,
396,
17415,
304,
8267,
518,
29902,
29918,
29924,
29943,
4174,
29918,
1271,
29879,
29892,
323,
29918,
4537,
29918,
974,
29918,
24530,
29892,
341,
29918,
4537,
29918,
974,
29918,
29885,
29888,
617,
29918,
1111,
8462,
29879,
29962,
13,
9651,
286,
29888,
617,
29879,
353,
286,
29888,
617,
29879,
29889,
17858,
1082,
29898,
29896,
29892,
29871,
29906,
29892,
29871,
29900,
29897,
13,
9651,
599,
29918,
29885,
29888,
617,
29879,
29889,
4397,
29898,
29885,
29888,
617,
29879,
29897,
13,
13,
4706,
736,
938,
29898,
21453,
29918,
333,
511,
4842,
305,
29889,
4117,
29898,
497,
29918,
29885,
29888,
617,
29879,
467,
7411,
580,
13,
2
] |
scripts/Data_eda.py | abimur-123/Mentalhealth_project | 1 | 54420 | #!/usr/bin/env python
# coding: utf-8
# # Data EDA
# Author - <NAME>
# Written - December 2017
# This script take cleansed data from a csv file and writes figures to a results folder
# Parameters required -
# 1. Cleansed csv file
# 2. Codebook csv file
# 3. Destination folder for figures
import pandas as pd
import numpy as np
import sys
import os
import matplotlib as mpl
if os.environ.get('DISPLAY','') == '':
print('no display found. Using non-interactive Agg backend')
mpl.use('Agg')
import matplotlib.pyplot as plt
import seaborn as sns
#%matplotlib inline
sns.set_style("dark")
def plotBar(var, data,title,filename,directory):
'''
This function takes in a pandas data frame and a column and prints/saves count of instances in a categorical variable
Users can specify where this file needs to be saved
Args: var - variable to plot
data - input data
title - Graph title
filename - File name for plot
directory - Folder location for plot
'''
bar_df = data[[var]].groupby([var]).size().reset_index(name='count')
bar_plot = sns.barplot(x = var,y = "count",data = bar_df)
plt.ylabel("count")
plt.xlabel(" ")
plt.title("{0}".format(title))
fig = bar_plot.get_figure()
if(filename is not None):
di = directory
if not os.path.exists(di):#checks if data directory exists, creates one otherwise
os.makedirs(di)
fig.savefig(di + "/" + filename + ".png")
def plot_data(cleansed_file,codebook_src,results_dest):
'''
This function takes in a cleansed file,the codebook and saves images of bar plots to the specified folder
Args: cleansed_file - file with cleansed data
codebook_src - variable codebook
results_dest - destination specifying where the images need to be stored
'''
# Read cleansed data and codebook
clean_fn = cleansed_file
di = clean_fn.rsplit('/',1)[0]
if not os.path.exists(di):#checks if data directory exists, creates one otherwise
os.makedirs(di)
df = pd.read_csv(clean_fn, encoding='latin-1')
code_fn = codebook_src
di = code_fn.rsplit('/',1)[0]
if not os.path.exists(di): #checks if data directory exists, creates one otherwise
os.makedirs(di)
cb = pd.read_csv(code_fn, encoding='latin-1')
a = cb.loc[cb['Old_names'] == 'Have you been diagnosed with a mental health condition by a medical professional?','New_names']
plotBar(a.values[0],df,"Have you been diagnosed for mental disorder by a professional?","diag_prof",results_dest)
b = cb.loc[cb['Old_names'] == 'Do you currently have a mental health disorder?','New_names']
plotBar(b.values[0],df,"Do you have mental disorder?","have_disorder",results_dest)
c = cb.loc[cb['Old_names'] == 'What is your gender?','New_names']
plotBar(c.values[0],df,"Gender breakdown","gender_breakdown",results_dest)
d = cb.loc[cb['Old_names'] == 'Does your employer provide mental health benefits as part of healthcare coverage?','New_names']
plotBar(d.values[0],df,"Does your employee provide Mental health benefits?","employee_benefits",results_dest)
e = cb.loc[cb['Old_names'] == 'Would you feel comfortable discussing a mental health disorder with your coworkers?','New_names']
plotBar(e.values[0],df,"Comfortable with discussing about mental health condition with coworkers?","coworker_comfort",results_dest)
f = cb.loc[cb['Old_names'] == 'Do you feel that your employer takes mental health as seriously as physical health?','New_names']
plotBar(f.values[0],df,"Do you feel that your employer takes mental health as seriously as physical health?","mental_physical",results_dest)
g = cb.loc[cb['Old_names'] == 'Does your employer offer resources to learn more about mental health concerns and options for seeking help?','New_names']
plotBar(g.values[0],df,"Does employee offer resources to learn about mental health?","emp_resources",results_dest)
h = cb.loc[cb['Old_names'] == 'Do you think that discussing a mental health disorder with your employer would have negative consequences?','New_names']
plotBar(h.values[0],df,"Do you think discussing mental health would have a negative consequence?","disc_negative",results_dest)
i = cb.loc[cb['Old_names'] == 'Is your anonymity protected if you choose to take advantage of mental health or substance abuse treatment resources provided by your employer?','New_names']
plotBar(i.values[0],df,"Anonymity when one opens up about mental health?","anonymity",results_dest)
if __name__ == '__main__':
cleansed_file = sys.argv[1] if len(sys.argv) > 1 else 'data/cleansed_data.csv'
codebook_src = sys.argv[2] if len(sys.argv) > 2 else 'docs/codebook.csv'
results_dest = sys.argv[3] if len(sys.argv) > 3 else 'results/figures'
plot_data(cleansed_file,codebook_src,results_dest)
print("End of program")
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
13,
29937,
396,
3630,
382,
7698,
13,
29937,
13361,
448,
529,
5813,
29958,
13,
29937,
16849,
841,
448,
5846,
29871,
29906,
29900,
29896,
29955,
13,
29937,
910,
2471,
2125,
4531,
550,
287,
848,
515,
263,
11799,
934,
322,
15873,
13994,
304,
263,
2582,
4138,
13,
29937,
12662,
2699,
3734,
448,
13,
29937,
29871,
29896,
29889,
21386,
550,
287,
11799,
934,
13,
29937,
29871,
29906,
29889,
5920,
2909,
11799,
934,
13,
29937,
29871,
29941,
29889,
15435,
3381,
4138,
363,
13994,
13,
13,
5215,
11701,
408,
10518,
13,
5215,
12655,
408,
7442,
13,
5215,
10876,
13,
5215,
2897,
13,
5215,
22889,
408,
286,
572,
13,
361,
2897,
29889,
21813,
29889,
657,
877,
23711,
29925,
18799,
3788,
1495,
1275,
525,
2396,
13,
259,
1596,
877,
1217,
2479,
1476,
29889,
5293,
1661,
29899,
1639,
4925,
319,
1505,
14998,
1495,
13,
259,
286,
572,
29889,
1509,
877,
29909,
1505,
1495,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
409,
370,
1398,
408,
269,
1983,
13,
13,
29937,
29995,
2922,
17357,
10583,
13,
29879,
1983,
29889,
842,
29918,
3293,
703,
26031,
1159,
13,
13,
1753,
6492,
4297,
29898,
1707,
29892,
848,
29892,
3257,
29892,
9507,
29892,
12322,
1125,
13,
1678,
14550,
13,
1678,
910,
740,
4893,
297,
263,
11701,
848,
3515,
322,
263,
1897,
322,
14677,
29914,
29879,
5989,
2302,
310,
8871,
297,
263,
11608,
936,
2286,
13,
1678,
23861,
508,
6084,
988,
445,
934,
4225,
304,
367,
7160,
13,
13,
1678,
826,
3174,
29901,
722,
448,
2286,
304,
6492,
13,
3986,
848,
448,
1881,
848,
13,
3986,
3611,
448,
12367,
3611,
13,
3986,
10422,
448,
3497,
1024,
363,
6492,
13,
3986,
3884,
448,
383,
3194,
4423,
363,
6492,
13,
1678,
14550,
13,
1678,
2594,
29918,
2176,
353,
848,
8999,
1707,
29962,
1822,
27789,
4197,
1707,
14664,
2311,
2141,
12071,
29918,
2248,
29898,
978,
2433,
2798,
1495,
13,
1678,
2594,
29918,
5317,
353,
269,
1983,
29889,
1646,
5317,
29898,
29916,
353,
722,
29892,
29891,
353,
376,
2798,
613,
1272,
353,
2594,
29918,
2176,
29897,
13,
1678,
14770,
29889,
29891,
1643,
703,
2798,
1159,
13,
1678,
14770,
29889,
29916,
1643,
703,
16521,
13,
1678,
14770,
29889,
3257,
703,
29912,
29900,
29913,
1642,
4830,
29898,
3257,
876,
13,
1678,
2537,
353,
2594,
29918,
5317,
29889,
657,
29918,
4532,
580,
13,
13,
1678,
565,
29898,
9507,
338,
451,
6213,
1125,
13,
4706,
652,
353,
3884,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
6051,
1125,
29937,
3198,
29879,
565,
848,
3884,
4864,
29892,
10017,
697,
6467,
13,
9651,
2897,
29889,
29885,
12535,
12935,
29898,
6051,
29897,
13,
4706,
2537,
29889,
7620,
1003,
29898,
6051,
718,
5591,
29908,
718,
10422,
718,
11393,
2732,
1159,
13,
13,
1753,
6492,
29918,
1272,
29898,
2841,
550,
287,
29918,
1445,
29892,
401,
2909,
29918,
4351,
29892,
9902,
29918,
7854,
1125,
13,
1678,
14550,
13,
1678,
910,
740,
4893,
297,
263,
4531,
550,
287,
934,
29892,
1552,
775,
2909,
322,
27401,
4558,
310,
2594,
24580,
304,
278,
6790,
4138,
13,
13,
1678,
826,
3174,
29901,
4531,
550,
287,
29918,
1445,
448,
934,
411,
4531,
550,
287,
848,
13,
3986,
775,
2909,
29918,
4351,
448,
2286,
775,
2909,
13,
308,
2582,
29918,
7854,
448,
12551,
22146,
988,
278,
4558,
817,
304,
367,
6087,
13,
1678,
14550,
13,
1678,
396,
7523,
4531,
550,
287,
848,
322,
775,
2909,
13,
1678,
5941,
29918,
9144,
353,
4531,
550,
287,
29918,
1445,
13,
1678,
652,
353,
5941,
29918,
9144,
29889,
2288,
2830,
11219,
742,
29896,
9601,
29900,
29962,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
6051,
1125,
29937,
3198,
29879,
565,
848,
3884,
4864,
29892,
10017,
697,
6467,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
6051,
29897,
13,
1678,
4489,
353,
10518,
29889,
949,
29918,
7638,
29898,
14941,
29918,
9144,
29892,
8025,
2433,
5066,
262,
29899,
29896,
1495,
13,
13,
1678,
775,
29918,
9144,
353,
775,
2909,
29918,
4351,
13,
1678,
652,
353,
775,
29918,
9144,
29889,
2288,
2830,
11219,
742,
29896,
9601,
29900,
29962,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
6051,
1125,
396,
3198,
29879,
565,
848,
3884,
4864,
29892,
10017,
697,
6467,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
6051,
29897,
13,
1678,
26324,
353,
10518,
29889,
949,
29918,
7638,
29898,
401,
29918,
9144,
29892,
8025,
2433,
5066,
262,
29899,
29896,
1495,
13,
13,
1678,
263,
353,
26324,
29889,
2029,
29961,
10702,
1839,
21648,
29918,
7039,
2033,
1275,
525,
25559,
366,
1063,
24876,
2662,
411,
263,
19119,
9045,
4195,
491,
263,
16083,
10257,
29973,
3788,
4373,
29918,
7039,
2033,
13,
1678,
6492,
4297,
29898,
29874,
29889,
5975,
29961,
29900,
1402,
2176,
1699,
25559,
366,
1063,
24876,
2662,
363,
19119,
766,
2098,
491,
263,
10257,
29973,
3284,
6051,
351,
29918,
23221,
613,
9902,
29918,
7854,
29897,
13,
13,
1678,
289,
353,
26324,
29889,
2029,
29961,
10702,
1839,
21648,
29918,
7039,
2033,
1275,
525,
6132,
366,
5279,
505,
263,
19119,
9045,
766,
2098,
29973,
3788,
4373,
29918,
7039,
2033,
13,
1678,
6492,
4297,
29898,
29890,
29889,
5975,
29961,
29900,
1402,
2176,
1699,
6132,
366,
505,
19119,
766,
2098,
29973,
3284,
17532,
29918,
2218,
2098,
613,
9902,
29918,
7854,
29897,
13,
13,
1678,
274,
353,
26324,
29889,
2029,
29961,
10702,
1839,
21648,
29918,
7039,
2033,
1275,
525,
5618,
338,
596,
23346,
29973,
3788,
4373,
29918,
7039,
2033,
13,
1678,
6492,
4297,
29898,
29883,
29889,
5975,
29961,
29900,
1402,
2176,
1699,
29954,
1581,
2867,
3204,
3284,
26098,
29918,
8690,
3204,
613,
9902,
29918,
7854,
29897,
13,
13,
1678,
270,
353,
26324,
29889,
2029,
29961,
10702,
1839,
21648,
29918,
7039,
2033,
1275,
525,
25125,
596,
5703,
261,
3867,
19119,
9045,
23633,
408,
760,
310,
9045,
18020,
23746,
29973,
3788,
4373,
29918,
7039,
2033,
13,
1678,
6492,
4297,
29898,
29881,
29889,
5975,
29961,
29900,
1402,
2176,
1699,
25125,
596,
19001,
3867,
341,
13703,
9045,
23633,
29973,
3284,
26143,
29918,
1785,
1389,
1169,
613,
9902,
29918,
7854,
29897,
13,
13,
1678,
321,
353,
26324,
29889,
2029,
29961,
10702,
1839,
21648,
29918,
7039,
2033,
1275,
525,
29956,
483,
366,
4459,
25561,
5353,
292,
263,
19119,
9045,
766,
2098,
411,
596,
21282,
548,
414,
29973,
3788,
4373,
29918,
7039,
2033,
13,
1678,
6492,
4297,
29898,
29872,
29889,
5975,
29961,
29900,
1402,
2176,
1699,
1523,
3921,
519,
411,
5353,
292,
1048,
19119,
9045,
4195,
411,
21282,
548,
414,
29973,
3284,
20587,
548,
261,
29918,
510,
3921,
613,
9902,
29918,
7854,
29897,
13,
13,
1678,
285,
353,
26324,
29889,
2029,
29961,
10702,
1839,
21648,
29918,
7039,
2033,
1275,
525,
6132,
366,
4459,
393,
596,
5703,
261,
4893,
19119,
9045,
408,
25798,
408,
9128,
9045,
29973,
3788,
4373,
29918,
7039,
2033,
13,
1678,
6492,
4297,
29898,
29888,
29889,
5975,
29961,
29900,
1402,
2176,
1699,
6132,
366,
4459,
393,
596,
5703,
261,
4893,
19119,
9045,
408,
25798,
408,
9128,
9045,
29973,
3284,
358,
284,
29918,
14017,
936,
613,
9902,
29918,
7854,
29897,
13,
13,
1678,
330,
353,
26324,
29889,
2029,
29961,
10702,
1839,
21648,
29918,
7039,
2033,
1275,
525,
25125,
596,
5703,
261,
5957,
7788,
304,
5110,
901,
1048,
19119,
9045,
21838,
322,
3987,
363,
25738,
1371,
29973,
3788,
4373,
29918,
7039,
2033,
13,
1678,
6492,
4297,
29898,
29887,
29889,
5975,
29961,
29900,
1402,
2176,
1699,
25125,
19001,
5957,
7788,
304,
5110,
1048,
19119,
9045,
29973,
3284,
3451,
29918,
13237,
613,
9902,
29918,
7854,
29897,
13,
13,
1678,
298,
353,
26324,
29889,
2029,
29961,
10702,
1839,
21648,
29918,
7039,
2033,
1275,
525,
6132,
366,
1348,
393,
5353,
292,
263,
19119,
9045,
766,
2098,
411,
596,
5703,
261,
723,
505,
8178,
27721,
29973,
3788,
4373,
29918,
7039,
2033,
13,
1678,
6492,
4297,
29898,
29882,
29889,
5975,
29961,
29900,
1402,
2176,
1699,
6132,
366,
1348,
5353,
292,
19119,
9045,
723,
505,
263,
8178,
17004,
29973,
3284,
2218,
29883,
29918,
22198,
613,
9902,
29918,
7854,
29897,
13,
13,
1678,
474,
353,
26324,
29889,
2029,
29961,
10702,
1839,
21648,
29918,
7039,
2033,
1275,
525,
3624,
596,
385,
4735,
537,
6364,
565,
366,
6755,
304,
2125,
10631,
310,
19119,
9045,
470,
5960,
749,
633,
1509,
14502,
7788,
4944,
491,
596,
5703,
261,
29973,
3788,
4373,
29918,
7039,
2033,
13,
1678,
6492,
4297,
29898,
29875,
29889,
5975,
29961,
29900,
1402,
2176,
1699,
2744,
4735,
537,
746,
697,
13246,
701,
1048,
19119,
9045,
29973,
3284,
273,
4735,
537,
613,
9902,
29918,
7854,
29897,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
4531,
550,
287,
29918,
1445,
353,
10876,
29889,
19218,
29961,
29896,
29962,
565,
7431,
29898,
9675,
29889,
19218,
29897,
1405,
29871,
29896,
1683,
525,
1272,
29914,
2841,
550,
287,
29918,
1272,
29889,
7638,
29915,
13,
1678,
775,
2909,
29918,
4351,
353,
10876,
29889,
19218,
29961,
29906,
29962,
565,
7431,
29898,
9675,
29889,
19218,
29897,
1405,
29871,
29906,
1683,
525,
2640,
29914,
401,
2909,
29889,
7638,
29915,
13,
1678,
2582,
29918,
7854,
353,
10876,
29889,
19218,
29961,
29941,
29962,
565,
7431,
29898,
9675,
29889,
19218,
29897,
1405,
29871,
29941,
1683,
525,
9902,
29914,
1003,
1973,
29915,
13,
1678,
6492,
29918,
1272,
29898,
2841,
550,
287,
29918,
1445,
29892,
401,
2909,
29918,
4351,
29892,
9902,
29918,
7854,
29897,
13,
1678,
1596,
703,
5044,
310,
1824,
1159,
13,
2
] |
time_series_example.py | techBeck03/intersight-python-utils | 2 | 191319 | import logging
from pprint import pformat
import traceback
import intersight.api.telemetry_api
import intersight.model.telemetry_druid_data_source
import intersight.model.telemetry_druid_period_granularity
import intersight.model.telemetry_druid_query_context
import intersight.model.telemetry_druid_time_series_request
import credentials
FORMAT = '%(asctime)-15s [%(levelname)s] [%(filename)s:%(lineno)s] %(message)s'
logging.basicConfig(format=FORMAT, level=logging.DEBUG)
logger = logging.getLogger('openapi')
def get_time_series(api_client):
"""Query Druid time series"""
# Create an instance of the API telemetry service.
api_instance = intersight.api.telemetry_api.TelemetryApi(api_client)
logger.info("Query 'ucs_ether_port_stat' time series")
req = intersight.model.telemetry_druid_time_series_request.TelemetryDruidTimeSeriesRequest(
query_type="timeseries",
data_source=intersight.model.telemetry_druid_data_source.TelemetryDruidDataSource(
type="table",
name="ucs_ether_port_stat",
),
intervals=[
"2021-01-01T00:00:00.000Z/2021-01-15T00:00:00.000Z",
],
granularity=intersight.model.telemetry_druid_period_granularity.TelemetryDruidPeriodGranularity(
type="period",
period="P1D",
),
context=intersight.model.telemetry_druid_query_context.TelemetryDruidQueryContext(
timeout=30,
query_id="ucs_ether_port_stat-QueryIdentifier",
),
)
api_response = api_instance.query_telemetry_time_series(
telemetry_druid_time_series_request=req,
)
logger.info(pformat(api_response))
##########################
logger.info("Query 'device_connector' time series")
req = intersight.model.telemetry_druid_time_series_request.TelemetryDruidTimeSeriesRequest(
query_type="timeseries",
data_source=intersight.model.telemetry_druid_data_source.TelemetryDruidDataSource(
type="table",
name="device_connector",
),
intervals=[
"2021-01-01T00:00:00.000Z/2021-01-15T00:00:00.000Z",
],
granularity=intersight.model.telemetry_druid_period_granularity.TelemetryDruidPeriodGranularity(
type="period",
period="P1D",
),
context=intersight.model.telemetry_druid_query_context.TelemetryDruidQueryContext(
timeout=30,
query_id="device_connector-QueryIdentifier",
),
)
api_response = api_instance.query_telemetry_time_series(
telemetry_druid_time_series_request=req,
)
logger.info(pformat(api_response))
##########################
logger.info("Query 'PSU stat' time series")
req = intersight.model.telemetry_druid_time_series_request.TelemetryDruidTimeSeriesRequest(
aggregations=[
intersight.model.telemetry_druid_aggregator.TelemetryDruidAggregator(
field_name="sumEnergyConsumed",
type="doubleSum",
name="energyConsumed",
field_names=["sumEnergyConsumed"]
),
],
query_type="timeseries",
data_source=intersight.model.telemetry_druid_data_source.TelemetryDruidDataSource(
type="table",
name="psu_stat",
),
intervals=[
"2021-01-01T00:00:00.000Z/2021-01-15T00:00:00.000Z",
],
granularity=intersight.model.telemetry_druid_period_granularity.TelemetryDruidPeriodGranularity(
type="period",
period="P1D",
),
context=intersight.model.telemetry_druid_query_context.TelemetryDruidQueryContext(
timeout=30,
query_id="psu_stat-QueryIdentifier",
),
)
api_response = api_instance.query_telemetry_time_series(
telemetry_druid_time_series_request=req,
)
logger.info(pformat(api_response))
def main():
# Configure API key settings for authentication
api_client = credentials.config_credentials()
try:
# Get example time series data
get_time_series(api_client)
except intersight.OpenApiException as e:
logger.error("Exception when calling API: %s\n" % e)
traceback.print_exc()
if __name__ == "__main__":
main()
| [
1,
1053,
12183,
13,
3166,
282,
2158,
1053,
282,
4830,
13,
5215,
9637,
1627,
13,
13,
5215,
1006,
29879,
523,
29889,
2754,
29889,
371,
2409,
27184,
29918,
2754,
13,
5215,
1006,
29879,
523,
29889,
4299,
29889,
371,
2409,
27184,
29918,
26179,
333,
29918,
1272,
29918,
4993,
13,
5215,
1006,
29879,
523,
29889,
4299,
29889,
371,
2409,
27184,
29918,
26179,
333,
29918,
19145,
29918,
629,
273,
1070,
537,
13,
5215,
1006,
29879,
523,
29889,
4299,
29889,
371,
2409,
27184,
29918,
26179,
333,
29918,
1972,
29918,
4703,
13,
5215,
1006,
29879,
523,
29889,
4299,
29889,
371,
2409,
27184,
29918,
26179,
333,
29918,
2230,
29918,
13757,
29918,
3827,
13,
5215,
16140,
13,
13,
19094,
1299,
353,
14210,
29898,
294,
312,
603,
6817,
29896,
29945,
29879,
518,
29995,
29898,
5563,
978,
29897,
29879,
29962,
518,
29995,
29898,
9507,
29897,
29879,
16664,
29898,
1915,
8154,
29897,
29879,
29962,
1273,
29898,
4906,
29897,
29879,
29915,
13,
21027,
29889,
16121,
3991,
29898,
4830,
29922,
19094,
1299,
29892,
3233,
29922,
21027,
29889,
18525,
29897,
13,
21707,
353,
12183,
29889,
657,
16363,
877,
3150,
2754,
1495,
13,
13,
13,
1753,
679,
29918,
2230,
29918,
13757,
29898,
2754,
29918,
4645,
1125,
13,
1678,
9995,
3010,
16597,
333,
931,
3652,
15945,
29908,
13,
13,
1678,
396,
6204,
385,
2777,
310,
278,
3450,
734,
2409,
27184,
2669,
29889,
13,
1678,
7882,
29918,
8758,
353,
1006,
29879,
523,
29889,
2754,
29889,
371,
2409,
27184,
29918,
2754,
29889,
7141,
2409,
27184,
11713,
29898,
2754,
29918,
4645,
29897,
13,
1678,
17927,
29889,
3888,
703,
3010,
525,
1682,
29879,
29918,
1979,
29918,
637,
29918,
6112,
29915,
931,
3652,
1159,
13,
1678,
12428,
353,
1006,
29879,
523,
29889,
4299,
29889,
371,
2409,
27184,
29918,
26179,
333,
29918,
2230,
29918,
13757,
29918,
3827,
29889,
7141,
2409,
27184,
29928,
582,
333,
2481,
19204,
3089,
29898,
13,
4706,
2346,
29918,
1853,
543,
3706,
6358,
613,
13,
4706,
848,
29918,
4993,
29922,
1639,
29879,
523,
29889,
4299,
29889,
371,
2409,
27184,
29918,
26179,
333,
29918,
1272,
29918,
4993,
29889,
7141,
2409,
27184,
29928,
582,
333,
15559,
29898,
13,
9651,
1134,
543,
2371,
613,
13,
9651,
1024,
543,
1682,
29879,
29918,
1979,
29918,
637,
29918,
6112,
613,
13,
4706,
10353,
13,
4706,
18747,
11759,
13,
9651,
376,
29906,
29900,
29906,
29896,
29899,
29900,
29896,
29899,
29900,
29896,
29911,
29900,
29900,
29901,
29900,
29900,
29901,
29900,
29900,
29889,
29900,
29900,
29900,
29999,
29914,
29906,
29900,
29906,
29896,
29899,
29900,
29896,
29899,
29896,
29945,
29911,
29900,
29900,
29901,
29900,
29900,
29901,
29900,
29900,
29889,
29900,
29900,
29900,
29999,
613,
13,
4706,
21251,
13,
4706,
3803,
1070,
537,
29922,
1639,
29879,
523,
29889,
4299,
29889,
371,
2409,
27184,
29918,
26179,
333,
29918,
19145,
29918,
629,
273,
1070,
537,
29889,
7141,
2409,
27184,
29928,
582,
333,
29853,
29954,
661,
1070,
537,
29898,
13,
9651,
1134,
543,
19145,
613,
13,
9651,
3785,
543,
29925,
29896,
29928,
613,
13,
4706,
10353,
13,
4706,
3030,
29922,
1639,
29879,
523,
29889,
4299,
29889,
371,
2409,
27184,
29918,
26179,
333,
29918,
1972,
29918,
4703,
29889,
7141,
2409,
27184,
29928,
582,
333,
3010,
2677,
29898,
13,
9651,
11815,
29922,
29941,
29900,
29892,
13,
9651,
2346,
29918,
333,
543,
1682,
29879,
29918,
1979,
29918,
637,
29918,
6112,
29899,
3010,
12889,
613,
13,
4706,
10353,
13,
1678,
1723,
13,
1678,
7882,
29918,
5327,
353,
7882,
29918,
8758,
29889,
1972,
29918,
371,
2409,
27184,
29918,
2230,
29918,
13757,
29898,
13,
4706,
734,
2409,
27184,
29918,
26179,
333,
29918,
2230,
29918,
13757,
29918,
3827,
29922,
7971,
29892,
13,
1678,
1723,
13,
1678,
17927,
29889,
3888,
29898,
29886,
4830,
29898,
2754,
29918,
5327,
876,
13,
13,
1678,
835,
13383,
4136,
2277,
29937,
13,
1678,
17927,
29889,
3888,
703,
3010,
525,
10141,
29918,
11958,
2801,
29915,
931,
3652,
1159,
13,
1678,
12428,
353,
1006,
29879,
523,
29889,
4299,
29889,
371,
2409,
27184,
29918,
26179,
333,
29918,
2230,
29918,
13757,
29918,
3827,
29889,
7141,
2409,
27184,
29928,
582,
333,
2481,
19204,
3089,
29898,
13,
4706,
2346,
29918,
1853,
543,
3706,
6358,
613,
13,
4706,
848,
29918,
4993,
29922,
1639,
29879,
523,
29889,
4299,
29889,
371,
2409,
27184,
29918,
26179,
333,
29918,
1272,
29918,
4993,
29889,
7141,
2409,
27184,
29928,
582,
333,
15559,
29898,
13,
9651,
1134,
543,
2371,
613,
13,
9651,
1024,
543,
10141,
29918,
11958,
2801,
613,
13,
4706,
10353,
13,
4706,
18747,
11759,
13,
9651,
376,
29906,
29900,
29906,
29896,
29899,
29900,
29896,
29899,
29900,
29896,
29911,
29900,
29900,
29901,
29900,
29900,
29901,
29900,
29900,
29889,
29900,
29900,
29900,
29999,
29914,
29906,
29900,
29906,
29896,
29899,
29900,
29896,
29899,
29896,
29945,
29911,
29900,
29900,
29901,
29900,
29900,
29901,
29900,
29900,
29889,
29900,
29900,
29900,
29999,
613,
13,
4706,
21251,
13,
4706,
3803,
1070,
537,
29922,
1639,
29879,
523,
29889,
4299,
29889,
371,
2409,
27184,
29918,
26179,
333,
29918,
19145,
29918,
629,
273,
1070,
537,
29889,
7141,
2409,
27184,
29928,
582,
333,
29853,
29954,
661,
1070,
537,
29898,
13,
9651,
1134,
543,
19145,
613,
13,
9651,
3785,
543,
29925,
29896,
29928,
613,
13,
4706,
10353,
13,
4706,
3030,
29922,
1639,
29879,
523,
29889,
4299,
29889,
371,
2409,
27184,
29918,
26179,
333,
29918,
1972,
29918,
4703,
29889,
7141,
2409,
27184,
29928,
582,
333,
3010,
2677,
29898,
13,
9651,
11815,
29922,
29941,
29900,
29892,
13,
9651,
2346,
29918,
333,
543,
10141,
29918,
11958,
2801,
29899,
3010,
12889,
613,
13,
4706,
10353,
13,
1678,
1723,
13,
1678,
7882,
29918,
5327,
353,
7882,
29918,
8758,
29889,
1972,
29918,
371,
2409,
27184,
29918,
2230,
29918,
13757,
29898,
13,
4706,
734,
2409,
27184,
29918,
26179,
333,
29918,
2230,
29918,
13757,
29918,
3827,
29922,
7971,
29892,
13,
1678,
1723,
13,
1678,
17927,
29889,
3888,
29898,
29886,
4830,
29898,
2754,
29918,
5327,
876,
13,
13,
1678,
835,
13383,
4136,
2277,
29937,
13,
1678,
17927,
29889,
3888,
703,
3010,
525,
7024,
29965,
1002,
29915,
931,
3652,
1159,
13,
1678,
12428,
353,
1006,
29879,
523,
29889,
4299,
29889,
371,
2409,
27184,
29918,
26179,
333,
29918,
2230,
29918,
13757,
29918,
3827,
29889,
7141,
2409,
27184,
29928,
582,
333,
2481,
19204,
3089,
29898,
13,
4706,
11404,
800,
11759,
13,
9651,
1006,
29879,
523,
29889,
4299,
29889,
371,
2409,
27184,
29918,
26179,
333,
29918,
26193,
1061,
29889,
7141,
2409,
27184,
29928,
582,
333,
29909,
26127,
1061,
29898,
13,
18884,
1746,
29918,
978,
543,
2083,
29923,
1089,
1927,
13696,
21571,
613,
13,
18884,
1134,
543,
8896,
11139,
613,
13,
18884,
1024,
543,
27548,
13696,
21571,
613,
13,
18884,
1746,
29918,
7039,
29922,
3366,
2083,
29923,
1089,
1927,
13696,
21571,
3108,
13,
9651,
10353,
13,
4706,
21251,
13,
4706,
2346,
29918,
1853,
543,
3706,
6358,
613,
13,
4706,
848,
29918,
4993,
29922,
1639,
29879,
523,
29889,
4299,
29889,
371,
2409,
27184,
29918,
26179,
333,
29918,
1272,
29918,
4993,
29889,
7141,
2409,
27184,
29928,
582,
333,
15559,
29898,
13,
9651,
1134,
543,
2371,
613,
13,
9651,
1024,
543,
567,
29884,
29918,
6112,
613,
13,
4706,
10353,
13,
4706,
18747,
11759,
13,
9651,
376,
29906,
29900,
29906,
29896,
29899,
29900,
29896,
29899,
29900,
29896,
29911,
29900,
29900,
29901,
29900,
29900,
29901,
29900,
29900,
29889,
29900,
29900,
29900,
29999,
29914,
29906,
29900,
29906,
29896,
29899,
29900,
29896,
29899,
29896,
29945,
29911,
29900,
29900,
29901,
29900,
29900,
29901,
29900,
29900,
29889,
29900,
29900,
29900,
29999,
613,
13,
4706,
21251,
13,
4706,
3803,
1070,
537,
29922,
1639,
29879,
523,
29889,
4299,
29889,
371,
2409,
27184,
29918,
26179,
333,
29918,
19145,
29918,
629,
273,
1070,
537,
29889,
7141,
2409,
27184,
29928,
582,
333,
29853,
29954,
661,
1070,
537,
29898,
13,
9651,
1134,
543,
19145,
613,
13,
9651,
3785,
543,
29925,
29896,
29928,
613,
13,
4706,
10353,
13,
4706,
3030,
29922,
1639,
29879,
523,
29889,
4299,
29889,
371,
2409,
27184,
29918,
26179,
333,
29918,
1972,
29918,
4703,
29889,
7141,
2409,
27184,
29928,
582,
333,
3010,
2677,
29898,
13,
9651,
11815,
29922,
29941,
29900,
29892,
13,
9651,
2346,
29918,
333,
543,
567,
29884,
29918,
6112,
29899,
3010,
12889,
613,
13,
4706,
10353,
13,
1678,
1723,
13,
1678,
7882,
29918,
5327,
353,
7882,
29918,
8758,
29889,
1972,
29918,
371,
2409,
27184,
29918,
2230,
29918,
13757,
29898,
13,
4706,
734,
2409,
27184,
29918,
26179,
333,
29918,
2230,
29918,
13757,
29918,
3827,
29922,
7971,
29892,
13,
1678,
1723,
13,
1678,
17927,
29889,
3888,
29898,
29886,
4830,
29898,
2754,
29918,
5327,
876,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
396,
1281,
4532,
3450,
1820,
6055,
363,
10760,
13,
1678,
7882,
29918,
4645,
353,
16140,
29889,
2917,
29918,
11944,
9409,
580,
13,
13,
1678,
1018,
29901,
13,
4706,
396,
3617,
1342,
931,
3652,
848,
13,
4706,
679,
29918,
2230,
29918,
13757,
29898,
2754,
29918,
4645,
29897,
13,
13,
1678,
5174,
1006,
29879,
523,
29889,
6585,
11713,
2451,
408,
321,
29901,
13,
4706,
17927,
29889,
2704,
703,
2451,
746,
5432,
3450,
29901,
1273,
29879,
29905,
29876,
29908,
1273,
321,
29897,
13,
4706,
9637,
1627,
29889,
2158,
29918,
735,
29883,
580,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1667,
580,
13,
2
] |
year_3/comppi_1/managers/views.py | honchardev/KPI | 0 | 33363 | <gh_stars>0
import json
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.models import User
from django.http import JsonResponse
from django.shortcuts import get_object_or_404
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from .models import ManagersModelsJSONEncoder
from .models import PubOrgAdmin, PubOrgRegistrant
@method_decorator(csrf_exempt, name='dispatch')
def apilogin(req):
if req.method == 'POST':
req_params = req.body.decode("utf-8")
login_fields = json.loads(req_params)
username = login_fields.get('username')
password = login_fields.get('password')
auth_user = authenticate(username=username, password=password)
if auth_user is not None:
login(req, auth_user)
json_positive_response = {'status': True}
return JsonResponse(json_positive_response)
json_negative_response = {'status': False}
return JsonResponse(json_negative_response)
json_err_response = {'status': 405, 'descr': 'method not allowed'}
return JsonResponse(json_err_response)
@method_decorator(csrf_exempt, name='dispatch')
def apilogout(req):
if req.method == 'POST':
if req.user.is_authenticated:
saved_user = req.user
else:
saved_user = None
logout(req)
json_logout_state_response = {
'logged_out_user': saved_user,
'logged_out': not req.user.is_authenticated
}
return JsonResponse(json_logout_state_response, safe=False, encoder=ManagersModelsJSONEncoder)
json_err_response = {'status': 405, 'descr': 'method not allowed'}
return JsonResponse(json_err_response)
@method_decorator(csrf_exempt, name='dispatch')
def apimanageadmin(req):
try:
current_user_instance = req.user
current_admin_instance = get_object_or_404(PubOrgAdmin, user=req.user.id)
except Exception as e:
json_err_response = {'status': 404, 'descr': 'Some exception: {0}'.format(e)}
return JsonResponse(json_err_response)
if req.method == 'GET':
json_get_response = {
'user_inst': current_user_instance,
'admin_inst': current_admin_instance
}
return JsonResponse(json_get_response, safe=False, encoder=ManagersModelsJSONEncoder)
elif req.method == 'POST':
req_params = req.body.decode("utf-8")
post_fields = json.loads(req_params)
username = post_fields.get('username')
password = post_fields.get('password')
doc_code = post_fields.get('doc_code')
credentials = post_fields.get('credentials')
# Create and save User instance.
new_user_inst = User(username=username, password=password)
new_user_inst.save()
# Create and save PubOrgAdmin instance.
new_puborgadmin_inst = PubOrgAdmin(
user=new_user_inst.pk,
doc_code=doc_code,
credentials=credentials
)
new_puborgadmin_inst.save()
# Send resulting json response.
json_post_response = {
'new_user_inst': new_user_inst,
'new_admin_inst': new_puborgadmin_inst,
}
return JsonResponse(json_post_response, safe=False, encoder=ManagersModelsJSONEncoder)
elif req.method == 'PUT':
req_params = req.body.decode("utf-8")
put_fields = json.loads(req_params)
admin_id = put_fields.get('admin_id')
doc_code = put_fields.get('doc_code')
credentials = put_fields.get('credentials')
# Update and save PubOrgAdmin instance.
admin_to_update = PubOrgAdmin.objects.get(pk=admin_id)
admin_to_update.doc_code = doc_code
admin_to_update.credentials = credentials
admin_to_update.save()
# Send resulting json response.
json_put_response = {
'upd_admin_inst': admin_to_update
}
return JsonResponse(json_put_response, safe=False, encoder=ManagersModelsJSONEncoder)
elif req.method == 'DELETE':
req_params = req.body.decode("utf-8")
delete_fields = json.loads(req_params)
admin_id = delete_fields.get('admin_id')
admin_instance = get_object_or_404(PubOrgAdmin, pk=admin_id)
admin_user_instance = get_object_or_404(User, pk=admin_instance.user.pk)
admin_instance.delete()
admin_user_instance.delete()
json_delete_response = {
'deleted_id': admin_id,
}
return JsonResponse(json_delete_response)
json_err_response = {'status': 405, 'descr': 'method not allowed'}
return JsonResponse(json_err_response)
@method_decorator(csrf_exempt, name='dispatch')
def apimanageregistrant(req):
try:
current_user_instance = req.user
current_registrant_instance = get_object_or_404(PubOrgRegistrant, user=req.user.id)
except Exception as e:
json_err_response = {'status': 404, 'descr': 'Some exception: {0}'.format(e)}
return JsonResponse(json_err_response)
if req.method == 'GET':
json_get_response = {
'user_inst': current_user_instance,
'registrant_inst': current_registrant_instance
}
return JsonResponse(json_get_response, safe=False, encoder=ManagersModelsJSONEncoder)
elif req.method == 'POST':
req_params = req.body.decode("utf-8")
post_fields = json.loads(req_params)
username = post_fields.get('username')
password = post_fields.get('password')
hired_by = post_fields.get('hired_by')
hired_order_code = post_fields.get('hired_order_code')
doc_code = post_fields.get('doc_code')
credentials = post_fields.get('credentials')
# Create and save User instance.
new_user_inst = User(username=username, password=password)
new_user_inst.save()
# Create and save PubOrgRegistrant instance.
new_puborgregistrant_inst = PubOrgRegistrant(
user=new_user_inst.pk,
hired_by=hired_by,
hired_order_code=hired_order_code,
doc_code=doc_code,
credentials=credentials
)
new_puborgregistrant_inst.save()
# Send resulting json response.
json_post_response = {
'new_user_inst': new_user_inst,
'new_registrant_inst': new_puborgregistrant_inst,
}
return JsonResponse(json_post_response, safe=False, encoder=ManagersModelsJSONEncoder)
elif req.method == 'PUT':
req_params = req.body.decode("utf-8")
put_fields = json.loads(req_params)
registrant_id = put_fields.get('registrant_id')
hired_by = put_fields.get('hired_by')
hired_order_code = put_fields.get('hired_order_code')
doc_code = put_fields.get('doc_code')
credentials = put_fields.get('credentials')
# Update and save PubOrgRegistrant instance.
registrant_to_update = PubOrgRegistrant.objects.get(pk=registrant_id)
registrant_to_update.hired_by = hired_by
registrant_to_update.hired_order_code = hired_order_code
registrant_to_update.doc_code = doc_code
registrant_to_update.credentials = credentials
registrant_to_update.save()
# Send resulting json response.
json_put_response = {
'upd_registrant_inst': registrant_to_update
}
return JsonResponse(json_put_response, safe=False, encoder=ManagersModelsJSONEncoder)
elif req.method == 'DELETE':
req_params = req.body.decode("utf-8")
delete_fields = json.loads(req_params)
registrant_id = delete_fields.get('registrant_id')
registrant_instance = get_object_or_404(PubOrgRegistrant, pk=registrant_id)
registrant_user_instance = get_object_or_404(User, pk=registrant_instance.user.pk)
registrant_instance.delete()
registrant_user_instance.delete()
json_delete_response = {
'deleted_id': registrant_id,
}
return JsonResponse(json_delete_response)
json_err_response = {'status': 405, 'descr': 'method not allowed'}
return JsonResponse(json_err_response)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
4390,
13,
13,
3166,
9557,
29889,
21570,
29889,
5150,
1053,
15585,
403,
29892,
6464,
29892,
1480,
449,
13,
3166,
9557,
29889,
21570,
29889,
5150,
29889,
9794,
1053,
4911,
13,
3166,
9557,
29889,
1124,
1053,
14355,
5103,
13,
3166,
9557,
29889,
12759,
7582,
29879,
1053,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
13,
3166,
9557,
29889,
13239,
29889,
19557,
4097,
1053,
1158,
29918,
19557,
1061,
13,
3166,
9557,
29889,
7406,
29889,
19557,
4097,
29889,
2395,
9600,
1053,
5939,
9600,
29918,
735,
3456,
13,
13,
3166,
869,
9794,
1053,
2315,
18150,
23785,
7249,
8566,
6119,
13,
3166,
869,
9794,
1053,
8042,
2816,
29887,
12754,
29892,
8042,
2816,
29887,
4597,
2132,
424,
13,
13,
13,
29992,
5696,
29918,
19557,
1061,
29898,
2395,
9600,
29918,
735,
3456,
29892,
1024,
2433,
13369,
1495,
13,
1753,
3095,
26140,
262,
29898,
7971,
1125,
13,
1678,
565,
12428,
29889,
5696,
1275,
525,
5438,
2396,
13,
4706,
12428,
29918,
7529,
353,
12428,
29889,
2587,
29889,
13808,
703,
9420,
29899,
29947,
1159,
13,
4706,
6464,
29918,
9621,
353,
4390,
29889,
18132,
29898,
7971,
29918,
7529,
29897,
13,
4706,
8952,
353,
6464,
29918,
9621,
29889,
657,
877,
6786,
1495,
13,
4706,
4800,
353,
6464,
29918,
9621,
29889,
657,
877,
5630,
1495,
13,
4706,
4817,
29918,
1792,
353,
15585,
403,
29898,
6786,
29922,
6786,
29892,
4800,
29922,
5630,
29897,
13,
4706,
565,
4817,
29918,
1792,
338,
451,
6213,
29901,
13,
9651,
6464,
29898,
7971,
29892,
4817,
29918,
1792,
29897,
13,
9651,
4390,
29918,
1066,
3321,
29918,
5327,
353,
11117,
4882,
2396,
5852,
29913,
13,
9651,
736,
14355,
5103,
29898,
3126,
29918,
1066,
3321,
29918,
5327,
29897,
13,
4706,
4390,
29918,
22198,
29918,
5327,
353,
11117,
4882,
2396,
7700,
29913,
13,
4706,
736,
14355,
5103,
29898,
3126,
29918,
22198,
29918,
5327,
29897,
13,
1678,
4390,
29918,
3127,
29918,
5327,
353,
11117,
4882,
2396,
29871,
29946,
29900,
29945,
29892,
525,
2783,
7283,
2396,
525,
5696,
451,
6068,
10827,
13,
1678,
736,
14355,
5103,
29898,
3126,
29918,
3127,
29918,
5327,
29897,
13,
13,
13,
29992,
5696,
29918,
19557,
1061,
29898,
2395,
9600,
29918,
735,
3456,
29892,
1024,
2433,
13369,
1495,
13,
1753,
3095,
26140,
449,
29898,
7971,
1125,
13,
1678,
565,
12428,
29889,
5696,
1275,
525,
5438,
2396,
13,
4706,
565,
12428,
29889,
1792,
29889,
275,
29918,
27218,
630,
29901,
13,
9651,
7160,
29918,
1792,
353,
12428,
29889,
1792,
13,
4706,
1683,
29901,
13,
9651,
7160,
29918,
1792,
353,
6213,
13,
4706,
1480,
449,
29898,
7971,
29897,
13,
4706,
4390,
29918,
1188,
449,
29918,
3859,
29918,
5327,
353,
426,
13,
9651,
525,
1188,
3192,
29918,
449,
29918,
1792,
2396,
7160,
29918,
1792,
29892,
13,
9651,
525,
1188,
3192,
29918,
449,
2396,
451,
12428,
29889,
1792,
29889,
275,
29918,
27218,
630,
13,
4706,
500,
13,
4706,
736,
14355,
5103,
29898,
3126,
29918,
1188,
449,
29918,
3859,
29918,
5327,
29892,
9109,
29922,
8824,
29892,
2094,
6119,
29922,
2517,
18150,
23785,
7249,
8566,
6119,
29897,
13,
1678,
4390,
29918,
3127,
29918,
5327,
353,
11117,
4882,
2396,
29871,
29946,
29900,
29945,
29892,
525,
2783,
7283,
2396,
525,
5696,
451,
6068,
10827,
13,
1678,
736,
14355,
5103,
29898,
3126,
29918,
3127,
29918,
5327,
29897,
13,
13,
13,
29992,
5696,
29918,
19557,
1061,
29898,
2395,
9600,
29918,
735,
3456,
29892,
1024,
2433,
13369,
1495,
13,
1753,
3095,
25895,
482,
6406,
29898,
7971,
1125,
13,
1678,
1018,
29901,
13,
4706,
1857,
29918,
1792,
29918,
8758,
353,
12428,
29889,
1792,
13,
4706,
1857,
29918,
6406,
29918,
8758,
353,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
29898,
21076,
2816,
29887,
12754,
29892,
1404,
29922,
7971,
29889,
1792,
29889,
333,
29897,
13,
1678,
5174,
8960,
408,
321,
29901,
13,
4706,
4390,
29918,
3127,
29918,
5327,
353,
11117,
4882,
2396,
29871,
29946,
29900,
29946,
29892,
525,
2783,
7283,
2396,
525,
9526,
3682,
29901,
426,
29900,
29913,
4286,
4830,
29898,
29872,
2915,
13,
4706,
736,
14355,
5103,
29898,
3126,
29918,
3127,
29918,
5327,
29897,
13,
13,
1678,
565,
12428,
29889,
5696,
1275,
525,
7194,
2396,
13,
4706,
4390,
29918,
657,
29918,
5327,
353,
426,
13,
9651,
525,
1792,
29918,
2611,
2396,
1857,
29918,
1792,
29918,
8758,
29892,
13,
9651,
525,
6406,
29918,
2611,
2396,
1857,
29918,
6406,
29918,
8758,
13,
4706,
500,
13,
4706,
736,
14355,
5103,
29898,
3126,
29918,
657,
29918,
5327,
29892,
9109,
29922,
8824,
29892,
2094,
6119,
29922,
2517,
18150,
23785,
7249,
8566,
6119,
29897,
13,
1678,
25342,
12428,
29889,
5696,
1275,
525,
5438,
2396,
13,
4706,
12428,
29918,
7529,
353,
12428,
29889,
2587,
29889,
13808,
703,
9420,
29899,
29947,
1159,
13,
4706,
1400,
29918,
9621,
353,
4390,
29889,
18132,
29898,
7971,
29918,
7529,
29897,
13,
4706,
8952,
353,
1400,
29918,
9621,
29889,
657,
877,
6786,
1495,
13,
4706,
4800,
353,
1400,
29918,
9621,
29889,
657,
877,
5630,
1495,
13,
4706,
1574,
29918,
401,
353,
1400,
29918,
9621,
29889,
657,
877,
1514,
29918,
401,
1495,
13,
4706,
16140,
353,
1400,
29918,
9621,
29889,
657,
877,
11944,
9409,
1495,
13,
4706,
396,
6204,
322,
4078,
4911,
2777,
29889,
13,
4706,
716,
29918,
1792,
29918,
2611,
353,
4911,
29898,
6786,
29922,
6786,
29892,
4800,
29922,
5630,
29897,
13,
4706,
716,
29918,
1792,
29918,
2611,
29889,
7620,
580,
13,
4706,
396,
6204,
322,
4078,
8042,
2816,
29887,
12754,
2777,
29889,
13,
4706,
716,
29918,
5467,
990,
6406,
29918,
2611,
353,
8042,
2816,
29887,
12754,
29898,
13,
9651,
1404,
29922,
1482,
29918,
1792,
29918,
2611,
29889,
20571,
29892,
13,
9651,
1574,
29918,
401,
29922,
1514,
29918,
401,
29892,
13,
9651,
16140,
29922,
11944,
9409,
13,
4706,
1723,
13,
4706,
716,
29918,
5467,
990,
6406,
29918,
2611,
29889,
7620,
580,
13,
4706,
396,
15076,
9819,
4390,
2933,
29889,
13,
4706,
4390,
29918,
2490,
29918,
5327,
353,
426,
13,
9651,
525,
1482,
29918,
1792,
29918,
2611,
2396,
716,
29918,
1792,
29918,
2611,
29892,
13,
9651,
525,
1482,
29918,
6406,
29918,
2611,
2396,
716,
29918,
5467,
990,
6406,
29918,
2611,
29892,
13,
4706,
500,
13,
4706,
736,
14355,
5103,
29898,
3126,
29918,
2490,
29918,
5327,
29892,
9109,
29922,
8824,
29892,
2094,
6119,
29922,
2517,
18150,
23785,
7249,
8566,
6119,
29897,
13,
1678,
25342,
12428,
29889,
5696,
1275,
525,
12336,
2396,
13,
4706,
12428,
29918,
7529,
353,
12428,
29889,
2587,
29889,
13808,
703,
9420,
29899,
29947,
1159,
13,
4706,
1925,
29918,
9621,
353,
4390,
29889,
18132,
29898,
7971,
29918,
7529,
29897,
13,
4706,
4113,
29918,
333,
353,
1925,
29918,
9621,
29889,
657,
877,
6406,
29918,
333,
1495,
13,
4706,
1574,
29918,
401,
353,
1925,
29918,
9621,
29889,
657,
877,
1514,
29918,
401,
1495,
13,
4706,
16140,
353,
1925,
29918,
9621,
29889,
657,
877,
11944,
9409,
1495,
13,
4706,
396,
10318,
322,
4078,
8042,
2816,
29887,
12754,
2777,
29889,
13,
4706,
4113,
29918,
517,
29918,
5504,
353,
8042,
2816,
29887,
12754,
29889,
12650,
29889,
657,
29898,
20571,
29922,
6406,
29918,
333,
29897,
13,
4706,
4113,
29918,
517,
29918,
5504,
29889,
1514,
29918,
401,
353,
1574,
29918,
401,
13,
4706,
4113,
29918,
517,
29918,
5504,
29889,
11944,
9409,
353,
16140,
13,
4706,
4113,
29918,
517,
29918,
5504,
29889,
7620,
580,
13,
4706,
396,
15076,
9819,
4390,
2933,
29889,
13,
4706,
4390,
29918,
649,
29918,
5327,
353,
426,
13,
9651,
525,
786,
29881,
29918,
6406,
29918,
2611,
2396,
4113,
29918,
517,
29918,
5504,
13,
4706,
500,
13,
4706,
736,
14355,
5103,
29898,
3126,
29918,
649,
29918,
5327,
29892,
9109,
29922,
8824,
29892,
2094,
6119,
29922,
2517,
18150,
23785,
7249,
8566,
6119,
29897,
13,
1678,
25342,
12428,
29889,
5696,
1275,
525,
2287,
18476,
2396,
13,
4706,
12428,
29918,
7529,
353,
12428,
29889,
2587,
29889,
13808,
703,
9420,
29899,
29947,
1159,
13,
4706,
5217,
29918,
9621,
353,
4390,
29889,
18132,
29898,
7971,
29918,
7529,
29897,
13,
4706,
4113,
29918,
333,
353,
5217,
29918,
9621,
29889,
657,
877,
6406,
29918,
333,
1495,
13,
4706,
4113,
29918,
8758,
353,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
29898,
21076,
2816,
29887,
12754,
29892,
282,
29895,
29922,
6406,
29918,
333,
29897,
13,
4706,
4113,
29918,
1792,
29918,
8758,
353,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
29898,
2659,
29892,
282,
29895,
29922,
6406,
29918,
8758,
29889,
1792,
29889,
20571,
29897,
13,
4706,
4113,
29918,
8758,
29889,
8143,
580,
13,
4706,
4113,
29918,
1792,
29918,
8758,
29889,
8143,
580,
13,
4706,
4390,
29918,
8143,
29918,
5327,
353,
426,
13,
9651,
525,
311,
22742,
29918,
333,
2396,
4113,
29918,
333,
29892,
13,
4706,
500,
13,
4706,
736,
14355,
5103,
29898,
3126,
29918,
8143,
29918,
5327,
29897,
13,
1678,
4390,
29918,
3127,
29918,
5327,
353,
11117,
4882,
2396,
29871,
29946,
29900,
29945,
29892,
525,
2783,
7283,
2396,
525,
5696,
451,
6068,
10827,
13,
1678,
736,
14355,
5103,
29898,
3126,
29918,
3127,
29918,
5327,
29897,
13,
13,
13,
29992,
5696,
29918,
19557,
1061,
29898,
2395,
9600,
29918,
735,
3456,
29892,
1024,
2433,
13369,
1495,
13,
1753,
3095,
25895,
1875,
387,
2132,
424,
29898,
7971,
1125,
13,
1678,
1018,
29901,
13,
4706,
1857,
29918,
1792,
29918,
8758,
353,
12428,
29889,
1792,
13,
4706,
1857,
29918,
29238,
424,
29918,
8758,
353,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
29898,
21076,
2816,
29887,
4597,
2132,
424,
29892,
1404,
29922,
7971,
29889,
1792,
29889,
333,
29897,
13,
1678,
5174,
8960,
408,
321,
29901,
13,
4706,
4390,
29918,
3127,
29918,
5327,
353,
11117,
4882,
2396,
29871,
29946,
29900,
29946,
29892,
525,
2783,
7283,
2396,
525,
9526,
3682,
29901,
426,
29900,
29913,
4286,
4830,
29898,
29872,
2915,
13,
4706,
736,
14355,
5103,
29898,
3126,
29918,
3127,
29918,
5327,
29897,
13,
13,
1678,
565,
12428,
29889,
5696,
1275,
525,
7194,
2396,
13,
4706,
4390,
29918,
657,
29918,
5327,
353,
426,
13,
9651,
525,
1792,
29918,
2611,
2396,
1857,
29918,
1792,
29918,
8758,
29892,
13,
9651,
525,
29238,
424,
29918,
2611,
2396,
1857,
29918,
29238,
424,
29918,
8758,
13,
4706,
500,
13,
4706,
736,
14355,
5103,
29898,
3126,
29918,
657,
29918,
5327,
29892,
9109,
29922,
8824,
29892,
2094,
6119,
29922,
2517,
18150,
23785,
7249,
8566,
6119,
29897,
13,
1678,
25342,
12428,
29889,
5696,
1275,
525,
5438,
2396,
13,
4706,
12428,
29918,
7529,
353,
12428,
29889,
2587,
29889,
13808,
703,
9420,
29899,
29947,
1159,
13,
4706,
1400,
29918,
9621,
353,
4390,
29889,
18132,
29898,
7971,
29918,
7529,
29897,
13,
4706,
8952,
353,
1400,
29918,
9621,
29889,
657,
877,
6786,
1495,
13,
4706,
4800,
353,
1400,
29918,
9621,
29889,
657,
877,
5630,
1495,
13,
4706,
298,
2859,
29918,
1609,
353,
1400,
29918,
9621,
29889,
657,
877,
29882,
2859,
29918,
1609,
1495,
13,
4706,
298,
2859,
29918,
2098,
29918,
401,
353,
1400,
29918,
9621,
29889,
657,
877,
29882,
2859,
29918,
2098,
29918,
401,
1495,
13,
4706,
1574,
29918,
401,
353,
1400,
29918,
9621,
29889,
657,
877,
1514,
29918,
401,
1495,
13,
4706,
16140,
353,
1400,
29918,
9621,
29889,
657,
877,
11944,
9409,
1495,
13,
4706,
396,
6204,
322,
4078,
4911,
2777,
29889,
13,
4706,
716,
29918,
1792,
29918,
2611,
353,
4911,
29898,
6786,
29922,
6786,
29892,
4800,
29922,
5630,
29897,
13,
4706,
716,
29918,
1792,
29918,
2611,
29889,
7620,
580,
13,
4706,
396,
6204,
322,
4078,
8042,
2816,
29887,
4597,
2132,
424,
2777,
29889,
13,
4706,
716,
29918,
5467,
990,
29238,
424,
29918,
2611,
353,
8042,
2816,
29887,
4597,
2132,
424,
29898,
13,
9651,
1404,
29922,
1482,
29918,
1792,
29918,
2611,
29889,
20571,
29892,
13,
9651,
298,
2859,
29918,
1609,
29922,
29882,
2859,
29918,
1609,
29892,
13,
9651,
298,
2859,
29918,
2098,
29918,
401,
29922,
29882,
2859,
29918,
2098,
29918,
401,
29892,
13,
9651,
1574,
29918,
401,
29922,
1514,
29918,
401,
29892,
13,
9651,
16140,
29922,
11944,
9409,
13,
4706,
1723,
13,
4706,
716,
29918,
5467,
990,
29238,
424,
29918,
2611,
29889,
7620,
580,
13,
4706,
396,
15076,
9819,
4390,
2933,
29889,
13,
4706,
4390,
29918,
2490,
29918,
5327,
353,
426,
13,
9651,
525,
1482,
29918,
1792,
29918,
2611,
2396,
716,
29918,
1792,
29918,
2611,
29892,
13,
9651,
525,
1482,
29918,
29238,
424,
29918,
2611,
2396,
716,
29918,
5467,
990,
29238,
424,
29918,
2611,
29892,
13,
4706,
500,
13,
4706,
736,
14355,
5103,
29898,
3126,
29918,
2490,
29918,
5327,
29892,
9109,
29922,
8824,
29892,
2094,
6119,
29922,
2517,
18150,
23785,
7249,
8566,
6119,
29897,
13,
1678,
25342,
12428,
29889,
5696,
1275,
525,
12336,
2396,
13,
4706,
12428,
29918,
7529,
353,
12428,
29889,
2587,
29889,
13808,
703,
9420,
29899,
29947,
1159,
13,
4706,
1925,
29918,
9621,
353,
4390,
29889,
18132,
29898,
7971,
29918,
7529,
29897,
13,
4706,
21557,
424,
29918,
333,
353,
1925,
29918,
9621,
29889,
657,
877,
29238,
424,
29918,
333,
1495,
13,
4706,
298,
2859,
29918,
1609,
353,
1925,
29918,
9621,
29889,
657,
877,
29882,
2859,
29918,
1609,
1495,
13,
4706,
298,
2859,
29918,
2098,
29918,
401,
353,
1925,
29918,
9621,
29889,
657,
877,
29882,
2859,
29918,
2098,
29918,
401,
1495,
13,
4706,
1574,
29918,
401,
353,
1925,
29918,
9621,
29889,
657,
877,
1514,
29918,
401,
1495,
13,
4706,
16140,
353,
1925,
29918,
9621,
29889,
657,
877,
11944,
9409,
1495,
13,
4706,
396,
10318,
322,
4078,
8042,
2816,
29887,
4597,
2132,
424,
2777,
29889,
13,
4706,
21557,
424,
29918,
517,
29918,
5504,
353,
8042,
2816,
29887,
4597,
2132,
424,
29889,
12650,
29889,
657,
29898,
20571,
29922,
29238,
424,
29918,
333,
29897,
13,
4706,
21557,
424,
29918,
517,
29918,
5504,
29889,
29882,
2859,
29918,
1609,
353,
298,
2859,
29918,
1609,
13,
4706,
21557,
424,
29918,
517,
29918,
5504,
29889,
29882,
2859,
29918,
2098,
29918,
401,
353,
298,
2859,
29918,
2098,
29918,
401,
13,
4706,
21557,
424,
29918,
517,
29918,
5504,
29889,
1514,
29918,
401,
353,
1574,
29918,
401,
13,
4706,
21557,
424,
29918,
517,
29918,
5504,
29889,
11944,
9409,
353,
16140,
13,
4706,
21557,
424,
29918,
517,
29918,
5504,
29889,
7620,
580,
13,
4706,
396,
15076,
9819,
4390,
2933,
29889,
13,
4706,
4390,
29918,
649,
29918,
5327,
353,
426,
13,
9651,
525,
786,
29881,
29918,
29238,
424,
29918,
2611,
2396,
21557,
424,
29918,
517,
29918,
5504,
13,
4706,
500,
13,
4706,
736,
14355,
5103,
29898,
3126,
29918,
649,
29918,
5327,
29892,
9109,
29922,
8824,
29892,
2094,
6119,
29922,
2517,
18150,
23785,
7249,
8566,
6119,
29897,
13,
1678,
25342,
12428,
29889,
5696,
1275,
525,
2287,
18476,
2396,
13,
4706,
12428,
29918,
7529,
353,
12428,
29889,
2587,
29889,
13808,
703,
9420,
29899,
29947,
1159,
13,
4706,
5217,
29918,
9621,
353,
4390,
29889,
18132,
29898,
7971,
29918,
7529,
29897,
13,
4706,
21557,
424,
29918,
333,
353,
5217,
29918,
9621,
29889,
657,
877,
29238,
424,
29918,
333,
1495,
13,
4706,
21557,
424,
29918,
8758,
353,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
29898,
21076,
2816,
29887,
4597,
2132,
424,
29892,
282,
29895,
29922,
29238,
424,
29918,
333,
29897,
13,
4706,
21557,
424,
29918,
1792,
29918,
8758,
353,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
29898,
2659,
29892,
282,
29895,
29922,
29238,
424,
29918,
8758,
29889,
1792,
29889,
20571,
29897,
13,
4706,
21557,
424,
29918,
8758,
29889,
8143,
580,
13,
4706,
21557,
424,
29918,
1792,
29918,
8758,
29889,
8143,
580,
13,
4706,
4390,
29918,
8143,
29918,
5327,
353,
426,
13,
9651,
525,
311,
22742,
29918,
333,
2396,
21557,
424,
29918,
333,
29892,
13,
4706,
500,
13,
4706,
736,
14355,
5103,
29898,
3126,
29918,
8143,
29918,
5327,
29897,
13,
1678,
4390,
29918,
3127,
29918,
5327,
353,
11117,
4882,
2396,
29871,
29946,
29900,
29945,
29892,
525,
2783,
7283,
2396,
525,
5696,
451,
6068,
10827,
13,
1678,
736,
14355,
5103,
29898,
3126,
29918,
3127,
29918,
5327,
29897,
13,
2
] |
utils/cloudmusic_dao.py | awesome-archive/MusicTaster | 45 | 75255 | # coding=utf-8
"""
负责进行云音乐的数据库相关操作
Created by jayvee on 16/12/24.
"""
from utils.db_utils import get_db_inst
from utils.logger_utils import data_process_logger
class CloudMusicDAO:
def __init__(self, db_name, collection_name):
self.db_name = db_name
self.collection_name = collection_name
self.db_inst = get_db_inst(self.db_name, self.collection_name)
def save_unique_item(self, data_obj, primary_key='userId', is_overwrite=False, is_inform=False):
"""
存储数据对象,并避免重复存储
Args:
data_obj:
primary_key:
is_overwrite:
Returns:
"""
find_result = self.db_inst.find_one({primary_key: data_obj[primary_key]}, {primary_key: 1})
# is_exist = user_dbinst.find({'userId': userinfo['userId']}).count() != 0
# print find_result.count()
if not find_result:
self.db_inst.insert(data_obj)
elif is_overwrite:
self.db_inst.update({primary_key: data_obj[primary_key]}, data_obj)
if is_inform:
data_process_logger.warn(
'overwrite item %s in %s' % (data_obj[primary_key], self.collection_name))
else:
if is_inform:
data_process_logger.warn(
'Item %s exist! in %s' % (data_obj[primary_key], self.collection_name))
| [
1,
396,
14137,
29922,
9420,
29899,
29947,
13,
13,
15945,
29908,
13,
235,
183,
162,
235,
183,
166,
31174,
30448,
31784,
30941,
31616,
30210,
30354,
30763,
31700,
30990,
31057,
31904,
30732,
13,
13,
20399,
491,
432,
388,
27202,
373,
29871,
29896,
29953,
29914,
29896,
29906,
29914,
29906,
29946,
29889,
13,
15945,
29908,
13,
3166,
3667,
29879,
29889,
2585,
29918,
13239,
1053,
679,
29918,
2585,
29918,
2611,
13,
3166,
3667,
29879,
29889,
21707,
29918,
13239,
1053,
848,
29918,
5014,
29918,
21707,
13,
13,
13,
1990,
14293,
21238,
7698,
29949,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4833,
29918,
978,
29892,
4333,
29918,
978,
1125,
13,
4706,
1583,
29889,
2585,
29918,
978,
353,
4833,
29918,
978,
13,
4706,
1583,
29889,
10855,
29918,
978,
353,
4333,
29918,
978,
13,
4706,
1583,
29889,
2585,
29918,
2611,
353,
679,
29918,
2585,
29918,
2611,
29898,
1311,
29889,
2585,
29918,
978,
29892,
1583,
29889,
10855,
29918,
978,
29897,
13,
13,
1678,
822,
4078,
29918,
13092,
29918,
667,
29898,
1311,
29892,
848,
29918,
5415,
29892,
7601,
29918,
1989,
2433,
29721,
742,
338,
29918,
957,
3539,
29922,
8824,
29892,
338,
29918,
262,
689,
29922,
8824,
1125,
13,
4706,
9995,
13,
308,
30946,
232,
133,
171,
30354,
30763,
30783,
31133,
29892,
31666,
236,
132,
194,
232,
136,
144,
30908,
31810,
30946,
232,
133,
171,
13,
4706,
826,
3174,
29901,
13,
9651,
848,
29918,
5415,
29901,
13,
9651,
7601,
29918,
1989,
29901,
13,
9651,
338,
29918,
957,
3539,
29901,
13,
13,
4706,
16969,
29901,
13,
13,
4706,
9995,
13,
4706,
1284,
29918,
2914,
353,
1583,
29889,
2585,
29918,
2611,
29889,
2886,
29918,
650,
3319,
16072,
29918,
1989,
29901,
848,
29918,
5415,
29961,
16072,
29918,
1989,
29962,
1118,
426,
16072,
29918,
1989,
29901,
29871,
29896,
1800,
13,
4706,
396,
338,
29918,
28997,
353,
1404,
29918,
29881,
2109,
303,
29889,
2886,
3319,
29915,
29721,
2396,
1404,
3888,
1839,
29721,
2033,
7690,
2798,
580,
2804,
29871,
29900,
13,
4706,
396,
1596,
1284,
29918,
2914,
29889,
2798,
580,
13,
13,
4706,
565,
451,
1284,
29918,
2914,
29901,
13,
9651,
1583,
29889,
2585,
29918,
2611,
29889,
7851,
29898,
1272,
29918,
5415,
29897,
13,
4706,
25342,
338,
29918,
957,
3539,
29901,
13,
9651,
1583,
29889,
2585,
29918,
2611,
29889,
5504,
3319,
16072,
29918,
1989,
29901,
848,
29918,
5415,
29961,
16072,
29918,
1989,
29962,
1118,
848,
29918,
5415,
29897,
13,
9651,
565,
338,
29918,
262,
689,
29901,
13,
18884,
848,
29918,
5014,
29918,
21707,
29889,
25442,
29898,
13,
462,
1678,
525,
957,
3539,
2944,
1273,
29879,
297,
1273,
29879,
29915,
1273,
313,
1272,
29918,
5415,
29961,
16072,
29918,
1989,
1402,
1583,
29889,
10855,
29918,
978,
876,
13,
4706,
1683,
29901,
13,
9651,
565,
338,
29918,
262,
689,
29901,
13,
18884,
848,
29918,
5014,
29918,
21707,
29889,
25442,
29898,
13,
462,
1678,
525,
2001,
1273,
29879,
1863,
29991,
297,
1273,
29879,
29915,
1273,
313,
1272,
29918,
5415,
29961,
16072,
29918,
1989,
1402,
1583,
29889,
10855,
29918,
978,
876,
13,
2
] |
button/take_screen.py | PitPietro/gpiozero-pyqt5 | 0 | 15382 | import os
# from signal import pause
from gpiozero import Button
from datetime import datetime
def take_screen():
screen_btn = Button(2)
while True:
if screen_btn.is_pressed:
timestamp = datetime.now()
cmd = "scrot -u d 5 $n {}.png".format('screen_' + str(timestamp))
os.system(cmd)
#screen_btn.when_pressed=os.system(cmd)
#pause()
take_screen()
| [
1,
1053,
2897,
13,
29937,
515,
7182,
1053,
19957,
13,
3166,
330,
16168,
9171,
1053,
11025,
13,
3166,
12865,
1053,
12865,
13,
13,
1753,
2125,
29918,
10525,
7295,
13,
1678,
4315,
29918,
7290,
353,
11025,
29898,
29906,
29897,
13,
268,
13,
1678,
1550,
5852,
29901,
13,
4706,
565,
4315,
29918,
7290,
29889,
275,
29918,
13120,
29901,
13,
9651,
14334,
353,
12865,
29889,
3707,
580,
13,
9651,
9920,
353,
376,
1557,
5450,
448,
29884,
270,
29871,
29945,
395,
29876,
426,
1836,
2732,
1642,
4830,
877,
10525,
29918,
29915,
718,
851,
29898,
16394,
876,
13,
9651,
2897,
29889,
5205,
29898,
9006,
29897,
13,
268,
13,
1678,
396,
10525,
29918,
7290,
29889,
8256,
29918,
13120,
29922,
359,
29889,
5205,
29898,
9006,
29897,
13,
1678,
396,
29886,
1071,
580,
13,
268,
13,
13,
19730,
29918,
10525,
580,
268,
13,
268,
2
] |
labscript_devices/chipfpgaui.py | specialforcea/labscript_suite | 0 | 176715 | <reponame>specialforcea/labscript_suite
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'chipfpga.ui'
#
# Created by: PyQt4 UI code generator 4.11.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName(_fromUtf8("Form"))
Form.resize(663, 635)
Form.setMaximumSize(QtCore.QSize(15777191, 16777215))
self.gridLayout = QtGui.QGridLayout(Form)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.scrollArea = QtGui.QScrollArea(Form)
self.scrollArea.setWidgetResizable(True)
self.scrollArea.setObjectName(_fromUtf8("scrollArea"))
self.scrollAreaWidgetContents_2 = QtGui.QWidget()
self.scrollAreaWidgetContents_2.setGeometry(QtCore.QRect(0, 0, 643, 310))
self.scrollAreaWidgetContents_2.setObjectName(_fromUtf8("scrollAreaWidgetContents_2"))
self.gridLayout_6 = QtGui.QGridLayout(self.scrollAreaWidgetContents_2)
self.gridLayout_6.setObjectName(_fromUtf8("gridLayout_6"))
self.tab = QtGui.QTabWidget(self.scrollAreaWidgetContents_2)
self.tab.setObjectName(_fromUtf8("tab"))
self.load_tab = QtGui.QWidget()
self.load_tab.setObjectName(_fromUtf8("load_tab"))
self.gridLayout_3 = QtGui.QGridLayout(self.load_tab)
self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
self.load_table = QtGui.QTableWidget(self.load_tab)
self.load_table.setObjectName(_fromUtf8("load_table"))
self.load_table.setColumnCount(0)
self.load_table.setRowCount(0)
self.gridLayout_3.addWidget(self.load_table, 0, 0, 1, 1)
self.tab.addTab(self.load_tab, _fromUtf8(""))
self.read_table_tab = QtGui.QWidget()
self.read_table_tab.setObjectName(_fromUtf8("read_table_tab"))
self.gridLayout_2 = QtGui.QGridLayout(self.read_table_tab)
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
self.read_table = QtGui.QTableWidget(self.read_table_tab)
self.read_table.setObjectName(_fromUtf8("read_table"))
self.read_table.setColumnCount(0)
self.read_table.setRowCount(0)
self.gridLayout_2.addWidget(self.read_table, 0, 0, 1, 1)
self.tab.addTab(self.read_table_tab, _fromUtf8(""))
self.read_graph_tab = QtGui.QWidget()
self.read_graph_tab.setObjectName(_fromUtf8("read_graph_tab"))
self.verticalLayout = QtGui.QVBoxLayout(self.read_graph_tab)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.read_graph = QtGui.QGraphicsView(self.read_graph_tab)
self.read_graph.setObjectName(_fromUtf8("read_graph"))
self.verticalLayout.addWidget(self.read_graph)
self.tab.addTab(self.read_graph_tab, _fromUtf8(""))
self.gridLayout_6.addWidget(self.tab, 0, 0, 1, 1)
self.scrollArea.setWidget(self.scrollAreaWidgetContents_2)
self.gridLayout.addWidget(self.scrollArea, 0, 1, 1, 1)
self.scrollArea_2 = QtGui.QScrollArea(Form)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.scrollArea_2.sizePolicy().hasHeightForWidth())
self.scrollArea_2.setSizePolicy(sizePolicy)
self.scrollArea_2.setWidgetResizable(True)
self.scrollArea_2.setObjectName(_fromUtf8("scrollArea_2"))
self.scrollAreaWidgetContents = QtGui.QWidget()
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 643, 297))
self.scrollAreaWidgetContents.setObjectName(_fromUtf8("scrollAreaWidgetContents"))
self.gridLayout_7 = QtGui.QGridLayout(self.scrollAreaWidgetContents)
self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7"))
self.file_dir_Edit = QtGui.QLineEdit(self.scrollAreaWidgetContents)
self.file_dir_Edit.setObjectName(_fromUtf8("file_dir_Edit"))
self.gridLayout_7.addWidget(self.file_dir_Edit, 1, 1, 1, 1)
self.read_status_edit = QtGui.QLineEdit(self.scrollAreaWidgetContents)
self.read_status_edit.setObjectName(_fromUtf8("read_status_edit"))
self.gridLayout_7.addWidget(self.read_status_edit, 3, 1, 1, 1)
self.byte_to_read_edit = QtGui.QLineEdit(self.scrollAreaWidgetContents)
self.byte_to_read_edit.setObjectName(_fromUtf8("byte_to_read_edit"))
self.gridLayout_7.addWidget(self.byte_to_read_edit, 5, 1, 1, 1)
self.Load_Button = QtGui.QPushButton(self.scrollAreaWidgetContents)
self.Load_Button.setObjectName(_fromUtf8("Load_Button"))
self.gridLayout_7.addWidget(self.Load_Button, 1, 0, 1, 1)
self.Write_Button = QtGui.QPushButton(self.scrollAreaWidgetContents)
self.Write_Button.setObjectName(_fromUtf8("Write_Button"))
self.gridLayout_7.addWidget(self.Write_Button, 3, 0, 1, 1)
self.write_status_edit = QtGui.QLineEdit(self.scrollAreaWidgetContents)
self.write_status_edit.setObjectName(_fromUtf8("write_status_edit"))
self.gridLayout_7.addWidget(self.write_status_edit, 5, 2, 1, 1)
self.Read_button = QtGui.QPushButton(self.scrollAreaWidgetContents)
self.Read_button.setObjectName(_fromUtf8("Read_button"))
self.gridLayout_7.addWidget(self.Read_button, 5, 0, 1, 1)
self.correct_button = QtGui.QPushButton(self.scrollAreaWidgetContents)
self.correct_button.setObjectName(_fromUtf8("correct_button"))
self.gridLayout_7.addWidget(self.correct_button, 7, 0, 1, 1)
self.correct_byte_edit = QtGui.QLineEdit(self.scrollAreaWidgetContents)
self.correct_byte_edit.setObjectName(_fromUtf8("correct_byte_edit"))
self.gridLayout_7.addWidget(self.correct_byte_edit, 7, 1, 1, 1)
self.write_status = QtGui.QLabel(self.scrollAreaWidgetContents)
self.write_status.setObjectName(_fromUtf8("write_status"))
self.gridLayout_7.addWidget(self.write_status, 2, 1, 1, 1, QtCore.Qt.AlignBottom)
self.read_status = QtGui.QLabel(self.scrollAreaWidgetContents)
self.read_status.setObjectName(_fromUtf8("read_status"))
self.gridLayout_7.addWidget(self.read_status, 4, 2, 1, 1, QtCore.Qt.AlignBottom)
self.table_dir = QtGui.QLabel(self.scrollAreaWidgetContents)
self.table_dir.setMaximumSize(QtCore.QSize(308, 48))
self.table_dir.setObjectName(_fromUtf8("table_dir"))
self.gridLayout_7.addWidget(self.table_dir, 0, 1, 1, 1, QtCore.Qt.AlignBottom)
self.correct_value_edit = QtGui.QLineEdit(self.scrollAreaWidgetContents)
self.correct_value_edit.setObjectName(_fromUtf8("correct_value_edit"))
self.gridLayout_7.addWidget(self.correct_value_edit, 7, 2, 1, 1)
self.bytes_to_read = QtGui.QLabel(self.scrollAreaWidgetContents)
self.bytes_to_read.setObjectName(_fromUtf8("bytes_to_read"))
self.gridLayout_7.addWidget(self.bytes_to_read, 4, 1, 1, 1, QtCore.Qt.AlignBottom)
self.correct_byte = QtGui.QLabel(self.scrollAreaWidgetContents)
self.correct_byte.setObjectName(_fromUtf8("correct_byte"))
self.gridLayout_7.addWidget(self.correct_byte, 6, 1, 1, 1, QtCore.Qt.AlignBottom)
self.corret_value = QtGui.QLabel(self.scrollAreaWidgetContents)
self.corret_value.setObjectName(_fromUtf8("corret_value"))
self.gridLayout_7.addWidget(self.corret_value, 6, 2, 1, 1, QtCore.Qt.AlignBottom)
self.Load_Button.raise_()
self.Load_Button.raise_()
self.Write_Button.raise_()
self.Read_button.raise_()
self.byte_to_read_edit.raise_()
self.read_status_edit.raise_()
self.file_dir_Edit.raise_()
self.correct_button.raise_()
self.correct_byte_edit.raise_()
self.correct_value_edit.raise_()
self.write_status_edit.raise_()
self.table_dir.raise_()
self.write_status.raise_()
self.read_status.raise_()
self.bytes_to_read.raise_()
self.correct_byte.raise_()
self.corret_value.raise_()
self.scrollArea_2.setWidget(self.scrollAreaWidgetContents)
self.gridLayout.addWidget(self.scrollArea_2, 1, 1, 1, 1)
self.retranslateUi(Form)
self.tab.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
Form.setWindowTitle(_translate("Form", "Form", None))
self.tab.setTabText(self.tab.indexOf(self.load_tab), _translate("Form", "Loaded table", None))
self.tab.setTabText(self.tab.indexOf(self.read_table_tab), _translate("Form", "Read table", None))
self.tab.setTabText(self.tab.indexOf(self.read_graph_tab), _translate("Form", "Read graph", None))
self.Load_Button.setText(_translate("Form", "Load", None))
self.Write_Button.setText(_translate("Form", "Write", None))
self.Read_button.setText(_translate("Form", "Read", None))
self.correct_button.setText(_translate("Form", "Correct", None))
self.write_status.setText(_translate("Form", "Write status", None))
self.read_status.setText(_translate("Form", "Read status", None))
self.table_dir.setText(_translate("Form", "Table file directory", None))
self.bytes_to_read.setText(_translate("Form", "bytes to read", None))
self.correct_byte.setText(_translate("Form", "correct byte", None))
self.corret_value.setText(_translate("Form", "correct_value", None))
| [
1,
529,
276,
1112,
420,
29958,
18732,
10118,
29874,
29914,
8205,
2154,
29918,
13495,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
29937,
3812,
5314,
5759,
515,
5183,
14313,
934,
525,
305,
666,
18091,
3249,
29889,
1481,
29915,
13,
29937,
13,
29937,
6760,
630,
491,
29901,
10772,
17303,
29946,
3740,
775,
15299,
29871,
29946,
29889,
29896,
29896,
29889,
29946,
13,
29937,
13,
29937,
399,
25614,
29991,
2178,
3620,
1754,
297,
445,
934,
674,
367,
5714,
29991,
13,
13,
3166,
10772,
17303,
29946,
1053,
14705,
9203,
29892,
14705,
28707,
13,
13,
2202,
29901,
13,
1678,
903,
3166,
29965,
13264,
29947,
353,
14705,
9203,
29889,
29984,
1231,
29889,
3166,
29965,
13264,
29947,
13,
19499,
23833,
2392,
29901,
13,
1678,
822,
903,
3166,
29965,
13264,
29947,
29898,
29879,
1125,
13,
4706,
736,
269,
13,
13,
2202,
29901,
13,
1678,
903,
22331,
353,
14705,
28707,
29889,
29984,
4873,
29889,
2525,
12858,
10496,
29947,
13,
1678,
822,
903,
21652,
29898,
4703,
29892,
1426,
29892,
766,
1117,
335,
1125,
13,
4706,
736,
14705,
28707,
29889,
29984,
4873,
29889,
21652,
29898,
4703,
29892,
1426,
29892,
766,
1117,
335,
29892,
903,
22331,
29897,
13,
19499,
23833,
2392,
29901,
13,
1678,
822,
903,
21652,
29898,
4703,
29892,
1426,
29892,
766,
1117,
335,
1125,
13,
4706,
736,
14705,
28707,
29889,
29984,
4873,
29889,
21652,
29898,
4703,
29892,
1426,
29892,
766,
1117,
335,
29897,
13,
13,
1990,
501,
29875,
29918,
2500,
29898,
3318,
1125,
13,
1678,
822,
6230,
29965,
29875,
29898,
1311,
29892,
3812,
1125,
13,
4706,
3812,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
2500,
5783,
13,
4706,
3812,
29889,
21476,
29898,
29953,
29953,
29941,
29892,
29871,
29953,
29941,
29945,
29897,
13,
4706,
3812,
29889,
842,
7976,
12539,
3505,
29898,
17303,
9203,
29889,
29984,
3505,
29898,
29896,
29945,
29955,
29955,
29955,
29896,
29929,
29896,
29892,
29871,
29896,
29953,
29955,
29955,
29955,
29906,
29896,
29945,
876,
13,
4706,
1583,
29889,
7720,
3453,
353,
14705,
28707,
29889,
29984,
5756,
3453,
29898,
2500,
29897,
13,
4706,
1583,
29889,
7720,
3453,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
7720,
3453,
5783,
13,
4706,
1583,
29889,
10510,
13799,
353,
14705,
28707,
29889,
29984,
10463,
13799,
29898,
2500,
29897,
13,
4706,
1583,
29889,
10510,
13799,
29889,
842,
8801,
1666,
13902,
29898,
5574,
29897,
13,
4706,
1583,
29889,
10510,
13799,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
10510,
13799,
5783,
13,
4706,
1583,
29889,
10510,
13799,
8801,
21002,
29918,
29906,
353,
14705,
28707,
29889,
29984,
8801,
580,
13,
4706,
1583,
29889,
10510,
13799,
8801,
21002,
29918,
29906,
29889,
842,
7999,
7843,
29898,
17303,
9203,
29889,
29984,
7364,
29898,
29900,
29892,
29871,
29900,
29892,
29871,
29953,
29946,
29941,
29892,
29871,
29941,
29896,
29900,
876,
13,
4706,
1583,
29889,
10510,
13799,
8801,
21002,
29918,
29906,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
10510,
13799,
8801,
21002,
29918,
29906,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29953,
353,
14705,
28707,
29889,
29984,
5756,
3453,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29918,
29906,
29897,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29953,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
7720,
3453,
29918,
29953,
5783,
13,
4706,
1583,
29889,
3891,
353,
14705,
28707,
29889,
29984,
8863,
8801,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29918,
29906,
29897,
13,
4706,
1583,
29889,
3891,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
3891,
5783,
13,
4706,
1583,
29889,
1359,
29918,
3891,
353,
14705,
28707,
29889,
29984,
8801,
580,
13,
4706,
1583,
29889,
1359,
29918,
3891,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
1359,
29918,
3891,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29941,
353,
14705,
28707,
29889,
29984,
5756,
3453,
29898,
1311,
29889,
1359,
29918,
3891,
29897,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29941,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
7720,
3453,
29918,
29941,
5783,
13,
4706,
1583,
29889,
1359,
29918,
2371,
353,
14705,
28707,
29889,
29984,
3562,
8801,
29898,
1311,
29889,
1359,
29918,
3891,
29897,
13,
4706,
1583,
29889,
1359,
29918,
2371,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
1359,
29918,
2371,
5783,
13,
4706,
1583,
29889,
1359,
29918,
2371,
29889,
842,
4409,
3981,
29898,
29900,
29897,
13,
4706,
1583,
29889,
1359,
29918,
2371,
29889,
842,
4301,
3981,
29898,
29900,
29897,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29941,
29889,
1202,
8801,
29898,
1311,
29889,
1359,
29918,
2371,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
4706,
1583,
29889,
3891,
29889,
1202,
8863,
29898,
1311,
29889,
1359,
29918,
3891,
29892,
903,
3166,
29965,
13264,
29947,
703,
5783,
13,
4706,
1583,
29889,
949,
29918,
2371,
29918,
3891,
353,
14705,
28707,
29889,
29984,
8801,
580,
13,
4706,
1583,
29889,
949,
29918,
2371,
29918,
3891,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
949,
29918,
2371,
29918,
3891,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29906,
353,
14705,
28707,
29889,
29984,
5756,
3453,
29898,
1311,
29889,
949,
29918,
2371,
29918,
3891,
29897,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29906,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
7720,
3453,
29918,
29906,
5783,
13,
4706,
1583,
29889,
949,
29918,
2371,
353,
14705,
28707,
29889,
29984,
3562,
8801,
29898,
1311,
29889,
949,
29918,
2371,
29918,
3891,
29897,
13,
4706,
1583,
29889,
949,
29918,
2371,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
949,
29918,
2371,
5783,
13,
4706,
1583,
29889,
949,
29918,
2371,
29889,
842,
4409,
3981,
29898,
29900,
29897,
13,
4706,
1583,
29889,
949,
29918,
2371,
29889,
842,
4301,
3981,
29898,
29900,
29897,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29906,
29889,
1202,
8801,
29898,
1311,
29889,
949,
29918,
2371,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
4706,
1583,
29889,
3891,
29889,
1202,
8863,
29898,
1311,
29889,
949,
29918,
2371,
29918,
3891,
29892,
903,
3166,
29965,
13264,
29947,
703,
5783,
13,
4706,
1583,
29889,
949,
29918,
4262,
29918,
3891,
353,
14705,
28707,
29889,
29984,
8801,
580,
13,
4706,
1583,
29889,
949,
29918,
4262,
29918,
3891,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
949,
29918,
4262,
29918,
3891,
5783,
13,
4706,
1583,
29889,
18575,
3453,
353,
14705,
28707,
29889,
29984,
29963,
3313,
3453,
29898,
1311,
29889,
949,
29918,
4262,
29918,
3891,
29897,
13,
4706,
1583,
29889,
18575,
3453,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
18575,
3453,
5783,
13,
4706,
1583,
29889,
949,
29918,
4262,
353,
14705,
28707,
29889,
29984,
17290,
1043,
29898,
1311,
29889,
949,
29918,
4262,
29918,
3891,
29897,
13,
4706,
1583,
29889,
949,
29918,
4262,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
949,
29918,
4262,
5783,
13,
4706,
1583,
29889,
18575,
3453,
29889,
1202,
8801,
29898,
1311,
29889,
949,
29918,
4262,
29897,
13,
4706,
1583,
29889,
3891,
29889,
1202,
8863,
29898,
1311,
29889,
949,
29918,
4262,
29918,
3891,
29892,
903,
3166,
29965,
13264,
29947,
703,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29953,
29889,
1202,
8801,
29898,
1311,
29889,
3891,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
4706,
1583,
29889,
10510,
13799,
29889,
842,
8801,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29918,
29906,
29897,
13,
4706,
1583,
29889,
7720,
3453,
29889,
1202,
8801,
29898,
1311,
29889,
10510,
13799,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
4706,
1583,
29889,
10510,
13799,
29918,
29906,
353,
14705,
28707,
29889,
29984,
10463,
13799,
29898,
2500,
29897,
13,
4706,
2159,
15644,
353,
14705,
28707,
29889,
29984,
3505,
15644,
29898,
17303,
28707,
29889,
29984,
3505,
15644,
29889,
29777,
292,
29892,
14705,
28707,
29889,
29984,
3505,
15644,
29889,
29777,
292,
29897,
13,
4706,
2159,
15644,
29889,
842,
24932,
855,
10301,
29898,
29900,
29897,
13,
4706,
2159,
15644,
29889,
842,
29270,
855,
10301,
29898,
29900,
29897,
13,
4706,
2159,
15644,
29889,
842,
7011,
2831,
6110,
29898,
1311,
29889,
10510,
13799,
29918,
29906,
29889,
2311,
15644,
2141,
5349,
7011,
2831,
6110,
3101,
13,
4706,
1583,
29889,
10510,
13799,
29918,
29906,
29889,
842,
3505,
15644,
29898,
2311,
15644,
29897,
13,
4706,
1583,
29889,
10510,
13799,
29918,
29906,
29889,
842,
8801,
1666,
13902,
29898,
5574,
29897,
13,
4706,
1583,
29889,
10510,
13799,
29918,
29906,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
10510,
13799,
29918,
29906,
5783,
13,
4706,
1583,
29889,
10510,
13799,
8801,
21002,
353,
14705,
28707,
29889,
29984,
8801,
580,
13,
4706,
1583,
29889,
10510,
13799,
8801,
21002,
29889,
842,
7999,
7843,
29898,
17303,
9203,
29889,
29984,
7364,
29898,
29900,
29892,
29871,
29900,
29892,
29871,
29953,
29946,
29941,
29892,
29871,
29906,
29929,
29955,
876,
13,
4706,
1583,
29889,
10510,
13799,
8801,
21002,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
10510,
13799,
8801,
21002,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
353,
14705,
28707,
29889,
29984,
5756,
3453,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
7720,
3453,
29918,
29955,
5783,
13,
4706,
1583,
29889,
1445,
29918,
3972,
29918,
6103,
353,
14705,
28707,
29889,
2239,
457,
6103,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
1445,
29918,
3972,
29918,
6103,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
1445,
29918,
3972,
29918,
6103,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
29889,
1202,
8801,
29898,
1311,
29889,
1445,
29918,
3972,
29918,
6103,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
4706,
1583,
29889,
949,
29918,
4882,
29918,
5628,
353,
14705,
28707,
29889,
2239,
457,
6103,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
949,
29918,
4882,
29918,
5628,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
949,
29918,
4882,
29918,
5628,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
29889,
1202,
8801,
29898,
1311,
29889,
949,
29918,
4882,
29918,
5628,
29892,
29871,
29941,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
4706,
1583,
29889,
10389,
29918,
517,
29918,
949,
29918,
5628,
353,
14705,
28707,
29889,
2239,
457,
6103,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
10389,
29918,
517,
29918,
949,
29918,
5628,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
10389,
29918,
517,
29918,
949,
29918,
5628,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
29889,
1202,
8801,
29898,
1311,
29889,
10389,
29918,
517,
29918,
949,
29918,
5628,
29892,
29871,
29945,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
4706,
1583,
29889,
5896,
29918,
3125,
353,
14705,
28707,
29889,
29984,
27031,
3125,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
5896,
29918,
3125,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
5896,
29918,
3125,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
29889,
1202,
8801,
29898,
1311,
29889,
5896,
29918,
3125,
29892,
29871,
29896,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
4706,
1583,
29889,
6113,
29918,
3125,
353,
14705,
28707,
29889,
29984,
27031,
3125,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
6113,
29918,
3125,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
6113,
29918,
3125,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
29889,
1202,
8801,
29898,
1311,
29889,
6113,
29918,
3125,
29892,
29871,
29941,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
4706,
1583,
29889,
3539,
29918,
4882,
29918,
5628,
353,
14705,
28707,
29889,
2239,
457,
6103,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
3539,
29918,
4882,
29918,
5628,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
3539,
29918,
4882,
29918,
5628,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
29889,
1202,
8801,
29898,
1311,
29889,
3539,
29918,
4882,
29918,
5628,
29892,
29871,
29945,
29892,
29871,
29906,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
4706,
1583,
29889,
6359,
29918,
3092,
353,
14705,
28707,
29889,
29984,
27031,
3125,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
6359,
29918,
3092,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
6359,
29918,
3092,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
29889,
1202,
8801,
29898,
1311,
29889,
6359,
29918,
3092,
29892,
29871,
29945,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
4706,
1583,
29889,
15728,
29918,
3092,
353,
14705,
28707,
29889,
29984,
27031,
3125,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
15728,
29918,
3092,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
15728,
29918,
3092,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
29889,
1202,
8801,
29898,
1311,
29889,
15728,
29918,
3092,
29892,
29871,
29955,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
4706,
1583,
29889,
15728,
29918,
10389,
29918,
5628,
353,
14705,
28707,
29889,
2239,
457,
6103,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
15728,
29918,
10389,
29918,
5628,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
15728,
29918,
10389,
29918,
5628,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
29889,
1202,
8801,
29898,
1311,
29889,
15728,
29918,
10389,
29918,
5628,
29892,
29871,
29955,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
4706,
1583,
29889,
3539,
29918,
4882,
353,
14705,
28707,
29889,
2239,
1107,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
3539,
29918,
4882,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
3539,
29918,
4882,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
29889,
1202,
8801,
29898,
1311,
29889,
3539,
29918,
4882,
29892,
29871,
29906,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
14705,
9203,
29889,
17303,
29889,
2499,
647,
15342,
29897,
13,
4706,
1583,
29889,
949,
29918,
4882,
353,
14705,
28707,
29889,
2239,
1107,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
949,
29918,
4882,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
949,
29918,
4882,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
29889,
1202,
8801,
29898,
1311,
29889,
949,
29918,
4882,
29892,
29871,
29946,
29892,
29871,
29906,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
14705,
9203,
29889,
17303,
29889,
2499,
647,
15342,
29897,
13,
4706,
1583,
29889,
2371,
29918,
3972,
353,
14705,
28707,
29889,
2239,
1107,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
2371,
29918,
3972,
29889,
842,
7976,
12539,
3505,
29898,
17303,
9203,
29889,
29984,
3505,
29898,
29941,
29900,
29947,
29892,
29871,
29946,
29947,
876,
13,
4706,
1583,
29889,
2371,
29918,
3972,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
2371,
29918,
3972,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
29889,
1202,
8801,
29898,
1311,
29889,
2371,
29918,
3972,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
14705,
9203,
29889,
17303,
29889,
2499,
647,
15342,
29897,
13,
4706,
1583,
29889,
15728,
29918,
1767,
29918,
5628,
353,
14705,
28707,
29889,
2239,
457,
6103,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
15728,
29918,
1767,
29918,
5628,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
15728,
29918,
1767,
29918,
5628,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
29889,
1202,
8801,
29898,
1311,
29889,
15728,
29918,
1767,
29918,
5628,
29892,
29871,
29955,
29892,
29871,
29906,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
4706,
1583,
29889,
13193,
29918,
517,
29918,
949,
353,
14705,
28707,
29889,
2239,
1107,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
13193,
29918,
517,
29918,
949,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
13193,
29918,
517,
29918,
949,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
29889,
1202,
8801,
29898,
1311,
29889,
13193,
29918,
517,
29918,
949,
29892,
29871,
29946,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
14705,
9203,
29889,
17303,
29889,
2499,
647,
15342,
29897,
13,
4706,
1583,
29889,
15728,
29918,
10389,
353,
14705,
28707,
29889,
2239,
1107,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
15728,
29918,
10389,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
15728,
29918,
10389,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
29889,
1202,
8801,
29898,
1311,
29889,
15728,
29918,
10389,
29892,
29871,
29953,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
14705,
9203,
29889,
17303,
29889,
2499,
647,
15342,
29897,
13,
4706,
1583,
29889,
2616,
2267,
29918,
1767,
353,
14705,
28707,
29889,
2239,
1107,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
2616,
2267,
29918,
1767,
29889,
842,
2061,
1170,
7373,
3166,
29965,
13264,
29947,
703,
2616,
2267,
29918,
1767,
5783,
13,
4706,
1583,
29889,
7720,
3453,
29918,
29955,
29889,
1202,
8801,
29898,
1311,
29889,
2616,
2267,
29918,
1767,
29892,
29871,
29953,
29892,
29871,
29906,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
14705,
9203,
29889,
17303,
29889,
2499,
647,
15342,
29897,
13,
4706,
1583,
29889,
5896,
29918,
3125,
29889,
22692,
29918,
580,
13,
4706,
1583,
29889,
5896,
29918,
3125,
29889,
22692,
29918,
580,
13,
4706,
1583,
29889,
6113,
29918,
3125,
29889,
22692,
29918,
580,
13,
4706,
1583,
29889,
6359,
29918,
3092,
29889,
22692,
29918,
580,
13,
4706,
1583,
29889,
10389,
29918,
517,
29918,
949,
29918,
5628,
29889,
22692,
29918,
580,
13,
4706,
1583,
29889,
949,
29918,
4882,
29918,
5628,
29889,
22692,
29918,
580,
13,
4706,
1583,
29889,
1445,
29918,
3972,
29918,
6103,
29889,
22692,
29918,
580,
13,
4706,
1583,
29889,
15728,
29918,
3092,
29889,
22692,
29918,
580,
13,
4706,
1583,
29889,
15728,
29918,
10389,
29918,
5628,
29889,
22692,
29918,
580,
13,
4706,
1583,
29889,
15728,
29918,
1767,
29918,
5628,
29889,
22692,
29918,
580,
13,
4706,
1583,
29889,
3539,
29918,
4882,
29918,
5628,
29889,
22692,
29918,
580,
13,
4706,
1583,
29889,
2371,
29918,
3972,
29889,
22692,
29918,
580,
13,
4706,
1583,
29889,
3539,
29918,
4882,
29889,
22692,
29918,
580,
13,
4706,
1583,
29889,
949,
29918,
4882,
29889,
22692,
29918,
580,
13,
4706,
1583,
29889,
13193,
29918,
517,
29918,
949,
29889,
22692,
29918,
580,
13,
4706,
1583,
29889,
15728,
29918,
10389,
29889,
22692,
29918,
580,
13,
4706,
1583,
29889,
2616,
2267,
29918,
1767,
29889,
22692,
29918,
580,
13,
4706,
1583,
29889,
10510,
13799,
29918,
29906,
29889,
842,
8801,
29898,
1311,
29889,
10510,
13799,
8801,
21002,
29897,
13,
4706,
1583,
29889,
7720,
3453,
29889,
1202,
8801,
29898,
1311,
29889,
10510,
13799,
29918,
29906,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29897,
13,
13,
4706,
1583,
29889,
276,
21652,
29965,
29875,
29898,
2500,
29897,
13,
4706,
1583,
29889,
3891,
29889,
842,
7583,
3220,
29898,
29900,
29897,
13,
4706,
14705,
9203,
29889,
29984,
19346,
2061,
29889,
6915,
16973,
1862,
2059,
1170,
29898,
2500,
29897,
13,
13,
1678,
822,
337,
21652,
29965,
29875,
29898,
1311,
29892,
3812,
1125,
13,
4706,
3812,
29889,
842,
5907,
7030,
7373,
21652,
703,
2500,
613,
376,
2500,
613,
6213,
876,
13,
4706,
1583,
29889,
3891,
29889,
842,
8863,
1626,
29898,
1311,
29889,
3891,
29889,
19402,
29898,
1311,
29889,
1359,
29918,
3891,
511,
903,
21652,
703,
2500,
613,
376,
29147,
1591,
613,
6213,
876,
13,
4706,
1583,
29889,
3891,
29889,
842,
8863,
1626,
29898,
1311,
29889,
3891,
29889,
19402,
29898,
1311,
29889,
949,
29918,
2371,
29918,
3891,
511,
903,
21652,
703,
2500,
613,
376,
6359,
1591,
613,
6213,
876,
13,
4706,
1583,
29889,
3891,
29889,
842,
8863,
1626,
29898,
1311,
29889,
3891,
29889,
19402,
29898,
1311,
29889,
949,
29918,
4262,
29918,
3891,
511,
903,
21652,
703,
2500,
613,
376,
6359,
3983,
613,
6213,
876,
13,
4706,
1583,
29889,
5896,
29918,
3125,
29889,
12038,
7373,
21652,
703,
2500,
613,
376,
5896,
613,
6213,
876,
13,
4706,
1583,
29889,
6113,
29918,
3125,
29889,
12038,
7373,
21652,
703,
2500,
613,
376,
6113,
613,
6213,
876,
13,
4706,
1583,
29889,
6359,
29918,
3092,
29889,
12038,
7373,
21652,
703,
2500,
613,
376,
6359,
613,
6213,
876,
13,
4706,
1583,
29889,
15728,
29918,
3092,
29889,
12038,
7373,
21652,
703,
2500,
613,
376,
12521,
1621,
613,
6213,
876,
13,
4706,
1583,
29889,
3539,
29918,
4882,
29889,
12038,
7373,
21652,
703,
2500,
613,
376,
6113,
4660,
613,
6213,
876,
13,
4706,
1583,
29889,
949,
29918,
4882,
29889,
12038,
7373,
21652,
703,
2500,
613,
376,
6359,
4660,
613,
6213,
876,
13,
4706,
1583,
29889,
2371,
29918,
3972,
29889,
12038,
7373,
21652,
703,
2500,
613,
376,
3562,
934,
3884,
613,
6213,
876,
13,
4706,
1583,
29889,
13193,
29918,
517,
29918,
949,
29889,
12038,
7373,
21652,
703,
2500,
613,
376,
13193,
304,
1303,
613,
6213,
876,
13,
4706,
1583,
29889,
15728,
29918,
10389,
29889,
12038,
7373,
21652,
703,
2500,
613,
376,
15728,
7023,
613,
6213,
876,
13,
4706,
1583,
29889,
2616,
2267,
29918,
1767,
29889,
12038,
7373,
21652,
703,
2500,
613,
376,
15728,
29918,
1767,
613,
6213,
876,
13,
13,
2
] |
lib/raven/transport/eventlet.py | lightopa/Aiopa-Battles | 1 | 141491 | """
raven.transport.eventlet
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import sys
from raven.transport.http import HTTPTransport
try:
import eventlet
try:
from eventlet.green import urllib2 as eventlet_urllib2
except ImportError:
from eventlet.green.urllib import request as eventlet_urllib2
has_eventlet = True
except:
has_eventlet = False
class EventletHTTPTransport(HTTPTransport):
scheme = ['eventlet+http', 'eventlet+https']
def __init__(self, parsed_url, pool_size=100, **kwargs):
if not has_eventlet:
raise ImportError('EventletHTTPTransport requires eventlet.')
super(EventletHTTPTransport, self).__init__(parsed_url, **kwargs)
# remove the eventlet+ from the protocol, as it is not a real protocol
self._url = self._url.split('+', 1)[-1]
def _send_payload(self, payload):
req = eventlet_urllib2.Request(self._url, headers=payload[1])
try:
if sys.version_info < (2, 6):
response = eventlet_urllib2.urlopen(req, payload[0]).read()
else:
response = eventlet_urllib2.urlopen(req, payload[0],
self.timeout).read()
return response
except Exception as err:
return err
def send(self, data, headers):
"""
Spawn an async request to a remote webserver.
"""
eventlet.spawn(self._send_payload, (data, headers))
| [
1,
9995,
13,
336,
854,
29889,
27882,
29889,
3696,
1026,
13,
26594,
26594,
26594,
13,
13,
29901,
8552,
1266,
29901,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29900,
29899,
29906,
29900,
29896,
29906,
491,
278,
317,
8269,
8583,
29892,
1074,
26524,
29950,
24125,
363,
901,
4902,
29889,
13,
29901,
506,
1947,
29901,
350,
7230,
29892,
1074,
365,
2965,
1430,
1660,
363,
901,
4902,
29889,
13,
15945,
29908,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
13,
5215,
10876,
13,
13,
3166,
1153,
854,
29889,
27882,
29889,
1124,
1053,
7331,
27395,
13,
13,
2202,
29901,
13,
1678,
1053,
1741,
1026,
13,
1678,
1018,
29901,
13,
4706,
515,
1741,
1026,
29889,
12692,
1053,
3142,
1982,
29906,
408,
1741,
1026,
29918,
2271,
1982,
29906,
13,
1678,
5174,
16032,
2392,
29901,
13,
4706,
515,
1741,
1026,
29889,
12692,
29889,
2271,
1982,
1053,
2009,
408,
1741,
1026,
29918,
2271,
1982,
29906,
13,
1678,
756,
29918,
3696,
1026,
353,
5852,
13,
19499,
29901,
13,
1678,
756,
29918,
3696,
1026,
353,
7700,
13,
13,
13,
1990,
6864,
1026,
10493,
27395,
29898,
10493,
27395,
1125,
13,
13,
1678,
11380,
353,
6024,
3696,
1026,
29974,
1124,
742,
525,
3696,
1026,
29974,
991,
2033,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
21213,
29918,
2271,
29892,
11565,
29918,
2311,
29922,
29896,
29900,
29900,
29892,
3579,
19290,
1125,
13,
4706,
565,
451,
756,
29918,
3696,
1026,
29901,
13,
9651,
12020,
16032,
2392,
877,
2624,
1026,
10493,
27395,
6858,
1741,
1026,
29889,
1495,
13,
4706,
2428,
29898,
2624,
1026,
10493,
27395,
29892,
1583,
467,
1649,
2344,
12035,
862,
8485,
29918,
2271,
29892,
3579,
19290,
29897,
13,
4706,
396,
3349,
278,
1741,
1026,
29974,
515,
278,
9608,
29892,
408,
372,
338,
451,
263,
1855,
9608,
13,
4706,
1583,
3032,
2271,
353,
1583,
3032,
2271,
29889,
5451,
877,
29974,
742,
29871,
29896,
9601,
29899,
29896,
29962,
13,
13,
1678,
822,
903,
6717,
29918,
23813,
29898,
1311,
29892,
20092,
1125,
13,
4706,
12428,
353,
1741,
1026,
29918,
2271,
1982,
29906,
29889,
3089,
29898,
1311,
3032,
2271,
29892,
9066,
29922,
23813,
29961,
29896,
2314,
13,
4706,
1018,
29901,
13,
9651,
565,
10876,
29889,
3259,
29918,
3888,
529,
313,
29906,
29892,
29871,
29953,
1125,
13,
18884,
2933,
353,
1741,
1026,
29918,
2271,
1982,
29906,
29889,
332,
417,
2238,
29898,
7971,
29892,
20092,
29961,
29900,
14664,
949,
580,
13,
9651,
1683,
29901,
13,
18884,
2933,
353,
1741,
1026,
29918,
2271,
1982,
29906,
29889,
332,
417,
2238,
29898,
7971,
29892,
20092,
29961,
29900,
1402,
13,
462,
462,
462,
1678,
1583,
29889,
15619,
467,
949,
580,
13,
9651,
736,
2933,
13,
4706,
5174,
8960,
408,
4589,
29901,
13,
9651,
736,
4589,
13,
13,
1678,
822,
3638,
29898,
1311,
29892,
848,
29892,
9066,
1125,
13,
4706,
9995,
13,
4706,
1706,
18101,
385,
7465,
2009,
304,
263,
7592,
1856,
2974,
29889,
13,
4706,
9995,
13,
4706,
1741,
1026,
29889,
1028,
18101,
29898,
1311,
3032,
6717,
29918,
23813,
29892,
313,
1272,
29892,
9066,
876,
13,
2
] |
pycollo/quadrature.py | NoNotCar/pycollo | 3 | 64208 | """Computation of quadrature points and weights for different schemes.
Attributes
----------
DEFAULT_COLLOCATION_POINTS_MAX : int
Constant default limitation on the maximum number of collocation points
per mesh section that a user can specify. The value of 20 has been chosen
as above this the algorithms that are used for evaluating the orthogonal
polynomials become numerically unstable and raise a warning.
DEFAULT_COLLOCATION_POINTS_MIN : int
Constant default limitation on the minimum number of collocation points
per mesh section that a user can specify. The value of 2 has been chosen
as this is the smallest possible value that still makes logical sense (i.e.
a mesh section cannot have fewer than two nodes).
GAUSS : str
Keyword identifier for Legendre-Gauss quadrature method.
LOBATTO : str
Keyword identifier for Legendre-Gauss-Lobatto quadrature method.
RADAU : str
Keyword identifier for Legendre-Gauss-Radau quadrature method.
"""
__all__ = []
import numpy as np
import scipy.interpolate as interpolate
from pyproprop import Options
GAUSS = "gauss"
LOBATTO = "lobatto"
RADAU = "radau"
QUADRATURES = Options((GAUSS, LOBATTO, RADAU), default=LOBATTO,
unsupported=GAUSS)
DEFAULT_COLLOCATION_POINTS_MIN = 4
DEFAULT_COLLOCATION_POINTS_MAX = 10
class Quadrature:
"""Class for quadrature schemes including weights and points."""
def __init__(self, backend):
self.backend = backend
self._polynomials = {}
self._quadrature_points = {}
self._quadrature_weights = {}
self._butcher_arrays = {}
self._D_matrices = {}
self._A_matrices = {}
self._W_matrices = {}
self._D_index_arrays = {}
self._A_index_arrays = {}
@property
def settings(self):
return self.backend.ocp.settings
@property
def backend(self):
return self._backend
@backend.setter
def backend(self, backend):
self._backend = backend
self.order_range = list(range(
self.settings.collocation_points_min, self.settings.collocation_points_max))
if self.settings.quadrature_method == LOBATTO:
self.quadrature_generator = self.lobatto_generator
elif self.settings.quadrature_method == RADAU:
self.quadrature_generator = self.radau_generator
elif self.settings.quadrature_method == GAUSS:
self.quadrature_generator = self.gauss_generator
def _retrive_or_generate_dict_value(self, quad_dict, order):
try:
quad_dict[order]
except KeyError:
self.quadrature_generator(order)
return quad_dict[order]
def polynomials(self, order):
return self._retrive_or_generate_dict_value(self._polynomials, order)
def quadrature_point(self, order, *, domain=None):
points = self._retrive_or_generate_dict_value(
self._quadrature_points, order)
if domain:
stretch = 0.5 * (domain[1] - domain[0])
scale = 0.5 * (domain[0] + domain[1])
return stretch * points + scale
else:
return points
def quadrature_weight(self, order):
return self._retrive_or_generate_dict_value(self._quadrature_weights, order)
def butcher_array(self, order):
return self._retrive_or_generate_dict_value(self._butcher_arrays, order)
def D_matrix(self, order):
return self._retrive_or_generate_dict_value(self._D_matrices, order)
def A_matrix(self, order):
return self._retrive_or_generate_dict_value(self._A_matrices, order)
def W_matrix(self, order):
return self._retrive_or_generate_dict_value(self._W_matrices, order)
def D_index_array(self, order):
return self._retrive_or_generate_dict_value(self._D_index_arrays, order)
def A_index_array(self, order):
return self._retrive_or_generate_dict_value(self._A_index_arrays, order)
def radau_generator(self, order):
coefficients = [0] * (order - 2)
coefficients.extend([1, 1])
legendre_polynomial = np.polynomial.legendre.Legendre(coefficients)
self._polynomials.update({order: legendre_polynomial})
radau_points = legendre_polynomial.roots()
radau_points = np.concatenate([radau_points, np.array([0])])
self._quadrature_points.update({order: radau_points})
coefficients = [0] * (order - 2)
coefficients.extend([1])
legendre_polynomial = np.polynomial.legendre.Legendre(coefficients)
radau_weights = [2 / (order - 1)**2]
radau_weights = np.array(
radau_weights + [(1 - x) / ((order - 1)**2 * (legendre_polynomial(x)**2))
for x in radau_points[1:-1]])
radau_weights = np.concatenate([radau_weights, np.array([0])])
self._quadrature_weights.update({order: radau_weights})
butcher_points = self.quadrature_point(order, domain=[0, 1])
butcher_array = np.zeros((order, order))
butcher_array[-1, :] = radau_weights / 2
if order > 2:
A_row = (order + 1) * (order - 2)
A_col = order * (order - 2)
A = np.zeros((A_row, A_col))
b = np.zeros(A_row)
for k in range(order - 2):
for j in range(order):
row = j + k * order
for i in range(order - 2):
col = i + j * (order - 2)
A[row, col] = radau_weights[i + 1] * \
butcher_points[i + 1]**k
b[row] = (radau_weights[j] / (k + 1)) * (1 - butcher_points[j]
** (k + 1)) - radau_weights[-1] * radau_weights[j]
del_row = []
for i, row in enumerate(A):
if np.count_nonzero(row) == 0:
del_row.append(i)
A = np.delete(A, del_row, axis=0)
b = np.delete(b, del_row, axis=0)
a = np.linalg.solve(A, b)
butcher_array[1:-1, :] = a.reshape(order - 2, -1, order='F')
self._butcher_arrays.update({order: butcher_array})
D_left = np.ones((order - 1, 1), dtype=int)
D_right = np.diag(-1 * np.ones((order - 1, ), dtype=int))
D_matrix = np.hstack([D_left, D_right])
self._D_matrices.update({order: D_matrix})
A_matrix = self.butcher_array(order)[1:, :]
self._A_matrices.update({order: A_matrix})
A_index_array = np.array(range(A_matrix.size), dtype=int)
self._A_index_arrays.update({order: A_index_array})
D_num_row, D_num_col = D_matrix.shape
D_rows = np.array(range(D_num_row), dtype=int)
D_left = D_rows * D_num_col
D_right = D_rows * (D_num_col + 1) + 1
D_index_array = np.concatenate((D_left, D_right))
D_index_array.sort()
self._D_index_arrays.update({order: D_index_array})
# print(f'x: {radau_points}')
# print(f'w: {radau_weights}, {sum(radau_weights)}')
# print(f"a: {butcher_array}")
# print(f"A: {D_matrix}")
# print(f"I: {A_matrix}")
# input()
def lobatto_generator(self, order):
num_interior_points = order - 1
coefficients = [0] * (num_interior_points)
coefficients.append(1)
legendre_polynomial = np.polynomial.legendre.Legendre(coefficients)
self._polynomials.update({order: legendre_polynomial})
lobatto_points = legendre_polynomial.deriv().roots()
lobatto_points = np.insert(lobatto_points, 0, -1, axis=0)
lobatto_points = np.append(lobatto_points, 1)
self._quadrature_points.update({order: lobatto_points})
lobatto_weights = np.array(
[1 / (order * (order - 1) * (legendre_polynomial(x)**2)) for x in lobatto_points])
self._quadrature_weights.update({order: lobatto_weights})
butcher_points = self.quadrature_point(order, domain=[0, 1])
# print(f'x\': {butcher_points}')
butcher_array = np.zeros((order, order))
butcher_array[-1, :] = lobatto_weights
if order > 2:
A_row = (order + 1) * (order - 2)
A_col = order * (order - 2)
A = np.zeros((A_row, A_col))
b = np.zeros(A_row)
for k in range(order - 2):
# print(f'k: {k}')
for j in range(order):
# print(f'j: {j}')
row = j + k * order
# print(f'row: {row}')
for i in range(order - 2):
# print(f'i: {i}')
col = i + j * (order - 2)
# print(f'col: {col}')
A[row, col] = lobatto_weights[i + 1] * \
butcher_points[i + 1]**k
# print(f'A: {lobatto_weights[i+1] * butcher_points[i+1]**k}')
b[row] = (lobatto_weights[j] / (k + 1)) * (1 - butcher_points[j]
** (k + 1)) - lobatto_weights[-1] * lobatto_weights[j]
# print(f'b: {(lobatto_weights[j]/(k+1))*(1 - butcher_points[j]**(k+1)) - lobatto_weights[-1]*lobatto_weights[j]}\n')
del_row = []
for i, row in enumerate(A):
if np.count_nonzero(row) == 0:
del_row.append(i)
A = np.delete(A, del_row, axis=0)
b = np.delete(b, del_row, axis=0)
a = np.linalg.solve(A, b)
# print(f'A: {A}')
# print(f'b: {b}')
# print(f'a: {a}')
butcher_array[1:-1, :] = a.reshape(order - 2, -1, order='F')
self._butcher_arrays.update({order: butcher_array})
D_left = np.ones((num_interior_points, 1), dtype=int)
D_right = np.diag(-1 * np.ones((num_interior_points, ), dtype=int))
D_matrix = np.hstack([D_left, D_right])
self._D_matrices.update({order: D_matrix})
A_matrix = self.butcher_array(order)[1:, :]
self._A_matrices.update({order: A_matrix})
A_index_array = np.array(range(A_matrix.size), dtype=int)
self._A_index_arrays.update({order: A_index_array})
D_num_row, D_num_col = D_matrix.shape
D_rows = np.array(range(D_num_row), dtype=int)
D_left = D_rows * D_num_col
D_right = D_rows * (D_num_col + 1) + 1
D_index_array = np.concatenate((D_left, D_right))
D_index_array.sort()
self._D_index_arrays.update({order: D_index_array})
# print(f'x: {lobatto_points}')
# print(f'w: {lobatto_weights}, {sum(lobatto_weights)}')
# print(f"a: {butcher_array}")
# print(f"A: {D_matrix}")
# print(f"I: {A_matrix}")
# input()
| [
1,
9995,
1523,
14584,
310,
15448,
1535,
3291,
322,
18177,
363,
1422,
27715,
29889,
13,
13,
15801,
13,
28400,
13,
23397,
29918,
3217,
2208,
20166,
8098,
29918,
29925,
6992,
9375,
29918,
12648,
584,
938,
13,
1678,
28601,
2322,
29485,
373,
278,
7472,
1353,
310,
784,
5479,
3291,
13,
1678,
639,
27716,
4004,
393,
263,
1404,
508,
6084,
29889,
450,
995,
310,
29871,
29906,
29900,
756,
1063,
10434,
13,
1678,
408,
2038,
445,
278,
14009,
393,
526,
1304,
363,
6161,
1218,
278,
28143,
13,
1678,
24655,
4953,
4825,
1711,
443,
13844,
322,
12020,
263,
9177,
29889,
13,
23397,
29918,
3217,
2208,
20166,
8098,
29918,
29925,
6992,
9375,
29918,
16173,
584,
938,
13,
1678,
28601,
2322,
29485,
373,
278,
9212,
1353,
310,
784,
5479,
3291,
13,
1678,
639,
27716,
4004,
393,
263,
1404,
508,
6084,
29889,
450,
995,
310,
29871,
29906,
756,
1063,
10434,
13,
1678,
408,
445,
338,
278,
19087,
1950,
995,
393,
1603,
3732,
16667,
4060,
313,
29875,
29889,
29872,
29889,
13,
1678,
263,
27716,
4004,
2609,
505,
28145,
1135,
1023,
7573,
467,
13,
12739,
29965,
1799,
584,
851,
13,
1678,
7670,
1742,
15882,
363,
5682,
9030,
29899,
29954,
11214,
15448,
1535,
1158,
29889,
13,
28902,
1299,
4986,
584,
851,
13,
1678,
7670,
1742,
15882,
363,
5682,
9030,
29899,
29954,
11214,
29899,
29931,
711,
16234,
15448,
1535,
1158,
29889,
13,
29934,
3035,
25951,
584,
851,
13,
1678,
7670,
1742,
15882,
363,
5682,
9030,
29899,
29954,
11214,
29899,
9908,
585,
15448,
1535,
1158,
29889,
13,
13,
15945,
29908,
13,
13,
13,
1649,
497,
1649,
353,
5159,
13,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
4560,
2272,
29889,
1639,
3733,
403,
408,
20064,
403,
13,
3166,
11451,
771,
7728,
1053,
25186,
13,
13,
13,
12739,
29965,
1799,
353,
376,
29887,
11214,
29908,
13,
28902,
1299,
4986,
353,
376,
2127,
16234,
29908,
13,
29934,
3035,
25951,
353,
376,
3665,
585,
29908,
13,
13356,
3035,
29934,
1299,
11499,
29903,
353,
25186,
3552,
12739,
29965,
1799,
29892,
11247,
29933,
1299,
4986,
29892,
390,
3035,
25951,
511,
2322,
29922,
28902,
1299,
4986,
29892,
13,
462,
418,
443,
23765,
29922,
12739,
29965,
1799,
29897,
13,
23397,
29918,
3217,
2208,
20166,
8098,
29918,
29925,
6992,
9375,
29918,
16173,
353,
29871,
29946,
13,
23397,
29918,
3217,
2208,
20166,
8098,
29918,
29925,
6992,
9375,
29918,
12648,
353,
29871,
29896,
29900,
13,
13,
13,
1990,
751,
7887,
1535,
29901,
13,
1678,
9995,
2385,
363,
15448,
1535,
27715,
3704,
18177,
322,
3291,
1213,
15945,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
14998,
1125,
13,
4706,
1583,
29889,
27852,
353,
14998,
13,
4706,
1583,
3032,
3733,
9222,
29879,
353,
6571,
13,
4706,
1583,
3032,
3425,
29878,
1535,
29918,
9748,
353,
6571,
13,
4706,
1583,
3032,
3425,
29878,
1535,
29918,
705,
5861,
353,
6571,
13,
4706,
1583,
3032,
4187,
4630,
29918,
2378,
29879,
353,
6571,
13,
4706,
1583,
3032,
29928,
29918,
2922,
11669,
353,
6571,
13,
4706,
1583,
3032,
29909,
29918,
2922,
11669,
353,
6571,
13,
4706,
1583,
3032,
29956,
29918,
2922,
11669,
353,
6571,
13,
4706,
1583,
3032,
29928,
29918,
2248,
29918,
2378,
29879,
353,
6571,
13,
4706,
1583,
3032,
29909,
29918,
2248,
29918,
2378,
29879,
353,
6571,
13,
13,
1678,
732,
6799,
13,
1678,
822,
6055,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
27852,
29889,
542,
29886,
29889,
11027,
13,
13,
1678,
732,
6799,
13,
1678,
822,
14998,
29898,
1311,
1125,
13,
4706,
736,
1583,
3032,
27852,
13,
13,
1678,
732,
27852,
29889,
842,
357,
13,
1678,
822,
14998,
29898,
1311,
29892,
14998,
1125,
13,
4706,
1583,
3032,
27852,
353,
14998,
13,
4706,
1583,
29889,
2098,
29918,
3881,
353,
1051,
29898,
3881,
29898,
13,
9651,
1583,
29889,
11027,
29889,
1054,
5479,
29918,
9748,
29918,
1195,
29892,
1583,
29889,
11027,
29889,
1054,
5479,
29918,
9748,
29918,
3317,
876,
13,
4706,
565,
1583,
29889,
11027,
29889,
3425,
29878,
1535,
29918,
5696,
1275,
11247,
29933,
1299,
4986,
29901,
13,
9651,
1583,
29889,
3425,
29878,
1535,
29918,
27959,
353,
1583,
29889,
2127,
16234,
29918,
27959,
13,
4706,
25342,
1583,
29889,
11027,
29889,
3425,
29878,
1535,
29918,
5696,
1275,
390,
3035,
25951,
29901,
13,
9651,
1583,
29889,
3425,
29878,
1535,
29918,
27959,
353,
1583,
29889,
3665,
585,
29918,
27959,
13,
4706,
25342,
1583,
29889,
11027,
29889,
3425,
29878,
1535,
29918,
5696,
1275,
402,
25951,
1799,
29901,
13,
9651,
1583,
29889,
3425,
29878,
1535,
29918,
27959,
353,
1583,
29889,
29887,
11214,
29918,
27959,
13,
13,
1678,
822,
903,
2267,
4401,
29918,
272,
29918,
17158,
29918,
8977,
29918,
1767,
29898,
1311,
29892,
18890,
29918,
8977,
29892,
1797,
1125,
13,
4706,
1018,
29901,
13,
9651,
18890,
29918,
8977,
29961,
2098,
29962,
13,
4706,
5174,
7670,
2392,
29901,
13,
9651,
1583,
29889,
3425,
29878,
1535,
29918,
27959,
29898,
2098,
29897,
13,
4706,
736,
18890,
29918,
8977,
29961,
2098,
29962,
13,
13,
1678,
822,
24655,
29898,
1311,
29892,
1797,
1125,
13,
4706,
736,
1583,
3032,
2267,
4401,
29918,
272,
29918,
17158,
29918,
8977,
29918,
1767,
29898,
1311,
3032,
3733,
9222,
29879,
29892,
1797,
29897,
13,
13,
1678,
822,
15448,
1535,
29918,
3149,
29898,
1311,
29892,
1797,
29892,
334,
29892,
5354,
29922,
8516,
1125,
13,
4706,
3291,
353,
1583,
3032,
2267,
4401,
29918,
272,
29918,
17158,
29918,
8977,
29918,
1767,
29898,
13,
9651,
1583,
3032,
3425,
29878,
1535,
29918,
9748,
29892,
1797,
29897,
13,
4706,
565,
5354,
29901,
13,
9651,
16116,
353,
29871,
29900,
29889,
29945,
334,
313,
7247,
29961,
29896,
29962,
448,
5354,
29961,
29900,
2314,
13,
9651,
6287,
353,
29871,
29900,
29889,
29945,
334,
313,
7247,
29961,
29900,
29962,
718,
5354,
29961,
29896,
2314,
13,
9651,
736,
16116,
334,
3291,
718,
6287,
13,
4706,
1683,
29901,
13,
9651,
736,
3291,
13,
13,
1678,
822,
15448,
1535,
29918,
7915,
29898,
1311,
29892,
1797,
1125,
13,
4706,
736,
1583,
3032,
2267,
4401,
29918,
272,
29918,
17158,
29918,
8977,
29918,
1767,
29898,
1311,
3032,
3425,
29878,
1535,
29918,
705,
5861,
29892,
1797,
29897,
13,
13,
1678,
822,
541,
4630,
29918,
2378,
29898,
1311,
29892,
1797,
1125,
13,
4706,
736,
1583,
3032,
2267,
4401,
29918,
272,
29918,
17158,
29918,
8977,
29918,
1767,
29898,
1311,
3032,
4187,
4630,
29918,
2378,
29879,
29892,
1797,
29897,
13,
13,
1678,
822,
360,
29918,
5344,
29898,
1311,
29892,
1797,
1125,
13,
4706,
736,
1583,
3032,
2267,
4401,
29918,
272,
29918,
17158,
29918,
8977,
29918,
1767,
29898,
1311,
3032,
29928,
29918,
2922,
11669,
29892,
1797,
29897,
13,
13,
1678,
822,
319,
29918,
5344,
29898,
1311,
29892,
1797,
1125,
13,
4706,
736,
1583,
3032,
2267,
4401,
29918,
272,
29918,
17158,
29918,
8977,
29918,
1767,
29898,
1311,
3032,
29909,
29918,
2922,
11669,
29892,
1797,
29897,
13,
13,
1678,
822,
399,
29918,
5344,
29898,
1311,
29892,
1797,
1125,
13,
4706,
736,
1583,
3032,
2267,
4401,
29918,
272,
29918,
17158,
29918,
8977,
29918,
1767,
29898,
1311,
3032,
29956,
29918,
2922,
11669,
29892,
1797,
29897,
13,
13,
1678,
822,
360,
29918,
2248,
29918,
2378,
29898,
1311,
29892,
1797,
1125,
13,
4706,
736,
1583,
3032,
2267,
4401,
29918,
272,
29918,
17158,
29918,
8977,
29918,
1767,
29898,
1311,
3032,
29928,
29918,
2248,
29918,
2378,
29879,
29892,
1797,
29897,
13,
13,
1678,
822,
319,
29918,
2248,
29918,
2378,
29898,
1311,
29892,
1797,
1125,
13,
4706,
736,
1583,
3032,
2267,
4401,
29918,
272,
29918,
17158,
29918,
8977,
29918,
1767,
29898,
1311,
3032,
29909,
29918,
2248,
29918,
2378,
29879,
29892,
1797,
29897,
13,
13,
1678,
822,
2971,
585,
29918,
27959,
29898,
1311,
29892,
1797,
1125,
13,
4706,
16127,
353,
518,
29900,
29962,
334,
313,
2098,
448,
29871,
29906,
29897,
13,
4706,
16127,
29889,
21843,
4197,
29896,
29892,
29871,
29896,
2314,
13,
4706,
2814,
9030,
29918,
3733,
9222,
353,
7442,
29889,
3733,
9222,
29889,
1397,
9030,
29889,
22988,
9030,
29898,
1111,
8462,
29879,
29897,
13,
4706,
1583,
3032,
3733,
9222,
29879,
29889,
5504,
3319,
2098,
29901,
2814,
9030,
29918,
3733,
9222,
1800,
13,
13,
4706,
2971,
585,
29918,
9748,
353,
2814,
9030,
29918,
3733,
9222,
29889,
307,
1862,
580,
13,
4706,
2971,
585,
29918,
9748,
353,
7442,
29889,
535,
29883,
2579,
403,
4197,
3665,
585,
29918,
9748,
29892,
7442,
29889,
2378,
4197,
29900,
2314,
2314,
13,
4706,
1583,
3032,
3425,
29878,
1535,
29918,
9748,
29889,
5504,
3319,
2098,
29901,
2971,
585,
29918,
9748,
1800,
13,
13,
4706,
16127,
353,
518,
29900,
29962,
334,
313,
2098,
448,
29871,
29906,
29897,
13,
4706,
16127,
29889,
21843,
4197,
29896,
2314,
13,
4706,
2814,
9030,
29918,
3733,
9222,
353,
7442,
29889,
3733,
9222,
29889,
1397,
9030,
29889,
22988,
9030,
29898,
1111,
8462,
29879,
29897,
13,
4706,
2971,
585,
29918,
705,
5861,
353,
518,
29906,
847,
313,
2098,
448,
29871,
29896,
29897,
1068,
29906,
29962,
13,
4706,
2971,
585,
29918,
705,
5861,
353,
7442,
29889,
2378,
29898,
13,
9651,
2971,
585,
29918,
705,
5861,
718,
17288,
29896,
448,
921,
29897,
847,
5135,
2098,
448,
29871,
29896,
29897,
1068,
29906,
334,
313,
1397,
9030,
29918,
3733,
9222,
29898,
29916,
29897,
1068,
29906,
876,
13,
462,
632,
363,
921,
297,
2971,
585,
29918,
9748,
29961,
29896,
13018,
29896,
24960,
13,
4706,
2971,
585,
29918,
705,
5861,
353,
7442,
29889,
535,
29883,
2579,
403,
4197,
3665,
585,
29918,
705,
5861,
29892,
7442,
29889,
2378,
4197,
29900,
2314,
2314,
13,
4706,
1583,
3032,
3425,
29878,
1535,
29918,
705,
5861,
29889,
5504,
3319,
2098,
29901,
2971,
585,
29918,
705,
5861,
1800,
13,
13,
4706,
541,
4630,
29918,
9748,
353,
1583,
29889,
3425,
29878,
1535,
29918,
3149,
29898,
2098,
29892,
5354,
11759,
29900,
29892,
29871,
29896,
2314,
13,
4706,
541,
4630,
29918,
2378,
353,
7442,
29889,
3298,
359,
3552,
2098,
29892,
1797,
876,
13,
4706,
541,
4630,
29918,
2378,
14352,
29896,
29892,
584,
29962,
353,
2971,
585,
29918,
705,
5861,
847,
29871,
29906,
13,
4706,
565,
1797,
1405,
29871,
29906,
29901,
13,
9651,
319,
29918,
798,
353,
313,
2098,
718,
29871,
29896,
29897,
334,
313,
2098,
448,
29871,
29906,
29897,
13,
9651,
319,
29918,
1054,
353,
1797,
334,
313,
2098,
448,
29871,
29906,
29897,
13,
9651,
319,
353,
7442,
29889,
3298,
359,
3552,
29909,
29918,
798,
29892,
319,
29918,
1054,
876,
13,
9651,
289,
353,
7442,
29889,
3298,
359,
29898,
29909,
29918,
798,
29897,
13,
9651,
363,
413,
297,
3464,
29898,
2098,
448,
29871,
29906,
1125,
13,
18884,
363,
432,
297,
3464,
29898,
2098,
1125,
13,
462,
1678,
1948,
353,
432,
718,
413,
334,
1797,
13,
462,
1678,
363,
474,
297,
3464,
29898,
2098,
448,
29871,
29906,
1125,
13,
462,
4706,
784,
353,
474,
718,
432,
334,
313,
2098,
448,
29871,
29906,
29897,
13,
462,
4706,
319,
29961,
798,
29892,
784,
29962,
353,
2971,
585,
29918,
705,
5861,
29961,
29875,
718,
29871,
29896,
29962,
334,
320,
13,
462,
9651,
541,
4630,
29918,
9748,
29961,
29875,
718,
29871,
29896,
29962,
1068,
29895,
13,
462,
1678,
289,
29961,
798,
29962,
353,
313,
3665,
585,
29918,
705,
5861,
29961,
29926,
29962,
847,
313,
29895,
718,
29871,
29896,
876,
334,
313,
29896,
448,
541,
4630,
29918,
9748,
29961,
29926,
29962,
13,
462,
462,
462,
632,
3579,
313,
29895,
718,
29871,
29896,
876,
448,
2971,
585,
29918,
705,
5861,
14352,
29896,
29962,
334,
2971,
585,
29918,
705,
5861,
29961,
29926,
29962,
13,
9651,
628,
29918,
798,
353,
5159,
13,
9651,
363,
474,
29892,
1948,
297,
26985,
29898,
29909,
1125,
13,
18884,
565,
7442,
29889,
2798,
29918,
5464,
9171,
29898,
798,
29897,
1275,
29871,
29900,
29901,
13,
462,
1678,
628,
29918,
798,
29889,
4397,
29898,
29875,
29897,
13,
9651,
319,
353,
7442,
29889,
8143,
29898,
29909,
29892,
628,
29918,
798,
29892,
9685,
29922,
29900,
29897,
13,
9651,
289,
353,
7442,
29889,
8143,
29898,
29890,
29892,
628,
29918,
798,
29892,
9685,
29922,
29900,
29897,
13,
9651,
263,
353,
7442,
29889,
29880,
979,
29887,
29889,
2929,
345,
29898,
29909,
29892,
289,
29897,
13,
9651,
541,
4630,
29918,
2378,
29961,
29896,
13018,
29896,
29892,
584,
29962,
353,
263,
29889,
690,
14443,
29898,
2098,
448,
29871,
29906,
29892,
448,
29896,
29892,
1797,
2433,
29943,
1495,
13,
4706,
1583,
3032,
4187,
4630,
29918,
2378,
29879,
29889,
5504,
3319,
2098,
29901,
541,
4630,
29918,
2378,
1800,
13,
13,
4706,
360,
29918,
1563,
353,
7442,
29889,
2873,
3552,
2098,
448,
29871,
29896,
29892,
29871,
29896,
511,
26688,
29922,
524,
29897,
13,
4706,
360,
29918,
1266,
353,
7442,
29889,
6051,
351,
6278,
29896,
334,
7442,
29889,
2873,
3552,
2098,
448,
29871,
29896,
29892,
10353,
26688,
29922,
524,
876,
13,
4706,
360,
29918,
5344,
353,
7442,
29889,
29882,
1429,
4197,
29928,
29918,
1563,
29892,
360,
29918,
1266,
2314,
13,
4706,
1583,
3032,
29928,
29918,
2922,
11669,
29889,
5504,
3319,
2098,
29901,
360,
29918,
5344,
1800,
13,
13,
4706,
319,
29918,
5344,
353,
1583,
29889,
4187,
4630,
29918,
2378,
29898,
2098,
9601,
29896,
29901,
29892,
584,
29962,
13,
4706,
1583,
3032,
29909,
29918,
2922,
11669,
29889,
5504,
3319,
2098,
29901,
319,
29918,
5344,
1800,
13,
13,
4706,
319,
29918,
2248,
29918,
2378,
353,
7442,
29889,
2378,
29898,
3881,
29898,
29909,
29918,
5344,
29889,
2311,
511,
26688,
29922,
524,
29897,
13,
4706,
1583,
3032,
29909,
29918,
2248,
29918,
2378,
29879,
29889,
5504,
3319,
2098,
29901,
319,
29918,
2248,
29918,
2378,
1800,
13,
13,
4706,
360,
29918,
1949,
29918,
798,
29892,
360,
29918,
1949,
29918,
1054,
353,
360,
29918,
5344,
29889,
12181,
13,
4706,
360,
29918,
5727,
353,
7442,
29889,
2378,
29898,
3881,
29898,
29928,
29918,
1949,
29918,
798,
511,
26688,
29922,
524,
29897,
13,
4706,
360,
29918,
1563,
353,
360,
29918,
5727,
334,
360,
29918,
1949,
29918,
1054,
13,
4706,
360,
29918,
1266,
353,
360,
29918,
5727,
334,
313,
29928,
29918,
1949,
29918,
1054,
718,
29871,
29896,
29897,
718,
29871,
29896,
13,
4706,
360,
29918,
2248,
29918,
2378,
353,
7442,
29889,
535,
29883,
2579,
403,
3552,
29928,
29918,
1563,
29892,
360,
29918,
1266,
876,
13,
4706,
360,
29918,
2248,
29918,
2378,
29889,
6605,
580,
13,
4706,
1583,
3032,
29928,
29918,
2248,
29918,
2378,
29879,
29889,
5504,
3319,
2098,
29901,
360,
29918,
2248,
29918,
2378,
1800,
13,
13,
4706,
396,
1596,
29898,
29888,
29915,
29916,
29901,
426,
3665,
585,
29918,
9748,
29913,
1495,
13,
4706,
396,
1596,
29898,
29888,
29915,
29893,
29901,
426,
3665,
585,
29918,
705,
5861,
1118,
426,
2083,
29898,
3665,
585,
29918,
705,
5861,
2915,
1495,
13,
4706,
396,
1596,
29898,
29888,
29908,
29874,
29901,
426,
4187,
4630,
29918,
2378,
27195,
13,
4706,
396,
1596,
29898,
29888,
29908,
29909,
29901,
426,
29928,
29918,
5344,
27195,
13,
4706,
396,
1596,
29898,
29888,
29908,
29902,
29901,
426,
29909,
29918,
5344,
27195,
13,
4706,
396,
1881,
580,
13,
13,
1678,
822,
658,
10222,
517,
29918,
27959,
29898,
1311,
29892,
1797,
1125,
13,
4706,
954,
29918,
1639,
1611,
29918,
9748,
353,
1797,
448,
29871,
29896,
13,
4706,
16127,
353,
518,
29900,
29962,
334,
313,
1949,
29918,
1639,
1611,
29918,
9748,
29897,
13,
4706,
16127,
29889,
4397,
29898,
29896,
29897,
13,
4706,
2814,
9030,
29918,
3733,
9222,
353,
7442,
29889,
3733,
9222,
29889,
1397,
9030,
29889,
22988,
9030,
29898,
1111,
8462,
29879,
29897,
13,
4706,
1583,
3032,
3733,
9222,
29879,
29889,
5504,
3319,
2098,
29901,
2814,
9030,
29918,
3733,
9222,
1800,
13,
13,
4706,
658,
10222,
517,
29918,
9748,
353,
2814,
9030,
29918,
3733,
9222,
29889,
672,
440,
2141,
307,
1862,
580,
13,
4706,
658,
10222,
517,
29918,
9748,
353,
7442,
29889,
7851,
29898,
2127,
16234,
29918,
9748,
29892,
29871,
29900,
29892,
448,
29896,
29892,
9685,
29922,
29900,
29897,
13,
4706,
658,
10222,
517,
29918,
9748,
353,
7442,
29889,
4397,
29898,
2127,
16234,
29918,
9748,
29892,
29871,
29896,
29897,
13,
4706,
1583,
3032,
3425,
29878,
1535,
29918,
9748,
29889,
5504,
3319,
2098,
29901,
658,
10222,
517,
29918,
9748,
1800,
13,
13,
4706,
658,
10222,
517,
29918,
705,
5861,
353,
7442,
29889,
2378,
29898,
13,
9651,
518,
29896,
847,
313,
2098,
334,
313,
2098,
448,
29871,
29896,
29897,
334,
313,
1397,
9030,
29918,
3733,
9222,
29898,
29916,
29897,
1068,
29906,
876,
363,
921,
297,
658,
10222,
517,
29918,
9748,
2314,
13,
4706,
1583,
3032,
3425,
29878,
1535,
29918,
705,
5861,
29889,
5504,
3319,
2098,
29901,
658,
10222,
517,
29918,
705,
5861,
1800,
13,
13,
4706,
541,
4630,
29918,
9748,
353,
1583,
29889,
3425,
29878,
1535,
29918,
3149,
29898,
2098,
29892,
5354,
11759,
29900,
29892,
29871,
29896,
2314,
13,
4706,
396,
1596,
29898,
29888,
29915,
29916,
29905,
2396,
426,
4187,
4630,
29918,
9748,
29913,
1495,
13,
4706,
541,
4630,
29918,
2378,
353,
7442,
29889,
3298,
359,
3552,
2098,
29892,
1797,
876,
13,
4706,
541,
4630,
29918,
2378,
14352,
29896,
29892,
584,
29962,
353,
658,
10222,
517,
29918,
705,
5861,
13,
4706,
565,
1797,
1405,
29871,
29906,
29901,
13,
9651,
319,
29918,
798,
353,
313,
2098,
718,
29871,
29896,
29897,
334,
313,
2098,
448,
29871,
29906,
29897,
13,
9651,
319,
29918,
1054,
353,
1797,
334,
313,
2098,
448,
29871,
29906,
29897,
13,
9651,
319,
353,
7442,
29889,
3298,
359,
3552,
29909,
29918,
798,
29892,
319,
29918,
1054,
876,
13,
9651,
289,
353,
7442,
29889,
3298,
359,
29898,
29909,
29918,
798,
29897,
13,
9651,
363,
413,
297,
3464,
29898,
2098,
448,
29871,
29906,
1125,
13,
18884,
396,
1596,
29898,
29888,
29915,
29895,
29901,
426,
29895,
29913,
1495,
13,
18884,
363,
432,
297,
3464,
29898,
2098,
1125,
13,
462,
1678,
396,
1596,
29898,
29888,
29915,
29926,
29901,
426,
29926,
29913,
1495,
13,
462,
1678,
1948,
353,
432,
718,
413,
334,
1797,
13,
462,
1678,
396,
1596,
29898,
29888,
29915,
798,
29901,
426,
798,
29913,
1495,
13,
462,
1678,
363,
474,
297,
3464,
29898,
2098,
448,
29871,
29906,
1125,
13,
462,
4706,
396,
1596,
29898,
29888,
29915,
29875,
29901,
426,
29875,
29913,
1495,
13,
462,
4706,
784,
353,
474,
718,
432,
334,
313,
2098,
448,
29871,
29906,
29897,
13,
462,
4706,
396,
1596,
29898,
29888,
29915,
1054,
29901,
426,
1054,
29913,
1495,
13,
462,
4706,
319,
29961,
798,
29892,
784,
29962,
353,
658,
10222,
517,
29918,
705,
5861,
29961,
29875,
718,
29871,
29896,
29962,
334,
320,
13,
462,
9651,
541,
4630,
29918,
9748,
29961,
29875,
718,
29871,
29896,
29962,
1068,
29895,
13,
462,
4706,
396,
1596,
29898,
29888,
29915,
29909,
29901,
426,
2127,
16234,
29918,
705,
5861,
29961,
29875,
29974,
29896,
29962,
334,
541,
4630,
29918,
9748,
29961,
29875,
29974,
29896,
29962,
1068,
29895,
29913,
1495,
13,
462,
1678,
289,
29961,
798,
29962,
353,
313,
2127,
16234,
29918,
705,
5861,
29961,
29926,
29962,
847,
313,
29895,
718,
29871,
29896,
876,
334,
313,
29896,
448,
541,
4630,
29918,
9748,
29961,
29926,
29962,
13,
462,
462,
462,
1669,
3579,
313,
29895,
718,
29871,
29896,
876,
448,
658,
10222,
517,
29918,
705,
5861,
14352,
29896,
29962,
334,
658,
10222,
517,
29918,
705,
5861,
29961,
29926,
29962,
13,
13,
462,
1678,
396,
1596,
29898,
29888,
29915,
29890,
29901,
426,
29898,
2127,
16234,
29918,
705,
5861,
29961,
29926,
29962,
14571,
29895,
29974,
29896,
876,
16395,
29896,
448,
541,
4630,
29918,
9748,
29961,
29926,
29962,
1068,
29898,
29895,
29974,
29896,
876,
448,
658,
10222,
517,
29918,
705,
5861,
14352,
29896,
14178,
2127,
16234,
29918,
705,
5861,
29961,
29926,
29962,
1012,
29876,
1495,
13,
9651,
628,
29918,
798,
353,
5159,
13,
9651,
363,
474,
29892,
1948,
297,
26985,
29898,
29909,
1125,
13,
18884,
565,
7442,
29889,
2798,
29918,
5464,
9171,
29898,
798,
29897,
1275,
29871,
29900,
29901,
13,
462,
1678,
628,
29918,
798,
29889,
4397,
29898,
29875,
29897,
13,
9651,
319,
353,
7442,
29889,
8143,
29898,
29909,
29892,
628,
29918,
798,
29892,
9685,
29922,
29900,
29897,
13,
9651,
289,
353,
7442,
29889,
8143,
29898,
29890,
29892,
628,
29918,
798,
29892,
9685,
29922,
29900,
29897,
13,
9651,
263,
353,
7442,
29889,
29880,
979,
29887,
29889,
2929,
345,
29898,
29909,
29892,
289,
29897,
13,
9651,
396,
1596,
29898,
29888,
29915,
29909,
29901,
426,
29909,
29913,
1495,
13,
9651,
396,
1596,
29898,
29888,
29915,
29890,
29901,
426,
29890,
29913,
1495,
13,
9651,
396,
1596,
29898,
29888,
29915,
29874,
29901,
426,
29874,
29913,
1495,
13,
9651,
541,
4630,
29918,
2378,
29961,
29896,
13018,
29896,
29892,
584,
29962,
353,
263,
29889,
690,
14443,
29898,
2098,
448,
29871,
29906,
29892,
448,
29896,
29892,
1797,
2433,
29943,
1495,
13,
4706,
1583,
3032,
4187,
4630,
29918,
2378,
29879,
29889,
5504,
3319,
2098,
29901,
541,
4630,
29918,
2378,
1800,
13,
13,
4706,
360,
29918,
1563,
353,
7442,
29889,
2873,
3552,
1949,
29918,
1639,
1611,
29918,
9748,
29892,
29871,
29896,
511,
26688,
29922,
524,
29897,
13,
4706,
360,
29918,
1266,
353,
7442,
29889,
6051,
351,
6278,
29896,
334,
7442,
29889,
2873,
3552,
1949,
29918,
1639,
1611,
29918,
9748,
29892,
10353,
26688,
29922,
524,
876,
13,
4706,
360,
29918,
5344,
353,
7442,
29889,
29882,
1429,
4197,
29928,
29918,
1563,
29892,
360,
29918,
1266,
2314,
13,
4706,
1583,
3032,
29928,
29918,
2922,
11669,
29889,
5504,
3319,
2098,
29901,
360,
29918,
5344,
1800,
13,
13,
4706,
319,
29918,
5344,
353,
1583,
29889,
4187,
4630,
29918,
2378,
29898,
2098,
9601,
29896,
29901,
29892,
584,
29962,
13,
4706,
1583,
3032,
29909,
29918,
2922,
11669,
29889,
5504,
3319,
2098,
29901,
319,
29918,
5344,
1800,
13,
13,
4706,
319,
29918,
2248,
29918,
2378,
353,
7442,
29889,
2378,
29898,
3881,
29898,
29909,
29918,
5344,
29889,
2311,
511,
26688,
29922,
524,
29897,
13,
4706,
1583,
3032,
29909,
29918,
2248,
29918,
2378,
29879,
29889,
5504,
3319,
2098,
29901,
319,
29918,
2248,
29918,
2378,
1800,
13,
13,
4706,
360,
29918,
1949,
29918,
798,
29892,
360,
29918,
1949,
29918,
1054,
353,
360,
29918,
5344,
29889,
12181,
13,
4706,
360,
29918,
5727,
353,
7442,
29889,
2378,
29898,
3881,
29898,
29928,
29918,
1949,
29918,
798,
511,
26688,
29922,
524,
29897,
13,
4706,
360,
29918,
1563,
353,
360,
29918,
5727,
334,
360,
29918,
1949,
29918,
1054,
13,
4706,
360,
29918,
1266,
353,
360,
29918,
5727,
334,
313,
29928,
29918,
1949,
29918,
1054,
718,
29871,
29896,
29897,
718,
29871,
29896,
13,
4706,
360,
29918,
2248,
29918,
2378,
353,
7442,
29889,
535,
29883,
2579,
403,
3552,
29928,
29918,
1563,
29892,
360,
29918,
1266,
876,
13,
4706,
360,
29918,
2248,
29918,
2378,
29889,
6605,
580,
13,
4706,
1583,
3032,
29928,
29918,
2248,
29918,
2378,
29879,
29889,
5504,
3319,
2098,
29901,
360,
29918,
2248,
29918,
2378,
1800,
13,
13,
4706,
396,
1596,
29898,
29888,
29915,
29916,
29901,
426,
2127,
16234,
29918,
9748,
29913,
1495,
13,
4706,
396,
1596,
29898,
29888,
29915,
29893,
29901,
426,
2127,
16234,
29918,
705,
5861,
1118,
426,
2083,
29898,
2127,
16234,
29918,
705,
5861,
2915,
1495,
13,
4706,
396,
1596,
29898,
29888,
29908,
29874,
29901,
426,
4187,
4630,
29918,
2378,
27195,
13,
4706,
396,
1596,
29898,
29888,
29908,
29909,
29901,
426,
29928,
29918,
5344,
27195,
13,
4706,
396,
1596,
29898,
29888,
29908,
29902,
29901,
426,
29909,
29918,
5344,
27195,
13,
4706,
396,
1881,
580,
13,
2
] |
mocket/utils.py | hectorcanto/python-mocket | 0 | 21204 | <reponame>hectorcanto/python-mocket<filename>mocket/utils.py
import binascii
import io
import os
import ssl
from .compat import decode_from_bytes, encode_to_bytes
SSL_PROTOCOL = ssl.PROTOCOL_SSLv23
class MocketSocketCore(io.BytesIO):
def write(self, content):
super(MocketSocketCore, self).write(content)
from mocket import Mocket
if Mocket.r_fd and Mocket.w_fd:
os.write(Mocket.w_fd, content)
def wrap_ssl_socket(
cls,
sock,
context,
keyfile=None,
certfile=None,
server_side=False,
cert_reqs=ssl.CERT_NONE,
ssl_version=SSL_PROTOCOL,
ca_certs=None,
do_handshake_on_connect=True,
suppress_ragged_eofs=True,
ciphers=None,
):
return cls(
sock=sock,
keyfile=keyfile,
certfile=certfile,
server_side=server_side,
cert_reqs=cert_reqs,
ssl_version=ssl_version,
ca_certs=ca_certs,
do_handshake_on_connect=do_handshake_on_connect,
suppress_ragged_eofs=suppress_ragged_eofs,
ciphers=ciphers,
_context=context,
)
def hexdump(binary_string):
r"""
>>> hexdump(b"bar foobar foo") == decode_from_bytes(encode_to_bytes("62 61 72 20 66 6F 6F 62 61 72 20 66 6F 6F"))
True
"""
bs = decode_from_bytes(binascii.hexlify(binary_string).upper())
return " ".join(a + b for a, b in zip(bs[::2], bs[1::2]))
def hexload(string):
r"""
>>> hexload("62 61 72 20 66 6F 6F 62 61 72 20 66 6F 6F") == encode_to_bytes("bar foobar foo")
True
"""
string_no_spaces = "".join(string.split())
return encode_to_bytes(binascii.unhexlify(string_no_spaces))
| [
1,
529,
276,
1112,
420,
29958,
354,
2801,
29883,
5361,
29914,
4691,
29899,
29885,
9749,
29966,
9507,
29958,
29885,
9749,
29914,
13239,
29889,
2272,
13,
5215,
9016,
294,
18869,
13,
5215,
12013,
13,
5215,
2897,
13,
5215,
24250,
13,
13,
3166,
869,
12667,
1053,
21822,
29918,
3166,
29918,
13193,
29892,
19750,
29918,
517,
29918,
13193,
13,
13,
18641,
29918,
8618,
4986,
15032,
353,
24250,
29889,
8618,
4986,
15032,
29918,
18641,
29894,
29906,
29941,
13,
13,
13,
1990,
341,
9749,
11373,
9203,
29898,
601,
29889,
11207,
5971,
1125,
13,
1678,
822,
2436,
29898,
1311,
29892,
2793,
1125,
13,
4706,
2428,
29898,
29924,
9749,
11373,
9203,
29892,
1583,
467,
3539,
29898,
3051,
29897,
13,
13,
4706,
515,
286,
9749,
1053,
341,
9749,
13,
13,
4706,
565,
341,
9749,
29889,
29878,
29918,
11512,
322,
341,
9749,
29889,
29893,
29918,
11512,
29901,
13,
9651,
2897,
29889,
3539,
29898,
29924,
9749,
29889,
29893,
29918,
11512,
29892,
2793,
29897,
13,
13,
13,
1753,
12244,
29918,
16265,
29918,
11514,
29898,
13,
1678,
1067,
29879,
29892,
13,
1678,
577,
384,
29892,
13,
1678,
3030,
29892,
13,
1678,
1820,
1445,
29922,
8516,
29892,
13,
1678,
2284,
1445,
29922,
8516,
29892,
13,
1678,
1923,
29918,
2975,
29922,
8824,
29892,
13,
1678,
2284,
29918,
7971,
29879,
29922,
16265,
29889,
29907,
20161,
29918,
29940,
12413,
29892,
13,
1678,
24250,
29918,
3259,
29922,
18641,
29918,
8618,
4986,
15032,
29892,
13,
1678,
5777,
29918,
6327,
29879,
29922,
8516,
29892,
13,
1678,
437,
29918,
3179,
845,
1296,
29918,
265,
29918,
6915,
29922,
5574,
29892,
13,
1678,
21301,
29918,
1431,
3192,
29918,
29872,
974,
29879,
29922,
5574,
29892,
13,
1678,
4583,
561,
414,
29922,
8516,
29892,
13,
1125,
13,
1678,
736,
1067,
29879,
29898,
13,
4706,
577,
384,
29922,
21852,
29892,
13,
4706,
1820,
1445,
29922,
1989,
1445,
29892,
13,
4706,
2284,
1445,
29922,
6327,
1445,
29892,
13,
4706,
1923,
29918,
2975,
29922,
2974,
29918,
2975,
29892,
13,
4706,
2284,
29918,
7971,
29879,
29922,
6327,
29918,
7971,
29879,
29892,
13,
4706,
24250,
29918,
3259,
29922,
16265,
29918,
3259,
29892,
13,
4706,
5777,
29918,
6327,
29879,
29922,
1113,
29918,
6327,
29879,
29892,
13,
4706,
437,
29918,
3179,
845,
1296,
29918,
265,
29918,
6915,
29922,
1867,
29918,
3179,
845,
1296,
29918,
265,
29918,
6915,
29892,
13,
4706,
21301,
29918,
1431,
3192,
29918,
29872,
974,
29879,
29922,
19303,
1253,
29918,
1431,
3192,
29918,
29872,
974,
29879,
29892,
13,
4706,
4583,
561,
414,
29922,
455,
561,
414,
29892,
13,
4706,
903,
4703,
29922,
4703,
29892,
13,
1678,
1723,
13,
13,
13,
1753,
15090,
15070,
29898,
19541,
29918,
1807,
1125,
13,
1678,
364,
15945,
29908,
13,
1678,
8653,
15090,
15070,
29898,
29890,
29908,
1646,
1701,
22872,
7953,
1159,
1275,
21822,
29918,
3166,
29918,
13193,
29898,
12508,
29918,
517,
29918,
13193,
703,
29953,
29906,
29871,
29953,
29896,
29871,
29955,
29906,
29871,
29906,
29900,
29871,
29953,
29953,
29871,
29953,
29943,
29871,
29953,
29943,
29871,
29953,
29906,
29871,
29953,
29896,
29871,
29955,
29906,
29871,
29906,
29900,
29871,
29953,
29953,
29871,
29953,
29943,
29871,
29953,
29943,
5783,
13,
1678,
5852,
13,
1678,
9995,
13,
1678,
24512,
353,
21822,
29918,
3166,
29918,
13193,
29898,
2109,
294,
18869,
29889,
354,
15524,
1598,
29898,
19541,
29918,
1807,
467,
21064,
3101,
13,
1678,
736,
376,
11393,
7122,
29898,
29874,
718,
289,
363,
263,
29892,
289,
297,
14319,
29898,
5824,
29961,
1057,
29906,
1402,
24512,
29961,
29896,
1057,
29906,
12622,
13,
13,
13,
1753,
15090,
1359,
29898,
1807,
1125,
13,
1678,
364,
15945,
29908,
13,
1678,
8653,
15090,
1359,
703,
29953,
29906,
29871,
29953,
29896,
29871,
29955,
29906,
29871,
29906,
29900,
29871,
29953,
29953,
29871,
29953,
29943,
29871,
29953,
29943,
29871,
29953,
29906,
29871,
29953,
29896,
29871,
29955,
29906,
29871,
29906,
29900,
29871,
29953,
29953,
29871,
29953,
29943,
29871,
29953,
29943,
1159,
1275,
19750,
29918,
517,
29918,
13193,
703,
1646,
1701,
22872,
7953,
1159,
13,
1678,
5852,
13,
1678,
9995,
13,
1678,
1347,
29918,
1217,
29918,
22854,
353,
376,
1642,
7122,
29898,
1807,
29889,
5451,
3101,
13,
1678,
736,
19750,
29918,
517,
29918,
13193,
29898,
2109,
294,
18869,
29889,
348,
354,
15524,
1598,
29898,
1807,
29918,
1217,
29918,
22854,
876,
13,
2
] |
scripts/hyperdrive/widgets.py | timlehr/hyperdrive | 55 | 127829 |
# -----------------------------------------------------------------------------
# This source file has been developed within the scope of the
# Technical Director course at Filmakademie Baden-Wuerttemberg.
# http://technicaldirector.de
#
# Written by <NAME>
# Copyright (c) 2019 Animationsinstitut of <NAME>
# -----------------------------------------------------------------------------
from __future__ import division
from abc import abstractmethod
from random import randint
import logging
import pymel.core as pm
from collections import OrderedDict
from Qt import QtWidgets, QtGui, QtCore
from maya.app.general.mayaMixin import MayaQWidgetDockableMixin
from . import HdPoseNode, utils
from .models import HdCacheTableModel, MayaNodeTableModel
from .utils import logger
log = logger.get_logger(__name__)
class HdManagerWidget(MayaQWidgetDockableMixin, QtWidgets.QWidget):
"""Main Hyperdrive Manager window. Dockable in Maya main window.
"""
def __init__(self, parent, *args, **kwargs):
super(HdManagerWidget, self).__init__(parent, *args, **kwargs)
utils.mayautil.load_hyperdrive_plugin()
self._cache_tab = None
self._whitelist_tab = None
self._blacklist_tab = None
self._controller_widget = None
self._settings_widget = None
self._setup_ui()
self._update_rig_select_cbx()
def _setup_ui(self):
self.setWindowTitle("Hyperdrive")
self._tabwidget = QtWidgets.QTabWidget()
self._layout = QtWidgets.QVBoxLayout()
self._rig_layout = QtWidgets.QHBoxLayout()
self._rig_select_cbx = QtWidgets.QComboBox()
self._rig_select_cbx.currentIndexChanged.connect(self._on_rig_selection_changed)
self._add_rig_btn = QtWidgets.QPushButton("Add Rig")
self._add_rig_btn.clicked.connect(self._on_add_rig)
self._rig_layout.addWidget(self._rig_select_cbx)
self._rig_layout.addWidget(self._add_rig_btn)
self._layout.addLayout(self._rig_layout)
self._layout.addWidget(self._tabwidget)
self.setLayout(self._layout)
self.installEventFilter(self)
def update_ui(self, pose_node=None):
self._tabwidget.clear()
if pose_node:
self._cache_tab = CacheWidget(pose_node)
self._whitelist_tab = WhitelistWidget(pose_node)
self._blacklist_tab = BlacklistWidget(pose_node)
self._controller_widget = CtrlAttrsWidget(pose_node)
self._settings_widget = SettingsWidget(pose_node)
self._tabwidget.addTab(self._cache_tab, "Caches")
self._tabwidget.addTab(self._controller_widget, "Controls")
self._tabwidget.addTab(self._whitelist_tab, "Whitelist")
self._tabwidget.addTab(self._blacklist_tab, "Blacklist")
self._tabwidget.addTab(self._settings_widget, "Settings")
def _on_add_rig(self):
text, accepted = QtWidgets.QInputDialog.getText(self,
"Add Rig to Hyperdrive",
"Please enter a unique ID for your rig. e.g. 'Chewie_v009'",
QtWidgets.QLineEdit.Normal, "")
if accepted:
if not text:
rand_number = "{}".format(randint(0, 999999))
rig_tag = "RigTag_{}".format(rand_number.zfill(6))
else:
rig_tag = text
self._create_pose_node(rig_tag)
def _update_rig_select_cbx(self, active_pose_node=None):
current_pose_node = self._rig_select_cbx.currentData() if self._rig_select_cbx.count() > 0 else None
self._rig_select_cbx.clear()
pose_nodes = HdPoseNode.get_all()
if not pose_nodes:
self._rig_select_cbx.addItem("- No configured rigs -", None)
else:
for pose_node in pose_nodes:
self._rig_select_cbx.addItem(pose_node.rig_tag, pose_node)
if active_pose_node in pose_nodes:
self._rig_select_cbx.setCurrentIndex(pose_nodes.index(active_pose_node))
elif current_pose_node in pose_nodes:
self._rig_select_cbx.setCurrentIndex(pose_nodes.index(current_pose_node))
def _create_pose_node(self, rig_tag):
node = HdPoseNode.create(rig_tag)
self._update_rig_select_cbx(node)
def _on_rig_selection_changed(self, index):
pose_node = self._rig_select_cbx.itemData(index)
self.update_ui(pose_node)
def eventFilter(self, object, event):
catch = [QtCore.QEvent.WindowActivate, QtCore.QEvent.FocusIn]
if event.type() in catch:
pose_node = self._rig_select_cbx.currentData()
if not pose_node or not pose_node.exists():
self._update_rig_select_cbx()
return super(HdManagerWidget, self).eventFilter(object, event)
class CacheWidget(QtWidgets.QWidget):
def __init__(self, pose_node):
super(CacheWidget, self).__init__()
self._pose_node = pose_node
self._setup_ui()
self.update_ui()
def _setup_ui(self):
mapping = [
{"display_attr": "display_name", "header_str": "Node"},
{"display_attr": "display_mem_size", "header_str": "Memory Size",
"edit_attr": "max_cache_mem_size", "editor": SpinboxEditor(min_value=64, max_value=64000)},
]
self._layout = QtWidgets.QVBoxLayout()
self._layout.setContentsMargins(0, 0, 0, 0)
self.setLayout(self._layout)
self._node_table_view = QtWidgets.QTableView()
self._node_table_view.setItemDelegateForColumn(1, mapping[1]["editor"])
self._node_table_model = HdCacheTableModel(self._pose_node, mapping)
self._node_table_view.setModel(self._node_table_model)
self._node_table_view.horizontalHeader().setStretchLastSection(True)
self._node_table_view.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
self._node_table_view.verticalHeader().hide()
self._btn_box = QtWidgets.QHBoxLayout()
self._add_cache_node_btn = QtWidgets.QPushButton("Add Mesh")
self._remove_cache_node_btn = QtWidgets.QPushButton("Remove Mesh")
self._clear_cache_btn = QtWidgets.QPushButton("Clear Cache")
self._add_cache_node_btn.clicked.connect(self._on_btn_clicked)
self._remove_cache_node_btn.clicked.connect(self._on_btn_clicked)
self._clear_cache_btn.clicked.connect(self._on_btn_clicked)
self._btn_box.addWidget(self._add_cache_node_btn)
self._btn_box.addWidget(self._remove_cache_node_btn)
self._btn_box.addWidget(self._clear_cache_btn)
self._layout.addWidget(self._node_table_view)
self._layout.addLayout(self._btn_box)
self.installEventFilter(self)
self.setContentsMargins(0, 0, 0, 0)
def _on_btn_clicked(self):
sender = self.sender()
if sender == self._add_cache_node_btn:
log.debug("Add cache node")
self.add_meshes()
elif sender == self._remove_cache_node_btn:
log.debug("Remove cache node")
selected = self._get_selected_nodes()
for node in selected:
node.delete()
elif sender == self._clear_cache_btn:
log.debug("Clear cache")
selected = self._get_selected_nodes()
if not selected:
log.info("Select at least one cache node to clear.")
for node in selected:
node.clear_cache()
self.update_ui()
def _get_selected_nodes(self):
indexes = self._node_table_view.selectionModel().selectedRows()
return [index.data(role=QtCore.Qt.UserRole) for index in indexes]
def add_meshes(self):
shapes = []
for node in pm.selected():
shape = node
if shape.nodeType() == 'transform':
shape = node.getShape()
if shape.nodeType() == 'mesh':
shapes.append(node)
else:
log.warning("'{}' is not a valid mesh node. Skip.".format(shape))
self._pose_node.add_meshes(*shapes)
def update_ui(self):
self._node_table_model.refresh()
def eventFilter(self, object, event):
catch = [QtCore.QEvent.WindowActivate,
QtCore.QEvent.FocusIn]
if event.type() in catch:
self.update_ui()
return super(CacheWidget, self).eventFilter(object, event)
class NodelistWidget(QtWidgets.QWidget):
_add_btn_text = "Add"
_remove_btn_text = "Remove"
def __init__(self, pose_node):
super(NodelistWidget, self).__init__()
self._pose_node = pose_node
self._setup_ui()
self.update_ui()
def _setup_ui(self):
self._layout = QtWidgets.QVBoxLayout()
self._layout.setContentsMargins(0, 0, 0, 0)
self.setLayout(self._layout)
self._node_table_view = QtWidgets.QTableView()
self._node_table_model = self._get_table_model()
self._node_table_view.setModel(self._node_table_model)
self._node_table_view.horizontalHeader().setStretchLastSection(True)
self._node_table_view.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
self._node_table_view.verticalHeader().hide()
self._btn_box = QtWidgets.QHBoxLayout()
self._add_btn = QtWidgets.QPushButton(self._add_btn_text)
self._remove_btn = QtWidgets.QPushButton(self._remove_btn_text)
self._refresh_btn = QtWidgets.QPushButton("Refresh")
self._add_btn.clicked.connect(self._on_btn_clicked)
self._remove_btn.clicked.connect(self._on_btn_clicked)
self._refresh_btn.clicked.connect(self._on_btn_clicked)
self._btn_box.addWidget(self._add_btn)
self._btn_box.addWidget(self._remove_btn)
self._btn_box.addWidget(self._refresh_btn)
self._layout.addWidget(self._node_table_view)
self._layout.addLayout(self._btn_box)
self.setContentsMargins(0, 0, 0, 0)
def _on_btn_clicked(self):
sender = self.sender()
if sender == self._add_btn:
log.debug("Add Node")
self.add_nodes()
elif sender == self._remove_btn:
log.debug("Remove Node")
nodes = self._get_selected_nodes()
self.remove_nodes(nodes)
elif sender == self._refresh_btn:
log.debug("Refresh UI")
self.update_ui()
def _get_selected_nodes(self):
return [] # TODO: Fix remove. Currently crashes for some index access reason.
"""
indexes = self._node_table_view.selectionModel().selectedRows()
return [index.data(role=QtCore.Qt.UserRole) for index in indexes]"""
@abstractmethod
def _get_table_model(self):
raise NotImplementedError
@abstractmethod
def add_nodes(self):
raise NotImplementedError
@abstractmethod
def remove_nodes(self, selected):
raise NotImplementedError
def update_ui(self):
self._node_table_model.refresh()
def showEvent(self, event):
val = super(NodelistWidget, self).showEvent(event)
self.update_ui()
return val
class CtrlAttrsWidget(NodelistWidget):
_add_btn_text = "Add Control Attrs."
_remove_btn_text = "Remove Attrs."
def _get_table_model(self):
mapping = [
{"display_attr": "name", "header_str": "Controller Attribute Name"}
]
return MayaNodeTableModel(self._pose_node, "get_controller_attrs", mapping)
def add_nodes(self):
for node in pm.selected():
t = node.listAttr(st='translate*', keyable=True)
self._pose_node.add_controller_attrs(*t)
s = node.listAttr(st='scale*', keyable=True)
self._pose_node.add_controller_attrs(*s)
r = node.listAttr(st='rotate*', keyable=True)
self._pose_node.add_controller_attrs(*r)
def remove_nodes(self, selected):
self._pose_node.remove_controller_attrs(*selected)
class WhitelistWidget(NodelistWidget):
_add_btn_text = "Add Node"
_remove_btn_text = "Remove Node"
def _get_table_model(self):
mapping = [
{"display_attr": "name", "header_str": "Node Name"}
]
return MayaNodeTableModel(self._pose_node, "get_whitelisted_nodes", mapping)
def add_nodes(self):
self._pose_node.add_whitelisted_nodes(*pm.selected())
def remove_nodes(self, selected):
self._pose_node.remove_whitelisted_nodes(*selected)
class BlacklistWidget(NodelistWidget):
_add_btn_text = "Add Node"
_remove_btn_text = "Remove Node"
def _get_table_model(self):
mapping = [
{"display_attr": "name", "header_str": "Node Name"}
]
return MayaNodeTableModel(self._pose_node, "get_blacklisted_nodes", mapping)
def add_nodes(self):
self._pose_node.add_blacklisted_nodes(*pm.selected())
def remove_nodes(self, selected):
self._pose_node.remove_blacklisted_nodes(*selected)
class SettingsWidget(QtWidgets.QWidget):
rig_tag_changed = QtCore.Signal(str)
_log_level_mapping = OrderedDict([
("Debug", (3, logging.DEBUG)),
("Info", (2, logging.INFO)),
("Warning", (1, logging.WARNING)),
("Critical", (0, logging.CRITICAL))
])
def __init__(self, pose_node):
super(SettingsWidget, self).__init__()
self._pose_node = pose_node
self._setup_ui()
def _setup_ui(self):
self._layout = QtWidgets.QFormLayout()
self.setLayout(self._layout)
self._rig_tag_edit = QtWidgets.QLineEdit()
self._log_level_cbx = QtWidgets.QComboBox()
self._rig_tag_edit.installEventFilter(self)
self._rig_tag_edit.setText(self._pose_node.rig_tag)
self._log_level_cbx.addItems(self._log_level_mapping.keys())
self._log_level_cbx.currentIndexChanged.connect(self._on_log_level_changed)
self._hd_bypass_chx = QtWidgets.QCheckBox("Disable Hyperdrive for '{}'".format(self._pose_node.rig_tag))
self._hd_bypass_chx.setChecked(not self._pose_node.enabled)
self._hd_bypass_chx.stateChanged.connect(self._on_bypass_changed)
self._layout.addRow("<b>Rig Tag:</b>", self._rig_tag_edit)
self._layout.addRow("<b>Log Level:</b>", self._log_level_cbx)
self._layout.addRow("<b>Bypass:</b>", self._hd_bypass_chx)
def _on_bypass_changed(self, checked):
self._pose_node.enabled = not checked
def _on_log_level_changed(self, index):
current_text = self._log_level_cbx.itemText(index)
data = self._log_level_mapping[current_text]
pm.other.hdLog("-verbosity", data[0])
logger.set_log_level(data[1])
def _on_rig_tag_edited(self):
text = self._rig_tag_edit.text()
if text:
self._pose_node.rig_tag = text
self.rig_tag_changed.emit(text)
def eventFilter(self, object, event):
catch = [QtCore.QEvent.KeyRelease]
if event.type() in catch:
self._on_rig_tag_edited()
return super(SettingsWidget, self).eventFilter(object, event)
class SpinboxEditor(QtWidgets.QStyledItemDelegate):
"""ComboBox model instance editor."""
def __init__(self, **kwargs):
self._display_attr = kwargs.get("display_attr") or "display_str"
self._none_item = kwargs.get("none_valid") if kwargs.get("none_valid") is not None else False
self._deco_pos = kwargs.get("deco_pos", QtWidgets.QStyleOptionViewItem.Right)
self._deco_size = kwargs.get("deco_size", QtCore.QSize(12, 12))
self._min_value = kwargs.get("min_value")
self._max_value = kwargs.get("max_value")
super(SpinboxEditor, self).__init__()
def initStyleOption(self, option, index):
super(SpinboxEditor, self).initStyleOption(option, index)
if self._deco_pos:
option.decorationPosition = self._deco_pos
if self._deco_size:
option.decorationSize = self._deco_size
def createEditor(self, parent, option, index):
widget = QtWidgets.QSpinBox(parent)
if self._min_value:
widget.setMinimum(self._min_value)
if self._max_value:
widget.setMaximum(self._max_value)
return widget
def setEditorData(self, editor, index):
edit_value = index.data(role=QtCore.Qt.EditRole)
editor.setValue(edit_value)
def setModelData(self, editor, model, index):
if not index.isValid():
return False
model.setData(index, editor.value(), role=QtCore.Qt.EditRole)
return True
| [
1,
29871,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
13,
29937,
910,
2752,
934,
756,
1063,
8906,
2629,
278,
6874,
310,
278,
13,
29937,
8364,
936,
15944,
3236,
472,
4643,
557,
18401,
347,
21311,
29899,
29956,
2853,
23079,
29889,
13,
29937,
1732,
597,
21695,
936,
11851,
272,
29889,
311,
13,
29937,
13,
29937,
16849,
841,
491,
529,
5813,
29958,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29929,
24980,
800,
2611,
12937,
310,
529,
5813,
29958,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
13,
13,
3166,
25638,
1053,
9846,
5696,
13,
3166,
4036,
1053,
20088,
524,
13,
5215,
12183,
13,
13,
5215,
282,
962,
295,
29889,
3221,
408,
26354,
13,
13,
3166,
16250,
1053,
8170,
287,
21533,
13,
3166,
14705,
1053,
14705,
8801,
29879,
29892,
14705,
28707,
29892,
14705,
9203,
13,
3166,
1122,
29874,
29889,
932,
29889,
17492,
29889,
29885,
9010,
29924,
861,
262,
1053,
2610,
29874,
29984,
8801,
29928,
1698,
519,
29924,
861,
262,
13,
13,
3166,
869,
1053,
379,
29881,
29925,
852,
4247,
29892,
3667,
29879,
13,
3166,
869,
9794,
1053,
379,
29881,
10408,
3562,
3195,
29892,
2610,
29874,
4247,
3562,
3195,
13,
3166,
869,
13239,
1053,
17927,
13,
13,
1188,
353,
17927,
29889,
657,
29918,
21707,
22168,
978,
1649,
29897,
13,
13,
13,
1990,
379,
29881,
3260,
8801,
29898,
29924,
9010,
29984,
8801,
29928,
1698,
519,
29924,
861,
262,
29892,
14705,
8801,
29879,
29889,
29984,
8801,
1125,
13,
1678,
9995,
6330,
26078,
21594,
15629,
3474,
29889,
360,
1698,
519,
297,
2610,
29874,
1667,
3474,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3847,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
29950,
29881,
3260,
8801,
29892,
1583,
467,
1649,
2344,
12035,
3560,
29892,
334,
5085,
29892,
3579,
19290,
29897,
13,
13,
4706,
3667,
29879,
29889,
13029,
1300,
309,
29889,
1359,
29918,
24947,
21594,
29918,
8582,
580,
13,
13,
4706,
1583,
3032,
8173,
29918,
3891,
353,
6213,
13,
4706,
1583,
3032,
1332,
7454,
391,
29918,
3891,
353,
6213,
13,
4706,
1583,
3032,
8517,
1761,
29918,
3891,
353,
6213,
13,
4706,
1583,
3032,
8299,
29918,
8030,
353,
6213,
13,
4706,
1583,
3032,
11027,
29918,
8030,
353,
6213,
13,
13,
4706,
1583,
3032,
14669,
29918,
1481,
580,
13,
4706,
1583,
3032,
5504,
29918,
8966,
29918,
2622,
29918,
10702,
29916,
580,
13,
13,
1678,
822,
903,
14669,
29918,
1481,
29898,
1311,
1125,
13,
4706,
1583,
29889,
842,
5907,
7030,
703,
26322,
546,
21594,
1159,
13,
4706,
1583,
3032,
3891,
8030,
353,
14705,
8801,
29879,
29889,
29984,
8863,
8801,
580,
13,
4706,
1583,
3032,
2680,
353,
14705,
8801,
29879,
29889,
29984,
29963,
3313,
3453,
580,
13,
4706,
1583,
3032,
8966,
29918,
2680,
353,
14705,
8801,
29879,
29889,
29984,
29950,
3313,
3453,
580,
13,
13,
4706,
1583,
3032,
8966,
29918,
2622,
29918,
10702,
29916,
353,
14705,
8801,
29879,
29889,
29984,
26628,
580,
13,
4706,
1583,
3032,
8966,
29918,
2622,
29918,
10702,
29916,
29889,
3784,
3220,
7590,
29889,
6915,
29898,
1311,
3032,
265,
29918,
8966,
29918,
21731,
29918,
15033,
29897,
13,
4706,
1583,
3032,
1202,
29918,
8966,
29918,
7290,
353,
14705,
8801,
29879,
29889,
29984,
27031,
3125,
703,
2528,
390,
335,
1159,
13,
4706,
1583,
3032,
1202,
29918,
8966,
29918,
7290,
29889,
3808,
287,
29889,
6915,
29898,
1311,
3032,
265,
29918,
1202,
29918,
8966,
29897,
13,
13,
4706,
1583,
3032,
8966,
29918,
2680,
29889,
1202,
8801,
29898,
1311,
3032,
8966,
29918,
2622,
29918,
10702,
29916,
29897,
13,
4706,
1583,
3032,
8966,
29918,
2680,
29889,
1202,
8801,
29898,
1311,
3032,
1202,
29918,
8966,
29918,
7290,
29897,
13,
13,
4706,
1583,
3032,
2680,
29889,
1202,
3453,
29898,
1311,
3032,
8966,
29918,
2680,
29897,
13,
4706,
1583,
3032,
2680,
29889,
1202,
8801,
29898,
1311,
3032,
3891,
8030,
29897,
13,
4706,
1583,
29889,
842,
3453,
29898,
1311,
3032,
2680,
29897,
13,
4706,
1583,
29889,
6252,
2624,
5072,
29898,
1311,
29897,
13,
13,
1678,
822,
2767,
29918,
1481,
29898,
1311,
29892,
18593,
29918,
3177,
29922,
8516,
1125,
13,
4706,
1583,
3032,
3891,
8030,
29889,
8551,
580,
13,
4706,
565,
18593,
29918,
3177,
29901,
13,
9651,
1583,
3032,
8173,
29918,
3891,
353,
28540,
8801,
29898,
4220,
29918,
3177,
29897,
13,
9651,
1583,
3032,
1332,
7454,
391,
29918,
3891,
353,
806,
7454,
391,
8801,
29898,
4220,
29918,
3177,
29897,
13,
9651,
1583,
3032,
8517,
1761,
29918,
3891,
353,
6054,
1761,
8801,
29898,
4220,
29918,
3177,
29897,
13,
9651,
1583,
3032,
8299,
29918,
8030,
353,
315,
11742,
25098,
29879,
8801,
29898,
4220,
29918,
3177,
29897,
13,
9651,
1583,
3032,
11027,
29918,
8030,
353,
19215,
8801,
29898,
4220,
29918,
3177,
29897,
13,
13,
9651,
1583,
3032,
3891,
8030,
29889,
1202,
8863,
29898,
1311,
3032,
8173,
29918,
3891,
29892,
376,
29907,
14520,
1159,
13,
9651,
1583,
3032,
3891,
8030,
29889,
1202,
8863,
29898,
1311,
3032,
8299,
29918,
8030,
29892,
376,
17825,
1159,
13,
9651,
1583,
3032,
3891,
8030,
29889,
1202,
8863,
29898,
1311,
3032,
1332,
7454,
391,
29918,
3891,
29892,
376,
8809,
7454,
391,
1159,
13,
9651,
1583,
3032,
3891,
8030,
29889,
1202,
8863,
29898,
1311,
3032,
8517,
1761,
29918,
3891,
29892,
376,
18700,
1761,
1159,
13,
9651,
1583,
3032,
3891,
8030,
29889,
1202,
8863,
29898,
1311,
3032,
11027,
29918,
8030,
29892,
376,
9585,
1159,
13,
13,
1678,
822,
903,
265,
29918,
1202,
29918,
8966,
29898,
1311,
1125,
13,
4706,
1426,
29892,
9259,
353,
14705,
8801,
29879,
29889,
29984,
4290,
7647,
29889,
18516,
29898,
1311,
29892,
13,
462,
462,
462,
4706,
376,
2528,
390,
335,
304,
26078,
21594,
613,
13,
462,
462,
462,
4706,
376,
12148,
3896,
263,
5412,
3553,
363,
596,
12912,
29889,
321,
29889,
29887,
29889,
525,
26856,
7804,
29918,
29894,
29900,
29900,
29929,
29915,
613,
13,
462,
462,
462,
4706,
14705,
8801,
29879,
29889,
2239,
457,
6103,
29889,
19077,
29892,
20569,
13,
4706,
565,
9259,
29901,
13,
9651,
565,
451,
1426,
29901,
13,
18884,
20088,
29918,
4537,
353,
376,
8875,
1642,
4830,
29898,
9502,
524,
29898,
29900,
29892,
29871,
29929,
29929,
29929,
29929,
29929,
29929,
876,
13,
18884,
12912,
29918,
4039,
353,
376,
29934,
335,
8176,
648,
29913,
1642,
4830,
29898,
9502,
29918,
4537,
29889,
29920,
5589,
29898,
29953,
876,
13,
9651,
1683,
29901,
13,
18884,
12912,
29918,
4039,
353,
1426,
13,
9651,
1583,
3032,
3258,
29918,
4220,
29918,
3177,
29898,
8966,
29918,
4039,
29897,
13,
13,
1678,
822,
903,
5504,
29918,
8966,
29918,
2622,
29918,
10702,
29916,
29898,
1311,
29892,
6136,
29918,
4220,
29918,
3177,
29922,
8516,
1125,
13,
13,
4706,
1857,
29918,
4220,
29918,
3177,
353,
1583,
3032,
8966,
29918,
2622,
29918,
10702,
29916,
29889,
3784,
1469,
580,
565,
1583,
3032,
8966,
29918,
2622,
29918,
10702,
29916,
29889,
2798,
580,
1405,
29871,
29900,
1683,
6213,
13,
13,
4706,
1583,
3032,
8966,
29918,
2622,
29918,
10702,
29916,
29889,
8551,
580,
13,
13,
4706,
18593,
29918,
18010,
353,
379,
29881,
29925,
852,
4247,
29889,
657,
29918,
497,
580,
13,
13,
4706,
565,
451,
18593,
29918,
18010,
29901,
13,
9651,
1583,
3032,
8966,
29918,
2622,
29918,
10702,
29916,
29889,
1202,
2001,
703,
29899,
1939,
13252,
12912,
29879,
448,
613,
6213,
29897,
13,
4706,
1683,
29901,
13,
9651,
363,
18593,
29918,
3177,
297,
18593,
29918,
18010,
29901,
13,
18884,
1583,
3032,
8966,
29918,
2622,
29918,
10702,
29916,
29889,
1202,
2001,
29898,
4220,
29918,
3177,
29889,
8966,
29918,
4039,
29892,
18593,
29918,
3177,
29897,
13,
13,
9651,
565,
6136,
29918,
4220,
29918,
3177,
297,
18593,
29918,
18010,
29901,
13,
18884,
1583,
3032,
8966,
29918,
2622,
29918,
10702,
29916,
29889,
842,
7583,
3220,
29898,
4220,
29918,
18010,
29889,
2248,
29898,
4925,
29918,
4220,
29918,
3177,
876,
13,
9651,
25342,
1857,
29918,
4220,
29918,
3177,
297,
18593,
29918,
18010,
29901,
13,
18884,
1583,
3032,
8966,
29918,
2622,
29918,
10702,
29916,
29889,
842,
7583,
3220,
29898,
4220,
29918,
18010,
29889,
2248,
29898,
3784,
29918,
4220,
29918,
3177,
876,
13,
13,
1678,
822,
903,
3258,
29918,
4220,
29918,
3177,
29898,
1311,
29892,
12912,
29918,
4039,
1125,
13,
4706,
2943,
353,
379,
29881,
29925,
852,
4247,
29889,
3258,
29898,
8966,
29918,
4039,
29897,
13,
4706,
1583,
3032,
5504,
29918,
8966,
29918,
2622,
29918,
10702,
29916,
29898,
3177,
29897,
13,
13,
1678,
822,
903,
265,
29918,
8966,
29918,
21731,
29918,
15033,
29898,
1311,
29892,
2380,
1125,
13,
4706,
18593,
29918,
3177,
353,
1583,
3032,
8966,
29918,
2622,
29918,
10702,
29916,
29889,
667,
1469,
29898,
2248,
29897,
13,
4706,
1583,
29889,
5504,
29918,
1481,
29898,
4220,
29918,
3177,
29897,
13,
13,
1678,
822,
1741,
5072,
29898,
1311,
29892,
1203,
29892,
1741,
1125,
13,
4706,
4380,
353,
518,
17303,
9203,
29889,
29984,
2624,
29889,
5907,
21786,
403,
29892,
14705,
9203,
29889,
29984,
2624,
29889,
20560,
797,
29962,
13,
4706,
565,
1741,
29889,
1853,
580,
297,
4380,
29901,
13,
9651,
18593,
29918,
3177,
353,
1583,
3032,
8966,
29918,
2622,
29918,
10702,
29916,
29889,
3784,
1469,
580,
13,
9651,
565,
451,
18593,
29918,
3177,
470,
451,
18593,
29918,
3177,
29889,
9933,
7295,
13,
18884,
1583,
3032,
5504,
29918,
8966,
29918,
2622,
29918,
10702,
29916,
580,
13,
4706,
736,
2428,
29898,
29950,
29881,
3260,
8801,
29892,
1583,
467,
3696,
5072,
29898,
3318,
29892,
1741,
29897,
13,
13,
13,
1990,
28540,
8801,
29898,
17303,
8801,
29879,
29889,
29984,
8801,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
18593,
29918,
3177,
1125,
13,
4706,
2428,
29898,
10408,
8801,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
3032,
4220,
29918,
3177,
353,
18593,
29918,
3177,
13,
4706,
1583,
3032,
14669,
29918,
1481,
580,
13,
4706,
1583,
29889,
5504,
29918,
1481,
580,
13,
13,
1678,
822,
903,
14669,
29918,
1481,
29898,
1311,
1125,
13,
4706,
10417,
353,
518,
13,
9651,
8853,
4990,
29918,
5552,
1115,
376,
4990,
29918,
978,
613,
376,
6672,
29918,
710,
1115,
376,
4247,
10758,
13,
9651,
8853,
4990,
29918,
5552,
1115,
376,
4990,
29918,
6954,
29918,
2311,
613,
376,
6672,
29918,
710,
1115,
376,
16015,
21179,
613,
13,
632,
376,
5628,
29918,
5552,
1115,
376,
3317,
29918,
8173,
29918,
6954,
29918,
2311,
613,
376,
15204,
1115,
1706,
262,
1884,
15280,
29898,
1195,
29918,
1767,
29922,
29953,
29946,
29892,
4236,
29918,
1767,
29922,
29953,
29946,
29900,
29900,
29900,
19230,
13,
4706,
4514,
13,
13,
4706,
1583,
3032,
2680,
353,
14705,
8801,
29879,
29889,
29984,
29963,
3313,
3453,
580,
13,
4706,
1583,
3032,
2680,
29889,
842,
21002,
29924,
1191,
1144,
29898,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29897,
13,
4706,
1583,
29889,
842,
3453,
29898,
1311,
3032,
2680,
29897,
13,
13,
4706,
1583,
3032,
3177,
29918,
2371,
29918,
1493,
353,
14705,
8801,
29879,
29889,
29984,
3562,
1043,
580,
13,
4706,
1583,
3032,
3177,
29918,
2371,
29918,
1493,
29889,
842,
2001,
11494,
2831,
4409,
29898,
29896,
29892,
10417,
29961,
29896,
29962,
3366,
15204,
20068,
13,
13,
4706,
1583,
3032,
3177,
29918,
2371,
29918,
4299,
353,
379,
29881,
10408,
3562,
3195,
29898,
1311,
3032,
4220,
29918,
3177,
29892,
10417,
29897,
13,
4706,
1583,
3032,
3177,
29918,
2371,
29918,
1493,
29889,
842,
3195,
29898,
1311,
3032,
3177,
29918,
2371,
29918,
4299,
29897,
13,
4706,
1583,
3032,
3177,
29918,
2371,
29918,
1493,
29889,
22672,
7850,
2141,
842,
855,
10301,
8897,
13438,
29898,
5574,
29897,
13,
4706,
1583,
3032,
3177,
29918,
2371,
29918,
1493,
29889,
842,
15097,
28100,
29898,
17303,
8801,
29879,
29889,
29984,
9118,
2001,
1043,
29889,
3549,
10661,
29897,
13,
4706,
1583,
3032,
3177,
29918,
2371,
29918,
1493,
29889,
18575,
7850,
2141,
11458,
580,
13,
13,
4706,
1583,
3032,
7290,
29918,
1884,
353,
14705,
8801,
29879,
29889,
29984,
29950,
3313,
3453,
580,
13,
4706,
1583,
3032,
1202,
29918,
8173,
29918,
3177,
29918,
7290,
353,
14705,
8801,
29879,
29889,
29984,
27031,
3125,
703,
2528,
341,
12094,
1159,
13,
4706,
1583,
3032,
5992,
29918,
8173,
29918,
3177,
29918,
7290,
353,
14705,
8801,
29879,
29889,
29984,
27031,
3125,
703,
15941,
341,
12094,
1159,
13,
4706,
1583,
3032,
8551,
29918,
8173,
29918,
7290,
353,
14705,
8801,
29879,
29889,
29984,
27031,
3125,
703,
18759,
28540,
1159,
13,
4706,
1583,
3032,
1202,
29918,
8173,
29918,
3177,
29918,
7290,
29889,
3808,
287,
29889,
6915,
29898,
1311,
3032,
265,
29918,
7290,
29918,
3808,
287,
29897,
13,
4706,
1583,
3032,
5992,
29918,
8173,
29918,
3177,
29918,
7290,
29889,
3808,
287,
29889,
6915,
29898,
1311,
3032,
265,
29918,
7290,
29918,
3808,
287,
29897,
13,
4706,
1583,
3032,
8551,
29918,
8173,
29918,
7290,
29889,
3808,
287,
29889,
6915,
29898,
1311,
3032,
265,
29918,
7290,
29918,
3808,
287,
29897,
13,
13,
4706,
1583,
3032,
7290,
29918,
1884,
29889,
1202,
8801,
29898,
1311,
3032,
1202,
29918,
8173,
29918,
3177,
29918,
7290,
29897,
13,
4706,
1583,
3032,
7290,
29918,
1884,
29889,
1202,
8801,
29898,
1311,
3032,
5992,
29918,
8173,
29918,
3177,
29918,
7290,
29897,
13,
4706,
1583,
3032,
7290,
29918,
1884,
29889,
1202,
8801,
29898,
1311,
3032,
8551,
29918,
8173,
29918,
7290,
29897,
13,
13,
4706,
1583,
3032,
2680,
29889,
1202,
8801,
29898,
1311,
3032,
3177,
29918,
2371,
29918,
1493,
29897,
13,
4706,
1583,
3032,
2680,
29889,
1202,
3453,
29898,
1311,
3032,
7290,
29918,
1884,
29897,
13,
13,
4706,
1583,
29889,
6252,
2624,
5072,
29898,
1311,
29897,
13,
4706,
1583,
29889,
842,
21002,
29924,
1191,
1144,
29898,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29897,
13,
13,
1678,
822,
903,
265,
29918,
7290,
29918,
3808,
287,
29898,
1311,
1125,
13,
4706,
10004,
353,
1583,
29889,
15452,
580,
13,
4706,
565,
10004,
1275,
1583,
3032,
1202,
29918,
8173,
29918,
3177,
29918,
7290,
29901,
13,
9651,
1480,
29889,
8382,
703,
2528,
7090,
2943,
1159,
13,
9651,
1583,
29889,
1202,
29918,
4467,
13244,
580,
13,
4706,
25342,
10004,
1275,
1583,
3032,
5992,
29918,
8173,
29918,
3177,
29918,
7290,
29901,
13,
9651,
1480,
29889,
8382,
703,
15941,
7090,
2943,
1159,
13,
9651,
4629,
353,
1583,
3032,
657,
29918,
8391,
29918,
18010,
580,
13,
9651,
363,
2943,
297,
4629,
29901,
13,
18884,
2943,
29889,
8143,
580,
13,
4706,
25342,
10004,
1275,
1583,
3032,
8551,
29918,
8173,
29918,
7290,
29901,
13,
9651,
1480,
29889,
8382,
703,
18759,
7090,
1159,
13,
9651,
4629,
353,
1583,
3032,
657,
29918,
8391,
29918,
18010,
580,
13,
9651,
565,
451,
4629,
29901,
13,
18884,
1480,
29889,
3888,
703,
3549,
472,
3203,
697,
7090,
2943,
304,
2821,
23157,
13,
9651,
363,
2943,
297,
4629,
29901,
13,
18884,
2943,
29889,
8551,
29918,
8173,
580,
13,
4706,
1583,
29889,
5504,
29918,
1481,
580,
13,
13,
1678,
822,
903,
657,
29918,
8391,
29918,
18010,
29898,
1311,
1125,
13,
4706,
18111,
353,
1583,
3032,
3177,
29918,
2371,
29918,
1493,
29889,
21731,
3195,
2141,
8391,
10661,
580,
13,
4706,
736,
518,
2248,
29889,
1272,
29898,
12154,
29922,
17303,
9203,
29889,
17303,
29889,
2659,
16727,
29897,
363,
2380,
297,
18111,
29962,
13,
13,
1678,
822,
788,
29918,
4467,
13244,
29898,
1311,
1125,
13,
4706,
25834,
353,
5159,
13,
4706,
363,
2943,
297,
26354,
29889,
8391,
7295,
13,
9651,
8267,
353,
2943,
13,
9651,
565,
8267,
29889,
3177,
1542,
580,
1275,
525,
9067,
2396,
13,
18884,
8267,
353,
2943,
29889,
657,
24111,
580,
13,
9651,
565,
8267,
29889,
3177,
1542,
580,
1275,
525,
4467,
29882,
2396,
13,
18884,
25834,
29889,
4397,
29898,
3177,
29897,
13,
9651,
1683,
29901,
13,
18884,
1480,
29889,
27392,
703,
29915,
8875,
29915,
338,
451,
263,
2854,
27716,
2943,
29889,
4971,
666,
1213,
29889,
4830,
29898,
12181,
876,
13,
4706,
1583,
3032,
4220,
29918,
3177,
29889,
1202,
29918,
4467,
13244,
10456,
845,
11603,
29897,
13,
13,
1678,
822,
2767,
29918,
1481,
29898,
1311,
1125,
13,
4706,
1583,
3032,
3177,
29918,
2371,
29918,
4299,
29889,
22379,
580,
13,
13,
1678,
822,
1741,
5072,
29898,
1311,
29892,
1203,
29892,
1741,
1125,
13,
4706,
4380,
353,
518,
17303,
9203,
29889,
29984,
2624,
29889,
5907,
21786,
403,
29892,
13,
462,
14705,
9203,
29889,
29984,
2624,
29889,
20560,
797,
29962,
13,
4706,
565,
1741,
29889,
1853,
580,
297,
4380,
29901,
13,
9651,
1583,
29889,
5504,
29918,
1481,
580,
13,
4706,
736,
2428,
29898,
10408,
8801,
29892,
1583,
467,
3696,
5072,
29898,
3318,
29892,
1741,
29897,
13,
13,
13,
1990,
405,
27224,
391,
8801,
29898,
17303,
8801,
29879,
29889,
29984,
8801,
1125,
13,
13,
1678,
903,
1202,
29918,
7290,
29918,
726,
353,
376,
2528,
29908,
13,
1678,
903,
5992,
29918,
7290,
29918,
726,
353,
376,
15941,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
18593,
29918,
3177,
1125,
13,
4706,
2428,
29898,
29940,
27224,
391,
8801,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
3032,
4220,
29918,
3177,
353,
18593,
29918,
3177,
13,
4706,
1583,
3032,
14669,
29918,
1481,
580,
13,
4706,
1583,
29889,
5504,
29918,
1481,
580,
13,
13,
1678,
822,
903,
14669,
29918,
1481,
29898,
1311,
1125,
13,
4706,
1583,
3032,
2680,
353,
14705,
8801,
29879,
29889,
29984,
29963,
3313,
3453,
580,
13,
4706,
1583,
3032,
2680,
29889,
842,
21002,
29924,
1191,
1144,
29898,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29897,
13,
4706,
1583,
29889,
842,
3453,
29898,
1311,
3032,
2680,
29897,
13,
13,
4706,
1583,
3032,
3177,
29918,
2371,
29918,
1493,
353,
14705,
8801,
29879,
29889,
29984,
3562,
1043,
580,
13,
13,
4706,
1583,
3032,
3177,
29918,
2371,
29918,
4299,
353,
1583,
3032,
657,
29918,
2371,
29918,
4299,
580,
13,
4706,
1583,
3032,
3177,
29918,
2371,
29918,
1493,
29889,
842,
3195,
29898,
1311,
3032,
3177,
29918,
2371,
29918,
4299,
29897,
13,
4706,
1583,
3032,
3177,
29918,
2371,
29918,
1493,
29889,
22672,
7850,
2141,
842,
855,
10301,
8897,
13438,
29898,
5574,
29897,
13,
4706,
1583,
3032,
3177,
29918,
2371,
29918,
1493,
29889,
842,
15097,
28100,
29898,
17303,
8801,
29879,
29889,
29984,
9118,
2001,
1043,
29889,
3549,
10661,
29897,
13,
4706,
1583,
3032,
3177,
29918,
2371,
29918,
1493,
29889,
18575,
7850,
2141,
11458,
580,
13,
13,
4706,
1583,
3032,
7290,
29918,
1884,
353,
14705,
8801,
29879,
29889,
29984,
29950,
3313,
3453,
580,
13,
4706,
1583,
3032,
1202,
29918,
7290,
353,
14705,
8801,
29879,
29889,
29984,
27031,
3125,
29898,
1311,
3032,
1202,
29918,
7290,
29918,
726,
29897,
13,
4706,
1583,
3032,
5992,
29918,
7290,
353,
14705,
8801,
29879,
29889,
29984,
27031,
3125,
29898,
1311,
3032,
5992,
29918,
7290,
29918,
726,
29897,
13,
4706,
1583,
3032,
22379,
29918,
7290,
353,
14705,
8801,
29879,
29889,
29984,
27031,
3125,
703,
27132,
1159,
13,
13,
4706,
1583,
3032,
1202,
29918,
7290,
29889,
3808,
287,
29889,
6915,
29898,
1311,
3032,
265,
29918,
7290,
29918,
3808,
287,
29897,
13,
4706,
1583,
3032,
5992,
29918,
7290,
29889,
3808,
287,
29889,
6915,
29898,
1311,
3032,
265,
29918,
7290,
29918,
3808,
287,
29897,
13,
4706,
1583,
3032,
22379,
29918,
7290,
29889,
3808,
287,
29889,
6915,
29898,
1311,
3032,
265,
29918,
7290,
29918,
3808,
287,
29897,
13,
13,
4706,
1583,
3032,
7290,
29918,
1884,
29889,
1202,
8801,
29898,
1311,
3032,
1202,
29918,
7290,
29897,
13,
4706,
1583,
3032,
7290,
29918,
1884,
29889,
1202,
8801,
29898,
1311,
3032,
5992,
29918,
7290,
29897,
13,
4706,
1583,
3032,
7290,
29918,
1884,
29889,
1202,
8801,
29898,
1311,
3032,
22379,
29918,
7290,
29897,
13,
13,
4706,
1583,
3032,
2680,
29889,
1202,
8801,
29898,
1311,
3032,
3177,
29918,
2371,
29918,
1493,
29897,
13,
4706,
1583,
3032,
2680,
29889,
1202,
3453,
29898,
1311,
3032,
7290,
29918,
1884,
29897,
13,
13,
4706,
1583,
29889,
842,
21002,
29924,
1191,
1144,
29898,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29897,
13,
13,
1678,
822,
903,
265,
29918,
7290,
29918,
3808,
287,
29898,
1311,
1125,
13,
4706,
10004,
353,
1583,
29889,
15452,
580,
13,
4706,
565,
10004,
1275,
1583,
3032,
1202,
29918,
7290,
29901,
13,
9651,
1480,
29889,
8382,
703,
2528,
9071,
1159,
13,
9651,
1583,
29889,
1202,
29918,
18010,
580,
13,
4706,
25342,
10004,
1275,
1583,
3032,
5992,
29918,
7290,
29901,
13,
9651,
1480,
29889,
8382,
703,
15941,
9071,
1159,
13,
9651,
7573,
353,
1583,
3032,
657,
29918,
8391,
29918,
18010,
580,
13,
9651,
1583,
29889,
5992,
29918,
18010,
29898,
18010,
29897,
13,
4706,
25342,
10004,
1275,
1583,
3032,
22379,
29918,
7290,
29901,
13,
9651,
1480,
29889,
8382,
703,
27132,
3740,
1159,
13,
4706,
1583,
29889,
5504,
29918,
1481,
580,
13,
13,
1678,
822,
903,
657,
29918,
8391,
29918,
18010,
29898,
1311,
1125,
13,
4706,
736,
5159,
396,
14402,
29901,
24778,
3349,
29889,
15447,
21985,
363,
777,
2380,
2130,
2769,
29889,
13,
4706,
9995,
13,
4706,
18111,
353,
1583,
3032,
3177,
29918,
2371,
29918,
1493,
29889,
21731,
3195,
2141,
8391,
10661,
580,
13,
4706,
736,
518,
2248,
29889,
1272,
29898,
12154,
29922,
17303,
9203,
29889,
17303,
29889,
2659,
16727,
29897,
363,
2380,
297,
18111,
29962,
15945,
29908,
13,
13,
1678,
732,
16595,
5696,
13,
1678,
822,
903,
657,
29918,
2371,
29918,
4299,
29898,
1311,
1125,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
13,
13,
1678,
732,
16595,
5696,
13,
1678,
822,
788,
29918,
18010,
29898,
1311,
1125,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
13,
13,
1678,
732,
16595,
5696,
13,
1678,
822,
3349,
29918,
18010,
29898,
1311,
29892,
4629,
1125,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
13,
13,
1678,
822,
2767,
29918,
1481,
29898,
1311,
1125,
13,
4706,
1583,
3032,
3177,
29918,
2371,
29918,
4299,
29889,
22379,
580,
13,
13,
1678,
822,
1510,
2624,
29898,
1311,
29892,
1741,
1125,
13,
4706,
659,
353,
2428,
29898,
29940,
27224,
391,
8801,
29892,
1583,
467,
4294,
2624,
29898,
3696,
29897,
13,
4706,
1583,
29889,
5504,
29918,
1481,
580,
13,
4706,
736,
659,
13,
13,
13,
1990,
315,
11742,
25098,
29879,
8801,
29898,
29940,
27224,
391,
8801,
1125,
13,
1678,
903,
1202,
29918,
7290,
29918,
726,
353,
376,
2528,
11264,
2180,
509,
29879,
1213,
13,
1678,
903,
5992,
29918,
7290,
29918,
726,
353,
376,
15941,
2180,
509,
29879,
1213,
13,
13,
1678,
822,
903,
657,
29918,
2371,
29918,
4299,
29898,
1311,
1125,
13,
4706,
10417,
353,
518,
13,
9651,
8853,
4990,
29918,
5552,
1115,
376,
978,
613,
376,
6672,
29918,
710,
1115,
376,
2956,
23833,
4408,
9092,
13,
4706,
4514,
13,
4706,
736,
2610,
29874,
4247,
3562,
3195,
29898,
1311,
3032,
4220,
29918,
3177,
29892,
376,
657,
29918,
8299,
29918,
5552,
29879,
613,
10417,
29897,
13,
13,
1678,
822,
788,
29918,
18010,
29898,
1311,
1125,
13,
4706,
363,
2943,
297,
26354,
29889,
8391,
7295,
13,
9651,
260,
353,
2943,
29889,
1761,
25098,
29898,
303,
2433,
21652,
29930,
742,
1820,
519,
29922,
5574,
29897,
13,
9651,
1583,
3032,
4220,
29918,
3177,
29889,
1202,
29918,
8299,
29918,
5552,
29879,
10456,
29873,
29897,
13,
9651,
269,
353,
2943,
29889,
1761,
25098,
29898,
303,
2433,
7052,
29930,
742,
1820,
519,
29922,
5574,
29897,
13,
9651,
1583,
3032,
4220,
29918,
3177,
29889,
1202,
29918,
8299,
29918,
5552,
29879,
10456,
29879,
29897,
13,
9651,
364,
353,
2943,
29889,
1761,
25098,
29898,
303,
2433,
23361,
29930,
742,
1820,
519,
29922,
5574,
29897,
13,
9651,
1583,
3032,
4220,
29918,
3177,
29889,
1202,
29918,
8299,
29918,
5552,
29879,
10456,
29878,
29897,
13,
13,
1678,
822,
3349,
29918,
18010,
29898,
1311,
29892,
4629,
1125,
13,
4706,
1583,
3032,
4220,
29918,
3177,
29889,
5992,
29918,
8299,
29918,
5552,
29879,
10456,
8391,
29897,
13,
13,
13,
1990,
806,
7454,
391,
8801,
29898,
29940,
27224,
391,
8801,
1125,
13,
1678,
903,
1202,
29918,
7290,
29918,
726,
353,
376,
2528,
9071,
29908,
13,
1678,
903,
5992,
29918,
7290,
29918,
726,
353,
376,
15941,
9071,
29908,
13,
13,
1678,
822,
903,
657,
29918,
2371,
29918,
4299,
29898,
1311,
1125,
13,
4706,
10417,
353,
518,
13,
9651,
8853,
4990,
29918,
5552,
1115,
376,
978,
613,
376,
6672,
29918,
710,
1115,
376,
4247,
4408,
9092,
13,
4706,
4514,
13,
4706,
736,
2610,
29874,
4247,
3562,
3195,
29898,
1311,
3032,
4220,
29918,
3177,
29892,
376,
657,
29918,
1332,
7454,
12652,
29918,
18010,
613,
10417,
29897,
13,
13,
1678,
822,
788,
29918,
18010,
29898,
1311,
1125,
13,
4706,
1583,
3032,
4220,
29918,
3177,
29889,
1202,
29918,
1332,
7454,
12652,
29918,
18010,
10456,
3358,
29889,
8391,
3101,
13,
13,
1678,
822,
3349,
29918,
18010,
29898,
1311,
29892,
4629,
1125,
13,
4706,
1583,
3032,
4220,
29918,
3177,
29889,
5992,
29918,
1332,
7454,
12652,
29918,
18010,
10456,
8391,
29897,
13,
13,
13,
1990,
6054,
1761,
8801,
29898,
29940,
27224,
391,
8801,
1125,
13,
1678,
903,
1202,
29918,
7290,
29918,
726,
353,
376,
2528,
9071,
29908,
13,
1678,
903,
5992,
29918,
7290,
29918,
726,
353,
376,
15941,
9071,
29908,
13,
13,
1678,
822,
903,
657,
29918,
2371,
29918,
4299,
29898,
1311,
1125,
13,
4706,
10417,
353,
518,
13,
9651,
8853,
4990,
29918,
5552,
1115,
376,
978,
613,
376,
6672,
29918,
710,
1115,
376,
4247,
4408,
9092,
13,
4706,
4514,
13,
4706,
736,
2610,
29874,
4247,
3562,
3195,
29898,
1311,
3032,
4220,
29918,
3177,
29892,
376,
657,
29918,
8517,
1761,
287,
29918,
18010,
613,
10417,
29897,
13,
13,
1678,
822,
788,
29918,
18010,
29898,
1311,
1125,
13,
4706,
1583,
3032,
4220,
29918,
3177,
29889,
1202,
29918,
8517,
1761,
287,
29918,
18010,
10456,
3358,
29889,
8391,
3101,
13,
13,
1678,
822,
3349,
29918,
18010,
29898,
1311,
29892,
4629,
1125,
13,
4706,
1583,
3032,
4220,
29918,
3177,
29889,
5992,
29918,
8517,
1761,
287,
29918,
18010,
10456,
8391,
29897,
13,
13,
13,
1990,
19215,
8801,
29898,
17303,
8801,
29879,
29889,
29984,
8801,
1125,
13,
1678,
12912,
29918,
4039,
29918,
15033,
353,
14705,
9203,
29889,
10140,
284,
29898,
710,
29897,
13,
13,
1678,
903,
1188,
29918,
5563,
29918,
20698,
353,
8170,
287,
21533,
4197,
13,
4706,
4852,
11862,
613,
313,
29941,
29892,
12183,
29889,
18525,
8243,
13,
4706,
4852,
3401,
613,
313,
29906,
29892,
12183,
29889,
11690,
8243,
13,
4706,
4852,
22709,
613,
313,
29896,
29892,
12183,
29889,
29956,
25614,
8243,
13,
4706,
4852,
29907,
768,
936,
613,
313,
29900,
29892,
12183,
29889,
11341,
1806,
2965,
1964,
876,
13,
268,
2314,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
18593,
29918,
3177,
1125,
13,
4706,
2428,
29898,
9585,
8801,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
3032,
4220,
29918,
3177,
353,
18593,
29918,
3177,
13,
4706,
1583,
3032,
14669,
29918,
1481,
580,
13,
13,
1678,
822,
903,
14669,
29918,
1481,
29898,
1311,
1125,
13,
4706,
1583,
3032,
2680,
353,
14705,
8801,
29879,
29889,
29984,
2500,
3453,
580,
13,
4706,
1583,
29889,
842,
3453,
29898,
1311,
3032,
2680,
29897,
13,
13,
4706,
1583,
3032,
8966,
29918,
4039,
29918,
5628,
353,
14705,
8801,
29879,
29889,
2239,
457,
6103,
580,
13,
4706,
1583,
3032,
1188,
29918,
5563,
29918,
10702,
29916,
353,
14705,
8801,
29879,
29889,
29984,
26628,
580,
13,
13,
4706,
1583,
3032,
8966,
29918,
4039,
29918,
5628,
29889,
6252,
2624,
5072,
29898,
1311,
29897,
13,
4706,
1583,
3032,
8966,
29918,
4039,
29918,
5628,
29889,
12038,
29898,
1311,
3032,
4220,
29918,
3177,
29889,
8966,
29918,
4039,
29897,
13,
4706,
1583,
3032,
1188,
29918,
5563,
29918,
10702,
29916,
29889,
1202,
6913,
29898,
1311,
3032,
1188,
29918,
5563,
29918,
20698,
29889,
8149,
3101,
13,
4706,
1583,
3032,
1188,
29918,
5563,
29918,
10702,
29916,
29889,
3784,
3220,
7590,
29889,
6915,
29898,
1311,
3032,
265,
29918,
1188,
29918,
5563,
29918,
15033,
29897,
13,
13,
4706,
1583,
3032,
16440,
29918,
29890,
1478,
465,
29918,
305,
29916,
353,
14705,
8801,
29879,
29889,
29984,
28360,
703,
4205,
519,
26078,
21594,
363,
525,
8875,
29915,
1642,
4830,
29898,
1311,
3032,
4220,
29918,
3177,
29889,
8966,
29918,
4039,
876,
13,
4706,
1583,
3032,
16440,
29918,
29890,
1478,
465,
29918,
305,
29916,
29889,
842,
17817,
29898,
1333,
1583,
3032,
4220,
29918,
3177,
29889,
17590,
29897,
13,
4706,
1583,
3032,
16440,
29918,
29890,
1478,
465,
29918,
305,
29916,
29889,
3859,
7590,
29889,
6915,
29898,
1311,
3032,
265,
29918,
29890,
1478,
465,
29918,
15033,
29897,
13,
13,
4706,
1583,
3032,
2680,
29889,
1202,
4301,
28945,
29890,
29958,
29934,
335,
10522,
29901,
829,
29890,
28341,
1583,
3032,
8966,
29918,
4039,
29918,
5628,
29897,
13,
4706,
1583,
3032,
2680,
29889,
1202,
4301,
28945,
29890,
29958,
3403,
21597,
29901,
829,
29890,
28341,
1583,
3032,
1188,
29918,
5563,
29918,
10702,
29916,
29897,
13,
4706,
1583,
3032,
2680,
29889,
1202,
4301,
28945,
29890,
29958,
29933,
1478,
465,
29901,
829,
29890,
28341,
1583,
3032,
16440,
29918,
29890,
1478,
465,
29918,
305,
29916,
29897,
13,
13,
1678,
822,
903,
265,
29918,
29890,
1478,
465,
29918,
15033,
29898,
1311,
29892,
7120,
1125,
13,
4706,
1583,
3032,
4220,
29918,
3177,
29889,
17590,
353,
451,
7120,
13,
13,
1678,
822,
903,
265,
29918,
1188,
29918,
5563,
29918,
15033,
29898,
1311,
29892,
2380,
1125,
13,
4706,
1857,
29918,
726,
353,
1583,
3032,
1188,
29918,
5563,
29918,
10702,
29916,
29889,
667,
1626,
29898,
2248,
29897,
13,
4706,
848,
353,
1583,
3032,
1188,
29918,
5563,
29918,
20698,
29961,
3784,
29918,
726,
29962,
13,
4706,
26354,
29889,
1228,
29889,
16440,
3403,
703,
29899,
18248,
359,
537,
613,
848,
29961,
29900,
2314,
13,
4706,
17927,
29889,
842,
29918,
1188,
29918,
5563,
29898,
1272,
29961,
29896,
2314,
13,
13,
1678,
822,
903,
265,
29918,
8966,
29918,
4039,
29918,
287,
1573,
29898,
1311,
1125,
13,
4706,
1426,
353,
1583,
3032,
8966,
29918,
4039,
29918,
5628,
29889,
726,
580,
13,
4706,
565,
1426,
29901,
13,
9651,
1583,
3032,
4220,
29918,
3177,
29889,
8966,
29918,
4039,
353,
1426,
13,
9651,
1583,
29889,
8966,
29918,
4039,
29918,
15033,
29889,
21976,
29898,
726,
29897,
13,
13,
1678,
822,
1741,
5072,
29898,
1311,
29892,
1203,
29892,
1741,
1125,
13,
4706,
4380,
353,
518,
17303,
9203,
29889,
29984,
2624,
29889,
2558,
19729,
29962,
13,
4706,
565,
1741,
29889,
1853,
580,
297,
4380,
29901,
13,
9651,
1583,
3032,
265,
29918,
8966,
29918,
4039,
29918,
287,
1573,
580,
13,
4706,
736,
2428,
29898,
9585,
8801,
29892,
1583,
467,
3696,
5072,
29898,
3318,
29892,
1741,
29897,
13,
13,
13,
1990,
1706,
262,
1884,
15280,
29898,
17303,
8801,
29879,
29889,
29984,
855,
29891,
839,
2001,
11494,
1125,
13,
1678,
9995,
26628,
1904,
2777,
6920,
1213,
15945,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3579,
19290,
1125,
13,
13,
4706,
1583,
3032,
4990,
29918,
5552,
353,
9049,
5085,
29889,
657,
703,
4990,
29918,
5552,
1159,
470,
376,
4990,
29918,
710,
29908,
13,
4706,
1583,
3032,
9290,
29918,
667,
353,
9049,
5085,
29889,
657,
703,
9290,
29918,
3084,
1159,
565,
9049,
5085,
29889,
657,
703,
9290,
29918,
3084,
1159,
338,
451,
6213,
1683,
7700,
13,
13,
4706,
1583,
3032,
311,
1111,
29918,
1066,
353,
9049,
5085,
29889,
657,
703,
311,
1111,
29918,
1066,
613,
14705,
8801,
29879,
29889,
29984,
5568,
8375,
1043,
2001,
29889,
7341,
29897,
13,
4706,
1583,
3032,
311,
1111,
29918,
2311,
353,
9049,
5085,
29889,
657,
703,
311,
1111,
29918,
2311,
613,
14705,
9203,
29889,
29984,
3505,
29898,
29896,
29906,
29892,
29871,
29896,
29906,
876,
13,
13,
4706,
1583,
3032,
1195,
29918,
1767,
353,
9049,
5085,
29889,
657,
703,
1195,
29918,
1767,
1159,
13,
4706,
1583,
3032,
3317,
29918,
1767,
353,
9049,
5085,
29889,
657,
703,
3317,
29918,
1767,
1159,
13,
13,
4706,
2428,
29898,
5592,
262,
1884,
15280,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
13,
1678,
822,
2069,
5568,
8375,
29898,
1311,
29892,
2984,
29892,
2380,
1125,
13,
4706,
2428,
29898,
5592,
262,
1884,
15280,
29892,
1583,
467,
2344,
5568,
8375,
29898,
3385,
29892,
2380,
29897,
13,
4706,
565,
1583,
3032,
311,
1111,
29918,
1066,
29901,
13,
9651,
2984,
29889,
19557,
362,
8003,
353,
1583,
3032,
311,
1111,
29918,
1066,
13,
4706,
565,
1583,
3032,
311,
1111,
29918,
2311,
29901,
13,
9651,
2984,
29889,
19557,
362,
3505,
353,
1583,
3032,
311,
1111,
29918,
2311,
13,
13,
1678,
822,
1653,
15280,
29898,
1311,
29892,
3847,
29892,
2984,
29892,
2380,
1125,
13,
4706,
11109,
353,
14705,
8801,
29879,
29889,
29984,
5592,
262,
3313,
29898,
3560,
29897,
13,
13,
4706,
565,
1583,
3032,
1195,
29918,
1767,
29901,
13,
9651,
11109,
29889,
842,
8140,
12539,
29898,
1311,
3032,
1195,
29918,
1767,
29897,
13,
13,
4706,
565,
1583,
3032,
3317,
29918,
1767,
29901,
13,
9651,
11109,
29889,
842,
7976,
12539,
29898,
1311,
3032,
3317,
29918,
1767,
29897,
13,
13,
4706,
736,
11109,
13,
13,
1678,
822,
731,
15280,
1469,
29898,
1311,
29892,
6920,
29892,
2380,
1125,
13,
4706,
3863,
29918,
1767,
353,
2380,
29889,
1272,
29898,
12154,
29922,
17303,
9203,
29889,
17303,
29889,
6103,
16727,
29897,
13,
4706,
6920,
29889,
842,
1917,
29898,
5628,
29918,
1767,
29897,
13,
13,
1678,
822,
731,
3195,
1469,
29898,
1311,
29892,
6920,
29892,
1904,
29892,
2380,
1125,
13,
4706,
565,
451,
2380,
29889,
275,
7211,
7295,
13,
9651,
736,
7700,
13,
4706,
1904,
29889,
842,
1469,
29898,
2248,
29892,
6920,
29889,
1767,
3285,
6297,
29922,
17303,
9203,
29889,
17303,
29889,
6103,
16727,
29897,
13,
4706,
736,
5852,
13,
2
] |
swipe.py | amagrabi/preference-learning | 1 | 176154 |
import datetime
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import os
import shutil
import sys
import time
import pandas as pd
import pynder
import urllib.request
from pynput import keyboard
from pylab import rcParams
from config import FACEBOOK_AUTH_TOKEN, FACEBOOK_ID, RATING_THRESHOLD
# Iterable needed to store ratings from keypresses
RATINGS = []
# Directory structure
DF_PATH = 'data/df_swipes.p'
IMG_PATH_LIKES = 'data/images/likes'
IMG_PATH_DISLIKES = 'data/images/dislikes'
IMG_PATH_NEARBY = 'data/images/nearby'
# Create image directories
IMG_PATHS = [IMG_PATH_LIKES, IMG_PATH_DISLIKES, IMG_PATH_NEARBY]
for path in IMG_PATHS:
if not os.path.exists(path):
os.makedirs(path)
def rate_photos(event):
sys.stdout.flush()
rating_set = [str(i) for i in list(range(1,10))]
rating_set.append('escape')
if event.key in rating_set:
RATINGS.append(event.key)
plt.close(fig)
def show_images(filenames, fig, user=None, session=None, pause=0.0,
figure_pos_x=500, figure_pos_y=0):
# plt.style.use('dark_background')
thismanager = plt.get_current_fig_manager()
thismanager.window.wm_geometry(f'+{figure_pos_x}+{figure_pos_y}')
for j, photo in enumerate(filenames):
a = fig.add_subplot(1, len(filenames), j + 1)
a.axis('off')
a.set_facecolor('black')
img = mpimg.imread(filenames[j])
plt.imshow(img)
title = ''
if user:
title += f'Name: {user.name}, \n'
title += f'Age: {user.age} \n'
title += f'Distance: {user.distance_km} \n'
fig.text(0.01, 0.1, f'Bio: {user.bio}', bbox={'facecolor': 'white', 'alpha': 1, 'edgecolor': 'none', 'pad': 1})
if session:
title += f' Likes remaining: {session.likes_remaining}'
plt.suptitle(title)
fig.canvas.mpl_connect('key_release_event', rate_photos)
plt.show()
if pause:
time.sleep(pause)
def add_data_to_df(df, path, user, liked, rating):
new_data = pd.DataFrame({
'name': user.name,
'id': user.id,
'liked': liked,
'rating': rating,
'age': user.age,
'bio': user.bio,
'photos': [list(user.get_photos())],
'photos_instagram': [user.instagram_photos],
'common_likes': [user.common_likes],
'common_like_count': len(user.common_likes),
'common_interests': [user._data.get('common_interests', [])],
'common_interests_count': len(user._data.get('common_interests', [])),
'common_friends': [user._data.get('common_friends', [])],
'common_friend_count': len(user._data.get('common_friends', [])),
'connection_count': [user.common_connections],
'jobs': [user.jobs],
'schools': [user.schools],
'distance_km': user.distance_km,
'distance_mi': user.distance_mi,
'ping_time': user._data['ping_time'],
'teasers': [user._data['teasers']],
'gender': user.gender,
'birth_date': user.birth_date,
'instagram_name': user.instagram_username,
'content_hash': user._data.get('content_hash', None),
'datetime': datetime.datetime.isoformat(datetime.datetime.now())
})
df = df.append(new_data, ignore_index=True)
df.to_pickle(path)
return df
if __name__ == "__main__":
reset = False
if reset:
if os.path.exists(IMG_PATH_LIKES):
shutil.rmtree(IMG_PATH_LIKES)
os.makedirs(IMG_PATH_LIKES)
if os.path.exists(IMG_PATH_DISLIKES):
shutil.rmtree(IMG_PATH_DISLIKES)
os.makedirs(IMG_PATH_DISLIKES)
if os.path.exists(IMG_PATH_NEARBY):
shutil.rmtree(IMG_PATH_NEARBY)
os.makedirs(IMG_PATH_NEARBY)
if os.path.exists(DF_PATH):
os.remove(DF_PATH)
# Load DataFrame
if os.path.exists(DF_PATH):
df = pd.read_pickle(DF_PATH)
else:
# columns = [
# 'name', 'id', 'liked', 'age', 'bio', 'photos', 'photos_instagram',
# 'common_likes', 'common_like_count', 'common_friends_count', 'common_friends_count',
# 'jobs', 'schools', 'distance_km', 'distance_mi',
# 'ping_time', 'teasers', 'gender', 'birth_date'
# ]
df = pd.DataFrame()
session = pynder.Session(FACEBOOK_AUTH_TOKEN)
# Get nearby users
liked = False
abort = False
while True:
print(f'Starting session...')
print(f'Likes remaining: {session.likes_remaining}')
print(f'Super likes remaining: {session.super_likes_remaining}')
for i, user in enumerate(session.nearby_users(limit=1)):
# print(f'User {i}: {user.name}')
# Download user photos to nearby folder
photo_filenames = []
for j, photo in enumerate(user.photos):
photo_filename = os.path.join(IMG_PATH_NEARBY, f'{user.id}_{str(j).zfill(4)}.jpg')
urllib.request.urlretrieve(photo, photo_filename)
photo_filenames.append(photo_filename)
# Show images
rcParams['figure.figsize'] = 10, 5
fig = plt.figure()
show_images(photo_filenames, fig, user=user, session=session, pause=0.0)
# Process rating
rating = RATINGS.pop()
if rating == 'escape':
abort = True
break
elif int(rating) < RATING_THRESHOLD:
liked = False
df = add_data_to_df(df=df, path=DF_PATH, user=user, liked=liked, rating=int(rating))
for photo in photo_filenames:
filepath, file_extension = os.path.splitext(photo)
new_filename = os.path.basename(filepath) + f'_{str(rating).zfill(2)}' + file_extension
new_filepath = os.path.join(IMG_PATH_DISLIKES, new_filename)
shutil.copyfile(photo, new_filepath)
# user.dislike()
resp = session._api.dislike(user.id)
print(f'{user.name} was disliked ({int(rating)})')
else:
liked = True
df = add_data_to_df(df=df, path=DF_PATH, user=user, liked=liked, rating=int(rating))
for photo in photo_filenames:
filepath, file_extension = os.path.splitext(photo)
new_filename = os.path.basename(filepath) + f'_{str(rating).zfill(2)}' + file_extension
new_filepath = os.path.join(IMG_PATH_LIKES, new_filename)
shutil.copyfile(photo, new_filepath)
# user.like()
resp = session._api.like(user.id)
print(f'{user.name} was LIKED ({int(rating)})')
print(f'{resp}')
if abort:
break
time.sleep(0) | [
1,
29871,
13,
5215,
12865,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
22889,
29889,
3027,
408,
22326,
2492,
13,
5215,
2897,
13,
5215,
528,
4422,
13,
5215,
10876,
13,
5215,
931,
13,
5215,
11701,
408,
10518,
13,
5215,
11451,
5740,
13,
5215,
3142,
1982,
29889,
3827,
13,
13,
3166,
282,
948,
649,
1053,
12247,
13,
3166,
282,
2904,
370,
1053,
364,
29883,
9629,
13,
13,
3166,
2295,
1053,
383,
11538,
8456,
8949,
29918,
20656,
29950,
29918,
4986,
29968,
1430,
29892,
383,
11538,
8456,
8949,
29918,
1367,
29892,
390,
1299,
4214,
29918,
4690,
1525,
7068,
5607,
29928,
13,
13,
29937,
20504,
519,
4312,
304,
3787,
26838,
515,
1820,
2139,
267,
13,
29934,
1299,
4214,
29903,
353,
5159,
13,
13,
29937,
18862,
3829,
13,
4037,
29918,
10145,
353,
525,
1272,
29914,
2176,
29918,
2774,
29488,
29889,
29886,
29915,
13,
7833,
29954,
29918,
10145,
29918,
5265,
29968,
2890,
353,
525,
1272,
29914,
8346,
29914,
5081,
267,
29915,
13,
7833,
29954,
29918,
10145,
29918,
23711,
5265,
29968,
2890,
353,
525,
1272,
29914,
8346,
29914,
2218,
5081,
267,
29915,
13,
7833,
29954,
29918,
10145,
29918,
8186,
1718,
22716,
353,
525,
1272,
29914,
8346,
29914,
28502,
1609,
29915,
13,
13,
29937,
6204,
1967,
17525,
13,
7833,
29954,
29918,
10145,
29903,
353,
518,
7833,
29954,
29918,
10145,
29918,
5265,
29968,
2890,
29892,
22313,
29954,
29918,
10145,
29918,
23711,
5265,
29968,
2890,
29892,
22313,
29954,
29918,
10145,
29918,
8186,
1718,
22716,
29962,
13,
1454,
2224,
297,
22313,
29954,
29918,
10145,
29903,
29901,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
2084,
1125,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
2084,
29897,
13,
13,
13,
1753,
6554,
29918,
561,
15788,
29898,
3696,
1125,
13,
1678,
10876,
29889,
25393,
29889,
23126,
580,
13,
1678,
21700,
29918,
842,
353,
518,
710,
29898,
29875,
29897,
363,
474,
297,
1051,
29898,
3881,
29898,
29896,
29892,
29896,
29900,
28166,
13,
1678,
21700,
29918,
842,
29889,
4397,
877,
21587,
1495,
13,
1678,
565,
1741,
29889,
1989,
297,
21700,
29918,
842,
29901,
13,
4706,
390,
1299,
4214,
29903,
29889,
4397,
29898,
3696,
29889,
1989,
29897,
13,
4706,
14770,
29889,
5358,
29898,
1003,
29897,
13,
13,
13,
1753,
1510,
29918,
8346,
29898,
1777,
264,
1280,
29892,
2537,
29892,
1404,
29922,
8516,
29892,
4867,
29922,
8516,
29892,
19957,
29922,
29900,
29889,
29900,
29892,
13,
18884,
4377,
29918,
1066,
29918,
29916,
29922,
29945,
29900,
29900,
29892,
4377,
29918,
1066,
29918,
29891,
29922,
29900,
1125,
13,
1678,
396,
14770,
29889,
3293,
29889,
1509,
877,
26031,
29918,
7042,
1495,
13,
1678,
445,
12847,
353,
14770,
29889,
657,
29918,
3784,
29918,
1003,
29918,
12847,
580,
13,
1678,
445,
12847,
29889,
7165,
29889,
29893,
29885,
29918,
19156,
29898,
29888,
18717,
29912,
4532,
29918,
1066,
29918,
29916,
7517,
29912,
4532,
29918,
1066,
29918,
29891,
29913,
1495,
13,
1678,
363,
432,
29892,
15373,
297,
26985,
29898,
1777,
264,
1280,
1125,
13,
4706,
263,
353,
2537,
29889,
1202,
29918,
1491,
5317,
29898,
29896,
29892,
7431,
29898,
1777,
264,
1280,
511,
432,
718,
29871,
29896,
29897,
13,
4706,
263,
29889,
8990,
877,
2696,
1495,
13,
4706,
263,
29889,
842,
29918,
2161,
2780,
877,
8517,
1495,
13,
4706,
10153,
353,
22326,
2492,
29889,
326,
949,
29898,
1777,
264,
1280,
29961,
29926,
2314,
13,
4706,
14770,
29889,
326,
4294,
29898,
2492,
29897,
13,
1678,
3611,
353,
6629,
13,
1678,
565,
1404,
29901,
13,
4706,
3611,
4619,
285,
29915,
1170,
29901,
426,
1792,
29889,
978,
1118,
320,
29876,
29915,
13,
4706,
3611,
4619,
285,
29915,
22406,
29901,
426,
1792,
29889,
482,
29913,
320,
29876,
29915,
13,
4706,
3611,
4619,
285,
29915,
27469,
29901,
426,
1792,
29889,
19244,
29918,
8848,
29913,
320,
29876,
29915,
13,
4706,
2537,
29889,
726,
29898,
29900,
29889,
29900,
29896,
29892,
29871,
29900,
29889,
29896,
29892,
285,
29915,
29933,
601,
29901,
426,
1792,
29889,
24840,
29913,
742,
289,
1884,
3790,
29915,
2161,
2780,
2396,
525,
10921,
742,
525,
2312,
2396,
29871,
29896,
29892,
525,
12864,
2780,
2396,
525,
9290,
742,
525,
8305,
2396,
29871,
29896,
1800,
13,
1678,
565,
4867,
29901,
13,
4706,
3611,
4619,
285,
29915,
365,
29379,
9886,
29901,
426,
7924,
29889,
5081,
267,
29918,
1745,
17225,
10162,
13,
1678,
14770,
29889,
2146,
415,
1740,
29898,
3257,
29897,
13,
1678,
2537,
29889,
15257,
29889,
29885,
572,
29918,
6915,
877,
1989,
29918,
14096,
29918,
3696,
742,
6554,
29918,
561,
15788,
29897,
13,
1678,
14770,
29889,
4294,
580,
13,
1678,
565,
19957,
29901,
13,
4706,
931,
29889,
17059,
29898,
29886,
1071,
29897,
13,
13,
13,
1753,
788,
29918,
1272,
29918,
517,
29918,
2176,
29898,
2176,
29892,
2224,
29892,
1404,
29892,
23289,
29892,
21700,
1125,
13,
1678,
716,
29918,
1272,
353,
10518,
29889,
17271,
3319,
13,
4706,
525,
978,
2396,
1404,
29889,
978,
29892,
13,
4706,
525,
333,
2396,
1404,
29889,
333,
29892,
13,
4706,
525,
5081,
287,
2396,
23289,
29892,
13,
4706,
525,
29741,
2396,
21700,
29892,
13,
4706,
525,
482,
2396,
1404,
29889,
482,
29892,
13,
4706,
525,
24840,
2396,
1404,
29889,
24840,
29892,
13,
4706,
525,
561,
15788,
2396,
518,
1761,
29898,
1792,
29889,
657,
29918,
561,
15788,
3101,
1402,
13,
4706,
525,
561,
15788,
29918,
2611,
14442,
2396,
518,
1792,
29889,
2611,
14442,
29918,
561,
15788,
1402,
13,
4706,
525,
9435,
29918,
5081,
267,
2396,
518,
1792,
29889,
9435,
29918,
5081,
267,
1402,
13,
4706,
525,
9435,
29918,
4561,
29918,
2798,
2396,
7431,
29898,
1792,
29889,
9435,
29918,
5081,
267,
511,
13,
4706,
525,
9435,
29918,
1639,
9197,
2396,
518,
1792,
3032,
1272,
29889,
657,
877,
9435,
29918,
1639,
9197,
742,
518,
2314,
1402,
13,
4706,
525,
9435,
29918,
1639,
9197,
29918,
2798,
2396,
7431,
29898,
1792,
3032,
1272,
29889,
657,
877,
9435,
29918,
1639,
9197,
742,
518,
2314,
511,
13,
4706,
525,
9435,
29918,
7932,
1975,
2396,
518,
1792,
3032,
1272,
29889,
657,
877,
9435,
29918,
7932,
1975,
742,
518,
2314,
1402,
13,
4706,
525,
9435,
29918,
18326,
29918,
2798,
2396,
7431,
29898,
1792,
3032,
1272,
29889,
657,
877,
9435,
29918,
7932,
1975,
742,
518,
2314,
511,
13,
4706,
525,
9965,
29918,
2798,
2396,
518,
1792,
29889,
9435,
29918,
11958,
1953,
1402,
13,
4706,
525,
9057,
29879,
2396,
518,
1792,
29889,
9057,
29879,
1402,
13,
4706,
525,
816,
8789,
2396,
518,
1792,
29889,
816,
8789,
1402,
13,
4706,
525,
19244,
29918,
8848,
2396,
1404,
29889,
19244,
29918,
8848,
29892,
13,
4706,
525,
19244,
29918,
2460,
2396,
1404,
29889,
19244,
29918,
2460,
29892,
13,
4706,
525,
15702,
29918,
2230,
2396,
1404,
3032,
1272,
1839,
15702,
29918,
2230,
7464,
13,
4706,
525,
371,
294,
414,
2396,
518,
1792,
3032,
1272,
1839,
371,
294,
414,
2033,
1402,
13,
4706,
525,
26098,
2396,
1404,
29889,
26098,
29892,
13,
4706,
525,
29890,
7515,
29918,
1256,
2396,
1404,
29889,
29890,
7515,
29918,
1256,
29892,
13,
4706,
525,
2611,
14442,
29918,
978,
2396,
1404,
29889,
2611,
14442,
29918,
6786,
29892,
13,
4706,
525,
3051,
29918,
8568,
2396,
1404,
3032,
1272,
29889,
657,
877,
3051,
29918,
8568,
742,
6213,
511,
13,
4706,
525,
12673,
2396,
12865,
29889,
12673,
29889,
10718,
4830,
29898,
12673,
29889,
12673,
29889,
3707,
3101,
13,
1678,
5615,
13,
1678,
4489,
353,
4489,
29889,
4397,
29898,
1482,
29918,
1272,
29892,
11455,
29918,
2248,
29922,
5574,
29897,
13,
1678,
4489,
29889,
517,
29918,
23945,
280,
29898,
2084,
29897,
13,
1678,
736,
4489,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
13,
1678,
10092,
353,
7700,
13,
1678,
565,
10092,
29901,
13,
4706,
565,
2897,
29889,
2084,
29889,
9933,
29898,
7833,
29954,
29918,
10145,
29918,
5265,
29968,
2890,
1125,
13,
9651,
528,
4422,
29889,
1758,
8336,
29898,
7833,
29954,
29918,
10145,
29918,
5265,
29968,
2890,
29897,
13,
9651,
2897,
29889,
29885,
12535,
12935,
29898,
7833,
29954,
29918,
10145,
29918,
5265,
29968,
2890,
29897,
13,
4706,
565,
2897,
29889,
2084,
29889,
9933,
29898,
7833,
29954,
29918,
10145,
29918,
23711,
5265,
29968,
2890,
1125,
13,
9651,
528,
4422,
29889,
1758,
8336,
29898,
7833,
29954,
29918,
10145,
29918,
23711,
5265,
29968,
2890,
29897,
13,
9651,
2897,
29889,
29885,
12535,
12935,
29898,
7833,
29954,
29918,
10145,
29918,
23711,
5265,
29968,
2890,
29897,
13,
4706,
565,
2897,
29889,
2084,
29889,
9933,
29898,
7833,
29954,
29918,
10145,
29918,
8186,
1718,
22716,
1125,
13,
9651,
528,
4422,
29889,
1758,
8336,
29898,
7833,
29954,
29918,
10145,
29918,
8186,
1718,
22716,
29897,
13,
9651,
2897,
29889,
29885,
12535,
12935,
29898,
7833,
29954,
29918,
10145,
29918,
8186,
1718,
22716,
29897,
13,
4706,
565,
2897,
29889,
2084,
29889,
9933,
29898,
4037,
29918,
10145,
1125,
13,
9651,
2897,
29889,
5992,
29898,
4037,
29918,
10145,
29897,
13,
13,
1678,
396,
16012,
3630,
4308,
13,
1678,
565,
2897,
29889,
2084,
29889,
9933,
29898,
4037,
29918,
10145,
1125,
13,
4706,
4489,
353,
10518,
29889,
949,
29918,
23945,
280,
29898,
4037,
29918,
10145,
29897,
13,
1678,
1683,
29901,
13,
4706,
396,
4341,
353,
518,
13,
4706,
396,
268,
525,
978,
742,
525,
333,
742,
525,
5081,
287,
742,
525,
482,
742,
525,
24840,
742,
525,
561,
15788,
742,
525,
561,
15788,
29918,
2611,
14442,
742,
13,
4706,
396,
268,
525,
9435,
29918,
5081,
267,
742,
525,
9435,
29918,
4561,
29918,
2798,
742,
525,
9435,
29918,
7932,
1975,
29918,
2798,
742,
525,
9435,
29918,
7932,
1975,
29918,
2798,
742,
13,
4706,
396,
268,
525,
9057,
29879,
742,
525,
816,
8789,
742,
525,
19244,
29918,
8848,
742,
525,
19244,
29918,
2460,
742,
13,
4706,
396,
268,
525,
15702,
29918,
2230,
742,
525,
371,
294,
414,
742,
525,
26098,
742,
525,
29890,
7515,
29918,
1256,
29915,
13,
4706,
396,
4514,
13,
4706,
4489,
353,
10518,
29889,
17271,
580,
13,
13,
1678,
4867,
353,
11451,
5740,
29889,
7317,
29898,
29943,
11538,
8456,
8949,
29918,
20656,
29950,
29918,
4986,
29968,
1430,
29897,
13,
13,
1678,
396,
3617,
20810,
4160,
13,
1678,
23289,
353,
7700,
13,
1678,
27450,
353,
7700,
13,
13,
1678,
1550,
5852,
29901,
13,
13,
4706,
1596,
29898,
29888,
29915,
4763,
292,
4867,
856,
1495,
13,
4706,
1596,
29898,
29888,
29915,
29931,
29379,
9886,
29901,
426,
7924,
29889,
5081,
267,
29918,
1745,
17225,
29913,
1495,
13,
4706,
1596,
29898,
29888,
29915,
19111,
4188,
267,
9886,
29901,
426,
7924,
29889,
9136,
29918,
5081,
267,
29918,
1745,
17225,
29913,
1495,
13,
13,
4706,
363,
474,
29892,
1404,
297,
26985,
29898,
7924,
29889,
28502,
1609,
29918,
7193,
29898,
13400,
29922,
29896,
22164,
13,
13,
9651,
396,
1596,
29898,
29888,
29915,
2659,
426,
29875,
6177,
426,
1792,
29889,
978,
29913,
1495,
13,
13,
9651,
396,
25553,
1404,
20612,
304,
20810,
4138,
13,
9651,
15373,
29918,
1777,
264,
1280,
353,
5159,
13,
9651,
363,
432,
29892,
15373,
297,
26985,
29898,
1792,
29889,
561,
15788,
1125,
13,
18884,
15373,
29918,
9507,
353,
2897,
29889,
2084,
29889,
7122,
29898,
7833,
29954,
29918,
10145,
29918,
8186,
1718,
22716,
29892,
285,
29915,
29912,
1792,
29889,
333,
3227,
710,
29898,
29926,
467,
29920,
5589,
29898,
29946,
29512,
6173,
1495,
13,
18884,
3142,
1982,
29889,
3827,
29889,
2271,
276,
509,
2418,
29898,
21596,
29892,
15373,
29918,
9507,
29897,
13,
18884,
15373,
29918,
1777,
264,
1280,
29889,
4397,
29898,
21596,
29918,
9507,
29897,
13,
13,
9651,
396,
7704,
4558,
13,
9651,
364,
29883,
9629,
1839,
4532,
29889,
1003,
2311,
2033,
353,
29871,
29896,
29900,
29892,
29871,
29945,
13,
9651,
2537,
353,
14770,
29889,
4532,
580,
13,
9651,
1510,
29918,
8346,
29898,
21596,
29918,
1777,
264,
1280,
29892,
2537,
29892,
1404,
29922,
1792,
29892,
4867,
29922,
7924,
29892,
19957,
29922,
29900,
29889,
29900,
29897,
13,
13,
9651,
396,
10554,
21700,
13,
9651,
21700,
353,
390,
1299,
4214,
29903,
29889,
7323,
580,
13,
9651,
565,
21700,
1275,
525,
21587,
2396,
13,
18884,
27450,
353,
5852,
13,
18884,
2867,
13,
9651,
25342,
938,
29898,
29741,
29897,
529,
390,
1299,
4214,
29918,
4690,
1525,
7068,
5607,
29928,
29901,
13,
18884,
23289,
353,
7700,
13,
18884,
4489,
353,
788,
29918,
1272,
29918,
517,
29918,
2176,
29898,
2176,
29922,
2176,
29892,
2224,
29922,
4037,
29918,
10145,
29892,
1404,
29922,
1792,
29892,
23289,
29922,
5081,
287,
29892,
21700,
29922,
524,
29898,
29741,
876,
13,
18884,
363,
15373,
297,
15373,
29918,
1777,
264,
1280,
29901,
13,
462,
1678,
934,
2084,
29892,
934,
29918,
17588,
353,
2897,
29889,
2084,
29889,
23579,
568,
486,
29898,
21596,
29897,
13,
462,
1678,
716,
29918,
9507,
353,
2897,
29889,
2084,
29889,
6500,
3871,
29898,
1445,
2084,
29897,
718,
285,
29915,
648,
710,
29898,
29741,
467,
29920,
5589,
29898,
29906,
2915,
29915,
718,
934,
29918,
17588,
13,
462,
1678,
716,
29918,
1445,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
7833,
29954,
29918,
10145,
29918,
23711,
5265,
29968,
2890,
29892,
716,
29918,
9507,
29897,
13,
462,
1678,
528,
4422,
29889,
8552,
1445,
29898,
21596,
29892,
716,
29918,
1445,
2084,
29897,
13,
18884,
396,
1404,
29889,
2218,
4561,
580,
13,
18884,
4613,
353,
4867,
3032,
2754,
29889,
2218,
4561,
29898,
1792,
29889,
333,
29897,
13,
18884,
1596,
29898,
29888,
29915,
29912,
1792,
29889,
978,
29913,
471,
766,
5081,
287,
21313,
524,
29898,
29741,
26972,
1495,
13,
9651,
1683,
29901,
13,
18884,
23289,
353,
5852,
13,
18884,
4489,
353,
788,
29918,
1272,
29918,
517,
29918,
2176,
29898,
2176,
29922,
2176,
29892,
2224,
29922,
4037,
29918,
10145,
29892,
1404,
29922,
1792,
29892,
23289,
29922,
5081,
287,
29892,
21700,
29922,
524,
29898,
29741,
876,
13,
18884,
363,
15373,
297,
15373,
29918,
1777,
264,
1280,
29901,
13,
462,
1678,
934,
2084,
29892,
934,
29918,
17588,
353,
2897,
29889,
2084,
29889,
23579,
568,
486,
29898,
21596,
29897,
13,
462,
1678,
716,
29918,
9507,
353,
2897,
29889,
2084,
29889,
6500,
3871,
29898,
1445,
2084,
29897,
718,
285,
29915,
648,
710,
29898,
29741,
467,
29920,
5589,
29898,
29906,
2915,
29915,
718,
934,
29918,
17588,
13,
462,
1678,
716,
29918,
1445,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
7833,
29954,
29918,
10145,
29918,
5265,
29968,
2890,
29892,
716,
29918,
9507,
29897,
13,
462,
1678,
528,
4422,
29889,
8552,
1445,
29898,
21596,
29892,
716,
29918,
1445,
2084,
29897,
13,
18884,
396,
1404,
29889,
4561,
580,
13,
18884,
4613,
353,
4867,
3032,
2754,
29889,
4561,
29898,
1792,
29889,
333,
29897,
13,
18884,
1596,
29898,
29888,
29915,
29912,
1792,
29889,
978,
29913,
471,
17705,
29968,
3352,
21313,
524,
29898,
29741,
26972,
1495,
13,
18884,
1596,
29898,
29888,
29915,
29912,
13713,
29913,
1495,
13,
13,
4706,
565,
27450,
29901,
13,
9651,
2867,
13,
13,
4706,
931,
29889,
17059,
29898,
29900,
29897,
2
] |
DiffGCN.py | BGUCompSci/DiffGCNs.py | 4 | 101632 | import torch
from torch_geometric.nn.conv import MessagePassing
from torch_geometric.utils import to_dense_adj, contains_self_loops, contains_isolated_nodes
from torch_cluster import knn_graph
import torch.nn as nn
from torch_geometric.nn.inits import reset
from torch.nn import Sequential as Seq, Linear as Lin, ReLU, BatchNorm1d as BN
from torch.nn import functional as F
from message_passing2 import MessagePassing2
import numpy as np
import networkx as nx
import matplotlib.pyplot as plt
from torch.nn.init import kaiming_normal
import os.path as osp
from torch_geometric.nn.pool import graclus, avg_pool_x
import torch_sparse
from mgpool import mgpool
currPath = osp.dirname(osp.realpath(__file__))
epsilon = 1e-20
class mySequential(nn.Sequential):
def forward(self, *inputs):
for module in self._modules.values():
if type(inputs) == tuple:
x, pos, edge_index, batch, k = inputs
inputs = module(x, pos, edge_index)
res = inputs
inputs = (inputs, pos, edge_index, batch, k)
else:
res = module(inputs)
return res
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
def MLP(channels, batch_norm=True, relu=False):
return Seq(*[
Seq(nn.Linear(channels[i - 1], channels[i]), BN(channels[i]) if batch_norm else Seq(),
nn.ReLU() if relu else Seq())
for i in range(1, len(channels))
])
def CreateTransposedAuxGraph(edge_index):
source = edge_index[0, :]
target = edge_index[1, :]
new_edge_index = torch.zeros_like(edge_index)
new_edge_index[0, :] = target
new_edge_index[1, :] = source
return new_edge_index
def CreateAuxGraph(edge_index, pos_i, pos_j, original_vertex_features, pos):
# Build new auxiliary graph:
num_graph_verts = original_vertex_features.shape[0]
new_verts = torch.arange(num_graph_verts,
num_graph_verts + len(edge_index[0, :])) # Add edges in G as vertices in aux G
new_vertex_pos = torch.cat(
[pos, torch.zeros(len(new_verts), pos.shape[1]).to(device)]
, dim=0)
new_vertex_features = torch.cat(
[original_vertex_features, torch.zeros(len(new_verts), original_vertex_features.shape[1]).to(device)]
, dim=0)
# Compute needed components:
sources = edge_index[0, :]
targets = edge_index[1, :]
edge_indices = num_graph_verts + torch.arange(0, len(edge_index[0, :]))
edge_indices = edge_indices.to(device)
new_source_edges = torch.stack((sources, edge_indices), dim=0)
new_target_edges = torch.stack((targets, edge_indices), dim=0)
new_vertex_pos[num_graph_verts:, :] = (pos_i + pos_j) / 2
# Build graph from components:
edge_index_aux = torch.cat([new_target_edges, new_source_edges], dim=1)
assert (not contains_self_loops(edge_index_aux))
assert (not contains_isolated_nodes(edge_index_aux))
return edge_index_aux, new_vertex_features, new_vertex_pos
class EdgeAggr(MessagePassing):
def __init__(self, in_planes, aggr='add', **kwargs):
super(EdgeAggr, self).__init__(aggr=aggr, **kwargs)
# self.bn = torch.nn.BatchNorm1d(num_features=3*in_planes)
self.aggr = aggr
def forward(self, x, edge_index, pos):
""""""
x = x.unsqueeze(-1) if x.dim() == 1 else x
return self.propagate(edge_index, x=x, pos=pos)
def message(self, x_i, x_j, pos_i, pos_j, x):
dist = torch.pow(pos_i - pos_j, 2)
dist = torch.sum(dist, dim=1) + epsilon
subs = pos_i - pos_j
sx = subs[:, 0]
sy = subs[:, 1]
sz = subs[:, 2]
dx = x_j * sx[:, None]
dy = x_j * sy[:, None]
dz = x_j * sz[:, None]
derivs = torch.cat([dx, dy, dz], dim=1)
return derivs
class VertToEdge(MessagePassing2):
def __init__(self, aggr='add', **kwargs):
super(VertToEdge, self).__init__(aggr=aggr, **kwargs)
self.reset_parameters()
def reset_parameters(self):
a = 10
def forward(self, x, edge_index, pos):
""""""
x = x.unsqueeze(-1) if x.dim() == 1 else x
return self.propagate(edge_index, x=x, pos=pos)
def message(self, pos_i, pos_j, edge_index, x, pos):
edge_index_aux, new_vertex_features, new_vertex_pos = CreateAuxGraph(edge_index, pos_i, pos_j, x, pos)
return edge_index_aux, new_vertex_features, new_vertex_pos
class AvgTranspose(MessagePassing):
def __init__(self, aggr='mean', **kwargs):
super(AvgTranspose, self).__init__(aggr=aggr, **kwargs)
self.aggr = aggr
def forward(self, x, edge_index):
""""""
x = x.unsqueeze(-1) if x.dim() == 1 else x
return self.propagate(edge_index, x=x)
def message(self, x_j):
return x_j
class GraphTranspose(MessagePassing):
def __init__(self, aggr='add', **kwargs):
super(GraphTranspose, self).__init__(aggr=aggr, **kwargs)
self.aggr = aggr
def forward(self, x, edge_index, pos):
""""""
x = x.unsqueeze(-1) if x.dim() == 1 else x
return self.propagate(edge_index, x=x, pos=pos)
def message(self, x_j, pos_i, pos_j):
pos_i = pos_i - pos_j
feature_size = int(x_j.shape[1] / 3)
d2x = x_j[:, 0:feature_size] * pos_i[:, 0][:, None]
d2y = x_j[:, feature_size: 2 * feature_size] * pos_i[:, 1][:, None]
d2z = x_j[:, 2 * feature_size:] * pos_i[:, 2][:, None]
pos_i = torch.pow(pos_i, 2)
pos_i = torch.sum(pos_i, dim=1) + epsilon
return torch.cat([d2x, d2y, d2z], dim=1)
class DiffGCNLayer(MessagePassing):
def __init__(self, in_planes, out_planes, relu=True, **kwargs):
super(DiffGCNLayer, self).__init__()
self.VtoE = VertToEdge(aggr='mean')
self.EdgeAggr = EdgeAggr(in_planes=in_planes, aggr='mean')
self.avgTrans = AvgTranspose(aggr='mean')
self.GraphTrans = GraphTranspose(aggr='mean')
self.combine = MLP([3 * in_planes, out_planes], relu=relu)
# if in_planes != out_planes:
# self.shortcut = MLP([in_planes, out_planes], relu=False)
self.in_planes = in_planes
self.out_planes = out_planes
def forward(self, x, pos, edge_index, batch=None):
# Create aux graph:
edge_index_aux, new_vertex_features, new_vertex_pos = self.VtoE(x, edge_index, pos)
edge_index_aux = edge_index_aux.to(device)
edge_index_aux = edge_index_aux.to(device)
new_vertex_features = new_vertex_features.to(device)
new_vertex_pos = new_vertex_pos.to(device)
# Gradient via local aggregation:
edge_aggr = self.EdgeAggr(new_vertex_features, edge_index_aux, new_vertex_pos)
# Create transposed graph (flipped edges):
transposed_edge_index_aux = CreateTransposedAuxGraph(edge_index_aux)
# Calculate Gradient term:
gradAggr = self.avgTrans(edge_aggr, transposed_edge_index_aux)
gradAggr = gradAggr[0:x.shape[0], :]
# Calculate Laplacian term:
laplacianAggr = self.GraphTrans(edge_aggr, transposed_edge_index_aux, new_vertex_pos)
laplacianAggr = laplacianAggr[0:x.shape[0], :]
return F.relu(self.combine(gradAggr))
if self.out_planes == self.in_planes:
return F.relu(self.combine(torch.cat([x, gradAggr, laplacianAggr], dim=1)))
else:
return F.relu(self.combine(torch.cat([x, gradAggr, laplacianAggr], dim=1)))
class DiffGCNBlock(MessagePassing):
def __init__(self, in_planes, out_planes, k, blocks=3, pool=False, **kwargs):
super(DiffGCNBlock, self).__init__()
self.blocks = blocks
self.k = k
self.openLayer = DiffGCNLayer(in_planes, out_planes, relu=False)
self.layers = self._make_layer(self.openLayer, out_planes, self.blocks)
self.pool = pool
def _make_layer(self, openLayer, planes, blocks):
layers = [openLayer]
for i in range(1, blocks):
layers.append(DiffGCNLayer(planes, planes, relu=False))
return mySequential(*layers)
def forward(self, x, pos, batch=None, edge_index=None):
if edge_index is None:
edge_index = knn_graph(x, self.k, batch, loop=False)
edge_index = edge_index.to(device)
if self.pool:
new_adj, new_feat, new_pos, new_batch, index, values, origsize, newsize = mgpool(x, pos, edge_index, batch)
return self.layers(new_feat, new_pos, new_adj, new_batch, self.k), new_pos, new_batch, (
index, values, origsize, newsize)
else:
new_pos = pos
new_batch = batch
new_feat = x
new_adj = edge_index
return self.layers(new_feat, new_pos, new_adj, new_batch, self.k), new_pos, new_batch
| [
1,
1053,
4842,
305,
30004,
13,
3166,
4842,
305,
29918,
479,
14066,
29889,
15755,
29889,
20580,
1053,
7777,
7129,
292,
30004,
13,
3166,
4842,
305,
29918,
479,
14066,
29889,
13239,
1053,
304,
29918,
1145,
344,
29918,
26859,
29892,
3743,
29918,
1311,
29918,
417,
3554,
29892,
3743,
29918,
275,
324,
630,
29918,
18010,
30004,
13,
3166,
4842,
305,
29918,
19594,
1053,
889,
29876,
29918,
4262,
30004,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
30004,
13,
3166,
4842,
305,
29918,
479,
14066,
29889,
15755,
29889,
262,
1169,
1053,
10092,
30004,
13,
3166,
4842,
305,
29889,
15755,
1053,
922,
339,
2556,
408,
25981,
29892,
22985,
408,
4342,
29892,
830,
29931,
29965,
29892,
350,
905,
29940,
555,
29896,
29881,
408,
350,
29940,
30004,
13,
3166,
4842,
305,
29889,
15755,
1053,
13303,
408,
383,
30004,
13,
3166,
2643,
29918,
3364,
292,
29906,
1053,
7777,
7129,
292,
29906,
30004,
13,
5215,
12655,
408,
7442,
30004,
13,
5215,
3564,
29916,
408,
302,
29916,
30004,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
30004,
13,
3166,
4842,
305,
29889,
15755,
29889,
2344,
1053,
13560,
326,
292,
29918,
8945,
30004,
13,
5215,
2897,
29889,
2084,
408,
288,
1028,
30004,
13,
3166,
4842,
305,
29918,
479,
14066,
29889,
15755,
29889,
10109,
1053,
2646,
7009,
29892,
1029,
29887,
29918,
10109,
29918,
29916,
30004,
13,
5215,
4842,
305,
29918,
29879,
5510,
30004,
13,
3166,
286,
29887,
10109,
1053,
286,
29887,
10109,
30004,
13,
30004,
13,
21962,
2605,
353,
288,
1028,
29889,
25721,
29898,
4705,
29889,
6370,
2084,
22168,
1445,
1649,
876,
30004,
13,
5463,
353,
29871,
29896,
29872,
29899,
29906,
29900,
30004,
13,
30004,
13,
30004,
13,
1990,
590,
16941,
2556,
29898,
15755,
29889,
16941,
2556,
1125,
30004,
13,
30004,
13,
1678,
822,
6375,
29898,
1311,
29892,
334,
2080,
29879,
1125,
30004,
13,
4706,
363,
3883,
297,
1583,
3032,
7576,
29889,
5975,
7295,
30004,
13,
9651,
565,
1134,
29898,
2080,
29879,
29897,
1275,
18761,
29901,
30004,
13,
18884,
921,
29892,
926,
29892,
7636,
29918,
2248,
29892,
9853,
29892,
413,
353,
10970,
30004,
13,
18884,
10970,
353,
3883,
29898,
29916,
29892,
926,
29892,
7636,
29918,
2248,
8443,
13,
18884,
620,
353,
10970,
30004,
13,
18884,
10970,
353,
313,
2080,
29879,
29892,
926,
29892,
7636,
29918,
2248,
29892,
9853,
29892,
413,
8443,
13,
9651,
1683,
29901,
30004,
13,
18884,
620,
353,
3883,
29898,
2080,
29879,
8443,
13,
4706,
736,
620,
30004,
13,
30004,
13,
30004,
13,
10141,
353,
4842,
305,
29889,
10141,
877,
29883,
6191,
29915,
565,
4842,
305,
29889,
29883,
6191,
29889,
275,
29918,
16515,
580,
1683,
525,
21970,
1495,
30004,
13,
30004,
13,
30004,
13,
1753,
341,
13208,
29898,
305,
12629,
29892,
9853,
29918,
12324,
29922,
5574,
29892,
1104,
29884,
29922,
8824,
1125,
30004,
13,
1678,
736,
25981,
10456,
29961,
30004,
13,
4706,
25981,
29898,
15755,
29889,
12697,
29898,
305,
12629,
29961,
29875,
448,
29871,
29896,
1402,
18196,
29961,
29875,
11724,
350,
29940,
29898,
305,
12629,
29961,
29875,
2314,
565,
9853,
29918,
12324,
1683,
25981,
3285,
30004,
13,
9651,
302,
29876,
29889,
1123,
29931,
29965,
580,
565,
1104,
29884,
1683,
25981,
3101,
30004,
13,
4706,
363,
474,
297,
3464,
29898,
29896,
29892,
7431,
29898,
305,
12629,
876,
30004,
13,
268,
2314,
30004,
13,
30004,
13,
30004,
13,
1753,
6204,
4300,
4752,
29909,
1314,
9527,
29898,
12864,
29918,
2248,
1125,
30004,
13,
1678,
2752,
353,
7636,
29918,
2248,
29961,
29900,
29892,
584,
29962,
30004,
13,
1678,
3646,
353,
7636,
29918,
2248,
29961,
29896,
29892,
584,
29962,
30004,
13,
1678,
716,
29918,
12864,
29918,
2248,
353,
4842,
305,
29889,
3298,
359,
29918,
4561,
29898,
12864,
29918,
2248,
8443,
13,
1678,
716,
29918,
12864,
29918,
2248,
29961,
29900,
29892,
584,
29962,
353,
3646,
30004,
13,
1678,
716,
29918,
12864,
29918,
2248,
29961,
29896,
29892,
584,
29962,
353,
2752,
30004,
13,
1678,
736,
716,
29918,
12864,
29918,
2248,
30004,
13,
30004,
13,
30004,
13,
1753,
6204,
29909,
1314,
9527,
29898,
12864,
29918,
2248,
29892,
926,
29918,
29875,
29892,
926,
29918,
29926,
29892,
2441,
29918,
369,
4776,
29918,
22100,
29892,
926,
1125,
30004,
13,
1678,
396,
8878,
716,
29587,
653,
3983,
29901,
30004,
13,
1678,
954,
29918,
4262,
29918,
369,
1372,
353,
2441,
29918,
369,
4776,
29918,
22100,
29889,
12181,
29961,
29900,
29962,
30004,
13,
1678,
716,
29918,
369,
1372,
353,
4842,
305,
29889,
279,
927,
29898,
1949,
29918,
4262,
29918,
369,
1372,
11167,
13,
462,
632,
954,
29918,
4262,
29918,
369,
1372,
718,
7431,
29898,
12864,
29918,
2248,
29961,
29900,
29892,
584,
12622,
29871,
396,
3462,
12770,
297,
402,
408,
13791,
297,
3479,
402,
30004,
13,
1678,
716,
29918,
369,
4776,
29918,
1066,
353,
4842,
305,
29889,
4117,
29898,
30004,
13,
4706,
518,
1066,
29892,
4842,
305,
29889,
3298,
359,
29898,
2435,
29898,
1482,
29918,
369,
1372,
511,
926,
29889,
12181,
29961,
29896,
14664,
517,
29898,
10141,
4638,
30004,
13,
4706,
1919,
3964,
29922,
29900,
8443,
13,
1678,
716,
29918,
369,
4776,
29918,
22100,
353,
4842,
305,
29889,
4117,
29898,
30004,
13,
4706,
518,
13492,
29918,
369,
4776,
29918,
22100,
29892,
4842,
305,
29889,
3298,
359,
29898,
2435,
29898,
1482,
29918,
369,
1372,
511,
2441,
29918,
369,
4776,
29918,
22100,
29889,
12181,
29961,
29896,
14664,
517,
29898,
10141,
4638,
30004,
13,
4706,
1919,
3964,
29922,
29900,
8443,
13,
30004,
13,
1678,
396,
11796,
29872,
4312,
7117,
29901,
30004,
13,
1678,
8974,
353,
7636,
29918,
2248,
29961,
29900,
29892,
584,
29962,
30004,
13,
1678,
22525,
353,
7636,
29918,
2248,
29961,
29896,
29892,
584,
29962,
30004,
13,
1678,
7636,
29918,
513,
1575,
353,
954,
29918,
4262,
29918,
369,
1372,
718,
4842,
305,
29889,
279,
927,
29898,
29900,
29892,
7431,
29898,
12864,
29918,
2248,
29961,
29900,
29892,
584,
12622,
30004,
13,
1678,
7636,
29918,
513,
1575,
353,
7636,
29918,
513,
1575,
29889,
517,
29898,
10141,
8443,
13,
30004,
13,
1678,
716,
29918,
4993,
29918,
287,
2710,
353,
4842,
305,
29889,
1429,
3552,
29879,
2863,
29892,
7636,
29918,
513,
1575,
511,
3964,
29922,
29900,
8443,
13,
1678,
716,
29918,
5182,
29918,
287,
2710,
353,
4842,
305,
29889,
1429,
3552,
5182,
29879,
29892,
7636,
29918,
513,
1575,
511,
3964,
29922,
29900,
8443,
13,
30004,
13,
1678,
716,
29918,
369,
4776,
29918,
1066,
29961,
1949,
29918,
4262,
29918,
369,
1372,
29901,
29892,
584,
29962,
353,
313,
1066,
29918,
29875,
718,
926,
29918,
29926,
29897,
847,
29871,
29906,
30004,
13,
1678,
396,
8878,
3983,
515,
7117,
29901,
30004,
13,
1678,
7636,
29918,
2248,
29918,
2993,
353,
4842,
305,
29889,
4117,
4197,
1482,
29918,
5182,
29918,
287,
2710,
29892,
716,
29918,
4993,
29918,
287,
2710,
1402,
3964,
29922,
29896,
8443,
13,
30004,
13,
1678,
4974,
313,
1333,
3743,
29918,
1311,
29918,
417,
3554,
29898,
12864,
29918,
2248,
29918,
2993,
876,
30004,
13,
1678,
4974,
313,
1333,
3743,
29918,
275,
324,
630,
29918,
18010,
29898,
12864,
29918,
2248,
29918,
2993,
876,
30004,
13,
30004,
13,
1678,
736,
7636,
29918,
2248,
29918,
2993,
29892,
716,
29918,
369,
4776,
29918,
22100,
29892,
716,
29918,
369,
4776,
29918,
1066,
30004,
13,
30004,
13,
30004,
13,
1990,
21086,
14769,
629,
29898,
3728,
7129,
292,
1125,
30004,
13,
30004,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
297,
29918,
9018,
267,
29892,
946,
629,
2433,
1202,
742,
3579,
19290,
1125,
30004,
13,
4706,
2428,
29898,
23894,
14769,
629,
29892,
1583,
467,
1649,
2344,
12035,
351,
629,
29922,
351,
629,
29892,
3579,
19290,
8443,
13,
4706,
396,
1583,
29889,
11197,
353,
4842,
305,
29889,
15755,
29889,
23145,
29940,
555,
29896,
29881,
29898,
1949,
29918,
22100,
29922,
29941,
29930,
262,
29918,
9018,
267,
8443,
13,
4706,
1583,
29889,
351,
629,
353,
946,
629,
30004,
13,
30004,
13,
1678,
822,
6375,
29898,
1311,
29892,
921,
29892,
7636,
29918,
2248,
29892,
926,
1125,
30004,
13,
4706,
9995,
15945,
19451,
13,
4706,
921,
353,
921,
29889,
6948,
802,
29872,
911,
6278,
29896,
29897,
565,
921,
29889,
6229,
580,
1275,
29871,
29896,
1683,
921,
30004,
13,
30004,
13,
4706,
736,
1583,
29889,
7728,
351,
403,
29898,
12864,
29918,
2248,
29892,
921,
29922,
29916,
29892,
926,
29922,
1066,
8443,
13,
30004,
13,
1678,
822,
2643,
29898,
1311,
29892,
921,
29918,
29875,
29892,
921,
29918,
29926,
29892,
926,
29918,
29875,
29892,
926,
29918,
29926,
29892,
921,
1125,
30004,
13,
4706,
1320,
353,
4842,
305,
29889,
12248,
29898,
1066,
29918,
29875,
448,
926,
29918,
29926,
29892,
29871,
29906,
8443,
13,
4706,
1320,
353,
4842,
305,
29889,
2083,
29898,
5721,
29892,
3964,
29922,
29896,
29897,
718,
321,
3232,
30004,
13,
4706,
11684,
353,
926,
29918,
29875,
448,
926,
29918,
29926,
30004,
13,
4706,
269,
29916,
353,
11684,
7503,
29892,
29871,
29900,
29962,
30004,
13,
4706,
9878,
353,
11684,
7503,
29892,
29871,
29896,
29962,
30004,
13,
4706,
2268,
353,
11684,
7503,
29892,
29871,
29906,
29962,
30004,
13,
4706,
15414,
353,
921,
29918,
29926,
334,
269,
29916,
7503,
29892,
6213,
29962,
30004,
13,
4706,
13475,
353,
921,
29918,
29926,
334,
9878,
7503,
29892,
6213,
29962,
30004,
13,
4706,
9275,
353,
921,
29918,
29926,
334,
2268,
7503,
29892,
6213,
29962,
30004,
13,
30004,
13,
4706,
7750,
29879,
353,
4842,
305,
29889,
4117,
4197,
8235,
29892,
13475,
29892,
9275,
1402,
3964,
29922,
29896,
8443,
13,
4706,
736,
7750,
29879,
30004,
13,
30004,
13,
30004,
13,
1990,
11198,
1762,
23894,
29898,
3728,
7129,
292,
29906,
1125,
30004,
13,
30004,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
946,
629,
2433,
1202,
742,
3579,
19290,
1125,
30004,
13,
4706,
2428,
29898,
9114,
1762,
23894,
29892,
1583,
467,
1649,
2344,
12035,
351,
629,
29922,
351,
629,
29892,
3579,
19290,
8443,
13,
4706,
1583,
29889,
12071,
29918,
16744,
26471,
13,
30004,
13,
1678,
822,
10092,
29918,
16744,
29898,
1311,
1125,
30004,
13,
4706,
263,
353,
29871,
29896,
29900,
30004,
13,
30004,
13,
1678,
822,
6375,
29898,
1311,
29892,
921,
29892,
7636,
29918,
2248,
29892,
926,
1125,
30004,
13,
4706,
9995,
15945,
19451,
13,
4706,
921,
353,
921,
29889,
6948,
802,
29872,
911,
6278,
29896,
29897,
565,
921,
29889,
6229,
580,
1275,
29871,
29896,
1683,
921,
30004,
13,
30004,
13,
4706,
736,
1583,
29889,
7728,
351,
403,
29898,
12864,
29918,
2248,
29892,
921,
29922,
29916,
29892,
926,
29922,
1066,
8443,
13,
30004,
13,
1678,
822,
2643,
29898,
1311,
29892,
926,
29918,
29875,
29892,
926,
29918,
29926,
29892,
7636,
29918,
2248,
29892,
921,
29892,
926,
1125,
30004,
13,
4706,
7636,
29918,
2248,
29918,
2993,
29892,
716,
29918,
369,
4776,
29918,
22100,
29892,
716,
29918,
369,
4776,
29918,
1066,
353,
6204,
29909,
1314,
9527,
29898,
12864,
29918,
2248,
29892,
926,
29918,
29875,
29892,
926,
29918,
29926,
29892,
921,
29892,
926,
8443,
13,
4706,
736,
7636,
29918,
2248,
29918,
2993,
29892,
716,
29918,
369,
4776,
29918,
22100,
29892,
716,
29918,
369,
4776,
29918,
1066,
30004,
13,
30004,
13,
30004,
13,
1990,
7740,
29887,
4300,
4220,
29898,
3728,
7129,
292,
1125,
30004,
13,
30004,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
946,
629,
2433,
12676,
742,
3579,
19290,
1125,
30004,
13,
4706,
2428,
29898,
12810,
29887,
4300,
4220,
29892,
1583,
467,
1649,
2344,
12035,
351,
629,
29922,
351,
629,
29892,
3579,
19290,
8443,
13,
4706,
1583,
29889,
351,
629,
353,
946,
629,
30004,
13,
30004,
13,
1678,
822,
6375,
29898,
1311,
29892,
921,
29892,
7636,
29918,
2248,
1125,
30004,
13,
4706,
9995,
15945,
19451,
13,
4706,
921,
353,
921,
29889,
6948,
802,
29872,
911,
6278,
29896,
29897,
565,
921,
29889,
6229,
580,
1275,
29871,
29896,
1683,
921,
30004,
13,
30004,
13,
4706,
736,
1583,
29889,
7728,
351,
403,
29898,
12864,
29918,
2248,
29892,
921,
29922,
29916,
8443,
13,
30004,
13,
1678,
822,
2643,
29898,
1311,
29892,
921,
29918,
29926,
1125,
30004,
13,
4706,
736,
921,
29918,
29926,
30004,
13,
30004,
13,
30004,
13,
1990,
12367,
4300,
4220,
29898,
3728,
7129,
292,
1125,
30004,
13,
30004,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
946,
629,
2433,
1202,
742,
3579,
19290,
1125,
30004,
13,
4706,
2428,
29898,
9527,
4300,
4220,
29892,
1583,
467,
1649,
2344,
12035,
351,
629,
29922,
351,
629,
29892,
3579,
19290,
8443,
13,
4706,
1583,
29889,
351,
629,
353,
946,
629,
30004,
13,
30004,
13,
1678,
822,
6375,
29898,
1311,
29892,
921,
29892,
7636,
29918,
2248,
29892,
926,
1125,
30004,
13,
4706,
9995,
15945,
19451,
13,
4706,
921,
353,
921,
29889,
6948,
802,
29872,
911,
6278,
29896,
29897,
565,
921,
29889,
6229,
580,
1275,
29871,
29896,
1683,
921,
30004,
13,
30004,
13,
4706,
736,
1583,
29889,
7728,
351,
403,
29898,
12864,
29918,
2248,
29892,
921,
29922,
29916,
29892,
926,
29922,
1066,
8443,
13,
30004,
13,
1678,
822,
2643,
29898,
1311,
29892,
921,
29918,
29926,
29892,
926,
29918,
29875,
29892,
926,
29918,
29926,
1125,
30004,
13,
4706,
926,
29918,
29875,
353,
926,
29918,
29875,
448,
926,
29918,
29926,
30004,
13,
4706,
4682,
29918,
2311,
353,
938,
29898,
29916,
29918,
29926,
29889,
12181,
29961,
29896,
29962,
847,
29871,
29941,
8443,
13,
4706,
270,
29906,
29916,
353,
921,
29918,
29926,
7503,
29892,
29871,
29900,
29901,
14394,
29918,
2311,
29962,
334,
926,
29918,
29875,
7503,
29892,
29871,
29900,
3816,
29901,
29892,
6213,
29962,
30004,
13,
4706,
270,
29906,
29891,
353,
921,
29918,
29926,
7503,
29892,
4682,
29918,
2311,
29901,
29871,
29906,
334,
4682,
29918,
2311,
29962,
334,
926,
29918,
29875,
7503,
29892,
29871,
29896,
3816,
29901,
29892,
6213,
29962,
30004,
13,
4706,
270,
29906,
29920,
353,
921,
29918,
29926,
7503,
29892,
29871,
29906,
334,
4682,
29918,
2311,
17531,
334,
926,
29918,
29875,
7503,
29892,
29871,
29906,
3816,
29901,
29892,
6213,
29962,
30004,
13,
30004,
13,
4706,
926,
29918,
29875,
353,
4842,
305,
29889,
12248,
29898,
1066,
29918,
29875,
29892,
29871,
29906,
8443,
13,
4706,
926,
29918,
29875,
353,
4842,
305,
29889,
2083,
29898,
1066,
29918,
29875,
29892,
3964,
29922,
29896,
29897,
718,
321,
3232,
30004,
13,
4706,
736,
4842,
305,
29889,
4117,
4197,
29881,
29906,
29916,
29892,
270,
29906,
29891,
29892,
270,
29906,
29920,
1402,
3964,
29922,
29896,
8443,
13,
30004,
13,
30004,
13,
1990,
360,
2593,
8766,
29940,
14420,
29898,
3728,
7129,
292,
1125,
30004,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
297,
29918,
9018,
267,
29892,
714,
29918,
9018,
267,
29892,
1104,
29884,
29922,
5574,
29892,
3579,
19290,
1125,
30004,
13,
4706,
2428,
29898,
26023,
8766,
29940,
14420,
29892,
1583,
467,
1649,
2344,
1649,
26471,
13,
4706,
1583,
29889,
29963,
517,
29923,
353,
11198,
1762,
23894,
29898,
351,
629,
2433,
12676,
1495,
30004,
13,
4706,
1583,
29889,
23894,
14769,
629,
353,
21086,
14769,
629,
29898,
262,
29918,
9018,
267,
29922,
262,
29918,
9018,
267,
29892,
946,
629,
2433,
12676,
1495,
30004,
13,
4706,
1583,
29889,
485,
29887,
4300,
353,
7740,
29887,
4300,
4220,
29898,
351,
629,
2433,
12676,
1495,
30004,
13,
4706,
1583,
29889,
9527,
4300,
353,
12367,
4300,
4220,
29898,
351,
629,
2433,
12676,
1495,
30004,
13,
4706,
1583,
29889,
17743,
457,
353,
341,
13208,
4197,
29941,
334,
297,
29918,
9018,
267,
29892,
714,
29918,
9018,
267,
1402,
1104,
29884,
29922,
2674,
29884,
8443,
13,
4706,
396,
565,
297,
29918,
9018,
267,
2804,
714,
29918,
9018,
267,
29901,
30004,
13,
4706,
396,
1678,
1583,
29889,
12759,
7582,
353,
341,
13208,
4197,
262,
29918,
9018,
267,
29892,
714,
29918,
9018,
267,
1402,
1104,
29884,
29922,
8824,
8443,
13,
4706,
1583,
29889,
262,
29918,
9018,
267,
353,
297,
29918,
9018,
267,
30004,
13,
4706,
1583,
29889,
449,
29918,
9018,
267,
353,
714,
29918,
9018,
267,
30004,
13,
30004,
13,
1678,
822,
6375,
29898,
1311,
29892,
921,
29892,
926,
29892,
7636,
29918,
2248,
29892,
9853,
29922,
8516,
1125,
30004,
13,
4706,
396,
6204,
3479,
3983,
29901,
30004,
13,
4706,
7636,
29918,
2248,
29918,
2993,
29892,
716,
29918,
369,
4776,
29918,
22100,
29892,
716,
29918,
369,
4776,
29918,
1066,
353,
1583,
29889,
29963,
517,
29923,
29898,
29916,
29892,
7636,
29918,
2248,
29892,
926,
8443,
13,
4706,
7636,
29918,
2248,
29918,
2993,
353,
7636,
29918,
2248,
29918,
2993,
29889,
517,
29898,
10141,
8443,
13,
4706,
7636,
29918,
2248,
29918,
2993,
353,
7636,
29918,
2248,
29918,
2993,
29889,
517,
29898,
10141,
8443,
13,
4706,
716,
29918,
369,
4776,
29918,
22100,
353,
716,
29918,
369,
4776,
29918,
22100,
29889,
517,
29898,
10141,
8443,
13,
4706,
716,
29918,
369,
4776,
29918,
1066,
353,
716,
29918,
369,
4776,
29918,
1066,
29889,
517,
29898,
10141,
8443,
13,
4706,
396,
19295,
993,
3025,
1887,
11404,
362,
29901,
30004,
13,
4706,
7636,
29918,
351,
629,
353,
1583,
29889,
23894,
14769,
629,
29898,
1482,
29918,
369,
4776,
29918,
22100,
29892,
7636,
29918,
2248,
29918,
2993,
29892,
716,
29918,
369,
4776,
29918,
1066,
8443,
13,
30004,
13,
4706,
396,
6204,
1301,
4752,
3983,
313,
20157,
2986,
12770,
1125,
30004,
13,
4706,
1301,
4752,
29918,
12864,
29918,
2248,
29918,
2993,
353,
6204,
4300,
4752,
29909,
1314,
9527,
29898,
12864,
29918,
2248,
29918,
2993,
8443,
13,
30004,
13,
4706,
396,
20535,
403,
19295,
993,
1840,
29901,
30004,
13,
4706,
4656,
14769,
629,
353,
1583,
29889,
485,
29887,
4300,
29898,
12864,
29918,
351,
629,
29892,
1301,
4752,
29918,
12864,
29918,
2248,
29918,
2993,
8443,
13,
4706,
4656,
14769,
629,
353,
4656,
14769,
629,
29961,
29900,
29901,
29916,
29889,
12181,
29961,
29900,
1402,
584,
29962,
30004,
13,
4706,
396,
20535,
403,
20298,
433,
28445,
1840,
29901,
30004,
13,
4706,
425,
13974,
28445,
14769,
629,
353,
1583,
29889,
9527,
4300,
29898,
12864,
29918,
351,
629,
29892,
1301,
4752,
29918,
12864,
29918,
2248,
29918,
2993,
29892,
716,
29918,
369,
4776,
29918,
1066,
8443,
13,
4706,
425,
13974,
28445,
14769,
629,
353,
425,
13974,
28445,
14769,
629,
29961,
29900,
29901,
29916,
29889,
12181,
29961,
29900,
1402,
584,
29962,
30004,
13,
4706,
736,
383,
29889,
2674,
29884,
29898,
1311,
29889,
17743,
457,
29898,
5105,
14769,
629,
876,
30004,
13,
4706,
565,
1583,
29889,
449,
29918,
9018,
267,
1275,
1583,
29889,
262,
29918,
9018,
267,
29901,
30004,
13,
9651,
736,
383,
29889,
2674,
29884,
29898,
1311,
29889,
17743,
457,
29898,
7345,
305,
29889,
4117,
4197,
29916,
29892,
4656,
14769,
629,
29892,
425,
13974,
28445,
14769,
629,
1402,
3964,
29922,
29896,
4961,
30004,
13,
4706,
1683,
29901,
30004,
13,
9651,
736,
383,
29889,
2674,
29884,
29898,
1311,
29889,
17743,
457,
29898,
7345,
305,
29889,
4117,
4197,
29916,
29892,
4656,
14769,
629,
29892,
425,
13974,
28445,
14769,
629,
1402,
3964,
29922,
29896,
4961,
30004,
13,
30004,
13,
30004,
13,
1990,
360,
2593,
8766,
29940,
7445,
29898,
3728,
7129,
292,
1125,
30004,
13,
30004,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
297,
29918,
9018,
267,
29892,
714,
29918,
9018,
267,
29892,
413,
29892,
10930,
29922,
29941,
29892,
11565,
29922,
8824,
29892,
3579,
19290,
1125,
30004,
13,
4706,
2428,
29898,
26023,
8766,
29940,
7445,
29892,
1583,
467,
1649,
2344,
1649,
26471,
13,
4706,
1583,
29889,
1271,
29879,
353,
10930,
30004,
13,
4706,
1583,
29889,
29895,
353,
413,
30004,
13,
30004,
13,
4706,
1583,
29889,
3150,
14420,
353,
360,
2593,
8766,
29940,
14420,
29898,
262,
29918,
9018,
267,
29892,
714,
29918,
9018,
267,
29892,
1104,
29884,
29922,
8824,
8443,
13,
4706,
1583,
29889,
29277,
353,
1583,
3032,
5675,
29918,
13148,
29898,
1311,
29889,
3150,
14420,
29892,
714,
29918,
9018,
267,
29892,
1583,
29889,
1271,
29879,
8443,
13,
4706,
1583,
29889,
10109,
353,
11565,
30004,
13,
30004,
13,
1678,
822,
903,
5675,
29918,
13148,
29898,
1311,
29892,
1722,
14420,
29892,
3814,
267,
29892,
10930,
1125,
30004,
13,
4706,
15359,
353,
518,
3150,
14420,
29962,
30004,
13,
4706,
363,
474,
297,
3464,
29898,
29896,
29892,
10930,
1125,
30004,
13,
9651,
15359,
29889,
4397,
29898,
26023,
8766,
29940,
14420,
29898,
9018,
267,
29892,
3814,
267,
29892,
1104,
29884,
29922,
8824,
876,
30004,
13,
30004,
13,
4706,
736,
590,
16941,
2556,
10456,
29277,
8443,
13,
30004,
13,
1678,
822,
6375,
29898,
1311,
29892,
921,
29892,
926,
29892,
9853,
29922,
8516,
29892,
7636,
29918,
2248,
29922,
8516,
1125,
30004,
13,
4706,
565,
7636,
29918,
2248,
338,
6213,
29901,
30004,
13,
9651,
7636,
29918,
2248,
353,
889,
29876,
29918,
4262,
29898,
29916,
29892,
1583,
29889,
29895,
29892,
9853,
29892,
2425,
29922,
8824,
8443,
13,
9651,
7636,
29918,
2248,
353,
7636,
29918,
2248,
29889,
517,
29898,
10141,
8443,
13,
30004,
13,
4706,
565,
1583,
29889,
10109,
29901,
30004,
13,
9651,
716,
29918,
26859,
29892,
716,
29918,
1725,
271,
29892,
716,
29918,
1066,
29892,
716,
29918,
16175,
29892,
2380,
29892,
1819,
29892,
1677,
2311,
29892,
716,
2311,
353,
286,
29887,
10109,
29898,
29916,
29892,
926,
29892,
7636,
29918,
2248,
29892,
9853,
8443,
13,
9651,
736,
1583,
29889,
29277,
29898,
1482,
29918,
1725,
271,
29892,
716,
29918,
1066,
29892,
716,
29918,
26859,
29892,
716,
29918,
16175,
29892,
1583,
29889,
29895,
511,
716,
29918,
1066,
29892,
716,
29918,
16175,
29892,
313,
30004,
13,
18884,
2380,
29892,
1819,
29892,
1677,
2311,
29892,
716,
2311,
8443,
13,
4706,
1683,
29901,
30004,
13,
9651,
716,
29918,
1066,
353,
926,
30004,
13,
9651,
716,
29918,
16175,
353,
9853,
30004,
13,
9651,
716,
29918,
1725,
271,
353,
921,
30004,
13,
9651,
716,
29918,
26859,
353,
7636,
29918,
2248,
30004,
13,
30004,
13,
4706,
736,
1583,
29889,
29277,
29898,
1482,
29918,
1725,
271,
29892,
716,
29918,
1066,
29892,
716,
29918,
26859,
29892,
716,
29918,
16175,
29892,
1583,
29889,
29895,
511,
716,
29918,
1066,
29892,
716,
29918,
16175,
30004,
13,
2
] |
down.py | mostafabasuni/video_downloader_gui | 0 | 127700 | <gh_stars>0
from posixpath import split
import threading
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.uic import loadUiType
from pytube import YouTube
from pytube import Playlist
from pytube.cli import on_progress
from threading import Thread
import os
from os import path
import sys
import urllib.request
Form_Class,_ = loadUiType(path.join(path.dirname(__file__),"DownLoad.ui")) # Form_Class اسم اختياري للتطبيق
class MainApp(QMainWindow, Form_Class):
def __init__(self, parent=None):
super(MainApp, self).__init__(parent)
QMainWindow.__init__(self)
self.setupUi(self)
self.handel_Ui()
self.handel_button()
def handel_Ui(self):
self.setWindowTitle('Mostafa Downloader')
self.setFixedSize(750,290)
def handel_button(self):
self.pushButton.clicked.connect(self.Download)
self.pushButton_2.clicked.connect(self.handel_browse)
self.pushButton_3.clicked.connect(self.Save_Browse)
self.pushButton_4.clicked.connect(self.Video_Download)
self.pushButton_5.clicked.connect(self.Save_Browse)
self.pushButton_6.clicked.connect(self.Play_List_Download)
self.pushButton_7.clicked.connect(self.Save_Browse)
self.pushButton_8.clicked.connect(self.Select_From_Playlist)
def handel_browse(self):
# save_place = QFileDialog.getSaveFileName(self, caption='Save As', directory='.', filter='All File(*.*)')
# text = str(save_place)
# name = (text[2:].split(',')[0].replace("'",''))
# self.lineEdit_2.setText(name)
save_location = QFileDialog.getExistingDirectory(self, "Save Location")
self.lineEdit_2.setText(save_location)
def handel_progress(self, blocknum, blocksize, totalsize):
read = blocknum * blocksize
percent = int(read * 100 / totalsize)
self.progressBar.setValue(percent)
QApplication.processEvents() # to solve "Not Responding" proplem
def Download(self):
url = self.lineEdit.text()
file_name = url.split("/")[-1]
self.lineEdit_3.setText(file_name)
location = self.lineEdit_2.text()
save_location = location + "/" + self.lineEdit_3.text()
exists = os.path.exists(save_location)
if not exists:
try:
urllib.request.urlretrieve(url, save_location , self.handel_progress)
except Exception:
QMessageBox.warning(self, 'Download Error', 'Download Faild')
return
QMessageBox.information(self, 'Download Completed', 'Download Finished')
self.progressBar.setValue(0)
self.lineEdit.setText('')
self.lineEdit_2.setText('')
self.lineEdit_3.setText('')
else:
QMessageBox.warning(self, 'Download Notation', 'This File Already Exist')
def Save_Browse(self):
save_location = QFileDialog.getExistingDirectory(self, "Save Location")
self.lineEdit_13.setText(save_location)
self.lineEdit_5.setText(save_location)
self.lineEdit_7.setText(save_location)
def on_Progress_Video(self, stream, chunk, bytes_remaining):
total_size = stream.filesize
bytes_downloaded = total_size - bytes_remaining
percentage_of_completion = bytes_downloaded / total_size * 100
self.progressBar_2.setValue(percentage_of_completion)
QApplication.processEvents()
def on_Progress_Playlist(self, stream, chunk, bytes_remaining):
total_size = stream.filesize
bytes_downloaded = total_size - bytes_remaining
percentage_of_completion = bytes_downloaded / total_size * 100
self.progressBar_3.setValue(percentage_of_completion)
QApplication.processEvents()
def on_Progress_Select_From_Playlist(self, stream, chunk, bytes_remaining):
total_size = stream.filesize
bytes_downloaded = total_size - bytes_remaining
percentage_of_completion = bytes_downloaded / total_size * 100
self.progressBar_4.setValue(percentage_of_completion)
QApplication.processEvents()
def Video_Download(self):
url = self.lineEdit_4.text()
save_location = self.lineEdit_5.text()
try:
# quality = self.comboBox.currentText()
yt = YouTube(url) #, on_progress_callback=on_progress)
yt.register_on_progress_callback(self.on_Progress_Video) # (video, chunk_size, video.filesize))
# video = yt.streams.order_by('resolution')
# video = yt.streams.get_highest_resolution()
video = yt.streams.filter(progressive = True, file_extension = "mp4").last() #order_by('resolution').last()
video.download(save_location)
except Exception:
QMessageBox.warning(self, 'Download Error', 'Download Faild')
return
QMessageBox.information(self, 'Download Completed', 'Video Download Finished')
self.progressBar_2.setValue(0)
self.lineEdit_4.setText('')
self.lineEdit_5.setText('')
def Play_List_Download(self):
url_playlist = self.lineEdit_6.text()
save_location = self.lineEdit_7.text()
try:
pl = Playlist(url_playlist)
l = len(pl.videos)
self.lineEdit_8.setText(str(l))
i = 1
for video in (pl.videos):
self.lineEdit_9.setText(str(i))
video.register_on_progress_callback(self.on_Progress_Playlist)
i += 1
video.streams.filter(progressive = True, file_extension = "mp4").order_by('resolution').get_highest_resolution().download(save_location)
self.progressBar_3.setValue(0)
except Exception:
QMessageBox.warning(self, 'Download Error', 'Download Faild')
return
QMessageBox.information(self, 'Download Completed', 'Playlist Download Finished')
self.lineEdit_6.setText('')
self.lineEdit_7.setText('')
self.lineEdit_8.setText('')
self.lineEdit_9.setText('')
def Select_From_Playlist(self):
url_playlist = self.lineEdit_12.text()
save_location = self.lineEdit_13.text()
start = int(self.lineEdit_11.text())
end = int(self.lineEdit_10.text())
try:
pl = Playlist(url_playlist)
for video in (pl.videos[start-1:end]):
video.register_on_progress_callback(self.on_Progress_Select_From_Playlist)
video.streams.filter(progressive = True, file_extension = "mp4").order_by('resolution').get_lowest_resolution().download(save_location)
self.progressBar_4.setValue(0)
except Exception:
QMessageBox.warning(self, 'Download Error', 'Download Faild')
return
QMessageBox.information(self, 'Download Completed', 'Selected Playlist Download Finished')
self.lineEdit_10.setText('')
self.lineEdit_11.setText('')
self.lineEdit_12.setText('')
self.lineEdit_13.setText('')
def main():
app = QApplication(sys.argv)
window = MainApp()
window.show()
app.exec_()
if __name__ == '__main__':
main()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
926,
861,
2084,
1053,
6219,
13,
5215,
3244,
292,
13,
3166,
10772,
17303,
29945,
29889,
17303,
28707,
1053,
334,
13,
3166,
10772,
17303,
29945,
29889,
17303,
8801,
29879,
1053,
334,
13,
3166,
10772,
17303,
29945,
29889,
17303,
9203,
1053,
334,
13,
3166,
10772,
17303,
29945,
29889,
29884,
293,
1053,
2254,
29965,
29875,
1542,
13,
3166,
282,
3637,
4003,
1053,
14711,
13,
3166,
282,
3637,
4003,
1053,
7412,
1761,
13,
3166,
282,
3637,
4003,
29889,
11303,
1053,
373,
29918,
18035,
13,
13,
3166,
3244,
292,
1053,
10480,
13,
13,
5215,
2897,
13,
3166,
2897,
1053,
2224,
13,
5215,
10876,
13,
5215,
3142,
1982,
29889,
3827,
13,
13,
13,
2500,
29918,
2385,
29892,
29918,
353,
2254,
29965,
29875,
1542,
29898,
2084,
29889,
7122,
29898,
2084,
29889,
25721,
22168,
1445,
1649,
511,
29908,
6767,
5896,
29889,
1481,
5783,
29871,
396,
3812,
29918,
2385,
29871,
30112,
30198,
30159,
29871,
30112,
30321,
30195,
30163,
30112,
30156,
30163,
29871,
30138,
30138,
30195,
30367,
30177,
30163,
30265,
13,
13,
1990,
4241,
2052,
29898,
29984,
6330,
5907,
29892,
3812,
29918,
2385,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3847,
29922,
8516,
1125,
13,
4706,
2428,
29898,
6330,
2052,
29892,
1583,
467,
1649,
2344,
12035,
3560,
29897,
13,
4706,
660,
6330,
5907,
17255,
2344,
12035,
1311,
29897,
13,
4706,
1583,
29889,
14669,
29965,
29875,
29898,
1311,
29897,
13,
4706,
1583,
29889,
3179,
295,
29918,
29965,
29875,
580,
13,
4706,
1583,
29889,
3179,
295,
29918,
3092,
580,
13,
13,
1678,
822,
1361,
295,
29918,
29965,
29875,
29898,
1311,
1125,
13,
4706,
1583,
29889,
842,
5907,
7030,
877,
29924,
520,
2142,
29874,
9943,
12657,
1495,
13,
4706,
1583,
29889,
842,
26262,
3505,
29898,
29955,
29945,
29900,
29892,
29906,
29929,
29900,
29897,
13,
13,
13,
1678,
822,
1361,
295,
29918,
3092,
29898,
1311,
1125,
13,
4706,
1583,
29889,
5910,
3125,
29889,
3808,
287,
29889,
6915,
29898,
1311,
29889,
22954,
29897,
13,
4706,
1583,
29889,
5910,
3125,
29918,
29906,
29889,
3808,
287,
29889,
6915,
29898,
1311,
29889,
3179,
295,
29918,
23721,
344,
29897,
13,
4706,
1583,
29889,
5910,
3125,
29918,
29941,
29889,
3808,
287,
29889,
6915,
29898,
1311,
29889,
11371,
29918,
29933,
798,
344,
29897,
13,
4706,
1583,
29889,
5910,
3125,
29918,
29946,
29889,
3808,
287,
29889,
6915,
29898,
1311,
29889,
15167,
29918,
22954,
29897,
259,
13,
4706,
1583,
29889,
5910,
3125,
29918,
29945,
29889,
3808,
287,
29889,
6915,
29898,
1311,
29889,
11371,
29918,
29933,
798,
344,
29897,
539,
13,
4706,
1583,
29889,
5910,
3125,
29918,
29953,
29889,
3808,
287,
29889,
6915,
29898,
1311,
29889,
13454,
29918,
1293,
29918,
22954,
29897,
13,
4706,
1583,
29889,
5910,
3125,
29918,
29955,
29889,
3808,
287,
29889,
6915,
29898,
1311,
29889,
11371,
29918,
29933,
798,
344,
29897,
13,
4706,
1583,
29889,
5910,
3125,
29918,
29947,
29889,
3808,
287,
29889,
6915,
29898,
1311,
29889,
3549,
29918,
4591,
29918,
13454,
1761,
29897,
13,
13,
1678,
822,
1361,
295,
29918,
23721,
344,
29898,
1311,
1125,
13,
4706,
396,
4078,
29918,
6689,
353,
660,
2283,
7647,
29889,
657,
11371,
17020,
29898,
1311,
29892,
5777,
683,
2433,
11371,
1094,
742,
3884,
2433,
29889,
742,
4175,
2433,
3596,
3497,
10456,
5575,
29897,
1495,
13,
4706,
396,
1426,
353,
851,
29898,
7620,
29918,
6689,
29897,
13,
4706,
396,
1024,
353,
313,
726,
29961,
29906,
29901,
1822,
5451,
29317,
29861,
29900,
1822,
6506,
703,
29915,
613,
4907,
876,
13,
4706,
396,
1583,
29889,
1220,
6103,
29918,
29906,
29889,
12038,
29898,
978,
29897,
13,
4706,
4078,
29918,
5479,
353,
660,
2283,
7647,
29889,
657,
1252,
15423,
9882,
29898,
1311,
29892,
376,
11371,
17015,
1159,
13,
4706,
1583,
29889,
1220,
6103,
29918,
29906,
29889,
12038,
29898,
7620,
29918,
5479,
29897,
13,
308,
13,
13,
13,
13,
13,
1678,
822,
1361,
295,
29918,
18035,
29898,
1311,
29892,
2908,
1949,
29892,
2908,
2311,
29892,
2025,
1338,
675,
1125,
13,
4706,
1303,
353,
2908,
1949,
334,
2908,
2311,
13,
4706,
10151,
353,
938,
29898,
949,
334,
29871,
29896,
29900,
29900,
847,
2025,
1338,
675,
29897,
13,
4706,
1583,
29889,
18035,
4297,
29889,
842,
1917,
29898,
25376,
29897,
13,
4706,
660,
4873,
29889,
5014,
13634,
580,
396,
304,
4505,
376,
3664,
2538,
2818,
292,
29908,
410,
552,
29885,
13,
13,
13,
1678,
822,
25553,
29898,
1311,
1125,
13,
4706,
3142,
353,
1583,
29889,
1220,
6103,
29889,
726,
580,
268,
13,
4706,
934,
29918,
978,
353,
3142,
29889,
5451,
11974,
1159,
14352,
29896,
29962,
4706,
13,
4706,
1583,
29889,
1220,
6103,
29918,
29941,
29889,
12038,
29898,
1445,
29918,
978,
29897,
13,
4706,
4423,
353,
1583,
29889,
1220,
6103,
29918,
29906,
29889,
726,
580,
29871,
13,
4706,
4078,
29918,
5479,
353,
4423,
718,
5591,
29908,
718,
1583,
29889,
1220,
6103,
29918,
29941,
29889,
726,
580,
29871,
13,
13,
4706,
4864,
353,
2897,
29889,
2084,
29889,
9933,
29898,
7620,
29918,
5479,
29897,
308,
13,
4706,
565,
451,
4864,
29901,
268,
13,
13,
9651,
1018,
29901,
632,
13,
18884,
3142,
1982,
29889,
3827,
29889,
2271,
276,
509,
2418,
29898,
2271,
29892,
4078,
29918,
5479,
1919,
1583,
29889,
3179,
295,
29918,
18035,
29897,
13,
462,
632,
13,
9651,
5174,
8960,
29901,
13,
18884,
660,
3728,
3313,
29889,
27392,
29898,
1311,
29892,
525,
22954,
4829,
742,
525,
22954,
29098,
29881,
1495,
13,
18884,
736,
13,
9651,
660,
3728,
3313,
29889,
19678,
29898,
1311,
29892,
525,
22954,
15642,
9446,
742,
525,
22954,
4231,
3276,
1495,
13,
9651,
1583,
29889,
18035,
4297,
29889,
842,
1917,
29898,
29900,
29897,
13,
9651,
1583,
29889,
1220,
6103,
29889,
12038,
877,
1495,
13,
9651,
1583,
29889,
1220,
6103,
29918,
29906,
29889,
12038,
877,
1495,
13,
9651,
1583,
29889,
1220,
6103,
29918,
29941,
29889,
12038,
877,
1495,
13,
4706,
1683,
29901,
13,
9651,
660,
3728,
3313,
29889,
27392,
29898,
1311,
29892,
525,
22954,
2216,
362,
742,
525,
4013,
3497,
838,
2040,
1222,
391,
1495,
13,
13,
1678,
822,
16913,
29918,
29933,
798,
344,
29898,
1311,
1125,
13,
4706,
4078,
29918,
5479,
353,
660,
2283,
7647,
29889,
657,
1252,
15423,
9882,
29898,
1311,
29892,
376,
11371,
17015,
1159,
13,
4706,
1583,
29889,
1220,
6103,
29918,
29896,
29941,
29889,
12038,
29898,
7620,
29918,
5479,
29897,
13,
4706,
1583,
29889,
1220,
6103,
29918,
29945,
29889,
12038,
29898,
7620,
29918,
5479,
29897,
13,
4706,
1583,
29889,
1220,
6103,
29918,
29955,
29889,
12038,
29898,
7620,
29918,
5479,
29897,
13,
308,
13,
13,
1678,
822,
373,
29918,
14470,
29918,
15167,
29898,
1311,
29892,
4840,
29892,
19875,
29892,
29871,
6262,
29918,
1745,
17225,
1125,
4706,
13,
4706,
3001,
29918,
2311,
353,
4840,
29889,
5325,
675,
308,
13,
4706,
6262,
29918,
10382,
287,
353,
3001,
29918,
2311,
448,
6262,
29918,
1745,
17225,
13,
4706,
19649,
29918,
974,
29918,
5729,
12757,
353,
6262,
29918,
10382,
287,
847,
3001,
29918,
2311,
334,
29871,
29896,
29900,
29900,
308,
13,
4706,
1583,
29889,
18035,
4297,
29918,
29906,
29889,
842,
1917,
29898,
25376,
482,
29918,
974,
29918,
5729,
12757,
29897,
13,
4706,
660,
4873,
29889,
5014,
13634,
580,
13,
13,
1678,
822,
373,
29918,
14470,
29918,
13454,
1761,
29898,
1311,
29892,
4840,
29892,
19875,
29892,
29871,
6262,
29918,
1745,
17225,
1125,
4706,
13,
4706,
3001,
29918,
2311,
353,
4840,
29889,
5325,
675,
308,
13,
4706,
6262,
29918,
10382,
287,
353,
3001,
29918,
2311,
448,
6262,
29918,
1745,
17225,
13,
4706,
19649,
29918,
974,
29918,
5729,
12757,
353,
6262,
29918,
10382,
287,
847,
3001,
29918,
2311,
334,
29871,
29896,
29900,
29900,
308,
13,
4706,
1583,
29889,
18035,
4297,
29918,
29941,
29889,
842,
1917,
29898,
25376,
482,
29918,
974,
29918,
5729,
12757,
29897,
308,
13,
4706,
660,
4873,
29889,
5014,
13634,
580,
13,
308,
13,
13,
1678,
822,
373,
29918,
14470,
29918,
3549,
29918,
4591,
29918,
13454,
1761,
29898,
1311,
29892,
4840,
29892,
19875,
29892,
29871,
6262,
29918,
1745,
17225,
1125,
4706,
13,
4706,
3001,
29918,
2311,
353,
4840,
29889,
5325,
675,
308,
13,
4706,
6262,
29918,
10382,
287,
353,
3001,
29918,
2311,
448,
6262,
29918,
1745,
17225,
13,
4706,
19649,
29918,
974,
29918,
5729,
12757,
353,
6262,
29918,
10382,
287,
847,
3001,
29918,
2311,
334,
29871,
29896,
29900,
29900,
308,
13,
4706,
1583,
29889,
18035,
4297,
29918,
29946,
29889,
842,
1917,
29898,
25376,
482,
29918,
974,
29918,
5729,
12757,
29897,
13,
4706,
660,
4873,
29889,
5014,
13634,
580,
13,
13,
13,
1678,
822,
13987,
29918,
22954,
29898,
1311,
1125,
308,
13,
4706,
3142,
353,
1583,
29889,
1220,
6103,
29918,
29946,
29889,
726,
580,
13,
4706,
4078,
29918,
5479,
353,
1583,
29889,
1220,
6103,
29918,
29945,
29889,
726,
580,
13,
4706,
1018,
29901,
29871,
13,
9651,
396,
11029,
353,
1583,
29889,
510,
17801,
29889,
3784,
1626,
580,
308,
13,
9651,
343,
29873,
353,
14711,
29898,
2271,
29897,
396,
29892,
373,
29918,
18035,
29918,
14035,
29922,
265,
29918,
18035,
29897,
18884,
13,
9651,
343,
29873,
29889,
9573,
29918,
265,
29918,
18035,
29918,
14035,
29898,
1311,
29889,
265,
29918,
14470,
29918,
15167,
29897,
396,
313,
9641,
29892,
19875,
29918,
2311,
29892,
4863,
29889,
5325,
675,
876,
13,
9651,
396,
4863,
353,
343,
29873,
29889,
5461,
29879,
29889,
2098,
29918,
1609,
877,
9778,
918,
1495,
13,
9651,
396,
4863,
353,
343,
29873,
29889,
5461,
29879,
29889,
657,
29918,
9812,
342,
29918,
9778,
918,
580,
13,
9651,
4863,
353,
343,
29873,
29889,
5461,
29879,
29889,
4572,
29898,
18035,
573,
353,
5852,
29892,
934,
29918,
17588,
353,
376,
1526,
29946,
2564,
4230,
580,
396,
2098,
29918,
1609,
877,
9778,
918,
2824,
4230,
580,
462,
9651,
13,
9651,
4863,
29889,
10382,
29898,
7620,
29918,
5479,
29897,
462,
308,
13,
4706,
5174,
8960,
29901,
13,
9651,
660,
3728,
3313,
29889,
27392,
29898,
1311,
29892,
525,
22954,
4829,
742,
525,
22954,
29098,
29881,
1495,
13,
9651,
736,
418,
13,
13,
4706,
660,
3728,
3313,
29889,
19678,
29898,
1311,
29892,
525,
22954,
15642,
9446,
742,
525,
15167,
25553,
4231,
3276,
1495,
13,
4706,
1583,
29889,
18035,
4297,
29918,
29906,
29889,
842,
1917,
29898,
29900,
29897,
13,
4706,
1583,
29889,
1220,
6103,
29918,
29946,
29889,
12038,
877,
1495,
13,
4706,
1583,
29889,
1220,
6103,
29918,
29945,
29889,
12038,
877,
1495,
13,
13,
13,
1678,
822,
7412,
29918,
1293,
29918,
22954,
29898,
1311,
1125,
308,
13,
4706,
3142,
29918,
1456,
1761,
353,
1583,
29889,
1220,
6103,
29918,
29953,
29889,
726,
580,
13,
4706,
4078,
29918,
5479,
353,
1583,
29889,
1220,
6103,
29918,
29955,
29889,
726,
580,
13,
3986,
13,
4706,
1018,
29901,
1678,
13,
9651,
715,
353,
7412,
1761,
29898,
2271,
29918,
1456,
1761,
29897,
965,
13,
9651,
301,
353,
7431,
29898,
572,
29889,
29894,
7958,
29897,
29871,
13,
9651,
1583,
29889,
1220,
6103,
29918,
29947,
29889,
12038,
29898,
710,
29898,
29880,
876,
29871,
13,
9651,
474,
353,
29871,
29896,
268,
13,
9651,
363,
4863,
297,
313,
572,
29889,
29894,
7958,
1125,
29871,
13,
18884,
1583,
29889,
1220,
6103,
29918,
29929,
29889,
12038,
29898,
710,
29898,
29875,
876,
13,
18884,
4863,
29889,
9573,
29918,
265,
29918,
18035,
29918,
14035,
29898,
1311,
29889,
265,
29918,
14470,
29918,
13454,
1761,
29897,
13,
18884,
474,
4619,
29871,
29896,
632,
13,
18884,
4863,
29889,
5461,
29879,
29889,
4572,
29898,
18035,
573,
353,
5852,
29892,
934,
29918,
17588,
353,
376,
1526,
29946,
2564,
2098,
29918,
1609,
877,
9778,
918,
2824,
657,
29918,
9812,
342,
29918,
9778,
918,
2141,
10382,
29898,
7620,
29918,
5479,
29897,
539,
13,
18884,
1583,
29889,
18035,
4297,
29918,
29941,
29889,
842,
1917,
29898,
29900,
29897,
13,
632,
13,
4706,
5174,
8960,
29901,
13,
9651,
660,
3728,
3313,
29889,
27392,
29898,
1311,
29892,
525,
22954,
4829,
742,
525,
22954,
29098,
29881,
1495,
632,
13,
9651,
736,
259,
13,
13,
4706,
660,
3728,
3313,
29889,
19678,
29898,
1311,
29892,
525,
22954,
15642,
9446,
742,
525,
13454,
1761,
25553,
4231,
3276,
1495,
462,
462,
308,
13,
4706,
1583,
29889,
1220,
6103,
29918,
29953,
29889,
12038,
877,
1495,
13,
4706,
1583,
29889,
1220,
6103,
29918,
29955,
29889,
12038,
877,
1495,
13,
4706,
1583,
29889,
1220,
6103,
29918,
29947,
29889,
12038,
877,
1495,
13,
4706,
1583,
29889,
1220,
6103,
29918,
29929,
29889,
12038,
877,
1495,
13,
13,
1678,
822,
7605,
29918,
4591,
29918,
13454,
1761,
29898,
1311,
1125,
13,
4706,
3142,
29918,
1456,
1761,
353,
1583,
29889,
1220,
6103,
29918,
29896,
29906,
29889,
726,
580,
13,
4706,
4078,
29918,
5479,
353,
1583,
29889,
1220,
6103,
29918,
29896,
29941,
29889,
726,
580,
13,
4706,
1369,
353,
938,
29898,
1311,
29889,
1220,
6103,
29918,
29896,
29896,
29889,
726,
3101,
13,
4706,
1095,
353,
938,
29898,
1311,
29889,
1220,
6103,
29918,
29896,
29900,
29889,
726,
3101,
308,
13,
4706,
1018,
29901,
13,
9651,
715,
353,
7412,
1761,
29898,
2271,
29918,
1456,
1761,
29897,
13,
9651,
363,
4863,
297,
313,
572,
29889,
29894,
7958,
29961,
2962,
29899,
29896,
29901,
355,
29962,
1125,
13,
18884,
4863,
29889,
9573,
29918,
265,
29918,
18035,
29918,
14035,
29898,
1311,
29889,
265,
29918,
14470,
29918,
3549,
29918,
4591,
29918,
13454,
1761,
29897,
13,
18884,
4863,
29889,
5461,
29879,
29889,
4572,
29898,
18035,
573,
353,
5852,
29892,
934,
29918,
17588,
353,
376,
1526,
29946,
2564,
2098,
29918,
1609,
877,
9778,
918,
2824,
657,
29918,
677,
342,
29918,
9778,
918,
2141,
10382,
29898,
7620,
29918,
5479,
29897,
13,
18884,
1583,
29889,
18035,
4297,
29918,
29946,
29889,
842,
1917,
29898,
29900,
29897,
13,
4706,
5174,
8960,
29901,
13,
9651,
660,
3728,
3313,
29889,
27392,
29898,
1311,
29892,
525,
22954,
4829,
742,
525,
22954,
29098,
29881,
1495,
632,
13,
9651,
736,
29871,
13,
4706,
660,
3728,
3313,
29889,
19678,
29898,
1311,
29892,
525,
22954,
15642,
9446,
742,
525,
8592,
7412,
1761,
25553,
4231,
3276,
1495,
13,
4706,
1583,
29889,
1220,
6103,
29918,
29896,
29900,
29889,
12038,
877,
1495,
13,
4706,
1583,
29889,
1220,
6103,
29918,
29896,
29896,
29889,
12038,
877,
1495,
13,
4706,
1583,
29889,
1220,
6103,
29918,
29896,
29906,
29889,
12038,
877,
1495,
13,
4706,
1583,
29889,
1220,
6103,
29918,
29896,
29941,
29889,
12038,
877,
1495,
13,
13,
1753,
1667,
7295,
13,
1678,
623,
353,
660,
4873,
29898,
9675,
29889,
19218,
29897,
13,
1678,
3474,
353,
4241,
2052,
580,
13,
1678,
3474,
29889,
4294,
580,
13,
1678,
623,
29889,
4258,
29918,
580,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
13,
13,
2
] |
showspectralImage.py | guanguanboy/MyHybridSNNew | 0 | 69485 | <gh_stars>0
import keras
from keras.layers import Conv2D, Conv3D, Flatten, Dense, Reshape, BatchNormalization
from keras.layers import Dropout, Input
from keras.models import Model
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint
from keras.utils import np_utils
from sklearn.decomposition import PCA
from sklearn.model_selection import train_test_split
from sklearn.metrics import confusion_matrix, accuracy_score, classification_report, cohen_kappa_score
from operator import truediv
from plotly.offline import init_notebook_mode
import numpy as np
import matplotlib.pyplot as plt
import scipy.io as sio
import os
import spectral
os.environ["CUDA_VISIBLE_DEVICES"] = "3"
## GLOBAL VARIABLES
dataset = 'IP'
test_ratio = 0.7
windowSize = 25
def loadData(name):
data_path = os.path.join(os.getcwd(), 'data')
if name == 'IP':
data = sio.loadmat(os.path.join(data_path, 'Indian_pines_corrected.mat'))['indian_pines_corrected']
labels = sio.loadmat(os.path.join(data_path, 'Indian_pines_gt.mat'))['indian_pines_gt']
elif name == 'SA':
data = sio.loadmat(os.path.join(data_path, 'Salinas_corrected.mat'))['salinas_corrected']
labels = sio.loadmat(os.path.join(data_path, 'Salinas_gt.mat'))['salinas_gt']
elif name == 'PU':
data = sio.loadmat(os.path.join(data_path, 'PaviaU.mat'))['paviaU']
labels = sio.loadmat(os.path.join(data_path, 'PaviaU_gt.mat'))['paviaU_gt']
return data, labels
X, y = loadData(dataset)
print(X.shape, y.shape)
view = spectral.imshow(X, (29, 19, 9))
#view = spectral.imshow(X, (1, 2, 3))
print(view)
plt.show()
#show grandtruth
gt_view = spectral.imshow(classes=y)
plt.show()
#show both the data and the class value
img = X
gt = y
view = spectral.imshow(img, (30, 20, 10), classes=gt)
view.set_display_mode('overlay')
view.class_alpha = 0.5
plt.show()
#saving rgb image files
spectral.save_rgb('rgb.jpg', img, [29, 19, 9])
spectral.save_rgb('gt.jpg', gt, colors=spectral.spy_colors)
#spectral.view_cube(img, spectral.bands=[29, 19, 9])
spectral.view_cube(img,bands=[29, 19, 9])
plt.show()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
13023,
294,
30004,
13,
3166,
13023,
294,
29889,
29277,
1053,
1281,
29894,
29906,
29928,
29892,
1281,
29894,
29941,
29928,
29892,
2379,
8606,
29892,
360,
1947,
29892,
2538,
14443,
29892,
350,
905,
19077,
2133,
30004,
13,
3166,
13023,
294,
29889,
29277,
1053,
20724,
449,
29892,
10567,
30004,
13,
3166,
13023,
294,
29889,
9794,
1053,
8125,
30004,
13,
3166,
13023,
294,
29889,
20640,
19427,
1053,
11783,
30004,
13,
3166,
13023,
294,
29889,
14035,
29879,
1053,
8125,
5596,
3149,
30004,
13,
3166,
13023,
294,
29889,
13239,
1053,
7442,
29918,
13239,
30004,
13,
30004,
13,
3166,
2071,
19668,
29889,
311,
510,
3283,
1053,
349,
5454,
30004,
13,
3166,
2071,
19668,
29889,
4299,
29918,
21731,
1053,
7945,
29918,
1688,
29918,
5451,
30004,
13,
3166,
2071,
19668,
29889,
2527,
10817,
1053,
14679,
29918,
5344,
29892,
13600,
29918,
13628,
29892,
12965,
29918,
12276,
29892,
274,
14899,
29918,
9876,
29918,
13628,
30004,
13,
30004,
13,
3166,
5455,
1053,
534,
6742,
440,
30004,
13,
30004,
13,
3166,
6492,
368,
29889,
2696,
1220,
1053,
2069,
29918,
1333,
19273,
29918,
8513,
30004,
13,
30004,
13,
5215,
12655,
408,
7442,
30004,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
30004,
13,
5215,
4560,
2272,
29889,
601,
408,
269,
601,
30004,
13,
5215,
2897,
30004,
13,
5215,
23161,
30004,
13,
30004,
13,
359,
29889,
21813,
3366,
29907,
29965,
7698,
29918,
28607,
8979,
1307,
29918,
2287,
29963,
2965,
2890,
3108,
353,
376,
29941,
19451,
13,
30004,
13,
2277,
402,
28902,
1964,
478,
1718,
29902,
6181,
29903,
30004,
13,
24713,
353,
525,
5690,
29915,
30004,
13,
1688,
29918,
3605,
601,
353,
29871,
29900,
29889,
29955,
30004,
13,
7165,
3505,
353,
29871,
29906,
29945,
30004,
13,
30004,
13,
1753,
2254,
1469,
29898,
978,
1125,
30004,
13,
1678,
848,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
359,
29889,
657,
29883,
9970,
3285,
525,
1272,
1495,
30004,
13,
1678,
565,
1024,
1275,
525,
5690,
2396,
30004,
13,
4706,
848,
353,
269,
601,
29889,
1359,
2922,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1272,
29918,
2084,
29892,
525,
2568,
713,
29918,
29886,
1475,
29918,
15728,
287,
29889,
2922,
8785,
1839,
513,
713,
29918,
29886,
1475,
29918,
15728,
287,
2033,
30004,
13,
4706,
11073,
353,
269,
601,
29889,
1359,
2922,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1272,
29918,
2084,
29892,
525,
2568,
713,
29918,
29886,
1475,
29918,
4141,
29889,
2922,
8785,
1839,
513,
713,
29918,
29886,
1475,
29918,
4141,
2033,
30004,
13,
1678,
25342,
1024,
1275,
525,
8132,
2396,
30004,
13,
4706,
848,
353,
269,
601,
29889,
1359,
2922,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1272,
29918,
2084,
29892,
525,
20392,
10189,
29918,
15728,
287,
29889,
2922,
8785,
1839,
19585,
10189,
29918,
15728,
287,
2033,
30004,
13,
4706,
11073,
353,
269,
601,
29889,
1359,
2922,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1272,
29918,
2084,
29892,
525,
20392,
10189,
29918,
4141,
29889,
2922,
8785,
1839,
19585,
10189,
29918,
4141,
2033,
30004,
13,
1678,
25342,
1024,
1275,
525,
7056,
2396,
30004,
13,
4706,
848,
353,
269,
601,
29889,
1359,
2922,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1272,
29918,
2084,
29892,
525,
29925,
12751,
29965,
29889,
2922,
8785,
1839,
29886,
12751,
29965,
2033,
30004,
13,
4706,
11073,
353,
269,
601,
29889,
1359,
2922,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1272,
29918,
2084,
29892,
525,
29925,
12751,
29965,
29918,
4141,
29889,
2922,
8785,
1839,
29886,
12751,
29965,
29918,
4141,
2033,
30004,
13,
30004,
13,
1678,
736,
848,
29892,
11073,
30004,
13,
30004,
13,
30004,
13,
29990,
29892,
343,
353,
2254,
1469,
29898,
24713,
8443,
13,
30004,
13,
2158,
29898,
29990,
29889,
12181,
29892,
343,
29889,
12181,
8443,
13,
30004,
13,
1493,
353,
23161,
29889,
326,
4294,
29898,
29990,
29892,
313,
29906,
29929,
29892,
29871,
29896,
29929,
29892,
29871,
29929,
876,
30004,
13,
29937,
1493,
353,
23161,
29889,
326,
4294,
29898,
29990,
29892,
313,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
876,
30004,
13,
30004,
13,
2158,
29898,
1493,
8443,
13,
572,
29873,
29889,
4294,
26471,
13,
30004,
13,
29937,
4294,
4595,
509,
2806,
30004,
13,
4141,
29918,
1493,
353,
23161,
29889,
326,
4294,
29898,
13203,
29922,
29891,
8443,
13,
572,
29873,
29889,
4294,
26471,
13,
30004,
13,
29937,
4294,
1716,
278,
848,
322,
278,
770,
995,
30004,
13,
2492,
353,
1060,
30004,
13,
4141,
353,
343,
30004,
13,
30004,
13,
1493,
353,
23161,
29889,
326,
4294,
29898,
2492,
29892,
313,
29941,
29900,
29892,
29871,
29906,
29900,
29892,
29871,
29896,
29900,
511,
4413,
29922,
4141,
8443,
13,
1493,
29889,
842,
29918,
4990,
29918,
8513,
877,
957,
8387,
1495,
30004,
13,
1493,
29889,
1990,
29918,
2312,
353,
29871,
29900,
29889,
29945,
30004,
13,
572,
29873,
29889,
4294,
26471,
13,
30004,
13,
29937,
29879,
5555,
15552,
29890,
1967,
2066,
30004,
13,
21494,
1705,
29889,
7620,
29918,
23973,
877,
23973,
29889,
6173,
742,
10153,
29892,
518,
29906,
29929,
29892,
29871,
29896,
29929,
29892,
29871,
29929,
2314,
30004,
13,
30004,
13,
21494,
1705,
29889,
7620,
29918,
23973,
877,
4141,
29889,
6173,
742,
330,
29873,
29892,
11955,
29922,
21494,
1705,
29889,
1028,
29891,
29918,
27703,
8443,
13,
30004,
13,
29937,
21494,
1705,
29889,
1493,
29918,
29883,
4003,
29898,
2492,
29892,
23161,
29889,
29890,
4167,
11759,
29906,
29929,
29892,
29871,
29896,
29929,
29892,
29871,
29929,
2314,
30004,
13,
30004,
13,
21494,
1705,
29889,
1493,
29918,
29883,
4003,
29898,
2492,
29892,
29890,
4167,
11759,
29906,
29929,
29892,
29871,
29896,
29929,
29892,
29871,
29929,
2314,
30004,
13,
572,
29873,
29889,
4294,
26471,
13,
30004,
13,
2
] |
tests/unit/test_base_adapter.py | norton120/snowshu | 0 | 59927 | <gh_stars>0
import pytest
from snowshu.adapters import BaseSQLAdapter
from tests.common import rand_string
from snowshu.core.models.credentials import Credentials, USER, PASSWORD, HOST, ACCOUNT, SCHEMA, DATABASE, ROLE
def rand_creds(args) -> Credentials:
kwargs = dict(zip(args, [rand_string(10) for _ in range(len(args))]))
return Credentials(**kwargs)
class TestAdapter(BaseSQLAdapter):
REQUIRED_CREDENTIALS = (USER, PASSWORD, HOST)
ALLOWED_CREDENTIALS = (ACCOUNT, SCHEMA)
DATA_TYPE_MAPPINGS = dict()
MATERIALIZATION_MAPPINGS = dict()
def test_sets_credentials():
base = TestAdapter()
with pytest.raises(KeyError):
base.credentials = rand_creds((HOST,))
with pytest.raises(KeyError):
base.credentials = rand_creds((USER, PASSWORD, HOST, DATABASE,))
base.credentials = rand_creds((USER, PASSWORD, HOST,))
base.credentials = rand_creds((USER, PASSWORD, HOST, ACCOUNT,))
def test_default_conn_string():
base = TestAdapter()
base.dialect = 'postgres'
base.REQUIRED_CREDENTIALS = (USER, PASSWORD, DATABASE, HOST)
base.ALLOWED_CREDENTIALS = (ROLE, SCHEMA, ACCOUNT)
creds = rand_creds((USER, PASSWORD, HOST, DATABASE, ACCOUNT,))
base.credentials = creds
assert base._build_conn_string(
) == f'postgres://{creds.user}:{creds.password}@{creds.host}/{creds.database}?account={creds.account}'
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
11451,
1688,
13,
3166,
15007,
845,
29884,
29889,
328,
481,
2153,
1053,
7399,
4176,
6168,
13,
3166,
6987,
29889,
9435,
1053,
20088,
29918,
1807,
13,
3166,
15007,
845,
29884,
29889,
3221,
29889,
9794,
29889,
11944,
9409,
1053,
24596,
9409,
29892,
3148,
1001,
29892,
17687,
1799,
17013,
29892,
379,
3718,
29892,
14614,
18736,
29892,
317,
3210,
26862,
29892,
27640,
27982,
29892,
16641,
1307,
13,
13,
13,
1753,
20088,
29918,
1037,
6289,
29898,
5085,
29897,
1599,
24596,
9409,
29901,
13,
1678,
9049,
5085,
353,
9657,
29898,
7554,
29898,
5085,
29892,
518,
9502,
29918,
1807,
29898,
29896,
29900,
29897,
363,
903,
297,
3464,
29898,
2435,
29898,
5085,
876,
12622,
13,
1678,
736,
24596,
9409,
29898,
1068,
19290,
29897,
13,
13,
13,
1990,
4321,
6168,
29898,
5160,
4176,
6168,
1125,
13,
13,
1678,
5195,
29984,
3120,
19386,
29918,
29907,
19386,
3919,
25758,
29903,
353,
313,
11889,
29892,
17687,
1799,
17013,
29892,
379,
3718,
29897,
13,
1678,
15149,
9806,
3352,
29918,
29907,
19386,
3919,
25758,
29903,
353,
313,
2477,
18736,
29892,
317,
3210,
26862,
29897,
13,
1678,
360,
8254,
29918,
11116,
29918,
1529,
18009,
4214,
29903,
353,
9657,
580,
13,
1678,
341,
1299,
1001,
25758,
26664,
8098,
29918,
1529,
18009,
4214,
29903,
353,
9657,
580,
13,
13,
13,
1753,
1243,
29918,
7224,
29918,
11944,
9409,
7295,
13,
13,
1678,
2967,
353,
4321,
6168,
580,
13,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
2558,
2392,
1125,
13,
4706,
2967,
29889,
11944,
9409,
353,
20088,
29918,
1037,
6289,
3552,
20832,
29892,
876,
13,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
2558,
2392,
1125,
13,
4706,
2967,
29889,
11944,
9409,
353,
20088,
29918,
1037,
6289,
3552,
11889,
29892,
17687,
1799,
17013,
29892,
379,
3718,
29892,
27640,
27982,
29892,
876,
13,
13,
1678,
2967,
29889,
11944,
9409,
353,
20088,
29918,
1037,
6289,
3552,
11889,
29892,
17687,
1799,
17013,
29892,
379,
3718,
29892,
876,
13,
13,
1678,
2967,
29889,
11944,
9409,
353,
20088,
29918,
1037,
6289,
3552,
11889,
29892,
17687,
1799,
17013,
29892,
379,
3718,
29892,
14614,
18736,
29892,
876,
13,
13,
13,
1753,
1243,
29918,
4381,
29918,
13082,
29918,
1807,
7295,
13,
1678,
2967,
353,
4321,
6168,
580,
13,
1678,
2967,
29889,
15321,
781,
353,
525,
2490,
7201,
29915,
13,
13,
1678,
2967,
29889,
1525,
29984,
3120,
19386,
29918,
29907,
19386,
3919,
25758,
29903,
353,
313,
11889,
29892,
17687,
1799,
17013,
29892,
27640,
27982,
29892,
379,
3718,
29897,
13,
1678,
2967,
29889,
1964,
27998,
3352,
29918,
29907,
19386,
3919,
25758,
29903,
353,
313,
1672,
1307,
29892,
317,
3210,
26862,
29892,
14614,
18736,
29897,
13,
13,
1678,
907,
6289,
353,
20088,
29918,
1037,
6289,
3552,
11889,
29892,
17687,
1799,
17013,
29892,
379,
3718,
29892,
27640,
27982,
29892,
14614,
18736,
29892,
876,
13,
1678,
2967,
29889,
11944,
9409,
353,
907,
6289,
13,
13,
1678,
4974,
2967,
3032,
4282,
29918,
13082,
29918,
1807,
29898,
13,
1678,
1723,
1275,
285,
29915,
2490,
7201,
597,
29912,
1037,
6289,
29889,
1792,
6177,
29912,
1037,
6289,
29889,
5630,
29913,
28312,
1037,
6289,
29889,
3069,
6822,
29912,
1037,
6289,
29889,
9803,
29913,
29973,
10149,
3790,
1037,
6289,
29889,
10149,
10162,
13,
13,
13,
2
] |
model/constants.py | JIMENOFONSECA/HBLM-USA | 1 | 147507 | <filename>model/constants.py<gh_stars>1-10
'''
MIT License
Copyright (c) 2020 <NAME>
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.
'''
MODEL_NAME = "HBLM-USA 1.0"
samples = 100
response_variable = "LOG_SITE_ENERGY_kWh_yr"
predictor_variables = ["LOG_THERMAL_ENERGY_kWh_yr", "CLUSTER_LOG_SITE_EUI_kWh_m2yr"]
random_state = 170
n_clusters = 5
storey_height_m = 3
air_density_kgm3 = 1.202
hours_of_day = 24
COP_cooling = 3.3
COP_heating = 3.0
RH_base_cooling_perc = 60
RH_base_heating_perc = 30
T_base_cooling_C = 18.5
T_base_heating_C = 18.5
ACH_Commercial = 6.0
ACH_Residential = 4.0
ZONE_NAMES = {"Hot-humid": ["1A", "2A", "3A"],
"Hot-dry": ["2B", "3B"],
"Hot-marine": ["3C"],
"Mixed-humid": ["4A"],
"Mixed-dry": ["4B"],
"Mixed-marine": ["4C"],
"Cold-humid": ["5A", "6A"],
"Cold-dry": ["5B", "6B", "7"]} | [
1,
529,
9507,
29958,
4299,
29914,
3075,
1934,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
12008,
13,
26349,
19245,
13,
13,
11882,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29900,
529,
5813,
29958,
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,
12008,
13,
13,
20387,
29931,
29918,
5813,
353,
376,
29950,
13367,
29924,
29899,
27019,
29871,
29896,
29889,
29900,
29908,
13,
27736,
353,
29871,
29896,
29900,
29900,
13,
5327,
29918,
11918,
353,
376,
14480,
29918,
29903,
9094,
29918,
1430,
1001,
29954,
29979,
29918,
29895,
8809,
29918,
4316,
29908,
13,
27711,
272,
29918,
20897,
353,
6796,
14480,
29918,
29911,
4448,
1529,
29931,
29918,
1430,
1001,
29954,
29979,
29918,
29895,
8809,
29918,
4316,
613,
376,
6154,
17321,
1001,
29918,
14480,
29918,
29903,
9094,
29918,
29923,
3120,
29918,
29895,
8809,
29918,
29885,
29906,
4316,
3108,
13,
8172,
29918,
3859,
353,
29871,
29896,
29955,
29900,
13,
29876,
29918,
695,
504,
414,
353,
29871,
29945,
13,
8899,
29891,
29918,
3545,
29918,
29885,
353,
29871,
29941,
13,
1466,
29918,
21518,
537,
29918,
9415,
29885,
29941,
353,
29871,
29896,
29889,
29906,
29900,
29906,
13,
29882,
2470,
29918,
974,
29918,
3250,
353,
29871,
29906,
29946,
13,
3217,
29925,
29918,
1111,
324,
292,
353,
29871,
29941,
29889,
29941,
13,
3217,
29925,
29918,
354,
1218,
353,
29871,
29941,
29889,
29900,
13,
29934,
29950,
29918,
3188,
29918,
1111,
324,
292,
29918,
546,
29883,
353,
29871,
29953,
29900,
13,
29934,
29950,
29918,
3188,
29918,
354,
1218,
29918,
546,
29883,
353,
29871,
29941,
29900,
13,
29911,
29918,
3188,
29918,
1111,
324,
292,
29918,
29907,
353,
29871,
29896,
29947,
29889,
29945,
13,
29911,
29918,
3188,
29918,
354,
1218,
29918,
29907,
353,
29871,
29896,
29947,
29889,
29945,
13,
2477,
29950,
29918,
1523,
1050,
1455,
353,
29871,
29953,
29889,
29900,
13,
2477,
29950,
29918,
1666,
1693,
616,
353,
29871,
29946,
29889,
29900,
13,
29999,
12413,
29918,
5813,
29903,
353,
8853,
28917,
29899,
16063,
333,
1115,
6796,
29896,
29909,
613,
376,
29906,
29909,
613,
376,
29941,
29909,
12436,
13,
795,
376,
28917,
29899,
29881,
719,
1115,
6796,
29906,
29933,
613,
376,
29941,
29933,
12436,
13,
795,
376,
28917,
29899,
24556,
1115,
6796,
29941,
29907,
12436,
13,
795,
376,
29924,
11925,
29899,
16063,
333,
1115,
6796,
29946,
29909,
12436,
13,
795,
376,
29924,
11925,
29899,
29881,
719,
1115,
6796,
29946,
29933,
12436,
13,
795,
376,
29924,
11925,
29899,
24556,
1115,
6796,
29946,
29907,
12436,
13,
795,
376,
29907,
1025,
29899,
16063,
333,
1115,
6796,
29945,
29909,
613,
376,
29953,
29909,
12436,
13,
795,
376,
29907,
1025,
29899,
29881,
719,
1115,
6796,
29945,
29933,
613,
376,
29953,
29933,
613,
376,
29955,
3108,
29913,
2
] |
Subsets and Splits