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
|
---|---|---|---|---|---|
TCU/usageexample/automationexample.py | p--q/TCU | 0 | 11767 | <reponame>p--q/TCU
#!/opt/libreoffice5.4/program/python
# -*- coding: utf-8 -*-
import unohelper # オートメーションには必須(必須なのはuno)。
def macro():
ctx = XSCRIPTCONTEXT.getComponentContext() # コンポーネントコンテクストの取得。
smgr = ctx.getServiceManager() # サービスマネージャーの取得。
tcu = smgr.createInstanceWithContext("pq.Tcu", ctx) # サービス名か実装名でインスタンス化。
print("\n".join(tcu.treelines(ctx)))
g_exportedScripts = macro, #マクロセレクターに限定表示させる関数をタプルで指定。
if __name__ == "__main__": # オートメーションで実行するとき
def automation(): # オートメーションのためにglobalに出すのはこの関数のみにする。
import officehelper
from functools import wraps
import sys
from com.sun.star.beans import PropertyValue
from com.sun.star.script.provider import XScriptContext
def connectOffice(func): # funcの前後でOffice接続の処理
@wraps(func)
def wrapper(): # LibreOfficeをバックグラウンドで起動してコンポーネントテクストとサービスマネジャーを取得する。
try:
ctx = officehelper.bootstrap() # コンポーネントコンテクストの取得。
except:
print("Could not establish a connection with a running office.", file=sys.stderr)
sys.exit()
print("Connected to a running office ...")
smgr = ctx.getServiceManager() # サービスマネジャーの取得。
print("Using {} {}".format(*_getLOVersion(ctx, smgr))) # LibreOfficeのバージョンを出力。
return func(ctx, smgr) # 引数の関数の実行。
def _getLOVersion(ctx, smgr): # LibreOfficeの名前とバージョンを返す。
cp = smgr.createInstanceWithContext('com.sun.star.configuration.ConfigurationProvider', ctx)
node = PropertyValue(Name = 'nodepath', Value = 'org.openoffice.Setup/Product' ) # share/registry/main.xcd内のノードパス。
ca = cp.createInstanceWithArguments('com.sun.star.configuration.ConfigurationAccess', (node,))
return ca.getPropertyValues(('ooName', 'ooSetupVersion')) # LibreOfficeの名前とバージョンをタプルで返す。
return wrapper
@connectOffice # createXSCRIPTCONTEXTの引数にctxとsmgrを渡すデコレータ。
def createXSCRIPTCONTEXT(ctx, smgr): # XSCRIPTCONTEXTを生成。
class ScriptContext(unohelper.Base, XScriptContext):
def __init__(self, ctx):
self.ctx = ctx
def getComponentContext(self):
return self.ctx
def getDesktop(self):
return ctx.getByName('/singletons/com.sun.star.frame.theDesktop') # com.sun.star.frame.Desktopはdeprecatedになっている。
def getDocument(self):
return self.getDesktop().getCurrentComponent()
return ScriptContext(ctx)
XSCRIPTCONTEXT = createXSCRIPTCONTEXT() # XSCRIPTCONTEXTの取得。
doc = XSCRIPTCONTEXT.getDocument() # 現在開いているドキュメントを取得。
doctype = "scalc", "com.sun.star.sheet.SpreadsheetDocument" # Calcドキュメントを開くとき。
# doctype = "swriter", "com.sun.star.text.TextDocument" # Writerドキュメントを開くとき。
if (doc is None) or (not doc.supportsService(doctype[1])): # ドキュメントが取得できなかった時またはCalcドキュメントではない時
XSCRIPTCONTEXT.getDesktop().loadComponentFromURL("private:factory/{}".format(doctype[0]), "_blank", 0, ()) # ドキュメントを開く。ここでdocに代入してもドキュメントが開く前にmacro()が呼ばれてしまう。
flg = True
while flg:
doc = XSCRIPTCONTEXT.getDocument() # 現在開いているドキュメントを取得。
if doc is not None:
flg = (not doc.supportsService(doctype[1])) # ドキュメントタイプが確認できたらwhileを抜ける。
return XSCRIPTCONTEXT
XSCRIPTCONTEXT = automation() # XSCRIPTCONTEXTを取得。
macro() # マクロの実行。
| [
1,
529,
276,
1112,
420,
29958,
29886,
489,
29939,
29914,
9472,
29965,
13,
29937,
14708,
3670,
29914,
492,
1030,
20205,
29945,
29889,
29946,
29914,
8860,
29914,
4691,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
5215,
443,
1148,
295,
546,
29871,
396,
29871,
30514,
30185,
30279,
30604,
30185,
30373,
30907,
30203,
30353,
30449,
31641,
236,
163,
139,
29898,
31641,
236,
163,
139,
30371,
30199,
30449,
9447,
29897,
30267,
13,
1753,
11758,
7295,
13,
12,
13073,
353,
1060,
7187,
24290,
6007,
16975,
29889,
657,
5308,
2677,
580,
29871,
396,
29871,
30459,
30203,
31205,
30185,
31038,
30203,
30279,
30459,
30203,
30572,
30305,
30255,
30279,
30199,
30683,
31050,
30267,
13,
12,
3844,
629,
353,
12893,
29889,
657,
3170,
3260,
580,
29871,
396,
29871,
30615,
30185,
30809,
30255,
30388,
31038,
30185,
30391,
30561,
30185,
30199,
30683,
31050,
30267,
29871,
13,
12,
29873,
4979,
353,
1560,
629,
29889,
3258,
4998,
3047,
2677,
703,
29886,
29939,
29889,
29911,
4979,
613,
12893,
29897,
29871,
396,
29871,
30615,
30185,
30809,
30255,
30548,
30412,
31525,
31905,
30548,
30499,
30260,
30203,
30255,
30369,
30203,
30255,
30705,
30267,
13,
12,
2158,
14182,
29876,
1642,
7122,
29898,
29873,
4979,
29889,
2484,
24210,
29898,
13073,
4961,
13,
29887,
29918,
15843,
287,
4081,
29879,
353,
11758,
29892,
396,
30388,
30305,
30378,
30885,
30420,
30305,
30369,
30185,
30353,
31175,
30495,
30746,
30858,
30566,
31095,
30332,
31606,
30354,
30396,
30369,
30605,
30258,
30499,
31084,
30495,
30267,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
29871,
396,
29871,
30514,
30185,
30279,
30604,
30185,
30373,
30907,
30203,
30499,
31525,
30448,
30427,
30332,
30364,
30538,
13,
12,
1753,
3345,
362,
7295,
29871,
396,
29871,
30514,
30185,
30279,
30604,
30185,
30373,
30907,
30203,
30199,
30366,
30954,
30353,
10945,
30353,
30544,
30427,
30199,
30449,
30589,
30199,
31606,
30354,
30199,
30735,
30353,
30427,
30332,
30267,
13,
12,
12,
5215,
8034,
20907,
13,
12,
12,
3166,
2090,
312,
8789,
1053,
11463,
567,
13,
12,
12,
5215,
10876,
13,
12,
12,
3166,
419,
29889,
11445,
29889,
8508,
29889,
11700,
1053,
9079,
1917,
13,
12,
12,
3166,
419,
29889,
11445,
29889,
8508,
29889,
2154,
29889,
18121,
1053,
1060,
4081,
2677,
259,
13,
12,
12,
1753,
4511,
27247,
29898,
9891,
1125,
29871,
396,
3653,
30199,
30658,
31220,
30499,
27247,
31092,
234,
185,
157,
30199,
232,
138,
169,
30687,
13,
12,
12,
12,
29992,
29893,
336,
567,
29898,
9891,
29897,
13,
12,
12,
12,
1753,
14476,
7295,
29871,
396,
8153,
276,
27247,
30396,
30517,
30317,
30305,
30521,
30281,
30537,
30203,
30335,
30499,
31558,
31124,
30326,
30466,
30459,
30203,
31205,
30185,
31038,
30203,
30279,
30572,
30305,
30255,
30279,
30364,
30615,
30185,
30809,
30255,
30388,
31038,
30391,
30561,
30185,
30396,
30683,
31050,
30427,
30332,
30267,
13,
12,
12,
12,
12,
2202,
29901,
13,
12,
12,
12,
12,
12,
13073,
353,
8034,
20907,
29889,
8704,
580,
29871,
396,
29871,
30459,
30203,
31205,
30185,
31038,
30203,
30279,
30459,
30203,
30572,
30305,
30255,
30279,
30199,
30683,
31050,
30267,
13,
12,
12,
12,
12,
19499,
29901,
13,
12,
12,
12,
12,
12,
2158,
703,
23323,
451,
10127,
263,
3957,
411,
263,
2734,
8034,
19602,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
12,
12,
12,
12,
12,
9675,
29889,
13322,
580,
13,
12,
12,
12,
12,
2158,
703,
20971,
2954,
304,
263,
2734,
8034,
2023,
1159,
13,
12,
12,
12,
12,
3844,
629,
353,
12893,
29889,
657,
3170,
3260,
580,
29871,
396,
29871,
30615,
30185,
30809,
30255,
30388,
31038,
30391,
30561,
30185,
30199,
30683,
31050,
30267,
13,
12,
12,
12,
12,
2158,
703,
15156,
6571,
6571,
1642,
4830,
10456,
29918,
657,
3927,
6594,
29898,
13073,
29892,
1560,
629,
4961,
29871,
396,
8153,
276,
27247,
30199,
30517,
30185,
30391,
30907,
30203,
30396,
30544,
31074,
30267,
13,
12,
12,
12,
12,
2457,
3653,
29898,
13073,
29892,
1560,
629,
29897,
29871,
396,
29871,
31674,
30354,
30199,
31606,
30354,
30199,
31525,
30448,
30267,
13,
12,
12,
12,
1753,
903,
657,
3927,
6594,
29898,
13073,
29892,
1560,
629,
1125,
29871,
396,
8153,
276,
27247,
30199,
30548,
30658,
30364,
30517,
30185,
30391,
30907,
30203,
30396,
31086,
30427,
30267,
13,
12,
12,
12,
12,
6814,
353,
1560,
629,
29889,
3258,
4998,
3047,
2677,
877,
510,
29889,
11445,
29889,
8508,
29889,
13305,
29889,
8614,
6980,
742,
12893,
29897,
13,
12,
12,
12,
12,
3177,
353,
9079,
1917,
29898,
1170,
353,
525,
3177,
2084,
742,
7865,
353,
525,
990,
29889,
3150,
20205,
29889,
26947,
29914,
7566,
29915,
1723,
29871,
396,
6232,
29914,
1727,
6020,
29914,
3396,
29889,
29916,
2252,
30728,
30199,
30901,
30185,
30335,
30715,
30255,
30267,
13,
12,
12,
12,
12,
1113,
353,
21447,
29889,
3258,
4998,
3047,
26915,
877,
510,
29889,
11445,
29889,
8508,
29889,
13305,
29889,
8614,
6638,
742,
313,
3177,
29892,
876,
13,
12,
12,
12,
12,
2457,
5777,
29889,
657,
4854,
9065,
29898,
877,
3634,
1170,
742,
525,
3634,
26947,
6594,
8785,
29871,
396,
8153,
276,
27247,
30199,
30548,
30658,
30364,
30517,
30185,
30391,
30907,
30203,
30396,
30369,
30605,
30258,
30499,
31086,
30427,
30267,
13,
12,
12,
12,
2457,
14476,
13,
12,
12,
29992,
6915,
27247,
29871,
396,
1653,
29990,
7187,
24290,
6007,
16975,
30199,
31674,
30354,
30353,
13073,
30364,
3844,
629,
30396,
31858,
30427,
30597,
30459,
30420,
30185,
30369,
30267,
13,
12,
12,
1753,
1653,
29990,
7187,
24290,
6007,
16975,
29898,
13073,
29892,
1560,
629,
1125,
29871,
396,
1060,
7187,
24290,
6007,
16975,
30396,
30486,
30494,
30267,
13,
12,
12,
12,
1990,
14415,
2677,
29898,
348,
1148,
295,
546,
29889,
5160,
29892,
1060,
4081,
2677,
1125,
13,
12,
12,
12,
12,
1753,
4770,
2344,
12035,
1311,
29892,
12893,
1125,
13,
12,
12,
12,
12,
12,
1311,
29889,
13073,
353,
12893,
13,
12,
12,
12,
12,
1753,
679,
5308,
2677,
29898,
1311,
1125,
13,
12,
12,
12,
12,
12,
2457,
1583,
29889,
13073,
13,
12,
12,
12,
12,
1753,
679,
17600,
29898,
1311,
1125,
13,
12,
12,
12,
12,
12,
2457,
12893,
29889,
657,
2059,
1170,
11219,
2976,
1026,
787,
29914,
510,
29889,
11445,
29889,
8508,
29889,
2557,
29889,
1552,
17600,
1495,
29871,
396,
419,
29889,
11445,
29889,
8508,
29889,
2557,
29889,
17600,
30449,
311,
17990,
630,
30353,
30371,
30665,
30466,
30298,
30332,
30267,
13,
12,
12,
12,
12,
1753,
679,
6268,
29898,
1311,
1125,
13,
12,
12,
12,
12,
12,
2457,
1583,
29889,
657,
17600,
2141,
657,
7583,
5308,
580,
13,
12,
12,
12,
2457,
14415,
2677,
29898,
13073,
29897,
259,
13,
12,
12,
29990,
7187,
24290,
6007,
16975,
353,
1653,
29990,
7187,
24290,
6007,
16975,
580,
29871,
396,
1060,
7187,
24290,
6007,
16975,
30199,
30683,
31050,
30267,
13,
12,
12,
1514,
353,
1060,
7187,
24290,
6007,
16975,
29889,
657,
6268,
580,
29871,
396,
29871,
31928,
30505,
31404,
30298,
30466,
30298,
30332,
30335,
30454,
30645,
30604,
30203,
30279,
30396,
30683,
31050,
30267,
13,
12,
12,
1867,
312,
668,
353,
376,
19529,
29883,
613,
376,
510,
29889,
11445,
29889,
8508,
29889,
9855,
29889,
5592,
27844,
6268,
29908,
29871,
396,
3037,
29883,
30335,
30454,
30645,
30604,
30203,
30279,
30396,
31404,
30568,
30364,
30538,
30267,
13,
12,
29937,
29871,
437,
312,
668,
353,
376,
2774,
5385,
613,
376,
510,
29889,
11445,
29889,
8508,
29889,
726,
29889,
1626,
6268,
29908,
29871,
396,
399,
5385,
30335,
30454,
30645,
30604,
30203,
30279,
30396,
31404,
30568,
30364,
30538,
30267,
13,
12,
12,
361,
313,
1514,
338,
6213,
29897,
470,
313,
1333,
1574,
29889,
5924,
29879,
3170,
29898,
1867,
312,
668,
29961,
29896,
12622,
29901,
29871,
396,
29871,
30335,
30454,
30645,
30604,
30203,
30279,
30458,
30683,
31050,
30499,
30538,
30371,
30412,
30665,
30366,
30974,
30441,
30366,
30449,
7856,
29883,
30335,
30454,
30645,
30604,
30203,
30279,
30499,
30449,
30371,
30298,
30974,
13,
12,
12,
12,
29990,
7187,
24290,
6007,
16975,
29889,
657,
17600,
2141,
1359,
5308,
4591,
4219,
703,
9053,
29901,
14399,
29914,
8875,
1642,
4830,
29898,
1867,
312,
668,
29961,
29900,
11724,
11119,
19465,
613,
29871,
29900,
29892,
313,
876,
29871,
396,
29871,
30335,
30454,
30645,
30604,
30203,
30279,
30396,
31404,
30568,
30267,
30589,
30589,
30499,
1514,
30353,
30690,
30752,
30326,
30466,
30723,
30335,
30454,
30645,
30604,
30203,
30279,
30458,
31404,
30568,
30658,
30353,
25254,
580,
30458,
232,
148,
191,
31254,
30553,
30466,
30326,
30441,
30465,
30267,
13,
12,
12,
1579,
29887,
353,
5852,
13,
12,
12,
8000,
1652,
29887,
29901,
13,
12,
12,
12,
1514,
353,
1060,
7187,
24290,
6007,
16975,
29889,
657,
6268,
580,
29871,
396,
29871,
31928,
30505,
31404,
30298,
30466,
30298,
30332,
30335,
30454,
30645,
30604,
30203,
30279,
30396,
30683,
31050,
30267,
13,
12,
12,
12,
361,
1574,
338,
451,
6213,
29901,
13,
12,
12,
12,
12,
1579,
29887,
353,
313,
1333,
1574,
29889,
5924,
29879,
3170,
29898,
1867,
312,
668,
29961,
29896,
12622,
29871,
396,
29871,
30335,
30454,
30645,
30604,
30203,
30279,
30369,
30260,
30605,
30458,
234,
165,
189,
235,
173,
144,
30499,
30538,
30366,
30513,
8000,
30396,
233,
141,
159,
30807,
30332,
30267,
13,
12,
12,
2457,
1060,
7187,
24290,
6007,
16975,
13,
12,
29990,
7187,
24290,
6007,
16975,
353,
3345,
362,
580,
29871,
396,
1060,
7187,
24290,
6007,
16975,
30396,
30683,
31050,
30267,
29871,
13,
12,
25254,
580,
29871,
396,
29871,
30388,
30305,
30378,
30199,
31525,
30448,
30267,
13,
12,
259,
2
] |
SLpackage/private/pacbio/pythonpkgs/pbsmrtpipe/lib/python2.7/site-packages/pbsmrtpipe/validators.py | fanglab/6mASCOPE | 5 | 130183 | """General validation functions"""
from __future__ import absolute_import, division, print_function
import logging
import types
import inspect
from pbcommand.models import (FileTypes, TaskTypes, SymbolTypes, ResourceTypes, FileType)
from pbsmrtpipe.exceptions import (MalformedMetaTaskError, MalformedPipelineError)
from pbsmrtpipe.constants import RX_VERSION, RX_CHUNK_KEY, RX_TASK_ID
log = logging.getLogger(__name__)
def to_list_if_necessary(tuple_or_s):
if isinstance(tuple_or_s, tuple):
return list(tuple_or_s)
return tuple_or_s
def __validate_output_file_names(output_types, output_file_names):
errors = []
if isinstance(output_file_names, (list, tuple)):
for x in output_file_names:
if isinstance(x, (list, tuple)):
if len(x) != 2:
errors.append("Malformed output file name {x}. Expected 2-tuple (str, str).".format(x=x))
if len(output_file_names) == len(output_types):
# this is only branch where the outputs and override outputs file names are valid
return True
else:
errors.append("Malformed output file names. Expected {n}. Got {m}".format(n=output_types, m=output_file_names))
else:
errors.append("Malformed output file name. Expected [(str, str)]. Got {m}".format(m=output_file_names))
log.error("\n".join(errors))
raise ValueError("\n".join(errors))
def _validate_output_file_names(output_types, output_files_names_or_none):
if output_files_names_or_none is not None:
__validate_output_file_names(output_types, output_files_names_or_none)
out_names = output_files_names_or_none
else:
out_names = []
return out_names
def _validate_output_file_names_or_raise(output_types, output_file_names_or_none, task_id):
try:
return _validate_output_file_names(output_types, output_file_names_or_none)
except Exception:
msg = "task id {i} Output file types ({n}) and override output file names ({m}) supplied are NOT compatible ".format(n=len(output_types), m=len(output_file_names_or_none), i=task_id)
log.error(msg)
raise
def __validate_provided_file_types(file_types):
def _is_valid(x):
if not isinstance(x, FileType):
raise TypeError("Invalid FileType. Got {t}".format(t=type(x)))
for i in file_types:
_is_valid(i)
return file_types
def validate_provided_file_types(file_type_or_file_types):
if isinstance(file_type_or_file_types, FileType):
return [file_type_or_file_types]
return __validate_provided_file_types(file_type_or_file_types)
def __is_schema(d):
try:
p = d['property']
keys = p.keys()
oid = keys[0]
if len(keys) != 1:
raise IndexError
_ = d['property'][oid]['default']
return True
except (KeyError, IndexError):
return False
def _is_schema_list(value):
if isinstance(value, dict):
if value:
__is_schema(value)
return value
else:
# empty
return value
if isinstance(value, (list, tuple)):
return all(__is_schema(x) for x in value)
return False
def _validate_mutable_files(mutable_files_or_none, input_types, output_types):
"""
1. Valid well-formed string
2. Valid that indices are pointed
3. Valid the input/output types are the same
:param mutable_files_or_none: [("$input.0, "$output.0"), ]
:param input_types:
:param output_types:
:return:
"""
if mutable_files_or_none is None:
return ()
for mutable_file in mutable_files_or_none:
if len(mutable_file) != 2:
raise ValueError("Malformed mutable file name {n}. Expected tuple of (str, str)".format(n=mutable_file))
in_f, out_f = mutable_file
if not in_f.startswith("$inputs.") or not out_f.startswith("$outputs.0"):
raise ValueError("Malformed mutable file ({i}, {f})".format(i=in_f, f=out_f))
ix = int(in_f.split("$inputs.")[-1])
ox = int(out_f.split("$outputs.")[-1])
ixt = input_types[ix]
oxt = output_types[ox]
if ixt != oxt:
log.warn("Mutable types are different. {i} {t} -> {o} {f}".format(i=ix, t=ixt, o=ox, f=oxt))
# we got here, everything is fine
return mutable_files_or_none
def _validate_func_with_n_args(nargs, func):
p = inspect.getargspec(func)
if len(p.args) != nargs:
raise ValueError("Expected func {x} to have {n} args. Got {y}".format(x=func.__name__, n=nargs, y=len(p.args)))
return func
def _validate_chunk_only_input_type(in_out_types):
if len(in_out_types) == 1:
if in_out_types[0] == FileTypes.CHUNK:
return True
raise ValueError("Expected chunk file type in {i}".format(i=in_out_types))
def _get_class_attr_or_raise(class_name, attr, d):
if attr not in d:
raise MalformedMetaTaskError("MetaTask class '{c}' is missing required class var '{n}'".format(c=class_name, n=attr))
else:
return d[attr]
def _raise_malformed_task_attr(msg):
def _wrapper(m=None):
msg_ = msg + " " + m if m is not None else msg
raise MalformedMetaTaskError(msg_)
return _wrapper
def validate_task_type(x):
_raise = _raise_malformed_task_attr("IS_DISTRIBUTED must be a DI List or primitive value {x}.".format(x=bool))
if isinstance(x, bool):
return x
else:
_raise("Incompatible type. Expected bool")
return x
def _validate_in_out_types(x):
_raise = _raise_malformed_task_attr("In/Out types must be defined as list of (FileTypes.FILE, label, description) or a single value FileTypes.FILE")
processed_in_out_types = []
if isinstance(x, (list, tuple)):
for i in x:
_raise_type = lambda: _raise("Expected FileType. Got {t}".format(t=type(i)))
# Support the new and old format
if isinstance(i, (list, tuple)):
if len(i) == 3:
if isinstance(i[0], FileType):
processed_in_out_types.append(i[0])
else:
_raise_type()
else:
_raise_type()
elif isinstance(i, FileType):
processed_in_out_types.append(i)
else:
_raise_type()
else:
_raise("Got type {t}".format(t=type(x)))
return processed_in_out_types
def _validate_chunk_in_out_type(msg):
def _f(x):
_raise = _raise_malformed_task_attr("{m} Got {x}".format(x=x, m=msg))
x = _validate_in_out_types(x)
if isinstance(x, (list, tuple)):
if len(x) == 1:
if x[0] is FileTypes.CHUNK:
return x
_raise()
return _f
def _validate_scatter_output_types(x):
_f = _validate_chunk_in_out_type("Scatter outputs type must be ONLY one chunk file type")
return _f(x)
def _validate_gather_input_types(x):
_f = _validate_chunk_in_out_type("Gather input type must be ONLY one chunk file type")
return _f(x)
def _validate_gather_output_types(x):
_raise = _raise_malformed_task_attr("Gather output types must be a single file type. Got {x}".format(x=x))
if isinstance(x, (list, tuple)):
# Only one output is allowed
if len(x) == 1:
# old format
if isinstance(x, FileType):
return [x]
# New Format [(FileType, label, desc)]
if isinstance(x[0], (list, tuple)):
if isinstance(x[0][0], FileType):
return [x[0][0]]
_raise()
def _validate_schema_options(x):
_raise = _raise_malformed_task_attr("Schema options must be provided as DI list or dict. Got type {t}.".format(t=type(x)))
# Standard form
if isinstance(x, dict):
if x:
is_valid = _is_schema_list(x)
if is_valid:
return x
else:
# emtpy dict
return x
elif isinstance(x, (list, tuple)):
x = to_list_if_necessary(x)
if not __is_schema(x[0]):
_raise("When task options are provided as DI model list, the first item must be the schema options for the Task.")
return x
# All other cases fail
_raise()
def _validate_nproc(x):
msg = "NPROC ('{x}') must be a DI LIST or primitive int value, or {s}".format(x=x, s=SymbolTypes.MAX_NPROC)
_raise = _raise_malformed_task_attr(msg)
if isinstance(x, int):
if x > 0:
return x
_raise("NPROC must be > 0")
elif isinstance(x, str):
if x == SymbolTypes.MAX_NPROC:
return x
else:
_raise("")
elif isinstance(x, (tuple, list)):
# Validate DI
return to_list_if_necessary(x)
else:
_raise("Got type (t)").format(t=type(x))
return x
def _validate_task_id(x):
if isinstance(x, str):
if RX_TASK_ID.match(x):
return x
else:
raise MalformedMetaTaskError("Task id '{n}' must match {p}".format(p=RX_TASK_ID.pattern, n=x))
def _validate_resource_types(x):
if x is None:
return ()
_raise = _raise_malformed_task_attr("Resource types must be a list with valid values {x}.".format(x=ResourceTypes.ALL()))
if isinstance(x, (list, tuple)):
for i in x:
if i not in ResourceTypes.ALL():
_raise("Invalid resource value '{x}'".format(x=i))
return x
else:
_raise("Invalid type {x}".format(x=x))
def _validate_version(x):
m = RX_VERSION.match(x)
if m is None:
_raise_malformed_task_attr("Version '{v}' should match {p}".format(v=x, p=RX_VERSION.pattern))
return x
def _validate_nchunks(x):
if isinstance(x, str):
if x == SymbolTypes.MAX_NCHUNKS:
return x
if isinstance(x, int):
return x
if isinstance(x, (list, tuple)):
if isinstance(list(x)[-1], types.FunctionType):
# Add more validation here
return x
msg = "Chunk only supports int or {x}, or DI model list".format(x=SymbolTypes.MAX_NCHUNKS)
_raise_malformed_task_attr(msg)
def _validate_chunk_keys(chunk_keys):
if isinstance(chunk_keys, (list, tuple)):
if not chunk_keys:
_raise_malformed_task_attr("CHUNK_KEYS can NOT be empty.")
for chunk_key in chunk_keys:
if RX_CHUNK_KEY.match(chunk_key) is None:
_raise_malformed_task_attr("CHUNK_KEYS '{x}' must match pattern {p}".format(x=chunk_key, p=RX_CHUNK_KEY))
return chunk_keys
_raise_malformed_task_attr("CHUNK_KEYS '{m}' is malformed".format(m=chunk_keys))
| [
1,
9995,
15263,
8845,
3168,
15945,
29908,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
8542,
29892,
1596,
29918,
2220,
13,
13,
5215,
12183,
13,
5215,
4072,
13,
5215,
16096,
13,
13,
3166,
282,
29890,
6519,
29889,
9794,
1053,
313,
2283,
10562,
29892,
9330,
10562,
29892,
23858,
10562,
29892,
18981,
10562,
29892,
3497,
1542,
29897,
13,
3166,
282,
29890,
3844,
2273,
17760,
29889,
11739,
29879,
1053,
313,
22995,
15628,
19346,
5398,
2392,
29892,
3792,
15628,
29925,
23828,
2392,
29897,
13,
13,
3166,
282,
29890,
3844,
2273,
17760,
29889,
3075,
1934,
1053,
390,
29990,
29918,
16358,
29892,
390,
29990,
29918,
3210,
3904,
29968,
29918,
10818,
29892,
390,
29990,
29918,
29911,
3289,
29968,
29918,
1367,
13,
13,
13,
1188,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
1753,
304,
29918,
1761,
29918,
361,
29918,
15107,
653,
29898,
23583,
29918,
272,
29918,
29879,
1125,
13,
1678,
565,
338,
8758,
29898,
23583,
29918,
272,
29918,
29879,
29892,
18761,
1125,
13,
4706,
736,
1051,
29898,
23583,
29918,
272,
29918,
29879,
29897,
13,
1678,
736,
18761,
29918,
272,
29918,
29879,
13,
13,
13,
1753,
4770,
15480,
29918,
4905,
29918,
1445,
29918,
7039,
29898,
4905,
29918,
8768,
29892,
1962,
29918,
1445,
29918,
7039,
1125,
13,
1678,
4436,
353,
5159,
13,
1678,
565,
338,
8758,
29898,
4905,
29918,
1445,
29918,
7039,
29892,
313,
1761,
29892,
18761,
22164,
13,
4706,
363,
921,
297,
1962,
29918,
1445,
29918,
7039,
29901,
13,
9651,
565,
338,
8758,
29898,
29916,
29892,
313,
1761,
29892,
18761,
22164,
13,
18884,
565,
7431,
29898,
29916,
29897,
2804,
29871,
29906,
29901,
13,
462,
1678,
4436,
29889,
4397,
703,
22995,
15628,
1962,
934,
1024,
426,
29916,
1836,
1222,
6021,
29871,
29906,
29899,
23583,
313,
710,
29892,
851,
467,
1642,
4830,
29898,
29916,
29922,
29916,
876,
13,
4706,
565,
7431,
29898,
4905,
29918,
1445,
29918,
7039,
29897,
1275,
7431,
29898,
4905,
29918,
8768,
1125,
13,
9651,
396,
445,
338,
871,
5443,
988,
278,
14391,
322,
5712,
14391,
934,
2983,
526,
2854,
13,
9651,
736,
5852,
13,
4706,
1683,
29901,
13,
9651,
4436,
29889,
4397,
703,
22995,
15628,
1962,
934,
2983,
29889,
1222,
6021,
426,
29876,
1836,
15992,
426,
29885,
29913,
1642,
4830,
29898,
29876,
29922,
4905,
29918,
8768,
29892,
286,
29922,
4905,
29918,
1445,
29918,
7039,
876,
13,
1678,
1683,
29901,
13,
4706,
4436,
29889,
4397,
703,
22995,
15628,
1962,
934,
1024,
29889,
1222,
6021,
17288,
710,
29892,
851,
29897,
1822,
15992,
426,
29885,
29913,
1642,
4830,
29898,
29885,
29922,
4905,
29918,
1445,
29918,
7039,
876,
13,
13,
1678,
1480,
29889,
2704,
14182,
29876,
1642,
7122,
29898,
12523,
876,
13,
1678,
12020,
7865,
2392,
14182,
29876,
1642,
7122,
29898,
12523,
876,
13,
13,
13,
1753,
903,
15480,
29918,
4905,
29918,
1445,
29918,
7039,
29898,
4905,
29918,
8768,
29892,
1962,
29918,
5325,
29918,
7039,
29918,
272,
29918,
9290,
1125,
13,
1678,
565,
1962,
29918,
5325,
29918,
7039,
29918,
272,
29918,
9290,
338,
451,
6213,
29901,
13,
4706,
4770,
15480,
29918,
4905,
29918,
1445,
29918,
7039,
29898,
4905,
29918,
8768,
29892,
1962,
29918,
5325,
29918,
7039,
29918,
272,
29918,
9290,
29897,
13,
4706,
714,
29918,
7039,
353,
1962,
29918,
5325,
29918,
7039,
29918,
272,
29918,
9290,
13,
1678,
1683,
29901,
13,
4706,
714,
29918,
7039,
353,
5159,
13,
13,
1678,
736,
714,
29918,
7039,
13,
13,
13,
1753,
903,
15480,
29918,
4905,
29918,
1445,
29918,
7039,
29918,
272,
29918,
22692,
29898,
4905,
29918,
8768,
29892,
1962,
29918,
1445,
29918,
7039,
29918,
272,
29918,
9290,
29892,
3414,
29918,
333,
1125,
13,
1678,
1018,
29901,
13,
4706,
736,
903,
15480,
29918,
4905,
29918,
1445,
29918,
7039,
29898,
4905,
29918,
8768,
29892,
1962,
29918,
1445,
29918,
7039,
29918,
272,
29918,
9290,
29897,
13,
1678,
5174,
8960,
29901,
13,
4706,
10191,
353,
376,
7662,
1178,
426,
29875,
29913,
10604,
934,
4072,
21313,
29876,
1800,
322,
5712,
1962,
934,
2983,
21313,
29885,
1800,
19056,
526,
6058,
15878,
11393,
4830,
29898,
29876,
29922,
2435,
29898,
4905,
29918,
8768,
511,
286,
29922,
2435,
29898,
4905,
29918,
1445,
29918,
7039,
29918,
272,
29918,
9290,
511,
474,
29922,
7662,
29918,
333,
29897,
13,
4706,
1480,
29889,
2704,
29898,
7645,
29897,
13,
4706,
12020,
13,
13,
13,
1753,
4770,
15480,
29918,
16123,
2618,
29918,
1445,
29918,
8768,
29898,
1445,
29918,
8768,
1125,
13,
1678,
822,
903,
275,
29918,
3084,
29898,
29916,
1125,
13,
4706,
565,
451,
338,
8758,
29898,
29916,
29892,
3497,
1542,
1125,
13,
9651,
12020,
20948,
703,
13919,
3497,
1542,
29889,
15992,
426,
29873,
29913,
1642,
4830,
29898,
29873,
29922,
1853,
29898,
29916,
4961,
13,
13,
1678,
363,
474,
297,
934,
29918,
8768,
29901,
13,
4706,
903,
275,
29918,
3084,
29898,
29875,
29897,
13,
13,
1678,
736,
934,
29918,
8768,
13,
13,
13,
1753,
12725,
29918,
16123,
2618,
29918,
1445,
29918,
8768,
29898,
1445,
29918,
1853,
29918,
272,
29918,
1445,
29918,
8768,
1125,
13,
1678,
565,
338,
8758,
29898,
1445,
29918,
1853,
29918,
272,
29918,
1445,
29918,
8768,
29892,
3497,
1542,
1125,
13,
4706,
736,
518,
1445,
29918,
1853,
29918,
272,
29918,
1445,
29918,
8768,
29962,
13,
13,
1678,
736,
4770,
15480,
29918,
16123,
2618,
29918,
1445,
29918,
8768,
29898,
1445,
29918,
1853,
29918,
272,
29918,
1445,
29918,
8768,
29897,
13,
13,
13,
1753,
4770,
275,
29918,
11010,
29898,
29881,
1125,
13,
1678,
1018,
29901,
13,
4706,
282,
353,
270,
1839,
6799,
2033,
13,
4706,
6611,
353,
282,
29889,
8149,
580,
13,
4706,
288,
333,
353,
6611,
29961,
29900,
29962,
13,
4706,
565,
7431,
29898,
8149,
29897,
2804,
29871,
29896,
29901,
13,
9651,
12020,
11374,
2392,
13,
4706,
903,
353,
270,
1839,
6799,
2033,
29961,
3398,
22322,
4381,
2033,
13,
4706,
736,
5852,
13,
1678,
5174,
313,
2558,
2392,
29892,
11374,
2392,
1125,
13,
4706,
736,
7700,
13,
13,
13,
1753,
903,
275,
29918,
11010,
29918,
1761,
29898,
1767,
1125,
13,
1678,
565,
338,
8758,
29898,
1767,
29892,
9657,
1125,
13,
4706,
565,
995,
29901,
13,
9651,
4770,
275,
29918,
11010,
29898,
1767,
29897,
13,
9651,
736,
995,
13,
4706,
1683,
29901,
13,
9651,
396,
4069,
13,
9651,
736,
995,
13,
13,
1678,
565,
338,
8758,
29898,
1767,
29892,
313,
1761,
29892,
18761,
22164,
13,
4706,
736,
599,
22168,
275,
29918,
11010,
29898,
29916,
29897,
363,
921,
297,
995,
29897,
13,
13,
1678,
736,
7700,
13,
13,
13,
1753,
903,
15480,
29918,
23975,
29918,
5325,
29898,
23975,
29918,
5325,
29918,
272,
29918,
9290,
29892,
1881,
29918,
8768,
29892,
1962,
29918,
8768,
1125,
13,
1678,
9995,
13,
268,
29896,
29889,
15758,
1532,
29899,
15628,
1347,
13,
268,
29906,
29889,
15758,
393,
16285,
526,
11520,
13,
268,
29941,
29889,
15758,
278,
1881,
29914,
4905,
4072,
526,
278,
1021,
13,
13,
1678,
584,
3207,
26691,
29918,
5325,
29918,
272,
29918,
9290,
29901,
518,
703,
29938,
2080,
29889,
29900,
29892,
3908,
4905,
29889,
29900,
4968,
4514,
13,
1678,
584,
3207,
1881,
29918,
8768,
29901,
13,
1678,
584,
3207,
1962,
29918,
8768,
29901,
13,
1678,
584,
2457,
29901,
13,
13,
1678,
9995,
13,
1678,
565,
26691,
29918,
5325,
29918,
272,
29918,
9290,
338,
6213,
29901,
13,
4706,
736,
3861,
13,
13,
1678,
363,
26691,
29918,
1445,
297,
26691,
29918,
5325,
29918,
272,
29918,
9290,
29901,
13,
13,
4706,
565,
7431,
29898,
23975,
29918,
1445,
29897,
2804,
29871,
29906,
29901,
13,
9651,
12020,
7865,
2392,
703,
22995,
15628,
26691,
934,
1024,
426,
29876,
1836,
1222,
6021,
18761,
310,
313,
710,
29892,
851,
29897,
1642,
4830,
29898,
29876,
29922,
23975,
29918,
1445,
876,
13,
13,
4706,
297,
29918,
29888,
29892,
714,
29918,
29888,
353,
26691,
29918,
1445,
13,
4706,
565,
451,
297,
29918,
29888,
29889,
27382,
2541,
703,
29938,
2080,
29879,
23157,
470,
451,
714,
29918,
29888,
29889,
27382,
2541,
703,
29938,
4905,
29879,
29889,
29900,
29908,
1125,
13,
9651,
12020,
7865,
2392,
703,
22995,
15628,
26691,
934,
21313,
29875,
1118,
426,
29888,
1800,
1642,
4830,
29898,
29875,
29922,
262,
29918,
29888,
29892,
285,
29922,
449,
29918,
29888,
876,
13,
13,
4706,
474,
29916,
353,
938,
29898,
262,
29918,
29888,
29889,
5451,
703,
29938,
2080,
29879,
23157,
14352,
29896,
2314,
13,
4706,
19100,
353,
938,
29898,
449,
29918,
29888,
29889,
5451,
703,
29938,
4905,
29879,
23157,
14352,
29896,
2314,
13,
4706,
474,
486,
353,
1881,
29918,
8768,
29961,
861,
29962,
13,
4706,
288,
486,
353,
1962,
29918,
8768,
29961,
2251,
29962,
13,
4706,
565,
474,
486,
2804,
288,
486,
29901,
13,
9651,
1480,
29889,
25442,
703,
15211,
4072,
526,
1422,
29889,
426,
29875,
29913,
426,
29873,
29913,
29871,
1599,
426,
29877,
29913,
426,
29888,
29913,
1642,
4830,
29898,
29875,
29922,
861,
29892,
260,
29922,
29875,
486,
29892,
288,
29922,
2251,
29892,
285,
29922,
29877,
486,
876,
13,
13,
1678,
396,
591,
2355,
1244,
29892,
4129,
338,
2691,
13,
1678,
736,
26691,
29918,
5325,
29918,
272,
29918,
9290,
13,
13,
13,
1753,
903,
15480,
29918,
9891,
29918,
2541,
29918,
29876,
29918,
5085,
29898,
29876,
5085,
29892,
3653,
1125,
13,
1678,
282,
353,
16096,
29889,
657,
5085,
3135,
29898,
9891,
29897,
13,
1678,
565,
7431,
29898,
29886,
29889,
5085,
29897,
2804,
302,
5085,
29901,
13,
4706,
12020,
7865,
2392,
703,
1252,
6021,
3653,
426,
29916,
29913,
304,
505,
426,
29876,
29913,
6389,
29889,
15992,
426,
29891,
29913,
1642,
4830,
29898,
29916,
29922,
9891,
17255,
978,
1649,
29892,
302,
29922,
29876,
5085,
29892,
343,
29922,
2435,
29898,
29886,
29889,
5085,
4961,
13,
1678,
736,
3653,
13,
13,
13,
1753,
903,
15480,
29918,
29812,
29918,
6194,
29918,
2080,
29918,
1853,
29898,
262,
29918,
449,
29918,
8768,
1125,
13,
1678,
565,
7431,
29898,
262,
29918,
449,
29918,
8768,
29897,
1275,
29871,
29896,
29901,
13,
4706,
565,
297,
29918,
449,
29918,
8768,
29961,
29900,
29962,
1275,
3497,
10562,
29889,
3210,
3904,
29968,
29901,
13,
9651,
736,
5852,
13,
1678,
12020,
7865,
2392,
703,
1252,
6021,
19875,
934,
1134,
297,
426,
29875,
29913,
1642,
4830,
29898,
29875,
29922,
262,
29918,
449,
29918,
8768,
876,
13,
13,
13,
1753,
903,
657,
29918,
1990,
29918,
5552,
29918,
272,
29918,
22692,
29898,
1990,
29918,
978,
29892,
12421,
29892,
270,
1125,
13,
1678,
565,
12421,
451,
297,
270,
29901,
13,
4706,
12020,
3792,
15628,
19346,
5398,
2392,
703,
19346,
5398,
770,
22372,
29883,
10162,
338,
4567,
3734,
770,
722,
22372,
29876,
10162,
1642,
4830,
29898,
29883,
29922,
1990,
29918,
978,
29892,
302,
29922,
5552,
876,
13,
1678,
1683,
29901,
13,
4706,
736,
270,
29961,
5552,
29962,
13,
13,
13,
1753,
903,
22692,
29918,
5156,
15628,
29918,
7662,
29918,
5552,
29898,
7645,
1125,
13,
1678,
822,
903,
17699,
29898,
29885,
29922,
8516,
1125,
13,
4706,
10191,
29918,
353,
10191,
718,
376,
376,
718,
286,
565,
286,
338,
451,
6213,
1683,
10191,
13,
4706,
12020,
3792,
15628,
19346,
5398,
2392,
29898,
7645,
19925,
13,
1678,
736,
903,
17699,
13,
13,
13,
1753,
12725,
29918,
7662,
29918,
1853,
29898,
29916,
1125,
13,
13,
1678,
903,
22692,
353,
903,
22692,
29918,
5156,
15628,
29918,
7662,
29918,
5552,
703,
3235,
29918,
4571,
1254,
3960,
29933,
2692,
3352,
1818,
367,
263,
22471,
2391,
470,
19269,
995,
426,
29916,
29913,
1213,
29889,
4830,
29898,
29916,
29922,
11227,
876,
13,
13,
1678,
565,
338,
8758,
29898,
29916,
29892,
6120,
1125,
13,
4706,
736,
921,
13,
1678,
1683,
29901,
13,
4706,
903,
22692,
703,
797,
23712,
1134,
29889,
1222,
6021,
6120,
1159,
13,
13,
1678,
736,
921,
13,
13,
13,
1753,
903,
15480,
29918,
262,
29918,
449,
29918,
8768,
29898,
29916,
1125,
13,
13,
1678,
903,
22692,
353,
903,
22692,
29918,
5156,
15628,
29918,
7662,
29918,
5552,
703,
797,
29914,
3744,
4072,
1818,
367,
3342,
408,
1051,
310,
313,
2283,
10562,
29889,
7724,
29892,
3858,
29892,
6139,
29897,
470,
263,
2323,
995,
3497,
10562,
29889,
7724,
1159,
13,
1678,
19356,
29918,
262,
29918,
449,
29918,
8768,
353,
5159,
13,
13,
1678,
565,
338,
8758,
29898,
29916,
29892,
313,
1761,
29892,
18761,
22164,
13,
4706,
363,
474,
297,
921,
29901,
13,
9651,
903,
22692,
29918,
1853,
353,
14013,
29901,
903,
22692,
703,
1252,
6021,
3497,
1542,
29889,
15992,
426,
29873,
29913,
1642,
4830,
29898,
29873,
29922,
1853,
29898,
29875,
4961,
13,
9651,
396,
18601,
278,
716,
322,
2030,
3402,
13,
9651,
565,
338,
8758,
29898,
29875,
29892,
313,
1761,
29892,
18761,
22164,
13,
18884,
565,
7431,
29898,
29875,
29897,
1275,
29871,
29941,
29901,
13,
462,
1678,
565,
338,
8758,
29898,
29875,
29961,
29900,
1402,
3497,
1542,
1125,
13,
462,
4706,
19356,
29918,
262,
29918,
449,
29918,
8768,
29889,
4397,
29898,
29875,
29961,
29900,
2314,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
903,
22692,
29918,
1853,
580,
13,
18884,
1683,
29901,
13,
462,
1678,
903,
22692,
29918,
1853,
580,
13,
9651,
25342,
338,
8758,
29898,
29875,
29892,
3497,
1542,
1125,
13,
18884,
19356,
29918,
262,
29918,
449,
29918,
8768,
29889,
4397,
29898,
29875,
29897,
13,
9651,
1683,
29901,
13,
18884,
903,
22692,
29918,
1853,
580,
13,
13,
1678,
1683,
29901,
13,
4706,
903,
22692,
703,
29954,
327,
1134,
426,
29873,
29913,
1642,
4830,
29898,
29873,
29922,
1853,
29898,
29916,
4961,
13,
13,
1678,
736,
19356,
29918,
262,
29918,
449,
29918,
8768,
13,
13,
13,
1753,
903,
15480,
29918,
29812,
29918,
262,
29918,
449,
29918,
1853,
29898,
7645,
1125,
13,
1678,
822,
903,
29888,
29898,
29916,
1125,
13,
4706,
903,
22692,
353,
903,
22692,
29918,
5156,
15628,
29918,
7662,
29918,
5552,
703,
29912,
29885,
29913,
15992,
426,
29916,
29913,
1642,
4830,
29898,
29916,
29922,
29916,
29892,
286,
29922,
7645,
876,
13,
4706,
921,
353,
903,
15480,
29918,
262,
29918,
449,
29918,
8768,
29898,
29916,
29897,
13,
4706,
565,
338,
8758,
29898,
29916,
29892,
313,
1761,
29892,
18761,
22164,
13,
9651,
565,
7431,
29898,
29916,
29897,
1275,
29871,
29896,
29901,
13,
18884,
565,
921,
29961,
29900,
29962,
338,
3497,
10562,
29889,
3210,
3904,
29968,
29901,
13,
462,
1678,
736,
921,
13,
4706,
903,
22692,
580,
13,
13,
1678,
736,
903,
29888,
13,
13,
13,
1753,
903,
15480,
29918,
1557,
2620,
29918,
4905,
29918,
8768,
29898,
29916,
1125,
13,
1678,
903,
29888,
353,
903,
15480,
29918,
29812,
29918,
262,
29918,
449,
29918,
1853,
703,
4421,
2620,
14391,
1134,
1818,
367,
6732,
16786,
697,
19875,
934,
1134,
1159,
13,
1678,
736,
903,
29888,
29898,
29916,
29897,
13,
13,
13,
1753,
903,
15480,
29918,
29887,
1624,
29918,
2080,
29918,
8768,
29898,
29916,
1125,
13,
1678,
903,
29888,
353,
903,
15480,
29918,
29812,
29918,
262,
29918,
449,
29918,
1853,
703,
29954,
1624,
1881,
1134,
1818,
367,
6732,
16786,
697,
19875,
934,
1134,
1159,
13,
1678,
736,
903,
29888,
29898,
29916,
29897,
13,
13,
13,
1753,
903,
15480,
29918,
29887,
1624,
29918,
4905,
29918,
8768,
29898,
29916,
1125,
13,
1678,
903,
22692,
353,
903,
22692,
29918,
5156,
15628,
29918,
7662,
29918,
5552,
703,
29954,
1624,
1962,
4072,
1818,
367,
263,
2323,
934,
1134,
29889,
15992,
426,
29916,
29913,
1642,
4830,
29898,
29916,
29922,
29916,
876,
13,
1678,
565,
338,
8758,
29898,
29916,
29892,
313,
1761,
29892,
18761,
22164,
13,
4706,
396,
9333,
697,
1962,
338,
6068,
13,
4706,
565,
7431,
29898,
29916,
29897,
1275,
29871,
29896,
29901,
13,
9651,
396,
2030,
3402,
13,
9651,
565,
338,
8758,
29898,
29916,
29892,
3497,
1542,
1125,
13,
18884,
736,
518,
29916,
29962,
13,
9651,
396,
1570,
19191,
17288,
2283,
1542,
29892,
3858,
29892,
5153,
4638,
13,
9651,
565,
338,
8758,
29898,
29916,
29961,
29900,
1402,
313,
1761,
29892,
18761,
22164,
13,
18884,
565,
338,
8758,
29898,
29916,
29961,
29900,
3816,
29900,
1402,
3497,
1542,
1125,
13,
462,
1678,
736,
518,
29916,
29961,
29900,
3816,
29900,
5262,
13,
1678,
903,
22692,
580,
13,
13,
13,
1753,
903,
15480,
29918,
11010,
29918,
6768,
29898,
29916,
1125,
13,
1678,
903,
22692,
353,
903,
22692,
29918,
5156,
15628,
29918,
7662,
29918,
5552,
703,
12763,
3987,
1818,
367,
4944,
408,
22471,
1051,
470,
9657,
29889,
15992,
1134,
426,
29873,
29913,
1213,
29889,
4830,
29898,
29873,
29922,
1853,
29898,
29916,
4961,
13,
13,
1678,
396,
10117,
883,
13,
1678,
565,
338,
8758,
29898,
29916,
29892,
9657,
1125,
13,
4706,
565,
921,
29901,
13,
9651,
338,
29918,
3084,
353,
903,
275,
29918,
11010,
29918,
1761,
29898,
29916,
29897,
13,
9651,
565,
338,
29918,
3084,
29901,
13,
18884,
736,
921,
13,
4706,
1683,
29901,
13,
9651,
396,
953,
29873,
2272,
9657,
13,
9651,
736,
921,
13,
1678,
25342,
338,
8758,
29898,
29916,
29892,
313,
1761,
29892,
18761,
22164,
13,
4706,
921,
353,
304,
29918,
1761,
29918,
361,
29918,
15107,
653,
29898,
29916,
29897,
13,
4706,
565,
451,
4770,
275,
29918,
11010,
29898,
29916,
29961,
29900,
29962,
1125,
13,
9651,
903,
22692,
703,
10401,
3414,
3987,
526,
4944,
408,
22471,
1904,
1051,
29892,
278,
937,
2944,
1818,
367,
278,
10938,
3987,
363,
278,
9330,
23157,
13,
4706,
736,
921,
13,
13,
1678,
396,
2178,
916,
4251,
4418,
13,
1678,
903,
22692,
580,
13,
13,
13,
1753,
903,
15480,
29918,
29876,
15439,
29898,
29916,
1125,
13,
13,
1678,
10191,
353,
376,
29940,
8618,
29907,
6702,
29912,
29916,
29913,
1495,
1818,
367,
263,
22471,
365,
9047,
470,
19269,
938,
995,
29892,
470,
426,
29879,
29913,
1642,
4830,
29898,
29916,
29922,
29916,
29892,
269,
29922,
14730,
10562,
29889,
12648,
29918,
29940,
8618,
29907,
29897,
13,
1678,
903,
22692,
353,
903,
22692,
29918,
5156,
15628,
29918,
7662,
29918,
5552,
29898,
7645,
29897,
13,
1678,
565,
338,
8758,
29898,
29916,
29892,
938,
1125,
13,
4706,
565,
921,
1405,
29871,
29900,
29901,
13,
9651,
736,
921,
13,
4706,
903,
22692,
703,
29940,
8618,
29907,
1818,
367,
1405,
29871,
29900,
1159,
13,
1678,
25342,
338,
8758,
29898,
29916,
29892,
851,
1125,
13,
4706,
565,
921,
1275,
23858,
10562,
29889,
12648,
29918,
29940,
8618,
29907,
29901,
13,
9651,
736,
921,
13,
4706,
1683,
29901,
13,
9651,
903,
22692,
703,
1159,
13,
1678,
25342,
338,
8758,
29898,
29916,
29892,
313,
23583,
29892,
1051,
22164,
13,
4706,
396,
15758,
403,
22471,
13,
4706,
736,
304,
29918,
1761,
29918,
361,
29918,
15107,
653,
29898,
29916,
29897,
13,
1678,
1683,
29901,
13,
4706,
903,
22692,
703,
29954,
327,
1134,
313,
29873,
29897,
2564,
4830,
29898,
29873,
29922,
1853,
29898,
29916,
876,
13,
13,
1678,
736,
921,
13,
13,
13,
1753,
903,
15480,
29918,
7662,
29918,
333,
29898,
29916,
1125,
13,
1678,
565,
338,
8758,
29898,
29916,
29892,
851,
1125,
13,
4706,
565,
390,
29990,
29918,
29911,
3289,
29968,
29918,
1367,
29889,
4352,
29898,
29916,
1125,
13,
9651,
736,
921,
13,
1678,
1683,
29901,
13,
4706,
12020,
3792,
15628,
19346,
5398,
2392,
703,
5398,
1178,
22372,
29876,
10162,
1818,
1993,
426,
29886,
29913,
1642,
4830,
29898,
29886,
29922,
29934,
29990,
29918,
29911,
3289,
29968,
29918,
1367,
29889,
11037,
29892,
302,
29922,
29916,
876,
13,
13,
13,
1753,
903,
15480,
29918,
10314,
29918,
8768,
29898,
29916,
1125,
13,
1678,
565,
921,
338,
6213,
29901,
13,
4706,
736,
3861,
13,
13,
1678,
903,
22692,
353,
903,
22692,
29918,
5156,
15628,
29918,
7662,
29918,
5552,
703,
6848,
4072,
1818,
367,
263,
1051,
411,
2854,
1819,
426,
29916,
29913,
1213,
29889,
4830,
29898,
29916,
29922,
6848,
10562,
29889,
9818,
22130,
13,
13,
1678,
565,
338,
8758,
29898,
29916,
29892,
313,
1761,
29892,
18761,
22164,
13,
4706,
363,
474,
297,
921,
29901,
13,
9651,
565,
474,
451,
297,
18981,
10562,
29889,
9818,
7295,
13,
18884,
903,
22692,
703,
13919,
6503,
995,
22372,
29916,
10162,
1642,
4830,
29898,
29916,
29922,
29875,
876,
13,
4706,
736,
921,
13,
1678,
1683,
29901,
13,
4706,
903,
22692,
703,
13919,
1134,
426,
29916,
29913,
1642,
4830,
29898,
29916,
29922,
29916,
876,
13,
13,
13,
1753,
903,
15480,
29918,
3259,
29898,
29916,
1125,
13,
1678,
286,
353,
390,
29990,
29918,
16358,
29889,
4352,
29898,
29916,
29897,
13,
1678,
565,
286,
338,
6213,
29901,
13,
4706,
903,
22692,
29918,
5156,
15628,
29918,
7662,
29918,
5552,
703,
6594,
22372,
29894,
10162,
881,
1993,
426,
29886,
29913,
1642,
4830,
29898,
29894,
29922,
29916,
29892,
282,
29922,
29934,
29990,
29918,
16358,
29889,
11037,
876,
13,
1678,
736,
921,
13,
13,
13,
1753,
903,
15480,
29918,
29876,
305,
18801,
29898,
29916,
1125,
13,
1678,
565,
338,
8758,
29898,
29916,
29892,
851,
1125,
13,
4706,
565,
921,
1275,
23858,
10562,
29889,
12648,
29918,
29940,
3210,
3904,
17557,
29901,
13,
9651,
736,
921,
13,
1678,
565,
338,
8758,
29898,
29916,
29892,
938,
1125,
13,
4706,
736,
921,
13,
1678,
565,
338,
8758,
29898,
29916,
29892,
313,
1761,
29892,
18761,
22164,
13,
4706,
565,
338,
8758,
29898,
1761,
29898,
29916,
9601,
29899,
29896,
1402,
4072,
29889,
6678,
1542,
1125,
13,
9651,
396,
3462,
901,
8845,
1244,
13,
9651,
736,
921,
13,
13,
1678,
10191,
353,
376,
1451,
2960,
871,
11286,
938,
470,
426,
29916,
1118,
470,
22471,
1904,
1051,
1642,
4830,
29898,
29916,
29922,
14730,
10562,
29889,
12648,
29918,
29940,
3210,
3904,
17557,
29897,
13,
1678,
903,
22692,
29918,
5156,
15628,
29918,
7662,
29918,
5552,
29898,
7645,
29897,
13,
13,
13,
1753,
903,
15480,
29918,
29812,
29918,
8149,
29898,
29812,
29918,
8149,
1125,
13,
1678,
565,
338,
8758,
29898,
29812,
29918,
8149,
29892,
313,
1761,
29892,
18761,
22164,
13,
4706,
565,
451,
19875,
29918,
8149,
29901,
13,
9651,
903,
22692,
29918,
5156,
15628,
29918,
7662,
29918,
5552,
703,
3210,
3904,
29968,
29918,
10818,
29903,
508,
6058,
367,
4069,
23157,
13,
4706,
363,
19875,
29918,
1989,
297,
19875,
29918,
8149,
29901,
13,
9651,
565,
390,
29990,
29918,
3210,
3904,
29968,
29918,
10818,
29889,
4352,
29898,
29812,
29918,
1989,
29897,
338,
6213,
29901,
13,
18884,
903,
22692,
29918,
5156,
15628,
29918,
7662,
29918,
5552,
703,
3210,
3904,
29968,
29918,
10818,
29903,
22372,
29916,
10162,
1818,
1993,
4766,
426,
29886,
29913,
1642,
4830,
29898,
29916,
29922,
29812,
29918,
1989,
29892,
282,
29922,
29934,
29990,
29918,
3210,
3904,
29968,
29918,
10818,
876,
13,
4706,
736,
19875,
29918,
8149,
13,
13,
1678,
903,
22692,
29918,
5156,
15628,
29918,
7662,
29918,
5552,
703,
3210,
3904,
29968,
29918,
10818,
29903,
22372,
29885,
10162,
338,
4439,
15628,
1642,
4830,
29898,
29885,
29922,
29812,
29918,
8149,
876,
13,
13,
2
] |
encyclopaedia/labels.py | tcyrus/renpy-encyclopaedia | 0 | 10039 | <reponame>tcyrus/renpy-encyclopaedia
from renpy import store
class Labels(store.object):
"""Controls how the labels that display Encyclopaedia data appear.
Attributes:
percentage_label (str): Placed next to the percentage unlocked number
page_label (str): Placed before the entry page displayed
page_separator_label (str): Placed in-between the
current page number and the total page number
sort_number_label (str): Label for Number Sorting
sort_alphabetical_label (str): Label for Alphabetical sorting
sort_reverse_alphabetical_label (str): Label for Reverse Alphabetical
sorting
sort_subject_label (str): Label for Subject sorting
sort_unread_label (str): Label for Unread sorting
unread_entry_label (str): Default for the tag next to unread entries
locked_entry_label (str): Default for a "Locked Entry" button
"""
def __init__(self, encyclopaedia):
self.encyclopaedia = encyclopaedia
self.percentage_label = '%'
self.page_label = 'Page'
self.page_separator_label = '/'
self.sort_number_label = "Number"
self.sort_alphabetical_label = "A to Z"
self.sort_reverse_alphabetical_label = "Z to A"
self.sort_subject_label = "Subject"
self.sort_unread_label = "Unread"
self.unread_entry_label = "New!"
self.locked_entry_label = "???"
@property
def percentage_unlocked(self):
"""Percentage representation of the amount of the encyclopaedia
that's unlocked. ie: '50%'.
Returns:
str
"""
percentage_unlocked = int(self.encyclopaedia.percentage_unlocked)
return "{}{}".format(percentage_unlocked, self.percentage_label)
@property
def entry_current_page(self):
"""The sub-page of an entry that is being viewed.
Returns:
str
"""
try:
total_pages = self.encyclopaedia.active.pages
except AttributeError:
raise AttributeError(
"Cannot display Entry's current page when no entry is open."
)
label = "{0} {1} {2} {3}".format(
self.page_label,
self.encyclopaedia.sub_current_position,
self.page_separator_label,
total_pages
)
return label
@property
def sorting_mode(self):
"""Label for the encyclopaedia's current sorting mode.
Returns:
str
"""
enc = self.encyclopaedia
sorting_strings = {
enc.SORT_NUMBER: self.sort_number_label,
enc.SORT_ALPHABETICAL: self.sort_alphabetical_label,
enc.SORT_REVERSE_ALPHABETICAL: self.sort_reverse_alphabetical_label, # NOQA: E501
enc.SORT_SUBJECT: self.sort_subject_label,
enc.SORT_UNREAD: self.sort_unread_label
}
return sorting_strings[enc.sorting_mode]
| [
1,
529,
276,
1112,
420,
29958,
29873,
1270,
15816,
29914,
1267,
2272,
29899,
3819,
15126,
3274,
1381,
13,
3166,
4325,
2272,
1053,
3787,
13,
13,
13,
1990,
15796,
29879,
29898,
8899,
29889,
3318,
1125,
13,
1678,
9995,
17825,
920,
278,
11073,
393,
2479,
12145,
417,
3274,
1381,
848,
2615,
29889,
13,
13,
1678,
6212,
5026,
29901,
13,
4706,
19649,
29918,
1643,
313,
710,
1125,
13494,
1133,
2446,
304,
278,
19649,
443,
29113,
1353,
13,
4706,
1813,
29918,
1643,
313,
710,
1125,
13494,
1133,
1434,
278,
6251,
1813,
8833,
13,
4706,
1813,
29918,
344,
17954,
29918,
1643,
313,
710,
1125,
13494,
1133,
297,
29899,
14811,
278,
13,
9651,
1857,
1813,
1353,
322,
278,
3001,
1813,
1353,
13,
13,
4706,
2656,
29918,
4537,
29918,
1643,
313,
710,
1125,
15796,
363,
9681,
20025,
292,
13,
4706,
2656,
29918,
284,
17416,
936,
29918,
1643,
313,
710,
1125,
15796,
363,
838,
17416,
936,
16548,
13,
4706,
2656,
29918,
24244,
29918,
284,
17416,
936,
29918,
1643,
313,
710,
1125,
15796,
363,
830,
3901,
838,
17416,
936,
13,
9651,
16548,
13,
4706,
2656,
29918,
16009,
29918,
1643,
313,
710,
1125,
15796,
363,
3323,
622,
16548,
13,
4706,
2656,
29918,
348,
949,
29918,
1643,
313,
710,
1125,
15796,
363,
853,
949,
16548,
13,
13,
4706,
443,
949,
29918,
8269,
29918,
1643,
313,
710,
1125,
13109,
363,
278,
4055,
2446,
304,
443,
949,
9976,
13,
4706,
22822,
29918,
8269,
29918,
1643,
313,
710,
1125,
13109,
363,
263,
376,
16542,
287,
28236,
29908,
2826,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
427,
8798,
417,
3274,
1381,
1125,
13,
4706,
1583,
29889,
3819,
15126,
3274,
1381,
353,
427,
8798,
417,
3274,
1381,
13,
13,
4706,
1583,
29889,
25376,
482,
29918,
1643,
353,
14210,
29915,
13,
4706,
1583,
29889,
3488,
29918,
1643,
353,
525,
5074,
29915,
13,
4706,
1583,
29889,
3488,
29918,
344,
17954,
29918,
1643,
353,
8207,
29915,
13,
13,
4706,
1583,
29889,
6605,
29918,
4537,
29918,
1643,
353,
376,
4557,
29908,
13,
4706,
1583,
29889,
6605,
29918,
284,
17416,
936,
29918,
1643,
353,
376,
29909,
304,
796,
29908,
13,
4706,
1583,
29889,
6605,
29918,
24244,
29918,
284,
17416,
936,
29918,
1643,
353,
376,
29999,
304,
319,
29908,
13,
4706,
1583,
29889,
6605,
29918,
16009,
29918,
1643,
353,
376,
20622,
29908,
13,
4706,
1583,
29889,
6605,
29918,
348,
949,
29918,
1643,
353,
376,
2525,
949,
29908,
13,
13,
4706,
1583,
29889,
348,
949,
29918,
8269,
29918,
1643,
353,
376,
4373,
3850,
13,
4706,
1583,
29889,
29113,
29918,
8269,
29918,
1643,
353,
376,
8773,
3026,
13,
13,
1678,
732,
6799,
13,
1678,
822,
19649,
29918,
348,
29113,
29898,
1311,
1125,
13,
4706,
9995,
27933,
482,
8954,
310,
278,
5253,
310,
278,
427,
8798,
417,
3274,
1381,
13,
4706,
393,
29915,
29879,
443,
29113,
29889,
19282,
29901,
525,
29945,
29900,
29995,
4286,
13,
13,
4706,
16969,
29901,
13,
9651,
851,
13,
4706,
9995,
13,
4706,
19649,
29918,
348,
29113,
353,
938,
29898,
1311,
29889,
3819,
15126,
3274,
1381,
29889,
25376,
482,
29918,
348,
29113,
29897,
13,
4706,
736,
29850,
1157,
29913,
1642,
4830,
29898,
25376,
482,
29918,
348,
29113,
29892,
1583,
29889,
25376,
482,
29918,
1643,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
6251,
29918,
3784,
29918,
3488,
29898,
1311,
1125,
13,
4706,
9995,
1576,
1014,
29899,
3488,
310,
385,
6251,
393,
338,
1641,
24774,
29889,
13,
13,
4706,
16969,
29901,
13,
9651,
851,
13,
4706,
9995,
13,
4706,
1018,
29901,
13,
9651,
3001,
29918,
12292,
353,
1583,
29889,
3819,
15126,
3274,
1381,
29889,
4925,
29889,
12292,
13,
4706,
5174,
23833,
2392,
29901,
13,
9651,
12020,
23833,
2392,
29898,
13,
18884,
376,
29089,
2479,
28236,
29915,
29879,
1857,
1813,
746,
694,
6251,
338,
1722,
1213,
13,
9651,
1723,
13,
13,
4706,
3858,
353,
29850,
29900,
29913,
426,
29896,
29913,
426,
29906,
29913,
426,
29941,
29913,
1642,
4830,
29898,
13,
9651,
1583,
29889,
3488,
29918,
1643,
29892,
13,
9651,
1583,
29889,
3819,
15126,
3274,
1381,
29889,
1491,
29918,
3784,
29918,
3283,
29892,
13,
9651,
1583,
29889,
3488,
29918,
344,
17954,
29918,
1643,
29892,
13,
9651,
3001,
29918,
12292,
13,
4706,
1723,
13,
13,
4706,
736,
3858,
13,
13,
1678,
732,
6799,
13,
1678,
822,
16548,
29918,
8513,
29898,
1311,
1125,
13,
4706,
9995,
4775,
363,
278,
427,
8798,
417,
3274,
1381,
29915,
29879,
1857,
16548,
4464,
29889,
13,
13,
4706,
16969,
29901,
13,
9651,
851,
13,
4706,
9995,
13,
4706,
2094,
353,
1583,
29889,
3819,
15126,
3274,
1381,
13,
13,
4706,
16548,
29918,
19651,
353,
426,
13,
9651,
2094,
29889,
29903,
8476,
29918,
23207,
29901,
1583,
29889,
6605,
29918,
4537,
29918,
1643,
29892,
13,
9651,
2094,
29889,
29903,
8476,
29918,
1964,
19689,
2882,
2544,
2965,
1964,
29901,
1583,
29889,
6605,
29918,
284,
17416,
936,
29918,
1643,
29892,
13,
9651,
2094,
29889,
29903,
8476,
29918,
1525,
5348,
1660,
29918,
1964,
19689,
2882,
2544,
2965,
1964,
29901,
1583,
29889,
6605,
29918,
24244,
29918,
284,
17416,
936,
29918,
1643,
29892,
29871,
396,
11698,
29984,
29909,
29901,
382,
29945,
29900,
29896,
13,
9651,
2094,
29889,
29903,
8476,
29918,
20633,
17637,
29901,
1583,
29889,
6605,
29918,
16009,
29918,
1643,
29892,
13,
9651,
2094,
29889,
29903,
8476,
29918,
3904,
16310,
29901,
1583,
29889,
6605,
29918,
348,
949,
29918,
1643,
13,
4706,
500,
13,
13,
4706,
736,
16548,
29918,
19651,
29961,
3977,
29889,
6605,
292,
29918,
8513,
29962,
13,
2
] |
freezer/job.py | mr-smart/freezer | 0 | 94711 | <filename>freezer/job.py
"""
(c) Copyright 2014,2015 Hewlett-Packard Development Company, L.P.
(C) Copyright 2016 Hewlett Packard Enterprise Development Company LP
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import abc
import datetime
import os
import sys
import time
from oslo_config import cfg
from oslo_log import log
from oslo_utils import importutils
import six
from freezer.openstack import admin
from freezer.openstack import backup
from freezer.openstack import restore
from freezer.snapshot import snapshot
from freezer.utils import checksum
from freezer.utils import exec_cmd
from freezer.utils import utils
CONF = cfg.CONF
LOG = log.getLogger(__name__)
@six.add_metaclass(abc.ABCMeta)
class Job(object):
"""
:type storage: freezer.storage.base.Storage
:type engine: freezer.engine.engine.BackupEngine
"""
def __init__(self, conf_dict, storage):
self.conf = conf_dict
self.storage = storage
self.engine = conf_dict.engine
self._general_validation()
self._validate()
@abc.abstractmethod
def _validate(self):
"""
Method that validates if all arguments available to execute the job
or not
:return: True or raise an error
"""
pass
def _general_validation(self):
"""
Apply general validation rules.
:return: True or raise an error
"""
LOG.info("Validating args for the {0} job.".format(self.conf.action))
if not self.conf.action:
raise ValueError("Please provide a valid action with --action")
if self.conf.action in ('backup', 'restore', 'admin') \
and self.conf.backup_media == 'fs' \
and not self.conf.backup_name:
raise ValueError('A value for --backup-name is required')
@abc.abstractmethod
def execute(self):
pass
class InfoJob(Job):
def _validate(self):
# no validation required for this job
pass
def execute(self):
info = self.storage.info()
if not info:
return
fields = ["Container", "Size", "Object Count"]
data = []
for container in info:
values = [
container.get('container_name'),
container.get('size'),
container.get('objects_count')
]
data.append(values)
return [fields, data]
class BackupJob(Job):
def _validate(self):
if self.conf.mode == 'fs':
if not self.conf.path_to_backup:
raise ValueError('path-to-backup argument must be provided')
if self.conf.no_incremental and (self.conf.max_level or
self.conf.always_level):
raise Exception(
'no-incremental option is not compatible '
'with backup level options')
if self.conf.mode == 'nova':
if not self.conf.no_incremental:
raise ValueError("Incremental nova backup is not supported")
if not self.conf.nova_inst_id and not self.conf.project_id:
raise ValueError("nova-inst-id or project-id"
" argument must be provided")
if self.conf.mode == 'cinder':
if not self.conf.cinder_vol_id:
raise ValueError("cinder-vol-id argument must be provided")
if self.conf.mode == "cindernative":
if not self.conf.cindernative_vol_id:
raise ValueError("cindernative-vol-id"
" argument must be provided")
def execute(self):
LOG.info('Backup job started. '
'backup_name: {0}, container: {1}, hostname: {2}, mode: {3},'
' Storage: {4}, compression: {5}'
.format(self.conf.backup_name, self.conf.container,
self.conf.hostname, self.conf.mode, self.conf.storage,
self.conf.compression))
try:
if self.conf.mode is 'fs' and self.conf.sync:
LOG.info('Executing sync to flush the file system buffer.')
(out, err) = utils.create_subprocess('sync')
if err:
LOG.error('Error while sync exec: {0}'.format(err))
except Exception as error:
LOG.error('Error while sync exec: {0}'.format(error))
if not self.conf.mode:
raise ValueError("Empty mode")
mod_name = 'freezer.mode.{0}.{1}'.format(
self.conf.mode, self.conf.mode.capitalize() + 'Mode')
app_mode = importutils.import_object(mod_name, self.conf)
backup_level = self.backup(app_mode)
level = backup_level or 0
metadata = {
'curr_backup_level': level,
'fs_real_path': self.conf.path_to_backup,
'vol_snap_path': self.conf.path_to_backup,
'client_os': sys.platform,
'client_version': self.conf.__version__,
'time_stamp': self.conf.time_stamp,
}
fields = ['action',
'always_level',
'backup_media',
'backup_name',
'container',
'container_segments',
'dry_run',
'hostname',
'path_to_backup',
'max_level',
'mode',
'backup_name',
'time_stamp',
'log_file',
'storage',
'mode',
'os_auth_version',
'proxy',
'compression',
'ssh_key',
'ssh_username',
'ssh_host',
'ssh_port',
'consistency_checksum'
]
for field_name in fields:
metadata[field_name] = self.conf.__dict__.get(field_name, '') or ''
return metadata
def backup(self, app_mode):
"""
:type app_mode: freezer.mode.mode.Mode
:return:
"""
backup_media = self.conf.backup_media
time_stamp = utils.DateTime.now().timestamp
self.conf.time_stamp = time_stamp
if backup_media == 'fs':
LOG.info('Path to backup: {0}'.format(self.conf.path_to_backup))
app_mode.prepare()
snapshot_taken = snapshot.snapshot_create(self.conf)
if snapshot_taken:
app_mode.release()
try:
filepath = '.'
chdir_path = os.path.expanduser(
os.path.normpath(self.conf.path_to_backup.strip()))
if not os.path.exists(chdir_path):
msg = 'Path to backup does not exist {0}'.format(
chdir_path)
LOG.critical(msg)
raise IOError(msg)
if not os.path.isdir(chdir_path):
filepath = os.path.basename(chdir_path)
chdir_path = os.path.dirname(chdir_path)
os.chdir(chdir_path)
# Checksum for Backup Consistency
if self.conf.consistency_check:
ignorelinks = (self.conf.dereference_symlink is None or
self.conf.dereference_symlink == 'hard')
consistency_checksum = checksum.CheckSum(
filepath, ignorelinks=ignorelinks).compute()
LOG.info('Computed checksum for consistency {0}'.
format(consistency_checksum))
self.conf.consistency_checksum = consistency_checksum
return self.engine.backup(
backup_resource=filepath,
hostname_backup_name=self.conf.hostname_backup_name,
no_incremental=self.conf.no_incremental,
max_level=self.conf.max_level,
always_level=self.conf.always_level,
restart_always_level=self.conf.restart_always_level)
finally:
# whether an error occurred or not, remove the snapshot anyway
app_mode.release()
if snapshot_taken:
snapshot.snapshot_remove(
self.conf, self.conf.shadow,
self.conf.windows_volume)
backup_os = backup.BackupOs(self.conf.client_manager,
self.conf.container,
self.storage)
if backup_media == 'nova':
if self.conf.project_id:
return self.engine.backup_nova_tenant(
project_id=self.conf.project_id,
hostname_backup_name=self.conf.hostname_backup_name,
no_incremental=self.conf.no_incremental,
max_level=self.conf.max_level,
always_level=self.conf.always_level,
restart_always_level=self.conf.restart_always_level)
else:
LOG.info('Executing nova backup. Instance ID: {0}'.format(
self.conf.nova_inst_id))
hostname_backup_name = os.path.join(
self.conf.hostname_backup_name,
self.conf.nova_inst_id)
return self.engine.backup(
backup_resource=self.conf.nova_inst_id,
hostname_backup_name=hostname_backup_name,
no_incremental=self.conf.no_incremental,
max_level=self.conf.max_level,
always_level=self.conf.always_level,
restart_always_level=self.conf.restart_always_level)
elif backup_media == 'cindernative':
LOG.info('Executing cinder native backup. Volume ID: {0}, '
'incremental: {1}'.format(self.conf.cindernative_vol_id,
self.conf.incremental))
backup_os.backup_cinder(self.conf.cindernative_vol_id,
name=self.conf.backup_name,
incremental=self.conf.incremental)
elif backup_media == 'cinder':
LOG.info('Executing cinder snapshot. Volume ID: {0}'.format(
self.conf.cinder_vol_id))
backup_os.backup_cinder_by_glance(self.conf.cinder_vol_id)
elif backup_media == 'cinderbrick':
LOG.info('Executing cinder volume backup using os-brick. '
'Volume ID: {0}'.format(self.conf.cinderbrick_vol_id))
return self.engine.backup(
backup_resource=self.conf.cinderbrick_vol_id,
hostname_backup_name=self.conf.hostname_backup_name,
no_incremental=self.conf.no_incremental,
max_level=self.conf.max_level,
always_level=self.conf.always_level,
restart_always_level=self.conf.restart_always_level)
else:
raise Exception('unknown parameter backup_media %s' % backup_media)
return None
class RestoreJob(Job):
def _validate(self):
if not any([self.conf.restore_abs_path,
self.conf.nova_inst_id,
self.conf.cinder_vol_id,
self.conf.cindernative_vol_id,
self.conf.cinderbrick_vol_id,
self.conf.project_id]):
raise ValueError("--restore-abs-path is required")
if not self.conf.container:
raise ValueError("--container is required")
if self.conf.no_incremental and (self.conf.max_level or
self.conf.always_level):
raise Exception(
'no-incremental option is not compatible '
'with backup level options')
def execute(self):
conf = self.conf
LOG.info('Executing Restore...')
restore_timestamp = None
restore_abs_path = conf.restore_abs_path
if conf.restore_from_date:
restore_timestamp = utils.date_to_timestamp(conf.restore_from_date)
if conf.backup_media == 'fs':
self.engine.restore(
hostname_backup_name=self.conf.hostname_backup_name,
restore_resource=restore_abs_path,
overwrite=conf.overwrite,
recent_to_date=restore_timestamp,
backup_media=conf.mode)
try:
if conf.consistency_checksum:
backup_checksum = conf.consistency_checksum
restore_checksum = checksum.CheckSum(restore_abs_path,
ignorelinks=True)
if restore_checksum.compare(backup_checksum):
LOG.info('Consistency check success.')
else:
raise ConsistencyCheckException(
"Backup Consistency Check failed: backup checksum "
"({0}) and restore checksum ({1}) did not match.".
format(backup_checksum, restore_checksum.checksum))
except OSError as e:
raise ConsistencyCheckException(
"Backup Consistency Check failed: could not checksum file"
" {0} ({1})".format(e.filename, e.strerror))
return {}
res = restore.RestoreOs(conf.client_manager, conf.container,
self.storage)
if conf.backup_media == 'nova':
if self.conf.project_id:
return self.engine.restore_nova_tenant(
project_id=self.conf.project_id,
hostname_backup_name=self.conf.hostname_backup_name,
overwrite=conf.overwrite,
recent_to_date=restore_timestamp)
else:
LOG.info("Restoring nova backup. Instance ID: {0}, "
"timestamp: {1} network-id {2}".format(
conf.nova_inst_id,
restore_timestamp,
conf.nova_restore_network))
hostname_backup_name = os.path.join(
self.conf.hostname_backup_name,
self.conf.nova_inst_id)
self.engine.restore(
hostname_backup_name=hostname_backup_name,
restore_resource=conf.nova_inst_id,
overwrite=conf.overwrite,
recent_to_date=restore_timestamp,
backup_media=conf.mode)
elif conf.backup_media == 'cinder':
LOG.info("Restoring cinder backup from glance. Volume ID: {0}, "
"timestamp: {1}".format(conf.cinder_vol_id,
restore_timestamp))
res.restore_cinder_by_glance(conf.cinder_vol_id, restore_timestamp)
elif conf.backup_media == 'cindernative':
LOG.info("Restoring cinder native backup. Volume ID {0}, Backup ID"
" {1}, timestamp: {2}".format(conf.cindernative_vol_id,
conf.cindernative_backup_id,
restore_timestamp))
res.restore_cinder(conf.cindernative_vol_id,
conf.cindernative_backup_id,
restore_timestamp)
elif conf.backup_media == 'cinderbrick':
LOG.info("Restoring cinder backup using os-brick. Volume ID {0}, "
"timestamp: {1}".format(conf.cinderbrick_vol_id,
restore_timestamp))
self.engine.restore(
hostname_backup_name=self.conf.hostname_backup_name,
restore_resource=conf.cinderbrick_vol_id,
overwrite=conf.overwrite,
recent_to_date=restore_timestamp,
backup_media=conf.mode)
else:
raise Exception("unknown backup type: %s" % conf.backup_media)
return {}
class AdminJob(Job):
def _validate(self):
# no validation required in this job
if self.conf.backup_media == 'cindernative':
if not self.conf.fullbackup_rotation:
raise Exception("The parameter --fullbackup-rotation "
"is required")
elif not (self.conf.remove_from_date or self.conf.remove_older_than):
raise ValueError("You need to provide to remove backup older "
"than this time. You can use --remove-older-than "
"or --remove-from-date")
def execute(self):
# remove backups by freezer admin action
backup_media = self.conf.backup_media
if backup_media == 'cindernative':
admin_os = admin.AdminOs(self.conf.client_manager)
admin_os.del_off_limit_fullbackup(
self.conf.cindernative_vol_id,
self.conf.fullbackup_rotation)
return {}
if self.conf.remove_from_date:
timestamp = utils.date_to_timestamp(self.conf.remove_from_date)
else:
timestamp = datetime.datetime.now() - \
datetime.timedelta(days=float(self.conf.remove_older_than))
timestamp = int(time.mktime(timestamp.timetuple()))
if self.conf.backup_media == 'cinder':
old_backups = self.get_cinder_old_backups(
timestamp,
self.conf.cinder_vol_id
)
self.remove_backup_dirs(old_backups, self.conf.cinder_vol_id)
return {}
hostname_backup_name_set = set()
if self.conf.backup_media == 'nova':
if self.conf.project_id:
instance_ids = self.engine.get_nova_tenant(
self.conf.project_id)
for instance_id in instance_ids:
hostname_backup_name = os.path.join(
self.conf.hostname_backup_name, instance_id)
hostname_backup_name_set.add(hostname_backup_name)
else:
hostname_backup_name = os.path.join(
self.conf.hostname_backup_name,
self.conf.nova_inst_id)
hostname_backup_name_set.add(hostname_backup_name)
else:
hostname_backup_name_set.add(self.conf.hostname_backup_name)
for backup_name in hostname_backup_name_set:
self.storage.remove_older_than(self.engine,
timestamp,
backup_name)
return {}
def get_cinder_old_backups(self, timestamp, cinder_vol_id):
path_to_list = self.get_path_prefix(cinder_vol_id)
old_backups = []
backup_dirs = self.storage.listdir(path_to_list)
for backup_dir in backup_dirs:
if int(backup_dir) <= int(timestamp):
old_backups.append(backup_dir)
return old_backups
def remove_backup_dirs(self, backups_to_remove, cinder_vol_id):
path_prefix = self.get_path_prefix(cinder_vol_id)
for backup_to_remove in backups_to_remove:
path_to_remove = "{0}/{1}".format(path_prefix, backup_to_remove)
LOG.info("Remove backup: {0}".format(path_to_remove))
self.storage.rmtree(path_to_remove)
def get_path_prefix(self, cinder_vol_id):
if self.storage.type == 'swift':
path_prefix = "{0}/{1}/{2}".format(
self.storage.container,
self.storage.segments,
cinder_vol_id
)
elif self.storage.type in ['local', 'ssh', 's3']:
path_prefix = "{0}/{1}".format(
self.storage.storage_path,
cinder_vol_id
)
else:
path_prefix = ''
return path_prefix
class ExecJob(Job):
def _validate(self):
if not self.conf.command:
raise ValueError("--command option is required")
def execute(self):
if self.conf.command:
LOG.info('Executing exec job. Command: {0}'
.format(self.conf.command))
exec_cmd.execute(self.conf.command)
else:
LOG.warning(
'No command info options were set. Exiting.')
return {}
class ConsistencyCheckException(Exception):
pass
| [
1,
529,
9507,
29958,
9021,
3298,
29914,
9057,
29889,
2272,
13,
15945,
29908,
13,
29898,
29883,
29897,
14187,
1266,
29871,
29906,
29900,
29896,
29946,
29892,
29906,
29900,
29896,
29945,
379,
809,
13650,
29899,
16638,
538,
14650,
6938,
29892,
365,
29889,
29925,
29889,
13,
29898,
29907,
29897,
14187,
1266,
29871,
29906,
29900,
29896,
29953,
379,
809,
13650,
18744,
538,
9041,
7734,
14650,
6938,
23671,
13,
13,
29931,
293,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
6293,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
3492,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
13,
1678,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
13,
2525,
2222,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
5721,
7541,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
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,
13393,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
13400,
800,
1090,
278,
19245,
29889,
13,
13,
15945,
29908,
13,
13,
5215,
25638,
13,
5215,
12865,
13,
5215,
2897,
13,
5215,
10876,
13,
5215,
931,
13,
13,
3166,
2897,
417,
29918,
2917,
1053,
274,
16434,
13,
3166,
2897,
417,
29918,
1188,
1053,
1480,
13,
3166,
2897,
417,
29918,
13239,
1053,
1053,
13239,
13,
5215,
4832,
13,
13,
3166,
3889,
3298,
29889,
3150,
1429,
1053,
4113,
13,
3166,
3889,
3298,
29889,
3150,
1429,
1053,
16199,
13,
3166,
3889,
3298,
29889,
3150,
1429,
1053,
17749,
13,
3166,
3889,
3298,
29889,
29879,
14551,
1053,
22395,
13,
3166,
3889,
3298,
29889,
13239,
1053,
1423,
2083,
13,
3166,
3889,
3298,
29889,
13239,
1053,
2279,
29918,
9006,
13,
3166,
3889,
3298,
29889,
13239,
1053,
3667,
29879,
13,
13,
6007,
29943,
353,
274,
16434,
29889,
6007,
29943,
13,
14480,
353,
1480,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
29992,
28319,
29889,
1202,
29918,
2527,
562,
605,
29898,
10736,
29889,
19658,
19346,
29897,
13,
1990,
17163,
29898,
3318,
1125,
13,
1678,
9995,
13,
1678,
584,
1853,
8635,
29901,
3889,
3298,
29889,
12925,
29889,
3188,
29889,
10486,
13,
1678,
584,
1853,
6012,
29901,
3889,
3298,
29889,
10599,
29889,
10599,
29889,
5841,
786,
12412,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1970,
29918,
8977,
29892,
8635,
1125,
13,
4706,
1583,
29889,
5527,
353,
1970,
29918,
8977,
13,
4706,
1583,
29889,
12925,
353,
8635,
13,
4706,
1583,
29889,
10599,
353,
1970,
29918,
8977,
29889,
10599,
13,
4706,
1583,
3032,
17492,
29918,
18157,
580,
13,
4706,
1583,
3032,
15480,
580,
13,
13,
1678,
732,
10736,
29889,
16595,
5696,
13,
1678,
822,
903,
15480,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
8108,
393,
2854,
1078,
565,
599,
6273,
3625,
304,
6222,
278,
4982,
13,
4706,
470,
451,
13,
4706,
584,
2457,
29901,
5852,
470,
12020,
385,
1059,
13,
4706,
9995,
13,
4706,
1209,
13,
13,
1678,
822,
903,
17492,
29918,
18157,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
2401,
368,
2498,
8845,
6865,
29889,
13,
4706,
584,
2457,
29901,
5852,
470,
12020,
385,
1059,
13,
4706,
9995,
13,
4706,
25401,
29889,
3888,
703,
7211,
1218,
6389,
363,
278,
426,
29900,
29913,
4982,
1213,
29889,
4830,
29898,
1311,
29889,
5527,
29889,
2467,
876,
13,
4706,
565,
451,
1583,
29889,
5527,
29889,
2467,
29901,
13,
9651,
12020,
7865,
2392,
703,
12148,
3867,
263,
2854,
3158,
411,
1192,
2467,
1159,
13,
13,
4706,
565,
1583,
29889,
5527,
29889,
2467,
297,
6702,
1627,
786,
742,
525,
5060,
487,
742,
525,
6406,
1495,
320,
13,
18884,
322,
1583,
29889,
5527,
29889,
1627,
786,
29918,
9799,
1275,
525,
5847,
29915,
320,
13,
18884,
322,
451,
1583,
29889,
5527,
29889,
1627,
786,
29918,
978,
29901,
13,
9651,
12020,
7865,
2392,
877,
29909,
995,
363,
1192,
1627,
786,
29899,
978,
338,
3734,
1495,
13,
13,
1678,
732,
10736,
29889,
16595,
5696,
13,
1678,
822,
6222,
29898,
1311,
1125,
13,
4706,
1209,
13,
13,
13,
1990,
22140,
11947,
29898,
11947,
1125,
13,
13,
1678,
822,
903,
15480,
29898,
1311,
1125,
13,
4706,
396,
694,
8845,
3734,
363,
445,
4982,
13,
4706,
1209,
13,
13,
1678,
822,
6222,
29898,
1311,
1125,
13,
4706,
5235,
353,
1583,
29889,
12925,
29889,
3888,
580,
13,
4706,
565,
451,
5235,
29901,
13,
9651,
736,
13,
4706,
4235,
353,
6796,
7895,
613,
376,
3505,
613,
376,
2061,
3917,
3108,
13,
4706,
848,
353,
5159,
13,
4706,
363,
5639,
297,
5235,
29901,
13,
9651,
1819,
353,
518,
13,
18884,
5639,
29889,
657,
877,
7611,
29918,
978,
5477,
13,
18884,
5639,
29889,
657,
877,
2311,
5477,
13,
18884,
5639,
29889,
657,
877,
12650,
29918,
2798,
1495,
13,
9651,
4514,
13,
9651,
848,
29889,
4397,
29898,
5975,
29897,
13,
4706,
736,
518,
9621,
29892,
848,
29962,
13,
13,
13,
1990,
7437,
786,
11947,
29898,
11947,
1125,
13,
13,
1678,
822,
903,
15480,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
5527,
29889,
8513,
1275,
525,
5847,
2396,
13,
9651,
565,
451,
1583,
29889,
5527,
29889,
2084,
29918,
517,
29918,
1627,
786,
29901,
13,
18884,
12020,
7865,
2392,
877,
2084,
29899,
517,
29899,
1627,
786,
2980,
1818,
367,
4944,
1495,
13,
9651,
565,
1583,
29889,
5527,
29889,
1217,
29918,
25629,
284,
322,
313,
1311,
29889,
5527,
29889,
3317,
29918,
5563,
470,
13,
462,
462,
632,
1583,
29889,
5527,
29889,
21936,
29918,
5563,
1125,
13,
18884,
12020,
8960,
29898,
13,
462,
1678,
525,
1217,
29899,
25629,
284,
2984,
338,
451,
15878,
525,
13,
462,
1678,
525,
2541,
16199,
3233,
3987,
1495,
13,
4706,
565,
1583,
29889,
5527,
29889,
8513,
1275,
525,
29876,
4273,
2396,
13,
9651,
565,
451,
1583,
29889,
5527,
29889,
1217,
29918,
25629,
284,
29901,
13,
18884,
12020,
7865,
2392,
703,
797,
17053,
284,
26121,
16199,
338,
451,
6969,
1159,
13,
13,
9651,
565,
451,
1583,
29889,
5527,
29889,
29876,
4273,
29918,
2611,
29918,
333,
322,
451,
1583,
29889,
5527,
29889,
4836,
29918,
333,
29901,
13,
18884,
12020,
7865,
2392,
703,
29876,
4273,
29899,
2611,
29899,
333,
470,
2060,
29899,
333,
29908,
13,
462,
462,
376,
2980,
1818,
367,
4944,
1159,
13,
13,
4706,
565,
1583,
29889,
5527,
29889,
8513,
1275,
525,
29883,
4995,
2396,
13,
9651,
565,
451,
1583,
29889,
5527,
29889,
29883,
4995,
29918,
1555,
29918,
333,
29901,
13,
18884,
12020,
7865,
2392,
703,
29883,
4995,
29899,
1555,
29899,
333,
2980,
1818,
367,
4944,
1159,
13,
13,
4706,
565,
1583,
29889,
5527,
29889,
8513,
1275,
376,
29883,
513,
824,
1230,
1115,
13,
9651,
565,
451,
1583,
29889,
5527,
29889,
29883,
513,
824,
1230,
29918,
1555,
29918,
333,
29901,
13,
18884,
12020,
7865,
2392,
703,
29883,
513,
824,
1230,
29899,
1555,
29899,
333,
29908,
13,
462,
462,
376,
2980,
1818,
367,
4944,
1159,
13,
13,
1678,
822,
6222,
29898,
1311,
1125,
13,
4706,
25401,
29889,
3888,
877,
5841,
786,
4982,
4687,
29889,
525,
13,
462,
525,
1627,
786,
29918,
978,
29901,
426,
29900,
1118,
5639,
29901,
426,
29896,
1118,
3495,
978,
29901,
426,
29906,
1118,
4464,
29901,
426,
29941,
1118,
29915,
13,
462,
525,
26162,
29901,
426,
29946,
1118,
24221,
29901,
426,
29945,
10162,
13,
462,
869,
4830,
29898,
1311,
29889,
5527,
29889,
1627,
786,
29918,
978,
29892,
1583,
29889,
5527,
29889,
7611,
29892,
13,
462,
308,
1583,
29889,
5527,
29889,
28988,
29892,
1583,
29889,
5527,
29889,
8513,
29892,
1583,
29889,
5527,
29889,
12925,
29892,
13,
462,
308,
1583,
29889,
5527,
29889,
510,
2590,
876,
13,
4706,
1018,
29901,
13,
9651,
565,
1583,
29889,
5527,
29889,
8513,
338,
525,
5847,
29915,
322,
1583,
29889,
5527,
29889,
16593,
29901,
13,
18884,
25401,
29889,
3888,
877,
5379,
17068,
16523,
304,
28371,
278,
934,
1788,
6835,
29889,
1495,
13,
18884,
313,
449,
29892,
4589,
29897,
353,
3667,
29879,
29889,
3258,
29918,
1491,
5014,
877,
16593,
1495,
13,
18884,
565,
4589,
29901,
13,
462,
1678,
25401,
29889,
2704,
877,
2392,
1550,
16523,
2279,
29901,
426,
29900,
29913,
4286,
4830,
29898,
3127,
876,
13,
4706,
5174,
8960,
408,
1059,
29901,
13,
9651,
25401,
29889,
2704,
877,
2392,
1550,
16523,
2279,
29901,
426,
29900,
29913,
4286,
4830,
29898,
2704,
876,
13,
4706,
565,
451,
1583,
29889,
5527,
29889,
8513,
29901,
13,
9651,
12020,
7865,
2392,
703,
8915,
4464,
1159,
13,
4706,
878,
29918,
978,
353,
525,
9021,
3298,
29889,
8513,
29889,
29912,
29900,
1836,
29912,
29896,
29913,
4286,
4830,
29898,
13,
9651,
1583,
29889,
5527,
29889,
8513,
29892,
1583,
29889,
5527,
29889,
8513,
29889,
5030,
2410,
675,
580,
718,
525,
6818,
1495,
13,
4706,
623,
29918,
8513,
353,
1053,
13239,
29889,
5215,
29918,
3318,
29898,
1545,
29918,
978,
29892,
1583,
29889,
5527,
29897,
13,
4706,
16199,
29918,
5563,
353,
1583,
29889,
1627,
786,
29898,
932,
29918,
8513,
29897,
13,
4706,
3233,
353,
16199,
29918,
5563,
470,
29871,
29900,
13,
13,
4706,
15562,
353,
426,
13,
9651,
525,
21962,
29918,
1627,
786,
29918,
5563,
2396,
3233,
29892,
13,
9651,
525,
5847,
29918,
6370,
29918,
2084,
2396,
1583,
29889,
5527,
29889,
2084,
29918,
517,
29918,
1627,
786,
29892,
13,
9651,
525,
1555,
29918,
29879,
8971,
29918,
2084,
2396,
1583,
29889,
5527,
29889,
2084,
29918,
517,
29918,
1627,
786,
29892,
13,
9651,
525,
4645,
29918,
359,
2396,
10876,
29889,
12120,
29892,
13,
9651,
525,
4645,
29918,
3259,
2396,
1583,
29889,
5527,
17255,
3259,
1649,
29892,
13,
9651,
525,
2230,
29918,
303,
1160,
2396,
1583,
29889,
5527,
29889,
2230,
29918,
303,
1160,
29892,
13,
4706,
500,
13,
4706,
4235,
353,
6024,
2467,
742,
13,
462,
29871,
525,
21936,
29918,
5563,
742,
13,
462,
29871,
525,
1627,
786,
29918,
9799,
742,
13,
462,
29871,
525,
1627,
786,
29918,
978,
742,
13,
462,
29871,
525,
7611,
742,
13,
462,
29871,
525,
7611,
29918,
10199,
1860,
742,
13,
462,
29871,
525,
29881,
719,
29918,
3389,
742,
13,
462,
29871,
525,
28988,
742,
13,
462,
29871,
525,
2084,
29918,
517,
29918,
1627,
786,
742,
13,
462,
29871,
525,
3317,
29918,
5563,
742,
13,
462,
29871,
525,
8513,
742,
13,
462,
29871,
525,
1627,
786,
29918,
978,
742,
13,
462,
29871,
525,
2230,
29918,
303,
1160,
742,
13,
462,
29871,
525,
1188,
29918,
1445,
742,
13,
462,
29871,
525,
12925,
742,
13,
462,
29871,
525,
8513,
742,
13,
462,
29871,
525,
359,
29918,
5150,
29918,
3259,
742,
13,
462,
29871,
525,
14701,
742,
13,
462,
29871,
525,
510,
2590,
742,
13,
462,
29871,
525,
15269,
29918,
1989,
742,
13,
462,
29871,
525,
15269,
29918,
6786,
742,
13,
462,
29871,
525,
15269,
29918,
3069,
742,
13,
462,
29871,
525,
15269,
29918,
637,
742,
13,
462,
29871,
525,
3200,
391,
3819,
29918,
3198,
2083,
29915,
13,
462,
29871,
4514,
13,
4706,
363,
1746,
29918,
978,
297,
4235,
29901,
13,
9651,
15562,
29961,
2671,
29918,
978,
29962,
353,
1583,
29889,
5527,
17255,
8977,
26914,
657,
29898,
2671,
29918,
978,
29892,
27255,
470,
6629,
13,
4706,
736,
15562,
13,
13,
1678,
822,
16199,
29898,
1311,
29892,
623,
29918,
8513,
1125,
13,
4706,
9995,
13,
13,
4706,
584,
1853,
623,
29918,
8513,
29901,
3889,
3298,
29889,
8513,
29889,
8513,
29889,
6818,
13,
4706,
584,
2457,
29901,
13,
4706,
9995,
13,
4706,
16199,
29918,
9799,
353,
1583,
29889,
5527,
29889,
1627,
786,
29918,
9799,
13,
13,
4706,
931,
29918,
303,
1160,
353,
3667,
29879,
29889,
11384,
29889,
3707,
2141,
16394,
13,
4706,
1583,
29889,
5527,
29889,
2230,
29918,
303,
1160,
353,
931,
29918,
303,
1160,
13,
13,
4706,
565,
16199,
29918,
9799,
1275,
525,
5847,
2396,
13,
9651,
25401,
29889,
3888,
877,
2605,
304,
16199,
29901,
426,
29900,
29913,
4286,
4830,
29898,
1311,
29889,
5527,
29889,
2084,
29918,
517,
29918,
1627,
786,
876,
13,
9651,
623,
29918,
8513,
29889,
19125,
580,
13,
9651,
22395,
29918,
29873,
9424,
353,
22395,
29889,
29879,
14551,
29918,
3258,
29898,
1311,
29889,
5527,
29897,
13,
9651,
565,
22395,
29918,
29873,
9424,
29901,
13,
18884,
623,
29918,
8513,
29889,
14096,
580,
13,
9651,
1018,
29901,
13,
18884,
934,
2084,
353,
525,
6169,
13,
18884,
521,
3972,
29918,
2084,
353,
2897,
29889,
2084,
29889,
18837,
1792,
29898,
13,
462,
1678,
2897,
29889,
2084,
29889,
12324,
2084,
29898,
1311,
29889,
5527,
29889,
2084,
29918,
517,
29918,
1627,
786,
29889,
17010,
22130,
13,
18884,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
305,
3972,
29918,
2084,
1125,
13,
462,
1678,
10191,
353,
525,
2605,
304,
16199,
947,
451,
1863,
426,
29900,
29913,
4286,
4830,
29898,
13,
462,
4706,
521,
3972,
29918,
2084,
29897,
13,
462,
1678,
25401,
29889,
9695,
936,
29898,
7645,
29897,
13,
462,
1678,
12020,
10663,
2392,
29898,
7645,
29897,
13,
18884,
565,
451,
2897,
29889,
2084,
29889,
275,
3972,
29898,
305,
3972,
29918,
2084,
1125,
13,
462,
1678,
934,
2084,
353,
2897,
29889,
2084,
29889,
6500,
3871,
29898,
305,
3972,
29918,
2084,
29897,
13,
462,
1678,
521,
3972,
29918,
2084,
353,
2897,
29889,
2084,
29889,
25721,
29898,
305,
3972,
29918,
2084,
29897,
13,
18884,
2897,
29889,
305,
3972,
29898,
305,
3972,
29918,
2084,
29897,
13,
13,
18884,
396,
5399,
2083,
363,
7437,
786,
2138,
391,
3819,
13,
18884,
565,
1583,
29889,
5527,
29889,
3200,
391,
3819,
29918,
3198,
29901,
13,
462,
1678,
16245,
295,
19363,
353,
313,
1311,
29889,
5527,
29889,
29881,
406,
1659,
29918,
29879,
21053,
682,
338,
6213,
470,
13,
462,
462,
259,
1583,
29889,
5527,
29889,
29881,
406,
1659,
29918,
29879,
21053,
682,
1275,
525,
6800,
1495,
13,
462,
1678,
5718,
3819,
29918,
3198,
2083,
353,
1423,
2083,
29889,
5596,
11139,
29898,
13,
462,
4706,
934,
2084,
29892,
16245,
295,
19363,
29922,
647,
272,
295,
19363,
467,
26017,
580,
13,
462,
1678,
25401,
29889,
3888,
877,
20606,
287,
1423,
2083,
363,
5718,
3819,
426,
29900,
29913,
4286,
13,
462,
632,
3402,
29898,
3200,
391,
3819,
29918,
3198,
2083,
876,
13,
462,
1678,
1583,
29889,
5527,
29889,
3200,
391,
3819,
29918,
3198,
2083,
353,
5718,
3819,
29918,
3198,
2083,
13,
13,
18884,
736,
1583,
29889,
10599,
29889,
1627,
786,
29898,
13,
462,
1678,
16199,
29918,
10314,
29922,
1445,
2084,
29892,
13,
462,
1678,
3495,
978,
29918,
1627,
786,
29918,
978,
29922,
1311,
29889,
5527,
29889,
28988,
29918,
1627,
786,
29918,
978,
29892,
13,
462,
1678,
694,
29918,
25629,
284,
29922,
1311,
29889,
5527,
29889,
1217,
29918,
25629,
284,
29892,
13,
462,
1678,
4236,
29918,
5563,
29922,
1311,
29889,
5527,
29889,
3317,
29918,
5563,
29892,
13,
462,
1678,
2337,
29918,
5563,
29922,
1311,
29889,
5527,
29889,
21936,
29918,
5563,
29892,
13,
462,
1678,
10715,
29918,
21936,
29918,
5563,
29922,
1311,
29889,
5527,
29889,
5060,
442,
29918,
21936,
29918,
5563,
29897,
13,
13,
9651,
7146,
29901,
13,
18884,
396,
3692,
385,
1059,
10761,
470,
451,
29892,
3349,
278,
22395,
8763,
13,
18884,
623,
29918,
8513,
29889,
14096,
580,
13,
18884,
565,
22395,
29918,
29873,
9424,
29901,
13,
462,
1678,
22395,
29889,
29879,
14551,
29918,
5992,
29898,
13,
462,
4706,
1583,
29889,
5527,
29892,
1583,
29889,
5527,
29889,
17505,
29892,
13,
462,
4706,
1583,
29889,
5527,
29889,
10499,
29918,
24623,
29897,
13,
13,
4706,
16199,
29918,
359,
353,
16199,
29889,
5841,
786,
24768,
29898,
1311,
29889,
5527,
29889,
4645,
29918,
12847,
29892,
13,
462,
462,
1678,
1583,
29889,
5527,
29889,
7611,
29892,
13,
462,
462,
1678,
1583,
29889,
12925,
29897,
13,
13,
4706,
565,
16199,
29918,
9799,
1275,
525,
29876,
4273,
2396,
13,
9651,
565,
1583,
29889,
5527,
29889,
4836,
29918,
333,
29901,
13,
18884,
736,
1583,
29889,
10599,
29889,
1627,
786,
29918,
29876,
4273,
29918,
841,
424,
29898,
13,
462,
1678,
2060,
29918,
333,
29922,
1311,
29889,
5527,
29889,
4836,
29918,
333,
29892,
13,
462,
1678,
3495,
978,
29918,
1627,
786,
29918,
978,
29922,
1311,
29889,
5527,
29889,
28988,
29918,
1627,
786,
29918,
978,
29892,
13,
462,
1678,
694,
29918,
25629,
284,
29922,
1311,
29889,
5527,
29889,
1217,
29918,
25629,
284,
29892,
13,
462,
1678,
4236,
29918,
5563,
29922,
1311,
29889,
5527,
29889,
3317,
29918,
5563,
29892,
13,
462,
1678,
2337,
29918,
5563,
29922,
1311,
29889,
5527,
29889,
21936,
29918,
5563,
29892,
13,
462,
1678,
10715,
29918,
21936,
29918,
5563,
29922,
1311,
29889,
5527,
29889,
5060,
442,
29918,
21936,
29918,
5563,
29897,
13,
9651,
1683,
29901,
13,
18884,
25401,
29889,
3888,
877,
5379,
17068,
26121,
16199,
29889,
2799,
749,
3553,
29901,
426,
29900,
29913,
4286,
4830,
29898,
13,
462,
1678,
1583,
29889,
5527,
29889,
29876,
4273,
29918,
2611,
29918,
333,
876,
13,
18884,
3495,
978,
29918,
1627,
786,
29918,
978,
353,
2897,
29889,
2084,
29889,
7122,
29898,
13,
462,
1678,
1583,
29889,
5527,
29889,
28988,
29918,
1627,
786,
29918,
978,
29892,
13,
462,
1678,
1583,
29889,
5527,
29889,
29876,
4273,
29918,
2611,
29918,
333,
29897,
13,
18884,
736,
1583,
29889,
10599,
29889,
1627,
786,
29898,
13,
462,
1678,
16199,
29918,
10314,
29922,
1311,
29889,
5527,
29889,
29876,
4273,
29918,
2611,
29918,
333,
29892,
13,
462,
1678,
3495,
978,
29918,
1627,
786,
29918,
978,
29922,
28988,
29918,
1627,
786,
29918,
978,
29892,
13,
462,
1678,
694,
29918,
25629,
284,
29922,
1311,
29889,
5527,
29889,
1217,
29918,
25629,
284,
29892,
13,
462,
1678,
4236,
29918,
5563,
29922,
1311,
29889,
5527,
29889,
3317,
29918,
5563,
29892,
13,
462,
1678,
2337,
29918,
5563,
29922,
1311,
29889,
5527,
29889,
21936,
29918,
5563,
29892,
13,
462,
1678,
10715,
29918,
21936,
29918,
5563,
29922,
1311,
29889,
5527,
29889,
5060,
442,
29918,
21936,
29918,
5563,
29897,
13,
13,
4706,
25342,
16199,
29918,
9799,
1275,
525,
29883,
513,
824,
1230,
2396,
13,
9651,
25401,
29889,
3888,
877,
5379,
17068,
274,
4995,
7531,
16199,
29889,
16934,
3553,
29901,
426,
29900,
1118,
525,
13,
462,
268,
525,
25629,
284,
29901,
426,
29896,
29913,
4286,
4830,
29898,
1311,
29889,
5527,
29889,
29883,
513,
824,
1230,
29918,
1555,
29918,
333,
29892,
13,
462,
462,
1669,
1583,
29889,
5527,
29889,
25629,
284,
876,
13,
9651,
16199,
29918,
359,
29889,
1627,
786,
29918,
29883,
4995,
29898,
1311,
29889,
5527,
29889,
29883,
513,
824,
1230,
29918,
1555,
29918,
333,
29892,
13,
462,
462,
1678,
1024,
29922,
1311,
29889,
5527,
29889,
1627,
786,
29918,
978,
29892,
13,
462,
462,
1678,
11924,
284,
29922,
1311,
29889,
5527,
29889,
25629,
284,
29897,
13,
4706,
25342,
16199,
29918,
9799,
1275,
525,
29883,
4995,
2396,
13,
9651,
25401,
29889,
3888,
877,
5379,
17068,
274,
4995,
22395,
29889,
16934,
3553,
29901,
426,
29900,
29913,
4286,
4830,
29898,
13,
18884,
1583,
29889,
5527,
29889,
29883,
4995,
29918,
1555,
29918,
333,
876,
13,
9651,
16199,
29918,
359,
29889,
1627,
786,
29918,
29883,
4995,
29918,
1609,
29918,
3820,
749,
29898,
1311,
29889,
5527,
29889,
29883,
4995,
29918,
1555,
29918,
333,
29897,
13,
4706,
25342,
16199,
29918,
9799,
1275,
525,
29883,
4995,
1182,
860,
2396,
13,
9651,
25401,
29889,
3888,
877,
5379,
17068,
274,
4995,
7977,
16199,
773,
2897,
29899,
1182,
860,
29889,
525,
13,
462,
268,
525,
24679,
3553,
29901,
426,
29900,
29913,
4286,
4830,
29898,
1311,
29889,
5527,
29889,
29883,
4995,
1182,
860,
29918,
1555,
29918,
333,
876,
13,
9651,
736,
1583,
29889,
10599,
29889,
1627,
786,
29898,
13,
18884,
16199,
29918,
10314,
29922,
1311,
29889,
5527,
29889,
29883,
4995,
1182,
860,
29918,
1555,
29918,
333,
29892,
13,
18884,
3495,
978,
29918,
1627,
786,
29918,
978,
29922,
1311,
29889,
5527,
29889,
28988,
29918,
1627,
786,
29918,
978,
29892,
13,
18884,
694,
29918,
25629,
284,
29922,
1311,
29889,
5527,
29889,
1217,
29918,
25629,
284,
29892,
13,
18884,
4236,
29918,
5563,
29922,
1311,
29889,
5527,
29889,
3317,
29918,
5563,
29892,
13,
18884,
2337,
29918,
5563,
29922,
1311,
29889,
5527,
29889,
21936,
29918,
5563,
29892,
13,
18884,
10715,
29918,
21936,
29918,
5563,
29922,
1311,
29889,
5527,
29889,
5060,
442,
29918,
21936,
29918,
5563,
29897,
13,
4706,
1683,
29901,
13,
9651,
12020,
8960,
877,
26690,
3443,
16199,
29918,
9799,
1273,
29879,
29915,
1273,
16199,
29918,
9799,
29897,
13,
4706,
736,
6213,
13,
13,
13,
1990,
11654,
487,
11947,
29898,
11947,
1125,
13,
13,
1678,
822,
903,
15480,
29898,
1311,
1125,
13,
4706,
565,
451,
738,
4197,
1311,
29889,
5527,
29889,
5060,
487,
29918,
6897,
29918,
2084,
29892,
13,
462,
1678,
1583,
29889,
5527,
29889,
29876,
4273,
29918,
2611,
29918,
333,
29892,
13,
462,
1678,
1583,
29889,
5527,
29889,
29883,
4995,
29918,
1555,
29918,
333,
29892,
13,
462,
1678,
1583,
29889,
5527,
29889,
29883,
513,
824,
1230,
29918,
1555,
29918,
333,
29892,
13,
462,
1678,
1583,
29889,
5527,
29889,
29883,
4995,
1182,
860,
29918,
1555,
29918,
333,
29892,
13,
462,
1678,
1583,
29889,
5527,
29889,
4836,
29918,
333,
29962,
1125,
13,
9651,
12020,
7865,
2392,
703,
489,
5060,
487,
29899,
6897,
29899,
2084,
338,
3734,
1159,
13,
4706,
565,
451,
1583,
29889,
5527,
29889,
7611,
29901,
13,
9651,
12020,
7865,
2392,
703,
489,
7611,
338,
3734,
1159,
13,
4706,
565,
1583,
29889,
5527,
29889,
1217,
29918,
25629,
284,
322,
313,
1311,
29889,
5527,
29889,
3317,
29918,
5563,
470,
13,
462,
462,
308,
1583,
29889,
5527,
29889,
21936,
29918,
5563,
1125,
13,
9651,
12020,
8960,
29898,
13,
18884,
525,
1217,
29899,
25629,
284,
2984,
338,
451,
15878,
525,
13,
18884,
525,
2541,
16199,
3233,
3987,
1495,
13,
13,
1678,
822,
6222,
29898,
1311,
1125,
13,
4706,
1970,
353,
1583,
29889,
5527,
13,
4706,
25401,
29889,
3888,
877,
5379,
17068,
11654,
487,
856,
1495,
13,
4706,
17749,
29918,
16394,
353,
6213,
13,
13,
4706,
17749,
29918,
6897,
29918,
2084,
353,
1970,
29889,
5060,
487,
29918,
6897,
29918,
2084,
13,
4706,
565,
1970,
29889,
5060,
487,
29918,
3166,
29918,
1256,
29901,
13,
9651,
17749,
29918,
16394,
353,
3667,
29879,
29889,
1256,
29918,
517,
29918,
16394,
29898,
5527,
29889,
5060,
487,
29918,
3166,
29918,
1256,
29897,
13,
4706,
565,
1970,
29889,
1627,
786,
29918,
9799,
1275,
525,
5847,
2396,
13,
9651,
1583,
29889,
10599,
29889,
5060,
487,
29898,
13,
18884,
3495,
978,
29918,
1627,
786,
29918,
978,
29922,
1311,
29889,
5527,
29889,
28988,
29918,
1627,
786,
29918,
978,
29892,
13,
18884,
17749,
29918,
10314,
29922,
5060,
487,
29918,
6897,
29918,
2084,
29892,
13,
18884,
26556,
29922,
5527,
29889,
957,
3539,
29892,
13,
18884,
7786,
29918,
517,
29918,
1256,
29922,
5060,
487,
29918,
16394,
29892,
13,
18884,
16199,
29918,
9799,
29922,
5527,
29889,
8513,
29897,
13,
13,
9651,
1018,
29901,
13,
18884,
565,
1970,
29889,
3200,
391,
3819,
29918,
3198,
2083,
29901,
13,
462,
1678,
16199,
29918,
3198,
2083,
353,
1970,
29889,
3200,
391,
3819,
29918,
3198,
2083,
13,
462,
1678,
17749,
29918,
3198,
2083,
353,
1423,
2083,
29889,
5596,
11139,
29898,
5060,
487,
29918,
6897,
29918,
2084,
29892,
13,
462,
462,
462,
308,
16245,
295,
19363,
29922,
5574,
29897,
13,
462,
1678,
565,
17749,
29918,
3198,
2083,
29889,
18307,
29898,
1627,
786,
29918,
3198,
2083,
1125,
13,
462,
4706,
25401,
29889,
3888,
877,
13696,
391,
3819,
1423,
2551,
29889,
1495,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
12020,
2138,
391,
3819,
5596,
2451,
29898,
13,
462,
9651,
376,
5841,
786,
2138,
391,
3819,
5399,
5229,
29901,
16199,
1423,
2083,
376,
13,
462,
9651,
376,
3319,
29900,
1800,
322,
17749,
1423,
2083,
21313,
29896,
1800,
1258,
451,
1993,
1213,
29889,
13,
462,
9651,
3402,
29898,
1627,
786,
29918,
3198,
2083,
29892,
17749,
29918,
3198,
2083,
29889,
3198,
2083,
876,
13,
9651,
5174,
438,
29173,
408,
321,
29901,
13,
18884,
12020,
2138,
391,
3819,
5596,
2451,
29898,
13,
462,
1678,
376,
5841,
786,
2138,
391,
3819,
5399,
5229,
29901,
1033,
451,
1423,
2083,
934,
29908,
13,
462,
1678,
376,
426,
29900,
29913,
21313,
29896,
1800,
1642,
4830,
29898,
29872,
29889,
9507,
29892,
321,
29889,
710,
2704,
876,
13,
9651,
736,
6571,
13,
4706,
620,
353,
17749,
29889,
15078,
487,
24768,
29898,
5527,
29889,
4645,
29918,
12847,
29892,
1970,
29889,
7611,
29892,
13,
462,
18884,
1583,
29889,
12925,
29897,
13,
4706,
565,
1970,
29889,
1627,
786,
29918,
9799,
1275,
525,
29876,
4273,
2396,
13,
9651,
565,
1583,
29889,
5527,
29889,
4836,
29918,
333,
29901,
13,
18884,
736,
1583,
29889,
10599,
29889,
5060,
487,
29918,
29876,
4273,
29918,
841,
424,
29898,
13,
462,
1678,
2060,
29918,
333,
29922,
1311,
29889,
5527,
29889,
4836,
29918,
333,
29892,
13,
462,
1678,
3495,
978,
29918,
1627,
786,
29918,
978,
29922,
1311,
29889,
5527,
29889,
28988,
29918,
1627,
786,
29918,
978,
29892,
13,
462,
1678,
26556,
29922,
5527,
29889,
957,
3539,
29892,
13,
462,
1678,
7786,
29918,
517,
29918,
1256,
29922,
5060,
487,
29918,
16394,
29897,
13,
9651,
1683,
29901,
13,
18884,
25401,
29889,
3888,
703,
15078,
8253,
26121,
16199,
29889,
2799,
749,
3553,
29901,
426,
29900,
1118,
376,
13,
462,
308,
376,
16394,
29901,
426,
29896,
29913,
3564,
29899,
333,
426,
29906,
29913,
1642,
4830,
29898,
13,
462,
632,
1970,
29889,
29876,
4273,
29918,
2611,
29918,
333,
29892,
13,
462,
632,
17749,
29918,
16394,
29892,
13,
462,
632,
1970,
29889,
29876,
4273,
29918,
5060,
487,
29918,
11618,
876,
13,
18884,
3495,
978,
29918,
1627,
786,
29918,
978,
353,
2897,
29889,
2084,
29889,
7122,
29898,
13,
462,
1678,
1583,
29889,
5527,
29889,
28988,
29918,
1627,
786,
29918,
978,
29892,
13,
462,
1678,
1583,
29889,
5527,
29889,
29876,
4273,
29918,
2611,
29918,
333,
29897,
13,
18884,
1583,
29889,
10599,
29889,
5060,
487,
29898,
13,
462,
1678,
3495,
978,
29918,
1627,
786,
29918,
978,
29922,
28988,
29918,
1627,
786,
29918,
978,
29892,
13,
462,
1678,
17749,
29918,
10314,
29922,
5527,
29889,
29876,
4273,
29918,
2611,
29918,
333,
29892,
13,
462,
1678,
26556,
29922,
5527,
29889,
957,
3539,
29892,
13,
462,
1678,
7786,
29918,
517,
29918,
1256,
29922,
5060,
487,
29918,
16394,
29892,
13,
462,
1678,
16199,
29918,
9799,
29922,
5527,
29889,
8513,
29897,
13,
13,
4706,
25342,
1970,
29889,
1627,
786,
29918,
9799,
1275,
525,
29883,
4995,
2396,
13,
9651,
25401,
29889,
3888,
703,
15078,
8253,
274,
4995,
16199,
515,
21798,
29889,
16934,
3553,
29901,
426,
29900,
1118,
376,
13,
462,
268,
376,
16394,
29901,
426,
29896,
29913,
1642,
4830,
29898,
5527,
29889,
29883,
4995,
29918,
1555,
29918,
333,
29892,
13,
462,
462,
632,
17749,
29918,
16394,
876,
13,
9651,
620,
29889,
5060,
487,
29918,
29883,
4995,
29918,
1609,
29918,
3820,
749,
29898,
5527,
29889,
29883,
4995,
29918,
1555,
29918,
333,
29892,
17749,
29918,
16394,
29897,
13,
4706,
25342,
1970,
29889,
1627,
786,
29918,
9799,
1275,
525,
29883,
513,
824,
1230,
2396,
13,
9651,
25401,
29889,
3888,
703,
15078,
8253,
274,
4995,
7531,
16199,
29889,
16934,
3553,
426,
29900,
1118,
7437,
786,
3553,
29908,
13,
462,
268,
376,
426,
29896,
1118,
14334,
29901,
426,
29906,
29913,
1642,
4830,
29898,
5527,
29889,
29883,
513,
824,
1230,
29918,
1555,
29918,
333,
29892,
13,
462,
462,
462,
259,
1970,
29889,
29883,
513,
824,
1230,
29918,
1627,
786,
29918,
333,
29892,
13,
462,
462,
462,
259,
17749,
29918,
16394,
876,
13,
9651,
620,
29889,
5060,
487,
29918,
29883,
4995,
29898,
5527,
29889,
29883,
513,
824,
1230,
29918,
1555,
29918,
333,
29892,
13,
462,
1669,
1970,
29889,
29883,
513,
824,
1230,
29918,
1627,
786,
29918,
333,
29892,
13,
462,
1669,
17749,
29918,
16394,
29897,
13,
4706,
25342,
1970,
29889,
1627,
786,
29918,
9799,
1275,
525,
29883,
4995,
1182,
860,
2396,
13,
9651,
25401,
29889,
3888,
703,
15078,
8253,
274,
4995,
16199,
773,
2897,
29899,
1182,
860,
29889,
16934,
3553,
426,
29900,
1118,
376,
13,
462,
268,
376,
16394,
29901,
426,
29896,
29913,
1642,
4830,
29898,
5527,
29889,
29883,
4995,
1182,
860,
29918,
1555,
29918,
333,
29892,
13,
462,
462,
632,
17749,
29918,
16394,
876,
13,
9651,
1583,
29889,
10599,
29889,
5060,
487,
29898,
13,
18884,
3495,
978,
29918,
1627,
786,
29918,
978,
29922,
1311,
29889,
5527,
29889,
28988,
29918,
1627,
786,
29918,
978,
29892,
13,
18884,
17749,
29918,
10314,
29922,
5527,
29889,
29883,
4995,
1182,
860,
29918,
1555,
29918,
333,
29892,
13,
18884,
26556,
29922,
5527,
29889,
957,
3539,
29892,
13,
18884,
7786,
29918,
517,
29918,
1256,
29922,
5060,
487,
29918,
16394,
29892,
13,
18884,
16199,
29918,
9799,
29922,
5527,
29889,
8513,
29897,
13,
4706,
1683,
29901,
13,
9651,
12020,
8960,
703,
26690,
16199,
1134,
29901,
1273,
29879,
29908,
1273,
1970,
29889,
1627,
786,
29918,
9799,
29897,
13,
4706,
736,
6571,
13,
13,
13,
1990,
10229,
11947,
29898,
11947,
1125,
13,
13,
1678,
822,
903,
15480,
29898,
1311,
1125,
13,
4706,
396,
694,
8845,
3734,
297,
445,
4982,
13,
4706,
565,
1583,
29889,
5527,
29889,
1627,
786,
29918,
9799,
1275,
525,
29883,
513,
824,
1230,
2396,
13,
9651,
565,
451,
1583,
29889,
5527,
29889,
8159,
1627,
786,
29918,
5450,
362,
29901,
13,
18884,
12020,
8960,
703,
1576,
3443,
1192,
8159,
1627,
786,
29899,
5450,
362,
376,
13,
462,
18884,
376,
275,
3734,
1159,
13,
4706,
25342,
451,
313,
1311,
29889,
5527,
29889,
5992,
29918,
3166,
29918,
1256,
470,
1583,
29889,
5527,
29889,
5992,
29918,
3194,
29918,
27603,
1125,
13,
9651,
12020,
7865,
2392,
703,
3492,
817,
304,
3867,
304,
3349,
16199,
9642,
376,
13,
462,
632,
376,
27603,
445,
931,
29889,
887,
508,
671,
1192,
5992,
29899,
3194,
29899,
27603,
376,
13,
462,
632,
376,
272,
1192,
5992,
29899,
3166,
29899,
1256,
1159,
13,
13,
1678,
822,
6222,
29898,
1311,
1125,
13,
4706,
396,
3349,
1250,
14340,
491,
3889,
3298,
4113,
3158,
13,
4706,
16199,
29918,
9799,
353,
1583,
29889,
5527,
29889,
1627,
786,
29918,
9799,
13,
4706,
565,
16199,
29918,
9799,
1275,
525,
29883,
513,
824,
1230,
2396,
13,
9651,
4113,
29918,
359,
353,
4113,
29889,
12754,
24768,
29898,
1311,
29889,
5527,
29889,
4645,
29918,
12847,
29897,
13,
9651,
4113,
29918,
359,
29889,
6144,
29918,
2696,
29918,
13400,
29918,
8159,
1627,
786,
29898,
13,
18884,
1583,
29889,
5527,
29889,
29883,
513,
824,
1230,
29918,
1555,
29918,
333,
29892,
13,
18884,
1583,
29889,
5527,
29889,
8159,
1627,
786,
29918,
5450,
362,
29897,
13,
9651,
736,
6571,
13,
4706,
565,
1583,
29889,
5527,
29889,
5992,
29918,
3166,
29918,
1256,
29901,
13,
9651,
14334,
353,
3667,
29879,
29889,
1256,
29918,
517,
29918,
16394,
29898,
1311,
29889,
5527,
29889,
5992,
29918,
3166,
29918,
1256,
29897,
13,
4706,
1683,
29901,
13,
9651,
14334,
353,
12865,
29889,
12673,
29889,
3707,
580,
448,
320,
13,
18884,
12865,
29889,
9346,
287,
2554,
29898,
16700,
29922,
7411,
29898,
1311,
29889,
5527,
29889,
5992,
29918,
3194,
29918,
27603,
876,
13,
9651,
14334,
353,
938,
29898,
2230,
29889,
29885,
1193,
603,
29898,
16394,
29889,
9346,
24120,
552,
22130,
13,
13,
4706,
565,
1583,
29889,
5527,
29889,
1627,
786,
29918,
9799,
1275,
525,
29883,
4995,
2396,
13,
9651,
2030,
29918,
1627,
14340,
353,
1583,
29889,
657,
29918,
29883,
4995,
29918,
1025,
29918,
1627,
14340,
29898,
13,
18884,
14334,
29892,
13,
18884,
1583,
29889,
5527,
29889,
29883,
4995,
29918,
1555,
29918,
333,
13,
9651,
1723,
13,
9651,
1583,
29889,
5992,
29918,
1627,
786,
29918,
3972,
29879,
29898,
1025,
29918,
1627,
14340,
29892,
1583,
29889,
5527,
29889,
29883,
4995,
29918,
1555,
29918,
333,
29897,
13,
9651,
736,
6571,
13,
13,
4706,
3495,
978,
29918,
1627,
786,
29918,
978,
29918,
842,
353,
731,
580,
13,
13,
4706,
565,
1583,
29889,
5527,
29889,
1627,
786,
29918,
9799,
1275,
525,
29876,
4273,
2396,
13,
9651,
565,
1583,
29889,
5527,
29889,
4836,
29918,
333,
29901,
13,
18884,
2777,
29918,
4841,
353,
1583,
29889,
10599,
29889,
657,
29918,
29876,
4273,
29918,
841,
424,
29898,
13,
462,
1678,
1583,
29889,
5527,
29889,
4836,
29918,
333,
29897,
13,
18884,
363,
2777,
29918,
333,
297,
2777,
29918,
4841,
29901,
13,
462,
1678,
3495,
978,
29918,
1627,
786,
29918,
978,
353,
2897,
29889,
2084,
29889,
7122,
29898,
13,
462,
4706,
1583,
29889,
5527,
29889,
28988,
29918,
1627,
786,
29918,
978,
29892,
2777,
29918,
333,
29897,
13,
462,
1678,
3495,
978,
29918,
1627,
786,
29918,
978,
29918,
842,
29889,
1202,
29898,
28988,
29918,
1627,
786,
29918,
978,
29897,
13,
9651,
1683,
29901,
13,
18884,
3495,
978,
29918,
1627,
786,
29918,
978,
353,
2897,
29889,
2084,
29889,
7122,
29898,
13,
462,
1678,
1583,
29889,
5527,
29889,
28988,
29918,
1627,
786,
29918,
978,
29892,
13,
462,
1678,
1583,
29889,
5527,
29889,
29876,
4273,
29918,
2611,
29918,
333,
29897,
13,
18884,
3495,
978,
29918,
1627,
786,
29918,
978,
29918,
842,
29889,
1202,
29898,
28988,
29918,
1627,
786,
29918,
978,
29897,
13,
4706,
1683,
29901,
13,
9651,
3495,
978,
29918,
1627,
786,
29918,
978,
29918,
842,
29889,
1202,
29898,
1311,
29889,
5527,
29889,
28988,
29918,
1627,
786,
29918,
978,
29897,
13,
13,
4706,
363,
16199,
29918,
978,
297,
3495,
978,
29918,
1627,
786,
29918,
978,
29918,
842,
29901,
13,
9651,
1583,
29889,
12925,
29889,
5992,
29918,
3194,
29918,
27603,
29898,
1311,
29889,
10599,
29892,
13,
462,
462,
965,
14334,
29892,
13,
462,
462,
965,
16199,
29918,
978,
29897,
13,
4706,
736,
6571,
13,
13,
1678,
822,
679,
29918,
29883,
4995,
29918,
1025,
29918,
1627,
14340,
29898,
1311,
29892,
14334,
29892,
274,
4995,
29918,
1555,
29918,
333,
1125,
13,
4706,
2224,
29918,
517,
29918,
1761,
353,
1583,
29889,
657,
29918,
2084,
29918,
13506,
29898,
29883,
4995,
29918,
1555,
29918,
333,
29897,
13,
13,
4706,
2030,
29918,
1627,
14340,
353,
5159,
13,
4706,
16199,
29918,
3972,
29879,
353,
1583,
29889,
12925,
29889,
1761,
3972,
29898,
2084,
29918,
517,
29918,
1761,
29897,
13,
4706,
363,
16199,
29918,
3972,
297,
16199,
29918,
3972,
29879,
29901,
13,
9651,
565,
938,
29898,
1627,
786,
29918,
3972,
29897,
5277,
938,
29898,
16394,
1125,
13,
18884,
2030,
29918,
1627,
14340,
29889,
4397,
29898,
1627,
786,
29918,
3972,
29897,
13,
13,
4706,
736,
2030,
29918,
1627,
14340,
13,
13,
1678,
822,
3349,
29918,
1627,
786,
29918,
3972,
29879,
29898,
1311,
29892,
1250,
14340,
29918,
517,
29918,
5992,
29892,
274,
4995,
29918,
1555,
29918,
333,
1125,
13,
4706,
2224,
29918,
13506,
353,
1583,
29889,
657,
29918,
2084,
29918,
13506,
29898,
29883,
4995,
29918,
1555,
29918,
333,
29897,
13,
4706,
363,
16199,
29918,
517,
29918,
5992,
297,
1250,
14340,
29918,
517,
29918,
5992,
29901,
13,
9651,
2224,
29918,
517,
29918,
5992,
353,
29850,
29900,
6822,
29912,
29896,
29913,
1642,
4830,
29898,
2084,
29918,
13506,
29892,
16199,
29918,
517,
29918,
5992,
29897,
13,
9651,
25401,
29889,
3888,
703,
15941,
16199,
29901,
426,
29900,
29913,
1642,
4830,
29898,
2084,
29918,
517,
29918,
5992,
876,
13,
9651,
1583,
29889,
12925,
29889,
1758,
8336,
29898,
2084,
29918,
517,
29918,
5992,
29897,
13,
13,
1678,
822,
679,
29918,
2084,
29918,
13506,
29898,
1311,
29892,
274,
4995,
29918,
1555,
29918,
333,
1125,
13,
4706,
565,
1583,
29889,
12925,
29889,
1853,
1275,
525,
26792,
2396,
13,
9651,
2224,
29918,
13506,
353,
29850,
29900,
6822,
29912,
29896,
6822,
29912,
29906,
29913,
1642,
4830,
29898,
13,
18884,
1583,
29889,
12925,
29889,
7611,
29892,
13,
18884,
1583,
29889,
12925,
29889,
10199,
1860,
29892,
13,
18884,
274,
4995,
29918,
1555,
29918,
333,
13,
9651,
1723,
13,
4706,
25342,
1583,
29889,
12925,
29889,
1853,
297,
6024,
2997,
742,
525,
15269,
742,
525,
29879,
29941,
2033,
29901,
13,
9651,
2224,
29918,
13506,
353,
29850,
29900,
6822,
29912,
29896,
29913,
1642,
4830,
29898,
13,
18884,
1583,
29889,
12925,
29889,
12925,
29918,
2084,
29892,
13,
18884,
274,
4995,
29918,
1555,
29918,
333,
13,
9651,
1723,
13,
4706,
1683,
29901,
13,
9651,
2224,
29918,
13506,
353,
6629,
13,
4706,
736,
2224,
29918,
13506,
13,
13,
13,
1990,
11080,
11947,
29898,
11947,
1125,
13,
13,
1678,
822,
903,
15480,
29898,
1311,
1125,
13,
4706,
565,
451,
1583,
29889,
5527,
29889,
6519,
29901,
13,
9651,
12020,
7865,
2392,
703,
489,
6519,
2984,
338,
3734,
1159,
13,
13,
1678,
822,
6222,
29898,
1311,
1125,
13,
4706,
565,
1583,
29889,
5527,
29889,
6519,
29901,
13,
9651,
25401,
29889,
3888,
877,
5379,
17068,
2279,
4982,
29889,
10516,
29901,
426,
29900,
10162,
13,
462,
268,
869,
4830,
29898,
1311,
29889,
5527,
29889,
6519,
876,
13,
9651,
2279,
29918,
9006,
29889,
7978,
29898,
1311,
29889,
5527,
29889,
6519,
29897,
13,
4706,
1683,
29901,
13,
9651,
25401,
29889,
27392,
29898,
13,
18884,
525,
3782,
1899,
5235,
3987,
892,
731,
29889,
1222,
11407,
29889,
1495,
13,
4706,
736,
6571,
13,
13,
13,
1990,
2138,
391,
3819,
5596,
2451,
29898,
2451,
1125,
13,
1678,
1209,
13,
2
] |
code/abc069_a_01.py | KoyanagiHitoshi/AtCoder | 3 | 98467 | n,m=map(int,input().split())
print((n-1)*(m-1)) | [
1,
302,
29892,
29885,
29922,
1958,
29898,
524,
29892,
2080,
2141,
5451,
3101,
13,
2158,
3552,
29876,
29899,
29896,
11877,
29898,
29885,
29899,
29896,
876,
2
] |
simple_downloader/drive_space.py | jsyrovy/simple-downloader | 0 | 182800 | <reponame>jsyrovy/simple-downloader
import dataclasses
import shutil
import hurry.filesize
@dataclasses.dataclass
class DriveSpace:
path: str
total: str
used: str
free: str
free_perc: str
def get_drive_space(path: str) -> DriveSpace:
total, used, free = shutil.disk_usage(path)
return DriveSpace(path,
hurry.filesize.size(total),
hurry.filesize.size(used),
hurry.filesize.size(free),
f"{(free / total) * 100:.0f}%")
| [
1,
529,
276,
1112,
420,
29958,
1315,
29891,
10139,
29891,
29914,
12857,
29899,
10382,
261,
13,
5215,
848,
13203,
13,
5215,
528,
4422,
13,
13,
5215,
12166,
719,
29889,
5325,
675,
13,
13,
13,
29992,
1272,
13203,
29889,
1272,
1990,
13,
1990,
22850,
14936,
29901,
13,
1678,
2224,
29901,
851,
13,
1678,
3001,
29901,
851,
13,
1678,
1304,
29901,
851,
13,
1678,
3889,
29901,
851,
13,
1678,
3889,
29918,
546,
29883,
29901,
851,
13,
13,
13,
1753,
679,
29918,
21594,
29918,
3493,
29898,
2084,
29901,
851,
29897,
1599,
22850,
14936,
29901,
13,
1678,
3001,
29892,
1304,
29892,
3889,
353,
528,
4422,
29889,
20960,
29918,
21125,
29898,
2084,
29897,
13,
13,
1678,
736,
22850,
14936,
29898,
2084,
29892,
13,
462,
418,
12166,
719,
29889,
5325,
675,
29889,
2311,
29898,
7827,
511,
13,
462,
418,
12166,
719,
29889,
5325,
675,
29889,
2311,
29898,
3880,
511,
13,
462,
418,
12166,
719,
29889,
5325,
675,
29889,
2311,
29898,
9021,
511,
13,
462,
418,
285,
29908,
8001,
9021,
847,
3001,
29897,
334,
29871,
29896,
29900,
29900,
29901,
29889,
29900,
29888,
10560,
1159,
13,
2
] |
cogs/dynamicslowmode.py | MM-coder/salbot-rewrite | 0 | 147202 | <reponame>MM-coder/salbot-rewrite
"""
Created by Epic at 8/1/20
"""
import logging
import asyncio
import discord
from discord.ext import commands
from aiohttp import client_exceptions
class DynamicSlowmode(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.logger = logging.getLogger("salbot.cogs.faq")
self.api = self.bot.get_cog("Api")
self.toxicity_threshold = .7
self.normal_cooldown_mapping = commands.CooldownMapping.from_cooldown(3, 5, commands.BucketType.channel)
self.toxicity_cooldown_mapping = commands.CooldownMapping.from_cooldown(2, 5, commands.BucketType.channel)
self.lockdown_cooldown_mapping = commands.CooldownMapping.from_cooldown(5, 2, commands.BucketType.channel)
self.normal_cooldown = 10
self.toxicity_cooldown = 20
self.default_cooldown = 0
self.cooldown_time = 60
@commands.Cog.listener()
async def on_message(self, message: discord.Message):
if message.author.bot:
return
try:
toxicity_result = await self.api.predict_toxicity(message.content)
is_toxic = False
for value in toxicity_result.values():
if value > self.toxicity_threshold:
is_toxic = True
break
except client_exceptions.ClientConnectionError:
self.logger.warning("Could not connect to MAX")
is_toxic = False
if is_toxic:
rate_limit = self.toxicity_cooldown_mapping.update_rate_limit(message)
if rate_limit and message.channel.slowmode_delay < self.toxicity_cooldown:
embed = discord.Embed(title="[Auto] Chat suspended",
description="The chat has been automatically suspended for toxicity.",
color=0xFF0000)
await message.channel.purge(limit=10)
await message.channel.send(embed=embed, delete_after=10)
await message.channel.edit(slowmode_delay=self.toxicity_cooldown)
await asyncio.sleep(self.cooldown_time)
await message.channel.edit(slowmode_delay=self.cooldown_time)
return
else:
rate_limit = self.normal_cooldown_mapping.update_rate_limit(message)
if rate_limit and message.channel.slowmode_delay < self.normal_cooldown:
embed = discord.Embed(title="[Auto] Chat suspended",
description="The chat has been automatically suspended.", color=0xFF0000)
await message.channel.purge(limit=10)
await message.channel.send(embed=embed, delete_after=10)
await message.channel.edit(slowmode_delay=self.normal_cooldown)
await asyncio.sleep(self.cooldown_time)
await message.channel.edit(slowmode_delay=self.cooldown_time)
return
rate_limit = self.lockdown_cooldown_mapping.update_rate_limit(message)
if rate_limit:
await message.channel.set_permissions(message.guild.default_role, send_messages=False)
embed = discord.Embed(title="[Auto] Chat suspended",
description="The chat has been automatically suspended.", color=0xFF0000)
await message.channel.send(embed=embed)
await asyncio.sleep(self.cooldown_time)
await message.channel.set_permissions(message.guild.default_role, send_messages=True)
def setup(bot):
bot.add_cog(DynamicSlowmode(bot))
| [
1,
529,
276,
1112,
420,
29958,
7428,
29899,
29883,
6119,
29914,
19585,
7451,
29899,
23174,
13,
15945,
29908,
13,
20399,
491,
14055,
293,
472,
29871,
29947,
29914,
29896,
29914,
29906,
29900,
13,
15945,
29908,
13,
5215,
12183,
13,
5215,
408,
948,
3934,
13,
5215,
2313,
536,
13,
3166,
2313,
536,
29889,
1062,
1053,
8260,
13,
3166,
263,
601,
1124,
1053,
3132,
29918,
11739,
29879,
13,
13,
13,
1990,
27747,
29903,
677,
8513,
29898,
26381,
29889,
29907,
468,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
9225,
1125,
13,
4706,
1583,
29889,
7451,
353,
9225,
13,
4706,
1583,
29889,
21707,
353,
12183,
29889,
657,
16363,
703,
19585,
7451,
29889,
29883,
12099,
29889,
5444,
29939,
1159,
13,
4706,
1583,
29889,
2754,
353,
1583,
29889,
7451,
29889,
657,
29918,
29883,
468,
703,
11713,
1159,
13,
4706,
1583,
29889,
517,
29916,
24798,
29918,
386,
12268,
353,
869,
29955,
13,
13,
4706,
1583,
29889,
8945,
29918,
1111,
1025,
776,
29918,
20698,
353,
8260,
29889,
7967,
1025,
776,
15845,
29889,
3166,
29918,
1111,
1025,
776,
29898,
29941,
29892,
29871,
29945,
29892,
8260,
29889,
29933,
2707,
300,
1542,
29889,
12719,
29897,
13,
4706,
1583,
29889,
517,
29916,
24798,
29918,
1111,
1025,
776,
29918,
20698,
353,
8260,
29889,
7967,
1025,
776,
15845,
29889,
3166,
29918,
1111,
1025,
776,
29898,
29906,
29892,
29871,
29945,
29892,
8260,
29889,
29933,
2707,
300,
1542,
29889,
12719,
29897,
13,
4706,
1583,
29889,
908,
3204,
29918,
1111,
1025,
776,
29918,
20698,
353,
8260,
29889,
7967,
1025,
776,
15845,
29889,
3166,
29918,
1111,
1025,
776,
29898,
29945,
29892,
29871,
29906,
29892,
8260,
29889,
29933,
2707,
300,
1542,
29889,
12719,
29897,
13,
4706,
1583,
29889,
8945,
29918,
1111,
1025,
776,
353,
29871,
29896,
29900,
13,
4706,
1583,
29889,
517,
29916,
24798,
29918,
1111,
1025,
776,
353,
29871,
29906,
29900,
13,
4706,
1583,
29889,
4381,
29918,
1111,
1025,
776,
353,
29871,
29900,
13,
13,
4706,
1583,
29889,
1111,
1025,
776,
29918,
2230,
353,
29871,
29953,
29900,
13,
13,
1678,
732,
26381,
29889,
29907,
468,
29889,
25894,
580,
13,
1678,
7465,
822,
373,
29918,
4906,
29898,
1311,
29892,
2643,
29901,
2313,
536,
29889,
3728,
1125,
13,
4706,
565,
2643,
29889,
8921,
29889,
7451,
29901,
13,
9651,
736,
13,
4706,
1018,
29901,
13,
9651,
304,
29916,
24798,
29918,
2914,
353,
7272,
1583,
29889,
2754,
29889,
27711,
29918,
517,
29916,
24798,
29898,
4906,
29889,
3051,
29897,
13,
9651,
338,
29918,
517,
27375,
353,
7700,
13,
9651,
363,
995,
297,
304,
29916,
24798,
29918,
2914,
29889,
5975,
7295,
13,
18884,
565,
995,
1405,
1583,
29889,
517,
29916,
24798,
29918,
386,
12268,
29901,
13,
462,
1678,
338,
29918,
517,
27375,
353,
5852,
13,
462,
1678,
2867,
13,
4706,
5174,
3132,
29918,
11739,
29879,
29889,
4032,
5350,
2392,
29901,
13,
9651,
1583,
29889,
21707,
29889,
27392,
703,
23323,
451,
4511,
304,
18134,
1159,
13,
9651,
338,
29918,
517,
27375,
353,
7700,
13,
4706,
565,
338,
29918,
517,
27375,
29901,
13,
9651,
6554,
29918,
13400,
353,
1583,
29889,
517,
29916,
24798,
29918,
1111,
1025,
776,
29918,
20698,
29889,
5504,
29918,
10492,
29918,
13400,
29898,
4906,
29897,
13,
13,
9651,
565,
6554,
29918,
13400,
322,
2643,
29889,
12719,
29889,
28544,
8513,
29918,
18829,
529,
1583,
29889,
517,
29916,
24798,
29918,
1111,
1025,
776,
29901,
13,
18884,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
3257,
543,
29961,
12300,
29962,
678,
271,
8872,
2760,
613,
13,
462,
462,
418,
6139,
543,
1576,
13563,
756,
1063,
6336,
8872,
2760,
363,
304,
29916,
24798,
19602,
13,
462,
462,
418,
2927,
29922,
29900,
29916,
4198,
29900,
29900,
29900,
29900,
29897,
13,
18884,
7272,
2643,
29889,
12719,
29889,
15503,
479,
29898,
13400,
29922,
29896,
29900,
29897,
13,
18884,
7272,
2643,
29889,
12719,
29889,
6717,
29898,
17987,
29922,
17987,
29892,
5217,
29918,
7045,
29922,
29896,
29900,
29897,
13,
18884,
7272,
2643,
29889,
12719,
29889,
5628,
29898,
28544,
8513,
29918,
18829,
29922,
1311,
29889,
517,
29916,
24798,
29918,
1111,
1025,
776,
29897,
13,
18884,
7272,
408,
948,
3934,
29889,
17059,
29898,
1311,
29889,
1111,
1025,
776,
29918,
2230,
29897,
13,
18884,
7272,
2643,
29889,
12719,
29889,
5628,
29898,
28544,
8513,
29918,
18829,
29922,
1311,
29889,
1111,
1025,
776,
29918,
2230,
29897,
13,
18884,
736,
13,
4706,
1683,
29901,
13,
9651,
6554,
29918,
13400,
353,
1583,
29889,
8945,
29918,
1111,
1025,
776,
29918,
20698,
29889,
5504,
29918,
10492,
29918,
13400,
29898,
4906,
29897,
13,
13,
9651,
565,
6554,
29918,
13400,
322,
2643,
29889,
12719,
29889,
28544,
8513,
29918,
18829,
529,
1583,
29889,
8945,
29918,
1111,
1025,
776,
29901,
13,
18884,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
3257,
543,
29961,
12300,
29962,
678,
271,
8872,
2760,
613,
13,
462,
462,
418,
6139,
543,
1576,
13563,
756,
1063,
6336,
8872,
2760,
19602,
2927,
29922,
29900,
29916,
4198,
29900,
29900,
29900,
29900,
29897,
13,
18884,
7272,
2643,
29889,
12719,
29889,
15503,
479,
29898,
13400,
29922,
29896,
29900,
29897,
13,
18884,
7272,
2643,
29889,
12719,
29889,
6717,
29898,
17987,
29922,
17987,
29892,
5217,
29918,
7045,
29922,
29896,
29900,
29897,
13,
18884,
7272,
2643,
29889,
12719,
29889,
5628,
29898,
28544,
8513,
29918,
18829,
29922,
1311,
29889,
8945,
29918,
1111,
1025,
776,
29897,
13,
18884,
7272,
408,
948,
3934,
29889,
17059,
29898,
1311,
29889,
1111,
1025,
776,
29918,
2230,
29897,
13,
18884,
7272,
2643,
29889,
12719,
29889,
5628,
29898,
28544,
8513,
29918,
18829,
29922,
1311,
29889,
1111,
1025,
776,
29918,
2230,
29897,
13,
18884,
736,
13,
13,
4706,
6554,
29918,
13400,
353,
1583,
29889,
908,
3204,
29918,
1111,
1025,
776,
29918,
20698,
29889,
5504,
29918,
10492,
29918,
13400,
29898,
4906,
29897,
13,
4706,
565,
6554,
29918,
13400,
29901,
13,
9651,
7272,
2643,
29889,
12719,
29889,
842,
29918,
17858,
6847,
29898,
4906,
29889,
2543,
789,
29889,
4381,
29918,
12154,
29892,
3638,
29918,
19158,
29922,
8824,
29897,
13,
9651,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
3257,
543,
29961,
12300,
29962,
678,
271,
8872,
2760,
613,
13,
462,
462,
29871,
6139,
543,
1576,
13563,
756,
1063,
6336,
8872,
2760,
19602,
2927,
29922,
29900,
29916,
4198,
29900,
29900,
29900,
29900,
29897,
13,
9651,
7272,
2643,
29889,
12719,
29889,
6717,
29898,
17987,
29922,
17987,
29897,
13,
9651,
7272,
408,
948,
3934,
29889,
17059,
29898,
1311,
29889,
1111,
1025,
776,
29918,
2230,
29897,
13,
9651,
7272,
2643,
29889,
12719,
29889,
842,
29918,
17858,
6847,
29898,
4906,
29889,
2543,
789,
29889,
4381,
29918,
12154,
29892,
3638,
29918,
19158,
29922,
5574,
29897,
13,
13,
13,
1753,
6230,
29898,
7451,
1125,
13,
1678,
9225,
29889,
1202,
29918,
29883,
468,
29898,
24001,
29903,
677,
8513,
29898,
7451,
876,
13,
2
] |
aiidalab_sssp/inspect/plot_utils.py | aiidalab/aiidalab-sssp | 0 | 83163 | import random
import matplotlib.pyplot as plt
import numpy as np
def cmap(label: str) -> str:
"""Return RGB string of color for given standard psp label"""
_, pp_family, pp_z, pp_type, pp_version = label.split("/")
if pp_family == "sg15" and pp_version == "v1.0":
return "#000000"
if pp_family == "sg15" and pp_version == "v1.2":
return "#708090"
if pp_family == "gbrv" and pp_version == "v1":
return "#4682B4"
if pp_family == "psl" and pp_version == "v1.0.0" and pp_type == "us":
return "#F50E02"
if pp_family == "psl" and pp_version == "v1.0.0" and pp_type == "paw":
return "#2D8B00F"
if pp_family == "dojo" and pp_version == "v04":
return "#F9A501"
# TODO: more mapping
# if a unknow type generate random color based on ascii sum
ascn = sum([ord(c) for c in label])
random.seed(ascn)
return "#%06x" % random.randint(0, 0xFFFFFF)
def delta_measure_hist(pseudos: dict, measure_type):
px = 1 / plt.rcParams["figure.dpi"] # pixel in inches
fig, ax = plt.subplots(1, 1, figsize=(1024 * px, 360 * px))
structures = ["X", "XO", "X2O", "XO3", "X2O", "X2O3", "X2O5"]
num_structures = len(structures)
# element
try:
v0 = list(pseudos.values())[0]
element = v0["pseudo_info"]["element"]
except Exception:
element = None
if measure_type == "delta":
keyname = "delta"
ylabel = "Δ -factor"
elif measure_type == "nv_delta":
keyname = "rel_errors_vec_length"
ylabel = "ν -factor"
for i, (label, output) in enumerate(pseudos.items()):
N = len(structures)
idx = np.arange(N) # the x locations for the groups
width = 0.1 # the width of the bars
y_delta = []
for structure in structures:
try:
res = output["delta_measure"]["output_delta_analyze"][
f"output_{structure}"
]
y_delta.append(res[keyname])
except Exception:
y_delta.append(-1)
_, pp_family, pp_z, pp_type, pp_version = label.split("/")
out_label = f"{pp_z}/{pp_type}({pp_family}-{pp_version})"
ax.bar(
idx + width * i,
y_delta,
width,
color=cmap(label),
edgecolor="black",
linewidth=1,
label=out_label,
)
ax.legend()
ax.set_title(f"X={element}")
ax.axhline(y=1.0, linestyle="--", color="gray")
ax.set_ylabel(ylabel)
ax.set_ylim([0, 10])
ax.set_yticks(np.arange(10))
ax.set_xticks(list(range(num_structures)))
ax.set_xticklabels(structures)
return fig
def convergence(pseudos: dict, wf_name, measure_name, ylabel, threshold=None):
px = 1 / plt.rcParams["figure.dpi"]
fig, (ax1, ax2) = plt.subplots(
1, 2, gridspec_kw={"width_ratios": [2, 1]}, figsize=(1024 * px, 360 * px)
)
for label, output in pseudos.items():
# Calculate the avg delta measure value
structures = ["X", "XO", "X2O", "XO3", "X2O", "X2O3", "X2O5"]
lst = []
for structure in structures:
try:
res = output["delta_measure"]["output_delta_analyze"][
f"output_{structure}"
]
lst.append(res["rel_errors_vec_length"])
except Exception:
pass
avg_delta = sum(lst) / len(lst)
try:
res = output[wf_name]
x_wfc = res["output_parameters_wfc_test"]["ecutwfc"]
y_wfc = res["output_parameters_wfc_test"][measure_name]
x_rho = res["output_parameters_rho_test"]["ecutrho"]
y_rho = res["output_parameters_rho_test"][measure_name]
wfc_cutoff = res["final_output_parameters"]["wfc_cutoff"]
_, pp_family, pp_z, pp_type, pp_version = label.split("/")
out_label = f"{pp_z}/{pp_type}(ν={avg_delta:.2f})({pp_family}-{pp_version})"
ax1.plot(x_wfc, y_wfc, marker="o", color=cmap(label), label=out_label)
ax2.plot(
x_rho,
y_rho,
marker="o",
color=cmap(label),
label=f"cutoff wfc = {wfc_cutoff} Ry",
)
except Exception:
pass
ax1.set_ylabel(ylabel)
ax1.set_xlabel("Wavefuntion cutoff (Ry)")
ax1.set_title(
"Fixed rho cutoff at 200 * dual (dual=4 for NC and dual=8 for non-NC)"
)
# ax2.legend(loc='upper left', bbox_to_anchor=(1, 1.0))
ax1.legend()
ax2.set_xlabel("Charge density cudoff (Ry)")
ax2.set_title("Convergence test at fixed wavefunction cutoff")
ax2.legend()
if threshold:
ax1.axhline(y=threshold, color="r", linestyle="--")
ax2.axhline(y=threshold, color="r", linestyle="--")
ax1.set_ylim(-0.5 * threshold, 10 * threshold)
ax2.set_ylim(-0.5 * threshold, 10 * threshold)
plt.tight_layout()
return fig
| [
1,
1053,
4036,
13,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
13,
13,
1753,
274,
1958,
29898,
1643,
29901,
851,
29897,
1599,
851,
29901,
13,
1678,
9995,
11609,
390,
7210,
1347,
310,
2927,
363,
2183,
3918,
282,
1028,
3858,
15945,
29908,
13,
1678,
17117,
6499,
29918,
11922,
29892,
6499,
29918,
29920,
29892,
6499,
29918,
1853,
29892,
6499,
29918,
3259,
353,
3858,
29889,
5451,
11974,
1159,
13,
13,
1678,
565,
6499,
29918,
11922,
1275,
376,
5311,
29896,
29945,
29908,
322,
6499,
29918,
3259,
1275,
376,
29894,
29896,
29889,
29900,
1115,
13,
4706,
736,
12305,
29900,
29900,
29900,
29900,
29900,
29900,
29908,
13,
13,
1678,
565,
6499,
29918,
11922,
1275,
376,
5311,
29896,
29945,
29908,
322,
6499,
29918,
3259,
1275,
376,
29894,
29896,
29889,
29906,
1115,
13,
4706,
736,
12305,
29955,
29900,
29947,
29900,
29929,
29900,
29908,
13,
13,
1678,
565,
6499,
29918,
11922,
1275,
376,
29887,
1182,
29894,
29908,
322,
6499,
29918,
3259,
1275,
376,
29894,
29896,
1115,
13,
4706,
736,
12305,
29946,
29953,
29947,
29906,
29933,
29946,
29908,
13,
13,
1678,
565,
6499,
29918,
11922,
1275,
376,
567,
29880,
29908,
322,
6499,
29918,
3259,
1275,
376,
29894,
29896,
29889,
29900,
29889,
29900,
29908,
322,
6499,
29918,
1853,
1275,
376,
375,
1115,
13,
4706,
736,
12305,
29943,
29945,
29900,
29923,
29900,
29906,
29908,
13,
13,
1678,
565,
6499,
29918,
11922,
1275,
376,
567,
29880,
29908,
322,
6499,
29918,
3259,
1275,
376,
29894,
29896,
29889,
29900,
29889,
29900,
29908,
322,
6499,
29918,
1853,
1275,
376,
29886,
1450,
1115,
13,
4706,
736,
12305,
29906,
29928,
29947,
29933,
29900,
29900,
29943,
29908,
13,
13,
1678,
565,
6499,
29918,
11922,
1275,
376,
1867,
2212,
29908,
322,
6499,
29918,
3259,
1275,
376,
29894,
29900,
29946,
1115,
13,
4706,
736,
12305,
29943,
29929,
29909,
29945,
29900,
29896,
29908,
13,
13,
1678,
396,
14402,
29901,
901,
10417,
13,
1678,
396,
565,
263,
443,
28385,
1134,
5706,
4036,
2927,
2729,
373,
408,
18869,
2533,
13,
1678,
12066,
29876,
353,
2533,
4197,
536,
29898,
29883,
29897,
363,
274,
297,
3858,
2314,
13,
1678,
4036,
29889,
26776,
29898,
6151,
29876,
29897,
13,
1678,
736,
12305,
29995,
29900,
29953,
29916,
29908,
1273,
4036,
29889,
9502,
524,
29898,
29900,
29892,
29871,
29900,
29916,
22098,
4198,
29897,
13,
13,
13,
1753,
19471,
29918,
26658,
29918,
29882,
391,
29898,
27358,
566,
359,
29901,
9657,
29892,
5645,
29918,
1853,
1125,
13,
13,
1678,
282,
29916,
353,
29871,
29896,
847,
14770,
29889,
2214,
9629,
3366,
4532,
29889,
29881,
1631,
3108,
29871,
396,
15526,
297,
22831,
13,
1678,
2537,
29892,
4853,
353,
14770,
29889,
1491,
26762,
29898,
29896,
29892,
29871,
29896,
29892,
2537,
2311,
7607,
29896,
29900,
29906,
29946,
334,
282,
29916,
29892,
29871,
29941,
29953,
29900,
334,
282,
29916,
876,
13,
1678,
12286,
353,
6796,
29990,
613,
376,
29990,
29949,
613,
376,
29990,
29906,
29949,
613,
376,
29990,
29949,
29941,
613,
376,
29990,
29906,
29949,
613,
376,
29990,
29906,
29949,
29941,
613,
376,
29990,
29906,
29949,
29945,
3108,
13,
1678,
954,
29918,
4984,
1973,
353,
7431,
29898,
4984,
1973,
29897,
13,
13,
1678,
396,
1543,
13,
1678,
1018,
29901,
13,
4706,
325,
29900,
353,
1051,
29898,
27358,
566,
359,
29889,
5975,
3101,
29961,
29900,
29962,
13,
4706,
1543,
353,
325,
29900,
3366,
27358,
5333,
29918,
3888,
3108,
3366,
5029,
3108,
13,
1678,
5174,
8960,
29901,
13,
4706,
1543,
353,
6213,
13,
13,
1678,
565,
5645,
29918,
1853,
1275,
376,
4181,
1115,
13,
4706,
1589,
948,
420,
353,
376,
4181,
29908,
13,
4706,
343,
1643,
353,
376,
30293,
448,
19790,
29908,
13,
1678,
25342,
5645,
29918,
1853,
1275,
376,
29876,
29894,
29918,
4181,
1115,
13,
4706,
1589,
948,
420,
353,
376,
2674,
29918,
12523,
29918,
2003,
29918,
2848,
29908,
13,
4706,
343,
1643,
353,
376,
30133,
448,
19790,
29908,
13,
13,
1678,
363,
474,
29892,
313,
1643,
29892,
1962,
29897,
297,
26985,
29898,
27358,
566,
359,
29889,
7076,
580,
1125,
13,
4706,
405,
353,
7431,
29898,
4984,
1973,
29897,
13,
4706,
22645,
353,
7442,
29889,
279,
927,
29898,
29940,
29897,
29871,
396,
278,
921,
14354,
363,
278,
6471,
13,
4706,
2920,
353,
29871,
29900,
29889,
29896,
29871,
396,
278,
2920,
310,
278,
22306,
13,
13,
4706,
343,
29918,
4181,
353,
5159,
13,
4706,
363,
3829,
297,
12286,
29901,
13,
9651,
1018,
29901,
13,
18884,
620,
353,
1962,
3366,
4181,
29918,
26658,
3108,
3366,
4905,
29918,
4181,
29918,
24209,
911,
3108,
29961,
13,
462,
1678,
285,
29908,
4905,
648,
23905,
5038,
13,
18884,
4514,
13,
18884,
343,
29918,
4181,
29889,
4397,
29898,
690,
29961,
446,
948,
420,
2314,
13,
9651,
5174,
8960,
29901,
13,
18884,
343,
29918,
4181,
29889,
4397,
6278,
29896,
29897,
13,
13,
4706,
17117,
6499,
29918,
11922,
29892,
6499,
29918,
29920,
29892,
6499,
29918,
1853,
29892,
6499,
29918,
3259,
353,
3858,
29889,
5451,
11974,
1159,
13,
4706,
714,
29918,
1643,
353,
285,
29908,
29912,
407,
29918,
29920,
6822,
29912,
407,
29918,
1853,
2119,
29912,
407,
29918,
11922,
7402,
29912,
407,
29918,
3259,
1800,
29908,
13,
13,
4706,
4853,
29889,
1646,
29898,
13,
9651,
22645,
718,
2920,
334,
474,
29892,
13,
9651,
343,
29918,
4181,
29892,
13,
9651,
2920,
29892,
13,
9651,
2927,
29922,
29883,
1958,
29898,
1643,
511,
13,
9651,
7636,
2780,
543,
8517,
613,
13,
9651,
1196,
2103,
29922,
29896,
29892,
13,
9651,
3858,
29922,
449,
29918,
1643,
29892,
13,
4706,
1723,
13,
4706,
4853,
29889,
26172,
580,
13,
4706,
4853,
29889,
842,
29918,
3257,
29898,
29888,
29908,
29990,
3790,
5029,
27195,
13,
13,
1678,
4853,
29889,
1165,
7760,
29898,
29891,
29922,
29896,
29889,
29900,
29892,
6276,
342,
1508,
543,
489,
613,
2927,
543,
21012,
1159,
13,
1678,
4853,
29889,
842,
29918,
29891,
1643,
29898,
29891,
1643,
29897,
13,
1678,
4853,
29889,
842,
29918,
29891,
2576,
4197,
29900,
29892,
29871,
29896,
29900,
2314,
13,
1678,
4853,
29889,
842,
29918,
3637,
7358,
29898,
9302,
29889,
279,
927,
29898,
29896,
29900,
876,
13,
1678,
4853,
29889,
842,
29918,
486,
7358,
29898,
1761,
29898,
3881,
29898,
1949,
29918,
4984,
1973,
4961,
13,
1678,
4853,
29889,
842,
29918,
486,
860,
21134,
29898,
4984,
1973,
29897,
13,
13,
1678,
736,
2537,
13,
13,
13,
1753,
17221,
29898,
27358,
566,
359,
29901,
9657,
29892,
281,
29888,
29918,
978,
29892,
5645,
29918,
978,
29892,
343,
1643,
29892,
16897,
29922,
8516,
1125,
13,
13,
1678,
282,
29916,
353,
29871,
29896,
847,
14770,
29889,
2214,
9629,
3366,
4532,
29889,
29881,
1631,
3108,
13,
1678,
2537,
29892,
313,
1165,
29896,
29892,
4853,
29906,
29897,
353,
14770,
29889,
1491,
26762,
29898,
13,
308,
29896,
29892,
29871,
29906,
29892,
867,
4841,
3135,
29918,
11022,
3790,
29908,
2103,
29918,
29878,
2219,
359,
1115,
518,
29906,
29892,
29871,
29896,
29962,
1118,
2537,
2311,
7607,
29896,
29900,
29906,
29946,
334,
282,
29916,
29892,
29871,
29941,
29953,
29900,
334,
282,
29916,
29897,
13,
1678,
1723,
13,
13,
1678,
363,
3858,
29892,
1962,
297,
19923,
359,
29889,
7076,
7295,
13,
4706,
396,
20535,
403,
278,
1029,
29887,
19471,
5645,
995,
13,
4706,
12286,
353,
6796,
29990,
613,
376,
29990,
29949,
613,
376,
29990,
29906,
29949,
613,
376,
29990,
29949,
29941,
613,
376,
29990,
29906,
29949,
613,
376,
29990,
29906,
29949,
29941,
613,
376,
29990,
29906,
29949,
29945,
3108,
13,
4706,
24471,
353,
5159,
13,
4706,
363,
3829,
297,
12286,
29901,
13,
9651,
1018,
29901,
13,
18884,
620,
353,
1962,
3366,
4181,
29918,
26658,
3108,
3366,
4905,
29918,
4181,
29918,
24209,
911,
3108,
29961,
13,
462,
1678,
285,
29908,
4905,
648,
23905,
5038,
13,
18884,
4514,
13,
18884,
24471,
29889,
4397,
29898,
690,
3366,
2674,
29918,
12523,
29918,
2003,
29918,
2848,
20068,
13,
9651,
5174,
8960,
29901,
13,
18884,
1209,
13,
13,
4706,
1029,
29887,
29918,
4181,
353,
2533,
29898,
20155,
29897,
847,
7431,
29898,
20155,
29897,
13,
13,
4706,
1018,
29901,
13,
9651,
620,
353,
1962,
29961,
29893,
29888,
29918,
978,
29962,
13,
9651,
921,
29918,
29893,
13801,
353,
620,
3366,
4905,
29918,
16744,
29918,
29893,
13801,
29918,
1688,
3108,
3366,
687,
329,
29893,
13801,
3108,
13,
9651,
343,
29918,
29893,
13801,
353,
620,
3366,
4905,
29918,
16744,
29918,
29893,
13801,
29918,
1688,
3108,
29961,
26658,
29918,
978,
29962,
13,
13,
9651,
921,
29918,
4650,
353,
620,
3366,
4905,
29918,
16744,
29918,
4650,
29918,
1688,
3108,
3366,
687,
329,
4650,
3108,
13,
9651,
343,
29918,
4650,
353,
620,
3366,
4905,
29918,
16744,
29918,
4650,
29918,
1688,
3108,
29961,
26658,
29918,
978,
29962,
13,
13,
9651,
281,
13801,
29918,
7582,
2696,
353,
620,
3366,
8394,
29918,
4905,
29918,
16744,
3108,
3366,
29893,
13801,
29918,
7582,
2696,
3108,
13,
13,
9651,
17117,
6499,
29918,
11922,
29892,
6499,
29918,
29920,
29892,
6499,
29918,
1853,
29892,
6499,
29918,
3259,
353,
3858,
29889,
5451,
11974,
1159,
13,
9651,
714,
29918,
1643,
353,
285,
29908,
29912,
407,
29918,
29920,
6822,
29912,
407,
29918,
1853,
2119,
30133,
3790,
485,
29887,
29918,
4181,
29901,
29889,
29906,
29888,
1800,
3319,
407,
29918,
11922,
7402,
29912,
407,
29918,
3259,
1800,
29908,
13,
13,
9651,
4853,
29896,
29889,
5317,
29898,
29916,
29918,
29893,
13801,
29892,
343,
29918,
29893,
13801,
29892,
17456,
543,
29877,
613,
2927,
29922,
29883,
1958,
29898,
1643,
511,
3858,
29922,
449,
29918,
1643,
29897,
13,
9651,
4853,
29906,
29889,
5317,
29898,
13,
18884,
921,
29918,
4650,
29892,
13,
18884,
343,
29918,
4650,
29892,
13,
18884,
17456,
543,
29877,
613,
13,
18884,
2927,
29922,
29883,
1958,
29898,
1643,
511,
13,
18884,
3858,
29922,
29888,
29908,
7582,
2696,
281,
13801,
353,
426,
29893,
13801,
29918,
7582,
2696,
29913,
15586,
613,
13,
9651,
1723,
13,
4706,
5174,
8960,
29901,
13,
9651,
1209,
13,
13,
1678,
4853,
29896,
29889,
842,
29918,
29891,
1643,
29898,
29891,
1643,
29897,
13,
1678,
4853,
29896,
29889,
842,
29918,
29916,
1643,
703,
29956,
1351,
29888,
1657,
291,
5700,
2696,
313,
29934,
29891,
25760,
13,
1678,
4853,
29896,
29889,
842,
29918,
3257,
29898,
13,
4706,
376,
26262,
364,
1251,
5700,
2696,
472,
29871,
29906,
29900,
29900,
334,
14581,
313,
700,
284,
29922,
29946,
363,
25166,
322,
14581,
29922,
29947,
363,
1661,
29899,
15868,
5513,
13,
1678,
1723,
13,
13,
1678,
396,
4853,
29906,
29889,
26172,
29898,
2029,
2433,
21064,
2175,
742,
289,
1884,
29918,
517,
29918,
25367,
7607,
29896,
29892,
29871,
29896,
29889,
29900,
876,
13,
1678,
4853,
29896,
29889,
26172,
580,
13,
13,
1678,
4853,
29906,
29889,
842,
29918,
29916,
1643,
703,
5914,
479,
9027,
274,
566,
2696,
313,
29934,
29891,
25760,
13,
1678,
4853,
29906,
29889,
842,
29918,
3257,
703,
1168,
369,
10238,
1243,
472,
4343,
10742,
2220,
5700,
2696,
1159,
13,
1678,
4853,
29906,
29889,
26172,
580,
13,
13,
1678,
565,
16897,
29901,
13,
4706,
4853,
29896,
29889,
1165,
7760,
29898,
29891,
29922,
386,
12268,
29892,
2927,
543,
29878,
613,
6276,
342,
1508,
543,
489,
1159,
13,
4706,
4853,
29906,
29889,
1165,
7760,
29898,
29891,
29922,
386,
12268,
29892,
2927,
543,
29878,
613,
6276,
342,
1508,
543,
489,
1159,
13,
13,
4706,
4853,
29896,
29889,
842,
29918,
29891,
2576,
6278,
29900,
29889,
29945,
334,
16897,
29892,
29871,
29896,
29900,
334,
16897,
29897,
13,
4706,
4853,
29906,
29889,
842,
29918,
29891,
2576,
6278,
29900,
29889,
29945,
334,
16897,
29892,
29871,
29896,
29900,
334,
16897,
29897,
13,
13,
1678,
14770,
29889,
29873,
523,
29918,
2680,
580,
13,
13,
1678,
736,
2537,
13,
2
] |
oops_fhir/r4/code_system/flag_priority_codes.py | Mikuana/oops_fhir | 0 | 32958 | <filename>oops_fhir/r4/code_system/flag_priority_codes.py
from pathlib import Path
from fhir.resources.codesystem import CodeSystem
from oops_fhir.utils import CodeSystemConcept
__all__ = ["FlagPriorityCodes"]
_resource = CodeSystem.parse_file(Path(__file__).with_suffix(".json"))
class FlagPriorityCodes:
"""
Flag Priority Codes
This value set is provided as an exemplar. The value set is driven by
IHE Table B.8-4: Abnormal Flags, Alert Priority.
Status: draft - Version: 4.0.1
Copyright None
http://hl7.org/fhir/flag-priority-code
"""
pn = CodeSystemConcept(
{"code": "PN", "definition": "No alarm.", "display": "No alarm"}
)
"""
No alarm
No alarm.
"""
pl = CodeSystemConcept(
{"code": "PL", "definition": "Low priority.", "display": "Low priority"}
)
"""
Low priority
Low priority.
"""
pm = CodeSystemConcept(
{"code": "PM", "definition": "Medium priority.", "display": "Medium priority"}
)
"""
Medium priority
Medium priority.
"""
ph = CodeSystemConcept(
{"code": "PH", "definition": "High priority.", "display": "High priority"}
)
"""
High priority
High priority.
"""
class Meta:
resource = _resource
| [
1,
529,
9507,
29958,
29877,
3554,
29918,
29888,
29882,
381,
29914,
29878,
29946,
29914,
401,
29918,
5205,
29914,
15581,
29918,
29886,
21766,
29918,
18137,
29889,
2272,
13,
3166,
2224,
1982,
1053,
10802,
13,
13,
3166,
285,
29882,
381,
29889,
13237,
29889,
18137,
973,
1053,
5920,
3924,
13,
13,
3166,
288,
3554,
29918,
29888,
29882,
381,
29889,
13239,
1053,
5920,
3924,
1168,
1547,
13,
13,
13,
1649,
497,
1649,
353,
6796,
21979,
29925,
21766,
29907,
2631,
3108,
13,
13,
29918,
10314,
353,
5920,
3924,
29889,
5510,
29918,
1445,
29898,
2605,
22168,
1445,
1649,
467,
2541,
29918,
2146,
600,
861,
17350,
3126,
5783,
13,
13,
13,
1990,
28697,
29925,
21766,
29907,
2631,
29901,
13,
1678,
9995,
13,
1678,
28697,
22096,
537,
315,
2631,
13,
13,
1678,
910,
995,
731,
338,
4944,
408,
385,
29455,
279,
29889,
450,
995,
731,
338,
18225,
491,
13,
29902,
9606,
6137,
350,
29889,
29947,
29899,
29946,
29901,
1976,
8945,
2379,
810,
29892,
28861,
22096,
537,
29889,
13,
13,
1678,
16034,
29901,
18195,
448,
10079,
29901,
29871,
29946,
29889,
29900,
29889,
29896,
13,
13,
1678,
14187,
1266,
6213,
13,
13,
1678,
1732,
597,
4415,
29955,
29889,
990,
29914,
29888,
29882,
381,
29914,
15581,
29899,
29886,
21766,
29899,
401,
13,
1678,
9995,
13,
13,
1678,
282,
29876,
353,
5920,
3924,
1168,
1547,
29898,
13,
4706,
8853,
401,
1115,
376,
15695,
613,
376,
16553,
1115,
376,
3782,
21200,
19602,
376,
4990,
1115,
376,
3782,
21200,
9092,
13,
1678,
1723,
13,
1678,
9995,
13,
1678,
1939,
21200,
13,
13,
1678,
1939,
21200,
29889,
13,
1678,
9995,
13,
13,
1678,
715,
353,
5920,
3924,
1168,
1547,
29898,
13,
4706,
8853,
401,
1115,
376,
7390,
613,
376,
16553,
1115,
376,
29931,
340,
20136,
19602,
376,
4990,
1115,
376,
29931,
340,
20136,
9092,
13,
1678,
1723,
13,
1678,
9995,
13,
1678,
17511,
20136,
13,
13,
1678,
17511,
20136,
29889,
13,
1678,
9995,
13,
13,
1678,
26354,
353,
5920,
3924,
1168,
1547,
29898,
13,
4706,
8853,
401,
1115,
376,
13427,
613,
376,
16553,
1115,
376,
19302,
1974,
20136,
19602,
376,
4990,
1115,
376,
19302,
1974,
20136,
9092,
13,
1678,
1723,
13,
1678,
9995,
13,
1678,
3436,
1974,
20136,
13,
13,
1678,
3436,
1974,
20136,
29889,
13,
1678,
9995,
13,
13,
1678,
1374,
353,
5920,
3924,
1168,
1547,
29898,
13,
4706,
8853,
401,
1115,
376,
19689,
613,
376,
16553,
1115,
376,
16382,
20136,
19602,
376,
4990,
1115,
376,
16382,
20136,
9092,
13,
1678,
1723,
13,
1678,
9995,
13,
1678,
5057,
20136,
13,
13,
1678,
5057,
20136,
29889,
13,
1678,
9995,
13,
13,
1678,
770,
20553,
29901,
13,
4706,
6503,
353,
903,
10314,
13,
2
] |
logux/apps.py | sobolevn/django-1 | 17 | 147770 | from django.apps import AppConfig
from logux import settings
from logux.utils import autodiscover
class LoguxConfig(AppConfig):
""" Logux app conf """
name = 'logux'
verbose_name = 'Logux'
def ready(self):
# check if all required settings is defined
settings.get_config()
# import all logux_actions.py and logux_subscriptions.py from consumer modules
autodiscover()
| [
1,
515,
9557,
29889,
13371,
1053,
2401,
3991,
13,
13,
3166,
1480,
1314,
1053,
6055,
13,
3166,
1480,
1314,
29889,
13239,
1053,
1120,
397,
10669,
957,
13,
13,
13,
1990,
4522,
1314,
3991,
29898,
2052,
3991,
1125,
13,
1678,
9995,
4522,
1314,
623,
1970,
9995,
13,
1678,
1024,
353,
525,
1188,
1314,
29915,
13,
1678,
26952,
29918,
978,
353,
525,
3403,
1314,
29915,
13,
13,
1678,
822,
7960,
29898,
1311,
1125,
13,
4706,
396,
1423,
565,
599,
3734,
6055,
338,
3342,
13,
4706,
6055,
29889,
657,
29918,
2917,
580,
13,
4706,
396,
1053,
599,
1480,
1314,
29918,
7387,
29889,
2272,
322,
1480,
1314,
29918,
1491,
7588,
1980,
29889,
2272,
515,
21691,
10585,
13,
4706,
1120,
397,
10669,
957,
580,
13,
2
] |
premailer/__init__.py | locationlabs/premailer | 0 | 31698 | <reponame>locationlabs/premailer
__version__ = '1.12.1-LL'
__build__ = '' # set by the build server
| [
1,
529,
276,
1112,
420,
29958,
5479,
29880,
6897,
29914,
1457,
2549,
261,
13,
1649,
3259,
1649,
353,
525,
29896,
29889,
29896,
29906,
29889,
29896,
29899,
2208,
29915,
13,
1649,
4282,
1649,
353,
6629,
29871,
396,
731,
491,
278,
2048,
1923,
13,
2
] |
tests/test_rotations.py | MarceloJacinto/dsorlib | 0 | 187477 | <filename>tests/test_rotations.py<gh_stars>0
from numpy import array
from numpy.testing import assert_allclose
from dsorlib.rotations import Rot_to_quaternion, RPY_to_quaternion, quaternion_to_Rot, quaternion_to_RPY, RPY_to_RotZYX, \
RotZYX_to_RPY
"""
The following tests are conducted for the rotations module
The following URL was used to obtained the standard values to compare against
https://www.andre-gaschler.com/rotationconverter/
"""
def test1_Rot_to_quaternion():
"""
Test1 the method Rot_to_quaternion
"""
r = array([[-0.0690026, -0.9716355, 0.2261928],
[0.6932812, 0.1163334, 0.7112156],
[-0.7173561, 0.2058909, 0.6655893]])
q_obtained = Rot_to_quaternion(r)
q_expected = array([0.65439287, -0.19305097, 0.36046729, 0.63605396])
assert_allclose(q_obtained, q_expected, rtol=2e-07, verbose=True)
def test2_Rot_to_quaternion():
"""
Test2 the method Rot_to_quaternion
"""
r2 = array([[0.0516208, 0.0057865, 0.9986500],
[-0.2212602, 0.9751976, 0.0057865],
[-0.9738476, -0.2212602, 0.0516208]])
q2_obtained = Rot_to_quaternion(r2)
q2_expected = array([0.7208397, -0.0787438, 0.6840972, -0.0787438])
assert_allclose(q2_obtained, q2_expected, rtol=4e-07, verbose=True)
def test1_RPY_to_quaternion():
"""
Test1 the method RPY_to_quaternion
"""
roll: float = 0.3
pitch: float = 0.8
yaw: float = 1.67
q_obtained = RPY_to_quaternion(roll, pitch, yaw)
q_expected = array([0.65439287, -0.19305097, 0.36046729, 0.63605396])
assert_allclose(q_obtained, q_expected, rtol=2e-07, verbose=True)
def test2_RPY_to_quaternion():
"""
Test2 the method RPY_to_quaternion
"""
roll: float = 1.8
pitch: float = 1.8
yaw: float = 1.8
q_obtained = RPY_to_quaternion(roll, pitch, yaw)
q_expected = array([0.7208397, -0.0787438, 0.6840972, -0.0787438])
assert_allclose(q_obtained, q_expected, rtol=4e-07, verbose=True)
def test1_quaternion_to_Rot():
"""
Test1 the method quaternion_to_Rot
"""
q = array([0.65439287, -0.19305097, 0.36046729, 0.63605396])
rot_obtained = quaternion_to_Rot(q)
rot_expected = array([[-0.0690026, -0.9716355, 0.2261928],
[ 0.6932812, 0.1163334, 0.7112156],
[-0.7173561, 0.2058909, 0.6655893]])
assert_allclose(rot_obtained, rot_expected, rtol=2e-07, verbose=True)
def test2_quaternion_to_Rot():
"""
Test2 the method quaternion_to_Rot
"""
q = array([0.7208397, -0.0787438, 0.6840972, -0.0787438])
rot_obtained = quaternion_to_Rot(q)
rot_expected = array([[0.0516208, 0.0057865, 0.9986500],
[-0.2212602, 0.9751976, 0.0057865],
[-0.9738476, -0.2212602, 0.0516208]])
assert_allclose(rot_obtained, rot_expected, rtol=3e-06, verbose=True)
def test1_quaternion_to_RPY():
"""
Test1 the method quaternion_to_RPY
"""
q = array([0.65439287, -0.19305097, 0.36046729, 0.63605396])
roll_obtained, pitch_obtained, yaw_obtained = quaternion_to_RPY(q)
RPY_obtained = array([roll_obtained, pitch_obtained, yaw_obtained])
RPY_expected = array([0.3, 0.8, 1.67])
assert_allclose(RPY_obtained, RPY_expected, rtol=2e-07, verbose=True)
def test2_quaternion_to_RPY():
"""
Test2 the method quaternion_to_RPY
"""
q = array([0.7208397, -0.0787438, 0.6840972, -0.0787438])
roll_obtained, pitch_obtained, yaw_obtained = quaternion_to_RPY(q)
RPY_obtained = array([roll_obtained, pitch_obtained, yaw_obtained])
RPY_expected = array([-1.341592, 1.341593, -1.341592])
assert_allclose(RPY_obtained, RPY_expected, rtol=2e-07, verbose=True)
def test1_RPY_to_RotZYX():
"""
Test1 the method RPY_to_RotZYX
"""
roll: float = 0.3
pitch: float = 0.8
yaw: float = 1.67
rot_obtained = RPY_to_RotZYX(roll, pitch, yaw)
rot_expected = array([[-0.0690026, -0.9716355, 0.2261928],
[0.6932812, 0.1163334, 0.7112156],
[-0.7173561, 0.2058909, 0.6655893]])
assert_allclose(rot_obtained, rot_expected, rtol=7e-07, verbose=True)
def test2_RPY_to_RotZYX():
"""
Test2 the method RPY_to_RotZYX
"""
roll: float = 1.8
pitch: float = 1.8
yaw: float = 1.8
rot_obtained = RPY_to_RotZYX(roll, pitch, yaw)
rot_expected = array([[0.0516208, 0.0057865, 0.9986500],
[-0.2212602, 0.9751976, 0.0057865],
[-0.9738476, -0.2212602, 0.0516208]])
assert_allclose(rot_obtained, rot_expected, rtol=4e-06, verbose=True)
def test1_RotZYX_to_RPY():
"""
Test1 the method RotZYX_to_RPY
"""
r = array([[-0.0690026, -0.9716355, 0.2261928],
[0.6932812, 0.1163334, 0.7112156],
[-0.7173561, 0.2058909, 0.6655893]])
roll_obtained, pitch_obtained, yaw_obtained = RotZYX_to_RPY(r)
RPY_obtained = array([roll_obtained, pitch_obtained, yaw_obtained])
RPY_expected = array([0.3, 0.8, 1.67])
assert_allclose(RPY_obtained, RPY_expected, rtol=3e-07, verbose=True)
def test2_RotZYX_to_RPY():
"""
Test2 the method RotZYX_to_RPY
"""
r = array([[0.0516208, 0.0057865, 0.9986500],
[-0.2212602, 0.9751976, 0.0057865],
[-0.9738476, -0.2212602, 0.0516208]])
roll_obtained, pitch_obtained, yaw_obtained = RotZYX_to_RPY(r)
RPY_obtained = array([roll_obtained, pitch_obtained, yaw_obtained])
RPY_expected = array([-1.341593, 1.341593, -1.341593])
assert_allclose(RPY_obtained, RPY_expected, rtol=4e-07, verbose=True)
def main():
# Test the conversion from rotation matrix to quaternion
test1_Rot_to_quaternion()
test2_Rot_to_quaternion()
# Test the conversion from euler angles to quaternion
test1_RPY_to_quaternion()
test2_RPY_to_quaternion()
# Test the conversion from quaternion to rotation matrix
test1_quaternion_to_Rot()
test2_quaternion_to_Rot()
# Test the conversion from quaternion to euler angles
test1_quaternion_to_RPY()
test2_quaternion_to_RPY()
# Test the conversion from euler angles to rotation matrix
test1_RPY_to_RotZYX()
test2_RPY_to_RotZYX()
# Test the conversion from rotation matrix to euler angles
test1_RotZYX_to_RPY()
test2_RotZYX_to_RPY()
if __name__ == "__main__":
main()
| [
1,
529,
9507,
29958,
21150,
29914,
1688,
29918,
5450,
800,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
12655,
1053,
1409,
13,
3166,
12655,
29889,
13424,
1053,
4974,
29918,
497,
5358,
13,
3166,
18031,
272,
1982,
29889,
5450,
800,
1053,
9664,
29918,
517,
29918,
339,
25744,
291,
29892,
390,
20055,
29918,
517,
29918,
339,
25744,
291,
29892,
439,
25744,
291,
29918,
517,
29918,
21281,
29892,
439,
25744,
291,
29918,
517,
29918,
29934,
20055,
29892,
390,
20055,
29918,
517,
29918,
21281,
29999,
29979,
29990,
29892,
320,
13,
1678,
9664,
29999,
29979,
29990,
29918,
517,
29918,
29934,
20055,
13,
13,
15945,
29908,
13,
1576,
1494,
6987,
526,
18043,
363,
278,
5731,
800,
3883,
13,
1576,
1494,
3988,
471,
1304,
304,
7625,
278,
3918,
1819,
304,
7252,
2750,
13,
991,
597,
1636,
29889,
392,
276,
29899,
25496,
305,
1358,
29889,
510,
29914,
5450,
362,
535,
13549,
29914,
13,
15945,
29908,
13,
13,
1753,
1243,
29896,
29918,
21281,
29918,
517,
29918,
339,
25744,
291,
7295,
13,
1678,
9995,
13,
1678,
4321,
29896,
278,
1158,
9664,
29918,
517,
29918,
339,
25744,
291,
13,
1678,
9995,
13,
1678,
364,
353,
1409,
4197,
14352,
29900,
29889,
29900,
29953,
29929,
29900,
29900,
29906,
29953,
29892,
448,
29900,
29889,
29929,
29955,
29896,
29953,
29941,
29945,
29945,
29892,
29871,
29900,
29889,
29906,
29906,
29953,
29896,
29929,
29906,
29947,
1402,
13,
1669,
518,
29900,
29889,
29953,
29929,
29941,
29906,
29947,
29896,
29906,
29892,
29871,
29900,
29889,
29896,
29896,
29953,
29941,
29941,
29941,
29946,
29892,
29871,
29900,
29889,
29955,
29896,
29896,
29906,
29896,
29945,
29953,
1402,
13,
1669,
21069,
29900,
29889,
29955,
29896,
29955,
29941,
29945,
29953,
29896,
29892,
29871,
29900,
29889,
29906,
29900,
29945,
29947,
29929,
29900,
29929,
29892,
29871,
29900,
29889,
29953,
29953,
29945,
29945,
29947,
29929,
29941,
24960,
13,
13,
1678,
3855,
29918,
711,
2408,
287,
353,
9664,
29918,
517,
29918,
339,
25744,
291,
29898,
29878,
29897,
13,
1678,
3855,
29918,
9684,
353,
1409,
4197,
29900,
29889,
29953,
29945,
29946,
29941,
29929,
29906,
29947,
29955,
29892,
448,
29900,
29889,
29896,
29929,
29941,
29900,
29945,
29900,
29929,
29955,
29892,
29871,
29900,
29889,
29941,
29953,
29900,
29946,
29953,
29955,
29906,
29929,
29892,
29871,
29900,
29889,
29953,
29941,
29953,
29900,
29945,
29941,
29929,
29953,
2314,
13,
1678,
4974,
29918,
497,
5358,
29898,
29939,
29918,
711,
2408,
287,
29892,
3855,
29918,
9684,
29892,
364,
25027,
29922,
29906,
29872,
29899,
29900,
29955,
29892,
26952,
29922,
5574,
29897,
13,
13,
1753,
1243,
29906,
29918,
21281,
29918,
517,
29918,
339,
25744,
291,
7295,
13,
1678,
9995,
13,
1678,
4321,
29906,
278,
1158,
9664,
29918,
517,
29918,
339,
25744,
291,
13,
1678,
9995,
13,
1678,
364,
29906,
353,
1409,
4197,
29961,
29900,
29889,
29900,
29945,
29896,
29953,
29906,
29900,
29947,
29892,
29871,
29900,
29889,
29900,
29900,
29945,
29955,
29947,
29953,
29945,
29892,
29871,
29900,
29889,
29929,
29929,
29947,
29953,
29945,
29900,
29900,
1402,
13,
18884,
21069,
29900,
29889,
29906,
29906,
29896,
29906,
29953,
29900,
29906,
29892,
29871,
29900,
29889,
29929,
29955,
29945,
29896,
29929,
29955,
29953,
29892,
29871,
29900,
29889,
29900,
29900,
29945,
29955,
29947,
29953,
29945,
1402,
13,
18884,
21069,
29900,
29889,
29929,
29955,
29941,
29947,
29946,
29955,
29953,
29892,
448,
29900,
29889,
29906,
29906,
29896,
29906,
29953,
29900,
29906,
29892,
29871,
29900,
29889,
29900,
29945,
29896,
29953,
29906,
29900,
29947,
24960,
13,
13,
1678,
3855,
29906,
29918,
711,
2408,
287,
353,
9664,
29918,
517,
29918,
339,
25744,
291,
29898,
29878,
29906,
29897,
13,
1678,
3855,
29906,
29918,
9684,
353,
1409,
4197,
29900,
29889,
29955,
29906,
29900,
29947,
29941,
29929,
29955,
29892,
448,
29900,
29889,
29900,
29955,
29947,
29955,
29946,
29941,
29947,
29892,
29871,
29900,
29889,
29953,
29947,
29946,
29900,
29929,
29955,
29906,
29892,
448,
29900,
29889,
29900,
29955,
29947,
29955,
29946,
29941,
29947,
2314,
13,
1678,
4974,
29918,
497,
5358,
29898,
29939,
29906,
29918,
711,
2408,
287,
29892,
3855,
29906,
29918,
9684,
29892,
364,
25027,
29922,
29946,
29872,
29899,
29900,
29955,
29892,
26952,
29922,
5574,
29897,
13,
13,
1753,
1243,
29896,
29918,
29934,
20055,
29918,
517,
29918,
339,
25744,
291,
7295,
13,
1678,
9995,
13,
1678,
4321,
29896,
278,
1158,
390,
20055,
29918,
517,
29918,
339,
25744,
291,
13,
1678,
9995,
13,
1678,
9679,
29901,
5785,
353,
29871,
29900,
29889,
29941,
13,
1678,
15905,
29901,
5785,
353,
29871,
29900,
29889,
29947,
13,
1678,
343,
1450,
29901,
5785,
353,
29871,
29896,
29889,
29953,
29955,
13,
13,
1678,
3855,
29918,
711,
2408,
287,
353,
390,
20055,
29918,
517,
29918,
339,
25744,
291,
29898,
1245,
29892,
15905,
29892,
343,
1450,
29897,
13,
1678,
3855,
29918,
9684,
353,
1409,
4197,
29900,
29889,
29953,
29945,
29946,
29941,
29929,
29906,
29947,
29955,
29892,
448,
29900,
29889,
29896,
29929,
29941,
29900,
29945,
29900,
29929,
29955,
29892,
29871,
29900,
29889,
29941,
29953,
29900,
29946,
29953,
29955,
29906,
29929,
29892,
29871,
29900,
29889,
29953,
29941,
29953,
29900,
29945,
29941,
29929,
29953,
2314,
13,
1678,
4974,
29918,
497,
5358,
29898,
29939,
29918,
711,
2408,
287,
29892,
3855,
29918,
9684,
29892,
364,
25027,
29922,
29906,
29872,
29899,
29900,
29955,
29892,
26952,
29922,
5574,
29897,
13,
13,
1753,
1243,
29906,
29918,
29934,
20055,
29918,
517,
29918,
339,
25744,
291,
7295,
13,
1678,
9995,
13,
1678,
4321,
29906,
278,
1158,
390,
20055,
29918,
517,
29918,
339,
25744,
291,
13,
1678,
9995,
13,
1678,
9679,
29901,
5785,
353,
29871,
29896,
29889,
29947,
13,
1678,
15905,
29901,
5785,
353,
29871,
29896,
29889,
29947,
13,
1678,
343,
1450,
29901,
5785,
353,
29871,
29896,
29889,
29947,
13,
13,
1678,
3855,
29918,
711,
2408,
287,
353,
390,
20055,
29918,
517,
29918,
339,
25744,
291,
29898,
1245,
29892,
15905,
29892,
343,
1450,
29897,
13,
1678,
3855,
29918,
9684,
353,
1409,
4197,
29900,
29889,
29955,
29906,
29900,
29947,
29941,
29929,
29955,
29892,
448,
29900,
29889,
29900,
29955,
29947,
29955,
29946,
29941,
29947,
29892,
29871,
29900,
29889,
29953,
29947,
29946,
29900,
29929,
29955,
29906,
29892,
448,
29900,
29889,
29900,
29955,
29947,
29955,
29946,
29941,
29947,
2314,
13,
1678,
4974,
29918,
497,
5358,
29898,
29939,
29918,
711,
2408,
287,
29892,
3855,
29918,
9684,
29892,
364,
25027,
29922,
29946,
29872,
29899,
29900,
29955,
29892,
26952,
29922,
5574,
29897,
13,
13,
13,
1753,
1243,
29896,
29918,
339,
25744,
291,
29918,
517,
29918,
21281,
7295,
13,
1678,
9995,
13,
1678,
4321,
29896,
278,
1158,
439,
25744,
291,
29918,
517,
29918,
21281,
13,
1678,
9995,
13,
1678,
3855,
353,
1409,
4197,
29900,
29889,
29953,
29945,
29946,
29941,
29929,
29906,
29947,
29955,
29892,
448,
29900,
29889,
29896,
29929,
29941,
29900,
29945,
29900,
29929,
29955,
29892,
29871,
29900,
29889,
29941,
29953,
29900,
29946,
29953,
29955,
29906,
29929,
29892,
29871,
29900,
29889,
29953,
29941,
29953,
29900,
29945,
29941,
29929,
29953,
2314,
13,
13,
1678,
5731,
29918,
711,
2408,
287,
353,
439,
25744,
291,
29918,
517,
29918,
21281,
29898,
29939,
29897,
13,
1678,
5731,
29918,
9684,
353,
1409,
4197,
14352,
29900,
29889,
29900,
29953,
29929,
29900,
29900,
29906,
29953,
29892,
448,
29900,
29889,
29929,
29955,
29896,
29953,
29941,
29945,
29945,
29892,
29871,
29900,
29889,
29906,
29906,
29953,
29896,
29929,
29906,
29947,
1402,
13,
462,
3986,
518,
29871,
29900,
29889,
29953,
29929,
29941,
29906,
29947,
29896,
29906,
29892,
259,
29900,
29889,
29896,
29896,
29953,
29941,
29941,
29941,
29946,
29892,
29871,
29900,
29889,
29955,
29896,
29896,
29906,
29896,
29945,
29953,
1402,
13,
462,
3986,
21069,
29900,
29889,
29955,
29896,
29955,
29941,
29945,
29953,
29896,
29892,
259,
29900,
29889,
29906,
29900,
29945,
29947,
29929,
29900,
29929,
29892,
29871,
29900,
29889,
29953,
29953,
29945,
29945,
29947,
29929,
29941,
24960,
13,
13,
1678,
4974,
29918,
497,
5358,
29898,
5450,
29918,
711,
2408,
287,
29892,
5731,
29918,
9684,
29892,
364,
25027,
29922,
29906,
29872,
29899,
29900,
29955,
29892,
26952,
29922,
5574,
29897,
13,
13,
1753,
1243,
29906,
29918,
339,
25744,
291,
29918,
517,
29918,
21281,
7295,
13,
1678,
9995,
13,
1678,
4321,
29906,
278,
1158,
439,
25744,
291,
29918,
517,
29918,
21281,
13,
1678,
9995,
13,
1678,
3855,
353,
1409,
4197,
29900,
29889,
29955,
29906,
29900,
29947,
29941,
29929,
29955,
29892,
448,
29900,
29889,
29900,
29955,
29947,
29955,
29946,
29941,
29947,
29892,
29871,
29900,
29889,
29953,
29947,
29946,
29900,
29929,
29955,
29906,
29892,
448,
29900,
29889,
29900,
29955,
29947,
29955,
29946,
29941,
29947,
2314,
13,
13,
1678,
5731,
29918,
711,
2408,
287,
353,
439,
25744,
291,
29918,
517,
29918,
21281,
29898,
29939,
29897,
13,
1678,
5731,
29918,
9684,
353,
1409,
4197,
29961,
29900,
29889,
29900,
29945,
29896,
29953,
29906,
29900,
29947,
29892,
29871,
29900,
29889,
29900,
29900,
29945,
29955,
29947,
29953,
29945,
29892,
29871,
29900,
29889,
29929,
29929,
29947,
29953,
29945,
29900,
29900,
1402,
13,
462,
3986,
21069,
29900,
29889,
29906,
29906,
29896,
29906,
29953,
29900,
29906,
29892,
29871,
29900,
29889,
29929,
29955,
29945,
29896,
29929,
29955,
29953,
29892,
29871,
29900,
29889,
29900,
29900,
29945,
29955,
29947,
29953,
29945,
1402,
13,
462,
3986,
21069,
29900,
29889,
29929,
29955,
29941,
29947,
29946,
29955,
29953,
29892,
448,
29900,
29889,
29906,
29906,
29896,
29906,
29953,
29900,
29906,
29892,
29871,
29900,
29889,
29900,
29945,
29896,
29953,
29906,
29900,
29947,
24960,
13,
13,
1678,
4974,
29918,
497,
5358,
29898,
5450,
29918,
711,
2408,
287,
29892,
5731,
29918,
9684,
29892,
364,
25027,
29922,
29941,
29872,
29899,
29900,
29953,
29892,
26952,
29922,
5574,
29897,
13,
13,
1753,
1243,
29896,
29918,
339,
25744,
291,
29918,
517,
29918,
29934,
20055,
7295,
13,
1678,
9995,
13,
1678,
4321,
29896,
278,
1158,
439,
25744,
291,
29918,
517,
29918,
29934,
20055,
13,
1678,
9995,
13,
1678,
3855,
353,
1409,
4197,
29900,
29889,
29953,
29945,
29946,
29941,
29929,
29906,
29947,
29955,
29892,
448,
29900,
29889,
29896,
29929,
29941,
29900,
29945,
29900,
29929,
29955,
29892,
29871,
29900,
29889,
29941,
29953,
29900,
29946,
29953,
29955,
29906,
29929,
29892,
29871,
29900,
29889,
29953,
29941,
29953,
29900,
29945,
29941,
29929,
29953,
2314,
13,
13,
1678,
9679,
29918,
711,
2408,
287,
29892,
15905,
29918,
711,
2408,
287,
29892,
343,
1450,
29918,
711,
2408,
287,
353,
439,
25744,
291,
29918,
517,
29918,
29934,
20055,
29898,
29939,
29897,
13,
1678,
390,
20055,
29918,
711,
2408,
287,
353,
1409,
4197,
1245,
29918,
711,
2408,
287,
29892,
15905,
29918,
711,
2408,
287,
29892,
343,
1450,
29918,
711,
2408,
287,
2314,
13,
1678,
390,
20055,
29918,
9684,
353,
1409,
4197,
29900,
29889,
29941,
29892,
29871,
29900,
29889,
29947,
29892,
29871,
29896,
29889,
29953,
29955,
2314,
13,
13,
1678,
4974,
29918,
497,
5358,
29898,
29934,
20055,
29918,
711,
2408,
287,
29892,
390,
20055,
29918,
9684,
29892,
364,
25027,
29922,
29906,
29872,
29899,
29900,
29955,
29892,
26952,
29922,
5574,
29897,
13,
13,
1753,
1243,
29906,
29918,
339,
25744,
291,
29918,
517,
29918,
29934,
20055,
7295,
13,
1678,
9995,
13,
1678,
4321,
29906,
278,
1158,
439,
25744,
291,
29918,
517,
29918,
29934,
20055,
13,
1678,
9995,
13,
1678,
3855,
353,
1409,
4197,
29900,
29889,
29955,
29906,
29900,
29947,
29941,
29929,
29955,
29892,
448,
29900,
29889,
29900,
29955,
29947,
29955,
29946,
29941,
29947,
29892,
29871,
29900,
29889,
29953,
29947,
29946,
29900,
29929,
29955,
29906,
29892,
448,
29900,
29889,
29900,
29955,
29947,
29955,
29946,
29941,
29947,
2314,
13,
13,
1678,
9679,
29918,
711,
2408,
287,
29892,
15905,
29918,
711,
2408,
287,
29892,
343,
1450,
29918,
711,
2408,
287,
353,
439,
25744,
291,
29918,
517,
29918,
29934,
20055,
29898,
29939,
29897,
13,
1678,
390,
20055,
29918,
711,
2408,
287,
353,
1409,
4197,
1245,
29918,
711,
2408,
287,
29892,
15905,
29918,
711,
2408,
287,
29892,
343,
1450,
29918,
711,
2408,
287,
2314,
13,
1678,
390,
20055,
29918,
9684,
353,
1409,
4197,
29899,
29896,
29889,
29941,
29946,
29896,
29945,
29929,
29906,
29892,
29871,
29896,
29889,
29941,
29946,
29896,
29945,
29929,
29941,
29892,
448,
29896,
29889,
29941,
29946,
29896,
29945,
29929,
29906,
2314,
13,
13,
1678,
4974,
29918,
497,
5358,
29898,
29934,
20055,
29918,
711,
2408,
287,
29892,
390,
20055,
29918,
9684,
29892,
364,
25027,
29922,
29906,
29872,
29899,
29900,
29955,
29892,
26952,
29922,
5574,
29897,
13,
13,
1753,
1243,
29896,
29918,
29934,
20055,
29918,
517,
29918,
21281,
29999,
29979,
29990,
7295,
13,
1678,
9995,
13,
1678,
4321,
29896,
278,
1158,
390,
20055,
29918,
517,
29918,
21281,
29999,
29979,
29990,
13,
1678,
9995,
13,
1678,
9679,
29901,
5785,
353,
29871,
29900,
29889,
29941,
13,
1678,
15905,
29901,
5785,
353,
29871,
29900,
29889,
29947,
13,
1678,
343,
1450,
29901,
5785,
353,
29871,
29896,
29889,
29953,
29955,
13,
13,
1678,
5731,
29918,
711,
2408,
287,
353,
390,
20055,
29918,
517,
29918,
21281,
29999,
29979,
29990,
29898,
1245,
29892,
15905,
29892,
343,
1450,
29897,
13,
1678,
5731,
29918,
9684,
353,
1409,
4197,
14352,
29900,
29889,
29900,
29953,
29929,
29900,
29900,
29906,
29953,
29892,
448,
29900,
29889,
29929,
29955,
29896,
29953,
29941,
29945,
29945,
29892,
29871,
29900,
29889,
29906,
29906,
29953,
29896,
29929,
29906,
29947,
1402,
13,
462,
3986,
518,
29900,
29889,
29953,
29929,
29941,
29906,
29947,
29896,
29906,
29892,
29871,
29900,
29889,
29896,
29896,
29953,
29941,
29941,
29941,
29946,
29892,
29871,
29900,
29889,
29955,
29896,
29896,
29906,
29896,
29945,
29953,
1402,
13,
462,
3986,
21069,
29900,
29889,
29955,
29896,
29955,
29941,
29945,
29953,
29896,
29892,
29871,
29900,
29889,
29906,
29900,
29945,
29947,
29929,
29900,
29929,
29892,
29871,
29900,
29889,
29953,
29953,
29945,
29945,
29947,
29929,
29941,
24960,
13,
13,
1678,
4974,
29918,
497,
5358,
29898,
5450,
29918,
711,
2408,
287,
29892,
5731,
29918,
9684,
29892,
364,
25027,
29922,
29955,
29872,
29899,
29900,
29955,
29892,
26952,
29922,
5574,
29897,
13,
13,
1753,
1243,
29906,
29918,
29934,
20055,
29918,
517,
29918,
21281,
29999,
29979,
29990,
7295,
13,
1678,
9995,
13,
1678,
4321,
29906,
278,
1158,
390,
20055,
29918,
517,
29918,
21281,
29999,
29979,
29990,
13,
1678,
9995,
13,
1678,
9679,
29901,
5785,
353,
29871,
29896,
29889,
29947,
13,
1678,
15905,
29901,
5785,
353,
29871,
29896,
29889,
29947,
13,
1678,
343,
1450,
29901,
5785,
353,
29871,
29896,
29889,
29947,
13,
13,
1678,
5731,
29918,
711,
2408,
287,
353,
390,
20055,
29918,
517,
29918,
21281,
29999,
29979,
29990,
29898,
1245,
29892,
15905,
29892,
343,
1450,
29897,
13,
1678,
5731,
29918,
9684,
353,
1409,
4197,
29961,
29900,
29889,
29900,
29945,
29896,
29953,
29906,
29900,
29947,
29892,
29871,
29900,
29889,
29900,
29900,
29945,
29955,
29947,
29953,
29945,
29892,
29871,
29900,
29889,
29929,
29929,
29947,
29953,
29945,
29900,
29900,
1402,
13,
462,
3986,
21069,
29900,
29889,
29906,
29906,
29896,
29906,
29953,
29900,
29906,
29892,
29871,
29900,
29889,
29929,
29955,
29945,
29896,
29929,
29955,
29953,
29892,
29871,
29900,
29889,
29900,
29900,
29945,
29955,
29947,
29953,
29945,
1402,
13,
462,
3986,
21069,
29900,
29889,
29929,
29955,
29941,
29947,
29946,
29955,
29953,
29892,
448,
29900,
29889,
29906,
29906,
29896,
29906,
29953,
29900,
29906,
29892,
29871,
29900,
29889,
29900,
29945,
29896,
29953,
29906,
29900,
29947,
24960,
13,
13,
1678,
4974,
29918,
497,
5358,
29898,
5450,
29918,
711,
2408,
287,
29892,
5731,
29918,
9684,
29892,
364,
25027,
29922,
29946,
29872,
29899,
29900,
29953,
29892,
26952,
29922,
5574,
29897,
13,
13,
1753,
1243,
29896,
29918,
21281,
29999,
29979,
29990,
29918,
517,
29918,
29934,
20055,
7295,
13,
1678,
9995,
13,
1678,
4321,
29896,
278,
1158,
9664,
29999,
29979,
29990,
29918,
517,
29918,
29934,
20055,
13,
1678,
9995,
13,
1678,
364,
353,
1409,
4197,
14352,
29900,
29889,
29900,
29953,
29929,
29900,
29900,
29906,
29953,
29892,
448,
29900,
29889,
29929,
29955,
29896,
29953,
29941,
29945,
29945,
29892,
29871,
29900,
29889,
29906,
29906,
29953,
29896,
29929,
29906,
29947,
1402,
13,
1669,
518,
29900,
29889,
29953,
29929,
29941,
29906,
29947,
29896,
29906,
29892,
29871,
29900,
29889,
29896,
29896,
29953,
29941,
29941,
29941,
29946,
29892,
29871,
29900,
29889,
29955,
29896,
29896,
29906,
29896,
29945,
29953,
1402,
13,
1669,
21069,
29900,
29889,
29955,
29896,
29955,
29941,
29945,
29953,
29896,
29892,
29871,
29900,
29889,
29906,
29900,
29945,
29947,
29929,
29900,
29929,
29892,
29871,
29900,
29889,
29953,
29953,
29945,
29945,
29947,
29929,
29941,
24960,
13,
13,
1678,
9679,
29918,
711,
2408,
287,
29892,
15905,
29918,
711,
2408,
287,
29892,
343,
1450,
29918,
711,
2408,
287,
353,
9664,
29999,
29979,
29990,
29918,
517,
29918,
29934,
20055,
29898,
29878,
29897,
13,
1678,
390,
20055,
29918,
711,
2408,
287,
353,
1409,
4197,
1245,
29918,
711,
2408,
287,
29892,
15905,
29918,
711,
2408,
287,
29892,
343,
1450,
29918,
711,
2408,
287,
2314,
13,
1678,
390,
20055,
29918,
9684,
353,
1409,
4197,
29900,
29889,
29941,
29892,
29871,
29900,
29889,
29947,
29892,
29871,
29896,
29889,
29953,
29955,
2314,
13,
13,
1678,
4974,
29918,
497,
5358,
29898,
29934,
20055,
29918,
711,
2408,
287,
29892,
390,
20055,
29918,
9684,
29892,
364,
25027,
29922,
29941,
29872,
29899,
29900,
29955,
29892,
26952,
29922,
5574,
29897,
13,
13,
1753,
1243,
29906,
29918,
21281,
29999,
29979,
29990,
29918,
517,
29918,
29934,
20055,
7295,
13,
1678,
9995,
13,
1678,
4321,
29906,
278,
1158,
9664,
29999,
29979,
29990,
29918,
517,
29918,
29934,
20055,
13,
1678,
9995,
13,
1678,
364,
353,
1409,
4197,
29961,
29900,
29889,
29900,
29945,
29896,
29953,
29906,
29900,
29947,
29892,
29871,
29900,
29889,
29900,
29900,
29945,
29955,
29947,
29953,
29945,
29892,
29871,
29900,
29889,
29929,
29929,
29947,
29953,
29945,
29900,
29900,
1402,
13,
1669,
21069,
29900,
29889,
29906,
29906,
29896,
29906,
29953,
29900,
29906,
29892,
29871,
29900,
29889,
29929,
29955,
29945,
29896,
29929,
29955,
29953,
29892,
29871,
29900,
29889,
29900,
29900,
29945,
29955,
29947,
29953,
29945,
1402,
13,
1669,
21069,
29900,
29889,
29929,
29955,
29941,
29947,
29946,
29955,
29953,
29892,
448,
29900,
29889,
29906,
29906,
29896,
29906,
29953,
29900,
29906,
29892,
29871,
29900,
29889,
29900,
29945,
29896,
29953,
29906,
29900,
29947,
24960,
13,
13,
1678,
9679,
29918,
711,
2408,
287,
29892,
15905,
29918,
711,
2408,
287,
29892,
343,
1450,
29918,
711,
2408,
287,
353,
9664,
29999,
29979,
29990,
29918,
517,
29918,
29934,
20055,
29898,
29878,
29897,
13,
1678,
390,
20055,
29918,
711,
2408,
287,
353,
1409,
4197,
1245,
29918,
711,
2408,
287,
29892,
15905,
29918,
711,
2408,
287,
29892,
343,
1450,
29918,
711,
2408,
287,
2314,
13,
1678,
390,
20055,
29918,
9684,
353,
1409,
4197,
29899,
29896,
29889,
29941,
29946,
29896,
29945,
29929,
29941,
29892,
29871,
29896,
29889,
29941,
29946,
29896,
29945,
29929,
29941,
29892,
448,
29896,
29889,
29941,
29946,
29896,
29945,
29929,
29941,
2314,
13,
13,
1678,
4974,
29918,
497,
5358,
29898,
29934,
20055,
29918,
711,
2408,
287,
29892,
390,
20055,
29918,
9684,
29892,
364,
25027,
29922,
29946,
29872,
29899,
29900,
29955,
29892,
26952,
29922,
5574,
29897,
13,
13,
1753,
1667,
7295,
13,
1678,
396,
4321,
278,
11301,
515,
13733,
4636,
304,
439,
25744,
291,
13,
1678,
1243,
29896,
29918,
21281,
29918,
517,
29918,
339,
25744,
291,
580,
13,
1678,
1243,
29906,
29918,
21281,
29918,
517,
29918,
339,
25744,
291,
580,
13,
13,
1678,
396,
4321,
278,
11301,
515,
321,
8584,
23619,
304,
439,
25744,
291,
13,
1678,
1243,
29896,
29918,
29934,
20055,
29918,
517,
29918,
339,
25744,
291,
580,
13,
1678,
1243,
29906,
29918,
29934,
20055,
29918,
517,
29918,
339,
25744,
291,
580,
13,
13,
1678,
396,
4321,
278,
11301,
515,
439,
25744,
291,
304,
13733,
4636,
13,
1678,
1243,
29896,
29918,
339,
25744,
291,
29918,
517,
29918,
21281,
580,
13,
1678,
1243,
29906,
29918,
339,
25744,
291,
29918,
517,
29918,
21281,
580,
13,
13,
1678,
396,
4321,
278,
11301,
515,
439,
25744,
291,
304,
321,
8584,
23619,
13,
1678,
1243,
29896,
29918,
339,
25744,
291,
29918,
517,
29918,
29934,
20055,
580,
13,
1678,
1243,
29906,
29918,
339,
25744,
291,
29918,
517,
29918,
29934,
20055,
580,
13,
13,
1678,
396,
4321,
278,
11301,
515,
321,
8584,
23619,
304,
13733,
4636,
13,
1678,
1243,
29896,
29918,
29934,
20055,
29918,
517,
29918,
21281,
29999,
29979,
29990,
580,
13,
1678,
1243,
29906,
29918,
29934,
20055,
29918,
517,
29918,
21281,
29999,
29979,
29990,
580,
13,
13,
1678,
396,
4321,
278,
11301,
515,
13733,
4636,
304,
321,
8584,
23619,
13,
1678,
1243,
29896,
29918,
21281,
29999,
29979,
29990,
29918,
517,
29918,
29934,
20055,
580,
13,
1678,
1243,
29906,
29918,
21281,
29999,
29979,
29990,
29918,
517,
29918,
29934,
20055,
580,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1667,
580,
13,
2
] |
generate.py | ShuKar99/Multi-Threaded-Sudoku-Solver | 0 | 185746 | from sudoku import *
from thread import Threads
from copy import *
class SudokuCreater():
def __init__(self, sudoku):
self.sudoku= sudoku
dom= ['1','2','3','4','5','6','7','8','9']
self.constraints= self.sudoku.board_constraints()
self.domain= dict()
# all unassigned variables in the board have a domain [1,9]
for var in self.sudoku.variables:
if(self.sudoku.structure[var.i][var.j]=='0'):
self.domain[var]= deepcopy(dom)
else:
self.domain[var]= list(self.sudoku.structure[var.i][var.j])
def solve(self):
# we'll enforce node consistency through the GUI part
self.ac3()
return self.backtrack(dict())
def domain_update(self,X_value, Y):
"""
revise function will call this function to check if X_value is chosen as a value for variable X, does that leave any option for Y?
"""
for Y_value in self.domain[Y]:
if Y_value != X_value:
return True
return False
def revise(self, X, Y):
"""
makes X arc consistent wrt to Y
"""
revised= False
#if a value in X's domain doesn't leave any option for Y, remove that value from X's domain
threads= []
for X_value in self.domain[X]:
threads.append(Threads(target= self.domain_update, args=(X_value,Y)))
for thread in threads:
thread.start()
for thread in threads:
if(thread.join()== False):
self.domain[X].remove(thread.args()[0])
revised= True
return revised
def add_arcs(self,variable):
# adds arc wrt to variable
arcs=[]
for constraint in self.constraints[variable]:
arcs.append((variable, constraint))
return arcs
def initial_arcs(self):
threads=[]
arcs=[]
for var in self.sudoku.variables:
threads.append(Threads(target= self.add_arcs, args=(var,)))
for thread in threads:
thread.start()
for thread in threads:
arcs+= thread.join()
return arcs
def ac3(self, arcs= None):
if arcs== None:
arcs= self.initial_arcs()
while(len(arcs)!=0):
arc= arcs.pop()
X= arc[0]
Y= arc[1]
if self.revise(X,Y):
#if revision emptied the domain of X, there's no solution
if(len(self.domain[X]) == 0):
return False
threads=[]
for constraint in self.constraints[X]:
if constraint == Y:
continue
else:
threads.append(Threads(target= self.revise, args= (constraint, X)))
for thread in threads:
thread.start()
for thread in threads:
if(thread.join()):
if(len(self.domain[thread.args()[0]]) ==0):
return False
return True
def assignment_complete(self, assignment):
return len(assignment) == len(self.sudoku.variables)
def is_constraint_consistent(self, constraint, assignment, assigned):
"""
will be called by is_consistent function to check if constraint is assigned or not
and if it is assigned, it's assignment should not be equal to assigned
"""
if constraint in assignment:
if assignment[constraint] == assigned:
return False
return True
def is_consistent(self, assignment, var, assigned):
"""
checks if var= assigned is consistent with the assignment done so far
"""
threads= []
for constraint in self.constraints[var]:
threads.append(Threads(target= self.is_constraint_consistent, args= (constraint, assignment, assigned)))
for thread in threads:
thread.start()
for thread in threads:
if(thread.join()== False):
return False
return True
def values_left_in_domain(self,variable):
"""
returns no. of values left in the domain of the variable
"""
return len(self.domain[variable])
def select_unassigned_variable(self, assignment):
"""
We'll choose the variable that has least possible values left in it's domain
"""
threads=[]
domain_values= dict()
for variable in self.sudoku.variables:
if variable not in assignment:
threads.append(Threads(target= self.values_left_in_domain, args=(variable,)))
for thread in threads:
thread.start()
for thread in threads:
domain_values[thread.args()[0]] = thread.join()
return sorted(domain_values, key= domain_values.get)[0]
def no_of_constraints(self, value, assignment, var):
"""
will be called by order_domain_values function to count the no. of contraints var= value puts on the neighnours of var
"""
count =0
for constraint in self.constraints[var]:
if value in self.domain[constraint]:
count+=1
return count
def order_domain_values(self, assignment, var):
"""
orders the domain of the variable var according to the constraints it puts on it's neighbours
"""
number_constrained= dict()
threads= []
for value in self.domain[var]:
threads.append(Threads(target= self.no_of_constraints, args= (value, assignment, var)))
for thread in threads:
thread.start()
for thread in threads:
number_constrained[thread.args()[0]] = thread.join()
return sorted(number_constrained, key= number_constrained.get)
def backtrack(self, assignment):
if self.assignment_complete(assignment):
return assignment
var= self.select_unassigned_variable(assignment)
for value in self.order_domain_values(assignment, var):
if self.is_consistent(assignment, var, value):
assignment[var]= value
#makes inferences from new assignment with ac3
arcs= [(constraint, var) for constraint in self.constraints[var]
if constraint not in assignment]
#make a copy of domains before calling ac3 so that changes to domains can be reverted if needed
t1= Threads(target= deepcopy, args= (self.domain,))
t1.start()
if self.ac3(arcs= arcs):
result = self.backtrack(assignment)
if result != None:
return result
assignment[var].remove(value)
self.domains= t1.join()
return None
def print_assignment(self, assignment):
for i in range(len(self.sudoku.structure)):
if i%3==0 and i!=0:
print("- - - - - - - -")
for j in range(len(self.sudoku.structure[i])):
if j%3==0 and j!=0:
print(" | ", end="")
if j==8:
if(self.sudoku.structure[i][j]=='0'):
print(assignment[Variable(i=i, j=j)])
else:
print(self.sudoku.structure[i][j])
else:
if(self.sudoku.structure[i][j]=='0'):
print(str(assignment[Variable(i=i, j=j)]) + " ", end= "" )
else:
print(str(self.sudoku.structure[i][j]) + " " , end="")
def main():
sudoku= Sudoku("problems/5.txt")
creator= SudokuCreater(sudoku)
assignment= creator.solve()
creator.print_assignment(assignment)
print(assignment[Variable(0,0)])
if __name__ == "__main__":
main()
| [
1,
515,
5053,
9154,
1053,
334,
13,
3166,
3244,
1053,
10480,
29879,
13,
3166,
3509,
1053,
334,
13,
13,
1990,
8383,
9154,
9832,
1008,
7295,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
5053,
9154,
1125,
13,
4706,
1583,
29889,
29879,
566,
9154,
29922,
5053,
9154,
13,
4706,
2432,
29922,
6024,
29896,
3788,
29906,
3788,
29941,
3788,
29946,
3788,
29945,
3788,
29953,
3788,
29955,
3788,
29947,
3788,
29929,
2033,
13,
4706,
1583,
29889,
13646,
29879,
29922,
1583,
29889,
29879,
566,
9154,
29889,
3377,
29918,
13646,
29879,
580,
13,
4706,
1583,
29889,
7247,
29922,
9657,
580,
13,
4706,
396,
599,
443,
465,
12961,
3651,
297,
278,
7613,
505,
263,
5354,
518,
29896,
29892,
29929,
29962,
13,
4706,
363,
722,
297,
1583,
29889,
29879,
566,
9154,
29889,
20897,
29901,
13,
9651,
565,
29898,
1311,
29889,
29879,
566,
9154,
29889,
23905,
29961,
1707,
29889,
29875,
3816,
1707,
29889,
29926,
29962,
1360,
29915,
29900,
29374,
13,
18884,
1583,
29889,
7247,
29961,
1707,
13192,
6483,
8552,
29898,
3129,
29897,
13,
9651,
1683,
29901,
13,
18884,
1583,
29889,
7247,
29961,
1707,
13192,
1051,
29898,
1311,
29889,
29879,
566,
9154,
29889,
23905,
29961,
1707,
29889,
29875,
3816,
1707,
29889,
29926,
2314,
13,
13,
13,
13,
1678,
822,
4505,
29898,
1311,
1125,
13,
4706,
396,
591,
29915,
645,
427,
10118,
2943,
5718,
3819,
1549,
278,
14839,
760,
13,
4706,
1583,
29889,
562,
29941,
580,
13,
4706,
736,
1583,
29889,
1627,
11294,
29898,
8977,
3101,
13,
268,
13,
13,
1678,
822,
5354,
29918,
5504,
29898,
1311,
29892,
29990,
29918,
1767,
29892,
612,
1125,
13,
4706,
9995,
13,
4706,
6664,
895,
740,
674,
1246,
445,
740,
304,
1423,
565,
1060,
29918,
1767,
338,
10434,
408,
263,
995,
363,
2286,
1060,
29892,
947,
393,
5967,
738,
2984,
363,
612,
29973,
13,
4706,
9995,
13,
4706,
363,
612,
29918,
1767,
297,
1583,
29889,
7247,
29961,
29979,
5387,
13,
9651,
565,
612,
29918,
1767,
2804,
1060,
29918,
1767,
29901,
13,
18884,
736,
5852,
13,
13,
4706,
736,
7700,
13,
13,
1678,
822,
6664,
895,
29898,
1311,
29892,
1060,
29892,
612,
1125,
13,
4706,
9995,
13,
4706,
3732,
1060,
15232,
13747,
281,
2273,
304,
612,
13,
4706,
9995,
13,
4706,
337,
11292,
29922,
7700,
13,
9651,
396,
361,
263,
995,
297,
1060,
29915,
29879,
5354,
1838,
29915,
29873,
5967,
738,
2984,
363,
612,
29892,
3349,
393,
995,
515,
1060,
29915,
29879,
5354,
13,
4706,
9717,
29922,
5159,
13,
4706,
363,
1060,
29918,
1767,
297,
1583,
29889,
7247,
29961,
29990,
5387,
13,
9651,
9717,
29889,
4397,
29898,
4899,
29879,
29898,
5182,
29922,
1583,
29889,
7247,
29918,
5504,
29892,
6389,
7607,
29990,
29918,
1767,
29892,
29979,
4961,
13,
13,
4706,
363,
3244,
297,
9717,
29901,
13,
9651,
3244,
29889,
2962,
580,
13,
13,
4706,
363,
3244,
297,
9717,
29901,
13,
9651,
565,
29898,
7097,
29889,
7122,
580,
1360,
7700,
1125,
13,
18884,
1583,
29889,
7247,
29961,
29990,
1822,
5992,
29898,
7097,
29889,
5085,
580,
29961,
29900,
2314,
13,
18884,
337,
11292,
29922,
5852,
13,
4706,
736,
337,
11292,
13,
418,
13,
1678,
822,
788,
29918,
279,
2395,
29898,
1311,
29892,
11918,
1125,
13,
4706,
396,
12778,
15232,
281,
2273,
304,
2286,
13,
4706,
564,
2395,
29922,
2636,
13,
4706,
363,
7276,
297,
1583,
29889,
13646,
29879,
29961,
11918,
5387,
13,
9651,
564,
2395,
29889,
4397,
3552,
11918,
29892,
7276,
876,
13,
4706,
736,
564,
2395,
13,
13,
1678,
822,
2847,
29918,
279,
2395,
29898,
1311,
1125,
13,
4706,
9717,
29922,
2636,
13,
4706,
564,
2395,
29922,
2636,
13,
4706,
363,
722,
297,
1583,
29889,
29879,
566,
9154,
29889,
20897,
29901,
13,
9651,
9717,
29889,
4397,
29898,
4899,
29879,
29898,
5182,
29922,
1583,
29889,
1202,
29918,
279,
2395,
29892,
6389,
7607,
1707,
29892,
4961,
29871,
13,
4706,
363,
3244,
297,
9717,
29901,
13,
9651,
3244,
29889,
2962,
580,
13,
4706,
363,
3244,
297,
9717,
29901,
13,
9651,
564,
2395,
23661,
3244,
29889,
7122,
580,
13,
4706,
736,
564,
2395,
13,
13,
268,
13,
13,
1678,
822,
1274,
29941,
29898,
1311,
29892,
564,
2395,
29922,
6213,
1125,
13,
4706,
565,
564,
2395,
1360,
6213,
29901,
13,
9651,
564,
2395,
29922,
1583,
29889,
11228,
29918,
279,
2395,
580,
13,
13,
4706,
1550,
29898,
2435,
29898,
279,
2395,
29897,
19216,
29900,
1125,
13,
9651,
15232,
29922,
564,
2395,
29889,
7323,
580,
13,
9651,
1060,
29922,
15232,
29961,
29900,
29962,
13,
9651,
612,
29922,
15232,
29961,
29896,
29962,
13,
9651,
565,
1583,
29889,
13478,
895,
29898,
29990,
29892,
29979,
1125,
13,
18884,
396,
361,
26554,
953,
415,
1000,
278,
5354,
310,
1060,
29892,
727,
29915,
29879,
694,
1650,
13,
18884,
565,
29898,
2435,
29898,
1311,
29889,
7247,
29961,
29990,
2314,
1275,
29871,
29900,
1125,
13,
462,
1678,
736,
7700,
13,
18884,
9717,
29922,
2636,
13,
18884,
363,
7276,
297,
1583,
29889,
13646,
29879,
29961,
29990,
5387,
13,
462,
1678,
565,
7276,
1275,
612,
29901,
13,
462,
4706,
6773,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
9717,
29889,
4397,
29898,
4899,
29879,
29898,
5182,
29922,
1583,
29889,
13478,
895,
29892,
6389,
29922,
313,
13646,
29892,
1060,
4961,
13,
13,
18884,
363,
3244,
297,
9717,
29901,
13,
462,
1678,
3244,
29889,
2962,
580,
13,
13,
18884,
363,
3244,
297,
9717,
29901,
13,
462,
1678,
565,
29898,
7097,
29889,
7122,
580,
1125,
13,
462,
4706,
565,
29898,
2435,
29898,
1311,
29889,
7247,
29961,
7097,
29889,
5085,
580,
29961,
29900,
24960,
1275,
29900,
1125,
13,
462,
9651,
736,
7700,
13,
13,
4706,
736,
5852,
4706,
13,
13,
462,
308,
13,
1678,
822,
12827,
29918,
8835,
29898,
1311,
29892,
12827,
1125,
13,
4706,
736,
7431,
29898,
465,
10194,
29897,
1275,
7431,
29898,
1311,
29889,
29879,
566,
9154,
29889,
20897,
29897,
13,
13,
1678,
822,
338,
29918,
13646,
29918,
3200,
9696,
29898,
1311,
29892,
7276,
29892,
12827,
29892,
9859,
1125,
13,
4706,
9995,
13,
4706,
674,
367,
2000,
491,
29871,
338,
29918,
3200,
9696,
740,
304,
1423,
565,
7276,
338,
9859,
470,
451,
13,
4706,
322,
565,
372,
338,
9859,
29892,
372,
29915,
29879,
12827,
881,
451,
367,
5186,
304,
9859,
13,
4706,
9995,
13,
4706,
565,
7276,
297,
12827,
29901,
13,
9651,
565,
12827,
29961,
13646,
29962,
1275,
9859,
29901,
13,
18884,
736,
7700,
13,
4706,
736,
5852,
13,
1678,
822,
338,
29918,
3200,
9696,
29898,
1311,
29892,
12827,
29892,
722,
29892,
9859,
1125,
13,
4706,
9995,
13,
4706,
12747,
565,
722,
29922,
9859,
338,
13747,
411,
278,
12827,
2309,
577,
2215,
13,
4706,
9995,
13,
4706,
9717,
29922,
5159,
13,
13,
4706,
363,
7276,
297,
1583,
29889,
13646,
29879,
29961,
1707,
5387,
13,
9651,
9717,
29889,
4397,
29898,
4899,
29879,
29898,
5182,
29922,
1583,
29889,
275,
29918,
13646,
29918,
3200,
9696,
29892,
6389,
29922,
313,
13646,
29892,
12827,
29892,
9859,
4961,
13,
13,
4706,
363,
3244,
297,
9717,
29901,
13,
9651,
3244,
29889,
2962,
580,
13,
13,
4706,
363,
3244,
297,
9717,
29901,
13,
9651,
565,
29898,
7097,
29889,
7122,
580,
1360,
7700,
1125,
13,
18884,
736,
7700,
13,
4706,
736,
5852,
13,
13,
1678,
822,
1819,
29918,
1563,
29918,
262,
29918,
7247,
29898,
1311,
29892,
11918,
1125,
13,
4706,
9995,
13,
4706,
3639,
694,
29889,
310,
1819,
2175,
297,
278,
5354,
310,
278,
2286,
13,
4706,
9995,
13,
4706,
736,
7431,
29898,
1311,
29889,
7247,
29961,
11918,
2314,
13,
13,
1678,
822,
1831,
29918,
348,
465,
12961,
29918,
11918,
29898,
1311,
29892,
12827,
1125,
13,
4706,
9995,
13,
4706,
1334,
29915,
645,
6755,
278,
2286,
393,
756,
3203,
1950,
1819,
2175,
297,
372,
29915,
29879,
5354,
13,
4706,
9995,
13,
4706,
9717,
29922,
2636,
13,
4706,
5354,
29918,
5975,
29922,
9657,
580,
13,
4706,
363,
2286,
297,
1583,
29889,
29879,
566,
9154,
29889,
20897,
29901,
13,
9651,
565,
2286,
451,
297,
12827,
29901,
13,
18884,
9717,
29889,
4397,
29898,
4899,
29879,
29898,
5182,
29922,
1583,
29889,
5975,
29918,
1563,
29918,
262,
29918,
7247,
29892,
6389,
7607,
11918,
29892,
4961,
13,
4706,
363,
3244,
297,
9717,
29901,
13,
9651,
3244,
29889,
2962,
580,
13,
13,
4706,
363,
3244,
297,
9717,
29901,
13,
9651,
5354,
29918,
5975,
29961,
7097,
29889,
5085,
580,
29961,
29900,
5262,
353,
3244,
29889,
7122,
580,
13,
13,
4706,
736,
12705,
29898,
7247,
29918,
5975,
29892,
1820,
29922,
5354,
29918,
5975,
29889,
657,
9601,
29900,
29962,
13,
13,
1678,
822,
694,
29918,
974,
29918,
13646,
29879,
29898,
1311,
29892,
995,
29892,
12827,
29892,
722,
1125,
13,
4706,
9995,
13,
4706,
674,
367,
2000,
491,
1797,
29918,
7247,
29918,
5975,
740,
304,
2302,
278,
694,
29889,
310,
640,
5270,
29879,
722,
29922,
995,
15223,
373,
278,
7152,
29876,
2470,
310,
722,
13,
4706,
9995,
13,
4706,
2302,
353,
29900,
13,
4706,
363,
7276,
297,
1583,
29889,
13646,
29879,
29961,
1707,
5387,
13,
9651,
565,
995,
297,
1583,
29889,
7247,
29961,
13646,
5387,
13,
18884,
2302,
23661,
29896,
13,
13,
4706,
736,
2302,
13,
13,
1678,
822,
1797,
29918,
7247,
29918,
5975,
29898,
1311,
29892,
12827,
29892,
722,
1125,
13,
4706,
9995,
13,
4706,
11299,
278,
5354,
310,
278,
2286,
722,
5034,
304,
278,
11938,
372,
15223,
373,
372,
29915,
29879,
22092,
2470,
13,
4706,
9995,
13,
4706,
1353,
29918,
3075,
22042,
29922,
9657,
580,
13,
4706,
9717,
29922,
5159,
13,
4706,
363,
995,
297,
1583,
29889,
7247,
29961,
1707,
5387,
13,
9651,
9717,
29889,
4397,
29898,
4899,
29879,
29898,
5182,
29922,
1583,
29889,
1217,
29918,
974,
29918,
13646,
29879,
29892,
6389,
29922,
313,
1767,
29892,
12827,
29892,
722,
4961,
13,
4706,
363,
3244,
297,
9717,
29901,
13,
9651,
3244,
29889,
2962,
580,
13,
13,
4706,
363,
3244,
297,
9717,
29901,
13,
9651,
1353,
29918,
3075,
22042,
29961,
7097,
29889,
5085,
580,
29961,
29900,
5262,
353,
3244,
29889,
7122,
580,
13,
4706,
736,
12705,
29898,
4537,
29918,
3075,
22042,
29892,
1820,
29922,
1353,
29918,
3075,
22042,
29889,
657,
29897,
13,
13,
1678,
822,
1250,
11294,
29898,
1311,
29892,
12827,
1125,
13,
4706,
565,
1583,
29889,
465,
10194,
29918,
8835,
29898,
465,
10194,
1125,
13,
9651,
736,
12827,
13,
4706,
722,
29922,
1583,
29889,
2622,
29918,
348,
465,
12961,
29918,
11918,
29898,
465,
10194,
29897,
13,
4706,
363,
995,
297,
1583,
29889,
2098,
29918,
7247,
29918,
5975,
29898,
465,
10194,
29892,
722,
1125,
13,
9651,
565,
1583,
29889,
275,
29918,
3200,
9696,
29898,
465,
10194,
29892,
722,
29892,
995,
1125,
13,
18884,
12827,
29961,
1707,
13192,
995,
13,
18884,
396,
29885,
6926,
10115,
2063,
515,
716,
12827,
411,
1274,
29941,
13,
18884,
564,
2395,
29922,
17288,
13646,
29892,
722,
29897,
363,
7276,
297,
1583,
29889,
13646,
29879,
29961,
1707,
29962,
29871,
13,
462,
4706,
565,
7276,
451,
297,
12827,
29962,
13,
18884,
396,
5675,
263,
3509,
310,
21904,
1434,
5432,
1274,
29941,
577,
393,
3620,
304,
21904,
508,
367,
29538,
287,
565,
4312,
13,
18884,
260,
29896,
29922,
10480,
29879,
29898,
5182,
29922,
6483,
8552,
29892,
6389,
29922,
313,
1311,
29889,
7247,
29892,
876,
13,
18884,
260,
29896,
29889,
2962,
580,
13,
18884,
565,
1583,
29889,
562,
29941,
29898,
279,
2395,
29922,
564,
2395,
1125,
13,
462,
1678,
1121,
353,
1583,
29889,
1627,
11294,
29898,
465,
10194,
29897,
13,
462,
1678,
565,
1121,
2804,
6213,
29901,
13,
462,
4706,
736,
1121,
13,
18884,
12827,
29961,
1707,
1822,
5992,
29898,
1767,
29897,
13,
18884,
1583,
29889,
3129,
2708,
29922,
260,
29896,
29889,
7122,
580,
13,
4706,
736,
6213,
13,
268,
13,
1678,
822,
1596,
29918,
465,
10194,
29898,
1311,
29892,
12827,
1125,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
1311,
29889,
29879,
566,
9154,
29889,
23905,
22164,
13,
9651,
565,
474,
29995,
29941,
1360,
29900,
322,
474,
19216,
29900,
29901,
13,
18884,
1596,
703,
29899,
448,
448,
448,
448,
448,
448,
448,
1159,
13,
13,
9651,
363,
432,
297,
3464,
29898,
2435,
29898,
1311,
29889,
29879,
566,
9154,
29889,
23905,
29961,
29875,
12622,
29901,
13,
18884,
565,
432,
29995,
29941,
1360,
29900,
322,
432,
19216,
29900,
29901,
13,
462,
1678,
1596,
703,
891,
9162,
1095,
543,
1159,
13,
18884,
565,
432,
1360,
29947,
29901,
13,
462,
1678,
565,
29898,
1311,
29889,
29879,
566,
9154,
29889,
23905,
29961,
29875,
3816,
29926,
29962,
1360,
29915,
29900,
29374,
13,
462,
4706,
1596,
29898,
465,
10194,
29961,
16174,
29898,
29875,
29922,
29875,
29892,
432,
29922,
29926,
29897,
2314,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
1596,
29898,
1311,
29889,
29879,
566,
9154,
29889,
23905,
29961,
29875,
3816,
29926,
2314,
13,
18884,
1683,
29901,
13,
462,
1678,
565,
29898,
1311,
29889,
29879,
566,
9154,
29889,
23905,
29961,
29875,
3816,
29926,
29962,
1360,
29915,
29900,
29374,
13,
462,
4706,
1596,
29898,
710,
29898,
465,
10194,
29961,
16174,
29898,
29875,
29922,
29875,
29892,
432,
29922,
29926,
29897,
2314,
718,
376,
9162,
1095,
29922,
5124,
1723,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
1596,
29898,
710,
29898,
1311,
29889,
29879,
566,
9154,
29889,
23905,
29961,
29875,
3816,
29926,
2314,
718,
376,
376,
1919,
1095,
543,
1159,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
5053,
9154,
29922,
8383,
9154,
703,
17199,
29879,
29914,
29945,
29889,
3945,
1159,
13,
268,
13,
1678,
907,
1061,
29922,
8383,
9154,
9832,
1008,
29898,
29879,
566,
9154,
29897,
13,
1678,
12827,
29922,
907,
1061,
29889,
2929,
345,
580,
13,
1678,
907,
1061,
29889,
2158,
29918,
465,
10194,
29898,
465,
10194,
29897,
13,
13,
1678,
1596,
29898,
465,
10194,
29961,
16174,
29898,
29900,
29892,
29900,
29897,
2314,
13,
268,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1667,
580,
13,
13,
2
] |
airbnb/app.py | serinamarie/Saltiest-Hackers | 0 | 190382 | <filename>airbnb/app.py<gh_stars>0
from flask import Flask, request
def create_app():
app = Flask(__name__)
@app.route('/')
def root():
return 'airbnb predictive project'
@app.route('/predict', methods=['POST'])
def predict(message=""):
try:
# find authorization header
content = request.get_json(force=True)
message = f'POST response recieved: {content}'
# prediction = get_predicted_price(content)
except Exception as identifier:
message = f'error: {identifier}'
return message
return app
# FLASK_APP=airbnb:APP FLASK_ENV=development flask run
# def tokenize(text):
# return [
# token for token in simple_preprocess(text) if token not in STOPWORDS
# ]
# @app.route('/', methods=['POST', 'GET'])
# def responses():
# response = requests.get(
# 'backendurlhere')
# return str(response.text)
# @app.route('/api', methods=['POST', 'GET'])
# def predict():
# data = request.get_json(force=True)
# desc = data['feature'][0]['description']
# description_length = len(tokenize(desc))
| [
1,
529,
9507,
29958,
1466,
29890,
9877,
29914,
932,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
29784,
1053,
2379,
1278,
29892,
2009,
13,
13,
1753,
1653,
29918,
932,
7295,
13,
1678,
623,
353,
2379,
1278,
22168,
978,
1649,
29897,
13,
13,
1678,
732,
932,
29889,
13134,
11219,
1495,
13,
1678,
822,
3876,
7295,
13,
4706,
736,
525,
1466,
29890,
9877,
8500,
573,
2060,
29915,
13,
13,
1678,
732,
932,
29889,
13134,
11219,
27711,
742,
3519,
29922,
1839,
5438,
11287,
13,
1678,
822,
8500,
29898,
4906,
13776,
1125,
13,
4706,
1018,
29901,
13,
9651,
396,
1284,
28733,
4839,
13,
9651,
2793,
353,
2009,
29889,
657,
29918,
3126,
29898,
10118,
29922,
5574,
29897,
13,
9651,
2643,
353,
285,
29915,
5438,
2933,
1162,
6402,
29901,
426,
3051,
10162,
13,
9651,
396,
18988,
353,
679,
29918,
11965,
18186,
29918,
9175,
29898,
3051,
29897,
13,
4706,
5174,
8960,
408,
15882,
29901,
13,
9651,
2643,
353,
285,
29915,
2704,
29901,
426,
25378,
10162,
13,
4706,
736,
2643,
13,
268,
13,
1678,
736,
623,
13,
13,
29937,
29871,
383,
29931,
3289,
29968,
29918,
20576,
29922,
1466,
29890,
9877,
29901,
20576,
383,
29931,
3289,
29968,
29918,
25838,
29922,
25431,
29784,
1065,
29871,
13,
13,
29937,
822,
5993,
675,
29898,
726,
1125,
13,
29937,
268,
736,
518,
13,
29937,
308,
5993,
363,
5993,
297,
2560,
29918,
1457,
5014,
29898,
726,
29897,
565,
5993,
451,
297,
6850,
4590,
11686,
8452,
13,
29937,
308,
4514,
13,
29937,
732,
932,
29889,
13134,
11219,
742,
3519,
29922,
1839,
5438,
742,
525,
7194,
11287,
13,
29937,
822,
20890,
7295,
13,
29937,
268,
2933,
353,
7274,
29889,
657,
29898,
13,
29937,
308,
525,
27852,
2271,
4150,
1495,
13,
29937,
268,
736,
851,
29898,
5327,
29889,
726,
29897,
13,
29937,
732,
932,
29889,
13134,
11219,
2754,
742,
3519,
29922,
1839,
5438,
742,
525,
7194,
11287,
13,
29937,
822,
8500,
7295,
13,
29937,
268,
848,
353,
2009,
29889,
657,
29918,
3126,
29898,
10118,
29922,
5574,
29897,
13,
29937,
268,
5153,
353,
848,
1839,
14394,
2033,
29961,
29900,
22322,
8216,
2033,
13,
29937,
268,
6139,
29918,
2848,
353,
7431,
29898,
6979,
675,
29898,
14273,
876,
13,
2
] |
accounts/migrations/0004_auto_20210517_1624.py | bencko/test_blog_api | 0 | 120781 | <filename>accounts/migrations/0004_auto_20210517_1624.py
# Generated by Django 3.2.3 on 2021-05-17 16:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0003_auto_20210517_1623'),
]
operations = [
migrations.RemoveField(
model_name='subscribeslist',
name='subscribed_to',
),
migrations.AddField(
model_name='subscribeslist',
name='subscribed_to',
field=models.ManyToManyField(blank=True, to='accounts.Subscribe'),
),
]
| [
1,
529,
9507,
29958,
10149,
29879,
29914,
26983,
800,
29914,
29900,
29900,
29900,
29946,
29918,
6921,
29918,
29906,
29900,
29906,
29896,
29900,
29945,
29896,
29955,
29918,
29896,
29953,
29906,
29946,
29889,
2272,
13,
29937,
3251,
630,
491,
15337,
29871,
29941,
29889,
29906,
29889,
29941,
373,
29871,
29906,
29900,
29906,
29896,
29899,
29900,
29945,
29899,
29896,
29955,
29871,
29896,
29953,
29901,
29906,
29946,
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,
10149,
29879,
742,
525,
29900,
29900,
29900,
29941,
29918,
6921,
29918,
29906,
29900,
29906,
29896,
29900,
29945,
29896,
29955,
29918,
29896,
29953,
29906,
29941,
5477,
13,
1678,
4514,
13,
13,
1678,
6931,
353,
518,
13,
4706,
9725,
800,
29889,
15941,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
1491,
7588,
5707,
1761,
742,
13,
9651,
1024,
2433,
1491,
7588,
2580,
29918,
517,
742,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
2528,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
1491,
7588,
5707,
1761,
742,
13,
9651,
1024,
2433,
1491,
7588,
2580,
29918,
517,
742,
13,
9651,
1746,
29922,
9794,
29889,
14804,
1762,
14804,
3073,
29898,
19465,
29922,
5574,
29892,
304,
2433,
10149,
29879,
29889,
4035,
13086,
5477,
13,
4706,
10353,
13,
1678,
4514,
13,
2
] |
Core/brainSeg/__init__.py | YongLiuLab/BrainRadiomicsTools | 10 | 83548 | from . brainSeg import brainSeg | [
1,
515,
869,
17294,
17669,
1053,
17294,
17669,
2
] |
storm/stock/models.py | GaretJax/storm-erp | 0 | 186297 | import sqlalchemy as sa
from sqlalchemy.orm import relationship, backref, object_session
from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.ext.declarative import declarative_base
from storm.database import mptt
Model = declarative_base()
class Location(mptt.MPTTBase, Model):
"""
A named location for some stock units.
"""
__tablename__ = 'storm_stock_location'
id = sa.Column(sa.Integer, primary_key=True)
name = sa.Column(sa.Unicode, nullable=False)
type = sa.Column(sa.String(50), nullable=True)
__mapper_args__ = {
'polymorphic_identity': None,
'polymorphic_on': type,
}
def __init__(self, name, parent=None):
self.name = name
if parent is not None:
self.parent = parent
def __repr__(self):
return 'Location({})'.format(self.name)
def stock_of(self, stock_unit, lot=None, virtual=False,
include_sublocations=False):
session = object_session(self)
quant_query = (session.query(sa.func.sum(Quant.quantity))
.select_from(Quant)
.filter(Quant.stock_unit == stock_unit))
if lot:
assert lot.stock_unit == stock_unit
quant_query = quant_query.filter(Quant.lot == lot)
if not include_sublocations:
quant_query = quant_query.filter(Quant.location == self)
else:
quant_query = quant_query.join(Location).filter(
mptt.descendants(self, include_self=True))
real = quant_query.scalar() or 0
if virtual:
moves_query = (session.query(sa.func.sum(Move.quantity))
.filter((Move.stock_unit == stock_unit) &
(Move.scheduled == True) & # NOQA
(Move.executed == False)))
if lot:
moves_query = moves_query.filter(Move.lot == lot)
if not include_sublocations:
moves_in_query = moves_query.filter(Move.target == self)
moves_out_query = moves_query.filter(Move.source == self)
else:
moves_query = moves_query.filter(
mptt.descendants(self, include_self=True))
moves_in_query = moves_query.join(Move.target)
moves_out_query = moves_query.join(Move.source)
quantities = session.query(
moves_in_query.as_scalar(),
moves_out_query.as_scalar()
)
moved_in, moved_out = quantities.one()
virtual = (moved_in or 0) - (moved_out or 0)
else:
virtual = 0
return real + virtual
class Warehouse(Location):
"""
A specialization of a location which acts as a wharehouse.
"""
__tablename__ = 'storm_stock_warehouse'
__table_args__ = tuple()
id = sa.Column(sa.Integer,
sa.ForeignKey(Location.id, onupdate='CASCADE',
ondelete='CASCADE'),
primary_key=True)
__mapper_args__ = {
'polymorphic_identity': 'warehouse',
}
def __repr__(self):
return 'Warehouse({})'.format(self.name)
class StockUnit(Model):
"""
Materialization of a specific product for organizational purposes in a
single organization.
"""
__tablename__ = 'storm_stock_unit'
id = sa.Column(sa.Integer, primary_key=True)
sku = sa.Column(sa.String(64), nullable=False, unique=True)
# TODO: measurement_quantity = sa.Column(...), normalized to SI -> custom
# in its own table (piece, carton, box, pallet,...)
# ref to item/product (upc -> on product)
def in_stock(self, location, virtual=False, include_sublocations=False):
return location.stock_of(self, virtual=virtual,
include_sublocations=include_sublocations)
class Lot(Model):
"""
A production lot is a set of items of the same type which have identical
traceability characteristics (e.g. quality, serial number, ...).
"""
__tablename__ = 'storm_stock_lot'
__table_args__ = (
sa.UniqueConstraint('stock_unit_id', 'serial'),
)
id = sa.Column(sa.Integer, primary_key=True)
stock_unit_id = sa.Column(sa.Integer, sa.ForeignKey(StockUnit.id),
nullable=False, index=True)
serial = sa.Column(sa.String(120), nullable=True)
quantity = sa.Column(sa.Numeric(18, 6), nullable=False)
# TODO: add a cost here?
# timestamp
stock_unit = relationship(StockUnit)
def in_stock(self, location, virtual=False, include_sublocations=False):
return location.stock_of(self.stock_unit, lot=self, virtual=virtual,
include_sublocations=include_sublocations)
class Batch(Model):
__tablename__ = 'storm_stock_batch'
id = sa.Column(sa.Integer, primary_key=True)
def schedule(self):
"""
Schedule the moves belonging to this batch by assigning concrete
locations and lots.
"""
self.moves.update({'scheduled': True}, synchronize_session='fetch')
def apply(self):
"""
Apply already scheduled stock moves by updating the quants.
"""
session = object_session(self)
with session.begin_nested():
for m in self.moves:
assert m.scheduled
if not m.quantity: # NOCOV
continue
table = Quant.__table__
query = (table.update()
.returning(table.c.id, table.c.quantity)
.where((table.c.location_id == m.source.id) &
(table.c.lot_id == m.lot.id))
.values(quantity=table.c.quantity - m.quantity))
source_quant = session.execute(query).fetchone()
if not source_quant:
session.add(Quant(
location=m.source,
lot=m.lot,
quantity=-m.quantity
))
query = (table.update()
.returning(table.c.id, table.c.quantity)
.where((table.c.location_id == m.target.id) &
(table.c.lot_id == m.lot.id))
.values(quantity=table.c.quantity + m.quantity))
target_quant = session.execute(query).fetchone()
if not target_quant:
session.add(Quant(
location=m.target,
lot=m.lot,
quantity=m.quantity
))
session.flush()
self.moves.update({'executed': True}, synchronize_session='fetch')
session.query(Quant).filter(Quant.quantity == 0).delete()
# class BatchStatus(states.StatusMixin, Model):
# __tablename__ = 'storm_stock_batch_status'
# __stateful_args__ = {
# 'relation': Batch,
# }
class Move(Model):
"""
A movement of a certain quantity of stock units belonging to a lot, from a
location to another one.
This relation has a minor denormalization on stock units + lots in order to
support automatic lot selection on move scheduling.
"""
__tablename__ = 'storm_stock_move'
id = sa.Column(sa.Integer, primary_key=True)
batch_id = sa.Column(sa.Integer, sa.ForeignKey(Batch.id), nullable=False)
source_location_id = sa.Column(sa.Integer, sa.ForeignKey(Location.id),
nullable=False)
target_location_id = sa.Column(sa.Integer, sa.ForeignKey(Location.id),
nullable=False)
stock_unit_id = sa.Column(sa.Integer, sa.ForeignKey(StockUnit.id),
nullable=False)
lot_id = sa.Column(sa.Integer, sa.ForeignKey(Lot.id), nullable=True)
quantity = sa.Column(sa.Numeric(18, 6), nullable=False)
scheduled = sa.Column(sa.Boolean, default=False)
executed = sa.Column(sa.Boolean, default=False)
batch = relationship(Batch, backref=backref('moves', lazy='dynamic'))
source = relationship(Location, foreign_keys=source_location_id,
backref=backref('moves_from'))
target = relationship(Location, foreign_keys=target_location_id,
backref=backref('moves_to'))
stock_unit = relationship(StockUnit, backref=backref('moves'))
lot = relationship(Lot, backref=backref('moves'))
__table_args__ = (
sa.UniqueConstraint('batch_id',
'source_location_id', 'target_location_id',
'stock_unit_id', 'lot_id'),
# postgresql_where=lot != None),
# sa.UniqueConstraint('batch_id',
# 'source_location_id', 'target_location_id',
# 'stock_unit_id',
# postgresql_where=lot == None),
# https://bitbucket.org/zzzeek/sqlalchemy/issue/3161/
)
class Quant(Model):
"""
The amount of products belonging to a certain lot in a given location.
"""
__tablename__ = 'storm_stock_quant'
__table_args__ = (
sa.UniqueConstraint('location_id', 'lot_id'),
)
id = sa.Column(sa.Integer, primary_key=True)
location_id = sa.Column(sa.Integer, sa.ForeignKey(Location.id),
nullable=False)
lot_id = sa.Column(sa.Integer, sa.ForeignKey(Lot.id), nullable=True)
quantity = sa.Column(sa.Numeric(18, 6), nullable=False)
location = relationship(Location, backref=backref('quants'))
lot = relationship(Lot, backref=backref('quants'))
stock_unit = association_proxy('lot', 'stock_unit')
# product
# (cost/price/value)
# owner
| [
1,
1053,
4576,
284,
305,
6764,
408,
872,
13,
3166,
4576,
284,
305,
6764,
29889,
555,
1053,
9443,
29892,
1250,
999,
29892,
1203,
29918,
7924,
13,
3166,
4576,
284,
305,
6764,
29889,
1062,
29889,
21264,
362,
14701,
1053,
15477,
29918,
14701,
13,
3166,
4576,
284,
305,
6764,
29889,
1062,
29889,
311,
16544,
1230,
1053,
7669,
1230,
29918,
3188,
13,
13,
3166,
14280,
29889,
9803,
1053,
286,
415,
29873,
13,
13,
13,
3195,
353,
7669,
1230,
29918,
3188,
580,
13,
13,
13,
1990,
17015,
29898,
29885,
415,
29873,
29889,
3580,
19988,
5160,
29892,
8125,
1125,
13,
1678,
9995,
13,
1678,
319,
4257,
4423,
363,
777,
10961,
10340,
29889,
13,
1678,
9995,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
303,
555,
29918,
17712,
29918,
5479,
29915,
13,
13,
1678,
1178,
353,
872,
29889,
4409,
29898,
4977,
29889,
7798,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
1024,
353,
872,
29889,
4409,
29898,
4977,
29889,
2525,
12858,
29892,
1870,
519,
29922,
8824,
29897,
13,
1678,
1134,
353,
872,
29889,
4409,
29898,
4977,
29889,
1231,
29898,
29945,
29900,
511,
1870,
519,
29922,
5574,
29897,
13,
13,
1678,
4770,
655,
2496,
29918,
5085,
1649,
353,
426,
13,
4706,
525,
3733,
962,
5676,
293,
29918,
22350,
2396,
6213,
29892,
13,
4706,
525,
3733,
962,
5676,
293,
29918,
265,
2396,
1134,
29892,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
29892,
3847,
29922,
8516,
1125,
13,
4706,
1583,
29889,
978,
353,
1024,
13,
4706,
565,
3847,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
3560,
353,
3847,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
736,
525,
6508,
3319,
1800,
4286,
4830,
29898,
1311,
29889,
978,
29897,
13,
13,
1678,
822,
10961,
29918,
974,
29898,
1311,
29892,
10961,
29918,
5441,
29892,
3287,
29922,
8516,
29892,
6901,
29922,
8824,
29892,
13,
462,
3160,
29918,
1491,
2029,
800,
29922,
8824,
1125,
13,
4706,
4867,
353,
1203,
29918,
7924,
29898,
1311,
29897,
13,
4706,
4323,
29918,
1972,
353,
313,
7924,
29889,
1972,
29898,
4977,
29889,
9891,
29889,
2083,
29898,
22930,
29889,
22640,
876,
13,
462,
539,
869,
2622,
29918,
3166,
29898,
22930,
29897,
13,
462,
539,
869,
4572,
29898,
22930,
29889,
17712,
29918,
5441,
1275,
10961,
29918,
5441,
876,
13,
13,
4706,
565,
3287,
29901,
13,
9651,
4974,
3287,
29889,
17712,
29918,
5441,
1275,
10961,
29918,
5441,
13,
9651,
4323,
29918,
1972,
353,
4323,
29918,
1972,
29889,
4572,
29898,
22930,
29889,
8276,
1275,
3287,
29897,
13,
13,
4706,
565,
451,
3160,
29918,
1491,
2029,
800,
29901,
13,
9651,
4323,
29918,
1972,
353,
4323,
29918,
1972,
29889,
4572,
29898,
22930,
29889,
5479,
1275,
1583,
29897,
13,
4706,
1683,
29901,
13,
9651,
4323,
29918,
1972,
353,
4323,
29918,
1972,
29889,
7122,
29898,
6508,
467,
4572,
29898,
13,
18884,
286,
415,
29873,
29889,
14273,
355,
1934,
29898,
1311,
29892,
3160,
29918,
1311,
29922,
5574,
876,
13,
13,
4706,
1855,
353,
4323,
29918,
1972,
29889,
19529,
279,
580,
470,
29871,
29900,
13,
13,
4706,
565,
6901,
29901,
13,
9651,
16229,
29918,
1972,
353,
313,
7924,
29889,
1972,
29898,
4977,
29889,
9891,
29889,
2083,
29898,
16619,
29889,
22640,
876,
13,
462,
965,
869,
4572,
3552,
16619,
29889,
17712,
29918,
5441,
1275,
10961,
29918,
5441,
29897,
669,
13,
462,
462,
259,
313,
16619,
29889,
816,
14989,
1275,
5852,
29897,
669,
29871,
396,
11698,
29984,
29909,
13,
462,
462,
259,
313,
16619,
29889,
4258,
3860,
1275,
7700,
4961,
13,
13,
9651,
565,
3287,
29901,
13,
18884,
16229,
29918,
1972,
353,
16229,
29918,
1972,
29889,
4572,
29898,
16619,
29889,
8276,
1275,
3287,
29897,
13,
13,
9651,
565,
451,
3160,
29918,
1491,
2029,
800,
29901,
13,
18884,
16229,
29918,
262,
29918,
1972,
353,
16229,
29918,
1972,
29889,
4572,
29898,
16619,
29889,
5182,
1275,
1583,
29897,
13,
18884,
16229,
29918,
449,
29918,
1972,
353,
16229,
29918,
1972,
29889,
4572,
29898,
16619,
29889,
4993,
1275,
1583,
29897,
13,
9651,
1683,
29901,
13,
18884,
16229,
29918,
1972,
353,
16229,
29918,
1972,
29889,
4572,
29898,
13,
462,
1678,
286,
415,
29873,
29889,
14273,
355,
1934,
29898,
1311,
29892,
3160,
29918,
1311,
29922,
5574,
876,
13,
18884,
16229,
29918,
262,
29918,
1972,
353,
16229,
29918,
1972,
29889,
7122,
29898,
16619,
29889,
5182,
29897,
13,
18884,
16229,
29918,
449,
29918,
1972,
353,
16229,
29918,
1972,
29889,
7122,
29898,
16619,
29889,
4993,
29897,
13,
13,
9651,
26855,
353,
4867,
29889,
1972,
29898,
13,
18884,
16229,
29918,
262,
29918,
1972,
29889,
294,
29918,
19529,
279,
3285,
13,
18884,
16229,
29918,
449,
29918,
1972,
29889,
294,
29918,
19529,
279,
580,
13,
9651,
1723,
13,
9651,
6153,
29918,
262,
29892,
6153,
29918,
449,
353,
26855,
29889,
650,
580,
13,
9651,
6901,
353,
313,
29885,
8238,
29918,
262,
470,
29871,
29900,
29897,
448,
313,
29885,
8238,
29918,
449,
470,
29871,
29900,
29897,
13,
4706,
1683,
29901,
13,
9651,
6901,
353,
29871,
29900,
13,
13,
4706,
736,
1855,
718,
6901,
13,
13,
13,
1990,
399,
598,
8697,
29898,
6508,
1125,
13,
1678,
9995,
13,
1678,
319,
4266,
2133,
310,
263,
4423,
607,
14741,
408,
263,
377,
598,
8697,
29889,
13,
1678,
9995,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
303,
555,
29918,
17712,
29918,
2519,
8697,
29915,
13,
1678,
4770,
2371,
29918,
5085,
1649,
353,
18761,
580,
13,
13,
1678,
1178,
353,
872,
29889,
4409,
29898,
4977,
29889,
7798,
29892,
13,
462,
259,
872,
29889,
27755,
2558,
29898,
6508,
29889,
333,
29892,
373,
5504,
2433,
29907,
3289,
5454,
2287,
742,
13,
462,
462,
373,
8143,
2433,
29907,
3289,
5454,
2287,
5477,
13,
462,
259,
7601,
29918,
1989,
29922,
5574,
29897,
13,
13,
1678,
4770,
655,
2496,
29918,
5085,
1649,
353,
426,
13,
4706,
525,
3733,
962,
5676,
293,
29918,
22350,
2396,
525,
2519,
8697,
742,
13,
1678,
500,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
736,
525,
29956,
598,
8697,
3319,
1800,
4286,
4830,
29898,
1311,
29889,
978,
29897,
13,
13,
13,
1990,
10224,
8325,
29898,
3195,
1125,
13,
1678,
9995,
13,
1678,
17582,
2133,
310,
263,
2702,
3234,
363,
8674,
1288,
11976,
297,
263,
13,
1678,
2323,
13013,
29889,
13,
1678,
9995,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
303,
555,
29918,
17712,
29918,
5441,
29915,
13,
13,
1678,
1178,
353,
872,
29889,
4409,
29898,
4977,
29889,
7798,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
2071,
29884,
353,
872,
29889,
4409,
29898,
4977,
29889,
1231,
29898,
29953,
29946,
511,
1870,
519,
29922,
8824,
29892,
5412,
29922,
5574,
29897,
13,
1678,
396,
14402,
29901,
20039,
29918,
22640,
353,
872,
29889,
4409,
19327,
511,
4226,
1891,
304,
22717,
1599,
2888,
13,
1678,
396,
297,
967,
1914,
1591,
313,
12343,
346,
29892,
7774,
265,
29892,
3800,
29892,
5112,
1026,
29892,
11410,
13,
1678,
396,
2143,
304,
2944,
29914,
4704,
313,
786,
29883,
1599,
373,
3234,
29897,
13,
13,
1678,
822,
297,
29918,
17712,
29898,
1311,
29892,
4423,
29892,
6901,
29922,
8824,
29892,
3160,
29918,
1491,
2029,
800,
29922,
8824,
1125,
13,
4706,
736,
4423,
29889,
17712,
29918,
974,
29898,
1311,
29892,
6901,
29922,
18714,
29892,
13,
462,
462,
3160,
29918,
1491,
2029,
800,
29922,
2856,
29918,
1491,
2029,
800,
29897,
13,
13,
13,
1990,
20815,
29898,
3195,
1125,
13,
1678,
9995,
13,
1678,
319,
5802,
3287,
338,
263,
731,
310,
4452,
310,
278,
1021,
1134,
607,
505,
13557,
13,
1678,
9637,
3097,
21862,
313,
29872,
29889,
29887,
29889,
11029,
29892,
7797,
1353,
29892,
2023,
467,
13,
1678,
9995,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
303,
555,
29918,
17712,
29918,
8276,
29915,
13,
1678,
4770,
2371,
29918,
5085,
1649,
353,
313,
13,
4706,
872,
29889,
8110,
802,
21529,
877,
17712,
29918,
5441,
29918,
333,
742,
525,
15550,
5477,
13,
1678,
1723,
13,
13,
1678,
1178,
353,
872,
29889,
4409,
29898,
4977,
29889,
7798,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
10961,
29918,
5441,
29918,
333,
353,
872,
29889,
4409,
29898,
4977,
29889,
7798,
29892,
872,
29889,
27755,
2558,
29898,
20754,
384,
8325,
29889,
333,
511,
13,
462,
795,
1870,
519,
29922,
8824,
29892,
2380,
29922,
5574,
29897,
13,
1678,
7797,
353,
872,
29889,
4409,
29898,
4977,
29889,
1231,
29898,
29896,
29906,
29900,
511,
1870,
519,
29922,
5574,
29897,
13,
1678,
14728,
353,
872,
29889,
4409,
29898,
4977,
29889,
29940,
25099,
29898,
29896,
29947,
29892,
29871,
29953,
511,
1870,
519,
29922,
8824,
29897,
13,
1678,
396,
14402,
29901,
788,
263,
3438,
1244,
29973,
13,
1678,
396,
14334,
13,
13,
1678,
10961,
29918,
5441,
353,
9443,
29898,
20754,
384,
8325,
29897,
13,
13,
1678,
822,
297,
29918,
17712,
29898,
1311,
29892,
4423,
29892,
6901,
29922,
8824,
29892,
3160,
29918,
1491,
2029,
800,
29922,
8824,
1125,
13,
4706,
736,
4423,
29889,
17712,
29918,
974,
29898,
1311,
29889,
17712,
29918,
5441,
29892,
3287,
29922,
1311,
29892,
6901,
29922,
18714,
29892,
13,
462,
462,
3160,
29918,
1491,
2029,
800,
29922,
2856,
29918,
1491,
2029,
800,
29897,
13,
13,
13,
1990,
350,
905,
29898,
3195,
1125,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
303,
555,
29918,
17712,
29918,
16175,
29915,
13,
13,
1678,
1178,
353,
872,
29889,
4409,
29898,
4977,
29889,
7798,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
13,
1678,
822,
20410,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
1102,
11272,
278,
16229,
23329,
304,
445,
9853,
491,
23188,
18387,
13,
4706,
14354,
322,
14568,
29889,
13,
4706,
9995,
13,
4706,
1583,
29889,
13529,
267,
29889,
5504,
3319,
29915,
816,
14989,
2396,
5852,
1118,
12231,
675,
29918,
7924,
2433,
9155,
1495,
13,
13,
1678,
822,
3394,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
2401,
368,
2307,
21467,
10961,
16229,
491,
13271,
278,
439,
1934,
29889,
13,
4706,
9995,
13,
4706,
4867,
353,
1203,
29918,
7924,
29898,
1311,
29897,
13,
13,
4706,
411,
4867,
29889,
463,
29918,
27420,
7295,
13,
9651,
363,
286,
297,
1583,
29889,
13529,
267,
29901,
13,
18884,
4974,
286,
29889,
816,
14989,
13,
18884,
565,
451,
286,
29889,
22640,
29901,
29871,
396,
11698,
3217,
29963,
13,
462,
1678,
6773,
13,
13,
18884,
1591,
353,
22746,
17255,
2371,
1649,
13,
13,
18884,
2346,
353,
313,
2371,
29889,
5504,
580,
13,
462,
308,
869,
2457,
292,
29898,
2371,
29889,
29883,
29889,
333,
29892,
1591,
29889,
29883,
29889,
22640,
29897,
13,
462,
308,
869,
3062,
3552,
2371,
29889,
29883,
29889,
5479,
29918,
333,
1275,
286,
29889,
4993,
29889,
333,
29897,
669,
13,
462,
18884,
313,
2371,
29889,
29883,
29889,
8276,
29918,
333,
1275,
286,
29889,
8276,
29889,
333,
876,
13,
462,
308,
869,
5975,
29898,
22640,
29922,
2371,
29889,
29883,
29889,
22640,
448,
286,
29889,
22640,
876,
13,
18884,
2752,
29918,
12150,
353,
4867,
29889,
7978,
29898,
1972,
467,
9155,
650,
580,
13,
18884,
565,
451,
2752,
29918,
12150,
29901,
13,
462,
1678,
4867,
29889,
1202,
29898,
22930,
29898,
13,
462,
4706,
4423,
29922,
29885,
29889,
4993,
29892,
13,
462,
4706,
3287,
29922,
29885,
29889,
8276,
29892,
13,
462,
4706,
14728,
10457,
29885,
29889,
22640,
13,
462,
268,
876,
13,
13,
18884,
2346,
353,
313,
2371,
29889,
5504,
580,
13,
462,
308,
869,
2457,
292,
29898,
2371,
29889,
29883,
29889,
333,
29892,
1591,
29889,
29883,
29889,
22640,
29897,
13,
462,
308,
869,
3062,
3552,
2371,
29889,
29883,
29889,
5479,
29918,
333,
1275,
286,
29889,
5182,
29889,
333,
29897,
669,
13,
462,
18884,
313,
2371,
29889,
29883,
29889,
8276,
29918,
333,
1275,
286,
29889,
8276,
29889,
333,
876,
13,
462,
308,
869,
5975,
29898,
22640,
29922,
2371,
29889,
29883,
29889,
22640,
718,
286,
29889,
22640,
876,
13,
18884,
3646,
29918,
12150,
353,
4867,
29889,
7978,
29898,
1972,
467,
9155,
650,
580,
13,
18884,
565,
451,
3646,
29918,
12150,
29901,
13,
462,
1678,
4867,
29889,
1202,
29898,
22930,
29898,
13,
462,
4706,
4423,
29922,
29885,
29889,
5182,
29892,
13,
462,
4706,
3287,
29922,
29885,
29889,
8276,
29892,
13,
462,
4706,
14728,
29922,
29885,
29889,
22640,
13,
462,
268,
876,
13,
13,
18884,
4867,
29889,
23126,
580,
13,
9651,
1583,
29889,
13529,
267,
29889,
5504,
3319,
29915,
4258,
3860,
2396,
5852,
1118,
12231,
675,
29918,
7924,
2433,
9155,
1495,
13,
9651,
4867,
29889,
1972,
29898,
22930,
467,
4572,
29898,
22930,
29889,
22640,
1275,
29871,
29900,
467,
8143,
580,
13,
13,
13,
29937,
770,
350,
905,
5709,
29898,
28631,
29889,
5709,
29924,
861,
262,
29892,
8125,
1125,
13,
29937,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
303,
555,
29918,
17712,
29918,
16175,
29918,
4882,
29915,
13,
29937,
1678,
4770,
3859,
1319,
29918,
5085,
1649,
353,
426,
13,
29937,
4706,
525,
23445,
2396,
350,
905,
29892,
13,
29937,
1678,
500,
13,
13,
13,
1990,
25249,
29898,
3195,
1125,
13,
1678,
9995,
13,
1678,
319,
10298,
310,
263,
3058,
14728,
310,
10961,
10340,
23329,
304,
263,
3287,
29892,
515,
263,
13,
1678,
4423,
304,
1790,
697,
29889,
13,
13,
1678,
910,
8220,
756,
263,
9461,
972,
2759,
2133,
373,
10961,
10340,
718,
14568,
297,
1797,
304,
13,
1678,
2304,
18428,
3287,
9262,
373,
4337,
28598,
19478,
29889,
13,
1678,
9995,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
303,
555,
29918,
17712,
29918,
11631,
29915,
13,
13,
1678,
1178,
353,
872,
29889,
4409,
29898,
4977,
29889,
7798,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
9853,
29918,
333,
353,
872,
29889,
4409,
29898,
4977,
29889,
7798,
29892,
872,
29889,
27755,
2558,
29898,
23145,
29889,
333,
511,
1870,
519,
29922,
8824,
29897,
13,
1678,
2752,
29918,
5479,
29918,
333,
353,
872,
29889,
4409,
29898,
4977,
29889,
7798,
29892,
872,
29889,
27755,
2558,
29898,
6508,
29889,
333,
511,
13,
462,
462,
259,
1870,
519,
29922,
8824,
29897,
13,
1678,
3646,
29918,
5479,
29918,
333,
353,
872,
29889,
4409,
29898,
4977,
29889,
7798,
29892,
872,
29889,
27755,
2558,
29898,
6508,
29889,
333,
511,
13,
462,
462,
259,
1870,
519,
29922,
8824,
29897,
13,
1678,
10961,
29918,
5441,
29918,
333,
353,
872,
29889,
4409,
29898,
4977,
29889,
7798,
29892,
872,
29889,
27755,
2558,
29898,
20754,
384,
8325,
29889,
333,
511,
13,
462,
795,
1870,
519,
29922,
8824,
29897,
13,
1678,
3287,
29918,
333,
353,
872,
29889,
4409,
29898,
4977,
29889,
7798,
29892,
872,
29889,
27755,
2558,
29898,
29931,
327,
29889,
333,
511,
1870,
519,
29922,
5574,
29897,
13,
1678,
14728,
353,
872,
29889,
4409,
29898,
4977,
29889,
29940,
25099,
29898,
29896,
29947,
29892,
29871,
29953,
511,
1870,
519,
29922,
8824,
29897,
13,
13,
1678,
21467,
353,
872,
29889,
4409,
29898,
4977,
29889,
18146,
29892,
2322,
29922,
8824,
29897,
13,
1678,
8283,
353,
872,
29889,
4409,
29898,
4977,
29889,
18146,
29892,
2322,
29922,
8824,
29897,
13,
13,
1678,
9853,
353,
9443,
29898,
23145,
29892,
1250,
999,
29922,
1627,
999,
877,
13529,
267,
742,
17366,
2433,
16626,
8785,
13,
1678,
2752,
353,
9443,
29898,
6508,
29892,
9117,
29918,
8149,
29922,
4993,
29918,
5479,
29918,
333,
29892,
13,
462,
3986,
1250,
999,
29922,
1627,
999,
877,
13529,
267,
29918,
3166,
8785,
13,
1678,
3646,
353,
9443,
29898,
6508,
29892,
9117,
29918,
8149,
29922,
5182,
29918,
5479,
29918,
333,
29892,
13,
462,
3986,
1250,
999,
29922,
1627,
999,
877,
13529,
267,
29918,
517,
8785,
13,
1678,
10961,
29918,
5441,
353,
9443,
29898,
20754,
384,
8325,
29892,
1250,
999,
29922,
1627,
999,
877,
13529,
267,
8785,
13,
1678,
3287,
353,
9443,
29898,
29931,
327,
29892,
1250,
999,
29922,
1627,
999,
877,
13529,
267,
8785,
13,
13,
1678,
4770,
2371,
29918,
5085,
1649,
353,
313,
13,
4706,
872,
29889,
8110,
802,
21529,
877,
16175,
29918,
333,
742,
13,
462,
9651,
525,
4993,
29918,
5479,
29918,
333,
742,
525,
5182,
29918,
5479,
29918,
333,
742,
13,
462,
9651,
525,
17712,
29918,
5441,
29918,
333,
742,
525,
8276,
29918,
333,
5477,
13,
4706,
396,
462,
1678,
27035,
29918,
3062,
29922,
8276,
2804,
6213,
511,
13,
4706,
396,
872,
29889,
8110,
802,
21529,
877,
16175,
29918,
333,
742,
13,
4706,
396,
462,
1678,
525,
4993,
29918,
5479,
29918,
333,
742,
525,
5182,
29918,
5479,
29918,
333,
742,
13,
4706,
396,
462,
1678,
525,
17712,
29918,
5441,
29918,
333,
742,
13,
4706,
396,
462,
1678,
27035,
29918,
3062,
29922,
8276,
1275,
6213,
511,
13,
4706,
396,
2045,
597,
2966,
21454,
29889,
990,
29914,
5617,
911,
1416,
29914,
2850,
284,
305,
6764,
29914,
15118,
29914,
29941,
29896,
29953,
29896,
29914,
13,
1678,
1723,
13,
13,
13,
1990,
22746,
29898,
3195,
1125,
13,
1678,
9995,
13,
1678,
450,
5253,
310,
9316,
23329,
304,
263,
3058,
3287,
297,
263,
2183,
4423,
29889,
13,
1678,
9995,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
303,
555,
29918,
17712,
29918,
12150,
29915,
13,
1678,
4770,
2371,
29918,
5085,
1649,
353,
313,
13,
4706,
872,
29889,
8110,
802,
21529,
877,
5479,
29918,
333,
742,
525,
8276,
29918,
333,
5477,
13,
1678,
1723,
13,
13,
1678,
1178,
353,
872,
29889,
4409,
29898,
4977,
29889,
7798,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
4423,
29918,
333,
353,
872,
29889,
4409,
29898,
4977,
29889,
7798,
29892,
872,
29889,
27755,
2558,
29898,
6508,
29889,
333,
511,
13,
462,
9651,
1870,
519,
29922,
8824,
29897,
13,
1678,
3287,
29918,
333,
353,
872,
29889,
4409,
29898,
4977,
29889,
7798,
29892,
872,
29889,
27755,
2558,
29898,
29931,
327,
29889,
333,
511,
1870,
519,
29922,
5574,
29897,
13,
1678,
14728,
353,
872,
29889,
4409,
29898,
4977,
29889,
29940,
25099,
29898,
29896,
29947,
29892,
29871,
29953,
511,
1870,
519,
29922,
8824,
29897,
13,
13,
1678,
4423,
353,
9443,
29898,
6508,
29892,
1250,
999,
29922,
1627,
999,
877,
339,
1934,
8785,
13,
1678,
3287,
353,
9443,
29898,
29931,
327,
29892,
1250,
999,
29922,
1627,
999,
877,
339,
1934,
8785,
13,
1678,
10961,
29918,
5441,
353,
15477,
29918,
14701,
877,
8276,
742,
525,
17712,
29918,
5441,
1495,
13,
13,
1678,
396,
3234,
13,
1678,
396,
313,
18253,
29914,
9175,
29914,
1767,
29897,
13,
1678,
396,
12271,
13,
2
] |
famplex/html/__main__.py | steppi/famplex | 11 | 186203 | # -*- coding: utf-8 -*-
"""CLI for exporting FamPlex as a static site."""
from .api import html
if __name__ == '__main__':
html()
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
15945,
29908,
27205,
363,
5609,
292,
27458,
29925,
2506,
408,
263,
2294,
3268,
1213,
15945,
13,
13,
3166,
869,
2754,
1053,
3472,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
3472,
580,
13,
2
] |
demos/webcam.py | ndoo/esp32-hanover-flipdot-firmware | 6 | 1613923 | <filename>demos/webcam.py
#!/usr/bin/python
from os import path
import socket
import struct
import sys
import time
import cv2
from lib import imageToBinary as i2b
MULTICAST_GROUP = ('172.16.58.3', 8080)
WIDTH = 96
HEIGHT = 32
vidcap = cv2.VideoCapture(cv2.CAP_DSHOW)
sock = socket.socket(socket.AF_INET, # Internet
socket.SOCK_DGRAM) # UDP
ttl = struct.pack('b', 1)
sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, ttl)
while True:
success,cv2_im = vidcap.read()
if success: sock.sendto(i2b.imageToBinary(cv2_im, WIDTH, HEIGHT, True, True), MULTICAST_GROUP)
time.sleep(0.1) | [
1,
529,
9507,
29958,
2310,
359,
29914,
2676,
11108,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
13,
13,
3166,
2897,
1053,
2224,
13,
13,
5215,
9909,
13,
5215,
2281,
13,
5215,
10876,
13,
5215,
931,
13,
5215,
13850,
29906,
13,
13,
3166,
4303,
1053,
1967,
1762,
25196,
408,
474,
29906,
29890,
13,
13,
29924,
8647,
2965,
28938,
29918,
26284,
353,
6702,
29896,
29955,
29906,
29889,
29896,
29953,
29889,
29945,
29947,
29889,
29941,
742,
29871,
29947,
29900,
29947,
29900,
29897,
13,
13,
22574,
353,
29871,
29929,
29953,
13,
9606,
22530,
353,
29871,
29941,
29906,
13,
13,
8590,
5030,
353,
13850,
29906,
29889,
15167,
21133,
545,
29898,
11023,
29906,
29889,
29907,
3301,
29918,
29928,
7068,
9806,
29897,
13,
13,
21852,
353,
9909,
29889,
11514,
29898,
11514,
29889,
5098,
29918,
1177,
2544,
29892,
396,
4685,
13,
29871,
9909,
29889,
6156,
7077,
29918,
29928,
29954,
25058,
29897,
396,
501,
11191,
13,
698,
29880,
353,
2281,
29889,
4058,
877,
29890,
742,
29871,
29896,
29897,
13,
21852,
29889,
842,
21852,
3670,
29898,
11514,
29889,
5690,
8618,
4986,
29918,
5690,
29892,
9909,
29889,
5690,
29918,
29924,
8647,
2965,
28938,
29918,
29911,
14632,
29892,
260,
15206,
29897,
13,
13,
13,
8000,
5852,
29901,
13,
29871,
2551,
29892,
11023,
29906,
29918,
326,
353,
7840,
5030,
29889,
949,
580,
13,
29871,
565,
2551,
29901,
577,
384,
29889,
6717,
517,
29898,
29875,
29906,
29890,
29889,
3027,
1762,
25196,
29898,
11023,
29906,
29918,
326,
29892,
399,
1367,
4690,
29892,
17714,
22530,
29892,
5852,
29892,
5852,
511,
341,
8647,
2965,
28938,
29918,
26284,
29897,
13,
29871,
931,
29889,
17059,
29898,
29900,
29889,
29896,
29897,
2
] |
dataset/research/__init__.py | mikhailkin/dataset | 0 | 93345 | <filename>dataset/research/__init__.py
""" Research module. """
from .grid import KV, Grid, Option, ConfigAlias
from .distributor import Worker, Distributor
from .workers import PipelineWorker
from .research import Research
| [
1,
529,
9507,
29958,
24713,
29914,
690,
2842,
29914,
1649,
2344,
26914,
2272,
13,
15945,
29908,
10550,
3883,
29889,
9995,
13,
3166,
869,
7720,
1053,
476,
29963,
29892,
11657,
29892,
10831,
29892,
12782,
29909,
18849,
13,
3166,
869,
5721,
1091,
3406,
1053,
5244,
261,
29892,
6652,
1091,
3406,
13,
3166,
869,
1287,
414,
1053,
349,
23828,
16164,
13,
3166,
869,
690,
2842,
1053,
10550,
13,
2
] |
tests/process_data.py | IPetr0v/compromutator | 0 | 85929 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
plt.rcParams.update({'font.size': 18})
def cut_by_item(dataframe, key, step):
item_range = np.arange(0, dataframe[key].max(), step)
grouped = dataframe.groupby(pd.cut(dataframe[key], item_range))
keys = [key for key, _ in grouped]
dataframes = [group for _, group in grouped]
return keys, dataframes
def plot_delays_by_rules(dataframe):
print 'Plotting by rules'
bounds = [31000, 64000, 85000, 105000]
#group_by_switches = dataframe.groupby(pd.cut(dataframe['network_size'], np.arange(0, 301, 100)))
group_by_switches = dataframe.groupby(pd.cut(dataframe['network_size'], [0, 100, 200, 250, 300]))
labels = [l for l, _ in group_by_switches]
delays = [d for _, d in group_by_switches]
#fig, axes = plt.subplots(2, 2)#, sharey=True)
ax_indices = [(0, 0), (0, 1), (1, 0), (1, 1)]
for label, delay, bound, idx in zip(labels, delays, bounds, ax_indices):
rule_interval = 100
grouped_by_rules = delay.groupby(pd.cut(
delay['graph_size'],
np.arange(0, bound, rule_interval))
#np.arange(0, max(delay['graph_size']), rule_interval))
)['duration']
mean = grouped_by_rules.mean()
#median = grouped_by_rules.median()
lower = grouped_by_rules.quantile(0.05)
upper = grouped_by_rules.quantile(0.95)
#mean = mean.rolling(window=5, min_periods=1).mean()
##median = median.rolling(window=5, min_periods=1).mean()
#lower = lower.rolling(window=5, min_periods=1).mean()
#upper = upper.rolling(window=5, min_periods=1).mean()
keys = [(k.left + k.right)/2.0 for k in mean.keys()]
plt.figure(figsize=(8, 6))
plt.ylim(0, 450)
plt.plot(keys, mean, 'green')
plt.fill_between(keys, lower, upper, color='green', alpha='0.15')
plt.xlabel(u'Количество правил')#('Rule number')
plt.ylabel(u'Задержка, мс')#('Delay, ms')
#plt.title('Delay by rule number')
plt.grid()
plt.tight_layout()
plt.savefig(data_dir + '/plot/' + 'delay_by_rules_%i_%i.pdf' % (label.left, label.right),
fmt='pdf')
#plt.show()
plt.gcf().clear()
#ax = axes[idx[0]][idx[1]]
#ax.plot(keys, mean, 'green')
#ax.fill_between(keys, lower, upper, color='green', alpha='0.15')
#ax.set_xlabel(u'Количество правил')#('Rule number')
#ax.set_ylabel(u'Задержка, мс')#('Delay, ms')
#ax.set_title(u'От %i до %i коммутаторов' % (label.left, label.right))#('Delay by rule number')
#ax.grid()
#fig.savefig(data_dir + '/plot/' + 'Delay by rule number', fmt='pdf')
##plt.show()
#plt.gcf().clear()
print 'Done'
def plot_delays_by_switches(dataframe):
print 'Plotting by switches'
switch_interval = 10
switch_bound = 301
dataframe = dataframe.sort_values(['graph_size'])
dataframe['duration'] = dataframe['duration'].rolling(window=3, min_periods=1).mean()
grouped_by_switches = dataframe.groupby(pd.cut(
dataframe['network_size'],
np.arange(0, switch_bound, switch_interval))
)['duration']
mean = grouped_by_switches.mean()
#median = grouped_by_switches.median()
#std = grouped_by_switches.std()
lower = grouped_by_switches.quantile(0.05)
upper = grouped_by_switches.quantile(0.95)
keys = [(k.left + k.right)/2.0 for k in mean.keys()]
mean = pd.Series(mean).reset_index(drop=True)
#median = pd.Series(median).reset_index(drop=True)
#std = pd.Series(std).reset_index(drop=True)
lower = pd.Series(lower).reset_index(drop=True)
upper = pd.Series(upper).reset_index(drop=True)
#mean = mean.rolling(window=5, min_periods=1).mean()
##median = median.rolling(window=5, min_periods=1).mean()
#lower = lower.rolling(window=5, min_periods=1).mean()
#upper = upper.rolling(window=5, min_periods=1).mean()
#plt.boxplot(data)
#plt.plot(keys, median, yerr=std, color='blue')
#plt.plot(keys, mean, 'ro')
plt.figure(figsize=(14, 6))
plt.errorbar(keys, mean, yerr=[lower, upper],
color='blue', fmt='o', markersize=9, capsize=6, elinewidth=3, capthick=2)
#plt.fill_between(keys, lower, upper, color='blue', alpha='0.15')
plt.xlabel(u'Количество коммутаторов')#('Network size')
plt.ylabel(u'Задержка, мс')#('Delay, ms')
#plt.title('Delay by network size')
plt.grid()
plt.tight_layout()
plt.savefig(data_dir + '/plot/' + 'delay_by_switches.pdf', fmt='pdf')
#plt.show()
plt.gcf().clear()
# By mean table size
#delays_table = delays
print 'Done'
def process_delays(delays):
delays = delays[delays['network_size'] % 5 == 0]
delays = delays[delays['network_size'] <= 305]
plot_delays_by_rules(delays)
plot_delays_by_switches(delays)
def predictions_boxplot(dataframe, delay):
#dataframe['packet_error'] = np.abs(dataframe['real_packets'] - dataframe['pred_packets'])
#dataframe['byte_error'] = np.abs(dataframe['real_bytes'] - dataframe['pred_bytes'])
#labels = list(reversed(['100 Kbps', '1 Mbps', '10 Mbps', '100 Mbps', '1 Gbps']))
labels = list(reversed([u'100 Кбит/с', u'1 Мбит/с', u'10 Мбит/с', u'100 Мбит/с', u'1 Гбит/с']))
bandwidths = reversed([int(b*1000000) for b in [0.1, 1, 10, 100, 1000]])
packet_data = []
byte_data = []
for bandwidth in bandwidths:
packet_data.append(dataframe[dataframe['bandwidth'] == bandwidth]['packet_error'])
byte_data.append(dataframe[dataframe['bandwidth'] == bandwidth]['byte_error'])
adjust_left = 0.21
packet_xlabel = u'Ошибка предсказания (количество пакетов)'#'Packet error'
byte_xlabel = u'Ошибка предсказания (количество байт)'#'Byte error'
#b = plt.boxplot(packet_data, showfliers=False, vert=False)
#print('Delay:', delay, '| Quantile:', [p.quantile(0.95) for p in packet_data])
#print 'Delay:', delay, '| Quantile:', [item.get_xdata() for item in b['whiskers']]
#return None # DEBUG
# Plot in normal scale
plt.figure(figsize=(8, 6))
plt.boxplot(packet_data, showfliers=False, vert=False)
plt.yticks([1, 2, 3, 4, 5], labels)
plt.xlabel(packet_xlabel)
plt.tight_layout()
plt.gcf().subplots_adjust(left=adjust_left)
plt.savefig(data_dir + '/plot/' + 'packet_error_%d.pdf' % delay, fmt='pdf')
#plt.show()
plt.gcf().clear()
# Plot in logarithmic scale
ax = plt.gca()
ax.set_xscale('log')
plt.boxplot(packet_data, showfliers=False, vert=False)
plt.yticks([1, 2, 3, 4, 5], labels)
plt.xlabel(packet_xlabel)
plt.tight_layout()
plt.gcf().subplots_adjust(left=adjust_left)
plt.savefig(data_dir + '/plot/' + 'packet_error_%d_log.pdf' % delay, fmt='pdf')
#plt.show()
plt.gcf().clear()
# Plot in normal scale
plt.boxplot(byte_data, showfliers=False, vert=False)
plt.yticks([1, 2, 3, 4, 5], labels)
plt.xlabel(byte_xlabel)
plt.tight_layout()
plt.gcf().subplots_adjust(left=adjust_left)
plt.savefig(data_dir + '/plot/' + 'byte_error_%d.pdf' % delay, fmt='pdf')
#plt.show()
plt.gcf().clear()
# Plot in logarithmic scale
ax = plt.gca()
ax.set_xscale('log')
plt.boxplot(byte_data, showfliers=False, vert=False)
plt.yticks([1, 2, 3, 4, 5], labels)
plt.xlabel(byte_xlabel)
plt.tight_layout()
plt.gcf().subplots_adjust(left=adjust_left)
plt.savefig(data_dir + '/plot/' + 'byte_error_%d_log.pdf' % delay, fmt='pdf')
#plt.show()
plt.gcf().clear()
def process_predictions(dataframe):
dataframe = dataframe[dataframe['real_packets'] > 0]
dataframe['packet_error'] = np.abs(dataframe['real_packets'] - dataframe['pred_packets'])
dataframe['byte_error'] = np.abs(dataframe['real_bytes'] - dataframe['pred_bytes'])
for delay in [0, 1, 33, 66, 333, 666, 2000]:
predictions_boxplot(dataframe[dataframe['delay'] == delay], delay)
def load(files):
dataframe_list = []
for dataframe_file in files:
df = pd.read_csv(dataframe_file, index_col=None, header=0)
dataframe_list.append(df)
return pd.concat(dataframe_list, ignore_index=True)
if __name__ == '__main__':
data_dir = './experiments'
delay_files = [data_dir + '/delay.csv']
#delay_files = [data_dir + '/no_delay_prediction']
prediction_files = [data_dir + '/prediction.csv']
#print 'Loading delays'
#delays = load(delay_files)
#process_delays(delays)
print 'Loading predictions'
predictions = load(prediction_files)
process_predictions(predictions) | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
13,
13,
572,
29873,
29889,
2214,
9629,
29889,
5504,
3319,
29915,
5657,
29889,
2311,
2396,
29871,
29896,
29947,
1800,
13,
13,
13,
1753,
5700,
29918,
1609,
29918,
667,
29898,
1272,
2557,
29892,
1820,
29892,
4331,
1125,
13,
1678,
2944,
29918,
3881,
353,
7442,
29889,
279,
927,
29898,
29900,
29892,
12205,
29961,
1989,
1822,
3317,
3285,
4331,
29897,
13,
1678,
27831,
353,
12205,
29889,
27789,
29898,
15926,
29889,
7582,
29898,
1272,
2557,
29961,
1989,
1402,
2944,
29918,
3881,
876,
13,
1678,
6611,
353,
518,
1989,
363,
1820,
29892,
903,
297,
27831,
29962,
13,
1678,
848,
19935,
353,
518,
2972,
363,
17117,
2318,
297,
27831,
29962,
13,
1678,
736,
6611,
29892,
848,
19935,
13,
13,
13,
1753,
6492,
29918,
6144,
1036,
29918,
1609,
29918,
19238,
29898,
1272,
2557,
1125,
13,
1678,
1596,
525,
20867,
1259,
491,
6865,
29915,
13,
1678,
13451,
353,
518,
29941,
29896,
29900,
29900,
29900,
29892,
29871,
29953,
29946,
29900,
29900,
29900,
29892,
29871,
29947,
29945,
29900,
29900,
29900,
29892,
29871,
29896,
29900,
29945,
29900,
29900,
29900,
29962,
13,
1678,
396,
2972,
29918,
1609,
29918,
15123,
267,
353,
12205,
29889,
27789,
29898,
15926,
29889,
7582,
29898,
1272,
2557,
1839,
11618,
29918,
2311,
7464,
7442,
29889,
279,
927,
29898,
29900,
29892,
29871,
29941,
29900,
29896,
29892,
29871,
29896,
29900,
29900,
4961,
13,
1678,
2318,
29918,
1609,
29918,
15123,
267,
353,
12205,
29889,
27789,
29898,
15926,
29889,
7582,
29898,
1272,
2557,
1839,
11618,
29918,
2311,
7464,
518,
29900,
29892,
29871,
29896,
29900,
29900,
29892,
29871,
29906,
29900,
29900,
29892,
29871,
29906,
29945,
29900,
29892,
29871,
29941,
29900,
29900,
12622,
13,
1678,
11073,
353,
518,
29880,
363,
301,
29892,
903,
297,
2318,
29918,
1609,
29918,
15123,
267,
29962,
13,
1678,
628,
1036,
353,
518,
29881,
363,
17117,
270,
297,
2318,
29918,
1609,
29918,
15123,
267,
29962,
13,
13,
1678,
396,
1003,
29892,
27815,
353,
14770,
29889,
1491,
26762,
29898,
29906,
29892,
29871,
29906,
29897,
6552,
6232,
29891,
29922,
5574,
29897,
13,
1678,
4853,
29918,
513,
1575,
353,
17288,
29900,
29892,
29871,
29900,
511,
313,
29900,
29892,
29871,
29896,
511,
313,
29896,
29892,
29871,
29900,
511,
313,
29896,
29892,
29871,
29896,
4638,
13,
13,
1678,
363,
3858,
29892,
9055,
29892,
3216,
29892,
22645,
297,
14319,
29898,
21134,
29892,
628,
1036,
29892,
13451,
29892,
4853,
29918,
513,
1575,
1125,
13,
4706,
5751,
29918,
19207,
353,
29871,
29896,
29900,
29900,
13,
4706,
27831,
29918,
1609,
29918,
19238,
353,
9055,
29889,
27789,
29898,
15926,
29889,
7582,
29898,
13,
9651,
9055,
1839,
4262,
29918,
2311,
7464,
13,
9651,
7442,
29889,
279,
927,
29898,
29900,
29892,
3216,
29892,
5751,
29918,
19207,
876,
13,
9651,
396,
9302,
29889,
279,
927,
29898,
29900,
29892,
4236,
29898,
18829,
1839,
4262,
29918,
2311,
2033,
511,
5751,
29918,
19207,
876,
13,
4706,
1723,
1839,
19708,
2033,
13,
13,
4706,
2099,
353,
27831,
29918,
1609,
29918,
19238,
29889,
12676,
580,
13,
4706,
396,
2168,
713,
353,
27831,
29918,
1609,
29918,
19238,
29889,
2168,
713,
580,
13,
4706,
5224,
353,
27831,
29918,
1609,
29918,
19238,
29889,
12150,
488,
29898,
29900,
29889,
29900,
29945,
29897,
13,
4706,
7568,
353,
27831,
29918,
1609,
29918,
19238,
29889,
12150,
488,
29898,
29900,
29889,
29929,
29945,
29897,
13,
13,
4706,
396,
12676,
353,
2099,
29889,
22155,
29898,
7165,
29922,
29945,
29892,
1375,
29918,
19145,
29879,
29922,
29896,
467,
12676,
580,
13,
4706,
444,
2168,
713,
353,
19194,
29889,
22155,
29898,
7165,
29922,
29945,
29892,
1375,
29918,
19145,
29879,
29922,
29896,
467,
12676,
580,
13,
4706,
396,
13609,
353,
5224,
29889,
22155,
29898,
7165,
29922,
29945,
29892,
1375,
29918,
19145,
29879,
29922,
29896,
467,
12676,
580,
13,
4706,
396,
21064,
353,
7568,
29889,
22155,
29898,
7165,
29922,
29945,
29892,
1375,
29918,
19145,
29879,
29922,
29896,
467,
12676,
580,
13,
13,
4706,
6611,
353,
17288,
29895,
29889,
1563,
718,
413,
29889,
1266,
6802,
29906,
29889,
29900,
363,
413,
297,
2099,
29889,
8149,
580,
29962,
13,
13,
4706,
14770,
29889,
4532,
29898,
1003,
2311,
7607,
29947,
29892,
29871,
29953,
876,
13,
4706,
14770,
29889,
29891,
2576,
29898,
29900,
29892,
29871,
29946,
29945,
29900,
29897,
13,
4706,
14770,
29889,
5317,
29898,
8149,
29892,
2099,
29892,
525,
12692,
1495,
13,
4706,
14770,
29889,
5589,
29918,
14811,
29898,
8149,
29892,
5224,
29892,
7568,
29892,
2927,
2433,
12692,
742,
15595,
2433,
29900,
29889,
29896,
29945,
1495,
13,
4706,
14770,
29889,
29916,
1643,
29898,
29884,
29915,
26022,
644,
22339,
12318,
29944,
1495,
29937,
877,
10740,
1353,
1495,
13,
4706,
14770,
29889,
29891,
1643,
29898,
29884,
29915,
15578,
6620,
29998,
642,
29892,
757,
29935,
1495,
29937,
877,
24996,
29892,
10887,
1495,
13,
4706,
396,
572,
29873,
29889,
3257,
877,
24996,
491,
5751,
1353,
1495,
13,
4706,
14770,
29889,
7720,
580,
13,
4706,
14770,
29889,
29873,
523,
29918,
2680,
580,
13,
4706,
14770,
29889,
7620,
1003,
29898,
1272,
29918,
3972,
718,
8207,
5317,
22208,
718,
525,
18829,
29918,
1609,
29918,
19238,
29918,
29995,
29875,
29918,
29995,
29875,
29889,
5140,
29915,
1273,
313,
1643,
29889,
1563,
29892,
3858,
29889,
1266,
511,
13,
462,
1678,
19200,
2433,
5140,
1495,
13,
4706,
396,
572,
29873,
29889,
4294,
580,
13,
4706,
14770,
29889,
29887,
6854,
2141,
8551,
580,
13,
13,
4706,
396,
1165,
353,
27815,
29961,
13140,
29961,
29900,
29962,
3816,
13140,
29961,
29896,
5262,
13,
4706,
396,
1165,
29889,
5317,
29898,
8149,
29892,
2099,
29892,
525,
12692,
1495,
13,
4706,
396,
1165,
29889,
5589,
29918,
14811,
29898,
8149,
29892,
5224,
29892,
7568,
29892,
2927,
2433,
12692,
742,
15595,
2433,
29900,
29889,
29896,
29945,
1495,
13,
4706,
396,
1165,
29889,
842,
29918,
29916,
1643,
29898,
29884,
29915,
26022,
644,
22339,
12318,
29944,
1495,
29937,
877,
10740,
1353,
1495,
13,
4706,
396,
1165,
29889,
842,
29918,
29891,
1643,
29898,
29884,
29915,
15578,
6620,
29998,
642,
29892,
757,
29935,
1495,
29937,
877,
24996,
29892,
10887,
1495,
13,
4706,
396,
1165,
29889,
842,
29918,
3257,
29898,
29884,
29915,
30038,
29932,
1273,
29875,
1447,
1273,
29875,
24486,
676,
2374,
516,
29915,
1273,
313,
1643,
29889,
1563,
29892,
3858,
29889,
1266,
876,
29937,
877,
24996,
491,
5751,
1353,
1495,
13,
4706,
396,
1165,
29889,
7720,
580,
13,
13,
1678,
396,
1003,
29889,
7620,
1003,
29898,
1272,
29918,
3972,
718,
8207,
5317,
22208,
718,
525,
24996,
491,
5751,
1353,
742,
19200,
2433,
5140,
1495,
13,
1678,
444,
572,
29873,
29889,
4294,
580,
13,
1678,
396,
572,
29873,
29889,
29887,
6854,
2141,
8551,
580,
13,
13,
1678,
1596,
525,
25632,
29915,
13,
13,
13,
1753,
6492,
29918,
6144,
1036,
29918,
1609,
29918,
15123,
267,
29898,
1272,
2557,
1125,
13,
1678,
1596,
525,
20867,
1259,
491,
4607,
267,
29915,
13,
1678,
4607,
29918,
19207,
353,
29871,
29896,
29900,
13,
1678,
4607,
29918,
9917,
353,
29871,
29941,
29900,
29896,
13,
13,
1678,
12205,
353,
12205,
29889,
6605,
29918,
5975,
18959,
4262,
29918,
2311,
11287,
13,
1678,
12205,
1839,
19708,
2033,
353,
12205,
1839,
19708,
13359,
22155,
29898,
7165,
29922,
29941,
29892,
1375,
29918,
19145,
29879,
29922,
29896,
467,
12676,
580,
13,
13,
1678,
27831,
29918,
1609,
29918,
15123,
267,
353,
12205,
29889,
27789,
29898,
15926,
29889,
7582,
29898,
13,
4706,
12205,
1839,
11618,
29918,
2311,
7464,
13,
4706,
7442,
29889,
279,
927,
29898,
29900,
29892,
4607,
29918,
9917,
29892,
4607,
29918,
19207,
876,
13,
1678,
1723,
1839,
19708,
2033,
13,
13,
1678,
2099,
353,
27831,
29918,
1609,
29918,
15123,
267,
29889,
12676,
580,
13,
1678,
396,
2168,
713,
353,
27831,
29918,
1609,
29918,
15123,
267,
29889,
2168,
713,
580,
13,
1678,
396,
4172,
353,
27831,
29918,
1609,
29918,
15123,
267,
29889,
4172,
580,
13,
1678,
5224,
353,
27831,
29918,
1609,
29918,
15123,
267,
29889,
12150,
488,
29898,
29900,
29889,
29900,
29945,
29897,
13,
1678,
7568,
353,
27831,
29918,
1609,
29918,
15123,
267,
29889,
12150,
488,
29898,
29900,
29889,
29929,
29945,
29897,
13,
13,
1678,
6611,
353,
17288,
29895,
29889,
1563,
718,
413,
29889,
1266,
6802,
29906,
29889,
29900,
363,
413,
297,
2099,
29889,
8149,
580,
29962,
13,
13,
1678,
2099,
353,
10518,
29889,
19204,
29898,
12676,
467,
12071,
29918,
2248,
29898,
8865,
29922,
5574,
29897,
13,
1678,
396,
2168,
713,
353,
10518,
29889,
19204,
29898,
2168,
713,
467,
12071,
29918,
2248,
29898,
8865,
29922,
5574,
29897,
13,
1678,
396,
4172,
353,
10518,
29889,
19204,
29898,
4172,
467,
12071,
29918,
2248,
29898,
8865,
29922,
5574,
29897,
13,
1678,
5224,
353,
10518,
29889,
19204,
29898,
13609,
467,
12071,
29918,
2248,
29898,
8865,
29922,
5574,
29897,
13,
1678,
7568,
353,
10518,
29889,
19204,
29898,
21064,
467,
12071,
29918,
2248,
29898,
8865,
29922,
5574,
29897,
13,
13,
1678,
396,
12676,
353,
2099,
29889,
22155,
29898,
7165,
29922,
29945,
29892,
1375,
29918,
19145,
29879,
29922,
29896,
467,
12676,
580,
13,
1678,
444,
2168,
713,
353,
19194,
29889,
22155,
29898,
7165,
29922,
29945,
29892,
1375,
29918,
19145,
29879,
29922,
29896,
467,
12676,
580,
13,
1678,
396,
13609,
353,
5224,
29889,
22155,
29898,
7165,
29922,
29945,
29892,
1375,
29918,
19145,
29879,
29922,
29896,
467,
12676,
580,
13,
1678,
396,
21064,
353,
7568,
29889,
22155,
29898,
7165,
29922,
29945,
29892,
1375,
29918,
19145,
29879,
29922,
29896,
467,
12676,
580,
13,
13,
1678,
396,
572,
29873,
29889,
1884,
5317,
29898,
1272,
29897,
13,
1678,
396,
572,
29873,
29889,
5317,
29898,
8149,
29892,
19194,
29892,
343,
3127,
29922,
4172,
29892,
2927,
2433,
9539,
1495,
13,
1678,
396,
572,
29873,
29889,
5317,
29898,
8149,
29892,
2099,
29892,
525,
307,
1495,
13,
1678,
14770,
29889,
4532,
29898,
1003,
2311,
7607,
29896,
29946,
29892,
29871,
29953,
876,
13,
1678,
14770,
29889,
2704,
1646,
29898,
8149,
29892,
2099,
29892,
343,
3127,
11759,
13609,
29892,
7568,
1402,
13,
462,
2927,
2433,
9539,
742,
19200,
2433,
29877,
742,
29320,
675,
29922,
29929,
29892,
2117,
2311,
29922,
29953,
29892,
560,
457,
2103,
29922,
29941,
29892,
2117,
27996,
29922,
29906,
29897,
13,
1678,
396,
572,
29873,
29889,
5589,
29918,
14811,
29898,
8149,
29892,
5224,
29892,
7568,
29892,
2927,
2433,
9539,
742,
15595,
2433,
29900,
29889,
29896,
29945,
1495,
13,
1678,
14770,
29889,
29916,
1643,
29898,
29884,
29915,
26022,
644,
22339,
24486,
676,
2374,
516,
1495,
29937,
877,
13724,
2159,
1495,
13,
1678,
14770,
29889,
29891,
1643,
29898,
29884,
29915,
15578,
6620,
29998,
642,
29892,
757,
29935,
1495,
29937,
877,
24996,
29892,
10887,
1495,
13,
1678,
396,
572,
29873,
29889,
3257,
877,
24996,
491,
3564,
2159,
1495,
13,
1678,
14770,
29889,
7720,
580,
13,
1678,
14770,
29889,
29873,
523,
29918,
2680,
580,
13,
1678,
14770,
29889,
7620,
1003,
29898,
1272,
29918,
3972,
718,
8207,
5317,
22208,
718,
525,
18829,
29918,
1609,
29918,
15123,
267,
29889,
5140,
742,
19200,
2433,
5140,
1495,
13,
1678,
396,
572,
29873,
29889,
4294,
580,
13,
1678,
14770,
29889,
29887,
6854,
2141,
8551,
580,
13,
13,
1678,
396,
2648,
2099,
1591,
2159,
13,
1678,
396,
6144,
1036,
29918,
2371,
353,
628,
1036,
13,
1678,
1596,
525,
25632,
29915,
13,
13,
13,
1753,
1889,
29918,
6144,
1036,
29898,
6144,
1036,
1125,
13,
1678,
628,
1036,
353,
628,
1036,
29961,
6144,
1036,
1839,
11618,
29918,
2311,
2033,
1273,
29871,
29945,
1275,
29871,
29900,
29962,
13,
1678,
628,
1036,
353,
628,
1036,
29961,
6144,
1036,
1839,
11618,
29918,
2311,
2033,
5277,
29871,
29941,
29900,
29945,
29962,
13,
13,
1678,
6492,
29918,
6144,
1036,
29918,
1609,
29918,
19238,
29898,
6144,
1036,
29897,
13,
1678,
6492,
29918,
6144,
1036,
29918,
1609,
29918,
15123,
267,
29898,
6144,
1036,
29897,
13,
13,
13,
1753,
27303,
29918,
1884,
5317,
29898,
1272,
2557,
29892,
9055,
1125,
13,
1678,
396,
1272,
2557,
1839,
4058,
300,
29918,
2704,
2033,
353,
7442,
29889,
6897,
29898,
1272,
2557,
1839,
6370,
29918,
4058,
1691,
2033,
448,
12205,
1839,
11965,
29918,
4058,
1691,
11287,
13,
1678,
396,
1272,
2557,
1839,
10389,
29918,
2704,
2033,
353,
7442,
29889,
6897,
29898,
1272,
2557,
1839,
6370,
29918,
13193,
2033,
448,
12205,
1839,
11965,
29918,
13193,
11287,
13,
13,
1678,
396,
21134,
353,
1051,
29898,
276,
874,
287,
18959,
29896,
29900,
29900,
476,
29890,
567,
742,
525,
29896,
341,
29890,
567,
742,
525,
29896,
29900,
341,
29890,
567,
742,
525,
29896,
29900,
29900,
341,
29890,
567,
742,
525,
29896,
402,
29890,
567,
25901,
13,
1678,
11073,
353,
1051,
29898,
276,
874,
287,
4197,
29884,
29915,
29896,
29900,
29900,
1069,
2384,
29932,
29914,
29935,
742,
318,
29915,
29896,
1142,
2384,
29932,
29914,
29935,
742,
318,
29915,
29896,
29900,
1142,
2384,
29932,
29914,
29935,
742,
318,
29915,
29896,
29900,
29900,
1142,
2384,
29932,
29914,
29935,
742,
318,
29915,
29896,
1618,
2384,
29932,
29914,
29935,
25901,
13,
1678,
3719,
2103,
29879,
353,
18764,
287,
4197,
524,
29898,
29890,
29930,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
29897,
363,
289,
297,
518,
29900,
29889,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29900,
29900,
29892,
29871,
29896,
29900,
29900,
29900,
24960,
13,
1678,
18203,
29918,
1272,
353,
5159,
13,
1678,
7023,
29918,
1272,
353,
5159,
13,
1678,
363,
3719,
2103,
297,
3719,
2103,
29879,
29901,
13,
4706,
18203,
29918,
1272,
29889,
4397,
29898,
1272,
2557,
29961,
1272,
2557,
1839,
4980,
2103,
2033,
1275,
3719,
2103,
22322,
4058,
300,
29918,
2704,
11287,
13,
4706,
7023,
29918,
1272,
29889,
4397,
29898,
1272,
2557,
29961,
1272,
2557,
1839,
4980,
2103,
2033,
1275,
3719,
2103,
22322,
10389,
29918,
2704,
11287,
13,
13,
1678,
10365,
29918,
1563,
353,
29871,
29900,
29889,
29906,
29896,
13,
1678,
18203,
29918,
29916,
1643,
353,
318,
29915,
30038,
1911,
23348,
4570,
2494,
1902,
1587,
313,
29798,
22339,
4554,
27268,
516,
16029,
29937,
29915,
16638,
300,
1059,
29915,
13,
1678,
7023,
29918,
29916,
1643,
353,
318,
29915,
30038,
1911,
23348,
4570,
2494,
1902,
1587,
313,
29798,
22339,
4724,
24139,
16029,
29937,
29915,
12901,
1059,
29915,
13,
13,
1678,
396,
29890,
353,
14770,
29889,
1884,
5317,
29898,
4058,
300,
29918,
1272,
29892,
1510,
20157,
414,
29922,
8824,
29892,
4837,
29922,
8824,
29897,
13,
1678,
396,
2158,
877,
24996,
29901,
742,
9055,
29892,
525,
29989,
22746,
488,
29901,
742,
518,
29886,
29889,
12150,
488,
29898,
29900,
29889,
29929,
29945,
29897,
363,
282,
297,
18203,
29918,
1272,
2314,
13,
1678,
396,
2158,
525,
24996,
29901,
742,
9055,
29892,
525,
29989,
22746,
488,
29901,
742,
518,
667,
29889,
657,
29918,
29916,
1272,
580,
363,
2944,
297,
289,
1839,
1332,
3873,
414,
2033,
29962,
13,
1678,
396,
2457,
6213,
29871,
396,
21681,
13,
13,
1678,
396,
18399,
297,
4226,
6287,
13,
1678,
14770,
29889,
4532,
29898,
1003,
2311,
7607,
29947,
29892,
29871,
29953,
876,
13,
1678,
14770,
29889,
1884,
5317,
29898,
4058,
300,
29918,
1272,
29892,
1510,
20157,
414,
29922,
8824,
29892,
4837,
29922,
8824,
29897,
13,
1678,
14770,
29889,
3637,
7358,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
1402,
11073,
29897,
13,
1678,
14770,
29889,
29916,
1643,
29898,
4058,
300,
29918,
29916,
1643,
29897,
13,
1678,
14770,
29889,
29873,
523,
29918,
2680,
580,
13,
1678,
14770,
29889,
29887,
6854,
2141,
1491,
26762,
29918,
328,
5143,
29898,
1563,
29922,
328,
5143,
29918,
1563,
29897,
13,
1678,
14770,
29889,
7620,
1003,
29898,
1272,
29918,
3972,
718,
8207,
5317,
22208,
718,
525,
4058,
300,
29918,
2704,
29918,
29995,
29881,
29889,
5140,
29915,
1273,
9055,
29892,
19200,
2433,
5140,
1495,
13,
1678,
396,
572,
29873,
29889,
4294,
580,
13,
1678,
14770,
29889,
29887,
6854,
2141,
8551,
580,
13,
13,
1678,
396,
18399,
297,
1480,
23830,
13076,
6287,
13,
1678,
4853,
353,
14770,
29889,
29887,
1113,
580,
13,
1678,
4853,
29889,
842,
29918,
29916,
7052,
877,
1188,
1495,
13,
1678,
14770,
29889,
1884,
5317,
29898,
4058,
300,
29918,
1272,
29892,
1510,
20157,
414,
29922,
8824,
29892,
4837,
29922,
8824,
29897,
13,
1678,
14770,
29889,
3637,
7358,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
1402,
11073,
29897,
13,
1678,
14770,
29889,
29916,
1643,
29898,
4058,
300,
29918,
29916,
1643,
29897,
13,
1678,
14770,
29889,
29873,
523,
29918,
2680,
580,
13,
1678,
14770,
29889,
29887,
6854,
2141,
1491,
26762,
29918,
328,
5143,
29898,
1563,
29922,
328,
5143,
29918,
1563,
29897,
13,
1678,
14770,
29889,
7620,
1003,
29898,
1272,
29918,
3972,
718,
8207,
5317,
22208,
718,
525,
4058,
300,
29918,
2704,
29918,
29995,
29881,
29918,
1188,
29889,
5140,
29915,
1273,
9055,
29892,
19200,
2433,
5140,
1495,
13,
1678,
396,
572,
29873,
29889,
4294,
580,
13,
1678,
14770,
29889,
29887,
6854,
2141,
8551,
580,
13,
13,
1678,
396,
18399,
297,
4226,
6287,
13,
1678,
14770,
29889,
1884,
5317,
29898,
10389,
29918,
1272,
29892,
1510,
20157,
414,
29922,
8824,
29892,
4837,
29922,
8824,
29897,
13,
1678,
14770,
29889,
3637,
7358,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
1402,
11073,
29897,
13,
1678,
14770,
29889,
29916,
1643,
29898,
10389,
29918,
29916,
1643,
29897,
13,
1678,
14770,
29889,
29873,
523,
29918,
2680,
580,
13,
1678,
14770,
29889,
29887,
6854,
2141,
1491,
26762,
29918,
328,
5143,
29898,
1563,
29922,
328,
5143,
29918,
1563,
29897,
13,
1678,
14770,
29889,
7620,
1003,
29898,
1272,
29918,
3972,
718,
8207,
5317,
22208,
718,
525,
10389,
29918,
2704,
29918,
29995,
29881,
29889,
5140,
29915,
1273,
9055,
29892,
19200,
2433,
5140,
1495,
13,
1678,
396,
572,
29873,
29889,
4294,
580,
13,
1678,
14770,
29889,
29887,
6854,
2141,
8551,
580,
13,
13,
1678,
396,
18399,
297,
1480,
23830,
13076,
6287,
13,
1678,
4853,
353,
14770,
29889,
29887,
1113,
580,
13,
1678,
4853,
29889,
842,
29918,
29916,
7052,
877,
1188,
1495,
13,
1678,
14770,
29889,
1884,
5317,
29898,
10389,
29918,
1272,
29892,
1510,
20157,
414,
29922,
8824,
29892,
4837,
29922,
8824,
29897,
13,
1678,
14770,
29889,
3637,
7358,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
1402,
11073,
29897,
13,
1678,
14770,
29889,
29916,
1643,
29898,
10389,
29918,
29916,
1643,
29897,
13,
1678,
14770,
29889,
29873,
523,
29918,
2680,
580,
13,
1678,
14770,
29889,
29887,
6854,
2141,
1491,
26762,
29918,
328,
5143,
29898,
1563,
29922,
328,
5143,
29918,
1563,
29897,
13,
1678,
14770,
29889,
7620,
1003,
29898,
1272,
29918,
3972,
718,
8207,
5317,
22208,
718,
525,
10389,
29918,
2704,
29918,
29995,
29881,
29918,
1188,
29889,
5140,
29915,
1273,
9055,
29892,
19200,
2433,
5140,
1495,
13,
1678,
396,
572,
29873,
29889,
4294,
580,
13,
1678,
14770,
29889,
29887,
6854,
2141,
8551,
580,
13,
13,
13,
1753,
1889,
29918,
27711,
1080,
29898,
1272,
2557,
1125,
13,
1678,
12205,
353,
12205,
29961,
1272,
2557,
1839,
6370,
29918,
4058,
1691,
2033,
1405,
29871,
29900,
29962,
13,
1678,
12205,
1839,
4058,
300,
29918,
2704,
2033,
353,
7442,
29889,
6897,
29898,
1272,
2557,
1839,
6370,
29918,
4058,
1691,
2033,
448,
12205,
1839,
11965,
29918,
4058,
1691,
11287,
13,
1678,
12205,
1839,
10389,
29918,
2704,
2033,
353,
7442,
29889,
6897,
29898,
1272,
2557,
1839,
6370,
29918,
13193,
2033,
448,
12205,
1839,
11965,
29918,
13193,
11287,
13,
1678,
363,
9055,
297,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29941,
29941,
29892,
29871,
29953,
29953,
29892,
29871,
29941,
29941,
29941,
29892,
29871,
29953,
29953,
29953,
29892,
29871,
29906,
29900,
29900,
29900,
5387,
13,
4706,
27303,
29918,
1884,
5317,
29898,
1272,
2557,
29961,
1272,
2557,
1839,
18829,
2033,
1275,
9055,
1402,
9055,
29897,
13,
13,
13,
1753,
2254,
29898,
5325,
1125,
13,
1678,
12205,
29918,
1761,
353,
5159,
13,
1678,
363,
12205,
29918,
1445,
297,
2066,
29901,
13,
4706,
4489,
353,
10518,
29889,
949,
29918,
7638,
29898,
1272,
2557,
29918,
1445,
29892,
2380,
29918,
1054,
29922,
8516,
29892,
4839,
29922,
29900,
29897,
13,
4706,
12205,
29918,
1761,
29889,
4397,
29898,
2176,
29897,
13,
1678,
736,
10518,
29889,
17685,
29898,
1272,
2557,
29918,
1761,
29892,
11455,
29918,
2248,
29922,
5574,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
848,
29918,
3972,
353,
19283,
735,
546,
7862,
29915,
13,
13,
1678,
9055,
29918,
5325,
353,
518,
1272,
29918,
3972,
718,
8207,
18829,
29889,
7638,
2033,
13,
1678,
396,
18829,
29918,
5325,
353,
518,
1272,
29918,
3972,
718,
8207,
1217,
29918,
18829,
29918,
11965,
2463,
2033,
13,
1678,
18988,
29918,
5325,
353,
518,
1272,
29918,
3972,
718,
8207,
11965,
2463,
29889,
7638,
2033,
13,
13,
1678,
396,
2158,
525,
23456,
628,
1036,
29915,
13,
1678,
396,
6144,
1036,
353,
2254,
29898,
18829,
29918,
5325,
29897,
13,
1678,
396,
5014,
29918,
6144,
1036,
29898,
6144,
1036,
29897,
13,
13,
1678,
1596,
525,
23456,
27303,
29915,
13,
1678,
27303,
353,
2254,
29898,
11965,
2463,
29918,
5325,
29897,
13,
1678,
1889,
29918,
27711,
1080,
29898,
27711,
1080,
29897,
2
] |
main.py | AntonHei/Undertale_DiscordRichPresence | 1 | 1603258 | <gh_stars>1-10
# ///////////////////////
# UndertaleDRP by AntonHei
# MIT License - Copyright (c) 2020 AntonHei
# ///////////////////////
# Imports
from pypresence import Presence
import time
import configparser
import os
from os import path
import json
import linecache
# General
config = configparser.ConfigParser()
file0 = configparser.ConfigParser()
drpconfig = configparser.ConfigParser()
undertaleDRPConfig = path.expandvars('config.ini')
saveGamePath = path.expandvars(r'%LOCALAPPDATA%' + r'\UNDERTALE\undertale.ini')
file0GamePath = path.expandvars(r'%LOCALAPPDATA%' + r'\UNDERTALE\file0')
undertaleDataPath = path.expandvars(r'data\{language}\undertale_data.json')
undertaleTranslationPath = path.expandvars(r'data\{language}\main_translations.json')
# UNDERTALE_DRP Data
config_showCurrentRoute = True
config_discordAppClientID = ""
# UNDERTALE Data
data_kills = ""
data_roomName = ""
data_roomArea = ""
data_roomAreaCodeName = ""
data_Name = ""
data_LV = ""
data_playtimeSeconds = ""
data_playtimeHours = ""
data_deaths = ""
# file0 Data
player_kills_ruins = None
player_kills_snowdin = None
player_kills_waterfall = None
player_kills_hotland = None
# Runtime Vars
startTime = ""
refreshInterval = 10
RPC = None
undertale_data = None
undertale_translations = None
areaPicNames = None
curDetails = None
curState = None
# Config Loadup
def drpConfigLoad():
global undertaleDataPath, undertaleTranslationPath
drpconfig.read(undertaleDRPConfig)
# Important data loads directly after reading
language = str(clearString(getDRPConfigData('UndertaleDRP', 'language')).split(".")[0])
undertaleDataPath = undertaleDataPath.replace('{language}', language)
undertaleTranslationPath = undertaleTranslationPath.replace('{language}', language)
def loadUndertaleDataJSON():
global undertale_data, undertale_translations
#UndertaleDRP Data
with open(undertaleDataPath) as f:
undertale_data = json.load(f)
# UndertaleDRP Translations
with open(undertaleTranslationPath) as f:
undertale_translations = json.load(f)
def configLoad():
config.read(saveGamePath)
def discordInit():
global RPC
client_id = config_discordAppClientID
RPC = Presence(client_id)
RPC.connect()
def getDRPConfigData(section, dataname):
return drpconfig[section][dataname]
def getConfigData(section, dataname):
return config[section][dataname]
def getfile0Line(line):
# Decrement with 1 because arrays start at 0
line -= 1
try:
return open(file0GamePath, "r").readlines()[line]
except:
return 0
def listToDict(lst):
op = {i: lst[i] for i in range(0, len(lst))}
return op
def prepareData():
global data_kills, data_roomName, data_roomArea, data_roomAreaCodeName, data_Name, data_LV, data_playtimeSeconds, data_playtimeHours, data_deaths, config_showCurrentRoute, config_discordAppClientID, areaPicNames, refreshInterval
# Getting the UndertaleDRP Config settings
config_showCurrentRoute = str(clearString(getDRPConfigData('UndertaleDRP', 'showRoute')).split(".")[0])
config_discordAppClientID = str(clearString(getDRPConfigData('UndertaleDRP', 'discordAppClientID')).split(".")[0])
refreshInterval = int(clearString(getDRPConfigData('UndertaleDRP', 'refreshInterval')).split(".")[0])
# Getting the Data
# Area kills
loadAreaKills()
# Discord App Area Pics
areaPicNames = listToDict(list(undertale_data['areaDiscordAppPicNames']))
# Rooms
curKills = str(clearString(getConfigData('General', 'Kills')).split(".")[0])
curRoomINT = int(clearString(getConfigData('General', 'Room')).split(".")[0])
curName = str(clearString(getConfigData('General', 'Name')).split(".")[0])
curLV = str(clearString(getConfigData('General', 'Love')).split(".")[0])
curPlaytimeINT = int(clearString(getConfigData('General', 'Time')).split(".")[0])
try:
curDeaths = str(clearString(getConfigData('General', 'Gameover')).split(".")[0])
except:
curDeaths = "0"
# Setting the Data
data_kills = curKills
data_roomName = undertale_data['rooms'][curRoomINT]['Name']
data_roomArea = undertale_data['rooms'][curRoomINT]['Area']
data_roomAreaCodeName = undertale_data['rooms'][curRoomINT]['Area_codename']
data_Name = curName
data_LV = curLV
data_playtimeSeconds = curPlaytimeINT / 30
data_playtimeHours = str(round(float(((curPlaytimeINT/30)/60)/60), 2)) # Calculate Frames to Seconds then to Minutes to Hours and cut off after 2 decimal places
data_deaths = curDeaths
def loadAreaKills():
#file0 is being used
global player_kills_ruins, player_kills_snowdin, player_kills_waterfall, player_kills_hotland
player_kills_ruins = str(getfile0Line(233))
player_kills_snowdin = str(getfile0Line(234))
player_kills_waterfall = str(getfile0Line(235))
player_kills_hotland = str(getfile0Line(236))
def clearString(str):
str = str.replace('"', '')
return str
def getAreaPicName(areaname):
return areaPicNames[0][areaname]
def convertToReadable(str):
# Location
str = str.replace("{room_name}", data_roomName)
str = str.replace("{room_area}", data_roomArea)
str = str.replace("{room_area_code_name}", data_roomAreaCodeName)
# Player
str = str.replace("{player_lv}", data_LV)
str = str.replace("{player_kills}", data_kills)
str = str.replace("{player_deaths}", data_deaths)
str = str.replace("{player_name}", data_Name)
# Area Kills
str = str.replace("{player_kills_ruins}", player_kills_ruins)
str = str.replace("{player_kills_snowdin}", player_kills_snowdin)
str = str.replace("{player_kills_waterfall}", player_kills_waterfall)
str = str.replace("{player_kills_hotland}", player_kills_hotland)
# General
str = str.replace("{played_time}", data_playtimeHours)
return str
def loadTranslations():
global curDetails, curState
# Loading Translations
curDetails = convertToReadable(undertale_translations['discordUI'][0]['details'])
curState = convertToReadable(undertale_translations['discordUI'][0]['state'])
# Routes: 0 - Neutral; 1 - Genocide
def caluclateCurrentRoute():
loadAreaKills()
ruinsNeededKills = 20
snowdinNeededKills = 16
waterfallNeededKills = 18
hotlandNeededKills = 40
if (data_roomAreaCodeName == "ruins" and int(player_kills_ruins) >= ruinsNeededKills):
return 1
if (data_roomAreaCodeName == "snowdin" and int(player_kills_snowdin) >= snowdinNeededKills):
return 1
if (data_roomAreaCodeName == "waterfall" and int(player_kills_waterfall) >= waterfallNeededKills):
return 1
if (data_roomAreaCodeName == "hotland" and int(player_kills_hotland) >= hotlandNeededKills):
return 1
return 0
def updateRPCWithRoute():
if (caluclateCurrentRoute() == 0):
RPC.update(
details=curDetails,
start=time.time() - int(data_playtimeSeconds),
large_image=getAreaPicName(data_roomArea),
large_text=data_roomArea,
small_image="sans_neutral",
small_text="Neutral Run",
state=curState
)
# If Route is Genocide
if (caluclateCurrentRoute() == 1):
RPC.update(
details=curDetails,
start=time.time() - int(data_playtimeSeconds),
large_image=getAreaPicName(data_roomArea),
large_text=data_roomArea,
small_image="sans_genocide",
small_text="Genocide Run",
state=curState
)
def updateRPC(calcNewTime):
#If time should be calculated or should continue
if(calcNewTime == True):
if (config_showCurrentRoute == "True"):
updateRPCWithRoute()
else:
RPC.update(
details=curDetails,
start=time.time() - int(data_playtimeSeconds),
large_image=getAreaPicName(data_roomArea),
large_text=data_roomArea,
state=curState
)
else:
if (config_showCurrentRoute == "True"):
updateRPCWithRoute()
else:
RPC.update(
details=curDetails,
start=startTime,
large_image=getAreaPicName(data_roomArea),
large_text=data_roomArea,
state=curState
)
def startUpdatePresence():
global startTime
print("Started Rich Presence")
startTime = time.time()-int(data_playtimeSeconds)
# Loading Translations
loadTranslations()
# Updates RPC with calculating a new Time
updateRPC(True)
def updatePresence():
print("Updated Rich Presence")
# Loading Translations
loadTranslations()
# Updates RPC without calculating a new Time
# Otherwise the Time would everytime reset to the time till the last save
updateRPC(False)
# Startup Discord Rich Presence
drpConfigLoad()
configLoad()
loadUndertaleDataJSON()
prepareData()
discordInit()
startUpdatePresence()
# Update Prodcedure
while True:
time.sleep(refreshInterval)
configLoad()
prepareData()
updatePresence()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
849,
19511,
6165,
29914,
30004,
13,
29937,
14211,
814,
744,
8353,
29925,
491,
5774,
3868,
29875,
30004,
13,
29937,
341,
1806,
19245,
448,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29900,
5774,
3868,
29875,
30004,
13,
29937,
849,
19511,
6165,
29914,
30004,
13,
30004,
13,
29937,
1954,
4011,
30004,
13,
3166,
11451,
4569,
663,
1053,
4360,
663,
30004,
13,
5215,
931,
30004,
13,
5215,
2295,
16680,
30004,
13,
5215,
2897,
30004,
13,
3166,
2897,
1053,
2224,
30004,
13,
5215,
4390,
30004,
13,
5215,
1196,
8173,
30004,
13,
30004,
13,
29937,
4593,
30004,
13,
2917,
353,
2295,
16680,
29889,
3991,
11726,
26471,
13,
1445,
29900,
353,
2295,
16680,
29889,
3991,
11726,
26471,
13,
7707,
29886,
2917,
353,
2295,
16680,
29889,
3991,
11726,
26471,
13,
7635,
744,
8353,
29925,
3991,
353,
2224,
29889,
18837,
16908,
877,
2917,
29889,
2172,
1495,
30004,
13,
7620,
14199,
2605,
353,
2224,
29889,
18837,
16908,
29898,
29878,
29915,
29995,
16652,
1964,
20576,
14573,
29001,
718,
364,
12764,
18783,
1001,
6040,
1307,
29905,
7635,
744,
29889,
2172,
1495,
30004,
13,
1445,
29900,
14199,
2605,
353,
2224,
29889,
18837,
16908,
29898,
29878,
29915,
29995,
16652,
1964,
20576,
14573,
29001,
718,
364,
12764,
18783,
1001,
6040,
1307,
29905,
1445,
29900,
1495,
30004,
13,
7635,
744,
1469,
2605,
353,
2224,
29889,
18837,
16908,
29898,
29878,
29915,
1272,
10045,
11675,
1012,
7635,
744,
29918,
1272,
29889,
3126,
1495,
30004,
13,
7635,
744,
4300,
18411,
2605,
353,
2224,
29889,
18837,
16908,
29898,
29878,
29915,
1272,
10045,
11675,
1012,
3396,
29918,
3286,
29880,
800,
29889,
3126,
1495,
30004,
13,
30004,
13,
29937,
501,
2797,
1001,
6040,
1307,
29918,
8353,
29925,
3630,
30004,
13,
2917,
29918,
4294,
7583,
12085,
353,
5852,
30004,
13,
2917,
29918,
2218,
16090,
2052,
4032,
1367,
353,
5124,
30004,
13,
30004,
13,
29937,
501,
2797,
1001,
6040,
1307,
3630,
30004,
13,
1272,
29918,
29895,
6090,
353,
5124,
30004,
13,
1272,
29918,
8345,
1170,
353,
5124,
30004,
13,
1272,
29918,
8345,
13799,
353,
5124,
30004,
13,
1272,
29918,
8345,
13799,
3399,
1170,
353,
5124,
30004,
13,
1272,
29918,
1170,
353,
5124,
30004,
13,
1272,
29918,
29931,
29963,
353,
5124,
30004,
13,
1272,
29918,
1456,
2230,
27535,
353,
5124,
30004,
13,
1272,
29918,
1456,
2230,
29950,
2470,
353,
5124,
30004,
13,
1272,
29918,
311,
493,
29879,
353,
5124,
30004,
13,
30004,
13,
29937,
934,
29900,
3630,
30004,
13,
9106,
29918,
29895,
6090,
29918,
582,
1144,
353,
6213,
30004,
13,
9106,
29918,
29895,
6090,
29918,
29879,
3707,
24581,
353,
6213,
30004,
13,
9106,
29918,
29895,
6090,
29918,
13405,
11950,
353,
6213,
30004,
13,
9106,
29918,
29895,
6090,
29918,
8711,
1049,
353,
6213,
30004,
13,
30004,
13,
29937,
24875,
478,
1503,
30004,
13,
2962,
2481,
353,
5124,
30004,
13,
22379,
12506,
353,
29871,
29896,
29900,
30004,
13,
29934,
9026,
353,
6213,
30004,
13,
7635,
744,
29918,
1272,
353,
6213,
30004,
13,
7635,
744,
29918,
3286,
29880,
800,
353,
6213,
30004,
13,
6203,
29925,
293,
8659,
353,
6213,
30004,
13,
2764,
10602,
353,
6213,
30004,
13,
2764,
2792,
353,
6213,
30004,
13,
30004,
13,
29937,
12782,
16012,
786,
30004,
13,
1753,
4192,
29886,
3991,
5896,
7295,
30004,
13,
1678,
5534,
22332,
744,
1469,
2605,
29892,
22332,
744,
4300,
18411,
2605,
30004,
13,
1678,
4192,
29886,
2917,
29889,
949,
29898,
7635,
744,
8353,
29925,
3991,
8443,
13,
30004,
13,
1678,
396,
16032,
424,
848,
15376,
4153,
1156,
5183,
30004,
13,
1678,
4086,
353,
851,
29898,
8551,
1231,
29898,
657,
8353,
29925,
3991,
1469,
877,
25263,
814,
744,
8353,
29925,
742,
525,
11675,
1495,
467,
5451,
17350,
1159,
29961,
29900,
2314,
30004,
13,
1678,
22332,
744,
1469,
2605,
353,
22332,
744,
1469,
2605,
29889,
6506,
877,
29912,
11675,
29913,
742,
4086,
8443,
13,
1678,
22332,
744,
4300,
18411,
2605,
353,
22332,
744,
4300,
18411,
2605,
29889,
6506,
877,
29912,
11675,
29913,
742,
4086,
8443,
13,
30004,
13,
1753,
2254,
25263,
814,
744,
1469,
7249,
7295,
30004,
13,
1678,
5534,
22332,
744,
29918,
1272,
29892,
22332,
744,
29918,
3286,
29880,
800,
30004,
13,
30004,
13,
1678,
396,
25263,
814,
744,
8353,
29925,
3630,
30004,
13,
1678,
411,
1722,
29898,
7635,
744,
1469,
2605,
29897,
408,
285,
29901,
30004,
13,
4706,
22332,
744,
29918,
1272,
353,
4390,
29889,
1359,
29898,
29888,
8443,
13,
30004,
13,
1678,
396,
14211,
814,
744,
8353,
29925,
4103,
29880,
800,
30004,
13,
1678,
411,
1722,
29898,
7635,
744,
4300,
18411,
2605,
29897,
408,
285,
29901,
30004,
13,
308,
22332,
744,
29918,
3286,
29880,
800,
353,
4390,
29889,
1359,
29898,
29888,
8443,
13,
30004,
13,
1753,
2295,
5896,
7295,
30004,
13,
1678,
2295,
29889,
949,
29898,
7620,
14199,
2605,
8443,
13,
30004,
13,
1753,
2313,
536,
6644,
7295,
30004,
13,
1678,
5534,
390,
9026,
30004,
13,
1678,
3132,
29918,
333,
353,
2295,
29918,
2218,
16090,
2052,
4032,
1367,
30004,
13,
1678,
390,
9026,
353,
4360,
663,
29898,
4645,
29918,
333,
8443,
13,
1678,
390,
9026,
29889,
6915,
26471,
13,
30004,
13,
1753,
679,
8353,
29925,
3991,
1469,
29898,
2042,
29892,
1418,
273,
420,
1125,
30004,
13,
1678,
736,
4192,
29886,
2917,
29961,
2042,
3816,
4130,
273,
420,
29962,
30004,
13,
30004,
13,
1753,
679,
3991,
1469,
29898,
2042,
29892,
1418,
273,
420,
1125,
30004,
13,
1678,
736,
2295,
29961,
2042,
3816,
4130,
273,
420,
29962,
30004,
13,
30004,
13,
1753,
679,
1445,
29900,
3542,
29898,
1220,
1125,
30004,
13,
1678,
396,
3826,
276,
358,
411,
29871,
29896,
1363,
7049,
1369,
472,
29871,
29900,
30004,
13,
1678,
1196,
22361,
29871,
29896,
30004,
13,
1678,
1018,
29901,
30004,
13,
4706,
736,
1722,
29898,
1445,
29900,
14199,
2605,
29892,
376,
29878,
2564,
949,
9012,
580,
29961,
1220,
29962,
30004,
13,
1678,
5174,
29901,
30004,
13,
4706,
736,
29871,
29900,
30004,
13,
30004,
13,
1753,
1051,
1762,
21533,
29898,
20155,
1125,
30004,
13,
1678,
1015,
353,
426,
29875,
29901,
24471,
29961,
29875,
29962,
363,
474,
297,
3464,
29898,
29900,
29892,
7431,
29898,
20155,
876,
8117,
13,
1678,
736,
1015,
30004,
13,
30004,
13,
1753,
19012,
1469,
7295,
30004,
13,
1678,
5534,
848,
29918,
29895,
6090,
29892,
848,
29918,
8345,
1170,
29892,
848,
29918,
8345,
13799,
29892,
848,
29918,
8345,
13799,
3399,
1170,
29892,
848,
29918,
1170,
29892,
848,
29918,
29931,
29963,
29892,
848,
29918,
1456,
2230,
27535,
29892,
848,
29918,
1456,
2230,
29950,
2470,
29892,
848,
29918,
311,
493,
29879,
29892,
2295,
29918,
4294,
7583,
12085,
29892,
2295,
29918,
2218,
16090,
2052,
4032,
1367,
29892,
4038,
29925,
293,
8659,
29892,
11086,
12506,
30004,
13,
30004,
13,
1678,
396,
24162,
278,
14211,
814,
744,
8353,
29925,
12782,
6055,
30004,
13,
1678,
2295,
29918,
4294,
7583,
12085,
353,
851,
29898,
8551,
1231,
29898,
657,
8353,
29925,
3991,
1469,
877,
25263,
814,
744,
8353,
29925,
742,
525,
4294,
12085,
1495,
467,
5451,
17350,
1159,
29961,
29900,
2314,
30004,
13,
1678,
2295,
29918,
2218,
16090,
2052,
4032,
1367,
353,
851,
29898,
8551,
1231,
29898,
657,
8353,
29925,
3991,
1469,
877,
25263,
814,
744,
8353,
29925,
742,
525,
2218,
16090,
2052,
4032,
1367,
1495,
467,
5451,
17350,
1159,
29961,
29900,
2314,
30004,
13,
1678,
11086,
12506,
353,
938,
29898,
8551,
1231,
29898,
657,
8353,
29925,
3991,
1469,
877,
25263,
814,
744,
8353,
29925,
742,
525,
22379,
12506,
1495,
467,
5451,
17350,
1159,
29961,
29900,
2314,
30004,
13,
30004,
13,
1678,
396,
24162,
278,
3630,
30004,
13,
1678,
396,
18320,
413,
6090,
30004,
13,
1678,
2254,
13799,
29968,
6090,
26471,
13,
30004,
13,
1678,
396,
8565,
536,
2401,
18320,
349,
1199,
30004,
13,
1678,
4038,
29925,
293,
8659,
353,
1051,
1762,
21533,
29898,
1761,
29898,
7635,
744,
29918,
1272,
1839,
6203,
4205,
16090,
2052,
29925,
293,
8659,
25901,
30004,
13,
30004,
13,
1678,
396,
1528,
4835,
30004,
13,
1678,
3151,
29968,
6090,
353,
851,
29898,
8551,
1231,
29898,
657,
3991,
1469,
877,
15263,
742,
525,
29968,
6090,
1495,
467,
5451,
17350,
1159,
29961,
29900,
2314,
30004,
13,
1678,
3151,
9588,
290,
10192,
353,
938,
29898,
8551,
1231,
29898,
657,
3991,
1469,
877,
15263,
742,
525,
9588,
290,
1495,
467,
5451,
17350,
1159,
29961,
29900,
2314,
30004,
13,
1678,
3151,
1170,
353,
851,
29898,
8551,
1231,
29898,
657,
3991,
1469,
877,
15263,
742,
525,
1170,
1495,
467,
5451,
17350,
1159,
29961,
29900,
2314,
30004,
13,
1678,
3151,
29931,
29963,
353,
851,
29898,
8551,
1231,
29898,
657,
3991,
1469,
877,
15263,
742,
525,
29931,
994,
1495,
467,
5451,
17350,
1159,
29961,
29900,
2314,
30004,
13,
1678,
3151,
13454,
2230,
10192,
353,
938,
29898,
8551,
1231,
29898,
657,
3991,
1469,
877,
15263,
742,
525,
2481,
1495,
467,
5451,
17350,
1159,
29961,
29900,
2314,
30004,
13,
1678,
1018,
29901,
30004,
13,
4706,
3151,
2772,
493,
29879,
353,
851,
29898,
8551,
1231,
29898,
657,
3991,
1469,
877,
15263,
742,
525,
14199,
957,
1495,
467,
5451,
17350,
1159,
29961,
29900,
2314,
30004,
13,
1678,
5174,
29901,
30004,
13,
4706,
3151,
2772,
493,
29879,
353,
376,
29900,
19451,
13,
30004,
13,
30004,
13,
1678,
396,
21605,
278,
3630,
30004,
13,
1678,
848,
29918,
29895,
6090,
353,
3151,
29968,
6090,
30004,
13,
1678,
848,
29918,
8345,
1170,
353,
22332,
744,
29918,
1272,
1839,
18901,
2033,
29961,
2764,
9588,
290,
10192,
22322,
1170,
2033,
30004,
13,
1678,
848,
29918,
8345,
13799,
353,
22332,
744,
29918,
1272,
1839,
18901,
2033,
29961,
2764,
9588,
290,
10192,
22322,
13799,
2033,
30004,
13,
1678,
848,
29918,
8345,
13799,
3399,
1170,
353,
22332,
744,
29918,
1272,
1839,
18901,
2033,
29961,
2764,
9588,
290,
10192,
22322,
13799,
29918,
19284,
3871,
2033,
30004,
13,
1678,
848,
29918,
1170,
353,
3151,
1170,
30004,
13,
1678,
848,
29918,
29931,
29963,
353,
3151,
29931,
29963,
30004,
13,
1678,
848,
29918,
1456,
2230,
27535,
353,
3151,
13454,
2230,
10192,
847,
29871,
29941,
29900,
30004,
13,
1678,
848,
29918,
1456,
2230,
29950,
2470,
353,
851,
29898,
14486,
29898,
7411,
3552,
29898,
2764,
13454,
2230,
10192,
29914,
29941,
29900,
6802,
29953,
29900,
6802,
29953,
29900,
511,
29871,
29906,
876,
396,
20535,
403,
4693,
1280,
304,
6440,
29879,
769,
304,
3080,
2667,
304,
379,
2470,
322,
5700,
1283,
1156,
29871,
29906,
13677,
7600,
30004,
13,
1678,
848,
29918,
311,
493,
29879,
353,
3151,
2772,
493,
29879,
30004,
13,
30004,
13,
1753,
2254,
13799,
29968,
6090,
7295,
30004,
13,
1678,
396,
1445,
29900,
338,
1641,
1304,
30004,
13,
1678,
5534,
4847,
29918,
29895,
6090,
29918,
582,
1144,
29892,
4847,
29918,
29895,
6090,
29918,
29879,
3707,
24581,
29892,
4847,
29918,
29895,
6090,
29918,
13405,
11950,
29892,
4847,
29918,
29895,
6090,
29918,
8711,
1049,
30004,
13,
1678,
4847,
29918,
29895,
6090,
29918,
582,
1144,
353,
851,
29898,
657,
1445,
29900,
3542,
29898,
29906,
29941,
29941,
876,
30004,
13,
1678,
4847,
29918,
29895,
6090,
29918,
29879,
3707,
24581,
353,
851,
29898,
657,
1445,
29900,
3542,
29898,
29906,
29941,
29946,
876,
30004,
13,
1678,
4847,
29918,
29895,
6090,
29918,
13405,
11950,
353,
851,
29898,
657,
1445,
29900,
3542,
29898,
29906,
29941,
29945,
876,
30004,
13,
1678,
4847,
29918,
29895,
6090,
29918,
8711,
1049,
353,
851,
29898,
657,
1445,
29900,
3542,
29898,
29906,
29941,
29953,
876,
30004,
13,
30004,
13,
1753,
2821,
1231,
29898,
710,
1125,
30004,
13,
1678,
851,
353,
851,
29889,
6506,
877,
29908,
742,
27255,
30004,
13,
1678,
736,
851,
30004,
13,
30004,
13,
1753,
679,
13799,
29925,
293,
1170,
29898,
598,
273,
420,
1125,
30004,
13,
1678,
736,
4038,
29925,
293,
8659,
29961,
29900,
3816,
598,
273,
420,
29962,
30004,
13,
30004,
13,
1753,
3588,
1762,
6359,
519,
29898,
710,
1125,
30004,
13,
1678,
396,
17015,
30004,
13,
1678,
851,
353,
851,
29889,
6506,
703,
29912,
8345,
29918,
978,
17671,
848,
29918,
8345,
1170,
8443,
13,
1678,
851,
353,
851,
29889,
6506,
703,
29912,
8345,
29918,
6203,
17671,
848,
29918,
8345,
13799,
8443,
13,
1678,
851,
353,
851,
29889,
6506,
703,
29912,
8345,
29918,
6203,
29918,
401,
29918,
978,
17671,
848,
29918,
8345,
13799,
3399,
1170,
8443,
13,
30004,
13,
1678,
396,
14574,
30004,
13,
1678,
851,
353,
851,
29889,
6506,
703,
29912,
9106,
29918,
28463,
17671,
848,
29918,
29931,
29963,
8443,
13,
1678,
851,
353,
851,
29889,
6506,
703,
29912,
9106,
29918,
29895,
6090,
17671,
848,
29918,
29895,
6090,
8443,
13,
1678,
851,
353,
851,
29889,
6506,
703,
29912,
9106,
29918,
311,
493,
29879,
17671,
848,
29918,
311,
493,
29879,
8443,
13,
1678,
851,
353,
851,
29889,
6506,
703,
29912,
9106,
29918,
978,
17671,
848,
29918,
1170,
8443,
13,
30004,
13,
1678,
396,
18320,
476,
6090,
30004,
13,
1678,
851,
353,
851,
29889,
6506,
703,
29912,
9106,
29918,
29895,
6090,
29918,
582,
1144,
17671,
4847,
29918,
29895,
6090,
29918,
582,
1144,
8443,
13,
1678,
851,
353,
851,
29889,
6506,
703,
29912,
9106,
29918,
29895,
6090,
29918,
29879,
3707,
24581,
17671,
4847,
29918,
29895,
6090,
29918,
29879,
3707,
24581,
8443,
13,
1678,
851,
353,
851,
29889,
6506,
703,
29912,
9106,
29918,
29895,
6090,
29918,
13405,
11950,
17671,
4847,
29918,
29895,
6090,
29918,
13405,
11950,
8443,
13,
1678,
851,
353,
851,
29889,
6506,
703,
29912,
9106,
29918,
29895,
6090,
29918,
8711,
1049,
17671,
4847,
29918,
29895,
6090,
29918,
8711,
1049,
8443,
13,
30004,
13,
1678,
396,
4593,
30004,
13,
1678,
851,
353,
851,
29889,
6506,
703,
29912,
1456,
287,
29918,
2230,
17671,
848,
29918,
1456,
2230,
29950,
2470,
8443,
13,
30004,
13,
1678,
736,
851,
30004,
13,
30004,
13,
1753,
2254,
4300,
29880,
800,
7295,
30004,
13,
1678,
5534,
3151,
10602,
29892,
3151,
2792,
30004,
13,
30004,
13,
1678,
396,
4309,
9382,
4103,
29880,
800,
30004,
13,
1678,
3151,
10602,
353,
3588,
1762,
6359,
519,
29898,
7635,
744,
29918,
3286,
29880,
800,
1839,
2218,
16090,
3120,
2033,
29961,
29900,
22322,
14144,
2033,
8443,
13,
1678,
3151,
2792,
353,
3588,
1762,
6359,
519,
29898,
7635,
744,
29918,
3286,
29880,
800,
1839,
2218,
16090,
3120,
2033,
29961,
29900,
22322,
3859,
2033,
8443,
13,
30004,
13,
29937,
20829,
267,
29901,
29871,
29900,
448,
2448,
329,
1705,
29936,
29871,
29896,
448,
5739,
29877,
8204,
30004,
13,
1753,
1208,
29884,
695,
403,
7583,
12085,
7295,
30004,
13,
1678,
2254,
13799,
29968,
6090,
26471,
13,
1678,
5796,
1144,
8139,
19226,
29968,
6090,
353,
29871,
29906,
29900,
30004,
13,
1678,
15007,
24581,
8139,
19226,
29968,
6090,
353,
29871,
29896,
29953,
30004,
13,
1678,
4094,
11950,
8139,
19226,
29968,
6090,
353,
29871,
29896,
29947,
30004,
13,
1678,
7375,
1049,
8139,
19226,
29968,
6090,
353,
29871,
29946,
29900,
30004,
13,
30004,
13,
1678,
565,
313,
1272,
29918,
8345,
13799,
3399,
1170,
1275,
376,
582,
1144,
29908,
322,
938,
29898,
9106,
29918,
29895,
6090,
29918,
582,
1144,
29897,
6736,
5796,
1144,
8139,
19226,
29968,
6090,
1125,
30004,
13,
4706,
736,
29871,
29896,
30004,
13,
1678,
565,
313,
1272,
29918,
8345,
13799,
3399,
1170,
1275,
376,
29879,
3707,
24581,
29908,
322,
938,
29898,
9106,
29918,
29895,
6090,
29918,
29879,
3707,
24581,
29897,
6736,
15007,
24581,
8139,
19226,
29968,
6090,
1125,
30004,
13,
4706,
736,
29871,
29896,
30004,
13,
1678,
565,
313,
1272,
29918,
8345,
13799,
3399,
1170,
1275,
376,
13405,
11950,
29908,
322,
938,
29898,
9106,
29918,
29895,
6090,
29918,
13405,
11950,
29897,
6736,
4094,
11950,
8139,
19226,
29968,
6090,
1125,
30004,
13,
4706,
736,
29871,
29896,
30004,
13,
1678,
565,
313,
1272,
29918,
8345,
13799,
3399,
1170,
1275,
376,
8711,
1049,
29908,
322,
938,
29898,
9106,
29918,
29895,
6090,
29918,
8711,
1049,
29897,
6736,
7375,
1049,
8139,
19226,
29968,
6090,
1125,
30004,
13,
4706,
736,
29871,
29896,
30004,
13,
1678,
736,
29871,
29900,
30004,
13,
30004,
13,
1753,
2767,
29934,
9026,
3047,
12085,
7295,
30004,
13,
1678,
565,
313,
1052,
29884,
695,
403,
7583,
12085,
580,
1275,
29871,
29900,
1125,
30004,
13,
4706,
390,
9026,
29889,
5504,
29898,
30004,
13,
9651,
4902,
29922,
2764,
10602,
11167,
13,
9651,
1369,
29922,
2230,
29889,
2230,
580,
448,
938,
29898,
1272,
29918,
1456,
2230,
27535,
511,
30004,
13,
9651,
2919,
29918,
3027,
29922,
657,
13799,
29925,
293,
1170,
29898,
1272,
29918,
8345,
13799,
511,
30004,
13,
9651,
2919,
29918,
726,
29922,
1272,
29918,
8345,
13799,
11167,
13,
9651,
2319,
29918,
3027,
543,
29879,
550,
29918,
17821,
1705,
15231,
13,
9651,
2319,
29918,
726,
543,
8139,
329,
1705,
7525,
15231,
13,
9651,
2106,
29922,
2764,
2792,
30004,
13,
4706,
1723,
30004,
13,
1678,
396,
960,
12034,
338,
5739,
29877,
8204,
30004,
13,
1678,
565,
313,
1052,
29884,
695,
403,
7583,
12085,
580,
1275,
29871,
29896,
1125,
30004,
13,
4706,
390,
9026,
29889,
5504,
29898,
30004,
13,
9651,
4902,
29922,
2764,
10602,
11167,
13,
9651,
1369,
29922,
2230,
29889,
2230,
580,
448,
938,
29898,
1272,
29918,
1456,
2230,
27535,
511,
30004,
13,
9651,
2919,
29918,
3027,
29922,
657,
13799,
29925,
293,
1170,
29898,
1272,
29918,
8345,
13799,
511,
30004,
13,
9651,
2919,
29918,
726,
29922,
1272,
29918,
8345,
13799,
11167,
13,
9651,
2319,
29918,
3027,
543,
29879,
550,
29918,
1885,
29877,
8204,
15231,
13,
9651,
2319,
29918,
726,
543,
29954,
8154,
8204,
7525,
15231,
13,
9651,
2106,
29922,
2764,
2792,
30004,
13,
4706,
1723,
30004,
13,
30004,
13,
1753,
2767,
29934,
9026,
29898,
28667,
4373,
2481,
1125,
30004,
13,
1678,
396,
3644,
931,
881,
367,
12833,
470,
881,
6773,
30004,
13,
1678,
565,
29898,
28667,
4373,
2481,
1275,
5852,
1125,
30004,
13,
4706,
565,
313,
2917,
29918,
4294,
7583,
12085,
1275,
376,
5574,
29908,
1125,
30004,
13,
9651,
2767,
29934,
9026,
3047,
12085,
26471,
13,
4706,
1683,
29901,
30004,
13,
9651,
390,
9026,
29889,
5504,
29898,
30004,
13,
18884,
4902,
29922,
2764,
10602,
11167,
13,
18884,
1369,
29922,
2230,
29889,
2230,
580,
448,
938,
29898,
1272,
29918,
1456,
2230,
27535,
511,
30004,
13,
18884,
2919,
29918,
3027,
29922,
657,
13799,
29925,
293,
1170,
29898,
1272,
29918,
8345,
13799,
511,
30004,
13,
18884,
2919,
29918,
726,
29922,
1272,
29918,
8345,
13799,
11167,
13,
18884,
2106,
29922,
2764,
2792,
30004,
13,
9651,
1723,
30004,
13,
1678,
1683,
29901,
30004,
13,
4706,
565,
313,
2917,
29918,
4294,
7583,
12085,
1275,
376,
5574,
29908,
1125,
30004,
13,
9651,
2767,
29934,
9026,
3047,
12085,
26471,
13,
4706,
1683,
29901,
30004,
13,
9651,
390,
9026,
29889,
5504,
29898,
30004,
13,
18884,
4902,
29922,
2764,
10602,
11167,
13,
18884,
1369,
29922,
2962,
2481,
11167,
13,
18884,
2919,
29918,
3027,
29922,
657,
13799,
29925,
293,
1170,
29898,
1272,
29918,
8345,
13799,
511,
30004,
13,
18884,
2919,
29918,
726,
29922,
1272,
29918,
8345,
13799,
11167,
13,
18884,
2106,
29922,
2764,
2792,
30004,
13,
9651,
1723,
30004,
13,
30004,
13,
1753,
1369,
6422,
13504,
663,
7295,
30004,
13,
1678,
5534,
1369,
2481,
30004,
13,
1678,
1596,
703,
4763,
287,
4385,
4360,
663,
1159,
30004,
13,
1678,
1369,
2481,
353,
931,
29889,
2230,
580,
29899,
524,
29898,
1272,
29918,
1456,
2230,
27535,
8443,
13,
30004,
13,
1678,
396,
4309,
9382,
4103,
29880,
800,
30004,
13,
1678,
2254,
4300,
29880,
800,
26471,
13,
30004,
13,
1678,
396,
5020,
15190,
390,
9026,
411,
25202,
263,
716,
5974,
30004,
13,
1678,
2767,
29934,
9026,
29898,
5574,
8443,
13,
30004,
13,
1753,
2767,
13504,
663,
7295,
30004,
13,
1678,
1596,
703,
29248,
4385,
4360,
663,
1159,
30004,
13,
30004,
13,
1678,
396,
4309,
9382,
4103,
29880,
800,
30004,
13,
1678,
2254,
4300,
29880,
800,
26471,
13,
30004,
13,
1678,
396,
5020,
15190,
390,
9026,
1728,
25202,
263,
716,
5974,
30004,
13,
1678,
396,
13466,
278,
5974,
723,
1432,
2230,
10092,
304,
278,
931,
3428,
278,
1833,
4078,
30004,
13,
1678,
2767,
29934,
9026,
29898,
8824,
8443,
13,
30004,
13,
29937,
7370,
786,
8565,
536,
4385,
4360,
663,
30004,
13,
7707,
29886,
3991,
5896,
26471,
13,
2917,
5896,
26471,
13,
1359,
25263,
814,
744,
1469,
7249,
26471,
13,
19125,
1469,
26471,
13,
2218,
16090,
6644,
26471,
13,
2962,
6422,
13504,
663,
26471,
13,
30004,
13,
29937,
10318,
1019,
29881,
26600,
30004,
13,
8000,
5852,
29901,
30004,
13,
1678,
931,
29889,
17059,
29898,
22379,
12506,
8443,
13,
1678,
2295,
5896,
26471,
13,
1678,
19012,
1469,
26471,
13,
1678,
2767,
13504,
663,
26471,
13,
2
] |
app/board/handlers/figure.py | CodeSopranos/SopranosWeb | 0 | 130419 | from django.urls import reverse
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth import login, logout, authenticate
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.decorators import login_required
from django.shortcuts import render, redirect, get_object_or_404
from django.contrib.auth.models import User
from board.models import Dashboard, Figure
from board.analyzer.Frequency import Frequency
@login_required(login_url='/board/signin/')
def add_figure(request, dashboard_id):
try:
figure_type = request.POST['figure_type']
except:
error_message = 'Please select figure type!'
context = {'error': error_message}
return get_dashboard(request, dashboard_id, additional_context=context)
dashboard = get_object_or_404(Dashboard, pk=dashboard_id)
analyzed_data = {'lol':1}
if figure_type == 'Frequency analysis':
analyzer = Frequency(dashboard.data)
analyzer.preprocess()
analyzed_data = analyzer.analyze().to_dict()
Figure.objects.create(dashboard=dashboard, type=figure_type, data=analyzed_data, params={'lol':1})
return HttpResponseRedirect(reverse('dashboard_by_id',
kwargs={'dashboard_id': dashboard_id}))
| [
1,
515,
9557,
29889,
26045,
1053,
11837,
13,
3166,
9557,
29889,
1124,
1053,
9056,
5103,
29892,
9056,
5103,
24735,
13,
13,
3166,
9557,
29889,
21570,
29889,
5150,
1053,
6464,
29892,
1480,
449,
29892,
15585,
403,
13,
3166,
9557,
29889,
21570,
29889,
5150,
29889,
9514,
1053,
4911,
9832,
362,
2500,
13,
3166,
9557,
29889,
21570,
29889,
5150,
29889,
19557,
4097,
1053,
6464,
29918,
12403,
13,
13,
3166,
9557,
29889,
12759,
7582,
29879,
1053,
4050,
29892,
6684,
29892,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
13,
13,
13,
3166,
9557,
29889,
21570,
29889,
5150,
29889,
9794,
1053,
4911,
13,
3166,
7613,
29889,
9794,
1053,
360,
1161,
3377,
29892,
11479,
13,
13,
3166,
7613,
29889,
24209,
3298,
29889,
23923,
23860,
1053,
3878,
23860,
13,
13,
29992,
7507,
29918,
12403,
29898,
7507,
29918,
2271,
2433,
29914,
3377,
29914,
4530,
262,
29914,
1495,
13,
1753,
788,
29918,
4532,
29898,
3827,
29892,
12569,
3377,
29918,
333,
1125,
13,
1678,
1018,
29901,
13,
4706,
4377,
29918,
1853,
353,
2009,
29889,
5438,
1839,
4532,
29918,
1853,
2033,
13,
1678,
5174,
29901,
13,
4706,
1059,
29918,
4906,
353,
525,
12148,
1831,
4377,
1134,
20714,
13,
4706,
3030,
353,
11117,
2704,
2396,
1059,
29918,
4906,
29913,
13,
4706,
736,
679,
29918,
14592,
3377,
29898,
3827,
29892,
12569,
3377,
29918,
333,
29892,
5684,
29918,
4703,
29922,
4703,
29897,
13,
1678,
12569,
3377,
353,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
29898,
29928,
1161,
3377,
29892,
282,
29895,
29922,
14592,
3377,
29918,
333,
29897,
13,
1678,
29537,
287,
29918,
1272,
353,
11117,
29880,
324,
2396,
29896,
29913,
13,
1678,
565,
4377,
29918,
1853,
1275,
525,
23923,
23860,
7418,
2396,
13,
4706,
16455,
3298,
353,
3878,
23860,
29898,
14592,
3377,
29889,
1272,
29897,
13,
4706,
16455,
3298,
29889,
1457,
5014,
580,
13,
4706,
29537,
287,
29918,
1272,
353,
16455,
3298,
29889,
24209,
911,
2141,
517,
29918,
8977,
580,
13,
1678,
11479,
29889,
12650,
29889,
3258,
29898,
14592,
3377,
29922,
14592,
3377,
29892,
1134,
29922,
4532,
29918,
1853,
29892,
848,
29922,
7054,
12339,
287,
29918,
1272,
29892,
8636,
3790,
29915,
29880,
324,
2396,
29896,
1800,
13,
1678,
736,
9056,
5103,
24735,
29898,
24244,
877,
14592,
3377,
29918,
1609,
29918,
333,
742,
13,
462,
18884,
9049,
5085,
3790,
29915,
14592,
3377,
29918,
333,
2396,
12569,
3377,
29918,
333,
20073,
13,
2
] |
runs.py | petch/elsticity2019 | 1 | 37464 | <filename>runs.py
from ahm import *
from dfm import *
set_log_level(LogLevel.WARNING)
def run(N, n, h, k, c, g, f, ls='mumps', pc='default', do_write=True):
t1 = Timer()
m = int(N/n)
l = int(m/2)
fp, fm, fd, fb = fibers(N, N, l, h, n, k*n, do_write)
tp, tm, td, tb = fibers(N, N, 0, 0, n, k*n, do_write)
lp, lm, ld, lb = fibers(int(m/c), int(m/c), int(l/c), int(h/c), 1, k, do_write)
cp, cm, cd, cb = fibers(int(m/c), int(m/c), int(l/c/n), int(h/c/n), n, k*n, do_write)
E = [20e9, f*20e9]
mu, lmd = lame(E, [0.3, 0.3])
t1.stop()
t2 = Timer()
u = fem(fp, fm, fd, fb, mu, lmd, g, ls, pc, do_write)
ul2 = norm(u)
uli = norm(u.vector(), 'linf')
t2.stop()
t3 = Timer()
ua = ahm(lp + 'ahm_', lm, ld, lb, cp + 'ahm_', cm, cd, cb, mu, lmd, g, ls, pc, do_write)
ea = project(ua - u, u.function_space(), solver_type=ls, preconditioner_type=pc)
eal2 = norm(ea)/ul2
eali = norm(ea.vector(), 'linf')/uli
if do_write:
XDMFFile(fp + 'ahm_error.xdmf').write(ea)
t3.stop()
t4 = Timer()
ud = dfm(cp + 'dfm_', cm, cd, cb, mu, lmd, g, h/N, ls, pc, do_write)
ed = project(ud - u, u.function_space(), solver_type=ls, preconditioner_type=pc)
edl2 = norm(ed)/ul2
edli = norm(ed.vector(), 'linf')/uli
if do_write:
XDMFFile(fp + 'dfm_error.xdmf').write(ed)
t4.stop()
# print(t1.elapsed()[0], t2.elapsed()[0], t3.elapsed()[0], t4.elapsed()[0])
return eal2, eali, edl2, edli
# for ls in ['bicgstab', 'cg', 'gmres', 'minres', 'tfqmr']:
# for pc in ['amg', 'hypre_amg', 'hypre_euclid', 'hypre_parasails']:
# timer = Timer()
# try:
# eal2, eali, edl2, edli = run(256, 1, 2, 2, 1, ls, pc, False)
# print(ls, pc, timer.elapsed(), eal2, eali, edl2, edli)
# except:
# print(ls, pc, timer.elapsed(), 'error')
ls, pc, do_write = 'cg', 'amg', False
N0, n0, k0, d0, c0, f0 = 2048, 4, 1, 2, 1, 32
for g in [Constant([0, -1e5])]:
# run(N0, n0, d0, k0, c0, g, f0, ls, pc, True)
print('k\teal2\teali\tedl2\tedli')
for k in [1, 2, 4, 8, 16]:
eal2, eali, edl2, edli = run(N0, n0, d0, k, c0, g, f0, ls, pc, do_write)
print(f'{k*n0*n0}\t{eal2}\t{eali}\t{edl2}\t{edli}')
print('d\teal2\teali\tedl2\tedli')
for d in [2, 4, 8, 16, 32]:
eal2, eali, edl2, edli = run(N0, n0, d, k0, c0, g, f0, ls, pc, do_write)
print(f'{d/N0}\t{eal2}\t{eali}\t{edl2}\t{edli}')
print('f\teal2\teali\tedl2\tedli')
for f in [8, 16, 32, 64, 128]:
eal2, eali, edl2, edli = run(N0, n0, d0, k0, c0, g, f, ls, pc, do_write)
print(f'{f}\t{eal2}\t{eali}\t{edl2}\t{edli}')
print('n\teal2\teali\tedl2\tedli')
for n in [1, 2, 4, 8, 16]:
eal2, eali, edl2, edli = run(int(N0*n/16), n, d0, k0, c0, g, f0, ls, pc, do_write)
print(f'{n}\t{eal2}\t{eali}\t{edl2}\t{edli}')
print('h\teal2\teali\tedl2\tedli')
for c in [16, 8, 4, 2, 1]:
eal2, eali, edl2, edli = run(N0, n0, 16*d0, k0, c, g, f0, ls, pc, do_write)
print(f'{int(c/N0)}\t{eal2}\t{eali}\t{edl2}\t{edli}') | [
1,
529,
9507,
29958,
3389,
29879,
29889,
2272,
13,
3166,
263,
7184,
1053,
334,
13,
3166,
4489,
29885,
1053,
334,
13,
13,
842,
29918,
1188,
29918,
5563,
29898,
3403,
10108,
29889,
29956,
25614,
29897,
13,
13,
1753,
1065,
29898,
29940,
29892,
302,
29892,
298,
29892,
413,
29892,
274,
29892,
330,
29892,
285,
29892,
19375,
2433,
29885,
17204,
742,
22844,
2433,
4381,
742,
437,
29918,
3539,
29922,
5574,
1125,
13,
1678,
260,
29896,
353,
29168,
580,
13,
1678,
286,
353,
938,
29898,
29940,
29914,
29876,
29897,
13,
1678,
301,
353,
938,
29898,
29885,
29914,
29906,
29897,
13,
1678,
285,
29886,
29892,
285,
29885,
29892,
285,
29881,
29892,
285,
29890,
353,
18755,
414,
29898,
29940,
29892,
405,
29892,
301,
29892,
298,
29892,
302,
29892,
413,
29930,
29876,
29892,
437,
29918,
3539,
29897,
13,
1678,
260,
29886,
29892,
27702,
29892,
22599,
29892,
260,
29890,
353,
18755,
414,
29898,
29940,
29892,
405,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
302,
29892,
413,
29930,
29876,
29892,
437,
29918,
3539,
29897,
13,
1678,
301,
29886,
29892,
301,
29885,
29892,
301,
29881,
29892,
27981,
353,
18755,
414,
29898,
524,
29898,
29885,
29914,
29883,
511,
938,
29898,
29885,
29914,
29883,
511,
938,
29898,
29880,
29914,
29883,
511,
938,
29898,
29882,
29914,
29883,
511,
29871,
29896,
29892,
413,
29892,
437,
29918,
3539,
29897,
13,
1678,
21447,
29892,
7477,
29892,
14965,
29892,
26324,
353,
18755,
414,
29898,
524,
29898,
29885,
29914,
29883,
511,
938,
29898,
29885,
29914,
29883,
511,
938,
29898,
29880,
29914,
29883,
29914,
29876,
511,
938,
29898,
29882,
29914,
29883,
29914,
29876,
511,
302,
29892,
413,
29930,
29876,
29892,
437,
29918,
3539,
29897,
13,
1678,
382,
353,
518,
29906,
29900,
29872,
29929,
29892,
285,
29930,
29906,
29900,
29872,
29929,
29962,
13,
1678,
3887,
29892,
301,
3487,
353,
301,
420,
29898,
29923,
29892,
518,
29900,
29889,
29941,
29892,
29871,
29900,
29889,
29941,
2314,
13,
1678,
260,
29896,
29889,
9847,
580,
13,
268,
13,
1678,
260,
29906,
353,
29168,
580,
13,
1678,
318,
353,
4445,
29898,
18091,
29892,
285,
29885,
29892,
285,
29881,
29892,
285,
29890,
29892,
3887,
29892,
301,
3487,
29892,
330,
29892,
19375,
29892,
22844,
29892,
437,
29918,
3539,
29897,
13,
1678,
9238,
29906,
353,
6056,
29898,
29884,
29897,
13,
1678,
318,
492,
353,
6056,
29898,
29884,
29889,
8111,
3285,
525,
1915,
29888,
1495,
13,
1678,
260,
29906,
29889,
9847,
580,
13,
13,
1678,
260,
29941,
353,
29168,
580,
13,
1678,
318,
29874,
353,
263,
7184,
29898,
22833,
718,
525,
801,
29885,
29918,
742,
301,
29885,
29892,
301,
29881,
29892,
27981,
29892,
21447,
718,
525,
801,
29885,
29918,
742,
7477,
29892,
14965,
29892,
26324,
29892,
3887,
29892,
301,
3487,
29892,
330,
29892,
19375,
29892,
22844,
29892,
437,
29918,
3539,
29897,
13,
1678,
321,
29874,
353,
2060,
29898,
3357,
448,
318,
29892,
318,
29889,
2220,
29918,
3493,
3285,
899,
369,
29918,
1853,
29922,
3137,
29892,
758,
16122,
261,
29918,
1853,
29922,
6739,
29897,
13,
1678,
321,
284,
29906,
353,
6056,
29898,
11248,
6802,
352,
29906,
13,
1678,
321,
2606,
353,
6056,
29898,
11248,
29889,
8111,
3285,
525,
1915,
29888,
1495,
29914,
14549,
13,
1678,
565,
437,
29918,
3539,
29901,
13,
4706,
1060,
23560,
29943,
2283,
29898,
18091,
718,
525,
801,
29885,
29918,
2704,
29889,
29916,
18933,
29888,
2824,
3539,
29898,
11248,
29897,
13,
1678,
260,
29941,
29889,
9847,
580,
13,
13,
1678,
260,
29946,
353,
29168,
580,
13,
1678,
11430,
353,
4489,
29885,
29898,
6814,
718,
525,
2176,
29885,
29918,
742,
7477,
29892,
14965,
29892,
26324,
29892,
3887,
29892,
301,
3487,
29892,
330,
29892,
298,
29914,
29940,
29892,
19375,
29892,
22844,
29892,
437,
29918,
3539,
29897,
13,
1678,
1226,
353,
2060,
29898,
566,
448,
318,
29892,
318,
29889,
2220,
29918,
3493,
3285,
899,
369,
29918,
1853,
29922,
3137,
29892,
758,
16122,
261,
29918,
1853,
29922,
6739,
29897,
13,
1678,
1226,
29880,
29906,
353,
6056,
29898,
287,
6802,
352,
29906,
13,
1678,
1226,
492,
353,
6056,
29898,
287,
29889,
8111,
3285,
525,
1915,
29888,
1495,
29914,
14549,
13,
1678,
565,
437,
29918,
3539,
29901,
13,
4706,
1060,
23560,
29943,
2283,
29898,
18091,
718,
525,
2176,
29885,
29918,
2704,
29889,
29916,
18933,
29888,
2824,
3539,
29898,
287,
29897,
13,
1678,
260,
29946,
29889,
9847,
580,
13,
13,
1678,
396,
1596,
29898,
29873,
29896,
29889,
295,
28170,
580,
29961,
29900,
1402,
260,
29906,
29889,
295,
28170,
580,
29961,
29900,
1402,
260,
29941,
29889,
295,
28170,
580,
29961,
29900,
1402,
260,
29946,
29889,
295,
28170,
580,
29961,
29900,
2314,
13,
1678,
736,
321,
284,
29906,
29892,
321,
2606,
29892,
1226,
29880,
29906,
29892,
1226,
492,
13,
13,
13,
29937,
363,
19375,
297,
6024,
29890,
293,
29887,
29256,
742,
525,
29883,
29887,
742,
525,
29887,
29885,
690,
742,
525,
1195,
690,
742,
525,
13264,
29939,
29885,
29878,
2033,
29901,
13,
29937,
268,
363,
22844,
297,
6024,
314,
29887,
742,
525,
5819,
1457,
29918,
314,
29887,
742,
525,
5819,
1457,
29918,
12932,
695,
333,
742,
525,
5819,
1457,
29918,
862,
294,
2234,
2033,
29901,
13,
29937,
308,
12237,
353,
29168,
580,
13,
29937,
308,
1018,
29901,
13,
29937,
632,
321,
284,
29906,
29892,
321,
2606,
29892,
1226,
29880,
29906,
29892,
1226,
492,
353,
1065,
29898,
29906,
29945,
29953,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29906,
29892,
29871,
29896,
29892,
19375,
29892,
22844,
29892,
7700,
29897,
13,
29937,
632,
1596,
29898,
3137,
29892,
22844,
29892,
12237,
29889,
295,
28170,
3285,
321,
284,
29906,
29892,
321,
2606,
29892,
1226,
29880,
29906,
29892,
1226,
492,
29897,
13,
29937,
308,
5174,
29901,
13,
29937,
632,
1596,
29898,
3137,
29892,
22844,
29892,
12237,
29889,
295,
28170,
3285,
525,
2704,
1495,
13,
13,
3137,
29892,
22844,
29892,
437,
29918,
3539,
353,
525,
29883,
29887,
742,
525,
314,
29887,
742,
7700,
13,
13,
29940,
29900,
29892,
302,
29900,
29892,
413,
29900,
29892,
270,
29900,
29892,
274,
29900,
29892,
285,
29900,
353,
29871,
29906,
29900,
29946,
29947,
29892,
29871,
29946,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29896,
29892,
29871,
29941,
29906,
13,
13,
13,
1454,
330,
297,
518,
12075,
424,
4197,
29900,
29892,
448,
29896,
29872,
29945,
2314,
5387,
13,
1678,
396,
1065,
29898,
29940,
29900,
29892,
302,
29900,
29892,
270,
29900,
29892,
413,
29900,
29892,
274,
29900,
29892,
330,
29892,
285,
29900,
29892,
19375,
29892,
22844,
29892,
5852,
29897,
13,
1678,
1596,
877,
29895,
29905,
371,
284,
29906,
29905,
371,
2606,
29905,
9446,
29880,
29906,
29905,
9446,
492,
1495,
13,
1678,
363,
413,
297,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29946,
29892,
29871,
29947,
29892,
29871,
29896,
29953,
5387,
13,
4706,
321,
284,
29906,
29892,
321,
2606,
29892,
1226,
29880,
29906,
29892,
1226,
492,
353,
1065,
29898,
29940,
29900,
29892,
302,
29900,
29892,
270,
29900,
29892,
413,
29892,
274,
29900,
29892,
330,
29892,
285,
29900,
29892,
19375,
29892,
22844,
29892,
437,
29918,
3539,
29897,
13,
4706,
1596,
29898,
29888,
29915,
29912,
29895,
29930,
29876,
29900,
29930,
29876,
29900,
1012,
29873,
29912,
29872,
284,
29906,
1012,
29873,
29912,
29872,
2606,
1012,
29873,
29912,
287,
29880,
29906,
1012,
29873,
29912,
287,
492,
29913,
1495,
13,
1678,
1596,
877,
29881,
29905,
371,
284,
29906,
29905,
371,
2606,
29905,
9446,
29880,
29906,
29905,
9446,
492,
1495,
13,
1678,
363,
270,
297,
518,
29906,
29892,
29871,
29946,
29892,
29871,
29947,
29892,
29871,
29896,
29953,
29892,
29871,
29941,
29906,
5387,
13,
4706,
321,
284,
29906,
29892,
321,
2606,
29892,
1226,
29880,
29906,
29892,
1226,
492,
353,
1065,
29898,
29940,
29900,
29892,
302,
29900,
29892,
270,
29892,
413,
29900,
29892,
274,
29900,
29892,
330,
29892,
285,
29900,
29892,
19375,
29892,
22844,
29892,
437,
29918,
3539,
29897,
13,
4706,
1596,
29898,
29888,
29915,
29912,
29881,
29914,
29940,
29900,
1012,
29873,
29912,
29872,
284,
29906,
1012,
29873,
29912,
29872,
2606,
1012,
29873,
29912,
287,
29880,
29906,
1012,
29873,
29912,
287,
492,
29913,
1495,
13,
1678,
1596,
877,
29888,
29905,
371,
284,
29906,
29905,
371,
2606,
29905,
9446,
29880,
29906,
29905,
9446,
492,
1495,
13,
1678,
363,
285,
297,
518,
29947,
29892,
29871,
29896,
29953,
29892,
29871,
29941,
29906,
29892,
29871,
29953,
29946,
29892,
29871,
29896,
29906,
29947,
5387,
13,
4706,
321,
284,
29906,
29892,
321,
2606,
29892,
1226,
29880,
29906,
29892,
1226,
492,
353,
1065,
29898,
29940,
29900,
29892,
302,
29900,
29892,
270,
29900,
29892,
413,
29900,
29892,
274,
29900,
29892,
330,
29892,
285,
29892,
19375,
29892,
22844,
29892,
437,
29918,
3539,
29897,
13,
4706,
1596,
29898,
29888,
29915,
29912,
29888,
1012,
29873,
29912,
29872,
284,
29906,
1012,
29873,
29912,
29872,
2606,
1012,
29873,
29912,
287,
29880,
29906,
1012,
29873,
29912,
287,
492,
29913,
1495,
13,
1678,
1596,
877,
29876,
29905,
371,
284,
29906,
29905,
371,
2606,
29905,
9446,
29880,
29906,
29905,
9446,
492,
1495,
13,
1678,
363,
302,
297,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29946,
29892,
29871,
29947,
29892,
29871,
29896,
29953,
5387,
13,
4706,
321,
284,
29906,
29892,
321,
2606,
29892,
1226,
29880,
29906,
29892,
1226,
492,
353,
1065,
29898,
524,
29898,
29940,
29900,
29930,
29876,
29914,
29896,
29953,
511,
302,
29892,
270,
29900,
29892,
413,
29900,
29892,
274,
29900,
29892,
330,
29892,
285,
29900,
29892,
19375,
29892,
22844,
29892,
437,
29918,
3539,
29897,
13,
4706,
1596,
29898,
29888,
29915,
29912,
29876,
1012,
29873,
29912,
29872,
284,
29906,
1012,
29873,
29912,
29872,
2606,
1012,
29873,
29912,
287,
29880,
29906,
1012,
29873,
29912,
287,
492,
29913,
1495,
13,
1678,
1596,
877,
29882,
29905,
371,
284,
29906,
29905,
371,
2606,
29905,
9446,
29880,
29906,
29905,
9446,
492,
1495,
13,
1678,
363,
274,
297,
518,
29896,
29953,
29892,
29871,
29947,
29892,
29871,
29946,
29892,
29871,
29906,
29892,
29871,
29896,
5387,
13,
4706,
321,
284,
29906,
29892,
321,
2606,
29892,
1226,
29880,
29906,
29892,
1226,
492,
353,
1065,
29898,
29940,
29900,
29892,
302,
29900,
29892,
29871,
29896,
29953,
29930,
29881,
29900,
29892,
413,
29900,
29892,
274,
29892,
330,
29892,
285,
29900,
29892,
19375,
29892,
22844,
29892,
437,
29918,
3539,
29897,
13,
4706,
1596,
29898,
29888,
29915,
29912,
524,
29898,
29883,
29914,
29940,
29900,
11383,
29873,
29912,
29872,
284,
29906,
1012,
29873,
29912,
29872,
2606,
1012,
29873,
29912,
287,
29880,
29906,
1012,
29873,
29912,
287,
492,
29913,
1495,
2
] |
mgcpy/independence_tests/unit_tests/mgc/data/gen_sims.py | neurodata-papers/mgc | 5 | 192526 | import numpy as np
from mgcpy.benchmarks.simulations import (circle_sim, cub_sim, exp_sim,
joint_sim, linear_sim, log_sim,
multi_indep_sim, multi_noise_sim,
quad_sim, root_sim, sin_sim,
spiral_sim, square_sim, step_sim,
two_parab_sim, ubern_sim, w_sim)
def gen_data(data_dir="./mgcpy/independence_tests/unit_tests/mgc/data/input/"):
NUM_SAMPLES = 50
NUM_DIMS = 1
def sin_sim_16(x, y): return sin_sim(x, y, period=16*np.pi)
def ellipsis_sim(x, y): return circle_sim(x, y, radius=5)
def square_sim_(x, y): return square_sim(x, y, period=-np.pi/4, indep=True)
simulations = [linear_sim, exp_sim, cub_sim, joint_sim, step_sim,
quad_sim, w_sim, spiral_sim, ubern_sim, log_sim,
root_sim, sin_sim, sin_sim_16, square_sim, two_parab_sim,
circle_sim, ellipsis_sim, square_sim_, multi_noise_sim, multi_indep_sim]
for simulation in simulations:
x, y = simulation(NUM_SAMPLES, NUM_DIMS)
np.savetxt(data_dir + str(simulation.__name__) + "_x.csv", x, delimiter=",")
np.savetxt(data_dir + str(simulation.__name__) + "_y.csv", y, delimiter=",")
def load_results(file_name, results_dir="./mgcpy/independence_tests/unit_tests/mgc/data/mgc/"):
mgc_results = np.genfromtxt(results_dir + file_name, delimiter=',')[1:]
pMGC = mgc_results[:, 0][0]
statMGC = mgc_results[:, 1][0]
pLocalCorr = mgc_results[:, 2:52]
localCorr = mgc_results[:, 52:102]
optimalScale = mgc_results[:, 102:104][0]
return (pMGC, statMGC, pLocalCorr, localCorr, optimalScale)
if __name__ == '__main__':
gen_data()
# print(load_results("linear_sim_res.csv"))
| [
1,
1053,
12655,
408,
7442,
13,
3166,
286,
29887,
23141,
29889,
1785,
16580,
29879,
29889,
3601,
8250,
1053,
313,
16622,
29918,
3601,
29892,
13630,
29918,
3601,
29892,
1518,
29918,
3601,
29892,
13,
462,
462,
3986,
14002,
29918,
3601,
29892,
5608,
29918,
3601,
29892,
1480,
29918,
3601,
29892,
13,
462,
462,
3986,
2473,
29918,
262,
2716,
29918,
3601,
29892,
2473,
29918,
1217,
895,
29918,
3601,
29892,
13,
462,
462,
3986,
18890,
29918,
3601,
29892,
3876,
29918,
3601,
29892,
4457,
29918,
3601,
29892,
13,
462,
462,
3986,
6337,
284,
29918,
3601,
29892,
6862,
29918,
3601,
29892,
4331,
29918,
3601,
29892,
13,
462,
462,
3986,
1023,
29918,
862,
370,
29918,
3601,
29892,
318,
5892,
29918,
3601,
29892,
281,
29918,
3601,
29897,
13,
13,
13,
1753,
2531,
29918,
1272,
29898,
1272,
29918,
3972,
543,
6904,
29885,
29887,
23141,
29914,
262,
2716,
355,
663,
29918,
21150,
29914,
5441,
29918,
21150,
29914,
29885,
27354,
29914,
1272,
29914,
2080,
12975,
1125,
13,
1678,
28019,
29918,
8132,
3580,
17101,
353,
29871,
29945,
29900,
13,
1678,
28019,
29918,
4571,
4345,
353,
29871,
29896,
13,
13,
1678,
822,
4457,
29918,
3601,
29918,
29896,
29953,
29898,
29916,
29892,
343,
1125,
736,
4457,
29918,
3601,
29898,
29916,
29892,
343,
29892,
3785,
29922,
29896,
29953,
29930,
9302,
29889,
1631,
29897,
13,
13,
1678,
822,
22434,
567,
275,
29918,
3601,
29898,
29916,
29892,
343,
1125,
736,
8607,
29918,
3601,
29898,
29916,
29892,
343,
29892,
11855,
29922,
29945,
29897,
13,
13,
1678,
822,
6862,
29918,
3601,
23538,
29916,
29892,
343,
1125,
736,
6862,
29918,
3601,
29898,
29916,
29892,
343,
29892,
3785,
10457,
9302,
29889,
1631,
29914,
29946,
29892,
5111,
29922,
5574,
29897,
13,
13,
1678,
23876,
353,
518,
10660,
29918,
3601,
29892,
1518,
29918,
3601,
29892,
13630,
29918,
3601,
29892,
14002,
29918,
3601,
29892,
4331,
29918,
3601,
29892,
13,
462,
259,
18890,
29918,
3601,
29892,
281,
29918,
3601,
29892,
6337,
284,
29918,
3601,
29892,
318,
5892,
29918,
3601,
29892,
1480,
29918,
3601,
29892,
13,
462,
259,
3876,
29918,
3601,
29892,
4457,
29918,
3601,
29892,
4457,
29918,
3601,
29918,
29896,
29953,
29892,
6862,
29918,
3601,
29892,
1023,
29918,
862,
370,
29918,
3601,
29892,
13,
462,
259,
8607,
29918,
3601,
29892,
22434,
567,
275,
29918,
3601,
29892,
6862,
29918,
3601,
3383,
2473,
29918,
1217,
895,
29918,
3601,
29892,
2473,
29918,
262,
2716,
29918,
3601,
29962,
13,
13,
1678,
363,
17402,
297,
23876,
29901,
13,
4706,
921,
29892,
343,
353,
17402,
29898,
13967,
29918,
8132,
3580,
17101,
29892,
28019,
29918,
4571,
4345,
29897,
13,
4706,
7442,
29889,
29879,
485,
300,
486,
29898,
1272,
29918,
3972,
718,
851,
29898,
3601,
2785,
17255,
978,
1649,
29897,
718,
11119,
29916,
29889,
7638,
613,
921,
29892,
28552,
543,
29892,
1159,
13,
4706,
7442,
29889,
29879,
485,
300,
486,
29898,
1272,
29918,
3972,
718,
851,
29898,
3601,
2785,
17255,
978,
1649,
29897,
718,
11119,
29891,
29889,
7638,
613,
343,
29892,
28552,
543,
29892,
1159,
13,
13,
13,
1753,
2254,
29918,
9902,
29898,
1445,
29918,
978,
29892,
2582,
29918,
3972,
543,
6904,
29885,
29887,
23141,
29914,
262,
2716,
355,
663,
29918,
21150,
29914,
5441,
29918,
21150,
29914,
29885,
27354,
29914,
1272,
29914,
29885,
27354,
12975,
1125,
13,
1678,
286,
27354,
29918,
9902,
353,
7442,
29889,
1885,
3166,
3945,
29898,
9902,
29918,
3972,
718,
934,
29918,
978,
29892,
28552,
29922,
742,
29861,
29896,
17531,
13,
13,
1678,
282,
29924,
8766,
353,
286,
27354,
29918,
9902,
7503,
29892,
29871,
29900,
3816,
29900,
29962,
13,
1678,
1002,
29924,
8766,
353,
286,
27354,
29918,
9902,
7503,
29892,
29871,
29896,
3816,
29900,
29962,
13,
1678,
282,
7717,
12521,
29878,
353,
286,
27354,
29918,
9902,
7503,
29892,
29871,
29906,
29901,
29945,
29906,
29962,
13,
1678,
1887,
12521,
29878,
353,
286,
27354,
29918,
9902,
7503,
29892,
29871,
29945,
29906,
29901,
29896,
29900,
29906,
29962,
13,
1678,
14413,
17185,
353,
286,
27354,
29918,
9902,
7503,
29892,
29871,
29896,
29900,
29906,
29901,
29896,
29900,
29946,
3816,
29900,
29962,
13,
13,
1678,
736,
313,
29886,
29924,
8766,
29892,
1002,
29924,
8766,
29892,
282,
7717,
12521,
29878,
29892,
1887,
12521,
29878,
29892,
14413,
17185,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
2531,
29918,
1272,
580,
13,
1678,
396,
1596,
29898,
1359,
29918,
9902,
703,
10660,
29918,
3601,
29918,
690,
29889,
7638,
5783,
13,
2
] |
tfl_data.py | dongyan1024/overtime | 9 | 10553 | <reponame>dongyan1024/overtime<filename>tfl_data.py<gh_stars>1-10
import overtime as ot
times = ['14:00','14:05', '14:10', '14:15', '14:20', '14:25', '14:30', '14:35', '14:40', '14:45', '14:50', '14:55']
tfl_data = ot.TflInput(['victoria', 'central', 'bakerloo', 'piccadilly'], ['inbound', 'outbound'], times)
| [
1,
529,
276,
1112,
420,
29958,
29881,
549,
10094,
29896,
29900,
29906,
29946,
29914,
957,
2230,
29966,
9507,
29958,
29873,
1579,
29918,
1272,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
30004,
13,
5215,
975,
2230,
408,
4932,
30004,
13,
30004,
13,
3706,
353,
6024,
29896,
29946,
29901,
29900,
29900,
3788,
29896,
29946,
29901,
29900,
29945,
742,
525,
29896,
29946,
29901,
29896,
29900,
742,
525,
29896,
29946,
29901,
29896,
29945,
742,
525,
29896,
29946,
29901,
29906,
29900,
742,
525,
29896,
29946,
29901,
29906,
29945,
742,
525,
29896,
29946,
29901,
29941,
29900,
742,
525,
29896,
29946,
29901,
29941,
29945,
742,
525,
29896,
29946,
29901,
29946,
29900,
742,
525,
29896,
29946,
29901,
29946,
29945,
742,
525,
29896,
29946,
29901,
29945,
29900,
742,
525,
29896,
29946,
29901,
29945,
29945,
2033,
30004,
13,
29873,
1579,
29918,
1272,
353,
4932,
29889,
29911,
1579,
4290,
18959,
29894,
919,
4108,
742,
525,
25171,
742,
525,
29890,
5790,
417,
29877,
742,
525,
16447,
29883,
328,
9403,
7464,
6024,
262,
9917,
742,
525,
449,
9917,
7464,
3064,
8443,
13,
2
] |
services/catalog/tests/unit/with_dbs/test_entrypoint_dags.py | KZzizzle/osparc-simcore | 0 | 149855 | <gh_stars>0
# pylint:disable=unused-variable
# pylint:disable=unused-argument
# pylint:disable=redefined-outer-name
from typing import Dict, List
import pytest
from starlette.testclient import TestClient
from simcore_service_catalog.__version__ import api_version
from simcore_service_catalog.models.schemas.meta import Meta
core_services = ["postgres"]
ops_services = ["adminer"]
@pytest.mark.skip(reason="Failing on github actions")
def test_read_healthcheck(director_mockup, client: TestClient):
response = client.get("/")
assert response.status_code == 200
assert response.text == '":-)"'
@pytest.mark.skip(reason="Failing on github actions")
def test_read_meta(director_mockup, client: TestClient):
response = client.get("/v0/meta")
assert response.status_code == 200
meta = Meta(**response.json())
assert meta.version == api_version
assert meta.name == "simcore_service_catalog"
@pytest.mark.skip(reason="Failing on github actions")
def test_list_dags(director_mockup, client: TestClient):
response = client.get("/v0/dags")
assert response.status_code == 200
assert response.json() == []
# inject three dagin
response = client.get("/v0/dags")
assert response.status_code == 200
# TODO: assert i can list them as dagouts
# TODO: assert dagout have identifiers now
@pytest.mark.skip(reason="Failing on github actions")
def test_standard_operations_on_resource(
director_mockup, client: TestClient, fake_data_dag_in: Dict
):
response = client.post("/v0/dags", json=fake_data_dag_in)
assert response.status_code == 201
assert response.json() == 1
# list
response = client.get("/v0/dags")
assert response.status_code == 200
got = response.json()
assert isinstance(got, List)
assert len(got) == 1
# TODO: data_in is not the same as data_out??
data_out = got[0]
assert data_out["id"] == 1 # extra key, once in db
# get
response = client.get("/v0/dags/1")
assert response.status_code == 200
assert response.json() == data_out
# delete
response = client.delete("/v0/dags/1")
assert response.status_code == 204
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
282,
2904,
524,
29901,
20472,
29922,
348,
3880,
29899,
11918,
13,
29937,
282,
2904,
524,
29901,
20472,
29922,
348,
3880,
29899,
23516,
13,
29937,
282,
2904,
524,
29901,
20472,
29922,
276,
12119,
29899,
5561,
29899,
978,
13,
13,
3166,
19229,
1053,
360,
919,
29892,
2391,
13,
13,
5215,
11451,
1688,
13,
3166,
5810,
20200,
29889,
1688,
4645,
1053,
4321,
4032,
13,
13,
3166,
1027,
3221,
29918,
5509,
29918,
28045,
17255,
3259,
1649,
1053,
7882,
29918,
3259,
13,
3166,
1027,
3221,
29918,
5509,
29918,
28045,
29889,
9794,
29889,
11993,
29889,
7299,
1053,
20553,
13,
13,
3221,
29918,
9916,
353,
6796,
2490,
7201,
3108,
13,
3554,
29918,
9916,
353,
6796,
6406,
261,
3108,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
11014,
29898,
23147,
543,
16243,
292,
373,
18546,
8820,
1159,
13,
1753,
1243,
29918,
949,
29918,
354,
4298,
3198,
29898,
11851,
272,
29918,
17640,
786,
29892,
3132,
29901,
4321,
4032,
1125,
13,
1678,
2933,
353,
3132,
29889,
657,
11974,
1159,
13,
1678,
4974,
2933,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
13,
1678,
4974,
2933,
29889,
726,
1275,
525,
1115,
29899,
5513,
29915,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
11014,
29898,
23147,
543,
16243,
292,
373,
18546,
8820,
1159,
13,
1753,
1243,
29918,
949,
29918,
7299,
29898,
11851,
272,
29918,
17640,
786,
29892,
3132,
29901,
4321,
4032,
1125,
13,
1678,
2933,
353,
3132,
29889,
657,
11974,
29894,
29900,
29914,
7299,
1159,
13,
1678,
4974,
2933,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
13,
1678,
12700,
353,
20553,
29898,
1068,
5327,
29889,
3126,
3101,
13,
1678,
4974,
12700,
29889,
3259,
1275,
7882,
29918,
3259,
13,
1678,
4974,
12700,
29889,
978,
1275,
376,
3601,
3221,
29918,
5509,
29918,
28045,
29908,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
11014,
29898,
23147,
543,
16243,
292,
373,
18546,
8820,
1159,
13,
1753,
1243,
29918,
1761,
29918,
29881,
810,
29898,
11851,
272,
29918,
17640,
786,
29892,
3132,
29901,
4321,
4032,
1125,
13,
1678,
2933,
353,
3132,
29889,
657,
11974,
29894,
29900,
29914,
29881,
810,
1159,
13,
1678,
4974,
2933,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
13,
1678,
4974,
2933,
29889,
3126,
580,
1275,
5159,
13,
13,
1678,
396,
11658,
2211,
12136,
262,
13,
1678,
2933,
353,
3132,
29889,
657,
11974,
29894,
29900,
29914,
29881,
810,
1159,
13,
1678,
4974,
2933,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
13,
1678,
396,
14402,
29901,
4974,
474,
508,
1051,
963,
408,
12136,
17718,
13,
13,
1678,
396,
14402,
29901,
4974,
12136,
449,
505,
2893,
14903,
1286,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
11014,
29898,
23147,
543,
16243,
292,
373,
18546,
8820,
1159,
13,
1753,
1243,
29918,
15770,
29918,
3372,
800,
29918,
265,
29918,
10314,
29898,
13,
1678,
8881,
29918,
17640,
786,
29892,
3132,
29901,
4321,
4032,
29892,
25713,
29918,
1272,
29918,
24157,
29918,
262,
29901,
360,
919,
13,
1125,
13,
13,
1678,
2933,
353,
3132,
29889,
2490,
11974,
29894,
29900,
29914,
29881,
810,
613,
4390,
29922,
29888,
1296,
29918,
1272,
29918,
24157,
29918,
262,
29897,
13,
1678,
4974,
2933,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29896,
13,
1678,
4974,
2933,
29889,
3126,
580,
1275,
29871,
29896,
13,
13,
1678,
396,
1051,
13,
1678,
2933,
353,
3132,
29889,
657,
11974,
29894,
29900,
29914,
29881,
810,
1159,
13,
1678,
4974,
2933,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
13,
1678,
2355,
353,
2933,
29889,
3126,
580,
13,
13,
1678,
4974,
338,
8758,
29898,
7085,
29892,
2391,
29897,
13,
1678,
4974,
7431,
29898,
7085,
29897,
1275,
29871,
29896,
13,
13,
1678,
396,
14402,
29901,
848,
29918,
262,
338,
451,
278,
1021,
408,
848,
29918,
449,
8773,
13,
1678,
848,
29918,
449,
353,
2355,
29961,
29900,
29962,
13,
1678,
4974,
848,
29918,
449,
3366,
333,
3108,
1275,
29871,
29896,
29871,
396,
4805,
1820,
29892,
2748,
297,
4833,
13,
13,
1678,
396,
679,
13,
1678,
2933,
353,
3132,
29889,
657,
11974,
29894,
29900,
29914,
29881,
810,
29914,
29896,
1159,
13,
1678,
4974,
2933,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
13,
1678,
4974,
2933,
29889,
3126,
580,
1275,
848,
29918,
449,
13,
13,
1678,
396,
5217,
13,
1678,
2933,
353,
3132,
29889,
8143,
11974,
29894,
29900,
29914,
29881,
810,
29914,
29896,
1159,
13,
1678,
4974,
2933,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29946,
13,
2
] |
scratch/check_bins.py | AdriJD/cmb_sst_ksw | 0 | 47560 | <reponame>AdriJD/cmb_sst_ksw
'''
Test binning
'''
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
import sys
import os
import numpy as np
from scipy.special import spherical_jn
sys.path.insert(0,'./../')
from sst import Fisher
opj = os.path.join
def bin_test(parity, bins=None, lmin=2, lmax=23):
'''
Init bins, run over them and test them.
'''
base_dir = '/mn/stornext/d8/ITA/spider/adri/analysis/20181025_sst/test/precomputed'
F = Fisher(base_dir)
F.init_bins(lmin=lmin, lmax=lmax, parity=parity, bins=bins)
bins = F.bins['bins']
pint = 1 if parity == 'odd' else 0
if F.mpi_rank == 0:
for i1, b1 in enumerate(bins):
for i2, b2 in enumerate(bins[i1:]):
i2 += i1
for i3, b3 in enumerate(bins[i2:]):
i3 += i2
ell1, ell2, ell3 = F.bins['first_pass'][i1,i2,i3]
num = F.bins['num_pass'][i1,i2,i3]
try:
if num == 0:
assert (ell1, ell2, ell3) == (0,0,0)
else:
assert (ell1, ell2, ell3) != (0,0,0)
if parity is not None:
assert (ell1 + ell2 + ell3) % 2 == pint
# check if first pass ells fit in bins
assert ell1 >= b1
assert ell2 >= b2
assert ell3 >= b3
try:
assert ell1 < bins[i1+1]
except IndexError:
if (i1 + 1) >= bins.size:
pass
else:
raise
try:
assert ell2 < bins[i2+1]
except IndexError:
if (i2 + 1) >= bins.size:
pass
else:
raise
try:
assert ell3 < bins[i3+1]
except IndexError:
if (i3 + 1) >= bins.size:
pass
else:
raise
# Check if first pass matches triangle cond.
assert abs(ell1 - ell2) <= ell3
assert ell3 <= (ell1 + ell2)
except:
print 'error in bin:'
print 'bin_idx: ({},{},{}), bin: ({},{},{}), no. gd_tuples: {}, '\
'u_ell: ({},{},{})'.format(i1, i2, i3, b1, b2, b3,
F.bins['num_pass'][i1,i2,i3],
ell1, ell2, ell3)
raise
print 'bins: ', F.bins['bins']
print 'lmin: ', F.bins['lmin']
print 'lmax: ', F.bins['lmax']
print 'sum num_pass: ', np.sum(F.bins['num_pass'])
print 'unique_ells: ', F.bins['unique_ells']
print 'num bins: ', F.bins['bins'].size
print 'shape num_pass: ', F.bins['num_pass'].shape
print 'shape first_pass: ', F.bins['first_pass'].shape, '\n'
if __name__ == '__main__':
lmin = 2
lmax = 40
for parity in ['even', 'odd', None]:
print 'parity: {}, lmin: {}, lmax: {}'.format(parity, lmin, lmax)
print 'default bins'
bin_test(lmin=lmin, lmax=lmax, parity=parity, bins=None)
print 'bins up to lmax'
bin_test(lmin=None, lmax=lmax, parity=parity, bins=[2,3,4,10,lmax])
print 'bins over lmax'
bin_test(lmin=None, lmax=lmax, parity=parity, bins=[2,3,4,10,lmax+12])
# if lmin and lmax of different binning schemes match, they
# should have matching sum(num_pass)
| [
1,
529,
276,
1112,
420,
29958,
3253,
374,
29967,
29928,
29914,
4912,
29890,
29918,
29879,
303,
29918,
2039,
29893,
13,
12008,
13,
3057,
9016,
1076,
13,
12008,
13,
13,
5215,
22889,
13,
2922,
17357,
29889,
1509,
877,
16170,
1495,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
10876,
13,
5215,
2897,
13,
5215,
12655,
408,
7442,
13,
3166,
4560,
2272,
29889,
18732,
1053,
26903,
936,
29918,
29926,
29876,
13,
9675,
29889,
2084,
29889,
7851,
29898,
29900,
29892,
4286,
29914,
6995,
1495,
13,
3166,
269,
303,
1053,
12030,
261,
13,
13,
459,
29926,
353,
2897,
29889,
2084,
29889,
7122,
13,
13,
1753,
9016,
29918,
1688,
29898,
862,
537,
29892,
289,
1144,
29922,
8516,
29892,
301,
1195,
29922,
29906,
29892,
301,
3317,
29922,
29906,
29941,
1125,
13,
1678,
14550,
13,
1678,
10886,
289,
1144,
29892,
1065,
975,
963,
322,
1243,
963,
29889,
13,
1678,
14550,
13,
13,
1678,
2967,
29918,
3972,
353,
8207,
23521,
29914,
28957,
4622,
29914,
29881,
29947,
29914,
1806,
29909,
29914,
1028,
1241,
29914,
328,
374,
29914,
15916,
29914,
29906,
29900,
29896,
29947,
29896,
29900,
29906,
29945,
29918,
29879,
303,
29914,
1688,
29914,
1457,
12097,
287,
29915,
13,
1678,
383,
353,
12030,
261,
29898,
3188,
29918,
3972,
29897,
13,
13,
1678,
383,
29889,
2344,
29918,
29890,
1144,
29898,
29880,
1195,
29922,
29880,
1195,
29892,
301,
3317,
29922,
29880,
3317,
29892,
610,
537,
29922,
862,
537,
29892,
289,
1144,
29922,
29890,
1144,
29897,
13,
13,
1678,
289,
1144,
353,
383,
29889,
29890,
1144,
1839,
29890,
1144,
2033,
13,
1678,
16483,
353,
29871,
29896,
565,
610,
537,
1275,
525,
22861,
29915,
1683,
29871,
29900,
13,
13,
1678,
565,
383,
29889,
1526,
29875,
29918,
10003,
1275,
29871,
29900,
29901,
13,
13,
4706,
363,
474,
29896,
29892,
289,
29896,
297,
26985,
29898,
29890,
1144,
1125,
13,
9651,
363,
474,
29906,
29892,
289,
29906,
297,
26985,
29898,
29890,
1144,
29961,
29875,
29896,
17531,
1125,
13,
18884,
474,
29906,
4619,
474,
29896,
13,
18884,
363,
474,
29941,
29892,
289,
29941,
297,
26985,
29898,
29890,
1144,
29961,
29875,
29906,
17531,
1125,
13,
462,
1678,
474,
29941,
4619,
474,
29906,
13,
462,
1678,
12302,
29896,
29892,
12302,
29906,
29892,
12302,
29941,
353,
383,
29889,
29890,
1144,
1839,
4102,
29918,
3364,
2033,
29961,
29875,
29896,
29892,
29875,
29906,
29892,
29875,
29941,
29962,
13,
462,
1678,
954,
353,
383,
29889,
29890,
1144,
1839,
1949,
29918,
3364,
2033,
29961,
29875,
29896,
29892,
29875,
29906,
29892,
29875,
29941,
29962,
13,
462,
1678,
1018,
29901,
13,
462,
4706,
565,
954,
1275,
29871,
29900,
29901,
13,
462,
9651,
4974,
313,
514,
29896,
29892,
12302,
29906,
29892,
12302,
29941,
29897,
1275,
313,
29900,
29892,
29900,
29892,
29900,
29897,
29871,
13,
462,
4706,
1683,
29901,
13,
462,
9651,
4974,
313,
514,
29896,
29892,
12302,
29906,
29892,
12302,
29941,
29897,
2804,
313,
29900,
29892,
29900,
29892,
29900,
29897,
29871,
13,
462,
9651,
565,
610,
537,
338,
451,
6213,
29901,
13,
462,
18884,
4974,
313,
514,
29896,
718,
12302,
29906,
718,
12302,
29941,
29897,
1273,
29871,
29906,
1275,
16483,
29871,
13,
13,
462,
9651,
396,
1423,
565,
937,
1209,
29871,
10071,
6216,
297,
289,
1144,
13,
462,
9651,
4974,
12302,
29896,
6736,
289,
29896,
13,
462,
9651,
4974,
12302,
29906,
6736,
289,
29906,
13,
462,
9651,
4974,
12302,
29941,
6736,
289,
29941,
13,
13,
462,
9651,
1018,
29901,
13,
462,
18884,
4974,
12302,
29896,
529,
289,
1144,
29961,
29875,
29896,
29974,
29896,
29962,
13,
462,
9651,
5174,
11374,
2392,
29901,
13,
462,
18884,
565,
313,
29875,
29896,
718,
29871,
29896,
29897,
6736,
289,
1144,
29889,
2311,
29901,
13,
462,
462,
1678,
1209,
13,
462,
18884,
1683,
29901,
13,
462,
462,
1678,
12020,
13,
462,
9651,
1018,
29901,
13,
462,
18884,
4974,
12302,
29906,
529,
289,
1144,
29961,
29875,
29906,
29974,
29896,
29962,
13,
462,
9651,
5174,
11374,
2392,
29901,
13,
462,
18884,
565,
313,
29875,
29906,
718,
29871,
29896,
29897,
6736,
289,
1144,
29889,
2311,
29901,
13,
462,
462,
1678,
1209,
13,
462,
18884,
1683,
29901,
13,
462,
462,
1678,
12020,
13,
462,
9651,
1018,
29901,
13,
462,
18884,
4974,
12302,
29941,
529,
289,
1144,
29961,
29875,
29941,
29974,
29896,
29962,
13,
462,
9651,
5174,
11374,
2392,
29901,
13,
462,
18884,
565,
313,
29875,
29941,
718,
29871,
29896,
29897,
6736,
289,
1144,
29889,
2311,
29901,
13,
462,
462,
1678,
1209,
13,
462,
18884,
1683,
29901,
13,
462,
462,
1678,
12020,
13,
13,
462,
9651,
396,
5399,
565,
937,
1209,
7087,
17205,
2148,
29889,
13,
462,
9651,
4974,
6425,
29898,
514,
29896,
448,
12302,
29906,
29897,
5277,
12302,
29941,
13,
462,
9651,
4974,
12302,
29941,
5277,
313,
514,
29896,
718,
12302,
29906,
29897,
13,
13,
462,
1678,
5174,
29901,
13,
462,
4706,
1596,
525,
2704,
297,
9016,
11283,
13,
462,
4706,
1596,
525,
2109,
29918,
13140,
29901,
21313,
29087,
1118,
8875,
511,
9016,
29901,
21313,
29087,
1118,
8875,
511,
694,
29889,
330,
29881,
29918,
9161,
2701,
29901,
24335,
11297,
13,
462,
9651,
525,
29884,
29918,
514,
29901,
21313,
29087,
29087,
1800,
4286,
4830,
29898,
29875,
29896,
29892,
474,
29906,
29892,
474,
29941,
29892,
289,
29896,
29892,
289,
29906,
29892,
289,
29941,
29892,
29871,
13,
462,
462,
462,
539,
383,
29889,
29890,
1144,
1839,
1949,
29918,
3364,
2033,
29961,
29875,
29896,
29892,
29875,
29906,
29892,
29875,
29941,
1402,
29871,
13,
462,
462,
462,
539,
12302,
29896,
29892,
12302,
29906,
29892,
12302,
29941,
29897,
13,
462,
4706,
12020,
13,
462,
13,
4706,
1596,
525,
29890,
1144,
29901,
13420,
383,
29889,
29890,
1144,
1839,
29890,
1144,
2033,
13,
4706,
1596,
525,
29880,
1195,
29901,
13420,
383,
29889,
29890,
1144,
1839,
29880,
1195,
2033,
13,
4706,
1596,
525,
29880,
3317,
29901,
13420,
383,
29889,
29890,
1144,
1839,
29880,
3317,
2033,
13,
4706,
1596,
525,
2083,
954,
29918,
3364,
29901,
13420,
7442,
29889,
2083,
29898,
29943,
29889,
29890,
1144,
1839,
1949,
29918,
3364,
11287,
13,
4706,
1596,
525,
13092,
29918,
10071,
29901,
13420,
383,
29889,
29890,
1144,
1839,
13092,
29918,
10071,
2033,
13,
4706,
1596,
525,
1949,
289,
1144,
29901,
13420,
383,
29889,
29890,
1144,
1839,
29890,
1144,
13359,
2311,
13,
4706,
1596,
525,
12181,
954,
29918,
3364,
29901,
13420,
383,
29889,
29890,
1144,
1839,
1949,
29918,
3364,
13359,
12181,
13,
4706,
1596,
525,
12181,
937,
29918,
3364,
29901,
13420,
383,
29889,
29890,
1144,
1839,
4102,
29918,
3364,
13359,
12181,
29892,
11297,
29876,
29915,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
268,
13,
1678,
301,
1195,
353,
29871,
29906,
13,
1678,
301,
3317,
353,
29871,
29946,
29900,
13,
1678,
363,
610,
537,
297,
6024,
11884,
742,
525,
22861,
742,
6213,
5387,
13,
4706,
1596,
525,
862,
537,
29901,
24335,
301,
1195,
29901,
24335,
301,
3317,
29901,
6571,
4286,
4830,
29898,
862,
537,
29892,
301,
1195,
29892,
301,
3317,
29897,
13,
4706,
1596,
525,
4381,
289,
1144,
29915,
13,
4706,
9016,
29918,
1688,
29898,
29880,
1195,
29922,
29880,
1195,
29892,
301,
3317,
29922,
29880,
3317,
29892,
610,
537,
29922,
862,
537,
29892,
289,
1144,
29922,
8516,
29897,
13,
4706,
1596,
525,
29890,
1144,
701,
304,
301,
3317,
29915,
13,
4706,
9016,
29918,
1688,
29898,
29880,
1195,
29922,
8516,
29892,
301,
3317,
29922,
29880,
3317,
29892,
610,
537,
29922,
862,
537,
29892,
289,
1144,
11759,
29906,
29892,
29941,
29892,
29946,
29892,
29896,
29900,
29892,
29880,
3317,
2314,
13,
4706,
1596,
525,
29890,
1144,
975,
301,
3317,
29915,
13,
4706,
9016,
29918,
1688,
29898,
29880,
1195,
29922,
8516,
29892,
301,
3317,
29922,
29880,
3317,
29892,
610,
537,
29922,
862,
537,
29892,
289,
1144,
11759,
29906,
29892,
29941,
29892,
29946,
29892,
29896,
29900,
29892,
29880,
3317,
29974,
29896,
29906,
2314,
13,
13,
4706,
396,
565,
301,
1195,
322,
301,
3317,
310,
1422,
9016,
1076,
27715,
1993,
29892,
896,
13,
4706,
396,
881,
505,
9686,
2533,
29898,
1949,
29918,
3364,
29897,
13,
2
] |
data/studio21_generated/interview/1618/starter_code.py | vijaykumawat256/Prompt-Summarization | 0 | 132148 | <gh_stars>0
def differentiate(equation, point):
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
1753,
17473,
403,
29898,
2573,
29892,
1298,
1125,
13,
12,
2
] |
routers/routers.py | Soulike/Class-Note-Manager-Python | 1 | 1603253 | <filename>routers/routers.py
from .Login import Login
from .NoteManagement import NoteManagement
from .ReactApp import ReactApp
# 注册所有子路由
def registerRouters(app):
app.register_blueprint(ReactApp)
app.register_blueprint(NoteManagement, url_prefix = '/server')
app.register_blueprint(Login, url_prefix = '/server')
| [
1,
529,
9507,
29958,
27537,
2153,
29914,
27537,
2153,
29889,
2272,
13,
3166,
869,
11049,
1053,
19130,
13,
3166,
869,
9842,
27107,
1053,
3940,
27107,
13,
3166,
869,
1123,
627,
2052,
1053,
9537,
2052,
13,
13,
13,
29937,
29871,
31368,
232,
137,
143,
30744,
30417,
30319,
30874,
31272,
13,
1753,
6036,
29934,
283,
2153,
29898,
932,
1125,
13,
1678,
623,
29889,
9573,
29918,
9539,
2158,
29898,
1123,
627,
2052,
29897,
13,
1678,
623,
29889,
9573,
29918,
9539,
2158,
29898,
9842,
27107,
29892,
3142,
29918,
13506,
353,
8207,
2974,
1495,
13,
1678,
623,
29889,
9573,
29918,
9539,
2158,
29898,
11049,
29892,
3142,
29918,
13506,
353,
8207,
2974,
1495,
13,
2
] |
SimPEG/utils/curvutils.py | jcapriot/simpeg | 1 | 165287 | <reponame>jcapriot/simpeg
from .code_utils import deprecate_module
deprecate_module("curvutils", "curv_utils", "0.15.0")
from .curv_utils import *
| [
1,
529,
276,
1112,
420,
29958,
29926,
5030,
374,
327,
29914,
14739,
387,
13,
3166,
869,
401,
29918,
13239,
1053,
16460,
403,
29918,
5453,
13,
13,
311,
17990,
403,
29918,
5453,
703,
2764,
29894,
13239,
613,
376,
2764,
29894,
29918,
13239,
613,
376,
29900,
29889,
29896,
29945,
29889,
29900,
1159,
13,
13,
3166,
869,
2764,
29894,
29918,
13239,
1053,
334,
13,
2
] |
detection/utils/misc_code.py | manogna-s/da-fer | 1 | 191550 | <gh_stars>1-10
"""
for image in os.listdir(images_path):
img = Image.open(os.path.join(images_path,image))
frame_draw = img.copy()
draw = ImageDraw.Draw(frame_draw)
for box in boxes:
draw.rectangle(box.tolist(), outline=(255, 0, 0), width=6)
for landmark in landmarks_points:
print(landmark)
draw.point(landmark,fill="black")
frame_draw.show()
d = display.display(draw, display_id=True)
"""
sys.exit()
# For a model pretrained on VGGFace2
model = InceptionResnetV1(pretrained='vggface2').eval()
# For a model pretrained on CASIA-Webface
model = InceptionResnetV1(pretrained='casia-webface').eval()
# For an untrained model with 100 classes
model = InceptionResnetV1(num_classes=100).eval()
# For an untrained 1001-class classifier
model = InceptionResnetV1(classify=True, num_classes=1001).eval()
# If required, create a face detection pipeline using MTCNN:
#mtcnn = MTCNN(image_size=<image_size>, margin=<margin>)
# Draw faces
frame_draw = img.copy()
draw = ImageDraw.Draw(frame_draw)
for box in boxes:
draw.rectangle(box.tolist(), outline=(255, 0, 0), width=6)
draw.point()
frame_draw.show()
d = display.display(draw, display_id=True)
# Create an inception resnet (in eval mode):
resnet = InceptionResnetV1(pretrained='vggface2').eval()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
13,
15945,
29908,
13,
1454,
1967,
297,
2897,
29889,
1761,
3972,
29898,
8346,
29918,
2084,
1125,
13,
1678,
10153,
353,
7084,
29889,
3150,
29898,
359,
29889,
2084,
29889,
7122,
29898,
8346,
29918,
2084,
29892,
3027,
876,
29871,
13,
1678,
3515,
29918,
4012,
353,
10153,
29889,
8552,
580,
13,
1678,
4216,
353,
7084,
8537,
29889,
8537,
29898,
2557,
29918,
4012,
29897,
13,
1678,
363,
3800,
297,
16273,
29901,
13,
4706,
4216,
29889,
1621,
2521,
29898,
1884,
29889,
25027,
391,
3285,
27887,
7607,
29906,
29945,
29945,
29892,
29871,
29900,
29892,
29871,
29900,
511,
2920,
29922,
29953,
29897,
13,
13,
1678,
363,
2982,
3502,
297,
2982,
22848,
29918,
9748,
29901,
13,
4706,
1596,
29898,
1049,
3502,
29897,
13,
4706,
4216,
29889,
3149,
29898,
1049,
3502,
29892,
5589,
543,
8517,
1159,
13,
1678,
3515,
29918,
4012,
29889,
4294,
580,
13,
13,
1678,
270,
353,
2479,
29889,
4990,
29898,
4012,
29892,
2479,
29918,
333,
29922,
5574,
29897,
13,
15945,
29908,
13,
13,
9675,
29889,
13322,
580,
13,
13,
29937,
1152,
263,
1904,
758,
3018,
1312,
373,
478,
26788,
23360,
29906,
13,
4299,
353,
512,
1441,
1666,
1212,
29963,
29896,
29898,
1457,
3018,
1312,
2433,
29894,
1505,
2161,
29906,
2824,
14513,
580,
13,
13,
29937,
1152,
263,
1904,
758,
3018,
1312,
373,
315,
3289,
10764,
29899,
3609,
2161,
13,
4299,
353,
512,
1441,
1666,
1212,
29963,
29896,
29898,
1457,
3018,
1312,
2433,
9398,
423,
29899,
705,
1635,
815,
2824,
14513,
580,
13,
13,
29937,
1152,
385,
443,
3018,
1312,
1904,
411,
29871,
29896,
29900,
29900,
4413,
13,
4299,
353,
512,
1441,
1666,
1212,
29963,
29896,
29898,
1949,
29918,
13203,
29922,
29896,
29900,
29900,
467,
14513,
580,
13,
13,
29937,
1152,
385,
443,
3018,
1312,
29871,
29896,
29900,
29900,
29896,
29899,
1990,
770,
3709,
13,
4299,
353,
512,
1441,
1666,
1212,
29963,
29896,
29898,
1990,
1598,
29922,
5574,
29892,
954,
29918,
13203,
29922,
29896,
29900,
29900,
29896,
467,
14513,
580,
13,
29937,
960,
3734,
29892,
1653,
263,
3700,
15326,
16439,
773,
341,
9472,
10262,
29901,
13,
29937,
4378,
29883,
15755,
353,
341,
9472,
10262,
29898,
3027,
29918,
2311,
29922,
29966,
3027,
29918,
2311,
10202,
5906,
29922,
29966,
9264,
12948,
13,
13,
13,
29937,
18492,
17240,
13,
2557,
29918,
4012,
353,
10153,
29889,
8552,
580,
13,
4012,
353,
7084,
8537,
29889,
8537,
29898,
2557,
29918,
4012,
29897,
13,
1454,
3800,
297,
16273,
29901,
13,
1678,
4216,
29889,
1621,
2521,
29898,
1884,
29889,
25027,
391,
3285,
27887,
7607,
29906,
29945,
29945,
29892,
29871,
29900,
29892,
29871,
29900,
511,
2920,
29922,
29953,
29897,
13,
1678,
4216,
29889,
3149,
580,
13,
2557,
29918,
4012,
29889,
4294,
580,
13,
13,
29881,
353,
2479,
29889,
4990,
29898,
4012,
29892,
2479,
29918,
333,
29922,
5574,
29897,
13,
13,
29937,
6204,
385,
297,
1441,
620,
1212,
313,
262,
19745,
4464,
1125,
13,
690,
1212,
353,
512,
1441,
1666,
1212,
29963,
29896,
29898,
1457,
3018,
1312,
2433,
29894,
1505,
2161,
29906,
2824,
14513,
580,
13,
2
] |
survey/views_start.py | shagun30/djambala-2 | 0 | 107681 | # -*- coding: utf-8 -*-
"""
/dms/survey/views_start.py
.. enthaelt den View zum Starten der Dateneingabe des Fragebogens
Django content Management System
<NAME>
<EMAIL>
Die Programme des dms-Systems koennen frei genutzt und den spezifischen
Beduerfnissen entsprechend angepasst werden.
0.01 21.01.2008 Beginn der Arbeit
"""
from django.http import HttpResponseRedirect
from dms.roles import require_permission
from dms.queries import get_site_url
from dms_ext.extension import * # dms-Funktionen ueberschreiben
# -----------------------------------------------------
@require_permission('perm_manage_folderish')
def survey_start(request, item_container):
""" Eingaben in den Fragebogens unterbinden """
item_container.item.integer_2 = 1
item_container.item.save()
return HttpResponseRedirect(get_site_url(item_container, 'index.html'))
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
29914,
29881,
1516,
29914,
7610,
6950,
29914,
7406,
29918,
2962,
29889,
2272,
13,
13,
636,
875,
2350,
2152,
972,
4533,
3356,
7370,
264,
589,
13373,
1600,
292,
4302,
553,
7347,
4310,
468,
575,
13,
308,
15337,
2793,
15057,
2184,
13,
13,
29966,
5813,
29958,
13,
29966,
26862,
6227,
29958,
13,
13,
16334,
7835,
1004,
553,
270,
1516,
29899,
3924,
29879,
5812,
18723,
3005,
29875,
2531,
26216,
563,
972,
961,
29920,
361,
1679,
13,
29933,
287,
2853,
9144,
13119,
875,
28562,
355,
15725,
18182,
303,
3678,
29889,
13,
13,
29900,
29889,
29900,
29896,
259,
29906,
29896,
29889,
29900,
29896,
29889,
29906,
29900,
29900,
29947,
29871,
27847,
589,
17561,
13,
15945,
29908,
13,
13,
3166,
9557,
29889,
1124,
3986,
1053,
9056,
5103,
24735,
13,
13,
3166,
270,
1516,
29889,
307,
793,
9651,
1053,
1996,
29918,
16074,
13,
3166,
270,
1516,
29889,
339,
6358,
3986,
1053,
679,
29918,
2746,
29918,
2271,
13,
13,
3166,
270,
1516,
29918,
1062,
29889,
17588,
1678,
1053,
334,
396,
270,
1516,
29899,
25394,
23668,
318,
774,
7092,
12207,
264,
13,
13,
29937,
448,
2683,
2683,
2683,
807,
13,
29992,
12277,
29918,
16074,
877,
17858,
29918,
1171,
482,
29918,
12083,
728,
1495,
13,
1753,
18994,
29918,
2962,
29898,
3827,
29892,
2944,
29918,
7611,
1125,
13,
29871,
9995,
29776,
12792,
297,
972,
7347,
4310,
468,
575,
3662,
5355,
264,
9995,
13,
29871,
2944,
29918,
7611,
29889,
667,
29889,
16031,
29918,
29906,
353,
29871,
29896,
13,
29871,
2944,
29918,
7611,
29889,
667,
29889,
7620,
580,
13,
29871,
736,
9056,
5103,
24735,
29898,
657,
29918,
2746,
29918,
2271,
29898,
667,
29918,
7611,
29892,
525,
2248,
29889,
1420,
8785,
13,
2
] |
src/Python/Graphs/ConstructTree.py | sankhesh/vtk-examples | 0 | 132567 | #!/usr/bin/env python
import vtk
def main():
graph = vtk.vtkMutableDirectedGraph()
v1 = graph.AddVertex()
v2 = graph.AddChild(v1)
graph.AddChild(v1)
graph.AddChild(v2)
# equivalent to:
# V1 = g.AddVertex()
# V2 = g.AddVertex()
# V3 = g.AddVertex()
# V4 = g.AddVertex()
# g.AddEdge ( V1, V2 )
# g.AddEdge ( V1, V3 )
# g.AddEdge ( V2, V4 )
tree = vtk.vtkTree()
success = tree.CheckedShallowCopy(graph)
print('Success?', success)
# std::cout << 'Success? ' << success << std::endl
treeLayoutView = vtk.vtkGraphLayoutView()
treeLayoutView.AddRepresentationFromInput(tree)
treeLayoutView.SetLayoutStrategyToTree()
treeLayoutView.ResetCamera()
treeLayoutView.Render()
treeLayoutView.GetInteractor().Start()
if __name__ == '__main__':
main()
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
5215,
325,
11178,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
3983,
353,
325,
11178,
29889,
29894,
11178,
15211,
17392,
287,
9527,
580,
13,
13,
1678,
325,
29896,
353,
3983,
29889,
2528,
22479,
580,
13,
1678,
325,
29906,
353,
3983,
29889,
2528,
5938,
29898,
29894,
29896,
29897,
13,
1678,
3983,
29889,
2528,
5938,
29898,
29894,
29896,
29897,
13,
1678,
3983,
29889,
2528,
5938,
29898,
29894,
29906,
29897,
13,
13,
1678,
396,
7126,
304,
29901,
13,
1678,
396,
478,
29896,
353,
330,
29889,
2528,
22479,
580,
13,
1678,
396,
478,
29906,
353,
330,
29889,
2528,
22479,
580,
13,
1678,
396,
478,
29941,
353,
330,
29889,
2528,
22479,
580,
13,
1678,
396,
478,
29946,
353,
330,
29889,
2528,
22479,
580,
13,
13,
1678,
396,
330,
29889,
2528,
23894,
313,
478,
29896,
29892,
478,
29906,
1723,
13,
1678,
396,
330,
29889,
2528,
23894,
313,
478,
29896,
29892,
478,
29941,
1723,
13,
1678,
396,
330,
29889,
2528,
23894,
313,
478,
29906,
29892,
478,
29946,
1723,
13,
13,
1678,
5447,
353,
325,
11178,
29889,
29894,
11178,
9643,
580,
13,
1678,
2551,
353,
5447,
29889,
17817,
2713,
9536,
11882,
29898,
4262,
29897,
13,
1678,
1596,
877,
14191,
29973,
742,
2551,
29897,
13,
1678,
396,
3659,
1057,
13147,
3532,
525,
14191,
29973,
525,
3532,
2551,
3532,
3659,
1057,
18495,
13,
13,
1678,
5447,
3453,
1043,
353,
325,
11178,
29889,
29894,
11178,
9527,
3453,
1043,
580,
13,
1678,
5447,
3453,
1043,
29889,
2528,
1123,
26081,
4591,
4290,
29898,
8336,
29897,
13,
1678,
5447,
3453,
1043,
29889,
2697,
3453,
26910,
1762,
9643,
580,
13,
1678,
5447,
3453,
1043,
29889,
27175,
20717,
580,
13,
1678,
5447,
3453,
1043,
29889,
10716,
580,
13,
1678,
5447,
3453,
1043,
29889,
2577,
4074,
7168,
2141,
4763,
580,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
13,
2
] |
desicos/abaqus/abaqus_functions.py | saullocastro/desicos | 1 | 106463 | r"""
=========================================================
Utilities Abaqus (:mod:`desicos.abaqus.abaqus_functions`)
=========================================================
.. currentmodule:: desicos.abaqus.abaqus_functions
Includes all utilities functions that must be executed from Abaqus.
"""
from __future__ import absolute_import
import math
import numpy as np
from .constants import (TOL, FLOAT, COLORS, COLOR_WHINE, COLOR_DARK_BLUE,
COLOR_BLACK)
from . import utils
def configure_session():
"""Improve layout and colors of the current figures in visualization
"""
from abaqus import session
from abaqusConstants import (ON, OFF, SMALL, DASHED, OUTSIDE,
HOLLOW_CIRCLE, DECIMAL, INCREMENT)
plot_names=session.xyDataObjects.keys()
if not 'XYPlot-1' in session.xyPlots.keys():
xyp=session.XYPlot('XYPlot-1')
else:
xyp=session.xyPlots['XYPlot-1']
chartName=xyp.charts.keys()[0]
chart=xyp.charts[chartName]
tmp=session.xyDataObjects.keys()
if len(tmp)==0:
return
xy1=session.xyDataObjects[tmp[0]]
c1=session.Curve(xyData=xy1)
chart.setValues(curvesToPlot=(c1,),)
session.viewports['Viewport: 1'].setValues(displayedObject=xyp)
chart=session.charts['Chart-1']
chart.minorAxis1GridStyle.setValues(show=True)
chart.majorAxis1GridStyle.setValues(show=True)
chart.majorAxis1GridStyle.setValues(style=DASHED)
chart.minorAxis2GridStyle.setValues(show=True)
chart.majorAxis2GridStyle.setValues(show=True)
chart.majorAxis2GridStyle.setValues(style=DASHED)
chart.gridArea.style.setValues(fill=False)
chart.legend.setValues(show=False) # necessary to update legend values
chart.legend.setValues(show=True)
chart.legend.area.setValues(inset=True)
chart.legend.area.setValues(originOffset=(0.,0.))
chart.legend.area.style.setValues(fill=True)
chart.legend.textStyle.setValues(
font='-*-arial narrow-medium-r-normal-*-*-480-*-*-p-*-*-*')
for name in plot_names:
c=session.Curve(xyData=session.xyDataObjects[name])
chart=session.xyPlots['XYPlot-1'].charts['Chart-1']
chart.setValues(curvesToPlot=(c,))
chart.fitCurves(fitAxes1=True, fitAxes2=True)
curve=session.charts['Chart-1'].curves[name]
curve.curveOptions.setValues(showSymbol=ON)
curve.curveOptions.setValues(symbolSize=SMALL)
curve.lineStyle.setValues(thickness=1.6)
curve.symbolStyle.setValues(size=5,
marker=HOLLOW_CIRCLE)
ax=chart.axes1[0]
ay=chart.axes2[0]
ax.labelStyle.setValues(
font='-*-arial narrow-bold-r-normal-*-*-480-*-*-p-*-*-*',
color=COLOR_BLACK)
ax.titleStyle.setValues(
font='-*-arial narrow-bold-r-normal-*-*-480-*-*-p-*-*-*',
color=COLOR_BLACK)
ay.labelStyle.setValues(
font='-*-arial narrow-bold-r-normal-*-*-480-*-*-p-*-*-*',
color=COLOR_BLACK)
ay.titleStyle.setValues(
font='-*-arial narrow-bold-r-normal-*-*-480-*-*-p-*-*-*',
color=COLOR_BLACK)
ax.setValues(tickPlacement=OUTSIDE)
ax.axisData.setValues(labelFormat=DECIMAL,
labelNumDigits=0,
minorTickCount=4,)
ay.setValues(tickPlacement=OUTSIDE)
ay.axisData.setValues(labelFormat=DECIMAL,
labelNumDigits=0,)
if ax.axisData.title.find('ispl')>-1:
ax.axisData.setValues(labelNumDigits=1)
if name.find('circumference') > -1:
ax.axisData.setValues(tickMode=INCREMENT,
tickIncrement=20,
minorTickCount=0,
minAutoCompute=False,
minValue=-180,
maxAutoCompute=False,
maxValue=185)
#
if (name.find('FI_HSNFCCRT') > -1 or name.find('FI_HSNFTCRT') > -1
or name.find('FI_HSNMCCRT') > -1 or name.find('FI_HSNMTCRT') > -1
or name.find('FI_TSAIW') > -1):
ay.axisData.setValues(labelNumDigits=1,
minAutoCompute=False,
minValue=0,
maxAutoCompute=False,
maxValue=2)
curve.lineStyle.setValues(thickness=1.6,
color=COLOR_WHINE)
curve.curveOptions.setValues(showSymbol=OFF)
ay.titleStyle.setValues(color=COLOR_WHINE)
ay.labelStyle.setValues(color=COLOR_WHINE)
#
if (name.find('MS_HSNFCCRT') > -1 or name.find('MS_HSNFTCRT') > -1
or name.find('MS_HSNMCCRT') > -1 or name.find('MS_HSNMTCRT') > -1
or name.find('MS_TSAIW') > -1
or name.find('MS_MAX') > -1 or name.find('MS_MIN') > -1):
ay.axisData.setValues(labelNumDigits=1,
minAutoCompute=False,
minValue=-0.5,
maxAutoCompute=False,
maxValue=1.0)
curve.lineStyle.setValues(thickness=1.6,
color=COLOR_DARK_BLUE)
curve.curveOptions.setValues(showSymbol=OFF)
ay.titleStyle.setValues(color=COLOR_DARK_BLUE)
ay.labelStyle.setValues(color=COLOR_DARK_BLUE)
def print_png(filename):
"""Print a png file from the current viewport
Parameters
----------
filename : str
The name of the output png file.
"""
from abaqus import session
from abaqusConstants import PNG
viewport=session.viewports[session.currentViewportName]
session.printToFile(fileName=filename,
format=PNG,
canvasObjects=(viewport,))
def set_default_view(cc):
"""Set a default view in order to compare figures from different models
Parameters
----------
cc : :class:`.ConeCyl` object
"""
from abaqusConstants import (USER_SPECIFIED, NODAL, COMPONENT, EXTRA_FINE,
FREE, UNIFORM, CONTINUOUS, ON, OFF)
odb=cc.attach_results()
if not odb:
print('No .odb file found for %s!' % cc.jobname)
return
dtm=odb.rootAssembly.datumCsyses[
'ASSEMBLY__T-INSTANCECYLINDER-CSYSCYLINDER']
viewport=session.viewports[session.currentViewportName]
viewport.odbDisplay.basicOptions.setValues(
averageElementOutput=False, transformationType=USER_SPECIFIED,
datumCsys=dtm)
viewport.odbDisplay.setPrimaryVariable(
variableLabel='U',
outputPosition=NODAL,
refinement=(COMPONENT, 'U1'),)
viewport.obasicOptions.setValues(averageElementOutput=True,
curveRefinementLevel=EXTRA_FINE)
viewport.odbDisplay.commonOptions.setValues(visibleEdges=FREE,
deformationScaling=UNIFORM,
uniformScaleFactor=5)
viewport.odbDisplay.contourOptions.setValues(contourStyle=CONTINUOUS)
viewport.restore()
viewport.viewportAnnotationOptions.setValues(compass=OFF)
viewport.viewportAnnotationOptions.setValues(triad=ON)
viewport.viewportAnnotationOptions.setValues(title=OFF)
viewport.viewportAnnotationOptions.setValues(state=OFF)
viewport.viewportAnnotationOptions.setValues(legend=ON)
viewport.viewportAnnotationOptions.setValues(legendTitle=OFF)
viewport.viewportAnnotationOptions.setValues(legendBox=OFF)
viewport.viewportAnnotationOptions.setValues(
legendFont='-*-arial narrow-bold-r-normal-*-*-140-*-*-p-*-*-*')
viewport.viewportAnnotationOptions.setValues(
legendFont='-*-arial narrow-bold-r-normal-*-*-180-*-*-p-*-*-*')
viewport.viewportAnnotationOptions.setValues(legendPosition=(1, 99))
viewport.viewportAnnotationOptions.setValues(legendDecimalPlaces=1)
viewport.setValues(origin=(0.0, -1.05833435058594),
height=188.030563354492,
width=203.452590942383)
viewport.view.setValues(viewOffsetX=-2.724,
viewOffsetY=-52.6898,
cameraUpVector=(-0.453666, -0.433365, 0.778705),
nearPlane=1192.17,
farPlane=2323.39,
width=750.942,
height=665.183,
cameraPosition=(1236.44, 1079.87, 889.94),
cameraTarget=(27.3027, -54.758, 306.503))
def edit_keywords(mod, text, before_pattern=None, insert=False):
"""Edit the keywords to add commands not available in Abaqus CAE
Parameters
----------
mod : Abaqus Model object
The model for which the keywords will be edited.
text : str
The text to be included.
before_pattern : str, optional
One pattern used to find where to put the given text.
insert : bool, optional
Insert the text instead of replacing it.
"""
mod.keywordBlock.synchVersions(storeNodesAndElements=False)
sieBlocks=mod.keywordBlock.sieBlocks
if before_pattern is None:
index=len(sieBlocks) - 2
else:
index=None
for i in range(len(sieBlocks)):
sieBlock=sieBlocks[i]
if sieBlock.find(before_pattern) > -1:
index=i-1
break
if index is None:
print('WARNING - *edit_keywords failed !')
print(' %s pattern not found !' % before_pattern)
#TODO better error handling here...
if insert:
mod.keywordBlock.insert(index, text)
else:
mod.keywordBlock.replace(index, text)
def create_composite_layup(name, stack, plyts, mat_names, region, part,
part_csys, symmetric=False, scaling_factor=1.,
axis_normal=2):
r"""Creates a composite layup
Parameters
----------
name : str
Name of the new composite layup.
stack : list
Stacking sequence represented by a list of orientations in degress.
The stacking sequence starts inwards a ends outwards. The 0 degree
angle is along the axial direction and the angles are measured using
the right-hand rule with the normal direction being normal to the
shell surface pointing outwards.
plyts : list
List containing the ply thicknesses.
mat_names : list
List containing the material name for each ply.
region : an Abaqus Region object
The region consisting of geometric faces, where this laminate will be
assigned to.
part : an Abaqus part Object
A part object where the layup will be created.
part_csys : a valid Datum object
The cylindrical coordinate system of the part object.
symmetric : bool, optional
A boolean telling whether the laminate is symmetric.
scaling_factor : float, optional
A scaling factor to be applied to each ply thickness. Used to apply
thickness imperfection in some cases.
axis_normal : int, optional
Reference
"""
from abaqusConstants import (MIDDLE_SURFACE, FROM_SECTION, SHELL, ON, OFF,
DEFAULT, UNIFORM, SIMPSON, GRADIENT, SYSTEM, ROTATION_NONE,
AXIS_1, AXIS_2, AXIS_3, SPECIFY_THICKNESS, SPECIFY_ORIENT,
SINGLE_VALUE)
myLayup=part.CompositeLayup(name=name,
description='stack from inside to outside',
offsetType=MIDDLE_SURFACE,
symmetric=False,
thicknessAssignment=FROM_SECTION,
elementType=SHELL)
myLayup.Section(preIntegrate=OFF,
integrationRule=SIMPSON,
thicknessType=UNIFORM,
poissonDefinition=DEFAULT,
temperature=GRADIENT,
useDensity=OFF)
if axis_normal == 1:
axis = AXIS_1
elif axis_normal == 2:
axis = AXIS_2
elif axis_normal == 3:
axis = AXIS_3
else:
raise ValueError('Invalid value for `axis_normal`')
myLayup.ReferenceOrientation(orientationType=SYSTEM,
localCsys=part_csys,
fieldName='',
additionalRotationType=ROTATION_NONE,
angle=0.,
additionalRotationField='',
axis=axis)
#CREATING ALL PLIES
numIntPoints=3
if len(stack)==1:
numIntPoints=5
for i, angle in enumerate(stack):
plyt=plyts[i]
mat_name=mat_names[i]
myLayup.CompositePly(suppressed=False,
plyName='ply_%02d' % (i+1),
region=region,
material=mat_name,
thicknessType=SPECIFY_THICKNESS,
thickness=plyt*scaling_factor,
orientationValue=angle,
orientationType=SPECIFY_ORIENT,
numIntPoints=numIntPoints)
def create_isotropic_section(name, mat_names, region, part, model,T,Sect_name,OFFTS):
"""Creates an isotropic section
"""
from abaqusConstants import (MIDDLE_SURFACE, FROM_SECTION, SHELL, ON, OFF,
DEFAULT, UNIFORM, SIMPSON, GRADIENT, SYSTEM, ROTATION_NONE,
AXIS_1, AXIS_2, AXIS_3, SPECIFY_THICKNESS, SPECIFY_ORIENT,NO_IDEALIZATION,
SINGLE_VALUE)
model.HomogeneousShellSection(name=name,
preIntegrate=OFF, material=mat_names[0],
thicknessType=UNIFORM, thickness=T, thicknessField='',
idealization=NO_IDEALIZATION, poissonDefinition=DEFAULT,
thicknessModulus=None, temperature=GRADIENT, useDensity=OFF,
integrationRule=SIMPSON, numIntPts=5)
region = region
if OFFTS==0.0:
part.SectionAssignment(region=region, sectionName=Sect_name,
offset=OFFTS,offsetType=MIDDLE_SURFACE,
offsetField='',
thicknessAssignment=FROM_SECTION)
else:
part.SectionAssignment(region=region, sectionName=Sect_name,
offset=OFFTS,offsetType=SINGLE_VALUE,
offsetField='',
thicknessAssignment=FROM_SECTION)
def modify_composite_layup(part, layup_name, modify_func):
"""Modify plies within a composite layup
Directly modififying plies within a CompositeLayup is not possible, as
the plies are read-only after creation. This function emulates modifying,
by deleting and then re-creating plies, with modifications.
Parameters
----------
part : an Abaqus part object
The part that the to-be-modified layup is attached to.
layup_name : str
Name of the layup that is to be modified.
modify_func : function
Function that will be called for each ply. It should take as arguments
the ply index and a dictionary of keyword arguments. This dictionary
contains all keyword arguments that would re-create the original ply,
if passed to the ``CompositePly``-constructor. This function should
should make the necessary changes this dictionary and then return it.
The returned dictionary will then be used to create the new ply.
"""
from abaqusConstants import SPECIFY_ORIENT, CSYS
layup = part.compositeLayups[layup_name]
ply_data = []
STORE_PLY_ATTRS = ['additionalRotationField', 'additionalRotationType',
'angle', 'axis', 'material', 'numIntPoints', 'orientation',
'orientationType', 'orientationValue', 'plyName', 'region',
'suppressed', 'thickness', 'thicknessType']
for ply in layup.plies.values():
ply_data.append(dict((attr, getattr(ply, attr)) for attr in STORE_PLY_ATTRS))
layup.deletePlies()
for i, kwargs in enumerate(ply_data):
kwargs['region'] = part.sets[kwargs['region'][0]]
if kwargs['orientationType'] != SPECIFY_ORIENT:
kwargs.pop('orientationValue')
if kwargs['orientationType'] != CSYS:
kwargs.pop('orientation')
kwargs = modify_func(i, kwargs)
layup.CompositePly(**kwargs)
def createDiscreteField(mod, odb, step_name, frame_num):
from abaqusConstants import (NODES, PRESCRIBEDCONDITION_DOF)
u=odb.steps[step_name].frames[frame_num].fieldOutputs['U']
ur=odb.steps[step_name].frames[frame_num].fieldOutputs['UR']
datas=[]
for u_value, ur_value in zip(u.values, ur.values):
id=u_value.nodeLabel
data=np.concatenate((u_value.data, ur_value.data))
datas.append([id, data])
datas.sort(key=lambda x: x[0])
list_ids=[]
list_dof_values=[]
for data in datas:
list_ids += [data[0] for i in range(6)]
for dof in range(1,7):
list_dof_values += [float(dof), data[1][dof-1]]
tuple_ids=tuple(list_ids)
tuple_dof_values=tuple(list_dof_values)
mod.DiscreteField(name='discreteField',
description='',
location=NODES,
fieldType=PRESCRIBEDCONDITION_DOF,
dataWidth=2,
defaultValues=(0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
data=(('', 2, tuple_ids, tuple_dof_values),))
def create_sketch_plane(cc, entity):
"""Creates a sketch plane tangent to the shell surface
Parameters
----------
cc : :class:`.ConeCyl` object
entity : object
Any object with the attribute: ``thetadeg``, usually a
:class:`.Imperfection`.
Returns
-------
plane : :class:`.Plane` object
"""
from abaqus import mdb
from .utils import geom
part = mdb.models[cc.model_name].parts[cc.part_name_shell]
for plane in cc.sketch_planes:
if abs(plane.thetadeg - entity.thetadeg) < TOL:
return plane
x1, y1, z1 = utils.cyl2rec(1.05*cc.r, entity.thetadeg, 0.)
v1 = np.array([x1, y1, z1], dtype=FLOAT)
x2, y2, z2 = utils.cyl2rec(1.05*cc.r2, entity.thetadeg, cc.h)
v2 = np.array([x2, y2, z2], dtype=FLOAT)
v3 = np.cross(v2, v1)
if abs(v3.max()) > abs(v3.min()):
v3 = v3/v3.max() * cc.h/2.
else:
v3 = v3/abs(v3.min()) * cc.h/2.
x3, y3, z3 = v2 + v3
pt = part.DatumPointByCoordinate(coords=(x1, y1, z1))
p1 = part.datums[pt.id]
pt = part.DatumPointByCoordinate(coords=(x2, y2, z2))
p2 = part.datums[pt.id]
pt = part.DatumPointByCoordinate(coords=(x3, y3, z3))
p3 = part.datums[pt.id]
plane = geom.Plane()
plane.p1 = p1
plane.p2 = p2
plane.p3 = p3
plane.part = part
plane.create()
plane.thetadeg = entity.thetadeg
cc.sketch_planes.append(plane)
return plane
def set_colors_ti(cc):
from abaqus import mdb, session
from abaqusConstants import ON
part = mdb.models[cc.model_name].parts[cc.part_name_shell]
viewport = session.viewports[session.currentViewportName]
if viewport.displayedObject is None:
viewport.setValues(displayedObject=part)
cmap = viewport.colorMappings['Set']
viewport.setColor(colorMapping=cmap)
viewport.enableMultipleColors()
viewport.setColor(initialColor='#BDBDBD')
keys = part.sets.keys()
names = [k for k in keys if 'Set_measured_imp_t' in k]
# If there are not enough colors for all thicknesses,
# repeat the same color for multiple subsequent thickness sets
repeat = int(math.ceil(max(len(names), 1.0) / float(len(COLORS))))
overrides = dict((name, (True, COLORS[i//repeat], 'Default',
COLORS[i//repeat])) for i, name in enumerate(names))
dummylen = len(keys)-len(overrides)
new_COLORS = tuple([COLORS[-1]]*dummylen + list(COLORS))
session.autoColors.setValues(colors=new_COLORS)
cmap.updateOverrides(overrides=overrides)
keys_to_hide = set(keys) - set(names)
overrides = dict([[k, (False, )] for k in keys_to_hide])
cmap.updateOverrides(overrides=overrides)
viewport.partDisplay.setValues(mesh=ON)
viewport.partDisplay.geometryOptions.setValues(referenceRepresentation=ON)
viewport.disableMultipleColors()
def printLBmodes():
from abaqus import session
from abaqusConstants import DPI_1200, EXTRA_FINE, OFF, PNG
vp = session.viewports[session.currentViewportName]
session.psOptions.setValues(logo=OFF,
resolution=DPI_1200,
shadingQuality=EXTRA_FINE)
session.printOptions.setValues(reduceColors=False)
for i in range(1,51):
vp.odbDisplay.setFrame(step=0, frame=i)
session.printToFile(fileName='mode %02d.png'%i,
format=PNG,
canvasObjects=(vp,))
def get_current_odbdisplay():
from abaqus import session
viewport = session.viewports[session.currentViewportName]
try:
name = viewport.odbDisplay.name
except:
return None
return viewport.odbDisplay
def get_current_odb():
from abaqus import session
viewport = session.viewports[session.currentViewportName]
odbdisplay = get_current_odbdisplay()
if odbdisplay:
return session.odbs[odbdisplay.name]
else:
return None
def get_current_step_name():
odbdisplay = get_current_odbdisplay()
if odbdisplay:
index, frame_num = odbdisplay.fieldFrame
return odbdisplay.fieldSteps[index][0]
else:
return None
def get_current_frame():
odbdisplay = get_current_odbdisplay()
if not odbdisplay:
return None
step_name = get_current_step_name()
step_num, frame_num = odbdisplay.fieldFrame
odb = get_current_odb()
step = odb.steps[step_name]
return step.frames[frame_num]
| [
1,
364,
15945,
29908,
13,
9166,
9166,
9166,
4936,
29922,
13,
7270,
1907,
1976,
18463,
29879,
13940,
1545,
18078,
2783,
4869,
29889,
5363,
339,
29879,
29889,
5363,
339,
29879,
29918,
12171,
6348,
13,
9166,
9166,
9166,
4936,
29922,
13,
13,
636,
1857,
5453,
1057,
553,
4869,
29889,
5363,
339,
29879,
29889,
5363,
339,
29879,
29918,
12171,
13,
13,
797,
27722,
599,
3667,
1907,
3168,
393,
1818,
367,
8283,
515,
1976,
18463,
29879,
29889,
13,
13,
15945,
29908,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
5215,
5844,
13,
13,
5215,
12655,
408,
7442,
13,
13,
3166,
869,
3075,
1934,
1053,
313,
4986,
29931,
29892,
383,
3927,
1299,
29892,
23958,
24125,
29892,
23958,
1955,
29918,
25039,
8895,
29892,
23958,
1955,
29918,
29928,
1718,
29968,
29918,
13367,
4462,
29892,
13,
4706,
23958,
1955,
29918,
13367,
11375,
29897,
13,
3166,
869,
1053,
3667,
29879,
13,
13,
13,
1753,
10822,
29918,
7924,
7295,
13,
1678,
9995,
1888,
771,
345,
5912,
322,
11955,
310,
278,
1857,
13994,
297,
7604,
2133,
13,
13,
1678,
9995,
13,
1678,
515,
633,
18463,
29879,
1053,
4867,
13,
1678,
515,
633,
18463,
29879,
26570,
1053,
313,
1164,
29892,
438,
4198,
29892,
317,
1529,
2208,
29892,
360,
24943,
3352,
29892,
19474,
29903,
22027,
29892,
13,
9651,
29832,
2208,
9806,
29918,
29907,
8193,
29907,
1307,
29892,
5012,
29907,
2260,
29931,
29892,
2672,
22245,
13780,
29897,
13,
13,
1678,
6492,
29918,
7039,
29922,
7924,
29889,
3594,
1469,
12724,
29889,
8149,
580,
13,
1678,
565,
451,
525,
18454,
20867,
29899,
29896,
29915,
297,
4867,
29889,
3594,
3247,
1862,
29889,
8149,
7295,
13,
4706,
921,
1478,
29922,
7924,
29889,
18454,
20867,
877,
18454,
20867,
29899,
29896,
1495,
13,
1678,
1683,
29901,
13,
4706,
921,
1478,
29922,
7924,
29889,
3594,
3247,
1862,
1839,
18454,
20867,
29899,
29896,
2033,
13,
1678,
8727,
1170,
29922,
29916,
1478,
29889,
18366,
29889,
8149,
580,
29961,
29900,
29962,
13,
1678,
8727,
29922,
29916,
1478,
29889,
18366,
29961,
15425,
1170,
29962,
13,
1678,
13128,
29922,
7924,
29889,
3594,
1469,
12724,
29889,
8149,
580,
13,
1678,
565,
7431,
29898,
7050,
29897,
1360,
29900,
29901,
13,
4706,
736,
13,
1678,
921,
29891,
29896,
29922,
7924,
29889,
3594,
1469,
12724,
29961,
7050,
29961,
29900,
5262,
13,
1678,
274,
29896,
29922,
7924,
29889,
23902,
345,
29898,
3594,
1469,
29922,
3594,
29896,
29897,
13,
1678,
8727,
29889,
842,
9065,
29898,
2764,
1960,
1762,
20867,
7607,
29883,
29896,
29892,
511,
29897,
13,
1678,
4867,
29889,
1493,
4011,
1839,
1043,
637,
29901,
29871,
29896,
13359,
842,
9065,
29898,
4990,
287,
2061,
29922,
29916,
1478,
29897,
13,
13,
1678,
8727,
29922,
7924,
29889,
18366,
1839,
14732,
29899,
29896,
2033,
13,
1678,
8727,
29889,
1195,
272,
16070,
29896,
5756,
5568,
29889,
842,
9065,
29898,
4294,
29922,
5574,
29897,
13,
1678,
8727,
29889,
21355,
16070,
29896,
5756,
5568,
29889,
842,
9065,
29898,
4294,
29922,
5574,
29897,
13,
1678,
8727,
29889,
21355,
16070,
29896,
5756,
5568,
29889,
842,
9065,
29898,
3293,
29922,
29928,
24943,
3352,
29897,
13,
1678,
8727,
29889,
1195,
272,
16070,
29906,
5756,
5568,
29889,
842,
9065,
29898,
4294,
29922,
5574,
29897,
13,
1678,
8727,
29889,
21355,
16070,
29906,
5756,
5568,
29889,
842,
9065,
29898,
4294,
29922,
5574,
29897,
13,
1678,
8727,
29889,
21355,
16070,
29906,
5756,
5568,
29889,
842,
9065,
29898,
3293,
29922,
29928,
24943,
3352,
29897,
13,
1678,
8727,
29889,
7720,
13799,
29889,
3293,
29889,
842,
9065,
29898,
5589,
29922,
8824,
29897,
13,
1678,
8727,
29889,
26172,
29889,
842,
9065,
29898,
4294,
29922,
8824,
29897,
396,
5181,
304,
2767,
15983,
1819,
13,
1678,
8727,
29889,
26172,
29889,
842,
9065,
29898,
4294,
29922,
5574,
29897,
13,
1678,
8727,
29889,
26172,
29889,
6203,
29889,
842,
9065,
29898,
262,
842,
29922,
5574,
29897,
13,
1678,
8727,
29889,
26172,
29889,
6203,
29889,
842,
9065,
29898,
12574,
10302,
7607,
29900,
1696,
29900,
29889,
876,
13,
1678,
8727,
29889,
26172,
29889,
6203,
29889,
3293,
29889,
842,
9065,
29898,
5589,
29922,
5574,
29897,
13,
1678,
8727,
29889,
26172,
29889,
726,
5568,
29889,
842,
9065,
29898,
13,
9651,
4079,
2433,
29899,
29930,
29899,
27521,
12474,
29899,
27891,
29899,
29878,
29899,
8945,
29899,
29930,
29899,
29930,
29899,
29946,
29947,
29900,
29899,
29930,
29899,
29930,
29899,
29886,
29899,
29930,
29899,
29930,
29899,
29930,
1495,
13,
1678,
363,
1024,
297,
6492,
29918,
7039,
29901,
13,
4706,
274,
29922,
7924,
29889,
23902,
345,
29898,
3594,
1469,
29922,
7924,
29889,
3594,
1469,
12724,
29961,
978,
2314,
13,
4706,
8727,
29922,
7924,
29889,
3594,
3247,
1862,
1839,
18454,
20867,
29899,
29896,
13359,
18366,
1839,
14732,
29899,
29896,
2033,
13,
4706,
8727,
29889,
842,
9065,
29898,
2764,
1960,
1762,
20867,
7607,
29883,
29892,
876,
13,
4706,
8727,
29889,
9202,
23902,
1960,
29898,
9202,
29909,
9100,
29896,
29922,
5574,
29892,
6216,
29909,
9100,
29906,
29922,
5574,
29897,
13,
4706,
11672,
29922,
7924,
29889,
18366,
1839,
14732,
29899,
29896,
13359,
2764,
1960,
29961,
978,
29962,
13,
4706,
11672,
29889,
2764,
345,
5856,
29889,
842,
9065,
29898,
4294,
14730,
29922,
1164,
29897,
13,
4706,
11672,
29889,
2764,
345,
5856,
29889,
842,
9065,
29898,
18098,
3505,
29922,
29903,
1529,
2208,
29897,
13,
4706,
11672,
29889,
1220,
5568,
29889,
842,
9065,
29898,
27996,
2264,
29922,
29896,
29889,
29953,
29897,
13,
4706,
11672,
29889,
18098,
5568,
29889,
842,
9065,
29898,
2311,
29922,
29945,
29892,
13,
462,
462,
268,
17456,
29922,
8187,
2208,
9806,
29918,
29907,
8193,
29907,
1307,
29897,
13,
4706,
4853,
29922,
15425,
29889,
1165,
267,
29896,
29961,
29900,
29962,
13,
4706,
10156,
29922,
15425,
29889,
1165,
267,
29906,
29961,
29900,
29962,
13,
4706,
4853,
29889,
1643,
5568,
29889,
842,
9065,
29898,
13,
9651,
4079,
2433,
29899,
29930,
29899,
27521,
12474,
29899,
8934,
29899,
29878,
29899,
8945,
29899,
29930,
29899,
29930,
29899,
29946,
29947,
29900,
29899,
29930,
29899,
29930,
29899,
29886,
29899,
29930,
29899,
29930,
29899,
29930,
742,
13,
9651,
2927,
29922,
15032,
1955,
29918,
13367,
11375,
29897,
13,
4706,
4853,
29889,
3257,
5568,
29889,
842,
9065,
29898,
13,
9651,
4079,
2433,
29899,
29930,
29899,
27521,
12474,
29899,
8934,
29899,
29878,
29899,
8945,
29899,
29930,
29899,
29930,
29899,
29946,
29947,
29900,
29899,
29930,
29899,
29930,
29899,
29886,
29899,
29930,
29899,
29930,
29899,
29930,
742,
13,
9651,
2927,
29922,
15032,
1955,
29918,
13367,
11375,
29897,
13,
4706,
10156,
29889,
1643,
5568,
29889,
842,
9065,
29898,
13,
9651,
4079,
2433,
29899,
29930,
29899,
27521,
12474,
29899,
8934,
29899,
29878,
29899,
8945,
29899,
29930,
29899,
29930,
29899,
29946,
29947,
29900,
29899,
29930,
29899,
29930,
29899,
29886,
29899,
29930,
29899,
29930,
29899,
29930,
742,
13,
9651,
2927,
29922,
15032,
1955,
29918,
13367,
11375,
29897,
13,
4706,
10156,
29889,
3257,
5568,
29889,
842,
9065,
29898,
13,
9651,
4079,
2433,
29899,
29930,
29899,
27521,
12474,
29899,
8934,
29899,
29878,
29899,
8945,
29899,
29930,
29899,
29930,
29899,
29946,
29947,
29900,
29899,
29930,
29899,
29930,
29899,
29886,
29899,
29930,
29899,
29930,
29899,
29930,
742,
13,
9651,
2927,
29922,
15032,
1955,
29918,
13367,
11375,
29897,
13,
4706,
4853,
29889,
842,
9065,
29898,
24667,
29925,
9552,
29922,
12015,
29903,
22027,
29897,
13,
4706,
4853,
29889,
8990,
1469,
29889,
842,
9065,
29898,
1643,
5809,
29922,
2287,
29907,
2260,
29931,
29892,
13,
462,
795,
3858,
8009,
14991,
1169,
29922,
29900,
29892,
13,
462,
795,
9461,
29911,
860,
3981,
29922,
29946,
29892,
29897,
13,
4706,
10156,
29889,
842,
9065,
29898,
24667,
29925,
9552,
29922,
12015,
29903,
22027,
29897,
13,
4706,
10156,
29889,
8990,
1469,
29889,
842,
9065,
29898,
1643,
5809,
29922,
2287,
29907,
2260,
29931,
29892,
13,
462,
795,
3858,
8009,
14991,
1169,
29922,
29900,
29892,
29897,
13,
4706,
565,
4853,
29889,
8990,
1469,
29889,
3257,
29889,
2886,
877,
275,
572,
1495,
29958,
29899,
29896,
29901,
13,
9651,
4853,
29889,
8990,
1469,
29889,
842,
9065,
29898,
1643,
8009,
14991,
1169,
29922,
29896,
29897,
13,
4706,
565,
1024,
29889,
2886,
877,
6034,
398,
1659,
1495,
1405,
448,
29896,
29901,
13,
9651,
4853,
29889,
8990,
1469,
29889,
842,
9065,
29898,
24667,
6818,
29922,
1177,
22245,
13780,
29892,
13,
462,
462,
29871,
16892,
797,
17053,
29922,
29906,
29900,
29892,
13,
462,
462,
29871,
9461,
29911,
860,
3981,
29922,
29900,
29892,
13,
462,
462,
29871,
1375,
12300,
20606,
29872,
29922,
8824,
29892,
13,
462,
462,
29871,
1375,
1917,
10457,
29896,
29947,
29900,
29892,
13,
462,
462,
29871,
4236,
12300,
20606,
29872,
29922,
8824,
29892,
13,
462,
462,
29871,
4236,
1917,
29922,
29896,
29947,
29945,
29897,
13,
4706,
396,
13,
4706,
565,
313,
978,
29889,
2886,
877,
3738,
29918,
14851,
22498,
4174,
13079,
1495,
1405,
448,
29896,
470,
1024,
29889,
2886,
877,
3738,
29918,
14851,
29940,
7818,
11341,
29911,
1495,
1405,
448,
29896,
13,
308,
470,
1024,
29889,
2886,
877,
3738,
29918,
14851,
29940,
29924,
4174,
13079,
1495,
1405,
448,
29896,
470,
1024,
29889,
2886,
877,
3738,
29918,
14851,
29940,
29924,
9472,
13079,
1495,
1405,
448,
29896,
13,
308,
470,
1024,
29889,
2886,
877,
3738,
29918,
29911,
8132,
29902,
29956,
1495,
1678,
1405,
448,
29896,
1125,
13,
9651,
10156,
29889,
8990,
1469,
29889,
842,
9065,
29898,
1643,
8009,
14991,
1169,
29922,
29896,
29892,
13,
462,
462,
29871,
1375,
12300,
20606,
29872,
29922,
8824,
29892,
13,
462,
462,
29871,
1375,
1917,
29922,
29900,
29892,
13,
462,
462,
29871,
4236,
12300,
20606,
29872,
29922,
8824,
29892,
13,
462,
462,
29871,
4236,
1917,
29922,
29906,
29897,
13,
9651,
11672,
29889,
1220,
5568,
29889,
842,
9065,
29898,
27996,
2264,
29922,
29896,
29889,
29953,
29892,
13,
462,
462,
418,
2927,
29922,
15032,
1955,
29918,
25039,
8895,
29897,
13,
9651,
11672,
29889,
2764,
345,
5856,
29889,
842,
9065,
29898,
4294,
14730,
29922,
27681,
29897,
13,
9651,
10156,
29889,
3257,
5568,
29889,
842,
9065,
29898,
2780,
29922,
15032,
1955,
29918,
25039,
8895,
29897,
13,
9651,
10156,
29889,
1643,
5568,
29889,
842,
9065,
29898,
2780,
29922,
15032,
1955,
29918,
25039,
8895,
29897,
13,
4706,
396,
13,
4706,
565,
313,
978,
29889,
2886,
877,
4345,
29918,
14851,
22498,
4174,
13079,
1495,
1405,
448,
29896,
470,
1024,
29889,
2886,
877,
4345,
29918,
14851,
29940,
7818,
11341,
29911,
1495,
1405,
448,
29896,
13,
308,
470,
1024,
29889,
2886,
877,
4345,
29918,
14851,
29940,
29924,
4174,
13079,
1495,
1405,
448,
29896,
470,
1024,
29889,
2886,
877,
4345,
29918,
14851,
29940,
29924,
9472,
13079,
1495,
1405,
448,
29896,
13,
308,
470,
1024,
29889,
2886,
877,
4345,
29918,
29911,
8132,
29902,
29956,
1495,
1678,
1405,
448,
29896,
13,
308,
470,
1024,
29889,
2886,
877,
4345,
29918,
12648,
1495,
418,
1405,
448,
29896,
470,
1024,
29889,
2886,
877,
4345,
29918,
16173,
1495,
418,
1405,
448,
29896,
1125,
13,
9651,
10156,
29889,
8990,
1469,
29889,
842,
9065,
29898,
1643,
8009,
14991,
1169,
29922,
29896,
29892,
13,
462,
462,
29871,
1375,
12300,
20606,
29872,
29922,
8824,
29892,
13,
462,
462,
29871,
1375,
1917,
10457,
29900,
29889,
29945,
29892,
13,
462,
462,
29871,
4236,
12300,
20606,
29872,
29922,
8824,
29892,
13,
462,
462,
29871,
4236,
1917,
29922,
29896,
29889,
29900,
29897,
13,
9651,
11672,
29889,
1220,
5568,
29889,
842,
9065,
29898,
27996,
2264,
29922,
29896,
29889,
29953,
29892,
13,
462,
462,
418,
2927,
29922,
15032,
1955,
29918,
29928,
1718,
29968,
29918,
13367,
4462,
29897,
13,
9651,
11672,
29889,
2764,
345,
5856,
29889,
842,
9065,
29898,
4294,
14730,
29922,
27681,
29897,
13,
9651,
10156,
29889,
3257,
5568,
29889,
842,
9065,
29898,
2780,
29922,
15032,
1955,
29918,
29928,
1718,
29968,
29918,
13367,
4462,
29897,
13,
9651,
10156,
29889,
1643,
5568,
29889,
842,
9065,
29898,
2780,
29922,
15032,
1955,
29918,
29928,
1718,
29968,
29918,
13367,
4462,
29897,
13,
13,
13,
1753,
1596,
29918,
2732,
29898,
9507,
1125,
13,
1678,
9995,
11816,
263,
282,
865,
934,
515,
278,
1857,
1776,
637,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
10422,
584,
851,
13,
4706,
450,
1024,
310,
278,
1962,
282,
865,
934,
29889,
13,
13,
1678,
9995,
13,
1678,
515,
633,
18463,
29879,
1053,
4867,
13,
1678,
515,
633,
18463,
29879,
26570,
1053,
349,
9312,
13,
13,
1678,
1776,
637,
29922,
7924,
29889,
1493,
4011,
29961,
7924,
29889,
3784,
1043,
637,
1170,
29962,
13,
1678,
4867,
29889,
2158,
1762,
2283,
29898,
28926,
29922,
9507,
29892,
13,
462,
308,
3402,
29922,
29925,
9312,
29892,
13,
462,
308,
10508,
12724,
7607,
1493,
637,
29892,
876,
13,
13,
13,
1753,
731,
29918,
4381,
29918,
1493,
29898,
617,
1125,
13,
1678,
9995,
2697,
263,
2322,
1776,
297,
1797,
304,
7252,
13994,
515,
1422,
4733,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
21759,
584,
584,
1990,
29901,
1412,
29907,
650,
29907,
2904,
29952,
1203,
13,
13,
1678,
9995,
13,
1678,
515,
633,
18463,
29879,
26570,
1053,
313,
11889,
29918,
29903,
4162,
8426,
3738,
3352,
29892,
11698,
29928,
1964,
29892,
4810,
3580,
1164,
3919,
29892,
8528,
29911,
4717,
29918,
29943,
8895,
29892,
13,
9651,
383,
21661,
29892,
8291,
6545,
12054,
29892,
8707,
29911,
1177,
29965,
29949,
3308,
29892,
6732,
29892,
438,
4198,
29897,
13,
1678,
2413,
29890,
29922,
617,
29889,
14930,
29918,
9902,
580,
13,
1678,
565,
451,
2413,
29890,
29901,
13,
4706,
1596,
877,
3782,
869,
10396,
934,
1476,
363,
1273,
29879,
20714,
1273,
21759,
29889,
9057,
978,
29897,
13,
4706,
736,
13,
1678,
11636,
29885,
29922,
10396,
29889,
4632,
22400,
29889,
4130,
398,
29907,
9675,
267,
29961,
13,
795,
525,
3289,
1660,
9486,
16786,
1649,
29911,
29899,
25580,
23219,
29907,
29979,
23714,
8032,
29899,
9295,
29979,
7187,
29979,
23714,
8032,
2033,
13,
1678,
1776,
637,
29922,
7924,
29889,
1493,
4011,
29961,
7924,
29889,
3784,
1043,
637,
1170,
29962,
13,
1678,
1776,
637,
29889,
10396,
9323,
29889,
16121,
5856,
29889,
842,
9065,
29898,
13,
4706,
6588,
2642,
6466,
29922,
8824,
29892,
13852,
1542,
29922,
11889,
29918,
29903,
4162,
8426,
3738,
3352,
29892,
13,
4706,
1418,
398,
29907,
9675,
29922,
6008,
29885,
29897,
13,
1678,
1776,
637,
29889,
10396,
9323,
29889,
842,
26666,
16174,
29898,
13,
462,
4706,
2286,
4775,
2433,
29965,
742,
13,
462,
4706,
1962,
8003,
29922,
6632,
29928,
1964,
29892,
13,
462,
4706,
2143,
262,
882,
7607,
21514,
1164,
3919,
29892,
525,
29965,
29896,
5477,
29897,
13,
1678,
1776,
637,
29889,
711,
294,
293,
5856,
29889,
842,
9065,
29898,
12483,
482,
2642,
6466,
29922,
5574,
29892,
13,
462,
418,
11672,
1123,
4951,
882,
10108,
29922,
12194,
4717,
29918,
29943,
8895,
29897,
13,
1678,
1776,
637,
29889,
10396,
9323,
29889,
9435,
5856,
29889,
842,
9065,
29898,
12872,
3853,
2710,
29922,
29943,
21661,
29892,
13,
462,
308,
316,
5404,
29636,
292,
29922,
3904,
6545,
12054,
29892,
13,
462,
308,
9090,
17185,
29943,
7168,
29922,
29945,
29897,
13,
1678,
1776,
637,
29889,
10396,
9323,
29889,
1285,
473,
5856,
29889,
842,
9065,
29898,
1285,
473,
5568,
29922,
22412,
1177,
29965,
29949,
3308,
29897,
13,
1678,
1776,
637,
29889,
5060,
487,
580,
13,
1678,
1776,
637,
29889,
1493,
637,
21978,
5856,
29889,
842,
9065,
29898,
2388,
465,
29922,
27681,
29897,
13,
1678,
1776,
637,
29889,
1493,
637,
21978,
5856,
29889,
842,
9065,
29898,
3626,
328,
29922,
1164,
29897,
13,
1678,
1776,
637,
29889,
1493,
637,
21978,
5856,
29889,
842,
9065,
29898,
3257,
29922,
27681,
29897,
13,
1678,
1776,
637,
29889,
1493,
637,
21978,
5856,
29889,
842,
9065,
29898,
3859,
29922,
27681,
29897,
13,
1678,
1776,
637,
29889,
1493,
637,
21978,
5856,
29889,
842,
9065,
29898,
26172,
29922,
1164,
29897,
13,
1678,
1776,
637,
29889,
1493,
637,
21978,
5856,
29889,
842,
9065,
29898,
26172,
7030,
29922,
27681,
29897,
13,
1678,
1776,
637,
29889,
1493,
637,
21978,
5856,
29889,
842,
9065,
29898,
26172,
3313,
29922,
27681,
29897,
13,
1678,
1776,
637,
29889,
1493,
637,
21978,
5856,
29889,
842,
9065,
29898,
13,
9651,
15983,
9824,
2433,
29899,
29930,
29899,
27521,
12474,
29899,
8934,
29899,
29878,
29899,
8945,
29899,
29930,
29899,
29930,
29899,
29896,
29946,
29900,
29899,
29930,
29899,
29930,
29899,
29886,
29899,
29930,
29899,
29930,
29899,
29930,
1495,
13,
1678,
1776,
637,
29889,
1493,
637,
21978,
5856,
29889,
842,
9065,
29898,
13,
9651,
15983,
9824,
2433,
29899,
29930,
29899,
27521,
12474,
29899,
8934,
29899,
29878,
29899,
8945,
29899,
29930,
29899,
29930,
29899,
29896,
29947,
29900,
29899,
29930,
29899,
29930,
29899,
29886,
29899,
29930,
29899,
29930,
29899,
29930,
1495,
13,
1678,
1776,
637,
29889,
1493,
637,
21978,
5856,
29889,
842,
9065,
29898,
26172,
8003,
7607,
29896,
29892,
29871,
29929,
29929,
876,
13,
1678,
1776,
637,
29889,
1493,
637,
21978,
5856,
29889,
842,
9065,
29898,
26172,
23307,
29925,
6048,
29922,
29896,
29897,
13,
1678,
1776,
637,
29889,
842,
9065,
29898,
12574,
7607,
29900,
29889,
29900,
29892,
448,
29896,
29889,
29900,
29945,
29947,
29941,
29941,
29946,
29941,
29945,
29900,
29945,
29947,
29945,
29929,
29946,
511,
13,
462,
539,
3171,
29922,
29896,
29947,
29947,
29889,
29900,
29941,
29900,
29945,
29953,
29941,
29941,
29945,
29946,
29946,
29929,
29906,
29892,
13,
462,
539,
2920,
29922,
29906,
29900,
29941,
29889,
29946,
29945,
29906,
29945,
29929,
29900,
29929,
29946,
29906,
29941,
29947,
29941,
29897,
13,
1678,
1776,
637,
29889,
1493,
29889,
842,
9065,
29898,
1493,
10302,
29990,
10457,
29906,
29889,
29955,
29906,
29946,
29892,
13,
462,
9651,
1776,
10302,
29979,
10457,
29945,
29906,
29889,
29953,
29947,
29929,
29947,
29892,
13,
462,
9651,
10656,
3373,
12877,
29922,
6278,
29900,
29889,
29946,
29945,
29941,
29953,
29953,
29953,
29892,
448,
29900,
29889,
29946,
29941,
29941,
29941,
29953,
29945,
29892,
29871,
29900,
29889,
29955,
29955,
29947,
29955,
29900,
29945,
511,
13,
462,
9651,
2978,
3247,
1662,
29922,
29896,
29896,
29929,
29906,
29889,
29896,
29955,
29892,
13,
462,
9651,
2215,
3247,
1662,
29922,
29906,
29941,
29906,
29941,
29889,
29941,
29929,
29892,
13,
462,
9651,
2920,
29922,
29955,
29945,
29900,
29889,
29929,
29946,
29906,
29892,
13,
462,
9651,
3171,
29922,
29953,
29953,
29945,
29889,
29896,
29947,
29941,
29892,
13,
462,
9651,
10656,
8003,
7607,
29896,
29906,
29941,
29953,
29889,
29946,
29946,
29892,
29871,
29896,
29900,
29955,
29929,
29889,
29947,
29955,
29892,
29871,
29947,
29947,
29929,
29889,
29929,
29946,
511,
13,
462,
9651,
10656,
8667,
7607,
29906,
29955,
29889,
29941,
29900,
29906,
29955,
29892,
448,
29945,
29946,
29889,
29955,
29945,
29947,
29892,
29871,
29941,
29900,
29953,
29889,
29945,
29900,
29941,
876,
13,
13,
13,
1753,
3863,
29918,
1989,
9303,
29898,
1545,
29892,
1426,
29892,
1434,
29918,
11037,
29922,
8516,
29892,
4635,
29922,
8824,
1125,
13,
1678,
9995,
6103,
278,
29361,
304,
788,
8260,
451,
3625,
297,
1976,
18463,
29879,
12766,
29923,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
878,
584,
1976,
18463,
29879,
8125,
1203,
13,
4706,
450,
1904,
363,
607,
278,
29361,
674,
367,
8788,
29889,
13,
1678,
1426,
584,
851,
13,
4706,
450,
1426,
304,
367,
5134,
29889,
13,
1678,
1434,
29918,
11037,
584,
851,
29892,
13136,
13,
4706,
3118,
4766,
1304,
304,
1284,
988,
304,
1925,
278,
2183,
1426,
29889,
13,
1678,
4635,
584,
6120,
29892,
13136,
13,
4706,
24505,
278,
1426,
2012,
310,
15270,
372,
29889,
13,
13,
1678,
9995,
13,
1678,
878,
29889,
26766,
7445,
29889,
19274,
305,
29963,
414,
1080,
29898,
8899,
20284,
2855,
18868,
29922,
8824,
29897,
13,
1678,
2686,
7445,
29879,
29922,
1545,
29889,
26766,
7445,
29889,
29879,
347,
7445,
29879,
13,
1678,
565,
1434,
29918,
11037,
338,
6213,
29901,
13,
4706,
2380,
29922,
2435,
29898,
29879,
347,
7445,
29879,
29897,
448,
29871,
29906,
13,
1678,
1683,
29901,
13,
4706,
2380,
29922,
8516,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
29879,
347,
7445,
29879,
22164,
13,
9651,
2686,
7445,
29922,
29879,
347,
7445,
29879,
29961,
29875,
29962,
13,
9651,
565,
2686,
7445,
29889,
2886,
29898,
11083,
29918,
11037,
29897,
1405,
448,
29896,
29901,
13,
18884,
2380,
29922,
29875,
29899,
29896,
13,
18884,
2867,
13,
4706,
565,
2380,
338,
6213,
29901,
13,
9651,
1596,
877,
29956,
25614,
448,
334,
5628,
29918,
1989,
9303,
5229,
1738,
1495,
13,
9651,
1596,
877,
3986,
1273,
29879,
4766,
451,
1476,
1738,
29915,
1273,
1434,
29918,
11037,
29897,
13,
9651,
396,
4986,
3970,
2253,
1059,
11415,
1244,
856,
13,
1678,
565,
4635,
29901,
13,
4706,
878,
29889,
26766,
7445,
29889,
7851,
29898,
2248,
29892,
1426,
29897,
13,
1678,
1683,
29901,
13,
4706,
878,
29889,
26766,
7445,
29889,
6506,
29898,
2248,
29892,
1426,
29897,
13,
13,
13,
1753,
1653,
29918,
22410,
568,
29918,
8387,
786,
29898,
978,
29892,
5096,
29892,
282,
368,
1372,
29892,
1775,
29918,
7039,
29892,
5120,
29892,
760,
29892,
13,
462,
965,
760,
29918,
2395,
952,
29892,
18348,
29922,
8824,
29892,
21640,
29918,
19790,
29922,
29896,
1696,
13,
462,
965,
9685,
29918,
8945,
29922,
29906,
1125,
13,
1678,
364,
15945,
29908,
9832,
1078,
263,
20842,
6568,
786,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
1024,
584,
851,
13,
4706,
4408,
310,
278,
716,
20842,
6568,
786,
29889,
13,
1678,
5096,
584,
1051,
13,
4706,
10292,
292,
5665,
9875,
491,
263,
1051,
310,
7769,
800,
297,
316,
3663,
29889,
13,
4706,
450,
5096,
292,
5665,
8665,
297,
2935,
263,
10614,
714,
2935,
29889,
450,
29871,
29900,
7426,
13,
4706,
10696,
338,
3412,
278,
4853,
616,
5305,
322,
278,
23619,
526,
17005,
773,
13,
4706,
278,
1492,
29899,
3179,
5751,
411,
278,
4226,
5305,
1641,
4226,
304,
278,
13,
4706,
6473,
7101,
13330,
714,
2935,
29889,
13,
1678,
282,
368,
1372,
584,
1051,
13,
4706,
2391,
6943,
278,
282,
368,
12003,
2264,
267,
29889,
13,
1678,
1775,
29918,
7039,
584,
1051,
13,
4706,
2391,
6943,
278,
5518,
1024,
363,
1269,
282,
368,
29889,
13,
1678,
5120,
584,
385,
1976,
18463,
29879,
11069,
1203,
13,
4706,
450,
5120,
19849,
310,
26224,
17240,
29892,
988,
445,
301,
9103,
403,
674,
367,
13,
4706,
9859,
304,
29889,
13,
1678,
760,
584,
385,
1976,
18463,
29879,
760,
4669,
13,
4706,
319,
760,
1203,
988,
278,
6568,
786,
674,
367,
2825,
29889,
13,
1678,
760,
29918,
2395,
952,
584,
263,
2854,
13373,
398,
1203,
13,
4706,
450,
20396,
513,
16888,
14821,
1788,
310,
278,
760,
1203,
29889,
13,
1678,
18348,
584,
6120,
29892,
13136,
13,
4706,
319,
7223,
14509,
3692,
278,
301,
9103,
403,
338,
18348,
29889,
13,
1678,
21640,
29918,
19790,
584,
5785,
29892,
13136,
13,
4706,
319,
21640,
7329,
304,
367,
7436,
304,
1269,
282,
368,
12003,
2264,
29889,
501,
8485,
304,
3394,
13,
4706,
12003,
2264,
10112,
20309,
297,
777,
4251,
29889,
13,
1678,
9685,
29918,
8945,
584,
938,
29892,
13136,
13,
4706,
12105,
13,
13,
1678,
9995,
13,
1678,
515,
633,
18463,
29879,
26570,
1053,
313,
29924,
1367,
29928,
1307,
29918,
29903,
4574,
29943,
11538,
29892,
3895,
29918,
1660,
9838,
29892,
317,
9606,
2208,
29892,
6732,
29892,
438,
4198,
29892,
13,
9651,
22236,
29892,
8291,
6545,
12054,
29892,
22717,
3580,
3094,
29892,
18016,
3035,
29902,
3919,
29892,
28962,
1254,
12665,
29892,
390,
2891,
8098,
29918,
29940,
12413,
29892,
13,
9651,
319,
29990,
3235,
29918,
29896,
29892,
319,
29990,
3235,
29918,
29906,
29892,
319,
29990,
3235,
29918,
29941,
29892,
317,
4162,
29907,
6545,
29979,
29918,
4690,
2965,
29968,
8186,
1799,
29892,
317,
4162,
29907,
6545,
29979,
29918,
1955,
29902,
3919,
29892,
13,
9651,
317,
4214,
1307,
29918,
19143,
29897,
13,
1678,
590,
29931,
388,
786,
29922,
1595,
29889,
1523,
1066,
568,
29931,
388,
786,
29898,
978,
29922,
978,
29892,
13,
462,
9651,
6139,
2433,
1429,
515,
2768,
304,
5377,
742,
13,
462,
9651,
9210,
1542,
29922,
29924,
1367,
29928,
1307,
29918,
29903,
4574,
29943,
11538,
29892,
13,
462,
9651,
18348,
29922,
8824,
29892,
13,
462,
9651,
12003,
2264,
7900,
10194,
29922,
21482,
29918,
1660,
9838,
29892,
13,
462,
9651,
1543,
1542,
29922,
7068,
29923,
2208,
29897,
13,
1678,
590,
29931,
388,
786,
29889,
13438,
29898,
1457,
23573,
403,
29922,
27681,
29892,
13,
462,
1678,
13465,
10740,
29922,
5425,
3580,
3094,
29892,
13,
462,
1678,
12003,
2264,
1542,
29922,
3904,
6545,
12054,
29892,
13,
462,
1678,
772,
17387,
14683,
29922,
23397,
29892,
13,
462,
1678,
10430,
29922,
14345,
3035,
29902,
3919,
29892,
13,
462,
1678,
671,
29928,
575,
537,
29922,
27681,
29897,
13,
1678,
565,
9685,
29918,
8945,
1275,
29871,
29896,
29901,
13,
4706,
9685,
353,
319,
29990,
3235,
29918,
29896,
13,
1678,
25342,
9685,
29918,
8945,
1275,
29871,
29906,
29901,
13,
4706,
9685,
353,
319,
29990,
3235,
29918,
29906,
13,
1678,
25342,
9685,
29918,
8945,
1275,
29871,
29941,
29901,
13,
4706,
9685,
353,
319,
29990,
3235,
29918,
29941,
13,
1678,
1683,
29901,
13,
4706,
12020,
7865,
2392,
877,
13919,
995,
363,
421,
8990,
29918,
8945,
29952,
1495,
13,
1678,
590,
29931,
388,
786,
29889,
7422,
25231,
29898,
20659,
1542,
29922,
14816,
1254,
12665,
29892,
13,
462,
462,
1887,
29907,
9675,
29922,
1595,
29918,
2395,
952,
29892,
13,
462,
462,
1746,
1170,
2433,
742,
13,
462,
462,
5684,
21281,
362,
1542,
29922,
1672,
29911,
8098,
29918,
29940,
12413,
29892,
13,
462,
462,
10696,
29922,
29900,
1696,
13,
462,
462,
5684,
21281,
362,
3073,
2433,
742,
13,
462,
462,
9685,
29922,
8990,
29897,
13,
1678,
396,
22245,
1299,
4214,
15149,
349,
5265,
2890,
13,
1678,
954,
2928,
20325,
29922,
29941,
13,
1678,
565,
7431,
29898,
1429,
29897,
1360,
29896,
29901,
13,
4706,
954,
2928,
20325,
29922,
29945,
13,
1678,
363,
474,
29892,
10696,
297,
26985,
29898,
1429,
1125,
13,
4706,
282,
368,
29873,
29922,
17632,
1372,
29961,
29875,
29962,
13,
4706,
1775,
29918,
978,
29922,
2922,
29918,
7039,
29961,
29875,
29962,
13,
4706,
590,
29931,
388,
786,
29889,
1523,
1066,
568,
29925,
368,
29898,
19303,
1253,
287,
29922,
8824,
29892,
13,
462,
632,
282,
368,
1170,
2433,
17632,
29918,
29995,
29900,
29906,
29881,
29915,
1273,
313,
29875,
29974,
29896,
511,
13,
462,
632,
5120,
29922,
12803,
29892,
13,
462,
632,
5518,
29922,
2922,
29918,
978,
29892,
13,
462,
632,
12003,
2264,
1542,
29922,
29903,
4162,
29907,
6545,
29979,
29918,
4690,
2965,
29968,
8186,
1799,
29892,
13,
462,
632,
12003,
2264,
29922,
17632,
29873,
29930,
19529,
292,
29918,
19790,
29892,
13,
462,
632,
19843,
1917,
29922,
2521,
29892,
13,
462,
632,
19843,
1542,
29922,
29903,
4162,
29907,
6545,
29979,
29918,
1955,
29902,
3919,
29892,
13,
462,
632,
954,
2928,
20325,
29922,
1949,
2928,
20325,
29897,
13,
13,
1753,
1653,
29918,
275,
28467,
293,
29918,
2042,
29898,
978,
29892,
1775,
29918,
7039,
29892,
5120,
29892,
760,
29892,
1904,
29892,
29911,
29892,
29903,
522,
29918,
978,
29892,
27681,
9375,
1125,
13,
1678,
9995,
9832,
1078,
385,
338,
28467,
293,
4004,
13,
13,
1678,
9995,
13,
13,
1678,
515,
633,
18463,
29879,
26570,
1053,
313,
29924,
1367,
29928,
1307,
29918,
29903,
4574,
29943,
11538,
29892,
3895,
29918,
1660,
9838,
29892,
317,
9606,
2208,
29892,
6732,
29892,
438,
4198,
29892,
13,
9651,
22236,
29892,
8291,
6545,
12054,
29892,
22717,
3580,
3094,
29892,
18016,
3035,
29902,
3919,
29892,
28962,
1254,
12665,
29892,
390,
2891,
8098,
29918,
29940,
12413,
29892,
13,
9651,
319,
29990,
3235,
29918,
29896,
29892,
319,
29990,
3235,
29918,
29906,
29892,
319,
29990,
3235,
29918,
29941,
29892,
317,
4162,
29907,
6545,
29979,
29918,
4690,
2965,
29968,
8186,
1799,
29892,
317,
4162,
29907,
6545,
29979,
29918,
1955,
29902,
3919,
29892,
6632,
29918,
22027,
1964,
26664,
8098,
29892,
13,
9651,
317,
4214,
1307,
29918,
19143,
29897,
13,
13,
1678,
1904,
29889,
24259,
23724,
16037,
13438,
29898,
978,
29922,
978,
29892,
13,
4706,
758,
23573,
403,
29922,
27681,
29892,
5518,
29922,
2922,
29918,
7039,
29961,
29900,
1402,
13,
4706,
12003,
2264,
1542,
29922,
3904,
6545,
12054,
29892,
12003,
2264,
29922,
29911,
29892,
12003,
2264,
3073,
2433,
742,
13,
4706,
10839,
2133,
29922,
6632,
29918,
22027,
1964,
26664,
8098,
29892,
772,
17387,
14683,
29922,
23397,
29892,
13,
4706,
12003,
2264,
2111,
14999,
29922,
8516,
29892,
10430,
29922,
14345,
3035,
29902,
3919,
29892,
671,
29928,
575,
537,
29922,
27681,
29892,
13,
4706,
13465,
10740,
29922,
5425,
3580,
3094,
29892,
954,
2928,
29925,
1372,
29922,
29945,
29897,
13,
13,
1678,
5120,
353,
5120,
13,
1678,
565,
438,
4198,
9375,
1360,
29900,
29889,
29900,
29901,
13,
4706,
760,
29889,
13438,
7900,
10194,
29898,
12803,
29922,
12803,
29892,
4004,
1170,
29922,
29903,
522,
29918,
978,
29892,
13,
462,
1669,
9210,
29922,
27681,
9375,
29892,
10289,
1542,
29922,
29924,
1367,
29928,
1307,
29918,
29903,
4574,
29943,
11538,
29892,
13,
462,
1669,
9210,
3073,
2433,
742,
13,
462,
1669,
12003,
2264,
7900,
10194,
29922,
21482,
29918,
1660,
9838,
29897,
13,
1678,
1683,
29901,
13,
4706,
760,
29889,
13438,
7900,
10194,
29898,
12803,
29922,
12803,
29892,
4004,
1170,
29922,
29903,
522,
29918,
978,
29892,
13,
462,
1669,
9210,
29922,
27681,
9375,
29892,
10289,
1542,
29922,
29903,
4214,
1307,
29918,
19143,
29892,
13,
462,
1669,
9210,
3073,
2433,
742,
13,
462,
1669,
12003,
2264,
7900,
10194,
29922,
21482,
29918,
1660,
9838,
29897,
13,
13,
1753,
6623,
29918,
22410,
568,
29918,
8387,
786,
29898,
1595,
29892,
6568,
786,
29918,
978,
29892,
6623,
29918,
9891,
1125,
13,
1678,
9995,
2111,
1598,
282,
3687,
2629,
263,
20842,
6568,
786,
13,
13,
1678,
8797,
368,
878,
361,
9215,
282,
3687,
2629,
263,
24497,
568,
29931,
388,
786,
338,
451,
1950,
29892,
408,
13,
1678,
278,
282,
3687,
526,
1303,
29899,
6194,
1156,
11265,
29889,
910,
740,
953,
352,
1078,
23815,
29892,
13,
1678,
491,
21228,
322,
769,
337,
29899,
1037,
1218,
282,
3687,
29892,
411,
26278,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
760,
584,
385,
1976,
18463,
29879,
760,
1203,
13,
4706,
450,
760,
393,
278,
304,
29899,
915,
29899,
1545,
2164,
6568,
786,
338,
10959,
304,
29889,
13,
1678,
6568,
786,
29918,
978,
584,
851,
13,
4706,
4408,
310,
278,
6568,
786,
393,
338,
304,
367,
9120,
29889,
13,
1678,
6623,
29918,
9891,
584,
740,
13,
4706,
6680,
393,
674,
367,
2000,
363,
1269,
282,
368,
29889,
739,
881,
2125,
408,
6273,
13,
4706,
278,
282,
368,
2380,
322,
263,
8600,
310,
13553,
6273,
29889,
910,
8600,
13,
4706,
3743,
599,
13553,
6273,
393,
723,
337,
29899,
3258,
278,
2441,
282,
368,
29892,
13,
4706,
565,
4502,
304,
278,
4954,
1523,
1066,
568,
29925,
368,
16159,
29899,
27821,
29889,
910,
740,
881,
13,
4706,
881,
1207,
278,
5181,
3620,
445,
8600,
322,
769,
736,
372,
29889,
13,
4706,
450,
4133,
8600,
674,
769,
367,
1304,
304,
1653,
278,
716,
282,
368,
29889,
13,
13,
1678,
9995,
13,
1678,
515,
633,
18463,
29879,
26570,
1053,
317,
4162,
29907,
6545,
29979,
29918,
1955,
29902,
3919,
29892,
315,
14816,
29903,
13,
1678,
6568,
786,
353,
760,
29889,
22410,
568,
29931,
388,
14340,
29961,
8387,
786,
29918,
978,
29962,
13,
13,
1678,
282,
368,
29918,
1272,
353,
5159,
13,
1678,
317,
4986,
1525,
29918,
7390,
29979,
29918,
1299,
5659,
29903,
353,
6024,
1202,
3245,
21281,
362,
3073,
742,
525,
1202,
3245,
21281,
362,
1542,
742,
13,
4706,
525,
2521,
742,
525,
8990,
742,
525,
15388,
742,
525,
1949,
2928,
20325,
742,
525,
20659,
742,
13,
4706,
525,
20659,
1542,
742,
525,
20659,
1917,
742,
525,
17632,
1170,
742,
525,
12803,
742,
13,
4706,
525,
19303,
1253,
287,
742,
525,
27996,
2264,
742,
525,
27996,
2264,
1542,
2033,
13,
1678,
363,
282,
368,
297,
6568,
786,
29889,
29886,
3687,
29889,
5975,
7295,
13,
4706,
282,
368,
29918,
1272,
29889,
4397,
29898,
8977,
3552,
5552,
29892,
679,
5552,
29898,
17632,
29892,
12421,
876,
363,
12421,
297,
317,
4986,
1525,
29918,
7390,
29979,
29918,
1299,
5659,
29903,
876,
13,
1678,
6568,
786,
29889,
8143,
29925,
3687,
580,
13,
13,
1678,
363,
474,
29892,
9049,
5085,
297,
26985,
29898,
17632,
29918,
1272,
1125,
13,
4706,
9049,
5085,
1839,
12803,
2033,
353,
760,
29889,
7224,
29961,
19290,
1839,
12803,
2033,
29961,
29900,
5262,
13,
4706,
565,
9049,
5085,
1839,
20659,
1542,
2033,
2804,
317,
4162,
29907,
6545,
29979,
29918,
1955,
29902,
3919,
29901,
13,
9651,
9049,
5085,
29889,
7323,
877,
20659,
1917,
1495,
13,
4706,
565,
9049,
5085,
1839,
20659,
1542,
2033,
2804,
315,
14816,
29903,
29901,
13,
9651,
9049,
5085,
29889,
7323,
877,
20659,
1495,
13,
4706,
9049,
5085,
353,
6623,
29918,
9891,
29898,
29875,
29892,
9049,
5085,
29897,
13,
4706,
6568,
786,
29889,
1523,
1066,
568,
29925,
368,
29898,
1068,
19290,
29897,
13,
13,
13,
1753,
1653,
4205,
9084,
3073,
29898,
1545,
29892,
2413,
29890,
29892,
4331,
29918,
978,
29892,
3515,
29918,
1949,
1125,
13,
1678,
515,
633,
18463,
29879,
26570,
1053,
313,
6632,
2287,
29903,
29892,
349,
1525,
7187,
3960,
29933,
3352,
6007,
29928,
22122,
29918,
3970,
29943,
29897,
13,
1678,
318,
29922,
10396,
29889,
24530,
29961,
10568,
29918,
978,
1822,
19935,
29961,
2557,
29918,
1949,
1822,
2671,
6466,
29879,
1839,
29965,
2033,
13,
1678,
5065,
29922,
10396,
29889,
24530,
29961,
10568,
29918,
978,
1822,
19935,
29961,
2557,
29918,
1949,
1822,
2671,
6466,
29879,
1839,
4574,
2033,
13,
1678,
6155,
29922,
2636,
13,
1678,
363,
318,
29918,
1767,
29892,
5065,
29918,
1767,
297,
14319,
29898,
29884,
29889,
5975,
29892,
5065,
29889,
5975,
1125,
13,
4706,
1178,
29922,
29884,
29918,
1767,
29889,
3177,
4775,
13,
4706,
848,
29922,
9302,
29889,
535,
29883,
2579,
403,
3552,
29884,
29918,
1767,
29889,
1272,
29892,
5065,
29918,
1767,
29889,
1272,
876,
13,
4706,
6155,
29889,
4397,
4197,
333,
29892,
848,
2314,
13,
1678,
6155,
29889,
6605,
29898,
1989,
29922,
2892,
921,
29901,
921,
29961,
29900,
2314,
13,
1678,
1051,
29918,
4841,
29922,
2636,
13,
1678,
1051,
29918,
29881,
974,
29918,
5975,
29922,
2636,
13,
1678,
363,
848,
297,
6155,
29901,
13,
4706,
1051,
29918,
4841,
4619,
518,
1272,
29961,
29900,
29962,
363,
474,
297,
3464,
29898,
29953,
4638,
13,
4706,
363,
437,
29888,
297,
3464,
29898,
29896,
29892,
29955,
1125,
13,
9651,
1051,
29918,
29881,
974,
29918,
5975,
4619,
518,
7411,
29898,
29881,
974,
511,
848,
29961,
29896,
3816,
29881,
974,
29899,
29896,
5262,
13,
1678,
18761,
29918,
4841,
29922,
23583,
29898,
1761,
29918,
4841,
29897,
13,
1678,
18761,
29918,
29881,
974,
29918,
5975,
29922,
23583,
29898,
1761,
29918,
29881,
974,
29918,
5975,
29897,
13,
1678,
878,
29889,
4205,
9084,
3073,
29898,
978,
2433,
2218,
9084,
3073,
742,
13,
462,
418,
6139,
2433,
742,
13,
462,
418,
4423,
29922,
6632,
2287,
29903,
29892,
13,
462,
418,
1746,
1542,
29922,
15094,
7187,
3960,
29933,
3352,
6007,
29928,
22122,
29918,
3970,
29943,
29892,
13,
462,
418,
848,
6110,
29922,
29906,
29892,
13,
462,
418,
2322,
9065,
7607,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
511,
13,
462,
418,
848,
7607,
877,
742,
29871,
29906,
29892,
18761,
29918,
4841,
29892,
18761,
29918,
29881,
974,
29918,
5975,
511,
876,
13,
13,
13,
1753,
1653,
29918,
808,
3486,
29918,
22116,
29898,
617,
29892,
7855,
1125,
13,
1678,
9995,
9832,
1078,
263,
21256,
10694,
18806,
296,
304,
278,
6473,
7101,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
21759,
584,
584,
1990,
29901,
1412,
29907,
650,
29907,
2904,
29952,
1203,
13,
13,
1678,
7855,
584,
1203,
13,
4706,
3139,
1203,
411,
278,
5352,
29901,
4954,
3416,
12163,
29952,
1673,
5491,
263,
13,
4706,
584,
1990,
29901,
1412,
1888,
546,
20309,
1412,
13,
13,
1678,
16969,
13,
1678,
448,
22158,
13,
1678,
10694,
584,
584,
1990,
29901,
1412,
3247,
1662,
29952,
1203,
13,
13,
1678,
9995,
13,
1678,
515,
633,
18463,
29879,
1053,
286,
2585,
13,
13,
1678,
515,
869,
13239,
1053,
23216,
13,
13,
1678,
760,
353,
286,
2585,
29889,
9794,
29961,
617,
29889,
4299,
29918,
978,
1822,
20895,
29961,
617,
29889,
1595,
29918,
978,
29918,
15903,
29962,
13,
1678,
363,
10694,
297,
21759,
29889,
808,
3486,
29918,
9018,
267,
29901,
13,
4706,
565,
6425,
29898,
22116,
29889,
3416,
12163,
448,
7855,
29889,
3416,
12163,
29897,
529,
323,
5607,
29901,
13,
9651,
736,
10694,
13,
1678,
921,
29896,
29892,
343,
29896,
29892,
503,
29896,
353,
3667,
29879,
29889,
1270,
29880,
29906,
3757,
29898,
29896,
29889,
29900,
29945,
29930,
617,
29889,
29878,
29892,
7855,
29889,
3416,
12163,
29892,
1678,
29900,
1846,
13,
1678,
325,
29896,
353,
7442,
29889,
2378,
4197,
29916,
29896,
29892,
343,
29896,
29892,
503,
29896,
1402,
26688,
29922,
29943,
3927,
1299,
29897,
13,
1678,
921,
29906,
29892,
343,
29906,
29892,
503,
29906,
353,
3667,
29879,
29889,
1270,
29880,
29906,
3757,
29898,
29896,
29889,
29900,
29945,
29930,
617,
29889,
29878,
29906,
29892,
7855,
29889,
3416,
12163,
29892,
21759,
29889,
29882,
29897,
13,
1678,
325,
29906,
353,
7442,
29889,
2378,
4197,
29916,
29906,
29892,
343,
29906,
29892,
503,
29906,
1402,
26688,
29922,
29943,
3927,
1299,
29897,
13,
1678,
325,
29941,
353,
7442,
29889,
19128,
29898,
29894,
29906,
29892,
325,
29896,
29897,
13,
1678,
565,
6425,
29898,
29894,
29941,
29889,
3317,
3101,
1405,
6425,
29898,
29894,
29941,
29889,
1195,
580,
1125,
13,
4706,
325,
29941,
353,
325,
29941,
29914,
29894,
29941,
29889,
3317,
580,
334,
21759,
29889,
29882,
29914,
29906,
29889,
13,
1678,
1683,
29901,
13,
4706,
325,
29941,
353,
325,
29941,
29914,
6897,
29898,
29894,
29941,
29889,
1195,
3101,
334,
21759,
29889,
29882,
29914,
29906,
29889,
13,
1678,
921,
29941,
29892,
343,
29941,
29892,
503,
29941,
353,
325,
29906,
718,
325,
29941,
13,
1678,
19592,
353,
760,
29889,
16390,
398,
5228,
2059,
7967,
16065,
29898,
1111,
4339,
7607,
29916,
29896,
29892,
343,
29896,
29892,
503,
29896,
876,
13,
1678,
282,
29896,
353,
760,
29889,
4130,
6762,
29961,
415,
29889,
333,
29962,
13,
1678,
19592,
353,
760,
29889,
16390,
398,
5228,
2059,
7967,
16065,
29898,
1111,
4339,
7607,
29916,
29906,
29892,
343,
29906,
29892,
503,
29906,
876,
13,
1678,
282,
29906,
353,
760,
29889,
4130,
6762,
29961,
415,
29889,
333,
29962,
13,
1678,
19592,
353,
760,
29889,
16390,
398,
5228,
2059,
7967,
16065,
29898,
1111,
4339,
7607,
29916,
29941,
29892,
343,
29941,
29892,
503,
29941,
876,
13,
1678,
282,
29941,
353,
760,
29889,
4130,
6762,
29961,
415,
29889,
333,
29962,
13,
1678,
10694,
353,
23216,
29889,
3247,
1662,
580,
13,
1678,
10694,
29889,
29886,
29896,
353,
282,
29896,
13,
1678,
10694,
29889,
29886,
29906,
353,
282,
29906,
13,
1678,
10694,
29889,
29886,
29941,
353,
282,
29941,
13,
1678,
10694,
29889,
1595,
353,
760,
13,
1678,
10694,
29889,
3258,
580,
13,
1678,
10694,
29889,
3416,
12163,
353,
7855,
29889,
3416,
12163,
13,
1678,
21759,
29889,
808,
3486,
29918,
9018,
267,
29889,
4397,
29898,
22116,
29897,
13,
1678,
736,
10694,
13,
13,
13,
1753,
731,
29918,
27703,
29918,
2034,
29898,
617,
1125,
13,
1678,
515,
633,
18463,
29879,
1053,
286,
2585,
29892,
4867,
13,
1678,
515,
633,
18463,
29879,
26570,
1053,
6732,
13,
13,
1678,
760,
353,
286,
2585,
29889,
9794,
29961,
617,
29889,
4299,
29918,
978,
1822,
20895,
29961,
617,
29889,
1595,
29918,
978,
29918,
15903,
29962,
13,
1678,
1776,
637,
353,
4867,
29889,
1493,
4011,
29961,
7924,
29889,
3784,
1043,
637,
1170,
29962,
13,
1678,
565,
1776,
637,
29889,
4990,
287,
2061,
338,
6213,
29901,
13,
4706,
1776,
637,
29889,
842,
9065,
29898,
4990,
287,
2061,
29922,
1595,
29897,
13,
1678,
274,
1958,
353,
1776,
637,
29889,
2780,
9689,
886,
1839,
2697,
2033,
13,
1678,
1776,
637,
29889,
842,
3306,
29898,
2780,
15845,
29922,
29883,
1958,
29897,
13,
1678,
1776,
637,
29889,
12007,
15329,
552,
1625,
943,
580,
13,
1678,
1776,
637,
29889,
842,
3306,
29898,
11228,
3306,
2433,
29937,
29933,
4051,
4051,
29928,
1495,
13,
1678,
6611,
353,
760,
29889,
7224,
29889,
8149,
580,
13,
1678,
2983,
353,
518,
29895,
363,
413,
297,
6611,
565,
525,
2697,
29918,
1004,
294,
2955,
29918,
6574,
29918,
29873,
29915,
297,
413,
29962,
13,
13,
1678,
396,
960,
727,
526,
451,
3307,
11955,
363,
599,
12003,
2264,
267,
29892,
13,
1678,
396,
12312,
278,
1021,
2927,
363,
2999,
15352,
12003,
2264,
6166,
13,
1678,
12312,
353,
938,
29898,
755,
29889,
27696,
29898,
3317,
29898,
2435,
29898,
7039,
511,
29871,
29896,
29889,
29900,
29897,
847,
5785,
29898,
2435,
29898,
15032,
24125,
13697,
13,
1678,
975,
24040,
353,
9657,
3552,
978,
29892,
313,
5574,
29892,
23958,
24125,
29961,
29875,
458,
14358,
1402,
525,
4592,
742,
13,
4706,
23958,
24125,
29961,
29875,
458,
14358,
12622,
363,
474,
29892,
1024,
297,
26985,
29898,
7039,
876,
13,
1678,
20254,
2435,
353,
7431,
29898,
8149,
6817,
2435,
29898,
957,
24040,
29897,
13,
1678,
716,
29918,
15032,
24125,
353,
18761,
4197,
15032,
24125,
14352,
29896,
5262,
29930,
29881,
11770,
2435,
718,
1051,
29898,
15032,
24125,
876,
13,
1678,
4867,
29889,
6921,
1625,
943,
29889,
842,
9065,
29898,
27703,
29922,
1482,
29918,
15032,
24125,
29897,
13,
1678,
274,
1958,
29889,
5504,
3563,
24040,
29898,
957,
24040,
29922,
957,
24040,
29897,
13,
13,
1678,
6611,
29918,
517,
29918,
11458,
353,
731,
29898,
8149,
29897,
448,
731,
29898,
7039,
29897,
13,
1678,
975,
24040,
353,
9657,
4197,
29961,
29895,
29892,
313,
8824,
29892,
1723,
29962,
363,
413,
297,
6611,
29918,
517,
29918,
11458,
2314,
13,
1678,
274,
1958,
29889,
5504,
3563,
24040,
29898,
957,
24040,
29922,
957,
24040,
29897,
13,
13,
1678,
1776,
637,
29889,
1595,
9323,
29889,
842,
9065,
29898,
4467,
29882,
29922,
1164,
29897,
13,
1678,
1776,
637,
29889,
1595,
9323,
29889,
19156,
5856,
29889,
842,
9065,
29898,
5679,
1123,
26081,
29922,
1164,
29897,
13,
1678,
1776,
637,
29889,
20472,
15329,
552,
1625,
943,
580,
13,
13,
13,
1753,
1596,
29931,
29933,
1545,
267,
7295,
13,
1678,
515,
633,
18463,
29879,
1053,
4867,
13,
1678,
515,
633,
18463,
29879,
26570,
1053,
360,
2227,
29918,
29896,
29906,
29900,
29900,
29892,
8528,
29911,
4717,
29918,
29943,
8895,
29892,
438,
4198,
29892,
349,
9312,
13,
13,
1678,
325,
29886,
353,
4867,
29889,
1493,
4011,
29961,
7924,
29889,
3784,
1043,
637,
1170,
29962,
13,
1678,
4867,
29889,
567,
5856,
29889,
842,
9065,
29898,
14569,
29922,
27681,
29892,
13,
462,
18884,
10104,
29922,
29928,
2227,
29918,
29896,
29906,
29900,
29900,
29892,
13,
462,
18884,
528,
9382,
24399,
537,
29922,
12194,
4717,
29918,
29943,
8895,
29897,
13,
1678,
4867,
29889,
2158,
5856,
29889,
842,
9065,
29898,
17469,
1625,
943,
29922,
8824,
29897,
13,
1678,
363,
474,
297,
3464,
29898,
29896,
29892,
29945,
29896,
1125,
13,
4706,
325,
29886,
29889,
10396,
9323,
29889,
842,
4308,
29898,
10568,
29922,
29900,
29892,
3515,
29922,
29875,
29897,
13,
4706,
4867,
29889,
2158,
1762,
2283,
29898,
28926,
2433,
8513,
1273,
29900,
29906,
29881,
29889,
2732,
29915,
29995,
29875,
29892,
13,
462,
632,
3402,
29922,
29925,
9312,
29892,
13,
462,
632,
10508,
12724,
7607,
29894,
29886,
29892,
876,
13,
13,
13,
1753,
679,
29918,
3784,
29918,
10396,
4990,
7295,
13,
1678,
515,
633,
18463,
29879,
1053,
4867,
13,
13,
1678,
1776,
637,
353,
4867,
29889,
1493,
4011,
29961,
7924,
29889,
3784,
1043,
637,
1170,
29962,
13,
1678,
1018,
29901,
13,
4706,
1024,
353,
1776,
637,
29889,
10396,
9323,
29889,
978,
13,
1678,
5174,
29901,
13,
4706,
736,
6213,
13,
13,
1678,
736,
1776,
637,
29889,
10396,
9323,
13,
13,
13,
1753,
679,
29918,
3784,
29918,
10396,
7295,
13,
1678,
515,
633,
18463,
29879,
1053,
4867,
13,
13,
1678,
1776,
637,
353,
4867,
29889,
1493,
4011,
29961,
7924,
29889,
3784,
1043,
637,
1170,
29962,
13,
1678,
2413,
29890,
4990,
353,
679,
29918,
3784,
29918,
10396,
4990,
580,
13,
1678,
565,
2413,
29890,
4990,
29901,
13,
4706,
736,
4867,
29889,
397,
5824,
29961,
10396,
4990,
29889,
978,
29962,
13,
1678,
1683,
29901,
13,
4706,
736,
6213,
13,
13,
13,
1753,
679,
29918,
3784,
29918,
10568,
29918,
978,
7295,
13,
1678,
2413,
29890,
4990,
353,
679,
29918,
3784,
29918,
10396,
4990,
580,
13,
1678,
565,
2413,
29890,
4990,
29901,
13,
4706,
2380,
29892,
3515,
29918,
1949,
353,
2413,
29890,
4990,
29889,
2671,
4308,
13,
4706,
736,
2413,
29890,
4990,
29889,
2671,
7789,
567,
29961,
2248,
3816,
29900,
29962,
13,
1678,
1683,
29901,
13,
4706,
736,
6213,
13,
13,
13,
1753,
679,
29918,
3784,
29918,
2557,
7295,
13,
1678,
2413,
29890,
4990,
353,
679,
29918,
3784,
29918,
10396,
4990,
580,
13,
1678,
565,
451,
2413,
29890,
4990,
29901,
13,
4706,
736,
6213,
13,
1678,
4331,
29918,
978,
353,
679,
29918,
3784,
29918,
10568,
29918,
978,
580,
13,
1678,
4331,
29918,
1949,
29892,
3515,
29918,
1949,
353,
2413,
29890,
4990,
29889,
2671,
4308,
13,
1678,
2413,
29890,
353,
679,
29918,
3784,
29918,
10396,
580,
13,
1678,
4331,
353,
2413,
29890,
29889,
24530,
29961,
10568,
29918,
978,
29962,
13,
1678,
736,
4331,
29889,
19935,
29961,
2557,
29918,
1949,
29962,
13,
2
] |
plugins/libinst.cfg.puppet/src/libinst/cfg/puppet/nodes.py | gonicus/clacks | 2 | 1604210 | <gh_stars>1-10
# This file is part of the clacks framework.
#
# http://clacks-project.org
#
# Copyright:
# (C) 2010-2012 GONICUS GmbH, Germany, http://www.gonicus.de
#
# License:
# GPL-2: http://www.gnu.org/licenses/gpl-2.0.html
#
# See the LICENSE file in the project's top-level directory for details.
import re
import os
class PuppetNodeManager(object):
__node = re.compile("^node\s+['\"]?([^'\"\s]+)['\"]?(\s+inherits ['\"]?([^'\"]+)['\"]?)?\s*{$")
__include = re.compile("^include\s+['\"]*([^'\"]+)['\"]*$")
__var = re.compile("^\$([^\s=]+)\s*=\s*(['\"]?[^'\"]+['\"]?)$")
def __init__(self, path):
self.__path = path
self.__nodes = {}
trigger = False
# Create file, if it does not exist yet
if not os.path.exists(path):
open(path, "a")
for line in open(path, "r").readlines():
line = line.strip()
# Look for nodes
if line.startswith("node "):
name, dummy, inherit = self.__node.match(line).groups()
if not name in self.__nodes:
self.__nodes[name] = {'var': {}, 'inherit': inherit, 'include': []}
trigger = True
continue
# Look at the stuff inside of the node definition
if trigger:
# ... trigger an store process if the node is ready
if line.startswith("}"):
trigger = False
continue
# ... save potential variables
if line.startswith("$"):
key, value = self.__var.match(line).groups()
self.__nodes[name]['var'][key] = value
# ... save potential includes
if line.startswith("include"):
self.__nodes[name]['include'].append(self.__include.match(line).groups()[0])
def add(self, name, variables={}, includes=[], inherit=None):
self.__nodes[name] = {'var': variables, 'inherit': inherit, 'include': includes}
def remove(self, name):
del self.__nodes[name]
def write(self):
with open(self.__path, "w") as f:
f.write(self.__repr__())
def has(self, name):
return name in self.__nodes
def __repr__(self):
res = ""
for node, data in self.__nodes.items():
# Filter empty variables
r_vars = dict([(x, data['var'][x]) for x in data['var'] if data['var'][x]])
res += "node '%s' %s{\n" % (node, "inherits " + data['inherit'] + " " if data['inherit'] else "")
res += "\n".join(map(lambda x: "\tinclude %s" % x, data['include']))
res += "\n"
res += "\n".join(map(lambda x: "\t$%s = %s" % (x, r_vars[x]), r_vars))
res += "\n}\n\n"
return res.strip() + "\n"
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
910,
934,
338,
760,
310,
278,
274,
2364,
29879,
6890,
29889,
13,
29937,
13,
29937,
29871,
1732,
597,
29883,
2364,
29879,
29899,
4836,
29889,
990,
13,
29937,
13,
29937,
14187,
1266,
29901,
13,
29937,
29871,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29900,
29899,
29906,
29900,
29896,
29906,
402,
1164,
2965,
3308,
18156,
29892,
9556,
29892,
1732,
597,
1636,
29889,
29887,
8927,
375,
29889,
311,
13,
29937,
13,
29937,
19245,
29901,
13,
29937,
29871,
402,
7390,
29899,
29906,
29901,
1732,
597,
1636,
29889,
18713,
29889,
990,
29914,
506,
11259,
29914,
29887,
572,
29899,
29906,
29889,
29900,
29889,
1420,
13,
29937,
13,
29937,
2823,
278,
365,
2965,
1430,
1660,
934,
297,
278,
2060,
29915,
29879,
2246,
29899,
5563,
3884,
363,
4902,
29889,
13,
13,
5215,
337,
13,
5215,
2897,
13,
13,
13,
1990,
12129,
7988,
4247,
3260,
29898,
3318,
1125,
13,
13,
1678,
4770,
3177,
353,
337,
29889,
12198,
703,
29985,
3177,
29905,
29879,
29974,
1839,
29905,
3108,
29973,
4197,
29985,
29915,
5931,
29905,
29879,
10062,
29897,
1839,
29905,
3108,
29973,
1194,
29879,
29974,
262,
2276,
1169,
6024,
29905,
3108,
29973,
4197,
29985,
12764,
3108,
28135,
1839,
29905,
3108,
29973,
6877,
29905,
29879,
29930,
8290,
1159,
13,
1678,
4770,
2856,
353,
337,
29889,
12198,
703,
29985,
2856,
29905,
29879,
29974,
1839,
29905,
3108,
29930,
4197,
29985,
12764,
3108,
28135,
1839,
29905,
3108,
29394,
1159,
13,
1678,
4770,
1707,
353,
337,
29889,
12198,
703,
3823,
29938,
4197,
3823,
29879,
29922,
10062,
2144,
29879,
29930,
2013,
29879,
16395,
1839,
29905,
3108,
29973,
22896,
12764,
3108,
29974,
1839,
29905,
3108,
29973,
1262,
1159,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2224,
1125,
13,
4706,
1583,
17255,
2084,
353,
2224,
13,
4706,
1583,
17255,
18010,
353,
6571,
13,
13,
4706,
7135,
353,
7700,
13,
13,
4706,
396,
6204,
934,
29892,
565,
372,
947,
451,
1863,
3447,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
2084,
1125,
13,
9651,
1722,
29898,
2084,
29892,
376,
29874,
1159,
13,
13,
4706,
363,
1196,
297,
1722,
29898,
2084,
29892,
376,
29878,
2564,
949,
9012,
7295,
13,
9651,
1196,
353,
1196,
29889,
17010,
580,
13,
13,
9651,
396,
7419,
363,
7573,
13,
9651,
565,
1196,
29889,
27382,
2541,
703,
3177,
376,
1125,
13,
18884,
1024,
29892,
20254,
29892,
13125,
353,
1583,
17255,
3177,
29889,
4352,
29898,
1220,
467,
13155,
580,
13,
18884,
565,
451,
1024,
297,
1583,
17255,
18010,
29901,
13,
462,
1678,
1583,
17255,
18010,
29961,
978,
29962,
353,
11117,
1707,
2396,
24335,
525,
262,
27069,
2396,
13125,
29892,
525,
2856,
2396,
5159,
29913,
13,
13,
18884,
7135,
353,
5852,
13,
18884,
6773,
13,
13,
9651,
396,
7419,
472,
278,
6433,
2768,
310,
278,
2943,
5023,
13,
9651,
565,
7135,
29901,
13,
13,
18884,
396,
2023,
7135,
385,
3787,
1889,
565,
278,
2943,
338,
7960,
13,
18884,
565,
1196,
29889,
27382,
2541,
703,
5038,
1125,
13,
462,
1678,
7135,
353,
7700,
13,
462,
1678,
6773,
13,
13,
18884,
396,
2023,
4078,
7037,
3651,
13,
18884,
565,
1196,
29889,
27382,
2541,
703,
29938,
29908,
1125,
13,
462,
1678,
1820,
29892,
995,
353,
1583,
17255,
1707,
29889,
4352,
29898,
1220,
467,
13155,
580,
13,
462,
1678,
1583,
17255,
18010,
29961,
978,
22322,
1707,
2033,
29961,
1989,
29962,
353,
995,
13,
13,
18884,
396,
2023,
4078,
7037,
7805,
13,
18884,
565,
1196,
29889,
27382,
2541,
703,
2856,
29908,
1125,
13,
462,
1678,
1583,
17255,
18010,
29961,
978,
22322,
2856,
13359,
4397,
29898,
1311,
17255,
2856,
29889,
4352,
29898,
1220,
467,
13155,
580,
29961,
29900,
2314,
13,
13,
1678,
822,
788,
29898,
1311,
29892,
1024,
29892,
3651,
3790,
1118,
7805,
11759,
1402,
13125,
29922,
8516,
1125,
13,
4706,
1583,
17255,
18010,
29961,
978,
29962,
353,
11117,
1707,
2396,
3651,
29892,
525,
262,
27069,
2396,
13125,
29892,
525,
2856,
2396,
7805,
29913,
13,
13,
1678,
822,
3349,
29898,
1311,
29892,
1024,
1125,
13,
4706,
628,
1583,
17255,
18010,
29961,
978,
29962,
13,
13,
1678,
822,
2436,
29898,
1311,
1125,
13,
4706,
411,
1722,
29898,
1311,
17255,
2084,
29892,
376,
29893,
1159,
408,
285,
29901,
13,
9651,
285,
29889,
3539,
29898,
1311,
17255,
276,
558,
1649,
3101,
13,
13,
1678,
822,
756,
29898,
1311,
29892,
1024,
1125,
13,
4706,
736,
1024,
297,
1583,
17255,
18010,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
620,
353,
5124,
13,
13,
4706,
363,
2943,
29892,
848,
297,
1583,
17255,
18010,
29889,
7076,
7295,
13,
13,
9651,
396,
19916,
4069,
3651,
13,
9651,
364,
29918,
16908,
353,
9657,
4197,
29898,
29916,
29892,
848,
1839,
1707,
2033,
29961,
29916,
2314,
363,
921,
297,
848,
1839,
1707,
2033,
565,
848,
1839,
1707,
2033,
29961,
29916,
24960,
13,
13,
9651,
620,
4619,
376,
3177,
14210,
29879,
29915,
1273,
29879,
741,
29876,
29908,
1273,
313,
3177,
29892,
376,
262,
2276,
1169,
376,
718,
848,
1839,
262,
27069,
2033,
718,
376,
376,
565,
848,
1839,
262,
27069,
2033,
1683,
20569,
13,
9651,
620,
4619,
6634,
29876,
1642,
7122,
29898,
1958,
29898,
2892,
921,
29901,
6634,
29873,
2856,
1273,
29879,
29908,
1273,
921,
29892,
848,
1839,
2856,
25901,
13,
9651,
620,
4619,
6634,
29876,
29908,
13,
9651,
620,
4619,
6634,
29876,
1642,
7122,
29898,
1958,
29898,
2892,
921,
29901,
6634,
29873,
29938,
29995,
29879,
353,
1273,
29879,
29908,
1273,
313,
29916,
29892,
364,
29918,
16908,
29961,
29916,
11724,
364,
29918,
16908,
876,
13,
9651,
620,
4619,
6634,
29876,
1012,
29876,
29905,
29876,
29908,
13,
4706,
736,
620,
29889,
17010,
580,
718,
6634,
29876,
29908,
13,
2
] |
tests/algorithm/test_tournament_selector.py | wbknez/evored-warrior | 0 | 180980 | """
"""
from copy import copy
from random import randint
from unittest import TestCase
from pathos.multiprocessing import ProcessPool
from evored.genome import Genome
from evored.algorithm.selection import TournamentSelector
class TournamentSelectorTest(TestCase):
"""
Test suite for TournamentSelector.
"""
pool = ProcessPool(processes=2)
"""
The process pool for testing.
"""
def setUp(self):
self.params = {"selector.tournament_size": 4}
self.selector = TournamentSelector()
def tearDown(self):
pass
def test_basic_tournament_selection(self):
genomes = [
Genome(list(range(randint(1, 10))), 20),
Genome(list(range(randint(1, 10))), 32),
Genome(list(range(randint(1, 10))), 44),
Genome(list(range(randint(1, 10))), 2),
]
results = self.selector.select(None, genomes, self.params)
self.assertEqual(genomes[2], results)
def test_tournament_selection_in_parallel(self):
genomes = [
Genome(list(range(randint(1, 10))), 20),
Genome(list(range(randint(1, 10))), 44),
Genome(list(range(randint(1, 10))), 32),
Genome(list(range(randint(1, 10))), 2),
]
expected = [copy(genomes[1]) for _ in range(4)]
results = self.selector.evolve(genomes, self.pool, self.params)
self.assertEqual(len(results), 4)
self.assertEqual(results, expected)
| [
1,
9995,
13,
13,
15945,
29908,
13,
3166,
3509,
1053,
3509,
13,
3166,
4036,
1053,
20088,
524,
13,
3166,
443,
27958,
1053,
4321,
8259,
13,
13,
3166,
2224,
359,
29889,
18056,
307,
985,
292,
1053,
10554,
11426,
13,
13,
3166,
3415,
4395,
29889,
1885,
608,
1053,
5739,
608,
13,
3166,
3415,
4395,
29889,
20567,
29889,
21731,
1053,
29427,
10378,
13,
13,
13,
1990,
29427,
10378,
3057,
29898,
3057,
8259,
1125,
13,
1678,
9995,
13,
1678,
4321,
9460,
363,
29427,
10378,
29889,
13,
1678,
9995,
13,
13,
1678,
11565,
353,
10554,
11426,
29898,
5014,
267,
29922,
29906,
29897,
13,
1678,
9995,
13,
1678,
450,
1889,
11565,
363,
6724,
29889,
13,
1678,
9995,
13,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
1583,
29889,
7529,
353,
8853,
14357,
29889,
29873,
2905,
1166,
29918,
2311,
1115,
29871,
29946,
29913,
13,
4706,
1583,
29889,
14357,
353,
29427,
10378,
580,
13,
13,
1678,
822,
734,
279,
6767,
29898,
1311,
1125,
13,
4706,
1209,
13,
13,
1678,
822,
1243,
29918,
16121,
29918,
29873,
2905,
1166,
29918,
21731,
29898,
1311,
1125,
13,
4706,
20853,
267,
353,
518,
13,
9651,
5739,
608,
29898,
1761,
29898,
3881,
29898,
9502,
524,
29898,
29896,
29892,
29871,
29896,
29900,
876,
511,
29871,
29906,
29900,
511,
13,
9651,
5739,
608,
29898,
1761,
29898,
3881,
29898,
9502,
524,
29898,
29896,
29892,
29871,
29896,
29900,
876,
511,
29871,
29941,
29906,
511,
13,
9651,
5739,
608,
29898,
1761,
29898,
3881,
29898,
9502,
524,
29898,
29896,
29892,
29871,
29896,
29900,
876,
511,
29871,
29946,
29946,
511,
13,
9651,
5739,
608,
29898,
1761,
29898,
3881,
29898,
9502,
524,
29898,
29896,
29892,
29871,
29896,
29900,
876,
511,
29871,
29906,
511,
13,
4706,
4514,
13,
13,
4706,
2582,
353,
1583,
29889,
14357,
29889,
2622,
29898,
8516,
29892,
20853,
267,
29892,
1583,
29889,
7529,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1885,
290,
267,
29961,
29906,
1402,
2582,
29897,
13,
13,
1678,
822,
1243,
29918,
29873,
2905,
1166,
29918,
21731,
29918,
262,
29918,
23482,
29898,
1311,
1125,
13,
4706,
20853,
267,
353,
518,
13,
9651,
5739,
608,
29898,
1761,
29898,
3881,
29898,
9502,
524,
29898,
29896,
29892,
29871,
29896,
29900,
876,
511,
29871,
29906,
29900,
511,
13,
9651,
5739,
608,
29898,
1761,
29898,
3881,
29898,
9502,
524,
29898,
29896,
29892,
29871,
29896,
29900,
876,
511,
29871,
29946,
29946,
511,
13,
9651,
5739,
608,
29898,
1761,
29898,
3881,
29898,
9502,
524,
29898,
29896,
29892,
29871,
29896,
29900,
876,
511,
29871,
29941,
29906,
511,
13,
9651,
5739,
608,
29898,
1761,
29898,
3881,
29898,
9502,
524,
29898,
29896,
29892,
29871,
29896,
29900,
876,
511,
29871,
29906,
511,
13,
4706,
4514,
13,
13,
4706,
3806,
353,
518,
8552,
29898,
1885,
290,
267,
29961,
29896,
2314,
363,
903,
297,
3464,
29898,
29946,
4638,
13,
4706,
2582,
353,
1583,
29889,
14357,
29889,
29872,
1555,
345,
29898,
1885,
290,
267,
29892,
1583,
29889,
10109,
29892,
1583,
29889,
7529,
29897,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
9902,
511,
29871,
29946,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
9902,
29892,
3806,
29897,
13,
2
] |
pycatia/space_analyses_interfaces/section.py | evereux/catia_python | 90 | 179805 | #! usr/bin/python3.6
"""
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-07-06 14:02:20.222384
.. warning::
The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only.
They are there as a guide as to how the visual basic / catscript functions work
and thus help debugging in pycatia.
"""
from typing import TYPE_CHECKING
from pycatia.navigator_interfaces.annotated_views import AnnotatedViews
from pycatia.navigator_interfaces.group import Group
from pycatia.navigator_interfaces.marker_3Ds import Marker3Ds
from pycatia.system_interfaces.any_object import AnyObject
from pycatia.system_interfaces.system_service import SystemService
if TYPE_CHECKING:
from pycatia.in_interfaces.document import Document
class Section(AnyObject):
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| System.IUnknown
| System.IDispatch
| System.CATBaseUnknown
| System.CATBaseDispatch
| System.AnyObject
| Section
|
| Represents the Section object.
| The Section object is a specification of a sectioning display and
| computationwith a section plane, section slice or section box.
"""
def __init__(self, com_object):
super().__init__(com_object)
self.section = com_object
@property
def annotated_views(self) -> AnnotatedViews:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property AnnotatedViews() As AnnotatedViews (Read Only)
|
| Returns the AnnotatedViews collection of the section.
|
| Example:
|
| This example retrieves the AnnotatedViews collection of NewSection
| Section.
|
|
| Dim TheAnnotatedViewsList As AnnotatedViews
| Set TheAnnotatedViewsList = NewSection.AnnotatedViews
:return: AnnotatedViews
:rtype: AnnotatedViews
"""
return AnnotatedViews(self.section.AnnotatedViews)
@property
def behavior(self) -> int:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property Behavior() As CatSectionBehavior
|
| Returns or sets the general behavior of the section: Freeze, Automatic
| update, manual update
|
| The behavior value are defined in CatSectionBehavior.
|
| Example:
|
| The first example retrieves the behavior of NewSection
| Section.
|
|
| Dim SectionBehavior As CatSectionBehavior
| Behavior = NewSection.Behavior
|
|
|
|
|
| The second example sets the behavior of NewSection
| Section.
|
|
| NewSection.Behavior = catSectionBehaviorAutomatic
:return: int
:rtype: int
"""
return self.section.Behavior
@behavior.setter
def behavior(self, value: int):
"""
:param int value:
"""
self.section.Behavior = value
@property
def cut_mode(self) -> int:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property CutMode() As long
|
| Returns or sets the cutting mode of the section.
|
| The cutting mode value is 1 for clipping or 0 without
| clipping.
|
| Example:
|
| The first example retrieves the cutting mode of NewSection
| Section.
|
|
| Dim SectionMode As Integer
| SectionMode = NewSection.CutMode
|
|
|
|
|
| The second example sets the cutting mode of NewSection
| Section.
|
|
| NewSection.CutMode = 1
:return: int
:rtype: int
"""
return self.section.CutMode
@cut_mode.setter
def cut_mode(self, value: int):
"""
:param int value:
"""
self.section.CutMode = value
@property
def group(self) -> Group:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property Group() As Group
|
| Returns or sets the sectioned group.
|
| By default, it is the all leaves group.
|
| Example:
|
| The first example retrieves the group of NewSection
| Section.
|
| Dim AGroup As Group
| AGroup = NewSection.Group
|
| The second example sets the group of NewSection
| Section.
|
| Dim AGroup As Group
| NewSection.Group = AGroup
:return: Group
:rtype: Group
"""
return Group(self.section.Group)
@group.setter
def group(self, value: Group):
"""
:param Group value:
"""
self.section.Group = value
@property
def height(self) -> float:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property Height() As double
|
| Returns or sets the height of the section.
|
| The height value must be greater than 0.
|
| Example:
|
| The first example retrieves the height of NewSection
| Section.
|
|
| Dim SectionHeight As double
| SectionHeight = NewSection.Height
|
|
|
|
|
| The second example sets the height value of NewSection
| Section.
|
|
| NewSection.Height = 100.
:return: float
:rtype: float
"""
return self.section.Height
@height.setter
def height(self, value: float):
"""
:param float value:
"""
self.section.Height = value
@property
def marker_3ds(self) -> Marker3Ds:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
| o Property Marker3Ds() As Marker3Ds (Read Only)
|
| Returns the Marker3Ds collection of the section.
|
| Example:
|
| This example retrieves the Marker3Ds collection of NewSection
| Section.
|
|
| Dim TheMarker3DsList As Marker3Ds
| Set TheMarker3DsList = NewSection.Marker3Ds
:return: Marker3Ds
:rtype: Marker3Ds
"""
return Marker3Ds(self.section.Marker3Ds)
@property
def thickness(self) -> float:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property Thickness() As double
|
| Returns or sets the thickness of the section.
|
| The thickness value must be greater than 0.
|
| Example:
|
| The first example retrieves the thickness of NewSection
| Section.
|
|
| Dim SectionThickness As double
| SectionThickness = NewSection.Thickness
|
|
|
|
|
| The second example sets the thickness value of NewSection
| Section.
|
|
| NewSection.Thickness = 100.
:return: float
:rtype: float
"""
return self.section.Thickness
@thickness.setter
def thickness(self, value: float):
"""
:param float value:
"""
self.section.Thickness = value
@property
def type(self) -> int:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property Type() As CatSectionType
|
| Returns or sets the type of the section.
|
| The type value are defined in CatSectionType.
|
| Example:
|
| The first example retrieves the type of NewSection
| Section.
|
|
| Dim SectionType As CatSectionType
| SectionType = NewSection.Type
|
|
|
|
|
| The second example sets the type of NewSection
| Section.
|
|
| NewSection.Type = catSectionTypeSlice
:return: int
:rtype: int
"""
return self.section.Type
@type.setter
def type(self, value: int):
"""
:param int value:
"""
self.section.Type = value
@property
def width(self) -> float:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384)
| o Property Width() As double
|
| Returns or sets the width of the section.
|
| The width value must be greater than 0.
|
| Example:
|
| The first example retrieves the width of NewSection
| Section.
|
|
| Dim SectionWidth As double
| SectionWidth = NewSection.Width
|
|
|
|
|
| The second example sets the width value of NewSection
| Section.
|
|
| NewSection.Width = 100.
:return: float
:rtype: float
"""
return self.section.Width
@width.setter
def width(self, value: float):
"""
:param float value:
"""
self.section.Width = value
def export(self) -> 'Document':
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Func Export() As Document
|
| Exports the sections curves of the section in a document.
|
| Returns:
| The document
| Example:
|
| This example exports the section curves of NewSection Section in
| PartDoc document.
|
|
| Dim PartDoc As Document
| PartDoc = NewSection.Export
:return: Document
:rtype: Document
"""
from pycatia.in_interfaces.document import Document
return Document(self.section.Export())
def get_position(self) -> tuple:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub GetPosition(CATSafeArrayVariant oComponents)
|
| Retrieves the position of the section.
|
| The position of the section is made of a coordinate system whose origin is
| the center of the section, and X and Y axes lie on the section. It is retrieved
| in an array of the X, Y, Z axes components and the origin components with
| respect to the absolute coordinate system.
|
| Parameters:
|
| oComponents
| The position of the section
|
| oComponents( 0) is the X component of the
| X-axis
| oComponents( 1) is the Y component of the
| X-axis
| oComponents( 2) is the Z component of the
| X-axis
| oComponents( 3) is the X component of the
| Y-axis
| oComponents( 4) is the Y component of the
| Y-axis
| oComponents( 5) is the Z component of the
| Y-axis
| oComponents( 6) is the X component of the
| Z-axis
| oComponents( 7) is the Y component of the
| Z-axis
| oComponents( 8) is the Z component of the
| Z-axis
| oComponents( 9) is the X component of the
| origin
| oComponents(10) is the Y component of the
| origin
| oComponents(11) is the Z component of the origin
|
|
| Example:
|
| This example retrieves the position of NewSection
| Section.
|
|
| Dim Components (11)
| NewSection.GetPosition Components
:return: tuple
:rtype: tuple
"""
vba_function_name = 'get_position'
vba_code = """
Public Function get_position(section)
Dim oComponents(11)
section.GetPosition oComponents
get_position = oComponents
End Function
"""
system_service = self.application.system_service
return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object])
def is_empty(self) -> int:
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Func IsEmpty() As long
|
| Indicates whether the section is empty.
|
| The indicator value is 0 if the section is empty or 1 if the section
| comprise at least one segment.
|
| Example:
|
| This example retrieves the information on NewSection
| Section.
|
|
| Dim Indicator
| Indicator = NewSection.IsEmpty
:return: int
:rtype: int
"""
return self.section.IsEmpty()
def set_position(self, i_components: tuple):
"""
.. note::
:class: toggle
CAA V5 Visual Basic Help (2020-07-06 14:02:20.222384))
| o Sub SetPosition(CATSafeArrayVariant iComponents)
|
| Sets the position of the section.
|
| Parameters:
|
| oComponents
| The position of the section with respect to the absolute coordinate
| system
|
| iComponents( 0) is the X component of the
| X-axis
| iComponents( 1) is the Y component of the
| X-axis
| iComponents( 2) is the Z component of the
| X-axis
| iComponents( 3) is the X component of the
| Y-axis
| iComponents( 4) is the Y component of the
| Y-axis
| iComponents( 5) is the Z component of the
| Y-axis
| iComponents( 6) is the X component of the
| Z-axis
| iComponents( 7) is the Y component of the
| Z-axis
| iComponents( 8) is the Z component of the
| Z-axis
| iComponents( 9) is the X component of the
| origin
| iComponents(10) is the Y component of the
| origin
| iComponents(11) is the Z component of the origin
|
|
| Example:
|
| This example sets the position of NewSection
| Section.
|
|
| Dim MatrixPos (11) As Double
| MatrixPos( 0) = 1.0
| MatrixPos( 1) = 0.0
| MatrixPos( 2) = 0.0
| MatrixPos( 3) = 0.0
| MatrixPos( 4) = 1.0
| MatrixPos( 5) = 0.0
| MatrixPos( 6) = 0.0
| MatrixPos( 7) = 0.0
| MatrixPos( 8) = 1.0
| MatrixPos( 9) = 1000.0
| MatrixPos(10) = 0.0
| MatrixPos(11) = 0.0
| NewSection.SetPosition MatrixPos
:param tuple i_components:
"""
return self.section.SetPosition(i_components)
def __repr__(self):
return f'Section(name="{self.name}")'
| [
1,
396,
29991,
502,
29878,
29914,
2109,
29914,
4691,
29941,
29889,
29953,
13,
15945,
29908,
13,
1678,
15591,
12919,
4469,
5759,
773,
478,
29945,
28451,
362,
2066,
515,
315,
1299,
10764,
478,
29945,
390,
29906,
29947,
373,
29871,
29906,
29900,
29906,
29900,
29899,
29900,
29955,
29899,
29900,
29953,
29871,
29896,
29946,
29901,
29900,
29906,
29901,
29906,
29900,
29889,
29906,
29906,
29906,
29941,
29947,
29946,
13,
13,
1678,
6317,
9177,
1057,
13,
4706,
450,
11486,
27291,
376,
22701,
478,
29945,
9249,
19219,
22305,
29908,
526,
304,
367,
1304,
408,
3407,
871,
29889,
13,
4706,
2688,
526,
727,
408,
263,
10754,
408,
304,
920,
278,
7604,
6996,
847,
274,
1446,
924,
3168,
664,
13,
4706,
322,
4550,
1371,
13490,
297,
11451,
4117,
423,
29889,
13,
308,
13,
15945,
29908,
13,
13,
3166,
19229,
1053,
323,
6959,
29918,
3210,
16658,
4214,
13,
13,
3166,
11451,
4117,
423,
29889,
29876,
25521,
29918,
1639,
8726,
29889,
6735,
630,
29918,
7406,
1053,
530,
1333,
630,
23825,
13,
3166,
11451,
4117,
423,
29889,
29876,
25521,
29918,
1639,
8726,
29889,
2972,
1053,
6431,
13,
3166,
11451,
4117,
423,
29889,
29876,
25521,
29918,
1639,
8726,
29889,
22976,
29918,
29941,
29928,
29879,
1053,
4485,
261,
29941,
29928,
29879,
13,
3166,
11451,
4117,
423,
29889,
5205,
29918,
1639,
8726,
29889,
1384,
29918,
3318,
1053,
3139,
2061,
13,
3166,
11451,
4117,
423,
29889,
5205,
29918,
1639,
8726,
29889,
5205,
29918,
5509,
1053,
2184,
3170,
13,
13,
361,
323,
6959,
29918,
3210,
16658,
4214,
29901,
13,
1678,
515,
11451,
4117,
423,
29889,
262,
29918,
1639,
8726,
29889,
3225,
1053,
10854,
13,
13,
1990,
9779,
29898,
10773,
2061,
1125,
13,
1678,
9995,
13,
4706,
6317,
4443,
1057,
13,
9651,
584,
1990,
29901,
20429,
13,
13,
9651,
315,
6344,
478,
29945,
9249,
19219,
22305,
313,
29906,
29900,
29906,
29900,
29899,
29900,
29955,
29899,
29900,
29953,
29871,
29896,
29946,
29901,
29900,
29906,
29901,
29906,
29900,
29889,
29906,
29906,
29906,
29941,
29947,
29946,
29897,
13,
13,
18884,
891,
2184,
29889,
29902,
14148,
13,
18884,
891,
268,
2184,
29889,
1367,
275,
5041,
13,
18884,
891,
308,
2184,
29889,
23972,
5160,
14148,
13,
18884,
891,
632,
2184,
29889,
23972,
5160,
14777,
13,
18884,
891,
462,
2184,
29889,
10773,
2061,
13,
18884,
891,
462,
268,
9779,
13,
18884,
891,
29871,
13,
18884,
891,
830,
4569,
1237,
278,
9779,
1203,
29889,
13,
18884,
891,
450,
9779,
1203,
338,
263,
21992,
310,
263,
4004,
292,
2479,
322,
13,
18884,
891,
16287,
2541,
263,
4004,
10694,
29892,
4004,
22780,
470,
4004,
3800,
29889,
13,
268,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
419,
29918,
3318,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
510,
29918,
3318,
29897,
13,
4706,
1583,
29889,
2042,
353,
419,
29918,
3318,
13,
13,
1678,
732,
6799,
13,
1678,
822,
9732,
630,
29918,
7406,
29898,
1311,
29897,
1599,
530,
1333,
630,
23825,
29901,
13,
4706,
9995,
13,
4706,
6317,
4443,
1057,
13,
9651,
584,
1990,
29901,
20429,
13,
13,
9651,
315,
6344,
478,
29945,
9249,
19219,
22305,
313,
29906,
29900,
29906,
29900,
29899,
29900,
29955,
29899,
29900,
29953,
29871,
29896,
29946,
29901,
29900,
29906,
29901,
29906,
29900,
29889,
29906,
29906,
29906,
29941,
29947,
29946,
29897,
13,
18884,
891,
288,
9079,
530,
1333,
630,
23825,
580,
1094,
530,
1333,
630,
23825,
313,
6359,
9333,
29897,
13,
18884,
891,
29871,
13,
18884,
891,
268,
16969,
278,
530,
1333,
630,
23825,
4333,
310,
278,
4004,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
8741,
29901,
13,
18884,
891,
29871,
13,
18884,
891,
795,
910,
1342,
5663,
17180,
278,
530,
1333,
630,
23825,
4333,
310,
1570,
13438,
13,
18884,
891,
795,
9779,
29889,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
632,
4792,
450,
2744,
1333,
630,
23825,
1293,
1094,
530,
1333,
630,
23825,
13,
18884,
891,
632,
3789,
450,
2744,
1333,
630,
23825,
1293,
353,
1570,
13438,
29889,
2744,
1333,
630,
23825,
13,
13,
4706,
584,
2457,
29901,
530,
1333,
630,
23825,
13,
4706,
584,
29878,
1853,
29901,
530,
1333,
630,
23825,
13,
4706,
9995,
13,
13,
4706,
736,
530,
1333,
630,
23825,
29898,
1311,
29889,
2042,
29889,
2744,
1333,
630,
23825,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
6030,
29898,
1311,
29897,
1599,
938,
29901,
13,
4706,
9995,
13,
4706,
6317,
4443,
1057,
13,
9651,
584,
1990,
29901,
20429,
13,
13,
9651,
315,
6344,
478,
29945,
9249,
19219,
22305,
313,
29906,
29900,
29906,
29900,
29899,
29900,
29955,
29899,
29900,
29953,
29871,
29896,
29946,
29901,
29900,
29906,
29901,
29906,
29900,
29889,
29906,
29906,
29906,
29941,
29947,
29946,
29897,
13,
18884,
891,
288,
9079,
1522,
16300,
580,
1094,
10459,
13438,
28100,
13,
18884,
891,
29871,
13,
18884,
891,
268,
16969,
470,
6166,
278,
2498,
6030,
310,
278,
4004,
29901,
12362,
911,
29892,
15854,
2454,
13,
18884,
891,
268,
2767,
29892,
12219,
2767,
13,
18884,
891,
29871,
13,
18884,
891,
268,
450,
6030,
995,
526,
3342,
297,
10459,
13438,
28100,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
8741,
29901,
13,
18884,
891,
29871,
13,
18884,
891,
795,
450,
937,
1342,
5663,
17180,
278,
6030,
310,
1570,
13438,
13,
18884,
891,
795,
9779,
29889,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
632,
4792,
9779,
28100,
1094,
10459,
13438,
28100,
13,
18884,
891,
632,
1522,
16300,
353,
1570,
13438,
29889,
28100,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
29871,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
462,
450,
1473,
1342,
6166,
278,
6030,
310,
1570,
13438,
13,
18884,
891,
462,
9779,
29889,
13,
18884,
891,
462,
29871,
13,
18884,
891,
29871,
13,
18884,
891,
462,
1570,
13438,
29889,
28100,
353,
6635,
13438,
28100,
28451,
2454,
13,
13,
4706,
584,
2457,
29901,
938,
13,
4706,
584,
29878,
1853,
29901,
938,
13,
4706,
9995,
13,
13,
4706,
736,
1583,
29889,
2042,
29889,
28100,
13,
13,
1678,
732,
915,
16300,
29889,
842,
357,
13,
1678,
822,
6030,
29898,
1311,
29892,
995,
29901,
938,
1125,
13,
4706,
9995,
13,
4706,
584,
3207,
938,
995,
29901,
13,
4706,
9995,
13,
13,
4706,
1583,
29889,
2042,
29889,
28100,
353,
995,
13,
13,
1678,
732,
6799,
13,
1678,
822,
5700,
29918,
8513,
29898,
1311,
29897,
1599,
938,
29901,
13,
4706,
9995,
13,
4706,
6317,
4443,
1057,
13,
9651,
584,
1990,
29901,
20429,
13,
13,
9651,
315,
6344,
478,
29945,
9249,
19219,
22305,
313,
29906,
29900,
29906,
29900,
29899,
29900,
29955,
29899,
29900,
29953,
29871,
29896,
29946,
29901,
29900,
29906,
29901,
29906,
29900,
29889,
29906,
29906,
29906,
29941,
29947,
29946,
29897,
13,
18884,
891,
288,
9079,
315,
329,
6818,
580,
1094,
1472,
13,
18884,
891,
29871,
13,
18884,
891,
268,
16969,
470,
6166,
278,
28967,
4464,
310,
278,
4004,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
450,
28967,
4464,
995,
338,
29871,
29896,
363,
9335,
3262,
470,
29871,
29900,
1728,
13,
18884,
891,
268,
9335,
3262,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
8741,
29901,
13,
18884,
891,
29871,
13,
18884,
891,
795,
450,
937,
1342,
5663,
17180,
278,
28967,
4464,
310,
1570,
13438,
13,
18884,
891,
795,
9779,
29889,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
632,
4792,
9779,
6818,
1094,
8102,
13,
18884,
891,
632,
9779,
6818,
353,
1570,
13438,
29889,
29907,
329,
6818,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
29871,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
462,
450,
1473,
1342,
6166,
278,
28967,
4464,
310,
1570,
13438,
13,
18884,
891,
462,
9779,
29889,
13,
18884,
891,
462,
29871,
13,
18884,
891,
29871,
13,
18884,
891,
462,
1570,
13438,
29889,
29907,
329,
6818,
353,
29871,
29896,
13,
13,
4706,
584,
2457,
29901,
938,
13,
4706,
584,
29878,
1853,
29901,
938,
13,
4706,
9995,
13,
13,
4706,
736,
1583,
29889,
2042,
29889,
29907,
329,
6818,
13,
13,
1678,
732,
7582,
29918,
8513,
29889,
842,
357,
13,
1678,
822,
5700,
29918,
8513,
29898,
1311,
29892,
995,
29901,
938,
1125,
13,
4706,
9995,
13,
4706,
584,
3207,
938,
995,
29901,
13,
4706,
9995,
13,
13,
4706,
1583,
29889,
2042,
29889,
29907,
329,
6818,
353,
995,
13,
13,
1678,
732,
6799,
13,
1678,
822,
2318,
29898,
1311,
29897,
1599,
6431,
29901,
13,
4706,
9995,
13,
4706,
6317,
4443,
1057,
13,
9651,
584,
1990,
29901,
20429,
13,
13,
9651,
315,
6344,
478,
29945,
9249,
19219,
22305,
313,
29906,
29900,
29906,
29900,
29899,
29900,
29955,
29899,
29900,
29953,
29871,
29896,
29946,
29901,
29900,
29906,
29901,
29906,
29900,
29889,
29906,
29906,
29906,
29941,
29947,
29946,
29897,
13,
18884,
891,
288,
9079,
6431,
580,
1094,
6431,
13,
18884,
891,
29871,
13,
18884,
891,
268,
16969,
470,
6166,
278,
4004,
287,
2318,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
2648,
2322,
29892,
372,
338,
278,
599,
11308,
2318,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
8741,
29901,
13,
18884,
891,
29871,
13,
18884,
891,
795,
450,
937,
1342,
5663,
17180,
278,
2318,
310,
1570,
13438,
13,
18884,
891,
795,
9779,
29889,
13,
18884,
891,
13,
18884,
891,
632,
4792,
319,
4782,
1094,
6431,
13,
18884,
891,
632,
319,
4782,
353,
1570,
13438,
29889,
4782,
13,
18884,
891,
13,
18884,
891,
462,
450,
1473,
1342,
6166,
278,
2318,
310,
1570,
13438,
13,
18884,
891,
462,
9779,
29889,
13,
18884,
891,
13,
18884,
891,
462,
4792,
319,
4782,
1094,
6431,
13,
18884,
891,
462,
1570,
13438,
29889,
4782,
353,
319,
4782,
13,
13,
4706,
584,
2457,
29901,
6431,
13,
4706,
584,
29878,
1853,
29901,
6431,
13,
4706,
9995,
13,
13,
4706,
736,
6431,
29898,
1311,
29889,
2042,
29889,
4782,
29897,
13,
13,
1678,
732,
2972,
29889,
842,
357,
13,
1678,
822,
2318,
29898,
1311,
29892,
995,
29901,
6431,
1125,
13,
4706,
9995,
13,
4706,
584,
3207,
6431,
995,
29901,
13,
4706,
9995,
13,
13,
4706,
1583,
29889,
2042,
29889,
4782,
353,
995,
13,
13,
1678,
732,
6799,
13,
1678,
822,
3171,
29898,
1311,
29897,
1599,
5785,
29901,
13,
4706,
9995,
13,
4706,
6317,
4443,
1057,
13,
9651,
584,
1990,
29901,
20429,
13,
13,
9651,
315,
6344,
478,
29945,
9249,
19219,
22305,
313,
29906,
29900,
29906,
29900,
29899,
29900,
29955,
29899,
29900,
29953,
29871,
29896,
29946,
29901,
29900,
29906,
29901,
29906,
29900,
29889,
29906,
29906,
29906,
29941,
29947,
29946,
29897,
13,
18884,
891,
288,
9079,
22907,
580,
1094,
3765,
13,
18884,
891,
29871,
13,
18884,
891,
268,
16969,
470,
6166,
278,
3171,
310,
278,
4004,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
450,
3171,
995,
1818,
367,
7621,
1135,
29871,
29900,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
8741,
29901,
13,
18884,
891,
29871,
13,
18884,
891,
795,
450,
937,
1342,
5663,
17180,
278,
3171,
310,
1570,
13438,
13,
18884,
891,
795,
9779,
29889,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
632,
4792,
9779,
7011,
1094,
3765,
13,
18884,
891,
632,
9779,
7011,
353,
1570,
13438,
29889,
7011,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
29871,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
462,
450,
1473,
1342,
6166,
278,
3171,
995,
310,
1570,
13438,
13,
18884,
891,
462,
9779,
29889,
13,
18884,
891,
462,
29871,
13,
18884,
891,
29871,
13,
18884,
891,
462,
1570,
13438,
29889,
7011,
353,
29871,
29896,
29900,
29900,
29889,
13,
13,
4706,
584,
2457,
29901,
5785,
13,
4706,
584,
29878,
1853,
29901,
5785,
13,
4706,
9995,
13,
13,
4706,
736,
1583,
29889,
2042,
29889,
7011,
13,
13,
1678,
732,
3545,
29889,
842,
357,
13,
1678,
822,
3171,
29898,
1311,
29892,
995,
29901,
5785,
1125,
13,
4706,
9995,
13,
4706,
584,
3207,
5785,
995,
29901,
13,
4706,
9995,
13,
13,
4706,
1583,
29889,
2042,
29889,
7011,
353,
995,
13,
13,
1678,
732,
6799,
13,
1678,
822,
17456,
29918,
29941,
6289,
29898,
1311,
29897,
1599,
4485,
261,
29941,
29928,
29879,
29901,
13,
4706,
9995,
13,
4706,
6317,
4443,
1057,
13,
9651,
584,
1990,
29901,
20429,
13,
13,
9651,
315,
6344,
478,
29945,
9249,
19219,
22305,
313,
29906,
29900,
29906,
29900,
29899,
29900,
29953,
29899,
29896,
29896,
29871,
29896,
29906,
29901,
29946,
29900,
29901,
29946,
29955,
29889,
29941,
29953,
29900,
29946,
29946,
29945,
29897,
13,
18884,
891,
288,
9079,
4485,
261,
29941,
29928,
29879,
580,
1094,
4485,
261,
29941,
29928,
29879,
313,
6359,
9333,
29897,
13,
18884,
891,
29871,
13,
18884,
891,
268,
16969,
278,
4485,
261,
29941,
29928,
29879,
4333,
310,
278,
4004,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
8741,
29901,
13,
18884,
891,
29871,
13,
18884,
891,
795,
910,
1342,
5663,
17180,
278,
4485,
261,
29941,
29928,
29879,
4333,
310,
1570,
13438,
13,
18884,
891,
795,
9779,
29889,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
632,
4792,
450,
24619,
29941,
29928,
29879,
1293,
1094,
4485,
261,
29941,
29928,
29879,
13,
18884,
891,
632,
3789,
450,
24619,
29941,
29928,
29879,
1293,
353,
1570,
13438,
29889,
24619,
29941,
29928,
29879,
13,
13,
4706,
584,
2457,
29901,
4485,
261,
29941,
29928,
29879,
13,
4706,
584,
29878,
1853,
29901,
4485,
261,
29941,
29928,
29879,
13,
4706,
9995,
13,
13,
4706,
736,
4485,
261,
29941,
29928,
29879,
29898,
1311,
29889,
2042,
29889,
24619,
29941,
29928,
29879,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
12003,
2264,
29898,
1311,
29897,
1599,
5785,
29901,
13,
4706,
9995,
13,
4706,
6317,
4443,
1057,
13,
9651,
584,
1990,
29901,
20429,
13,
13,
9651,
315,
6344,
478,
29945,
9249,
19219,
22305,
313,
29906,
29900,
29906,
29900,
29899,
29900,
29955,
29899,
29900,
29953,
29871,
29896,
29946,
29901,
29900,
29906,
29901,
29906,
29900,
29889,
29906,
29906,
29906,
29941,
29947,
29946,
29897,
13,
18884,
891,
288,
9079,
498,
860,
2264,
580,
1094,
3765,
13,
18884,
891,
29871,
13,
18884,
891,
268,
16969,
470,
6166,
278,
12003,
2264,
310,
278,
4004,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
450,
12003,
2264,
995,
1818,
367,
7621,
1135,
29871,
29900,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
8741,
29901,
13,
18884,
891,
29871,
13,
18884,
891,
795,
450,
937,
1342,
5663,
17180,
278,
12003,
2264,
310,
1570,
13438,
13,
18884,
891,
795,
9779,
29889,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
632,
4792,
9779,
1349,
860,
2264,
1094,
3765,
13,
18884,
891,
632,
9779,
1349,
860,
2264,
353,
1570,
13438,
29889,
1349,
860,
2264,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
29871,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
462,
450,
1473,
1342,
6166,
278,
12003,
2264,
995,
310,
1570,
13438,
13,
18884,
891,
462,
9779,
29889,
13,
18884,
891,
462,
29871,
13,
18884,
891,
29871,
13,
18884,
891,
462,
1570,
13438,
29889,
1349,
860,
2264,
353,
29871,
29896,
29900,
29900,
29889,
13,
13,
4706,
584,
2457,
29901,
5785,
13,
4706,
584,
29878,
1853,
29901,
5785,
13,
4706,
9995,
13,
13,
4706,
736,
1583,
29889,
2042,
29889,
1349,
860,
2264,
13,
13,
1678,
732,
27996,
2264,
29889,
842,
357,
13,
1678,
822,
12003,
2264,
29898,
1311,
29892,
995,
29901,
5785,
1125,
13,
4706,
9995,
13,
4706,
584,
3207,
5785,
995,
29901,
13,
4706,
9995,
13,
13,
4706,
1583,
29889,
2042,
29889,
1349,
860,
2264,
353,
995,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1134,
29898,
1311,
29897,
1599,
938,
29901,
13,
4706,
9995,
13,
4706,
6317,
4443,
1057,
13,
9651,
584,
1990,
29901,
20429,
13,
13,
9651,
315,
6344,
478,
29945,
9249,
19219,
22305,
313,
29906,
29900,
29906,
29900,
29899,
29900,
29955,
29899,
29900,
29953,
29871,
29896,
29946,
29901,
29900,
29906,
29901,
29906,
29900,
29889,
29906,
29906,
29906,
29941,
29947,
29946,
29897,
13,
18884,
891,
288,
9079,
5167,
580,
1094,
10459,
13438,
1542,
13,
18884,
891,
29871,
13,
18884,
891,
268,
16969,
470,
6166,
278,
1134,
310,
278,
4004,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
450,
1134,
995,
526,
3342,
297,
10459,
13438,
1542,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
8741,
29901,
13,
18884,
891,
29871,
13,
18884,
891,
795,
450,
937,
1342,
5663,
17180,
278,
1134,
310,
1570,
13438,
13,
18884,
891,
795,
9779,
29889,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
632,
4792,
9779,
1542,
1094,
10459,
13438,
1542,
13,
18884,
891,
632,
9779,
1542,
353,
1570,
13438,
29889,
1542,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
29871,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
462,
450,
1473,
1342,
6166,
278,
1134,
310,
1570,
13438,
13,
18884,
891,
462,
9779,
29889,
13,
18884,
891,
462,
29871,
13,
18884,
891,
29871,
13,
18884,
891,
462,
1570,
13438,
29889,
1542,
353,
6635,
13438,
1542,
29903,
5897,
13,
13,
4706,
584,
2457,
29901,
938,
13,
4706,
584,
29878,
1853,
29901,
938,
13,
4706,
9995,
13,
13,
4706,
736,
1583,
29889,
2042,
29889,
1542,
13,
13,
1678,
732,
1853,
29889,
842,
357,
13,
1678,
822,
1134,
29898,
1311,
29892,
995,
29901,
938,
1125,
13,
4706,
9995,
13,
4706,
584,
3207,
938,
995,
29901,
13,
4706,
9995,
13,
13,
4706,
1583,
29889,
2042,
29889,
1542,
353,
995,
13,
13,
1678,
732,
6799,
13,
1678,
822,
2920,
29898,
1311,
29897,
1599,
5785,
29901,
13,
4706,
9995,
13,
4706,
6317,
4443,
1057,
13,
9651,
584,
1990,
29901,
20429,
13,
13,
9651,
315,
6344,
478,
29945,
9249,
19219,
22305,
313,
29906,
29900,
29906,
29900,
29899,
29900,
29955,
29899,
29900,
29953,
29871,
29896,
29946,
29901,
29900,
29906,
29901,
29906,
29900,
29889,
29906,
29906,
29906,
29941,
29947,
29946,
29897,
13,
18884,
891,
288,
9079,
21485,
580,
1094,
3765,
13,
18884,
891,
29871,
13,
18884,
891,
268,
16969,
470,
6166,
278,
2920,
310,
278,
4004,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
450,
2920,
995,
1818,
367,
7621,
1135,
29871,
29900,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
8741,
29901,
13,
18884,
891,
29871,
13,
18884,
891,
795,
450,
937,
1342,
5663,
17180,
278,
2920,
310,
1570,
13438,
13,
18884,
891,
795,
9779,
29889,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
632,
4792,
9779,
6110,
1094,
3765,
13,
18884,
891,
632,
9779,
6110,
353,
1570,
13438,
29889,
6110,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
29871,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
462,
450,
1473,
1342,
6166,
278,
2920,
995,
310,
1570,
13438,
13,
18884,
891,
462,
9779,
29889,
13,
18884,
891,
462,
29871,
13,
18884,
891,
29871,
13,
18884,
891,
462,
1570,
13438,
29889,
6110,
353,
29871,
29896,
29900,
29900,
29889,
13,
13,
4706,
584,
2457,
29901,
5785,
13,
4706,
584,
29878,
1853,
29901,
5785,
13,
4706,
9995,
13,
13,
4706,
736,
1583,
29889,
2042,
29889,
6110,
13,
13,
1678,
732,
2103,
29889,
842,
357,
13,
1678,
822,
2920,
29898,
1311,
29892,
995,
29901,
5785,
1125,
13,
4706,
9995,
13,
4706,
584,
3207,
5785,
995,
29901,
13,
4706,
9995,
13,
13,
4706,
1583,
29889,
2042,
29889,
6110,
353,
995,
13,
13,
1678,
822,
5609,
29898,
1311,
29897,
1599,
525,
6268,
2396,
13,
4706,
9995,
13,
4706,
6317,
4443,
1057,
13,
9651,
584,
1990,
29901,
20429,
13,
13,
9651,
315,
6344,
478,
29945,
9249,
19219,
22305,
313,
29906,
29900,
29906,
29900,
29899,
29900,
29955,
29899,
29900,
29953,
29871,
29896,
29946,
29901,
29900,
29906,
29901,
29906,
29900,
29889,
29906,
29906,
29906,
29941,
29947,
29946,
876,
13,
18884,
891,
288,
383,
4661,
1222,
637,
580,
1094,
10854,
13,
18884,
891,
29871,
13,
18884,
891,
268,
1222,
4011,
278,
13926,
19684,
310,
278,
4004,
297,
263,
1842,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
16969,
29901,
13,
18884,
891,
308,
450,
1842,
29871,
13,
18884,
891,
268,
8741,
29901,
13,
18884,
891,
29871,
13,
18884,
891,
795,
910,
1342,
29586,
278,
4004,
19684,
310,
1570,
13438,
9779,
297,
13,
18884,
891,
795,
3455,
14526,
1842,
29889,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
632,
4792,
3455,
14526,
1094,
10854,
13,
18884,
891,
632,
3455,
14526,
353,
1570,
13438,
29889,
26382,
13,
13,
4706,
584,
2457,
29901,
10854,
13,
4706,
584,
29878,
1853,
29901,
10854,
13,
4706,
9995,
13,
4706,
515,
11451,
4117,
423,
29889,
262,
29918,
1639,
8726,
29889,
3225,
1053,
10854,
13,
4706,
736,
10854,
29898,
1311,
29889,
2042,
29889,
26382,
3101,
13,
13,
1678,
822,
679,
29918,
3283,
29898,
1311,
29897,
1599,
18761,
29901,
13,
4706,
9995,
13,
4706,
6317,
4443,
1057,
13,
9651,
584,
1990,
29901,
20429,
13,
13,
9651,
315,
6344,
478,
29945,
9249,
19219,
22305,
313,
29906,
29900,
29906,
29900,
29899,
29900,
29955,
29899,
29900,
29953,
29871,
29896,
29946,
29901,
29900,
29906,
29901,
29906,
29900,
29889,
29906,
29906,
29906,
29941,
29947,
29946,
876,
13,
18884,
891,
288,
3323,
3617,
8003,
29898,
23972,
17618,
1725,
2588,
10444,
424,
288,
25503,
29897,
13,
18884,
891,
29871,
13,
18884,
891,
268,
19338,
1960,
278,
2602,
310,
278,
4004,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
450,
2602,
310,
278,
4004,
338,
1754,
310,
263,
14821,
1788,
5069,
3978,
338,
13,
18884,
891,
268,
278,
4818,
310,
278,
4004,
29892,
322,
1060,
322,
612,
27815,
3804,
373,
278,
4004,
29889,
739,
338,
27387,
13,
18884,
891,
268,
297,
385,
1409,
310,
278,
1060,
29892,
612,
29892,
796,
27815,
7117,
322,
278,
3978,
7117,
411,
13,
18884,
891,
268,
3390,
304,
278,
8380,
14821,
1788,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
12662,
2699,
29901,
13,
18884,
891,
29871,
13,
18884,
891,
308,
288,
25503,
13,
18884,
891,
632,
450,
2602,
310,
278,
4004,
13,
18884,
891,
29871,
13,
18884,
891,
462,
288,
25503,
29898,
29871,
29900,
29897,
338,
278,
1060,
4163,
310,
278,
13,
18884,
891,
462,
1060,
29899,
8990,
13,
18884,
891,
462,
288,
25503,
29898,
29871,
29896,
29897,
338,
278,
612,
4163,
310,
278,
13,
18884,
891,
462,
1060,
29899,
8990,
13,
18884,
891,
462,
288,
25503,
29898,
29871,
29906,
29897,
338,
278,
796,
4163,
310,
278,
13,
18884,
891,
462,
1060,
29899,
8990,
13,
18884,
891,
462,
288,
25503,
29898,
29871,
29941,
29897,
338,
278,
1060,
4163,
310,
278,
13,
18884,
891,
462,
612,
29899,
8990,
13,
18884,
891,
462,
288,
25503,
29898,
29871,
29946,
29897,
338,
278,
612,
4163,
310,
278,
13,
18884,
891,
462,
612,
29899,
8990,
13,
18884,
891,
462,
288,
25503,
29898,
29871,
29945,
29897,
338,
278,
796,
4163,
310,
278,
13,
18884,
891,
462,
612,
29899,
8990,
13,
18884,
891,
462,
288,
25503,
29898,
29871,
29953,
29897,
338,
278,
1060,
4163,
310,
278,
13,
18884,
891,
462,
796,
29899,
8990,
13,
18884,
891,
462,
288,
25503,
29898,
29871,
29955,
29897,
338,
278,
612,
4163,
310,
278,
13,
18884,
891,
462,
796,
29899,
8990,
13,
18884,
891,
462,
288,
25503,
29898,
29871,
29947,
29897,
338,
278,
796,
4163,
310,
278,
13,
18884,
891,
462,
796,
29899,
8990,
13,
18884,
891,
462,
288,
25503,
29898,
29871,
29929,
29897,
338,
278,
1060,
4163,
310,
278,
13,
18884,
891,
462,
3978,
13,
18884,
891,
462,
288,
25503,
29898,
29896,
29900,
29897,
338,
278,
612,
4163,
310,
278,
13,
18884,
891,
462,
3978,
13,
18884,
891,
462,
288,
25503,
29898,
29896,
29896,
29897,
338,
278,
796,
4163,
310,
278,
3978,
13,
18884,
891,
462,
29871,
13,
18884,
891,
29871,
13,
18884,
891,
268,
8741,
29901,
13,
18884,
891,
29871,
13,
18884,
891,
795,
910,
1342,
5663,
17180,
278,
2602,
310,
1570,
13438,
13,
18884,
891,
795,
9779,
29889,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
632,
4792,
422,
9340,
313,
29896,
29896,
29897,
13,
18884,
891,
632,
1570,
13438,
29889,
2577,
8003,
422,
9340,
13,
13,
4706,
584,
2457,
29901,
18761,
13,
4706,
584,
29878,
1853,
29901,
18761,
13,
4706,
9995,
13,
13,
4706,
27237,
29918,
2220,
29918,
978,
353,
525,
657,
29918,
3283,
29915,
13,
4706,
27237,
29918,
401,
353,
9995,
13,
4706,
5236,
6680,
679,
29918,
3283,
29898,
2042,
29897,
13,
9651,
4792,
288,
25503,
29898,
29896,
29896,
29897,
13,
9651,
4004,
29889,
2577,
8003,
288,
25503,
13,
9651,
679,
29918,
3283,
353,
288,
25503,
13,
4706,
2796,
6680,
13,
4706,
9995,
13,
13,
4706,
1788,
29918,
5509,
353,
1583,
29889,
6214,
29889,
5205,
29918,
5509,
13,
4706,
736,
1788,
29918,
5509,
29889,
24219,
403,
29898,
29894,
2291,
29918,
401,
29892,
29871,
29900,
29892,
27237,
29918,
2220,
29918,
978,
29892,
518,
1311,
29889,
510,
29918,
3318,
2314,
13,
13,
1678,
822,
338,
29918,
6310,
29898,
1311,
29897,
1599,
938,
29901,
13,
4706,
9995,
13,
4706,
6317,
4443,
1057,
13,
9651,
584,
1990,
29901,
20429,
13,
13,
9651,
315,
6344,
478,
29945,
9249,
19219,
22305,
313,
29906,
29900,
29906,
29900,
29899,
29900,
29955,
29899,
29900,
29953,
29871,
29896,
29946,
29901,
29900,
29906,
29901,
29906,
29900,
29889,
29906,
29906,
29906,
29941,
29947,
29946,
876,
13,
18884,
891,
288,
383,
4661,
1317,
8915,
580,
1094,
1472,
13,
18884,
891,
29871,
13,
18884,
891,
268,
1894,
293,
1078,
3692,
278,
4004,
338,
4069,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
450,
27717,
995,
338,
29871,
29900,
565,
278,
4004,
338,
4069,
470,
29871,
29896,
565,
278,
4004,
13,
18884,
891,
268,
7199,
895,
472,
3203,
697,
10768,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
8741,
29901,
13,
18884,
891,
29871,
13,
18884,
891,
795,
910,
1342,
5663,
17180,
278,
2472,
373,
1570,
13438,
13,
18884,
891,
795,
9779,
29889,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
632,
4792,
1894,
20485,
13,
18884,
891,
632,
1894,
20485,
353,
1570,
13438,
29889,
3624,
8915,
13,
13,
4706,
584,
2457,
29901,
938,
13,
4706,
584,
29878,
1853,
29901,
938,
13,
4706,
9995,
13,
4706,
736,
1583,
29889,
2042,
29889,
3624,
8915,
580,
13,
13,
1678,
822,
731,
29918,
3283,
29898,
1311,
29892,
474,
29918,
14036,
29901,
18761,
1125,
13,
4706,
9995,
13,
4706,
6317,
4443,
1057,
13,
9651,
584,
1990,
29901,
20429,
13,
13,
9651,
315,
6344,
478,
29945,
9249,
19219,
22305,
313,
29906,
29900,
29906,
29900,
29899,
29900,
29955,
29899,
29900,
29953,
29871,
29896,
29946,
29901,
29900,
29906,
29901,
29906,
29900,
29889,
29906,
29906,
29906,
29941,
29947,
29946,
876,
13,
18884,
891,
288,
3323,
3789,
8003,
29898,
23972,
17618,
1725,
2588,
10444,
424,
474,
25503,
29897,
13,
18884,
891,
29871,
13,
18884,
891,
268,
317,
1691,
278,
2602,
310,
278,
4004,
29889,
13,
18884,
891,
29871,
13,
18884,
891,
268,
12662,
2699,
29901,
13,
18884,
891,
29871,
13,
18884,
891,
308,
288,
25503,
13,
18884,
891,
632,
450,
2602,
310,
278,
4004,
411,
3390,
304,
278,
8380,
14821,
13,
18884,
891,
632,
1788,
13,
18884,
891,
29871,
13,
18884,
891,
462,
474,
25503,
29898,
29871,
29900,
29897,
338,
278,
1060,
4163,
310,
278,
13,
18884,
891,
462,
1060,
29899,
8990,
13,
18884,
891,
462,
474,
25503,
29898,
29871,
29896,
29897,
338,
278,
612,
4163,
310,
278,
13,
18884,
891,
462,
1060,
29899,
8990,
13,
18884,
891,
462,
474,
25503,
29898,
29871,
29906,
29897,
338,
278,
796,
4163,
310,
278,
13,
18884,
891,
462,
1060,
29899,
8990,
13,
18884,
891,
462,
474,
25503,
29898,
29871,
29941,
29897,
338,
278,
1060,
4163,
310,
278,
13,
18884,
891,
462,
612,
29899,
8990,
13,
18884,
891,
462,
474,
25503,
29898,
29871,
29946,
29897,
338,
278,
612,
4163,
310,
278,
13,
18884,
891,
462,
612,
29899,
8990,
13,
18884,
891,
462,
474,
25503,
29898,
29871,
29945,
29897,
338,
278,
796,
4163,
310,
278,
13,
18884,
891,
462,
612,
29899,
8990,
13,
18884,
891,
462,
474,
25503,
29898,
29871,
29953,
29897,
338,
278,
1060,
4163,
310,
278,
13,
18884,
891,
462,
796,
29899,
8990,
13,
18884,
891,
462,
474,
25503,
29898,
29871,
29955,
29897,
338,
278,
612,
4163,
310,
278,
13,
18884,
891,
462,
796,
29899,
8990,
13,
18884,
891,
462,
474,
25503,
29898,
29871,
29947,
29897,
338,
278,
796,
4163,
310,
278,
13,
18884,
891,
462,
796,
29899,
8990,
13,
18884,
891,
462,
474,
25503,
29898,
29871,
29929,
29897,
338,
278,
1060,
4163,
310,
278,
13,
18884,
891,
462,
3978,
13,
18884,
891,
462,
474,
25503,
29898,
29896,
29900,
29897,
338,
278,
612,
4163,
310,
278,
13,
18884,
891,
462,
3978,
13,
18884,
891,
462,
474,
25503,
29898,
29896,
29896,
29897,
338,
278,
796,
4163,
310,
278,
3978,
13,
18884,
891,
462,
29871,
13,
18884,
891,
29871,
13,
18884,
891,
268,
8741,
29901,
13,
18884,
891,
29871,
13,
18884,
891,
795,
910,
1342,
6166,
278,
2602,
310,
1570,
13438,
13,
18884,
891,
795,
9779,
29889,
13,
18884,
891,
795,
13,
18884,
891,
29871,
13,
18884,
891,
632,
4792,
22513,
9135,
313,
29896,
29896,
29897,
1094,
11599,
13,
18884,
891,
632,
22513,
9135,
29898,
29871,
29900,
29897,
353,
29871,
29896,
29889,
29900,
13,
18884,
891,
632,
22513,
9135,
29898,
29871,
29896,
29897,
353,
29871,
29900,
29889,
29900,
13,
18884,
891,
632,
22513,
9135,
29898,
29871,
29906,
29897,
353,
29871,
29900,
29889,
29900,
13,
18884,
891,
632,
22513,
9135,
29898,
29871,
29941,
29897,
353,
29871,
29900,
29889,
29900,
13,
18884,
891,
632,
22513,
9135,
29898,
29871,
29946,
29897,
353,
29871,
29896,
29889,
29900,
13,
18884,
891,
632,
22513,
9135,
29898,
29871,
29945,
29897,
353,
29871,
29900,
29889,
29900,
13,
18884,
891,
632,
22513,
9135,
29898,
29871,
29953,
29897,
353,
29871,
29900,
29889,
29900,
13,
18884,
891,
632,
22513,
9135,
29898,
29871,
29955,
29897,
353,
29871,
29900,
29889,
29900,
13,
18884,
891,
632,
22513,
9135,
29898,
29871,
29947,
29897,
353,
29871,
29896,
29889,
29900,
13,
18884,
891,
632,
22513,
9135,
29898,
29871,
29929,
29897,
353,
29871,
29896,
29900,
29900,
29900,
29889,
29900,
13,
18884,
891,
632,
22513,
9135,
29898,
29896,
29900,
29897,
353,
29871,
29900,
29889,
29900,
13,
18884,
891,
632,
22513,
9135,
29898,
29896,
29896,
29897,
353,
29871,
29900,
29889,
29900,
13,
18884,
891,
632,
1570,
13438,
29889,
2697,
8003,
22513,
9135,
13,
13,
4706,
584,
3207,
18761,
474,
29918,
14036,
29901,
13,
4706,
9995,
13,
4706,
736,
1583,
29889,
2042,
29889,
2697,
8003,
29898,
29875,
29918,
14036,
29897,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
736,
285,
29915,
13438,
29898,
978,
10724,
1311,
29889,
978,
27195,
29915,
13,
2
] |
obniz/parts/Moving/StepperMotor/__init__.py | izm51/obniz-python-sdk | 11 | 8683 | from attrdict import AttrDefault
import asyncio
class StepperMotor:
def __init__(self):
self.keys = ['<KEY> 'common']
self.required_keys = ['a', 'b', 'aa', 'bb']
self._step_instructions = AttrDefault(bool,
{
'1': [[0, 1, 1, 1], [1, 0, 1, 1], [1, 1, 0, 1], [1, 1, 1, 0]],
'2': [[0, 0, 1, 1], [1, 0, 0, 1], [1, 1, 0, 0], [0, 1, 1, 0]],
'1-2': [[0, 1, 1, 1], [0, 0, 1, 1], [1, 0, 1, 1], [1, 0, 0, 1], [1, 1, 0, 1], [1, 1, 0, 0], [1, 1, 1, 0], [0, 1, 1, 0]]
}
)
self.type = None
self.current_step = 0
self._step_type = '2'
self.frequency = 100
self.rotation_step_count = 100
self.milli_meter_step_count = 1
@staticmethod
def info():
return AttrDefault(bool, {'name': 'StepperMotor'})
def wired(self, obniz):
self.obniz = obniz
if obniz.is_valid_io(*[self.params.common]):
self.common = obniz.get_io(*[self.params.common])
self.common.output(*[True])
self.type = 'unipolar'
else:
self.type = 'bipolar'
self.ios = []
self.ios.append(*[obniz.get_io(*[self.params.a])])
self.ios.append(*[obniz.get_io(*[self.params.b])])
self.ios.append(*[obniz.get_io(*[self.params.aa])])
self.ios.append(*[obniz.get_io(*[self.params.bb])])
async def step_wait(self, step_count):
if type(step_count) in ['int', 'float']:
raise Exception('must provide number')
step_count = round(*[step_count])
if step_count == 0:
return
step_count_abs = abs(*[step_count])
instructions = self._get_step_instructions(*[])
instruction_length = len(instructions)
array = []
current_phase = self.current_step % instruction_length
if current_phase < 0:
current_phase = (instruction_length - current_phase * -1)
if step_count > 0:
for i in range(0, len(instructions), 1):
current_phase += 1
if current_phase >= instruction_length:
current_phase = 0
array.append(*[instructions[current_phase]])
else:
for i in range(0, len(instructions), 1):
current_phase -= 1
if current_phase < 0:
current_phase = (instruction_length - 1)
array.append(*[instructions[current_phase]])
msec = 1000 / self.frequency
msec = int(*[msec])
if msec < 1:
msec = 1
def anonymous0(index):
instruction = array[index]
for i in range(0, len(self.ios), 1):
self.ios[i].output(*[instruction[i]])
state = anonymous0
states = []
for i in range(0, instruction_length, 1):
states.append(*[AttrDefault(bool, {'duration': msec, 'state': state})])
await self.obniz.io.repeat_wait(*[states, step_count_abs])
self.current_step += step_count
async def step_to_wait(self, destination):
mustmove = (destination - self.current_step)
await self.step_wait(*[mustmove])
async def hold_wait(self):
instructions = self._get_step_instructions(*[])
instruction_length = len(instructions)
current_phase = self.current_step % instruction_length
if current_phase < 0:
current_phase = (instruction_length - current_phase * -1)
for i in range(0, len(self.ios), 1):
self.ios[i].output(*[instructions[current_phase][i]])
await self.obniz.ping_wait(*[])
async def free_wait(self):
for i in range(0, len(self.ios), 1):
self.ios[i].output(*[True])
await self.obniz.ping_wait(*[])
def step_type(self, step_type):
new_type = self._step_instructions[step_type]
if not new_type:
raise Exception('unknown step type ' + str(step_type))
self._step_type = step_type
def speed(self, step_per_sec):
self.frequency = step_per_sec
def current_rotation(self):
return self.current_step / self.rotation_step_count * 360
def current_angle(self):
angle = int(*[self.current_rotation(*[]) * 1000]) % 360000 / 1000
if angle < 0:
angle = (360 - angle)
return angle
async def rotate_wait(self, rotation):
rotation /= 360
needed = rotation * self.rotation_step_count
await self.step_wait(*[needed])
async def rotate_to_wait(self, angle):
needed = (angle - self.current_angle(*[]))
if abs(*[needed]) > 180:
needed = (needed - 360) if needed > 0 else (360 + needed)
needed = needed / 360 * self.rotation_step_count
await self.step_wait(*[needed])
def current_distance(self):
return self.current_step / self.milli_meter_step_count
async def move_wait(self, distance):
needed = distance * self.milli_meter_step_count
await self.step_wait(*[needed])
async def move_to_wait(self, destination):
needed = (destination - self.current_distance(*[])) * self.milli_meter_step_count
await self.step_wait(*[needed])
def _get_step_instructions(self):
return self._step_instructions[self._step_type] | [
1,
515,
12421,
8977,
1053,
2180,
509,
4592,
13,
13,
5215,
408,
948,
3934,
13,
13,
1990,
2443,
2496,
29924,
327,
272,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
29889,
8149,
353,
6024,
29966,
10818,
29958,
525,
9435,
2033,
13,
4706,
1583,
29889,
12403,
29918,
8149,
353,
6024,
29874,
742,
525,
29890,
742,
525,
7340,
742,
525,
1327,
2033,
13,
4706,
1583,
3032,
10568,
29918,
2611,
582,
1953,
353,
2180,
509,
4592,
29898,
11227,
29892,
13,
9651,
426,
13,
18884,
525,
29896,
2396,
5519,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
1402,
518,
29896,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
29892,
29871,
29896,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
20526,
13,
18884,
525,
29906,
2396,
5519,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
1402,
518,
29896,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
29892,
29871,
29900,
1402,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
20526,
13,
18884,
525,
29896,
29899,
29906,
2396,
5519,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
1402,
518,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
1402,
518,
29896,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
1402,
518,
29896,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
29892,
29871,
29896,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
29892,
29871,
29900,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
1402,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
5262,
13,
9651,
500,
13,
4706,
1723,
13,
4706,
1583,
29889,
1853,
353,
6213,
13,
4706,
1583,
29889,
3784,
29918,
10568,
353,
29871,
29900,
13,
4706,
1583,
3032,
10568,
29918,
1853,
353,
525,
29906,
29915,
13,
4706,
1583,
29889,
10745,
23860,
353,
29871,
29896,
29900,
29900,
13,
4706,
1583,
29889,
5450,
362,
29918,
10568,
29918,
2798,
353,
29871,
29896,
29900,
29900,
13,
4706,
1583,
29889,
29885,
12840,
29918,
29391,
29918,
10568,
29918,
2798,
353,
29871,
29896,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
5235,
7295,
13,
4706,
736,
2180,
509,
4592,
29898,
11227,
29892,
11117,
978,
2396,
525,
7789,
2496,
29924,
327,
272,
29915,
1800,
13,
13,
1678,
822,
281,
2859,
29898,
1311,
29892,
704,
29876,
466,
1125,
13,
4706,
1583,
29889,
711,
29876,
466,
353,
704,
29876,
466,
13,
4706,
565,
704,
29876,
466,
29889,
275,
29918,
3084,
29918,
601,
10456,
29961,
1311,
29889,
7529,
29889,
9435,
29962,
1125,
13,
9651,
1583,
29889,
9435,
353,
704,
29876,
466,
29889,
657,
29918,
601,
10456,
29961,
1311,
29889,
7529,
29889,
9435,
2314,
13,
9651,
1583,
29889,
9435,
29889,
4905,
10456,
29961,
5574,
2314,
13,
9651,
1583,
29889,
1853,
353,
525,
348,
666,
10170,
29915,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
1853,
353,
525,
29890,
666,
10170,
29915,
13,
4706,
1583,
29889,
2363,
353,
5159,
13,
4706,
1583,
29889,
2363,
29889,
4397,
10456,
29961,
711,
29876,
466,
29889,
657,
29918,
601,
10456,
29961,
1311,
29889,
7529,
29889,
29874,
2314,
2314,
13,
4706,
1583,
29889,
2363,
29889,
4397,
10456,
29961,
711,
29876,
466,
29889,
657,
29918,
601,
10456,
29961,
1311,
29889,
7529,
29889,
29890,
2314,
2314,
13,
4706,
1583,
29889,
2363,
29889,
4397,
10456,
29961,
711,
29876,
466,
29889,
657,
29918,
601,
10456,
29961,
1311,
29889,
7529,
29889,
7340,
2314,
2314,
13,
4706,
1583,
29889,
2363,
29889,
4397,
10456,
29961,
711,
29876,
466,
29889,
657,
29918,
601,
10456,
29961,
1311,
29889,
7529,
29889,
1327,
2314,
2314,
13,
13,
1678,
7465,
822,
4331,
29918,
10685,
29898,
1311,
29892,
4331,
29918,
2798,
1125,
13,
4706,
565,
1134,
29898,
10568,
29918,
2798,
29897,
297,
6024,
524,
742,
525,
7411,
2033,
29901,
13,
9651,
12020,
8960,
877,
21969,
3867,
1353,
1495,
13,
4706,
4331,
29918,
2798,
353,
4513,
10456,
29961,
10568,
29918,
2798,
2314,
13,
4706,
565,
4331,
29918,
2798,
1275,
29871,
29900,
29901,
13,
9651,
736,
13,
4706,
4331,
29918,
2798,
29918,
6897,
353,
6425,
10456,
29961,
10568,
29918,
2798,
2314,
13,
4706,
11994,
353,
1583,
3032,
657,
29918,
10568,
29918,
2611,
582,
1953,
10456,
23076,
13,
4706,
15278,
29918,
2848,
353,
7431,
29898,
2611,
582,
1953,
29897,
13,
4706,
1409,
353,
5159,
13,
4706,
1857,
29918,
21646,
353,
1583,
29889,
3784,
29918,
10568,
1273,
15278,
29918,
2848,
13,
4706,
565,
1857,
29918,
21646,
529,
29871,
29900,
29901,
13,
9651,
1857,
29918,
21646,
353,
313,
2611,
4080,
29918,
2848,
448,
1857,
29918,
21646,
334,
448,
29896,
29897,
13,
4706,
565,
4331,
29918,
2798,
1405,
29871,
29900,
29901,
13,
9651,
363,
474,
297,
3464,
29898,
29900,
29892,
7431,
29898,
2611,
582,
1953,
511,
29871,
29896,
1125,
13,
18884,
1857,
29918,
21646,
4619,
29871,
29896,
13,
18884,
565,
1857,
29918,
21646,
6736,
15278,
29918,
2848,
29901,
13,
462,
1678,
1857,
29918,
21646,
353,
29871,
29900,
13,
18884,
1409,
29889,
4397,
10456,
29961,
2611,
582,
1953,
29961,
3784,
29918,
21646,
24960,
13,
4706,
1683,
29901,
13,
9651,
363,
474,
297,
3464,
29898,
29900,
29892,
7431,
29898,
2611,
582,
1953,
511,
29871,
29896,
1125,
13,
18884,
1857,
29918,
21646,
22361,
29871,
29896,
13,
18884,
565,
1857,
29918,
21646,
529,
29871,
29900,
29901,
13,
462,
1678,
1857,
29918,
21646,
353,
313,
2611,
4080,
29918,
2848,
448,
29871,
29896,
29897,
13,
18884,
1409,
29889,
4397,
10456,
29961,
2611,
582,
1953,
29961,
3784,
29918,
21646,
24960,
13,
4706,
286,
3471,
353,
29871,
29896,
29900,
29900,
29900,
847,
1583,
29889,
10745,
23860,
13,
4706,
286,
3471,
353,
938,
10456,
29961,
29885,
3471,
2314,
13,
4706,
565,
286,
3471,
529,
29871,
29896,
29901,
13,
9651,
286,
3471,
353,
29871,
29896,
13,
4706,
822,
21560,
29900,
29898,
2248,
1125,
13,
9651,
15278,
353,
1409,
29961,
2248,
29962,
13,
9651,
363,
474,
297,
3464,
29898,
29900,
29892,
7431,
29898,
1311,
29889,
2363,
511,
29871,
29896,
1125,
13,
18884,
1583,
29889,
2363,
29961,
29875,
1822,
4905,
10456,
29961,
2611,
4080,
29961,
29875,
24960,
13,
13,
4706,
2106,
353,
21560,
29900,
13,
4706,
5922,
353,
5159,
13,
4706,
363,
474,
297,
3464,
29898,
29900,
29892,
15278,
29918,
2848,
29892,
29871,
29896,
1125,
13,
9651,
5922,
29889,
4397,
10456,
29961,
25098,
4592,
29898,
11227,
29892,
11117,
19708,
2396,
286,
3471,
29892,
525,
3859,
2396,
2106,
1800,
2314,
13,
4706,
7272,
1583,
29889,
711,
29876,
466,
29889,
601,
29889,
14358,
29918,
10685,
10456,
29961,
28631,
29892,
4331,
29918,
2798,
29918,
6897,
2314,
13,
4706,
1583,
29889,
3784,
29918,
10568,
4619,
4331,
29918,
2798,
13,
13,
1678,
7465,
822,
4331,
29918,
517,
29918,
10685,
29898,
1311,
29892,
12551,
1125,
13,
4706,
1818,
11631,
353,
313,
23848,
448,
1583,
29889,
3784,
29918,
10568,
29897,
13,
4706,
7272,
1583,
29889,
10568,
29918,
10685,
10456,
29961,
21969,
11631,
2314,
13,
13,
1678,
7465,
822,
4808,
29918,
10685,
29898,
1311,
1125,
13,
4706,
11994,
353,
1583,
3032,
657,
29918,
10568,
29918,
2611,
582,
1953,
10456,
23076,
13,
4706,
15278,
29918,
2848,
353,
7431,
29898,
2611,
582,
1953,
29897,
13,
4706,
1857,
29918,
21646,
353,
1583,
29889,
3784,
29918,
10568,
1273,
15278,
29918,
2848,
13,
4706,
565,
1857,
29918,
21646,
529,
29871,
29900,
29901,
13,
9651,
1857,
29918,
21646,
353,
313,
2611,
4080,
29918,
2848,
448,
1857,
29918,
21646,
334,
448,
29896,
29897,
13,
4706,
363,
474,
297,
3464,
29898,
29900,
29892,
7431,
29898,
1311,
29889,
2363,
511,
29871,
29896,
1125,
13,
9651,
1583,
29889,
2363,
29961,
29875,
1822,
4905,
10456,
29961,
2611,
582,
1953,
29961,
3784,
29918,
21646,
3816,
29875,
24960,
13,
4706,
7272,
1583,
29889,
711,
29876,
466,
29889,
15702,
29918,
10685,
10456,
23076,
13,
13,
1678,
7465,
822,
3889,
29918,
10685,
29898,
1311,
1125,
13,
4706,
363,
474,
297,
3464,
29898,
29900,
29892,
7431,
29898,
1311,
29889,
2363,
511,
29871,
29896,
1125,
13,
9651,
1583,
29889,
2363,
29961,
29875,
1822,
4905,
10456,
29961,
5574,
2314,
13,
4706,
7272,
1583,
29889,
711,
29876,
466,
29889,
15702,
29918,
10685,
10456,
23076,
13,
13,
1678,
822,
4331,
29918,
1853,
29898,
1311,
29892,
4331,
29918,
1853,
1125,
13,
4706,
716,
29918,
1853,
353,
1583,
3032,
10568,
29918,
2611,
582,
1953,
29961,
10568,
29918,
1853,
29962,
13,
4706,
565,
451,
716,
29918,
1853,
29901,
13,
9651,
12020,
8960,
877,
26690,
4331,
1134,
525,
718,
851,
29898,
10568,
29918,
1853,
876,
13,
4706,
1583,
3032,
10568,
29918,
1853,
353,
4331,
29918,
1853,
13,
13,
1678,
822,
6210,
29898,
1311,
29892,
4331,
29918,
546,
29918,
3471,
1125,
13,
4706,
1583,
29889,
10745,
23860,
353,
4331,
29918,
546,
29918,
3471,
13,
13,
1678,
822,
1857,
29918,
5450,
362,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
3784,
29918,
10568,
847,
1583,
29889,
5450,
362,
29918,
10568,
29918,
2798,
334,
29871,
29941,
29953,
29900,
13,
13,
1678,
822,
1857,
29918,
2521,
29898,
1311,
1125,
13,
4706,
10696,
353,
938,
10456,
29961,
1311,
29889,
3784,
29918,
5450,
362,
10456,
23076,
334,
29871,
29896,
29900,
29900,
29900,
2314,
1273,
29871,
29941,
29953,
29900,
29900,
29900,
29900,
847,
29871,
29896,
29900,
29900,
29900,
13,
4706,
565,
10696,
529,
29871,
29900,
29901,
13,
9651,
10696,
353,
313,
29941,
29953,
29900,
448,
10696,
29897,
13,
4706,
736,
10696,
13,
13,
1678,
7465,
822,
16734,
29918,
10685,
29898,
1311,
29892,
13733,
1125,
13,
4706,
13733,
847,
29922,
29871,
29941,
29953,
29900,
13,
4706,
4312,
353,
13733,
334,
1583,
29889,
5450,
362,
29918,
10568,
29918,
2798,
13,
4706,
7272,
1583,
29889,
10568,
29918,
10685,
10456,
29961,
484,
19226,
2314,
13,
13,
1678,
7465,
822,
16734,
29918,
517,
29918,
10685,
29898,
1311,
29892,
10696,
1125,
13,
4706,
4312,
353,
313,
2521,
448,
1583,
29889,
3784,
29918,
2521,
10456,
2636,
876,
13,
4706,
565,
6425,
10456,
29961,
484,
19226,
2314,
1405,
29871,
29896,
29947,
29900,
29901,
13,
9651,
4312,
353,
313,
484,
19226,
448,
29871,
29941,
29953,
29900,
29897,
565,
4312,
1405,
29871,
29900,
1683,
313,
29941,
29953,
29900,
718,
4312,
29897,
13,
4706,
4312,
353,
4312,
847,
29871,
29941,
29953,
29900,
334,
1583,
29889,
5450,
362,
29918,
10568,
29918,
2798,
13,
4706,
7272,
1583,
29889,
10568,
29918,
10685,
10456,
29961,
484,
19226,
2314,
13,
13,
1678,
822,
1857,
29918,
19244,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
3784,
29918,
10568,
847,
1583,
29889,
29885,
12840,
29918,
29391,
29918,
10568,
29918,
2798,
13,
13,
1678,
7465,
822,
4337,
29918,
10685,
29898,
1311,
29892,
5418,
1125,
13,
4706,
4312,
353,
5418,
334,
1583,
29889,
29885,
12840,
29918,
29391,
29918,
10568,
29918,
2798,
13,
4706,
7272,
1583,
29889,
10568,
29918,
10685,
10456,
29961,
484,
19226,
2314,
13,
13,
1678,
7465,
822,
4337,
29918,
517,
29918,
10685,
29898,
1311,
29892,
12551,
1125,
13,
4706,
4312,
353,
313,
23848,
448,
1583,
29889,
3784,
29918,
19244,
10456,
2636,
876,
334,
1583,
29889,
29885,
12840,
29918,
29391,
29918,
10568,
29918,
2798,
13,
4706,
7272,
1583,
29889,
10568,
29918,
10685,
10456,
29961,
484,
19226,
2314,
13,
13,
1678,
822,
903,
657,
29918,
10568,
29918,
2611,
582,
1953,
29898,
1311,
1125,
13,
4706,
736,
1583,
3032,
10568,
29918,
2611,
582,
1953,
29961,
1311,
3032,
10568,
29918,
1853,
29962,
2
] |
L8-pandas-autocorr.py | jdherman/eci273 | 10 | 43109 | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# read CSV data into a "dataframe" - pandas can parse dates
# this will be familiar to R users (not so much matlab users)
df = pd.read_csv('data/SHA.csv', index_col=0, parse_dates=True)
Q = df.SHA_INFLOW_CFS # a pandas series (daily)
# Q = Q.resample('AS-OCT').sum() # annual values
print(Q.autocorr(lag=1))
# plot a correlogram with confidence bounds
pd.plotting.autocorrelation_plot(Q)
plt.xlim([0,365])
plt.show()
from statsmodels.tsa import stattools
pacf,ci = stattools.pacf(Q, nlags=7, alpha=0.05)
plt.plot(pacf, linewidth=2)
plt.plot(ci, linestyle='dashed', color='0.5')
plt.show()
# we did this with pandas to simplify the resampling operations
# but we can also do it with numpy
# (using annual flow values)
Q = df.SHA_INFLOW_CFS.resample('AS-OCT').sum().values # now a numpy array
def autocorr(x,k):
return np.corrcoef(x[:len(x)-k], x[k:])[0,1]
print(autocorr(Q,k=1))
| [
1,
1053,
12655,
408,
7442,
29871,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
11701,
408,
10518,
13,
13,
29937,
1303,
16874,
848,
964,
263,
376,
1272,
2557,
29908,
448,
11701,
508,
6088,
10116,
13,
29937,
445,
674,
367,
9985,
304,
390,
4160,
313,
1333,
577,
1568,
1775,
8205,
4160,
29897,
13,
2176,
353,
10518,
29889,
949,
29918,
7638,
877,
1272,
29914,
23498,
29889,
7638,
742,
2380,
29918,
1054,
29922,
29900,
29892,
6088,
29918,
15190,
29922,
5574,
29897,
13,
13,
29984,
353,
4489,
29889,
23498,
29918,
24065,
27998,
29918,
9207,
29903,
396,
263,
11701,
3652,
313,
29881,
8683,
29897,
13,
29937,
660,
353,
660,
29889,
690,
981,
877,
3289,
29899,
29949,
1783,
2824,
2083,
580,
396,
17568,
1819,
13,
2158,
29898,
29984,
29889,
1300,
542,
25891,
29898,
3110,
29922,
29896,
876,
13,
13,
29937,
6492,
263,
14515,
417,
1393,
411,
16420,
13451,
13,
15926,
29889,
5317,
1259,
29889,
1300,
542,
272,
23445,
29918,
5317,
29898,
29984,
29897,
13,
572,
29873,
29889,
29916,
2576,
4197,
29900,
29892,
29941,
29953,
29945,
2314,
13,
572,
29873,
29889,
4294,
580,
13,
13,
3166,
22663,
9794,
29889,
1372,
29874,
1053,
1002,
8504,
13,
29886,
562,
29888,
29892,
455,
353,
1002,
8504,
29889,
29886,
562,
29888,
29898,
29984,
29892,
302,
29880,
810,
29922,
29955,
29892,
15595,
29922,
29900,
29889,
29900,
29945,
29897,
13,
572,
29873,
29889,
5317,
29898,
29886,
562,
29888,
29892,
1196,
2103,
29922,
29906,
29897,
13,
572,
29873,
29889,
5317,
29898,
455,
29892,
6276,
342,
1508,
2433,
14592,
287,
742,
2927,
2433,
29900,
29889,
29945,
1495,
13,
572,
29873,
29889,
4294,
580,
13,
13,
29937,
591,
1258,
445,
411,
11701,
304,
21092,
278,
620,
314,
10335,
6931,
13,
29937,
541,
591,
508,
884,
437,
372,
411,
12655,
13,
29937,
313,
4746,
17568,
4972,
1819,
29897,
13,
29984,
353,
4489,
29889,
23498,
29918,
24065,
27998,
29918,
9207,
29903,
29889,
690,
981,
877,
3289,
29899,
29949,
1783,
2824,
2083,
2141,
5975,
396,
1286,
263,
12655,
1409,
13,
13,
1753,
1120,
542,
25891,
29898,
29916,
29892,
29895,
1125,
13,
29871,
736,
7442,
29889,
29725,
1111,
1389,
29898,
29916,
7503,
2435,
29898,
29916,
6817,
29895,
1402,
921,
29961,
29895,
29901,
2314,
29961,
29900,
29892,
29896,
29962,
13,
13,
2158,
29898,
1300,
542,
25891,
29898,
29984,
29892,
29895,
29922,
29896,
876,
13,
13,
13,
2
] |
dosu/utils.py | tsandrini/DoSU | 0 | 45198 | <filename>dosu/utils.py
"""
__/\\\\\\\\\\\\______________________/\\\\\\\\\\\____/\\\________/\\\_
_\/\\\////////\\\__________________/\\\/////////\\\_\/\\\_______\/\\\_
_\/\\\______\//\\\________________\//\\\______\///__\/\\\_______\/\\\_
_\/\\\_______\/\\\_____/\\\\\______\////\\\_________\/\\\_______\/\\\_
_\/\\\_______\/\\\___/\\\///\\\_______\////\\\______\/\\\_______\/\\\_
_\/\\\_______\/\\\__/\\\__\//\\\_________\////\\\___\/\\\_______\/\\\_
_\/\\\_______/\\\__\//\\\__/\\\___/\\\______\//\\\__\//\\\______/\\\__
_\/\\\\\\\\\\\\/____\///\\\\\/___\///\\\\\\\\\\\/____\///\\\\\\\\\/___
_\////////////________\/////_______\///////////________\/////////_____
Created by <NAME>
"""
import yaml
import os
from .settings import HOME
class Config:
config_paths = (
HOME + '/.config/dosu/config.yml',
HOME + '/.dosu.yml',
)
def __init__(self):
self.config = self.load_raw_config()
self.subjects = self.load_subjects()
def load_raw_config(self):
for config_path in self.config_paths:
try:
with open(config_path, 'r') as ymlfile:
return yaml.load(ymlfile)
except IOError as e:
continue
else:
return None
def load_subjects(self):
if not self.config:
return None
base = self.get('general.root_dir')
if not base:
print ("DoSU root dir is not defined in config file")
sys.exit(2)
return set([name for name in os.listdir(base) if os.path.isdir(base + '/' + name)])
def get(self, key, fallback=None):
"""
Gets a cached value by its key using dotted notation
"""
try:
tmp = self.config
for fragment in key.split('.'):
tmp = tmp[fragment]
return tmp
except KeyError as e:
return fallback if fallback != None else key
def load_file(path):
with open(path, 'r') as f:
data = f.read()
return data
config = Config()
| [
1,
529,
9507,
29958,
29881,
359,
29884,
29914,
13239,
29889,
2272,
13,
15945,
29908,
13,
1649,
29914,
1966,
1966,
1966,
1966,
1966,
1966,
27097,
7652,
1649,
29914,
1966,
1966,
1966,
1966,
1966,
29905,
7652,
29914,
1966,
29905,
14365,
29914,
1966,
20122,
13,
903,
25558,
1966,
29905,
10797,
1966,
29905,
27097,
1649,
29914,
1966,
29905,
10797,
29914,
1966,
29905,
3187,
29914,
1966,
29905,
7652,
1649,
3187,
29914,
1966,
20122,
13,
29871,
903,
25558,
1966,
29905,
7652,
1649,
29905,
458,
1966,
29905,
27097,
29905,
458,
1966,
29905,
7652,
1649,
29905,
6658,
1649,
25558,
1966,
29905,
7652,
1649,
3187,
29914,
1966,
20122,
13,
259,
903,
25558,
1966,
29905,
7652,
1649,
3187,
29914,
1966,
29905,
7652,
29918,
29914,
1966,
1966,
29905,
7652,
1649,
29905,
6165,
1966,
29905,
14365,
3187,
29914,
1966,
29905,
7652,
1649,
3187,
29914,
1966,
20122,
13,
1678,
903,
25558,
1966,
29905,
7652,
1649,
3187,
29914,
1966,
29905,
22359,
29914,
1966,
29905,
6658,
1966,
29905,
7652,
1649,
3187,
6165,
1966,
29905,
7652,
1649,
25558,
1966,
29905,
7652,
1649,
3187,
29914,
1966,
20122,
13,
268,
903,
25558,
1966,
29905,
7652,
1649,
3187,
29914,
1966,
29905,
1649,
29914,
1966,
29905,
1649,
29905,
458,
1966,
29905,
14365,
3187,
6165,
1966,
29905,
1649,
3187,
29914,
1966,
29905,
7652,
1649,
3187,
29914,
1966,
20122,
13,
418,
903,
25558,
1966,
29905,
7652,
22359,
29914,
1966,
29905,
1649,
29905,
458,
1966,
29905,
1649,
29914,
1966,
29905,
22359,
29914,
1966,
29905,
7652,
1649,
29905,
458,
1966,
29905,
1649,
29905,
458,
1966,
29905,
7652,
1649,
29914,
1966,
29905,
1649,
13,
539,
903,
25558,
1966,
1966,
1966,
1966,
1966,
1966,
29914,
7652,
29905,
6658,
1966,
1966,
25558,
1649,
3187,
6658,
1966,
1966,
1966,
1966,
1966,
25558,
7652,
29905,
6658,
1966,
1966,
1966,
1966,
25558,
22359,
13,
4706,
903,
29905,
10797,
6165,
14365,
29905,
6165,
29914,
7652,
1649,
3187,
10797,
6658,
14365,
29905,
10797,
29914,
7652,
29918,
13,
13,
20399,
491,
529,
5813,
29958,
13,
15945,
29908,
13,
13,
13,
5215,
343,
8807,
13,
5215,
2897,
13,
13,
13,
3166,
869,
11027,
1053,
29832,
2303,
13,
13,
13,
1990,
12782,
29901,
13,
13,
1678,
2295,
29918,
24772,
353,
313,
13,
4706,
29832,
2303,
718,
525,
6294,
2917,
29914,
29881,
359,
29884,
29914,
2917,
29889,
21053,
742,
13,
4706,
29832,
2303,
718,
525,
6294,
29881,
359,
29884,
29889,
21053,
742,
13,
1678,
1723,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
29889,
2917,
353,
1583,
29889,
1359,
29918,
1610,
29918,
2917,
580,
13,
4706,
1583,
29889,
16009,
29879,
353,
1583,
29889,
1359,
29918,
16009,
29879,
580,
13,
13,
1678,
822,
2254,
29918,
1610,
29918,
2917,
29898,
1311,
1125,
13,
4706,
363,
2295,
29918,
2084,
297,
1583,
29889,
2917,
29918,
24772,
29901,
13,
9651,
1018,
29901,
13,
18884,
411,
1722,
29898,
2917,
29918,
2084,
29892,
525,
29878,
1495,
408,
343,
828,
1445,
29901,
13,
462,
1678,
736,
343,
8807,
29889,
1359,
29898,
21053,
1445,
29897,
13,
9651,
5174,
10663,
2392,
408,
321,
29901,
13,
18884,
6773,
13,
4706,
1683,
29901,
13,
9651,
736,
6213,
13,
13,
1678,
822,
2254,
29918,
16009,
29879,
29898,
1311,
1125,
13,
13,
4706,
565,
451,
1583,
29889,
2917,
29901,
13,
9651,
736,
6213,
13,
13,
4706,
2967,
353,
1583,
29889,
657,
877,
17492,
29889,
4632,
29918,
3972,
1495,
13,
13,
4706,
565,
451,
2967,
29901,
13,
9651,
1596,
4852,
6132,
14605,
3876,
4516,
338,
451,
3342,
297,
2295,
934,
1159,
13,
9651,
10876,
29889,
13322,
29898,
29906,
29897,
13,
13,
4706,
736,
731,
4197,
978,
363,
1024,
297,
2897,
29889,
1761,
3972,
29898,
3188,
29897,
565,
2897,
29889,
2084,
29889,
275,
3972,
29898,
3188,
718,
8207,
29915,
718,
1024,
29897,
2314,
13,
13,
1678,
822,
679,
29898,
1311,
29892,
1820,
29892,
6416,
1627,
29922,
8516,
1125,
13,
4706,
9995,
13,
4706,
402,
1691,
263,
22152,
995,
491,
967,
1820,
773,
270,
15048,
12640,
13,
4706,
9995,
13,
4706,
1018,
29901,
13,
9651,
13128,
353,
1583,
29889,
2917,
13,
9651,
363,
9376,
297,
1820,
29889,
5451,
877,
6169,
1125,
13,
18884,
13128,
353,
13128,
29961,
20777,
29962,
13,
9651,
736,
13128,
13,
4706,
5174,
7670,
2392,
408,
321,
29901,
13,
9651,
736,
6416,
1627,
565,
6416,
1627,
2804,
6213,
1683,
1820,
13,
13,
13,
1753,
2254,
29918,
1445,
29898,
2084,
1125,
13,
1678,
411,
1722,
29898,
2084,
29892,
525,
29878,
1495,
408,
285,
29901,
13,
4706,
848,
353,
285,
29889,
949,
580,
13,
13,
1678,
736,
848,
13,
13,
2917,
353,
12782,
580,
13,
2
] |
src/lib/pdb.py | DTenore/skulpt | 2,671 | 128113 | <reponame>DTenore/skulpt<filename>src/lib/pdb.py<gh_stars>1000+
import _sk_fail; _sk_fail._("pdb")
| [
1,
529,
276,
1112,
420,
29958,
12972,
264,
487,
29914,
808,
14185,
29966,
9507,
29958,
4351,
29914,
1982,
29914,
29886,
2585,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29900,
29974,
13,
5215,
903,
808,
29918,
14057,
29936,
903,
808,
29918,
14057,
3032,
703,
29886,
2585,
1159,
13,
2
] |
DeepSpeech/bin/import_ccpmf.py | adimaini/WEAT-WEFAT | 1 | 1604520 | <reponame>adimaini/WEAT-WEFAT<filename>DeepSpeech/bin/import_ccpmf.py
#!/usr/bin/env python
"""
Importer for dataset published from Centre de Conférence <NAME>-France
Ministère de l'Économie, des Finances et de la Relance
"""
import csv
import sys
import os
import progressbar
import subprocess
import zipfile
from glob import glob
from multiprocessing import Pool
import hashlib
import decimal
import math
import unicodedata
import re
import sox
import xml.etree.ElementTree as ET
try:
from num2words import num2words
except ImportError as ex:
print("pip install num2words")
sys.exit(1)
import requests
import json
from deepspeech_training.util.downloader import SIMPLE_BAR, maybe_download
from deepspeech_training.util.helpers import secs_to_hours
from deepspeech_training.util.importers import (
get_counter,
get_importers_parser,
get_imported_samples,
get_validate_label,
print_import_report,
)
from ds_ctcdecoder import Alphabet
FIELDNAMES = ["wav_filename", "wav_filesize", "transcript"]
SAMPLE_RATE = 16000
CHANNELS = 1
BIT_DEPTH = 16
MAX_SECS = 10
MIN_SECS = 0.85
DATASET_RELEASE_CSV = "https://data.economie.gouv.fr/explore/dataset/transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020/download/?format=csv&timezone=Europe/Berlin&lang=fr&use_labels_for_header=true&csv_separator=%3B"
DATASET_RELEASE_SHA = [
("863d39a06a388c6491c6ff2f6450b151f38f1b57", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.001"),
("2f3a0305aa04c61220bb00b5a4e553e45dbf12e1", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.002"),
("5e55e9f1f844097349188ac875947e5a3d7fe9f1", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.003"),
("8bf54842cf07948ca5915e27a8bd5fa5139c06ae", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.004"),
("c8963504aadc015ac48f9af80058a0bb3440b94f", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.005"),
("d95e225e908621d83ce4e9795fd108d9d310e244", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.006"),
("de6ed9c2b0ee80ca879aae8ba7923cc93217d811", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.007"),
("234283c47dacfcd4450d836c52c25f3e807fc5f2", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.008"),
("4e6b67a688639bb72f8cd81782eaba604a8d32a6", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.009"),
("4165a51389777c8af8e6253d87bdacb877e8b3b0", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.010"),
("34322e7009780d97ef5bd02bf2f2c7a31f00baff", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.011"),
("48c5be3b2ca9d6108d525da6a03e91d93a95dbac", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.012"),
("87573172f506a189c2ebc633856fe11a2e9cd213", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.013"),
("6ab2c9e508e9278d5129f023e018725c4a7c69e8", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.014"),
("4f84df831ef46dce5d3ab3e21817687a2d8c12d0", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.015"),
("e69bfb079885c299cb81080ef88b1b8b57158aa6", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.016"),
("5f764ba788ee273981cf211b242c29b49ca22c5e", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.017"),
("b6aa81a959525363223494830c1e7307d4c4bae6", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.018"),
("91ddcf43c7bf113a6f2528b857c7ec22a50a148a", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.019"),
("fa1b29273dd77b9a7494983a2f9ae52654b931d7", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.020"),
("1113aef4f5e2be2f7fbf2d54b6c710c1c0e7135f", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.021"),
("ce6420d5d0b6b5135ba559f83e1a82d4d615c470", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.022"),
("d0976ed292ac24fcf1590d1ea195077c74b05471", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.023"),
("ec746cd6af066f62d9bf8d3b2f89174783ff4e3c", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.024"),
("570d9e1e84178e32fd867171d4b3aaecda1fd4fb", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.025"),
("c29ccc7467a75b2cae3d7f2e9fbbb2ab276cb8ac", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.026"),
("08406a51146d88e208704ce058c060a1e44efa50", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.027"),
("199aedad733a78ea1e7d47def9c71c6fd5795e02", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.028"),
("db856a068f92fb4f01f410bba42c7271de0f231a", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.029"),
("e3c0135f16c6c9d25a09dcb4f99a685438a84740", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.030"),
("e51b8bb9c0ae4339f98b4f21e6d29b825109f0ac", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.031"),
("be5e80cbc49b59b31ae33c30576ef0e1a162d84e", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.032"),
("501df58e3ff55fcfd75b93dab57566dc536948b8", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.033"),
("1a114875811a8cdcb8d85a9f6dbee78be3e05131", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.034"),
("465d824e7ee46448369182c0c28646d155a2249b", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.035"),
("37f341b1b266d143eb73138c31cfff3201b9d619", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.036"),
("9e7d8255987a8a77a90e0d4b55c8fd38b9fb5694", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.037"),
("54886755630cb080a53098cb1b6c951c6714a143", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.038"),
("4b7cbb0154697be795034f7a49712e882a97197a", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.039"),
("c8e1e565a0e7a1f6ff1dbfcefe677aa74a41d2f2", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip.040"),
]
def _download_and_preprocess_data(csv_url, target_dir):
dataset_sources = os.path.join(target_dir, "transcriptionsXML_audioMP3_MEFR_CCPMF_2012-2020", "data.txt")
if os.path.exists(dataset_sources):
return dataset_sources
# Making path absolute
target_dir = os.path.abspath(target_dir)
csv_ref = requests.get(csv_url).text.split('\r\n')[1:-1]
for part in csv_ref:
part_filename = requests.head(part).headers.get("Content-Disposition").split(" ")[1].split("=")[1].replace('"', "")
if not os.path.exists(os.path.join(target_dir, part_filename)):
part_path = maybe_download(part_filename, target_dir, part)
def _big_sha1(fname):
s = hashlib.sha1()
buffer_size = 65536
with open(fname, "rb") as f:
while True:
data = f.read(buffer_size)
if not data:
break
s.update(data)
return s.hexdigest()
for (sha1, filename) in DATASET_RELEASE_SHA:
print("Checking {} SHA1:".format(filename))
csum = _big_sha1(os.path.join(target_dir, filename))
if csum == sha1:
print("\t{}: OK {}".format(filename, sha1))
else:
print("\t{}: ERROR: expected {}, computed {}".format(filename, sha1, csum))
assert csum == sha1
# Conditionally extract data
_maybe_extract(target_dir, "transcriptionsXML_audioMP3_MEFR_CCPMF_2012-2020", "transcriptionsxml_audiomp3_mefr_ccpmf_2012-2020_2.zip", "transcriptionsXML_audioMP3_MEFR_CCPMF_2012-2020.zip")
# Produce source text for extraction / conversion
return _maybe_create_sources(os.path.join(target_dir, "transcriptionsXML_audioMP3_MEFR_CCPMF_2012-2020"))
def _maybe_extract(target_dir, extracted_data, archive, final):
# If target_dir/extracted_data does not exist, extract archive in target_dir
extracted_path = os.path.join(target_dir, extracted_data)
archive_path = os.path.join(target_dir, archive)
final_archive = os.path.join(extracted_path, final)
if not os.path.exists(extracted_path):
if not os.path.exists(archive_path):
print('No archive "%s" - building ...' % archive_path)
all_zip_parts = glob(archive_path + ".*")
all_zip_parts.sort()
cmdline = "cat {} > {}".format(" ".join(all_zip_parts), archive_path)
print('Building with "%s"' % cmdline)
subprocess.check_call(cmdline, shell=True, cwd=target_dir)
assert os.path.exists(archive_path)
print('No directory "%s" - extracting archive %s ...' % (extracted_path, archive_path))
with zipfile.ZipFile(archive_path) as zip_f:
zip_f.extractall(extracted_path)
with zipfile.ZipFile(final_archive) as zip_f:
zip_f.extractall(target_dir)
else:
print('Found directory "%s" - not extracting it from archive.' % extracted_path)
def _maybe_create_sources(dir):
dataset_sources = os.path.join(dir, "data.txt")
MP3 = glob(os.path.join(dir, "**", "*.mp3"))
XML = glob(os.path.join(dir, "**", "*.xml"))
MP3_XML_Scores = []
MP3_XML_Fin = {}
for f_mp3 in MP3:
for f_xml in XML:
b_mp3 = os.path.splitext(os.path.basename(f_mp3))[0]
b_xml = os.path.splitext(os.path.basename(f_xml))[0]
a_mp3 = b_mp3.split('_')
a_xml = b_xml.split('_')
score = 0
date_mp3 = a_mp3[0]
date_xml = a_xml[0]
if date_mp3 != date_xml:
continue
for i in range(min(len(a_mp3), len(a_xml))):
if (a_mp3[i] == a_xml[i]):
score += 1
if score >= 1:
MP3_XML_Scores.append((f_mp3, f_xml, score))
# sort by score
MP3_XML_Scores.sort(key=lambda x: x[2], reverse=True)
for s_mp3, s_xml, score in MP3_XML_Scores:
#print(s_mp3, s_xml, score)
if score not in MP3_XML_Fin:
MP3_XML_Fin[score] = {}
if s_mp3 not in MP3_XML_Fin[score]:
try:
MP3.index(s_mp3)
MP3.remove(s_mp3)
MP3_XML_Fin[score][s_mp3] = s_xml
except ValueError as ex:
pass
else:
print("here:", MP3_XML_Fin[score][s_mp3], s_xml, file=sys.stderr)
with open(dataset_sources, "w") as ds:
for score in MP3_XML_Fin:
for mp3 in MP3_XML_Fin[score]:
xml = MP3_XML_Fin[score][mp3]
if os.path.getsize(mp3) > 0 and os.path.getsize(xml) > 0:
mp3 = os.path.relpath(mp3, dir)
xml = os.path.relpath(xml, dir)
ds.write('{},{},{:0.2e}\n'.format(xml, mp3, 2.5e-4))
else:
print("Empty file {} or {}".format(mp3, xml), file=sys.stderr)
print("Missing XML pairs:", MP3, file=sys.stderr)
return dataset_sources
def maybe_normalize_for_digits(label):
# first, try to identify numbers like "50 000", "260 000"
if " " in label:
if any(s.isdigit() for s in label):
thousands = re.compile(r"(\d{1,3}(?:\s*\d{3})*(?:,\d+)?)")
maybe_thousands = thousands.findall(label)
if len(maybe_thousands) > 0:
while True:
(label, r) = re.subn(r"(\d)\s(\d{3})", "\\1\\2", label)
if r == 0:
break
# this might be a time or duration in the form "hh:mm" or "hh:mm:ss"
if ":" in label:
for s in label.split(" "):
if any(i.isdigit() for i in s):
date_or_time = re.compile(r"(\d{1,2}):(\d{2}):?(\d{2})?")
maybe_date_or_time = date_or_time.findall(s)
if len(maybe_date_or_time) > 0:
maybe_hours = maybe_date_or_time[0][0]
maybe_minutes = maybe_date_or_time[0][1]
maybe_seconds = maybe_date_or_time[0][2]
if len(maybe_seconds) > 0:
label = label.replace("{}:{}:{}".format(maybe_hours, maybe_minutes, maybe_seconds), "{} heures {} minutes et {} secondes".format(maybe_hours, maybe_minutes, maybe_seconds))
else:
label = label.replace("{}:{}".format(maybe_hours, maybe_minutes), "{} heures et {} minutes".format(maybe_hours, maybe_minutes))
new_label = []
# pylint: disable=too-many-nested-blocks
for s in label.split(" "):
if any(i.isdigit() for i in s):
s = s.replace(",", ".") # num2words requires "." for floats
s = s.replace("\"", "") # clean some data, num2words would choke on 1959"
last_c = s[-1]
if not last_c.isdigit(): # num2words will choke on "0.6.", "24 ?"
s = s[:-1]
if any(i.isalpha() for i in s): # So we have any(isdigit()) **and** any(sialpha), like "3D"
ns = []
for c in s:
nc = c
if c.isdigit(): # convert "3" to "trois-"
try:
nc = num2words(c, lang="fr") + "-"
except decimal.InvalidOperation as ex:
print("decimal.InvalidOperation: '{}'".format(s))
raise ex
ns.append(nc)
s = "".join(s)
else:
try:
s = num2words(s, lang="fr")
except decimal.InvalidOperation as ex:
print("decimal.InvalidOperation: '{}'".format(s))
raise ex
new_label.append(s)
return " ".join(new_label)
def maybe_normalize_for_specials_chars(label):
label = label.replace("%", "pourcents")
label = label.replace("/", ", ") # clean intervals like 2019/2022 to "2019 2022"
label = label.replace("-", ", ") # clean intervals like 70-80 to "70 80"
label = label.replace("+", " plus ") # clean + and make it speakable
label = label.replace("€", " euros ") # clean euro symbol and make it speakable
label = label.replace("., ", ", ") # clean some strange "4.0., " (20181017_Innovation.xml)
label = label.replace("°", " degré ") # clean some strange "°5" (20181210_EtatsGeneraux-1000_fre_750_und.xml)
label = label.replace("...", ".") # remove ellipsis
label = label.replace("..", ".") # remove broken ellipsis
label = label.replace("m²", "mètre-carrés") # 20150616_Defi_Climat_3_wmv_0_fre_minefi.xml
label = label.replace("[end]", "") # broken tag in 20150123_Entretiens_Tresor_PGM_wmv_0_fre_minefi.xml
label = label.replace(u'\xB8c', " ç") # strange cedilla in 20150417_Printemps_Economie_2_wmv_0_fre_minefi.xml
label = label.replace("C0²", "CO 2") # 20121016_Syteme_sante_copie_wmv_0_fre_minefi.xml
return label
def maybe_normalize_for_anglicisms(label):
label = label.replace("B2B", "B to B")
label = label.replace("B2C", "B to C")
label = label.replace("#", "hashtag ")
label = label.replace("@", "at ")
return label
def maybe_normalize(label):
label = maybe_normalize_for_specials_chars(label)
label = maybe_normalize_for_anglicisms(label)
label = maybe_normalize_for_digits(label)
return label
def one_sample(sample):
file_size = -1
frames = 0
audio_source = sample[0]
target_dir = sample[1]
dataset_basename = sample[2]
start_time = sample[3]
duration = sample[4]
label = label_filter_fun(sample[5])
sample_id = sample[6]
_wav_filename = os.path.basename(audio_source.replace(".wav", "_{:06}.wav".format(sample_id)))
wav_fullname = os.path.join(target_dir, dataset_basename, _wav_filename)
if not os.path.exists(wav_fullname):
subprocess.check_output(["ffmpeg", "-i", audio_source, "-ss", str(start_time), "-t", str(duration), "-c", "copy", wav_fullname], stdin=subprocess.DEVNULL, stderr=subprocess.STDOUT)
file_size = os.path.getsize(wav_fullname)
frames = int(subprocess.check_output(["soxi", "-s", wav_fullname], stderr=subprocess.STDOUT))
_counter = get_counter()
_rows = []
if file_size == -1:
# Excluding samples that failed upon conversion
_counter["failed"] += 1
elif label is None:
# Excluding samples that failed on label validation
_counter["invalid_label"] += 1
elif int(frames/SAMPLE_RATE*1000/10/2) < len(str(label)):
# Excluding samples that are too short to fit the transcript
_counter["too_short"] += 1
elif frames/SAMPLE_RATE < MIN_SECS:
# Excluding samples that are too short
_counter["too_short"] += 1
elif frames/SAMPLE_RATE > MAX_SECS:
# Excluding very long samples to keep a reasonable batch-size
_counter["too_long"] += 1
else:
# This one is good - keep it for the target CSV
_rows.append((os.path.join(dataset_basename, _wav_filename), file_size, label))
_counter["imported_time"] += frames
_counter["all"] += 1
_counter["total_time"] += frames
return (_counter, _rows)
def _maybe_import_data(xml_file, audio_source, target_dir, rel_tol=1e-1):
dataset_basename = os.path.splitext(os.path.split(xml_file)[1])[0]
wav_root = os.path.join(target_dir, dataset_basename)
if not os.path.exists(wav_root):
os.makedirs(wav_root)
source_frames = int(subprocess.check_output(["soxi", "-s", audio_source], stderr=subprocess.STDOUT))
print("Source audio length: %s" % secs_to_hours(source_frames / SAMPLE_RATE))
# Get audiofile path and transcript for each sentence in tsv
samples = []
tree = ET.parse(xml_file)
root = tree.getroot()
seq_id = 0
this_time = 0.0
this_duration = 0.0
prev_time = 0.0
prev_duration = 0.0
this_text = ""
for child in root:
if child.tag == "row":
cur_time = float(child.attrib["timestamp"])
cur_duration = float(child.attrib["timedur"])
cur_text = child.text
if this_time == 0.0:
this_time = cur_time
delta = cur_time - (prev_time + prev_duration)
# rel_tol value is made from trial/error to try and compromise between:
# - cutting enough to skip missing words
# - not too short, not too long sentences
is_close = math.isclose(cur_time, this_time + this_duration, rel_tol=rel_tol)
is_short = ((this_duration + cur_duration + delta) < MAX_SECS)
# when the previous element is close enough **and** this does not
# go over MAX_SECS, we append content
if (is_close and is_short):
this_duration += cur_duration + delta
this_text += cur_text
else:
samples.append((audio_source, target_dir, dataset_basename, this_time, this_duration, this_text, seq_id))
this_time = cur_time
this_duration = cur_duration
this_text = cur_text
seq_id += 1
prev_time = cur_time
prev_duration = cur_duration
# Keep track of how many samples are good vs. problematic
_counter = get_counter()
num_samples = len(samples)
_rows = []
print("Processing XML data: {}".format(xml_file))
pool = Pool()
bar = progressbar.ProgressBar(max_value=num_samples, widgets=SIMPLE_BAR)
for i, processed in enumerate(pool.imap_unordered(one_sample, samples), start=1):
_counter += processed[0]
_rows += processed[1]
bar.update(i)
bar.update(num_samples)
pool.close()
pool.join()
imported_samples = get_imported_samples(_counter)
assert _counter["all"] == num_samples
assert len(_rows) == imported_samples
print_import_report(_counter, SAMPLE_RATE, MAX_SECS)
print("Import efficiency: %.1f%%" % ((_counter["total_time"] / source_frames)*100))
print("")
return _counter, _rows
def _maybe_convert_wav(mp3_filename, _wav_filename):
if not os.path.exists(_wav_filename):
print("Converting {} to WAV file: {}".format(mp3_filename, _wav_filename))
transformer = sox.Transformer()
transformer.convert(samplerate=SAMPLE_RATE, n_channels=CHANNELS, bitdepth=BIT_DEPTH)
try:
transformer.build(mp3_filename, _wav_filename)
except sox.core.SoxError:
pass
def write_general_csv(target_dir, _rows, _counter):
target_csv_template = os.path.join(target_dir, "ccpmf_{}.csv")
with open(target_csv_template.format("train"), "w") as train_csv_file: # 80%
with open(target_csv_template.format("dev"), "w") as dev_csv_file: # 10%
with open(target_csv_template.format("test"), "w") as test_csv_file: # 10%
train_writer = csv.DictWriter(train_csv_file, fieldnames=FIELDNAMES)
train_writer.writeheader()
dev_writer = csv.DictWriter(dev_csv_file, fieldnames=FIELDNAMES)
dev_writer.writeheader()
test_writer = csv.DictWriter(test_csv_file, fieldnames=FIELDNAMES)
test_writer.writeheader()
bar = progressbar.ProgressBar(max_value=len(_rows), widgets=SIMPLE_BAR)
for i, item in enumerate(bar(_rows)):
i_mod = i % 10
if i_mod == 0:
writer = test_writer
elif i_mod == 1:
writer = dev_writer
else:
writer = train_writer
writer.writerow({"wav_filename": item[0], "wav_filesize": item[1], "transcript": item[2]})
print("")
print("~~~~ FINAL STATISTICS ~~~~")
print_import_report(_counter, SAMPLE_RATE, MAX_SECS)
print("~~~~ (FINAL STATISTICS) ~~~~")
print("")
if __name__ == "__main__":
PARSER = get_importers_parser(description="Import XML from Conference Centre for Economics, France")
PARSER.add_argument("target_dir", help="Destination directory")
PARSER.add_argument("--filter_alphabet", help="Exclude samples with characters not in provided alphabet")
PARSER.add_argument("--normalize", action="store_true", help="Converts diacritic characters to their base ones")
PARAMS = PARSER.parse_args()
validate_label = get_validate_label(PARAMS)
ALPHABET = Alphabet(PARAMS.filter_alphabet) if PARAMS.filter_alphabet else None
def label_filter_fun(label):
if PARAMS.normalize:
label = unicodedata.normalize("NFKD", label.strip()) \
.encode("ascii", "ignore") \
.decode("ascii", "ignore")
label = maybe_normalize(label)
label = validate_label(label)
if ALPHABET and label:
try:
ALPHABET.encode(label)
except KeyError:
label = None
return label
dataset_sources = _download_and_preprocess_data(csv_url=DATASET_RELEASE_CSV, target_dir=PARAMS.target_dir)
sources_root_dir = os.path.dirname(dataset_sources)
all_counter = get_counter()
all_rows = []
with open(dataset_sources, "r") as sources:
for line in sources.readlines():
d = line.split(",")
this_xml = os.path.join(sources_root_dir, d[0])
this_mp3 = os.path.join(sources_root_dir, d[1])
this_rel = float(d[2])
wav_filename = os.path.join(sources_root_dir, os.path.splitext(os.path.basename(this_mp3))[0] + ".wav")
_maybe_convert_wav(this_mp3, wav_filename)
counter, rows = _maybe_import_data(this_xml, wav_filename, sources_root_dir, this_rel)
all_counter += counter
all_rows += rows
write_general_csv(sources_root_dir, _counter=all_counter, _rows=all_rows)
| [
1,
529,
276,
1112,
420,
29958,
328,
326,
475,
29875,
29914,
8851,
1299,
29899,
8851,
29943,
1299,
29966,
9507,
29958,
2772,
1022,
10649,
5309,
29914,
2109,
29914,
5215,
29918,
617,
3358,
29888,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
15945,
29908,
13,
24192,
9555,
363,
8783,
6369,
515,
11319,
316,
1281,
9625,
529,
5813,
29958,
29899,
16066,
13,
8140,
391,
1908,
316,
301,
29915,
30062,
4599,
347,
29892,
553,
4231,
2925,
634,
316,
425,
6376,
749,
13,
15945,
29908,
13,
13,
5215,
11799,
13,
5215,
10876,
13,
5215,
2897,
13,
5215,
6728,
1646,
13,
5215,
1014,
5014,
13,
5215,
14319,
1445,
13,
3166,
13149,
1053,
13149,
13,
3166,
6674,
307,
985,
292,
1053,
28625,
13,
13,
5215,
6608,
1982,
13,
5215,
13677,
13,
5215,
5844,
13,
5215,
443,
293,
6797,
532,
13,
5215,
337,
13,
5215,
577,
29916,
13,
5215,
4903,
29889,
300,
929,
29889,
2642,
9643,
408,
382,
29911,
13,
13,
2202,
29901,
13,
1678,
515,
954,
29906,
9303,
1053,
954,
29906,
9303,
13,
19499,
16032,
2392,
408,
429,
29901,
13,
1678,
1596,
703,
13096,
2601,
954,
29906,
9303,
1159,
13,
1678,
10876,
29889,
13322,
29898,
29896,
29897,
13,
13,
5215,
7274,
13,
5215,
4390,
13,
13,
3166,
316,
8961,
412,
5309,
29918,
26495,
29889,
4422,
29889,
10382,
261,
1053,
22717,
3580,
1307,
29918,
29933,
1718,
29892,
5505,
29918,
10382,
13,
3166,
316,
8961,
412,
5309,
29918,
26495,
29889,
4422,
29889,
3952,
6774,
1053,
409,
2395,
29918,
517,
29918,
29882,
2470,
13,
3166,
316,
8961,
412,
5309,
29918,
26495,
29889,
4422,
29889,
326,
1971,
2153,
1053,
313,
13,
1678,
679,
29918,
11808,
29892,
13,
1678,
679,
29918,
326,
1971,
2153,
29918,
16680,
29892,
13,
1678,
679,
29918,
5215,
287,
29918,
27736,
29892,
13,
1678,
679,
29918,
15480,
29918,
1643,
29892,
13,
1678,
1596,
29918,
5215,
29918,
12276,
29892,
13,
29897,
13,
3166,
18031,
29918,
312,
29883,
7099,
6119,
1053,
838,
17416,
13,
13,
3738,
27286,
5813,
29903,
353,
6796,
29893,
485,
29918,
9507,
613,
376,
29893,
485,
29918,
5325,
675,
613,
376,
3286,
924,
3108,
13,
8132,
3580,
1307,
29918,
29934,
3040,
353,
29871,
29896,
29953,
29900,
29900,
29900,
13,
3210,
2190,
29940,
6670,
29903,
353,
29871,
29896,
13,
22698,
29918,
2287,
29925,
4690,
353,
29871,
29896,
29953,
13,
12648,
29918,
1660,
9295,
353,
29871,
29896,
29900,
13,
16173,
29918,
1660,
9295,
353,
29871,
29900,
29889,
29947,
29945,
13,
13,
25832,
8127,
29911,
29918,
14829,
29918,
29907,
7597,
353,
376,
991,
597,
1272,
29889,
29872,
4599,
347,
29889,
29887,
5128,
29889,
1341,
29914,
24516,
487,
29914,
24713,
29914,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29914,
10382,
13401,
4830,
29922,
7638,
29987,
2230,
8028,
29922,
15654,
29914,
17104,
1915,
29987,
3893,
29922,
1341,
29987,
1509,
29918,
21134,
29918,
1454,
29918,
6672,
29922,
3009,
29987,
7638,
29918,
344,
17954,
16328,
29941,
29933,
29908,
13,
25832,
8127,
29911,
29918,
14829,
29918,
23498,
353,
518,
13,
1678,
4852,
29947,
29953,
29941,
29881,
29941,
29929,
29874,
29900,
29953,
29874,
29941,
29947,
29947,
29883,
29953,
29946,
29929,
29896,
29883,
29953,
600,
29906,
29888,
29953,
29946,
29945,
29900,
29890,
29896,
29945,
29896,
29888,
29941,
29947,
29888,
29896,
29890,
29945,
29955,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29900,
29896,
4968,
13,
1678,
4852,
29906,
29888,
29941,
29874,
29900,
29941,
29900,
29945,
7340,
29900,
29946,
29883,
29953,
29896,
29906,
29906,
29900,
1327,
29900,
29900,
29890,
29945,
29874,
29946,
29872,
29945,
29945,
29941,
29872,
29946,
29945,
29881,
1635,
29896,
29906,
29872,
29896,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29900,
29906,
4968,
13,
1678,
4852,
29945,
29872,
29945,
29945,
29872,
29929,
29888,
29896,
29888,
29947,
29946,
29946,
29900,
29929,
29955,
29941,
29946,
29929,
29896,
29947,
29947,
562,
29947,
29955,
29945,
29929,
29946,
29955,
29872,
29945,
29874,
29941,
29881,
29955,
1725,
29929,
29888,
29896,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29900,
29941,
4968,
13,
1678,
4852,
29947,
1635,
29945,
29946,
29947,
29946,
29906,
6854,
29900,
29955,
29929,
29946,
29947,
1113,
29945,
29929,
29896,
29945,
29872,
29906,
29955,
29874,
29947,
6448,
29945,
5444,
29945,
29896,
29941,
29929,
29883,
29900,
29953,
3660,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29900,
29946,
4968,
13,
1678,
4852,
29883,
29947,
29929,
29953,
29941,
29945,
29900,
29946,
29874,
328,
29883,
29900,
29896,
29945,
562,
29946,
29947,
29888,
29929,
2142,
29947,
29900,
29900,
29945,
29947,
29874,
29900,
1327,
29941,
29946,
29946,
29900,
29890,
29929,
29946,
29888,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29900,
29945,
4968,
13,
1678,
4852,
29881,
29929,
29945,
29872,
29906,
29906,
29945,
29872,
29929,
29900,
29947,
29953,
29906,
29896,
29881,
29947,
29941,
346,
29946,
29872,
29929,
29955,
29929,
29945,
11512,
29896,
29900,
29947,
29881,
29929,
29881,
29941,
29896,
29900,
29872,
29906,
29946,
29946,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29900,
29953,
4968,
13,
1678,
4852,
311,
29953,
287,
29929,
29883,
29906,
29890,
29900,
3905,
29947,
29900,
1113,
29947,
29955,
29929,
29874,
3660,
29947,
2291,
29955,
29929,
29906,
29941,
617,
29929,
29941,
29906,
29896,
29955,
29881,
29947,
29896,
29896,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29900,
29955,
4968,
13,
1678,
4852,
29906,
29941,
29946,
29906,
29947,
29941,
29883,
29946,
29955,
29881,
562,
29888,
2252,
29946,
29946,
29945,
29900,
29881,
29947,
29941,
29953,
29883,
29945,
29906,
29883,
29906,
29945,
29888,
29941,
29872,
29947,
29900,
29955,
13801,
29945,
29888,
29906,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29900,
29947,
4968,
13,
1678,
4852,
29946,
29872,
29953,
29890,
29953,
29955,
29874,
29953,
29947,
29947,
29953,
29941,
29929,
1327,
29955,
29906,
29888,
29947,
2252,
29947,
29896,
29955,
29947,
29906,
29872,
5363,
29953,
29900,
29946,
29874,
29947,
29881,
29941,
29906,
29874,
29953,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29900,
29929,
4968,
13,
1678,
4852,
29946,
29896,
29953,
29945,
29874,
29945,
29896,
29941,
29947,
29929,
29955,
29955,
29955,
29883,
29947,
2142,
29947,
29872,
29953,
29906,
29945,
29941,
29881,
29947,
29955,
6448,
562,
29890,
29947,
29955,
29955,
29872,
29947,
29890,
29941,
29890,
29900,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29896,
29900,
4968,
13,
1678,
4852,
29941,
29946,
29941,
29906,
29906,
29872,
29955,
29900,
29900,
29929,
29955,
29947,
29900,
29881,
29929,
29955,
1389,
29945,
6448,
29900,
29906,
1635,
29906,
29888,
29906,
29883,
29955,
29874,
29941,
29896,
29888,
29900,
29900,
2291,
600,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29896,
29896,
4968,
13,
1678,
4852,
29946,
29947,
29883,
29945,
915,
29941,
29890,
29906,
1113,
29929,
29881,
29953,
29896,
29900,
29947,
29881,
29945,
29906,
29945,
1388,
29953,
29874,
29900,
29941,
29872,
29929,
29896,
29881,
29929,
29941,
29874,
29929,
29945,
2585,
562,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29896,
29906,
4968,
13,
1678,
4852,
29947,
29955,
29945,
29955,
29941,
29896,
29955,
29906,
29888,
29945,
29900,
29953,
29874,
29896,
29947,
29929,
29883,
29906,
774,
29883,
29953,
29941,
29941,
29947,
29945,
29953,
1725,
29896,
29896,
29874,
29906,
29872,
29929,
2252,
29906,
29896,
29941,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29896,
29941,
4968,
13,
1678,
4852,
29953,
370,
29906,
29883,
29929,
29872,
29945,
29900,
29947,
29872,
29929,
29906,
29955,
29947,
29881,
29945,
29896,
29906,
29929,
29888,
29900,
29906,
29941,
29872,
29900,
29896,
29947,
29955,
29906,
29945,
29883,
29946,
29874,
29955,
29883,
29953,
29929,
29872,
29947,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29896,
29946,
4968,
13,
1678,
4852,
29946,
29888,
29947,
29946,
2176,
29947,
29941,
29896,
1389,
29946,
29953,
29881,
346,
29945,
29881,
29941,
370,
29941,
29872,
29906,
29896,
29947,
29896,
29955,
29953,
29947,
29955,
29874,
29906,
29881,
29947,
29883,
29896,
29906,
29881,
29900,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29896,
29945,
4968,
13,
1678,
4852,
29872,
29953,
29929,
1635,
29890,
29900,
29955,
29929,
29947,
29947,
29945,
29883,
29906,
29929,
29929,
10702,
29947,
29896,
29900,
29947,
29900,
1389,
29947,
29947,
29890,
29896,
29890,
29947,
29890,
29945,
29955,
29896,
29945,
29947,
7340,
29953,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29896,
29953,
4968,
13,
1678,
4852,
29945,
29888,
29955,
29953,
29946,
2291,
29955,
29947,
29947,
3905,
29906,
29955,
29941,
29929,
29947,
29896,
6854,
29906,
29896,
29896,
29890,
29906,
29946,
29906,
29883,
29906,
29929,
29890,
29946,
29929,
1113,
29906,
29906,
29883,
29945,
29872,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29896,
29955,
4968,
13,
1678,
4852,
29890,
29953,
7340,
29947,
29896,
29874,
29929,
29945,
29929,
29945,
29906,
29945,
29941,
29953,
29941,
29906,
29906,
29941,
29946,
29929,
29946,
29947,
29941,
29900,
29883,
29896,
29872,
29955,
29941,
29900,
29955,
29881,
29946,
29883,
29946,
2291,
29872,
29953,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29896,
29947,
4968,
13,
1678,
4852,
29929,
29896,
1289,
6854,
29946,
29941,
29883,
29955,
1635,
29896,
29896,
29941,
29874,
29953,
29888,
29906,
29945,
29906,
29947,
29890,
29947,
29945,
29955,
29883,
29955,
687,
29906,
29906,
29874,
29945,
29900,
29874,
29896,
29946,
29947,
29874,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29896,
29929,
4968,
13,
1678,
4852,
5444,
29896,
29890,
29906,
29929,
29906,
29955,
29941,
1289,
29955,
29955,
29890,
29929,
29874,
29955,
29946,
29929,
29946,
29929,
29947,
29941,
29874,
29906,
29888,
29929,
3660,
29945,
29906,
29953,
29945,
29946,
29890,
29929,
29941,
29896,
29881,
29955,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29906,
29900,
4968,
13,
1678,
4852,
29896,
29896,
29896,
29941,
29874,
1389,
29946,
29888,
29945,
29872,
29906,
915,
29906,
29888,
29955,
29888,
1635,
29906,
29881,
29945,
29946,
29890,
29953,
29883,
29955,
29896,
29900,
29883,
29896,
29883,
29900,
29872,
29955,
29896,
29941,
29945,
29888,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29906,
29896,
4968,
13,
1678,
4852,
346,
29953,
29946,
29906,
29900,
29881,
29945,
29881,
29900,
29890,
29953,
29890,
29945,
29896,
29941,
29945,
2291,
29945,
29945,
29929,
29888,
29947,
29941,
29872,
29896,
29874,
29947,
29906,
29881,
29946,
29881,
29953,
29896,
29945,
29883,
29946,
29955,
29900,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29906,
29906,
4968,
13,
1678,
4852,
29881,
29900,
29929,
29955,
29953,
287,
29906,
29929,
29906,
562,
29906,
29946,
29888,
6854,
29896,
29945,
29929,
29900,
29881,
29896,
11248,
29896,
29929,
29945,
29900,
29955,
29955,
29883,
29955,
29946,
29890,
29900,
29945,
29946,
29955,
29896,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29906,
29941,
4968,
13,
1678,
4852,
687,
29955,
29946,
29953,
2252,
29953,
2142,
29900,
29953,
29953,
29888,
29953,
29906,
29881,
29929,
1635,
29947,
29881,
29941,
29890,
29906,
29888,
29947,
29929,
29896,
29955,
29946,
29955,
29947,
29941,
600,
29946,
29872,
29941,
29883,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29906,
29946,
4968,
13,
1678,
4852,
29945,
29955,
29900,
29881,
29929,
29872,
29896,
29872,
29947,
29946,
29896,
29955,
29947,
29872,
29941,
29906,
11512,
29947,
29953,
29955,
29896,
29955,
29896,
29881,
29946,
29890,
29941,
7340,
687,
1388,
29896,
11512,
29946,
14943,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29906,
29945,
4968,
13,
1678,
4852,
29883,
29906,
29929,
26854,
29955,
29946,
29953,
29955,
29874,
29955,
29945,
29890,
29906,
1113,
29872,
29941,
29881,
29955,
29888,
29906,
29872,
29929,
29888,
1327,
29890,
29906,
370,
29906,
29955,
29953,
10702,
29947,
562,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29906,
29953,
4968,
13,
1678,
4852,
29900,
29947,
29946,
29900,
29953,
29874,
29945,
29896,
29896,
29946,
29953,
29881,
29947,
29947,
29872,
29906,
29900,
29947,
29955,
29900,
29946,
346,
29900,
29945,
29947,
29883,
29900,
29953,
29900,
29874,
29896,
29872,
29946,
29946,
1389,
29874,
29945,
29900,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29906,
29955,
4968,
13,
1678,
4852,
29896,
29929,
29929,
29874,
20483,
29955,
29941,
29941,
29874,
29955,
29947,
11248,
29896,
29872,
29955,
29881,
29946,
29955,
1753,
29929,
29883,
29955,
29896,
29883,
29953,
11512,
29945,
29955,
29929,
29945,
29872,
29900,
29906,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29906,
29947,
4968,
13,
1678,
4852,
2585,
29947,
29945,
29953,
29874,
29900,
29953,
29947,
29888,
29929,
29906,
14943,
29946,
29888,
29900,
29896,
29888,
29946,
29896,
29900,
1327,
29874,
29946,
29906,
29883,
29955,
29906,
29955,
29896,
311,
29900,
29888,
29906,
29941,
29896,
29874,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29906,
29929,
4968,
13,
1678,
4852,
29872,
29941,
29883,
29900,
29896,
29941,
29945,
29888,
29896,
29953,
29883,
29953,
29883,
29929,
29881,
29906,
29945,
29874,
29900,
29929,
29881,
10702,
29946,
29888,
29929,
29929,
29874,
29953,
29947,
29945,
29946,
29941,
29947,
29874,
29947,
29946,
29955,
29946,
29900,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29941,
29900,
4968,
13,
1678,
4852,
29872,
29945,
29896,
29890,
29947,
1327,
29929,
29883,
29900,
3660,
29946,
29941,
29941,
29929,
29888,
29929,
29947,
29890,
29946,
29888,
29906,
29896,
29872,
29953,
29881,
29906,
29929,
29890,
29947,
29906,
29945,
29896,
29900,
29929,
29888,
29900,
562,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29941,
29896,
4968,
13,
1678,
4852,
915,
29945,
29872,
29947,
29900,
10702,
29883,
29946,
29929,
29890,
29945,
29929,
29890,
29941,
29896,
3660,
29941,
29941,
29883,
29941,
29900,
29945,
29955,
29953,
1389,
29900,
29872,
29896,
29874,
29896,
29953,
29906,
29881,
29947,
29946,
29872,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29941,
29906,
4968,
13,
1678,
4852,
29945,
29900,
29896,
2176,
29945,
29947,
29872,
29941,
600,
29945,
29945,
29888,
6854,
29881,
29955,
29945,
29890,
29929,
29941,
29881,
370,
29945,
29955,
29945,
29953,
29953,
13891,
29945,
29941,
29953,
29929,
29946,
29947,
29890,
29947,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29941,
29941,
4968,
13,
1678,
4852,
29896,
29874,
29896,
29896,
29946,
29947,
29955,
29945,
29947,
29896,
29896,
29874,
29947,
2252,
10702,
29947,
29881,
29947,
29945,
29874,
29929,
29888,
29953,
29881,
915,
29872,
29955,
29947,
915,
29941,
29872,
29900,
29945,
29896,
29941,
29896,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29941,
29946,
4968,
13,
1678,
4852,
29946,
29953,
29945,
29881,
29947,
29906,
29946,
29872,
29955,
3905,
29946,
29953,
29946,
29946,
29947,
29941,
29953,
29929,
29896,
29947,
29906,
29883,
29900,
29883,
29906,
29947,
29953,
29946,
29953,
29881,
29896,
29945,
29945,
29874,
29906,
29906,
29946,
29929,
29890,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29941,
29945,
4968,
13,
1678,
4852,
29941,
29955,
29888,
29941,
29946,
29896,
29890,
29896,
29890,
29906,
29953,
29953,
29881,
29896,
29946,
29941,
774,
29955,
29941,
29896,
29941,
29947,
29883,
29941,
29896,
29883,
18725,
29941,
29906,
29900,
29896,
29890,
29929,
29881,
29953,
29896,
29929,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29941,
29953,
4968,
13,
1678,
4852,
29929,
29872,
29955,
29881,
29947,
29906,
29945,
29945,
29929,
29947,
29955,
29874,
29947,
29874,
29955,
29955,
29874,
29929,
29900,
29872,
29900,
29881,
29946,
29890,
29945,
29945,
29883,
29947,
11512,
29941,
29947,
29890,
29929,
14943,
29945,
29953,
29929,
29946,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29941,
29955,
4968,
13,
1678,
4852,
29945,
29946,
29947,
29947,
29953,
29955,
29945,
29945,
29953,
29941,
29900,
10702,
29900,
29947,
29900,
29874,
29945,
29941,
29900,
29929,
29947,
10702,
29896,
29890,
29953,
29883,
29929,
29945,
29896,
29883,
29953,
29955,
29896,
29946,
29874,
29896,
29946,
29941,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29941,
29947,
4968,
13,
1678,
4852,
29946,
29890,
29955,
29883,
1327,
29900,
29896,
29945,
29946,
29953,
29929,
29955,
915,
29955,
29929,
29945,
29900,
29941,
29946,
29888,
29955,
29874,
29946,
29929,
29955,
29896,
29906,
29872,
29947,
29947,
29906,
29874,
29929,
29955,
29896,
29929,
29955,
29874,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29941,
29929,
4968,
13,
1678,
4852,
29883,
29947,
29872,
29896,
29872,
29945,
29953,
29945,
29874,
29900,
29872,
29955,
29874,
29896,
29888,
29953,
600,
29896,
29881,
1635,
346,
1725,
29953,
29955,
29955,
7340,
29955,
29946,
29874,
29946,
29896,
29881,
29906,
29888,
29906,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
29889,
29900,
29946,
29900,
4968,
13,
29962,
13,
13,
1753,
903,
10382,
29918,
392,
29918,
1457,
5014,
29918,
1272,
29898,
7638,
29918,
2271,
29892,
3646,
29918,
3972,
1125,
13,
1678,
8783,
29918,
29879,
2863,
353,
2897,
29889,
2084,
29889,
7122,
29898,
5182,
29918,
3972,
29892,
376,
3286,
699,
1980,
9165,
29918,
18494,
3580,
29941,
29918,
2303,
15860,
29918,
4174,
13427,
29943,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
613,
376,
1272,
29889,
3945,
1159,
13,
1678,
565,
2897,
29889,
2084,
29889,
9933,
29898,
24713,
29918,
29879,
2863,
1125,
13,
4706,
736,
8783,
29918,
29879,
2863,
13,
13,
1678,
396,
341,
5086,
2224,
8380,
13,
1678,
3646,
29918,
3972,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
5182,
29918,
3972,
29897,
13,
1678,
11799,
29918,
999,
353,
7274,
29889,
657,
29898,
7638,
29918,
2271,
467,
726,
29889,
5451,
28909,
29878,
29905,
29876,
29861,
29896,
13018,
29896,
29962,
13,
1678,
363,
760,
297,
11799,
29918,
999,
29901,
13,
4706,
760,
29918,
9507,
353,
7274,
29889,
2813,
29898,
1595,
467,
13662,
29889,
657,
703,
3916,
29899,
4205,
3283,
2564,
5451,
703,
376,
9601,
29896,
1822,
5451,
703,
543,
9601,
29896,
1822,
6506,
877,
29908,
742,
20569,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5182,
29918,
3972,
29892,
760,
29918,
9507,
22164,
13,
9651,
760,
29918,
2084,
353,
5505,
29918,
10382,
29898,
1595,
29918,
9507,
29892,
3646,
29918,
3972,
29892,
760,
29897,
13,
13,
1678,
822,
903,
3752,
29918,
17051,
29896,
29898,
29888,
978,
1125,
13,
4706,
269,
353,
6608,
1982,
29889,
17051,
29896,
580,
13,
4706,
6835,
29918,
2311,
353,
29871,
29953,
29945,
29945,
29941,
29953,
13,
4706,
411,
1722,
29898,
29888,
978,
29892,
376,
6050,
1159,
408,
285,
29901,
13,
9651,
1550,
5852,
29901,
13,
18884,
848,
353,
285,
29889,
949,
29898,
9040,
29918,
2311,
29897,
13,
18884,
565,
451,
848,
29901,
13,
462,
1678,
2867,
13,
18884,
269,
29889,
5504,
29898,
1272,
29897,
13,
4706,
736,
269,
29889,
20970,
7501,
342,
580,
13,
13,
1678,
363,
313,
17051,
29896,
29892,
10422,
29897,
297,
27640,
8127,
29911,
29918,
14829,
29918,
23498,
29901,
13,
4706,
1596,
703,
5596,
292,
6571,
317,
15715,
29896,
29901,
1642,
4830,
29898,
9507,
876,
13,
4706,
274,
2083,
353,
903,
3752,
29918,
17051,
29896,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5182,
29918,
3972,
29892,
10422,
876,
13,
4706,
565,
274,
2083,
1275,
528,
29874,
29896,
29901,
13,
9651,
1596,
14182,
29873,
29912,
6177,
9280,
6571,
1642,
4830,
29898,
9507,
29892,
528,
29874,
29896,
876,
13,
4706,
1683,
29901,
13,
9651,
1596,
14182,
29873,
29912,
6177,
14431,
29901,
3806,
24335,
15712,
6571,
1642,
4830,
29898,
9507,
29892,
528,
29874,
29896,
29892,
274,
2083,
876,
13,
4706,
4974,
274,
2083,
1275,
528,
29874,
29896,
13,
13,
1678,
396,
11790,
17658,
6597,
848,
13,
1678,
903,
26026,
29918,
21111,
29898,
5182,
29918,
3972,
29892,
376,
3286,
699,
1980,
9165,
29918,
18494,
3580,
29941,
29918,
2303,
15860,
29918,
4174,
13427,
29943,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
613,
376,
3286,
699,
1980,
3134,
29918,
28863,
21744,
29941,
29918,
1004,
1341,
29918,
617,
3358,
29888,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29918,
29906,
29889,
7554,
613,
376,
3286,
699,
1980,
9165,
29918,
18494,
3580,
29941,
29918,
2303,
15860,
29918,
4174,
13427,
29943,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
29889,
7554,
1159,
13,
13,
1678,
396,
7138,
346,
2752,
1426,
363,
4805,
428,
847,
11301,
13,
1678,
736,
903,
26026,
29918,
3258,
29918,
29879,
2863,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5182,
29918,
3972,
29892,
376,
3286,
699,
1980,
9165,
29918,
18494,
3580,
29941,
29918,
2303,
15860,
29918,
4174,
13427,
29943,
29918,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29906,
29900,
5783,
13,
13,
1753,
903,
26026,
29918,
21111,
29898,
5182,
29918,
3972,
29892,
23892,
29918,
1272,
29892,
18871,
29892,
2186,
1125,
13,
1678,
396,
960,
3646,
29918,
3972,
29914,
21111,
287,
29918,
1272,
947,
451,
1863,
29892,
6597,
18871,
297,
3646,
29918,
3972,
13,
1678,
23892,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
5182,
29918,
3972,
29892,
23892,
29918,
1272,
29897,
13,
1678,
18871,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
5182,
29918,
3972,
29892,
18871,
29897,
13,
1678,
2186,
29918,
10867,
353,
2897,
29889,
2084,
29889,
7122,
29898,
21111,
287,
29918,
2084,
29892,
2186,
29897,
13,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
21111,
287,
29918,
2084,
1125,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
10867,
29918,
2084,
1125,
13,
9651,
1596,
877,
3782,
18871,
11860,
29879,
29908,
448,
5214,
2023,
29915,
1273,
18871,
29918,
2084,
29897,
13,
9651,
599,
29918,
7554,
29918,
20895,
353,
13149,
29898,
10867,
29918,
2084,
718,
376,
5575,
1159,
13,
9651,
599,
29918,
7554,
29918,
20895,
29889,
6605,
580,
13,
9651,
9920,
1220,
353,
376,
4117,
6571,
1405,
6571,
1642,
4830,
703,
11393,
7122,
29898,
497,
29918,
7554,
29918,
20895,
511,
18871,
29918,
2084,
29897,
13,
9651,
1596,
877,
8893,
292,
411,
11860,
29879,
29908,
29915,
1273,
9920,
1220,
29897,
13,
9651,
1014,
5014,
29889,
3198,
29918,
4804,
29898,
9006,
1220,
29892,
6473,
29922,
5574,
29892,
274,
9970,
29922,
5182,
29918,
3972,
29897,
13,
9651,
4974,
2897,
29889,
2084,
29889,
9933,
29898,
10867,
29918,
2084,
29897,
13,
13,
4706,
1596,
877,
3782,
3884,
11860,
29879,
29908,
448,
6597,
292,
18871,
1273,
29879,
2023,
29915,
1273,
313,
21111,
287,
29918,
2084,
29892,
18871,
29918,
2084,
876,
13,
4706,
411,
14319,
1445,
29889,
26264,
2283,
29898,
10867,
29918,
2084,
29897,
408,
14319,
29918,
29888,
29901,
13,
9651,
14319,
29918,
29888,
29889,
21111,
497,
29898,
21111,
287,
29918,
2084,
29897,
13,
13,
4706,
411,
14319,
1445,
29889,
26264,
2283,
29898,
8394,
29918,
10867,
29897,
408,
14319,
29918,
29888,
29901,
13,
9651,
14319,
29918,
29888,
29889,
21111,
497,
29898,
5182,
29918,
3972,
29897,
13,
1678,
1683,
29901,
13,
4706,
1596,
877,
9692,
3884,
11860,
29879,
29908,
448,
451,
6597,
292,
372,
515,
18871,
6169,
1273,
23892,
29918,
2084,
29897,
13,
13,
1753,
903,
26026,
29918,
3258,
29918,
29879,
2863,
29898,
3972,
1125,
13,
1678,
8783,
29918,
29879,
2863,
353,
2897,
29889,
2084,
29889,
7122,
29898,
3972,
29892,
376,
1272,
29889,
3945,
1159,
13,
1678,
16379,
29941,
353,
13149,
29898,
359,
29889,
2084,
29889,
7122,
29898,
3972,
29892,
376,
1068,
613,
376,
10521,
1526,
29941,
5783,
13,
1678,
6560,
353,
13149,
29898,
359,
29889,
2084,
29889,
7122,
29898,
3972,
29892,
376,
1068,
613,
376,
10521,
3134,
5783,
13,
13,
1678,
16379,
29941,
29918,
9165,
29918,
4421,
2361,
353,
5159,
13,
1678,
16379,
29941,
29918,
9165,
29918,
12881,
353,
6571,
13,
13,
1678,
363,
285,
29918,
1526,
29941,
297,
16379,
29941,
29901,
13,
4706,
363,
285,
29918,
3134,
297,
6560,
29901,
13,
9651,
289,
29918,
1526,
29941,
353,
2897,
29889,
2084,
29889,
23579,
568,
486,
29898,
359,
29889,
2084,
29889,
6500,
3871,
29898,
29888,
29918,
1526,
29941,
876,
29961,
29900,
29962,
13,
9651,
289,
29918,
3134,
353,
2897,
29889,
2084,
29889,
23579,
568,
486,
29898,
359,
29889,
2084,
29889,
6500,
3871,
29898,
29888,
29918,
3134,
876,
29961,
29900,
29962,
13,
9651,
263,
29918,
1526,
29941,
353,
289,
29918,
1526,
29941,
29889,
5451,
877,
29918,
1495,
13,
9651,
263,
29918,
3134,
353,
289,
29918,
3134,
29889,
5451,
877,
29918,
1495,
13,
9651,
8158,
353,
29871,
29900,
13,
9651,
2635,
29918,
1526,
29941,
353,
263,
29918,
1526,
29941,
29961,
29900,
29962,
13,
9651,
2635,
29918,
3134,
353,
263,
29918,
3134,
29961,
29900,
29962,
13,
13,
9651,
565,
2635,
29918,
1526,
29941,
2804,
2635,
29918,
3134,
29901,
13,
18884,
6773,
13,
13,
9651,
363,
474,
297,
3464,
29898,
1195,
29898,
2435,
29898,
29874,
29918,
1526,
29941,
511,
7431,
29898,
29874,
29918,
3134,
876,
1125,
13,
18884,
565,
313,
29874,
29918,
1526,
29941,
29961,
29875,
29962,
1275,
263,
29918,
3134,
29961,
29875,
29962,
1125,
13,
462,
1678,
8158,
4619,
29871,
29896,
13,
13,
9651,
565,
8158,
6736,
29871,
29896,
29901,
13,
18884,
16379,
29941,
29918,
9165,
29918,
4421,
2361,
29889,
4397,
3552,
29888,
29918,
1526,
29941,
29892,
285,
29918,
3134,
29892,
8158,
876,
13,
13,
1678,
396,
2656,
491,
8158,
13,
1678,
16379,
29941,
29918,
9165,
29918,
4421,
2361,
29889,
6605,
29898,
1989,
29922,
2892,
921,
29901,
921,
29961,
29906,
1402,
11837,
29922,
5574,
29897,
13,
1678,
363,
269,
29918,
1526,
29941,
29892,
269,
29918,
3134,
29892,
8158,
297,
16379,
29941,
29918,
9165,
29918,
4421,
2361,
29901,
13,
4706,
396,
2158,
29898,
29879,
29918,
1526,
29941,
29892,
269,
29918,
3134,
29892,
8158,
29897,
13,
4706,
565,
8158,
451,
297,
16379,
29941,
29918,
9165,
29918,
12881,
29901,
13,
9651,
16379,
29941,
29918,
9165,
29918,
12881,
29961,
13628,
29962,
353,
6571,
13,
13,
4706,
565,
269,
29918,
1526,
29941,
451,
297,
16379,
29941,
29918,
9165,
29918,
12881,
29961,
13628,
5387,
13,
9651,
1018,
29901,
13,
18884,
16379,
29941,
29889,
2248,
29898,
29879,
29918,
1526,
29941,
29897,
13,
18884,
16379,
29941,
29889,
5992,
29898,
29879,
29918,
1526,
29941,
29897,
13,
18884,
16379,
29941,
29918,
9165,
29918,
12881,
29961,
13628,
3816,
29879,
29918,
1526,
29941,
29962,
353,
269,
29918,
3134,
13,
9651,
5174,
7865,
2392,
408,
429,
29901,
13,
18884,
1209,
13,
4706,
1683,
29901,
13,
9651,
1596,
703,
4150,
29901,
613,
16379,
29941,
29918,
9165,
29918,
12881,
29961,
13628,
3816,
29879,
29918,
1526,
29941,
1402,
269,
29918,
3134,
29892,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
13,
1678,
411,
1722,
29898,
24713,
29918,
29879,
2863,
29892,
376,
29893,
1159,
408,
18031,
29901,
13,
4706,
363,
8158,
297,
16379,
29941,
29918,
9165,
29918,
12881,
29901,
13,
9651,
363,
22326,
29941,
297,
16379,
29941,
29918,
9165,
29918,
12881,
29961,
13628,
5387,
13,
18884,
4903,
353,
16379,
29941,
29918,
9165,
29918,
12881,
29961,
13628,
3816,
1526,
29941,
29962,
13,
18884,
565,
2897,
29889,
2084,
29889,
657,
2311,
29898,
1526,
29941,
29897,
1405,
29871,
29900,
322,
2897,
29889,
2084,
29889,
657,
2311,
29898,
3134,
29897,
1405,
29871,
29900,
29901,
13,
462,
1678,
22326,
29941,
353,
2897,
29889,
2084,
29889,
2674,
2084,
29898,
1526,
29941,
29892,
4516,
29897,
13,
462,
1678,
4903,
353,
2897,
29889,
2084,
29889,
2674,
2084,
29898,
3134,
29892,
4516,
29897,
13,
462,
1678,
18031,
29889,
3539,
877,
29912,
29087,
1118,
25641,
29900,
29889,
29906,
29872,
1012,
29876,
4286,
4830,
29898,
3134,
29892,
22326,
29941,
29892,
29871,
29906,
29889,
29945,
29872,
29899,
29946,
876,
13,
18884,
1683,
29901,
13,
462,
1678,
1596,
703,
8915,
934,
6571,
470,
6571,
1642,
4830,
29898,
1526,
29941,
29892,
4903,
511,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
13,
1678,
1596,
703,
18552,
292,
6560,
11000,
29901,
613,
16379,
29941,
29892,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
1678,
736,
8783,
29918,
29879,
2863,
13,
13,
1753,
5505,
29918,
8945,
675,
29918,
1454,
29918,
7501,
1169,
29898,
1643,
1125,
13,
1678,
396,
937,
29892,
1018,
304,
12439,
3694,
763,
376,
29945,
29900,
29871,
29900,
29900,
29900,
613,
376,
29906,
29953,
29900,
29871,
29900,
29900,
29900,
29908,
13,
1678,
565,
376,
376,
297,
3858,
29901,
13,
4706,
565,
738,
29898,
29879,
29889,
275,
26204,
580,
363,
269,
297,
3858,
1125,
13,
9651,
17202,
353,
337,
29889,
12198,
29898,
29878,
29908,
1194,
29881,
29912,
29896,
29892,
29941,
2119,
29973,
3583,
29879,
17710,
29881,
29912,
29941,
1800,
29930,
10780,
29901,
2053,
29881,
29974,
6877,
25760,
13,
9651,
5505,
29918,
386,
681,
4167,
353,
17202,
29889,
2886,
497,
29898,
1643,
29897,
13,
9651,
565,
7431,
29898,
26026,
29918,
386,
681,
4167,
29897,
1405,
29871,
29900,
29901,
13,
18884,
1550,
5852,
29901,
13,
462,
1678,
313,
1643,
29892,
364,
29897,
353,
337,
29889,
1491,
29876,
29898,
29878,
29908,
1194,
29881,
2144,
29879,
1194,
29881,
29912,
29941,
1800,
613,
376,
1966,
29896,
1966,
29906,
613,
3858,
29897,
13,
462,
1678,
565,
364,
1275,
29871,
29900,
29901,
13,
462,
4706,
2867,
13,
13,
1678,
396,
445,
1795,
367,
263,
931,
470,
14385,
297,
278,
883,
376,
25446,
29901,
4317,
29908,
470,
376,
25446,
29901,
4317,
29901,
893,
29908,
13,
1678,
565,
376,
6160,
297,
3858,
29901,
13,
4706,
363,
269,
297,
3858,
29889,
5451,
703,
376,
1125,
13,
9651,
565,
738,
29898,
29875,
29889,
275,
26204,
580,
363,
474,
297,
269,
1125,
13,
18884,
2635,
29918,
272,
29918,
2230,
353,
337,
29889,
12198,
29898,
29878,
29908,
1194,
29881,
29912,
29896,
29892,
29906,
29913,
1125,
1194,
29881,
29912,
29906,
29913,
1125,
29973,
1194,
29881,
29912,
29906,
1800,
29973,
1159,
13,
18884,
5505,
29918,
1256,
29918,
272,
29918,
2230,
353,
2635,
29918,
272,
29918,
2230,
29889,
2886,
497,
29898,
29879,
29897,
13,
18884,
565,
7431,
29898,
26026,
29918,
1256,
29918,
272,
29918,
2230,
29897,
1405,
29871,
29900,
29901,
13,
462,
1678,
5505,
29918,
29882,
2470,
259,
353,
5505,
29918,
1256,
29918,
272,
29918,
2230,
29961,
29900,
3816,
29900,
29962,
13,
462,
1678,
5505,
29918,
1195,
2667,
353,
5505,
29918,
1256,
29918,
272,
29918,
2230,
29961,
29900,
3816,
29896,
29962,
13,
462,
1678,
5505,
29918,
23128,
353,
5505,
29918,
1256,
29918,
272,
29918,
2230,
29961,
29900,
3816,
29906,
29962,
13,
462,
1678,
565,
7431,
29898,
26026,
29918,
23128,
29897,
1405,
29871,
29900,
29901,
13,
462,
4706,
3858,
353,
3858,
29889,
6506,
703,
29912,
6177,
29912,
6177,
8875,
1642,
4830,
29898,
26026,
29918,
29882,
2470,
29892,
5505,
29918,
1195,
2667,
29892,
5505,
29918,
23128,
511,
376,
8875,
26893,
6571,
6233,
634,
6571,
1473,
267,
1642,
4830,
29898,
26026,
29918,
29882,
2470,
29892,
5505,
29918,
1195,
2667,
29892,
5505,
29918,
23128,
876,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
3858,
353,
3858,
29889,
6506,
703,
29912,
6177,
8875,
1642,
4830,
29898,
26026,
29918,
29882,
2470,
29892,
5505,
29918,
1195,
2667,
511,
376,
8875,
26893,
634,
6571,
6233,
1642,
4830,
29898,
26026,
29918,
29882,
2470,
29892,
5505,
29918,
1195,
2667,
876,
13,
13,
1678,
716,
29918,
1643,
353,
5159,
13,
1678,
396,
282,
2904,
524,
29901,
11262,
29922,
517,
29877,
29899,
13011,
29899,
27420,
29899,
1271,
29879,
13,
1678,
363,
269,
297,
3858,
29889,
5451,
703,
376,
1125,
13,
4706,
565,
738,
29898,
29875,
29889,
275,
26204,
580,
363,
474,
297,
269,
1125,
13,
9651,
269,
353,
269,
29889,
6506,
28165,
613,
11393,
1159,
396,
954,
29906,
9303,
6858,
376,
1213,
363,
5685,
1446,
13,
9651,
269,
353,
269,
29889,
6506,
703,
5931,
613,
20569,
29871,
396,
5941,
777,
848,
29892,
954,
29906,
9303,
723,
3060,
446,
373,
29871,
29896,
29929,
29945,
29929,
29908,
13,
13,
9651,
1833,
29918,
29883,
353,
269,
14352,
29896,
29962,
13,
9651,
565,
451,
1833,
29918,
29883,
29889,
275,
26204,
7295,
396,
954,
29906,
9303,
674,
3060,
446,
373,
376,
29900,
29889,
29953,
19602,
376,
29906,
29946,
1577,
29908,
13,
18884,
269,
353,
269,
7503,
29899,
29896,
29962,
13,
13,
9651,
565,
738,
29898,
29875,
29889,
275,
2312,
580,
363,
474,
297,
269,
1125,
396,
1105,
591,
505,
738,
29898,
275,
26204,
3101,
3579,
392,
1068,
738,
29898,
29879,
616,
2026,
511,
763,
376,
29941,
29928,
29908,
13,
18884,
17534,
353,
5159,
13,
18884,
363,
274,
297,
269,
29901,
13,
462,
1678,
302,
29883,
353,
274,
13,
462,
1678,
565,
274,
29889,
275,
26204,
7295,
396,
3588,
376,
29941,
29908,
304,
376,
29873,
307,
275,
29899,
29908,
13,
462,
4706,
1018,
29901,
13,
462,
9651,
302,
29883,
353,
954,
29906,
9303,
29898,
29883,
29892,
6361,
543,
1341,
1159,
718,
11663,
29908,
13,
462,
4706,
5174,
13677,
29889,
13919,
10925,
408,
429,
29901,
13,
462,
9651,
1596,
703,
7099,
3039,
29889,
13919,
10925,
29901,
525,
8875,
29915,
1642,
4830,
29898,
29879,
876,
13,
462,
9651,
12020,
429,
13,
462,
1678,
17534,
29889,
4397,
29898,
17608,
29897,
13,
18884,
269,
353,
376,
1642,
7122,
29898,
29879,
29897,
13,
9651,
1683,
29901,
13,
18884,
1018,
29901,
13,
462,
1678,
269,
353,
954,
29906,
9303,
29898,
29879,
29892,
6361,
543,
1341,
1159,
13,
18884,
5174,
13677,
29889,
13919,
10925,
408,
429,
29901,
13,
462,
1678,
1596,
703,
7099,
3039,
29889,
13919,
10925,
29901,
525,
8875,
29915,
1642,
4830,
29898,
29879,
876,
13,
462,
1678,
12020,
429,
13,
4706,
716,
29918,
1643,
29889,
4397,
29898,
29879,
29897,
13,
1678,
736,
376,
11393,
7122,
29898,
1482,
29918,
1643,
29897,
13,
13,
1753,
5505,
29918,
8945,
675,
29918,
1454,
29918,
5965,
455,
1338,
29918,
305,
1503,
29898,
1643,
1125,
13,
1678,
3858,
353,
3858,
29889,
6506,
11702,
613,
376,
29886,
473,
29883,
1237,
1159,
13,
1678,
3858,
353,
3858,
29889,
6506,
11974,
613,
9162,
16521,
396,
5941,
18747,
763,
29871,
29906,
29900,
29896,
29929,
29914,
29906,
29900,
29906,
29906,
304,
376,
29906,
29900,
29896,
29929,
29871,
29906,
29900,
29906,
29906,
29908,
13,
1678,
3858,
353,
3858,
29889,
6506,
703,
29899,
613,
9162,
16521,
396,
5941,
18747,
763,
29871,
29955,
29900,
29899,
29947,
29900,
304,
376,
29955,
29900,
29871,
29947,
29900,
29908,
13,
1678,
3858,
353,
3858,
29889,
6506,
703,
29974,
613,
376,
2298,
16521,
396,
5941,
718,
322,
1207,
372,
7726,
519,
13,
1678,
3858,
353,
3858,
29889,
6506,
703,
30181,
613,
376,
11878,
1883,
16521,
396,
5941,
27889,
5829,
322,
1207,
372,
7726,
519,
13,
1678,
3858,
353,
3858,
29889,
6506,
703,
1696,
9162,
9162,
16521,
396,
5941,
777,
8515,
376,
29946,
29889,
29900,
1696,
376,
313,
29906,
29900,
29896,
29947,
29896,
29900,
29896,
29955,
29918,
797,
13715,
362,
29889,
3134,
29897,
13,
1678,
3858,
353,
3858,
29889,
6506,
703,
30073,
613,
376,
316,
20792,
16521,
396,
5941,
777,
8515,
376,
30073,
29945,
29908,
313,
29906,
29900,
29896,
29947,
29896,
29906,
29896,
29900,
29918,
29923,
29873,
1446,
5631,
2993,
29899,
29896,
29900,
29900,
29900,
29918,
10745,
29918,
29955,
29945,
29900,
29918,
870,
29889,
3134,
29897,
13,
1678,
3858,
353,
3858,
29889,
6506,
703,
856,
613,
11393,
1159,
396,
3349,
22434,
567,
275,
13,
1678,
3858,
353,
3858,
29889,
6506,
703,
636,
613,
11393,
1159,
396,
3349,
9391,
22434,
567,
275,
13,
1678,
3858,
353,
3858,
29889,
6506,
703,
29885,
30088,
613,
376,
29885,
30000,
2484,
29899,
29883,
2749,
743,
1159,
396,
29871,
29906,
29900,
29896,
29945,
29900,
29953,
29896,
29953,
29918,
3206,
29875,
29918,
29907,
23442,
29918,
29941,
29918,
29893,
29324,
29918,
29900,
29918,
10745,
29918,
24669,
7241,
29889,
3134,
13,
1678,
3858,
353,
3858,
29889,
6506,
703,
29961,
355,
29962,
613,
20569,
396,
9391,
4055,
297,
29871,
29906,
29900,
29896,
29945,
29900,
29896,
29906,
29941,
29918,
5292,
276,
2034,
575,
29918,
29911,
690,
272,
29918,
16903,
29924,
29918,
29893,
29324,
29918,
29900,
29918,
10745,
29918,
24669,
7241,
29889,
3134,
13,
1678,
3858,
353,
3858,
29889,
6506,
29898,
29884,
12764,
29916,
29933,
29947,
29883,
742,
376,
29871,
30019,
1159,
396,
8515,
29289,
2911,
297,
29871,
29906,
29900,
29896,
29945,
29900,
29946,
29896,
29955,
29918,
11816,
331,
567,
29918,
29923,
4599,
347,
29918,
29906,
29918,
29893,
29324,
29918,
29900,
29918,
10745,
29918,
24669,
7241,
29889,
3134,
13,
1678,
3858,
353,
3858,
29889,
6506,
703,
29907,
29900,
30088,
613,
376,
3217,
29871,
29906,
1159,
396,
29871,
29906,
29900,
29896,
29906,
29896,
29900,
29896,
29953,
29918,
29903,
29891,
1356,
29872,
29918,
29879,
1647,
29918,
9708,
347,
29918,
29893,
29324,
29918,
29900,
29918,
10745,
29918,
24669,
7241,
29889,
3134,
13,
1678,
736,
3858,
13,
13,
1753,
5505,
29918,
8945,
675,
29918,
1454,
29918,
574,
506,
12903,
29898,
1643,
1125,
13,
1678,
3858,
353,
3858,
29889,
6506,
703,
29933,
29906,
29933,
613,
376,
29933,
304,
350,
1159,
13,
1678,
3858,
353,
3858,
29889,
6506,
703,
29933,
29906,
29907,
613,
376,
29933,
304,
315,
1159,
13,
1678,
3858,
353,
3858,
29889,
6506,
14822,
613,
376,
5349,
400,
351,
16521,
13,
1678,
3858,
353,
3858,
29889,
6506,
703,
24695,
376,
271,
16521,
13,
1678,
736,
3858,
13,
13,
1753,
5505,
29918,
8945,
675,
29898,
1643,
1125,
13,
1678,
3858,
353,
5505,
29918,
8945,
675,
29918,
1454,
29918,
5965,
455,
1338,
29918,
305,
1503,
29898,
1643,
29897,
13,
1678,
3858,
353,
5505,
29918,
8945,
675,
29918,
1454,
29918,
574,
506,
12903,
29898,
1643,
29897,
13,
1678,
3858,
353,
5505,
29918,
8945,
675,
29918,
1454,
29918,
7501,
1169,
29898,
1643,
29897,
13,
1678,
736,
3858,
13,
13,
1753,
697,
29918,
11249,
29898,
11249,
1125,
13,
1678,
934,
29918,
2311,
353,
448,
29896,
13,
1678,
16608,
353,
29871,
29900,
13,
13,
1678,
10348,
29918,
4993,
353,
4559,
29961,
29900,
29962,
13,
1678,
3646,
29918,
3972,
353,
4559,
29961,
29896,
29962,
13,
1678,
8783,
29918,
6500,
3871,
353,
4559,
29961,
29906,
29962,
13,
13,
1678,
1369,
29918,
2230,
353,
4559,
29961,
29941,
29962,
13,
1678,
14385,
353,
4559,
29961,
29946,
29962,
13,
1678,
3858,
353,
3858,
29918,
4572,
29918,
7692,
29898,
11249,
29961,
29945,
2314,
13,
1678,
4559,
29918,
333,
353,
4559,
29961,
29953,
29962,
13,
13,
1678,
903,
29893,
485,
29918,
9507,
353,
2897,
29889,
2084,
29889,
6500,
3871,
29898,
18494,
29918,
4993,
29889,
6506,
17350,
29893,
485,
613,
376,
648,
29901,
29900,
29953,
1836,
29893,
485,
1642,
4830,
29898,
11249,
29918,
333,
4961,
13,
1678,
281,
485,
29918,
8159,
978,
353,
2897,
29889,
2084,
29889,
7122,
29898,
5182,
29918,
3972,
29892,
8783,
29918,
6500,
3871,
29892,
903,
29893,
485,
29918,
9507,
29897,
13,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
29893,
485,
29918,
8159,
978,
1125,
13,
4706,
1014,
5014,
29889,
3198,
29918,
4905,
29898,
3366,
600,
20856,
613,
11663,
29875,
613,
10348,
29918,
4993,
29892,
11663,
893,
613,
851,
29898,
2962,
29918,
2230,
511,
11663,
29873,
613,
851,
29898,
19708,
511,
11663,
29883,
613,
376,
8552,
613,
281,
485,
29918,
8159,
978,
1402,
3659,
262,
29922,
1491,
5014,
29889,
2287,
29963,
10074,
29892,
380,
20405,
29922,
1491,
5014,
29889,
1254,
3970,
2692,
29897,
13,
13,
1678,
934,
29918,
2311,
353,
2897,
29889,
2084,
29889,
657,
2311,
29898,
29893,
485,
29918,
8159,
978,
29897,
13,
1678,
16608,
353,
938,
29898,
1491,
5014,
29889,
3198,
29918,
4905,
29898,
3366,
578,
5389,
613,
11663,
29879,
613,
281,
485,
29918,
8159,
978,
1402,
380,
20405,
29922,
1491,
5014,
29889,
1254,
3970,
2692,
876,
13,
13,
1678,
903,
11808,
353,
679,
29918,
11808,
580,
13,
1678,
903,
5727,
353,
5159,
13,
13,
1678,
565,
934,
29918,
2311,
1275,
448,
29896,
29901,
13,
4706,
396,
1222,
22368,
11916,
393,
5229,
2501,
11301,
13,
4706,
903,
11808,
3366,
26061,
3108,
4619,
29871,
29896,
13,
1678,
25342,
3858,
338,
6213,
29901,
13,
4706,
396,
1222,
22368,
11916,
393,
5229,
373,
3858,
8845,
13,
4706,
903,
11808,
3366,
20965,
29918,
1643,
3108,
4619,
29871,
29896,
13,
1678,
25342,
938,
29898,
19935,
29914,
8132,
3580,
1307,
29918,
29934,
3040,
29930,
29896,
29900,
29900,
29900,
29914,
29896,
29900,
29914,
29906,
29897,
529,
7431,
29898,
710,
29898,
1643,
22164,
13,
4706,
396,
1222,
22368,
11916,
393,
526,
2086,
3273,
304,
6216,
278,
1301,
924,
13,
4706,
903,
11808,
3366,
517,
29877,
29918,
12759,
3108,
4619,
29871,
29896,
13,
1678,
25342,
16608,
29914,
8132,
3580,
1307,
29918,
29934,
3040,
529,
341,
1177,
29918,
1660,
9295,
29901,
13,
4706,
396,
1222,
22368,
11916,
393,
526,
2086,
3273,
13,
4706,
903,
11808,
3366,
517,
29877,
29918,
12759,
3108,
4619,
29871,
29896,
13,
1678,
25342,
16608,
29914,
8132,
3580,
1307,
29918,
29934,
3040,
1405,
18134,
29918,
1660,
9295,
29901,
13,
4706,
396,
1222,
22368,
1407,
1472,
11916,
304,
3013,
263,
15590,
9853,
29899,
2311,
13,
4706,
903,
11808,
3366,
517,
29877,
29918,
5426,
3108,
4619,
29871,
29896,
13,
1678,
1683,
29901,
13,
4706,
396,
910,
697,
338,
1781,
448,
3013,
372,
363,
278,
3646,
16874,
13,
4706,
903,
5727,
29889,
4397,
3552,
359,
29889,
2084,
29889,
7122,
29898,
24713,
29918,
6500,
3871,
29892,
903,
29893,
485,
29918,
9507,
511,
934,
29918,
2311,
29892,
3858,
876,
13,
4706,
903,
11808,
3366,
5215,
287,
29918,
2230,
3108,
4619,
16608,
13,
1678,
903,
11808,
3366,
497,
3108,
4619,
29871,
29896,
13,
1678,
903,
11808,
3366,
7827,
29918,
2230,
3108,
4619,
16608,
13,
13,
1678,
736,
9423,
11808,
29892,
903,
5727,
29897,
13,
13,
1753,
903,
26026,
29918,
5215,
29918,
1272,
29898,
3134,
29918,
1445,
29892,
10348,
29918,
4993,
29892,
3646,
29918,
3972,
29892,
1104,
29918,
25027,
29922,
29896,
29872,
29899,
29896,
1125,
13,
1678,
8783,
29918,
6500,
3871,
353,
2897,
29889,
2084,
29889,
23579,
568,
486,
29898,
359,
29889,
2084,
29889,
5451,
29898,
3134,
29918,
1445,
9601,
29896,
2314,
29961,
29900,
29962,
13,
1678,
281,
485,
29918,
4632,
353,
2897,
29889,
2084,
29889,
7122,
29898,
5182,
29918,
3972,
29892,
8783,
29918,
6500,
3871,
29897,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
29893,
485,
29918,
4632,
1125,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
29893,
485,
29918,
4632,
29897,
13,
13,
1678,
2752,
29918,
19935,
353,
938,
29898,
1491,
5014,
29889,
3198,
29918,
4905,
29898,
3366,
578,
5389,
613,
11663,
29879,
613,
10348,
29918,
4993,
1402,
380,
20405,
29922,
1491,
5014,
29889,
1254,
3970,
2692,
876,
13,
1678,
1596,
703,
4435,
10348,
3309,
29901,
1273,
29879,
29908,
1273,
409,
2395,
29918,
517,
29918,
29882,
2470,
29898,
4993,
29918,
19935,
847,
16698,
3580,
1307,
29918,
29934,
3040,
876,
13,
13,
1678,
396,
3617,
10348,
1445,
2224,
322,
1301,
924,
363,
1269,
10541,
297,
260,
4501,
13,
1678,
11916,
353,
5159,
13,
1678,
5447,
353,
382,
29911,
29889,
5510,
29898,
3134,
29918,
1445,
29897,
13,
1678,
3876,
353,
5447,
29889,
657,
4632,
580,
13,
1678,
19359,
29918,
333,
4706,
353,
29871,
29900,
13,
1678,
445,
29918,
2230,
268,
353,
29871,
29900,
29889,
29900,
13,
1678,
445,
29918,
19708,
353,
29871,
29900,
29889,
29900,
13,
1678,
12379,
29918,
2230,
268,
353,
29871,
29900,
29889,
29900,
13,
1678,
12379,
29918,
19708,
353,
29871,
29900,
29889,
29900,
13,
1678,
445,
29918,
726,
268,
353,
5124,
13,
1678,
363,
2278,
297,
3876,
29901,
13,
4706,
565,
2278,
29889,
4039,
1275,
376,
798,
1115,
13,
9651,
3151,
29918,
2230,
268,
353,
5785,
29898,
5145,
29889,
1131,
1091,
3366,
16394,
20068,
13,
9651,
3151,
29918,
19708,
353,
5785,
29898,
5145,
29889,
1131,
1091,
3366,
9346,
287,
332,
20068,
13,
9651,
3151,
29918,
726,
268,
353,
2278,
29889,
726,
13,
13,
9651,
565,
445,
29918,
2230,
1275,
29871,
29900,
29889,
29900,
29901,
13,
18884,
445,
29918,
2230,
353,
3151,
29918,
2230,
13,
13,
9651,
19471,
1678,
353,
3151,
29918,
2230,
448,
313,
16304,
29918,
2230,
718,
12379,
29918,
19708,
29897,
13,
9651,
396,
1104,
29918,
25027,
995,
338,
1754,
515,
14260,
29914,
2704,
304,
1018,
322,
19632,
895,
1546,
29901,
13,
9651,
396,
448,
28967,
3307,
304,
14383,
4567,
3838,
13,
9651,
396,
448,
451,
2086,
3273,
29892,
451,
2086,
1472,
25260,
13,
9651,
338,
29918,
5358,
353,
5844,
29889,
275,
5358,
29898,
2764,
29918,
2230,
29892,
445,
29918,
2230,
718,
445,
29918,
19708,
29892,
1104,
29918,
25027,
29922,
2674,
29918,
25027,
29897,
13,
9651,
338,
29918,
12759,
353,
5135,
1366,
29918,
19708,
718,
3151,
29918,
19708,
718,
19471,
29897,
529,
18134,
29918,
1660,
9295,
29897,
13,
13,
9651,
396,
746,
278,
3517,
1543,
338,
3802,
3307,
3579,
392,
1068,
445,
947,
451,
13,
9651,
396,
748,
975,
18134,
29918,
1660,
9295,
29892,
591,
9773,
2793,
13,
9651,
565,
313,
275,
29918,
5358,
322,
338,
29918,
12759,
1125,
13,
18884,
445,
29918,
19708,
4619,
3151,
29918,
19708,
718,
19471,
13,
18884,
445,
29918,
726,
268,
4619,
3151,
29918,
726,
13,
9651,
1683,
29901,
13,
18884,
11916,
29889,
4397,
3552,
18494,
29918,
4993,
29892,
3646,
29918,
3972,
29892,
8783,
29918,
6500,
3871,
29892,
445,
29918,
2230,
29892,
445,
29918,
19708,
29892,
445,
29918,
726,
29892,
19359,
29918,
333,
876,
13,
13,
18884,
445,
29918,
2230,
268,
353,
3151,
29918,
2230,
13,
18884,
445,
29918,
19708,
353,
3151,
29918,
19708,
13,
18884,
445,
29918,
726,
268,
353,
3151,
29918,
726,
13,
13,
18884,
19359,
29918,
333,
4619,
29871,
29896,
13,
13,
9651,
12379,
29918,
2230,
268,
353,
3151,
29918,
2230,
13,
9651,
12379,
29918,
19708,
353,
3151,
29918,
19708,
13,
13,
1678,
396,
19152,
5702,
310,
920,
1784,
11916,
526,
1781,
7186,
29889,
1108,
2454,
13,
1678,
903,
11808,
353,
679,
29918,
11808,
580,
13,
1678,
954,
29918,
27736,
353,
7431,
29898,
27736,
29897,
13,
1678,
903,
5727,
353,
5159,
13,
13,
1678,
1596,
703,
7032,
292,
6560,
848,
29901,
6571,
1642,
4830,
29898,
3134,
29918,
1445,
876,
13,
1678,
11565,
353,
28625,
580,
13,
1678,
2594,
353,
6728,
1646,
29889,
14470,
4297,
29898,
3317,
29918,
1767,
29922,
1949,
29918,
27736,
29892,
11109,
29879,
29922,
5425,
3580,
1307,
29918,
29933,
1718,
29897,
13,
1678,
363,
474,
29892,
19356,
297,
26985,
29898,
10109,
29889,
326,
481,
29918,
348,
21693,
29898,
650,
29918,
11249,
29892,
11916,
511,
1369,
29922,
29896,
1125,
13,
4706,
903,
11808,
4619,
19356,
29961,
29900,
29962,
13,
4706,
903,
5727,
4619,
19356,
29961,
29896,
29962,
13,
4706,
2594,
29889,
5504,
29898,
29875,
29897,
13,
1678,
2594,
29889,
5504,
29898,
1949,
29918,
27736,
29897,
13,
1678,
11565,
29889,
5358,
580,
13,
1678,
11565,
29889,
7122,
580,
13,
13,
1678,
19673,
29918,
27736,
353,
679,
29918,
5215,
287,
29918,
27736,
7373,
11808,
29897,
13,
1678,
4974,
903,
11808,
3366,
497,
3108,
1275,
954,
29918,
27736,
13,
1678,
4974,
7431,
7373,
5727,
29897,
1275,
19673,
29918,
27736,
13,
13,
1678,
1596,
29918,
5215,
29918,
12276,
7373,
11808,
29892,
16698,
3580,
1307,
29918,
29934,
3040,
29892,
18134,
29918,
1660,
9295,
29897,
13,
1678,
1596,
703,
17518,
19201,
29901,
18695,
29896,
29888,
7686,
29908,
1273,
5135,
29918,
11808,
3366,
7827,
29918,
2230,
3108,
847,
2752,
29918,
19935,
11877,
29896,
29900,
29900,
876,
13,
1678,
1596,
703,
1159,
13,
13,
1678,
736,
903,
11808,
29892,
903,
5727,
13,
13,
1753,
903,
26026,
29918,
13441,
29918,
29893,
485,
29898,
1526,
29941,
29918,
9507,
29892,
903,
29893,
485,
29918,
9507,
1125,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
7373,
29893,
485,
29918,
9507,
1125,
13,
4706,
1596,
703,
1168,
369,
1259,
6571,
304,
399,
7520,
934,
29901,
6571,
1642,
4830,
29898,
1526,
29941,
29918,
9507,
29892,
903,
29893,
485,
29918,
9507,
876,
13,
4706,
4327,
261,
353,
577,
29916,
29889,
13372,
261,
580,
13,
4706,
4327,
261,
29889,
13441,
29898,
13445,
20069,
403,
29922,
8132,
3580,
1307,
29918,
29934,
3040,
29892,
302,
29918,
305,
12629,
29922,
3210,
2190,
29940,
6670,
29903,
29892,
2586,
19488,
29922,
22698,
29918,
2287,
29925,
4690,
29897,
13,
4706,
1018,
29901,
13,
9651,
4327,
261,
29889,
4282,
29898,
1526,
29941,
29918,
9507,
29892,
903,
29893,
485,
29918,
9507,
29897,
13,
4706,
5174,
577,
29916,
29889,
3221,
29889,
29903,
2251,
2392,
29901,
13,
9651,
1209,
13,
13,
1753,
2436,
29918,
17492,
29918,
7638,
29898,
5182,
29918,
3972,
29892,
903,
5727,
29892,
903,
11808,
1125,
13,
1678,
3646,
29918,
7638,
29918,
6886,
353,
2897,
29889,
2084,
29889,
7122,
29898,
5182,
29918,
3972,
29892,
376,
617,
3358,
29888,
648,
1836,
7638,
1159,
13,
1678,
411,
1722,
29898,
5182,
29918,
7638,
29918,
6886,
29889,
4830,
703,
14968,
4968,
376,
29893,
1159,
408,
7945,
29918,
7638,
29918,
1445,
29901,
29871,
396,
29871,
29947,
29900,
29995,
13,
4706,
411,
1722,
29898,
5182,
29918,
7638,
29918,
6886,
29889,
4830,
703,
3359,
4968,
376,
29893,
1159,
408,
2906,
29918,
7638,
29918,
1445,
29901,
29871,
396,
29871,
29896,
29900,
29995,
13,
9651,
411,
1722,
29898,
5182,
29918,
7638,
29918,
6886,
29889,
4830,
703,
1688,
4968,
376,
29893,
1159,
408,
1243,
29918,
7638,
29918,
1445,
29901,
29871,
396,
29871,
29896,
29900,
29995,
13,
18884,
7945,
29918,
13236,
353,
11799,
29889,
21533,
10507,
29898,
14968,
29918,
7638,
29918,
1445,
29892,
1746,
7039,
29922,
3738,
27286,
5813,
29903,
29897,
13,
18884,
7945,
29918,
13236,
29889,
3539,
6672,
580,
13,
18884,
2906,
29918,
13236,
353,
11799,
29889,
21533,
10507,
29898,
3359,
29918,
7638,
29918,
1445,
29892,
1746,
7039,
29922,
3738,
27286,
5813,
29903,
29897,
13,
18884,
2906,
29918,
13236,
29889,
3539,
6672,
580,
13,
18884,
1243,
29918,
13236,
353,
11799,
29889,
21533,
10507,
29898,
1688,
29918,
7638,
29918,
1445,
29892,
1746,
7039,
29922,
3738,
27286,
5813,
29903,
29897,
13,
18884,
1243,
29918,
13236,
29889,
3539,
6672,
580,
13,
13,
18884,
2594,
353,
6728,
1646,
29889,
14470,
4297,
29898,
3317,
29918,
1767,
29922,
2435,
7373,
5727,
511,
11109,
29879,
29922,
5425,
3580,
1307,
29918,
29933,
1718,
29897,
13,
18884,
363,
474,
29892,
2944,
297,
26985,
29898,
1646,
7373,
5727,
22164,
13,
462,
1678,
474,
29918,
1545,
353,
474,
1273,
29871,
29896,
29900,
13,
462,
1678,
565,
474,
29918,
1545,
1275,
29871,
29900,
29901,
13,
462,
4706,
9227,
353,
1243,
29918,
13236,
13,
462,
1678,
25342,
474,
29918,
1545,
1275,
29871,
29896,
29901,
13,
462,
4706,
9227,
353,
2906,
29918,
13236,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
9227,
353,
7945,
29918,
13236,
13,
462,
1678,
9227,
29889,
13236,
340,
3319,
29908,
29893,
485,
29918,
9507,
1115,
2944,
29961,
29900,
1402,
376,
29893,
485,
29918,
5325,
675,
1115,
2944,
29961,
29896,
1402,
376,
3286,
924,
1115,
2944,
29961,
29906,
29962,
1800,
13,
13,
1678,
1596,
703,
1159,
13,
1678,
1596,
703,
14087,
383,
1177,
1964,
6850,
1299,
9047,
2965,
29903,
3695,
7377,
30022,
1159,
13,
1678,
1596,
29918,
5215,
29918,
12276,
7373,
11808,
29892,
16698,
3580,
1307,
29918,
29934,
3040,
29892,
18134,
29918,
1660,
9295,
29897,
13,
1678,
1596,
703,
14087,
313,
29943,
1177,
1964,
6850,
1299,
9047,
2965,
29903,
29897,
3695,
7377,
30022,
1159,
13,
1678,
1596,
703,
1159,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
349,
1718,
6304,
353,
679,
29918,
326,
1971,
2153,
29918,
16680,
29898,
8216,
543,
17518,
6560,
515,
16377,
11319,
363,
12884,
1199,
29892,
3444,
1159,
13,
1678,
349,
1718,
6304,
29889,
1202,
29918,
23516,
703,
5182,
29918,
3972,
613,
1371,
543,
14994,
3381,
3884,
1159,
13,
1678,
349,
1718,
6304,
29889,
1202,
29918,
23516,
703,
489,
4572,
29918,
284,
17416,
613,
1371,
543,
1252,
2325,
11916,
411,
4890,
451,
297,
4944,
22968,
1159,
13,
1678,
349,
1718,
6304,
29889,
1202,
29918,
23516,
703,
489,
8945,
675,
613,
3158,
543,
8899,
29918,
3009,
613,
1371,
543,
1168,
369,
1372,
9766,
9695,
293,
4890,
304,
1009,
2967,
6743,
1159,
13,
13,
1678,
349,
1718,
29909,
4345,
353,
349,
1718,
6304,
29889,
5510,
29918,
5085,
580,
13,
1678,
12725,
29918,
1643,
353,
679,
29918,
15480,
29918,
1643,
29898,
16320,
29909,
4345,
29897,
13,
1678,
319,
13208,
29950,
2882,
2544,
353,
838,
17416,
29898,
16320,
29909,
4345,
29889,
4572,
29918,
284,
17416,
29897,
565,
349,
1718,
29909,
4345,
29889,
4572,
29918,
284,
17416,
1683,
6213,
13,
13,
1678,
822,
3858,
29918,
4572,
29918,
7692,
29898,
1643,
1125,
13,
4706,
565,
349,
1718,
29909,
4345,
29889,
8945,
675,
29901,
13,
9651,
3858,
353,
443,
293,
6797,
532,
29889,
8945,
675,
703,
22498,
29968,
29928,
613,
3858,
29889,
17010,
3101,
320,
13,
18884,
869,
12508,
703,
294,
18869,
613,
376,
17281,
1159,
320,
13,
18884,
869,
13808,
703,
294,
18869,
613,
376,
17281,
1159,
13,
4706,
3858,
353,
5505,
29918,
8945,
675,
29898,
1643,
29897,
13,
4706,
3858,
353,
12725,
29918,
1643,
29898,
1643,
29897,
13,
4706,
565,
319,
13208,
29950,
2882,
2544,
322,
3858,
29901,
13,
9651,
1018,
29901,
13,
18884,
319,
13208,
29950,
2882,
2544,
29889,
12508,
29898,
1643,
29897,
13,
9651,
5174,
7670,
2392,
29901,
13,
18884,
3858,
353,
6213,
13,
4706,
736,
3858,
13,
13,
1678,
8783,
29918,
29879,
2863,
353,
903,
10382,
29918,
392,
29918,
1457,
5014,
29918,
1272,
29898,
7638,
29918,
2271,
29922,
25832,
8127,
29911,
29918,
14829,
29918,
29907,
7597,
29892,
3646,
29918,
3972,
29922,
16320,
29909,
4345,
29889,
5182,
29918,
3972,
29897,
13,
1678,
8974,
29918,
4632,
29918,
3972,
353,
2897,
29889,
2084,
29889,
25721,
29898,
24713,
29918,
29879,
2863,
29897,
13,
1678,
599,
29918,
11808,
353,
679,
29918,
11808,
580,
13,
1678,
599,
29918,
5727,
353,
5159,
13,
1678,
411,
1722,
29898,
24713,
29918,
29879,
2863,
29892,
376,
29878,
1159,
408,
8974,
29901,
13,
4706,
363,
1196,
297,
8974,
29889,
949,
9012,
7295,
13,
9651,
270,
353,
1196,
29889,
5451,
28165,
1159,
13,
9651,
445,
29918,
3134,
353,
2897,
29889,
2084,
29889,
7122,
29898,
29879,
2863,
29918,
4632,
29918,
3972,
29892,
270,
29961,
29900,
2314,
13,
9651,
445,
29918,
1526,
29941,
353,
2897,
29889,
2084,
29889,
7122,
29898,
29879,
2863,
29918,
4632,
29918,
3972,
29892,
270,
29961,
29896,
2314,
13,
9651,
445,
29918,
2674,
353,
5785,
29898,
29881,
29961,
29906,
2314,
13,
13,
9651,
281,
485,
29918,
9507,
353,
2897,
29889,
2084,
29889,
7122,
29898,
29879,
2863,
29918,
4632,
29918,
3972,
29892,
2897,
29889,
2084,
29889,
23579,
568,
486,
29898,
359,
29889,
2084,
29889,
6500,
3871,
29898,
1366,
29918,
1526,
29941,
876,
29961,
29900,
29962,
718,
11393,
29893,
485,
1159,
13,
9651,
903,
26026,
29918,
13441,
29918,
29893,
485,
29898,
1366,
29918,
1526,
29941,
29892,
281,
485,
29918,
9507,
29897,
13,
9651,
6795,
29892,
4206,
353,
903,
26026,
29918,
5215,
29918,
1272,
29898,
1366,
29918,
3134,
29892,
281,
485,
29918,
9507,
29892,
8974,
29918,
4632,
29918,
3972,
29892,
445,
29918,
2674,
29897,
13,
13,
9651,
599,
29918,
11808,
4619,
6795,
13,
9651,
599,
29918,
5727,
4619,
4206,
13,
1678,
2436,
29918,
17492,
29918,
7638,
29898,
29879,
2863,
29918,
4632,
29918,
3972,
29892,
903,
11808,
29922,
497,
29918,
11808,
29892,
903,
5727,
29922,
497,
29918,
5727,
29897,
13,
2
] |
okta/models/app/AppUserProfile.py | xmercury-qb/okta-sdk-python | 1 | 110320 | <gh_stars>1-10
class AppUserProfile:
types = {
'username': str,
'password': <PASSWORD>
}
def __init__(self):
self.username = None # str
self.password = None # str
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
1990,
2401,
2659,
13909,
29901,
13,
13,
1678,
4072,
353,
426,
13,
4706,
525,
6786,
2396,
851,
29892,
13,
4706,
525,
5630,
2396,
529,
25711,
17013,
29958,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
13,
4706,
1583,
29889,
6786,
353,
6213,
29871,
396,
851,
13,
13,
4706,
1583,
29889,
5630,
353,
6213,
29871,
396,
851,
13,
2
] |
setup.py | rmax/django-dummyimage | 11 | 101222 | <filename>setup.py
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name = "django-dummyimage",
version = "0.1.1",
description = "Dynamic Dummy Image Generator For Django!",
author = "<NAME>",
author_email = "<EMAIL>",
url = "https://github.com/darkrho/django-dummyimage",
license = "BSD",
packages = find_packages(),
zip_safe=False, # because we're including media that Django needs
include_package_data = True,
install_requires = [
'django',
'pil',
],
classifiers=[
'Programming Language :: Python',
'Framework :: Django',
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
],
)
| [
1,
529,
9507,
29958,
14669,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
3166,
731,
21245,
8789,
1053,
6230,
29892,
1284,
29918,
8318,
13,
13,
14669,
29898,
13,
1678,
1024,
353,
376,
14095,
29899,
29881,
11770,
3027,
613,
13,
1678,
1873,
353,
376,
29900,
29889,
29896,
29889,
29896,
613,
13,
1678,
6139,
353,
376,
24001,
360,
11770,
7084,
3251,
1061,
1152,
15337,
29991,
613,
13,
1678,
4148,
353,
9872,
5813,
28341,
13,
1678,
4148,
29918,
5269,
353,
9872,
26862,
6227,
28341,
13,
1678,
3142,
353,
376,
991,
597,
3292,
29889,
510,
29914,
26031,
4650,
29914,
14095,
29899,
29881,
11770,
3027,
613,
13,
1678,
19405,
353,
376,
29933,
7230,
613,
13,
1678,
9741,
353,
1284,
29918,
8318,
3285,
13,
1678,
14319,
29918,
11177,
29922,
8824,
29892,
396,
1363,
591,
29915,
276,
3704,
5745,
393,
15337,
4225,
13,
1678,
3160,
29918,
5113,
29918,
1272,
353,
5852,
29892,
13,
1678,
2601,
29918,
276,
339,
2658,
353,
518,
13,
4706,
525,
14095,
742,
13,
4706,
525,
29886,
309,
742,
13,
1678,
21251,
13,
1678,
770,
14903,
11759,
13,
4706,
525,
9283,
4056,
17088,
4761,
5132,
742,
13,
4706,
525,
16660,
4761,
15337,
742,
13,
4706,
525,
21956,
358,
16034,
4761,
29871,
29946,
448,
350,
1187,
742,
13,
4706,
525,
2928,
2760,
319,
4749,
663,
4761,
10682,
414,
742,
13,
1678,
21251,
13,
29897,
13,
2
] |
_posts/ideals_varieties_and_algorithms/chapter3/section2/ex-3-2-2.py | hidenori-shinohara/hidenori-shionohara.github.io | 0 | 1603012 | from sympy import *
from sympy.polys.orderings import monomial_key
x, y, z = symbols('x y z')
print(groebner([x*y - 1, x*z - 1], x, y, z, order='lex'))
| [
1,
515,
5016,
2272,
1053,
334,
13,
3166,
5016,
2272,
29889,
3733,
952,
29889,
2098,
886,
1053,
1601,
7615,
29918,
1989,
13,
13,
29916,
29892,
343,
29892,
503,
353,
15072,
877,
29916,
343,
503,
1495,
13,
13,
2158,
29898,
17170,
774,
1089,
4197,
29916,
29930,
29891,
448,
29871,
29896,
29892,
921,
29930,
29920,
448,
29871,
29896,
1402,
921,
29892,
343,
29892,
503,
29892,
1797,
2433,
2506,
8785,
13,
2
] |
profiles/apps.py | mlutok/portal_backend | 1 | 142161 | from django.apps import AppConfig
class ProfilesConfig(AppConfig):
name = "profiles"
verbose_name = "Profiles of Players"
def ready(self):
from . import signals
| [
1,
515,
9557,
29889,
13371,
1053,
2401,
3991,
13,
13,
13,
1990,
1019,
5325,
3991,
29898,
2052,
3991,
1125,
13,
1678,
1024,
353,
376,
771,
5325,
29908,
13,
1678,
26952,
29918,
978,
353,
376,
1184,
5325,
310,
7412,
414,
29908,
13,
13,
1678,
822,
7960,
29898,
1311,
1125,
13,
4706,
515,
869,
1053,
18470,
13,
2
] |
src/fortrace/application/userManagement.py | dasec/ForTrace | 1 | 1603319 | <reponame>dasec/ForTrace<gh_stars>1-10
# Copyright (C) 2013-2014 <NAME>
# This file is part of fortrace - http://fortrace.fbi.h-da.de
# See the file 'docs/LICENSE' for copying permission.
# Modified by <NAME> in 2021
from __future__ import absolute_import
from __future__ import print_function
try:
import logging
import sys
import platform
import threading
import subprocess
import inspect # for listing all method of a class
import base64
import re
import six.moves.cPickle
# base class VMM side
from fortrace.application.application import ApplicationVmmSide
from fortrace.application.application import ApplicationVmmSideCommands
#
import fortrace.utility.picklehelper as ph
import fortrace.utility.guesttime as gt
# base class guest side
from fortrace.application.application import ApplicationGuestSide
from fortrace.application.application import ApplicationGuestSideCommands
from fortrace.utility.line import lineno
# module specific imports
import os.path
import getpass
except ImportError as ie:
print(("Import error! in userManagement.py " + str(ie)))
exit(1)
###############################################################################
# Host side implementation
###############################################################################
class UserManagementVmmSide(ApplicationVmmSide):
"""
This class is a remote control on the host-side to control a real <userManagement>
running on a guest.
"""
def __init__(self, guest_obj, args):
"""
Set default attribute values only.
@param guest_obj: The guest on which this application is running. (will be inserted from guest::application())
@param args: containing
logger: Logger name for logging.
"""
try:
super(UserManagementVmmSide, self).__init__(guest_obj, args)
self.logger.info("function: UserManagementVmmSide::__init__")
self.window_id = None
except Exception as e:
raise Exception(
lineno() + " Error: UserManagementHostSide::__init__ " + self.guest_obj.guestname + " " + str(e))
def open(self):
"""
Sends a command to open a userManagement on the associated guest.
"""
try:
self.logger.info("function: UserManagementVmmSide::open")
self.window_id = self.guest_obj.current_window_id
self.guest_obj.send("application " + "userManagement " + str(self.window_id) + " open ") # some parameters
self.guest_obj.current_window_id += 1
except Exception as e:
raise Exception("error UserManagementVmmSide::open: " + str(e))
def close(self):
"""Sends a command to close a <userManagement> on the associated guest.
"""
try:
self.logger.info("function: UserManagementVmmSide::close")
self.guest_obj.send("application " + "userManagement " + str(self.window_id) + " close ")
except Exception as e:
raise Exception("error UserManagementVmmSide:close()" + str(e))
def addUser(self, user_name, password):
"""
Creating a User on the guest system. Password should not exceed 14 characters
@param user_name: Name ot the user to create
@param password: <PASSWORD>
"""
if len(password) < 15 or password is None:
try:
self.logger.info("function: UserManagementVmmSide:addUser")
self.logger.debug("Adding user " + user_name + "; password: " + password)
ac = {"usr_name": user_name,
"password": password}
pcl_ac = ph.base64pickle(ac)
pcl_ac = pcl_ac.decode()
pw_cmd = "application userManagement " + str(self.window_id) + " addUser " + pcl_ac
self.is_busy = True
self.guest_obj.send(pw_cmd)
except Exception as e:
raise Exception("error UserManagementVmmSide:addUser " + str(e))
else:
self.logger.error(
"function: UserManagementVmmSide::addUser failed: Password exeeds maximum supported length or no password is provided")
def changeUser(self, user_name, password=None):
"""
Change the user that will be logged in to after next reboot
@param user_name: Name of the user that will be set at active
@param password: Password of the user account
"""
try:
self.logger.info("function: UserManagementVmmSide:changeUser")
self.logger.debug("Set " + user_name + "as default autostart user")
ac = {"usr_name": user_name,
"password": password}
pcl_ac = ph.base64pickle(ac)
pcl_ac = pcl_ac.decode()
pw_cmd = "application userManagement " + str(self.window_id) + " changeUser " + pcl_ac
self.is_busy = True
self.guest_obj.send(pw_cmd)
except Exception as e:
raise Exception("error UserManagementVmmSide:changeUser")
def deleteUser(self, user_name, d_type):
"""
Deleting a User on the guest system
@param user_name: Name of the user to delete
@param d_type: Type of deleting user data ("keep", "delete", "secure")
"""
try:
self.logger.info("function: UserManagementVmmSide:deleteUser")
self.logger.debug("deleting user" + user_name + "; deletion type:" + d_type)
ac = {"usr_name": user_name,
"del_type": d_type}
pcl_ac = ph.base64pickle(ac)
pcl_ac = pcl_ac.decode()
pw_cmd = "application userManagement " + str(self.window_id) + " deleteUser " + pcl_ac
self.is_busy = True
self.guest_obj.send(pw_cmd)
except Exception as e:
raise Exception("error UserManagementVmmSide:deleteUser() " + str(e))
###############################################################################
# Commands to parse on host side
###############################################################################
class UserManagementVmmSideCommands(ApplicationVmmSideCommands):
"""
Class with all commands for <userManagement> which will be received from the agent on the guest.
Static only.
"""
@staticmethod
def commands(guest_obj, cmd):
# cmd[0] = win_id; cmd[1] = state
module_name = "userManagement"
guest_obj.logger.debug("UserManagementVmmSideCommands::commands: " + cmd)
cmd = cmd.split(" ")
try:
if "opened" in cmd[1]:
guest_obj.logger.debug("in opened")
for obj in guest_obj.applicationWindow[module_name]:
if cmd[0] == str(obj.window_id):
guest_obj.logger.debug("window_id: " + str(obj.window_id) + " found!")
guest_obj.logger.info(module_name + " with id: " + str(obj.window_id) + " is_opened = true")
obj.is_opened = True
guest_obj.logger.debug("obj.is_opened is True now!")
if "busy" in cmd[1]:
guest_obj.logger.debug("in busy")
for obj in guest_obj.applicationWindow[module_name]:
if cmd[0] == str(obj.window_id):
guest_obj.logger.info(module_name + " with id: " + str(obj.window_id) + " is_busy = true")
obj.is_busy = True
if "ready" in cmd[1]:
guest_obj.logger.debug("in ready")
for obj in guest_obj.applicationWindow[module_name]:
if cmd[0] == str(obj.window_id):
guest_obj.logger.info(module_name + " with id: " + str(obj.window_id) + " is_busy = false")
obj.is_busy = False
if "error" in cmd[1]:
guest_obj.logger.debug("in error")
for obj in guest_obj.applicationWindow[module_name]:
if cmd[0] == str(obj.window_id):
guest_obj.logger.info(module_name + " with id: " + str(obj.window_id) + " has_error = True")
obj.has_error = True
except Exception as e:
raise Exception(module_name + "_host_side_commands::commands " + str(e))
###############################################################################
# Guest side implementation
###############################################################################
class UserManagementGuestSide(ApplicationGuestSide):
"""<userManagement> implementation of the guest side.
Usually Windows, Linux guest's
class attributes
window_id - The ID for the opened object
"""
def __init__(self, agent_obj, logger):
super(UserManagementGuestSide, self).__init__(agent_obj, logger)
try:
self.module_name = "userManagement"
self.timeout = None
self.window_is_crushed = None
self.window_id = None
self.agent_object = agent_obj
except Exception as e:
raise Exception("Error in " + self.__class__.__name__ +
": " + str(e))
def open(self, args):
"""
Open a <userManagement> and save the userManagement object with an id in a dictionary.
Set page load timeout to 30 seconds.
return:
Send to the host in the known to be good state:
'application <userManagement> window_id open'.
'application <userManagement> window_id ready'.
in the error state:
'application <userManagement> window_id error'.
additionally the 'window_is_crushed' attribute is set; so the next
call will open a new window.
"""
try:
arguments = args.split(" ")
var = arguments[0]
var2 = arguments[1]
self.logger.info(self.module_name + "GuestSide::open")
if var == "type":
self.logger.debug("wait for start UserManagement...")
# start application <skeletion>
self.logger.debug("started!")
elif var == "type2":
self.logger.debug("wait for start UserManagement...")
# start application <skeletion>
self.logger.debug("started!")
else:
self.logger.error("skeletion type " + var +
" not implemented")
return
# send some information about the userManagement state
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " opened")
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " ready")
self.window_is_crushed = False
except Exception as e:
self.logger.info("UserManagementGuestSide::open: Close all open windows and clear the userManagement list")
subprocess.call(["taskkill", "/IM", "userManagement.exe", "/F"])
# for obj in self.agent_object.applicationWindow[self.module_name]:
# self.agent_obj.applicationWindow[self.module_name].remove(obj)
# set a crushed flag.
self.window_is_crushed = True
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " error")
self.logger.error("Error in " + self.__class__.__name__ + "::open" + ": selenium is crushed: " + str(e))
def close(self):
"""Close one given window by window_id"""
self.logger.info(self.__class__.__name__ +
"::close ")
self.seleniumDriver.quit()
def addUser(self, args):
"""
add a new user account to guest and prepare fortrace installation for that user
"""
self.logger.info(self.__class__.__name__ +
"::addUser ")
ad = ph.base64unpickle(args)
user = ad["usr_name"]
password = ad["password"]
if platform.system() == "Windows":
self.agent_object.send(
"application " + self.module_name + " " + str(self.window_id) + " creating user: " + user + " - password: " + password)
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " busy")
self.__createUser(user, password)
# add new user to group administrators
group = self.__getAdmingroupname()
self.__groupAdd(user, group)
# create user home directory
self.__createHomeDir(user, password)
# copy fortrace data to new users Desktop and enable script execution on first login
self.__copyInstallationFiles(user, password)
# set new user as active
self.logger.info(self.__class__.__name__ +
"::User created ")
# update guest timestamp
gTime = gt.getGuestTime()
self.agent_object.send("time {0}".format(gTime))
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " ready")
self.window_is_crushed = False
else:
self.window_is_crushed = True
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " error")
self.logger.error("Unknown System Platform, only Windows is supported at the moment")
# TODO: Add option to change user dynamical
def changeUser(self, args):
"""
Change the user, that will be logged in when the system starts up next time.
"""
self.logger.info(self.__class__.__name__ +
"::changeUser")
ad = ph.base64unpickle(args)
user = ad["usr_name"]
password = ad["password"]
if platform.system() == "Windows":
if password is None:
password = ""
logon_path = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon"
try:
self.agent_object.send(
"application " + self.module_name + " " + str(self.window_id) + " Changing active User on next reboot to: " + user)
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " busy")
subprocess.call(["CMD", "/c", "reg", "ADD", logon_path, "/v", "AutoAdminLogon", "/t", "REG_SZ", "/d", "1", "/f"])
subprocess.call(["CMD", "/c", "reg", "ADD", logon_path, "/v", "DefaultUserName", "/t", "REG_SZ", "/d", user, "/f"])
subprocess.call(["CMD", "/c", "reg", "ADD", logon_path, "/v", "DefaultPassword", "/t", "REG_SZ", "/d", password, "/f"])
#update Guest timestamp
gTime = gt.getGuestTime()
self.agent_object.send("time {0}".format(gTime))
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " ready")
self.window_is_crushed = False
except Exception as e:
self.window_is_crushed = True
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " error")
self.logger.error("Could not set " + user + " as default autostart user: " + lineno() + ' ' + str(e))
else:
self.window_is_crushed = True
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " error")
self.logger.error("Unknown System Platform, only Windows is supported at the moment")
def deleteUser(self, args):
"""
Delete user from the system
"""
self.logger.info(self.__class__.__name__ +
"::DeleteUser")
# extract Arguments
ad = ph.base64unpickle(args)
user = ad["usr_name"]
d_type = ad["del_type"]
if platform.system() == "Windows":
self.logger.debug(self.__class__.__name__ + "::DeletionType: " + d_type)
status = False
# Check if user is currently logged in
identity = getpass.getuser()
if identity.upper() == user.upper():
self.logger.error("User cannot delete itself")
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " error")
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " user cannot delete itself")
# Delete user
else:
self.agent_object.send(
"application " + self.module_name + " " + str(self.window_id) + " Deleting User: " + user + " - deletion type: " + d_type)
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " busy")
try:
subprocess.call(["CMD", "/c", "net", "user", user, "/delete"])
self.logger.debug(self.__class__.__name__ + "::UserDeleted")
status = True
except Exception as e:
self.window_is_crushed = True
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " error")
self.logger.error("Could not delete user " + user + ": " + str(e))
# delete files after deleting the user
if status:
self.logger.info(self.__class__.__name__ + "::DeleteUserFiles of user: {0}".format(user))
sysdrive = os.getenv("SystemDrive")
user_fortrace_path = "{0}\\Users\\{1}\\Desktop\\fortrace".format(sysdrive, user)
user_fortrace_autostart = "{0}\\Users\\{1}\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\startGuestAgent.lnk".format(sysdrive, user)
user_fortrace_python = "{0}\\Users\\{1}\\AppData\\Roaming\\Python".format(sysdrive, user)
homeDir = "{0}\\Users\\{1}".format(sysdrive, user)
# secure delete fortrace-data to reduce artifacts
try:
self.logger.debug(self.__class__.__name__ + "::deleting fortrace directory")
self.__secureDelete(user_fortrace_path)
self.logger.debug(self.__class__.__name__ + "::fortrace directory deleted")
self.logger.debug(self.__class__.__name__ + "::deleting autostart link")
# sdelete cannot delete a symbolic link
subprocess.call(["CMD", "/c", "del", user_fortrace_autostart, "/f", "/q"])
#self.__secureDeleteDirectory("\"{0}\"".format(user_fortrace_autostart))
#self.__secureDelete(user_fortrace_autostart)
self.logger.debug(self.__class__.__name__ + "::Link deleted")
self.logger.debug(self.__class__.__name__ + "::deleting Python site-packages")
self.__secureDelete(user_fortrace_python)
self.logger.debug(self.__class__.__name__ + "::Python site-packages deleted")
except Exception as e:
self.window_is_crushed = True
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " error")
self.logger.error("Could not autostart-Link " + user + ": " + str(e))
# Decide how to handle user home directory
if d_type.upper() == "KEEP":
self.logger.debug(self.__class__.__name__ + "::DeleteUserFiles(NONE)")
elif d_type.upper() == "DELETE":
self.logger.debug(self.__class__.__name__ + "::DeleteUserFiles(regular)")
self.__deleteDirectory(homeDir)
elif d_type.upper() == "SECURE":
self.logger.debug(self.__class__.__name__ + "::DeleteUserFiles(secure)")
self.__secureDelete(homeDir)
# TODO: remove workaround to delete undeletable AppData Dirs
subprocess.call(["CMD", "/c", "rd", "/s", "/q", homeDir])
# execute SDelete twice to ensure the Appdata\local directory is deleted as well
else:
self.logger.error("Wrong Parameter for user file deletion. Keeping user files!")
gTime = gt.getGuestTime()
self.agent_object.send("time {0}".format(gTime))
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " ready")
self.window_is_crushed = False
def __createUser(self, user, password):
"""
Create a new user account on the system
@param user: Name of the new user
@param password: Password of the <PASSWORD>
"""
try:
subprocess.call(["CMD", "/c", "NET", "USER", user, password, "/ADD"])
except Exception as e:
self.logger.error("adding user failed: " + lineno() + ' ' + str(e))
def __groupAdd(self, user, group):
# Todo: group remove
"""
Add a user to a existing group
@param user: Username to add
@param group: Name of the group to that the user will be added
"""
self.logger.info(self.__class__.__name__ +
"::groupAdd")
try:
subprocess.call(["CMD", "/c", "NET", "LOCALGROUP", group, user, "/ADD"])
except Exception as e:
self.logger.error("CMD", "/c", "User " + user + "could not be added to group " + group + ": " + lineno() + ' ' + str(e))
def __createHomeDir(self, user, password):
"""
Create the user directory on the system
@param user: Name of the new user
@param password: <PASSWORD> the <PASSWORD>
"""
self.logger.info(self.__class__.__name__ +
"::createHomeDir")
# check if Home-Directory already exists
# check for system drive letter
sysdrive = os.getenv("SystemDrive")
if os.path.exists(sysdrive + ":\\Users\\" + user):
self.logger.debug(self.__class__.__name__ +
"::HomeDir is already existing")
return
else:
# force creation of user directories by running command in user context
currentUser = getpass.getuser()
psexec_p = sysdrive + "\\Users\\{0}\\Desktop\\fortrace\\contrib\\windows-utils\\PsExec64.exe".format(currentUser)
wmic_p = sysdrive + "\\Windows\\system32\\wbem\\wmic"
try:
# opens an Windows Management Instrumentation session, which is directly closed again
# this is enough to create the new users home directory
# Parameter:
# -u: User
# -p: Password
# -nobanner/-accepteula: suppress unnecessary output
subprocess.call([psexec_p, "-u", user, "-p", password, "-nobanner", "-accepteula", wmic_p, "QUIT"])
except Exception as e:
self.logger.error("Creating Home Directory for user " + user + "failed: " + lineno() + ' ' + str(e))
def __copyInstallationFiles(self, user, password):
"""
Copy the fortrace folder to a new users desktop, so it can be installed and executed
@param user: Name of the new user
@param password: Password of the <PASSWORD> user
"""
self.logger.info(self.__class__.__name__ +
"::copyInstallationFiles")
sysdrive = os.getenv("SystemDrive")
currentUser = getpass.getuser()
fortrace_p = sysdrive + "\\Users\\{0}\\Desktop\\fortrace".format(currentUser)
fortrace_target_p = sysdrive + "\\Users\\{0}\\Desktop\\fortrace\\".format(user)
try:
# Parameter:
# /c ignore errors
# /e copies all subdirectories, including emtpy ones
# /y overwrites existing files
# /q supresses output
subprocess.call(["CMD", "/c", "Xcopy", fortrace_p, fortrace_target_p, "/c", "/e", "/y", "/q"])
except Exception as e:
self.logger.error("Copying fortrace data to new users Desktop failed: " + lineno() + ' ' + str(e))
self.logger.info(self.__class__.__name__ +
"::CreateStartupLink")
# set necessary paths for Link creation
link_dir = "{0}\\Users\\{1}\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup".format(
sysdrive, user)
link_name = sysdrive + "\\Users\\{0}\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\Installfortrace.lnk".format(
user)
link_target = sysdrive + "\\Users\\{0}\\Desktop\\fortrace\\install_tools\\autoinstall.bat".format(user)
psexec_p = sysdrive + "\\Users\\{0}\\Desktop\\fortrace\\contrib\\windows-utils\\PsExec64.exe".format(currentUser)
try:
os.mkdir(link_dir)
subprocess.call(
[psexec_p, "-u", user, "-p", password, "-nobanner", "-accepteula", "cmd", "/c", "MKLINK", link_name,
link_target])
except Exception as e:
self.logger.error("Link for automatic installation could not be created: " + lineno() + ' ' + str(e))
def __disablePasswordExpiration(self, user):
"""
Disable the password expiration for a new user
@param user: Name of the user account for that the expiration should be disabled
Function is not in use at the moment, keep if "expired password" Error appears again
"""
self.logger.info(self.__class__.__name__ +
"::disablePasswordExpiration")
try:
subprocess.call(["CMD", "/c", "WMIC", "USERACCOUNT", "WHERE", "NAME=\'{0}\'".format(user), "SET",
"PasswordExpires=FALSE"])
except Exception as e:
self.logger.error("disabling Passwort expiration was not possible: " + lineno() + ' ' + str(e))
def __getAdmingroupname(self):
"""
Identify the default system language and therefore return the name of the Admin-group
"""
self.logger.info(self.__class__.__name__ +
"::getAdminGroupName")
language_code = 0
group = "Administrators"
try:
# Get system language and extract the language code
output = subprocess.check_output(["CMD", "/c", "WMIC", "OS", "GET", "oslanguage"])
output = str(output)
language_code = re.findall(r'\d+', output)[0]
except Exception as e:
self.logger.error("Language could not be read from system: " + lineno() + ' ' + str(e))
if language_code == 0:
self.logger.error("No Language Code was extracted")
self.logger.debug("::Returning default language group Administrators")
group = "Administrators"
return group
elif language_code == "1031":
self.logger.info("::System language is german")
self.logger.debug("::Returning group Administratoren")
group = "Administratoren"
return group
elif language_code == "1033":
self.logger.info("::System language is english")
self.logger.debug("::Returning group Administrators")
group = "Administrators"
return group
else:
# installation should be english, therefore the default group will be Administrators
self.logger.error("unsupported system language code \"{0}\", trying to use default group".format(language_code))
self.logger.debug("::Returning default language group Administrators")
group = "Administrators"
return group
def __deleteDirectory(self, directory):
"""
Removes target directory
@param directory: target directory to delete
"""
try:
subprocess.call(["CMD", "/c", "rmdir", directory, "/S", "/Q"])
self.logger.debug(self.__class__.__name__ + "::userfiles deleted")
except Exception as e:
self.window_is_crushed = True
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " error")
self.logger.error("Could not delete userfiles:: " + lineno() + ' ' + str(e))
def __secureDelete(self, target):
"""
Secure deletion of a file or directory using the cipher command
@param target: Target to delete
"""
self.logger.info(self.__class__.__name__ +
"::secureDelete")
self.logger.debug(self.__class__.__name__ +
"::securely deleting" + target)
sysdrive = os.getenv("SystemDrive")
user = getpass.getuser()
sdelete_p = "{0}\\Users\\{1}\\Desktop\\fortrace\\contrib\\windows-utils\\sdelete64.exe".format(sysdrive, user)
try:
self.logger.debug(self.__class__.__name__ + "::Secure Deleting user files. This may taka a while...")
self.agent_object.send("application " + self.module_name + " " + str(
self.window_id) + "Secure Deleting user files. This may taka a while...")
self.agent_object.send("application " + self.module_name + " " + str(
self.window_id) + "Secure Deleting {0}".format(target))
# Secure delete Files at provided path
# -s Recurse subdirectories (if directory)
# -p Number of times to overwrite
# -r Remove Read-Only attribute.
# -q run without listing deleted files
subprocess.call([sdelete_p, "-s", "-r", "-q", "-p", "1", "-nobanner", "-accepteula", target])
except Exception as e:
self.window_is_crushed = True
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " error")
self.agent_object.send("application " + self.module_name + " " + str(self.window_id) + " secure deletion was not possible")
self.logger.error("Could not delete target:: " + lineno() + ' ' + str(e))
###############################################################################
# Commands to parse on guest side
###############################################################################
class UserManagementGuestSideCommands(ApplicationGuestSideCommands):
"""
Class with all commands for one application.
call the ask method for an object. The call will be done by a thread, so if the timeout is
reached, the open application will be closed and opened again.
Static only.
"""
@staticmethod
def commands(agent_obj, obj, cmd): # commands(obj, cmd) obj from list objlist[window_id] win id in cmd[1]?
try:
agent_obj.logger.info("static function UserManagementGuestSideCommands::commands")
agent_obj.logger.debug("command to parse: " + cmd)
com = cmd.split(" ")
if len(com) > 3:
args = " ".join(com[3:])
module = com[0] # inspect.stack()[-1][1].split(".")[0]
window_id = com[1]
method_string = com[2]
method_found = False
methods = inspect.getmembers(obj, predicate=inspect.ismethod)
for method in methods:
# method[0] will now contain the name of the method
# method[1] will contain the value
if method[0] == method_string:
# start methods as threads
method_found = True
agent_obj.logger.debug("method to call: " + method[0] + "(" + args + ")")
agent_obj.logger.debug("args")
tmp_thread = threading.Thread(target=method[1], args=(args,))
agent_obj.logger.debug("thread is defined")
tmp_thread.start()
agent_obj.logger.debug("thread started")
# increased timeout for secure deletion of user files
tmp_thread.join(3600) # Wait until the thread is completed
if tmp_thread.is_alive():
# close userManagement and set obj to crashed
agent_obj.logger.error("thread is alive... time outed")
agent_obj.logger.info(
"UserManagementGuestSideCommands::commands: Close all open windows and " + "clear the userManagement list")
subprocess.call(["taskkill", "/IM", "userManagement.exe", "/F"])
for obj in agent_obj.applicationWindow[module]:
agent_obj.applicationWindow[module].remove(obj)
# set a crushed flag.
obj.is_opened = False
obj.is_busy = False
obj.has_error = True
agent_obj.logger.info("application " + module + " " + str(window_id) + " error")
agent_obj.send("application " + module + " " + str(window_id) + " error")
if not method_found:
raise Exception("Method " + method_string + " is not defined!")
except Exception as e:
raise Exception("Error in UserManagementGuestSideCommands::commands " + str(e))
| [
1,
529,
276,
1112,
420,
29958,
29881,
559,
29883,
29914,
2831,
11591,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29941,
29899,
29906,
29900,
29896,
29946,
529,
5813,
29958,
13,
29937,
910,
934,
338,
760,
310,
363,
15003,
448,
1732,
597,
3921,
25525,
29889,
29888,
5365,
29889,
29882,
29899,
1388,
29889,
311,
13,
29937,
2823,
278,
934,
525,
2640,
29914,
27888,
1430,
1660,
29915,
363,
17596,
10751,
29889,
13,
29937,
3382,
2164,
491,
529,
5813,
29958,
297,
29871,
29906,
29900,
29906,
29896,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
2202,
29901,
13,
1678,
1053,
12183,
13,
1678,
1053,
10876,
13,
1678,
1053,
7481,
13,
1678,
1053,
3244,
292,
13,
1678,
1053,
1014,
5014,
13,
1678,
1053,
16096,
29871,
396,
363,
18028,
599,
1158,
310,
263,
770,
13,
1678,
1053,
2967,
29953,
29946,
13,
1678,
1053,
337,
13,
13,
1678,
1053,
4832,
29889,
13529,
267,
29889,
29883,
29925,
860,
280,
13,
13,
1678,
396,
2967,
770,
478,
7428,
2625,
13,
1678,
515,
363,
15003,
29889,
6214,
29889,
6214,
1053,
8427,
29963,
4317,
23908,
13,
1678,
515,
363,
15003,
29889,
6214,
29889,
6214,
1053,
8427,
29963,
4317,
23908,
5261,
4167,
13,
13,
1678,
396,
13,
1678,
1053,
363,
15003,
29889,
329,
1793,
29889,
23945,
280,
20907,
408,
1374,
13,
1678,
1053,
363,
15003,
29889,
329,
1793,
29889,
2543,
342,
2230,
408,
330,
29873,
13,
13,
1678,
396,
2967,
770,
17838,
2625,
13,
1678,
515,
363,
15003,
29889,
6214,
29889,
6214,
1053,
8427,
9485,
342,
23908,
13,
1678,
515,
363,
15003,
29889,
6214,
29889,
6214,
1053,
8427,
9485,
342,
23908,
5261,
4167,
13,
1678,
515,
363,
15003,
29889,
329,
1793,
29889,
1220,
1053,
6276,
8154,
13,
13,
1678,
396,
3883,
2702,
24802,
13,
1678,
1053,
2897,
29889,
2084,
13,
1678,
1053,
679,
3364,
13,
13,
19499,
16032,
2392,
408,
19282,
29901,
13,
1678,
1596,
29898,
703,
17518,
1059,
29991,
297,
1404,
27107,
29889,
2272,
376,
718,
851,
29898,
347,
4961,
13,
1678,
6876,
29898,
29896,
29897,
13,
13,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
29937,
16956,
2625,
5314,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
1990,
4911,
27107,
29963,
4317,
23908,
29898,
4873,
29963,
4317,
23908,
1125,
13,
1678,
9995,
13,
1678,
910,
770,
338,
263,
7592,
2761,
373,
278,
3495,
29899,
2975,
304,
2761,
263,
1855,
529,
1792,
27107,
29958,
13,
1678,
2734,
373,
263,
17838,
29889,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
17838,
29918,
5415,
29892,
6389,
1125,
13,
4706,
9995,
13,
4706,
3789,
2322,
5352,
1819,
871,
29889,
13,
4706,
732,
3207,
17838,
29918,
5415,
29901,
450,
17838,
373,
607,
445,
2280,
338,
2734,
29889,
313,
14043,
367,
15478,
515,
17838,
1057,
6214,
3101,
13,
4706,
732,
3207,
6389,
29901,
6943,
13,
462,
17927,
29901,
28468,
1024,
363,
12183,
29889,
13,
4706,
9995,
13,
4706,
1018,
29901,
13,
9651,
2428,
29898,
2659,
27107,
29963,
4317,
23908,
29892,
1583,
467,
1649,
2344,
12035,
2543,
342,
29918,
5415,
29892,
6389,
29897,
13,
9651,
1583,
29889,
21707,
29889,
3888,
703,
2220,
29901,
4911,
27107,
29963,
4317,
23908,
1057,
1649,
2344,
1649,
1159,
13,
9651,
1583,
29889,
7165,
29918,
333,
353,
6213,
13,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
12020,
8960,
29898,
13,
18884,
6276,
8154,
580,
718,
376,
4829,
29901,
4911,
27107,
8514,
23908,
1057,
1649,
2344,
1649,
376,
718,
1583,
29889,
2543,
342,
29918,
5415,
29889,
2543,
342,
978,
718,
376,
376,
718,
851,
29898,
29872,
876,
13,
13,
1678,
822,
1722,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
317,
1975,
263,
1899,
304,
1722,
263,
1404,
27107,
373,
278,
6942,
17838,
29889,
13,
4706,
9995,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
21707,
29889,
3888,
703,
2220,
29901,
4911,
27107,
29963,
4317,
23908,
1057,
3150,
1159,
13,
9651,
1583,
29889,
7165,
29918,
333,
353,
1583,
29889,
2543,
342,
29918,
5415,
29889,
3784,
29918,
7165,
29918,
333,
13,
9651,
1583,
29889,
2543,
342,
29918,
5415,
29889,
6717,
703,
6214,
376,
718,
376,
1792,
27107,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
1722,
16521,
29871,
396,
777,
4128,
13,
13,
9651,
1583,
29889,
2543,
342,
29918,
5415,
29889,
3784,
29918,
7165,
29918,
333,
4619,
29871,
29896,
13,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
12020,
8960,
703,
2704,
4911,
27107,
29963,
4317,
23908,
1057,
3150,
29901,
376,
718,
851,
29898,
29872,
876,
13,
13,
1678,
822,
3802,
29898,
1311,
1125,
13,
4706,
9995,
29903,
1975,
263,
1899,
304,
3802,
263,
529,
1792,
27107,
29958,
373,
278,
6942,
17838,
29889,
13,
4706,
9995,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
21707,
29889,
3888,
703,
2220,
29901,
4911,
27107,
29963,
4317,
23908,
1057,
5358,
1159,
13,
9651,
1583,
29889,
2543,
342,
29918,
5415,
29889,
6717,
703,
6214,
376,
718,
376,
1792,
27107,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
3802,
16521,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
12020,
8960,
703,
2704,
4911,
27107,
29963,
4317,
23908,
29901,
5358,
25318,
718,
851,
29898,
29872,
876,
13,
13,
1678,
822,
788,
2659,
29898,
1311,
29892,
1404,
29918,
978,
29892,
4800,
1125,
13,
4706,
9995,
13,
4706,
26221,
263,
4911,
373,
278,
17838,
1788,
29889,
25280,
881,
451,
13461,
29871,
29896,
29946,
4890,
13,
4706,
732,
3207,
1404,
29918,
978,
29901,
4408,
4932,
278,
1404,
304,
1653,
13,
4706,
732,
3207,
4800,
29901,
529,
25711,
17013,
29958,
13,
4706,
9995,
13,
4706,
565,
7431,
29898,
5630,
29897,
529,
29871,
29896,
29945,
470,
4800,
338,
6213,
29901,
13,
9651,
1018,
29901,
13,
18884,
1583,
29889,
21707,
29889,
3888,
703,
2220,
29901,
4911,
27107,
29963,
4317,
23908,
29901,
1202,
2659,
1159,
13,
18884,
1583,
29889,
21707,
29889,
8382,
703,
2528,
292,
1404,
376,
718,
1404,
29918,
978,
718,
12159,
4800,
29901,
376,
718,
4800,
29897,
13,
18884,
1274,
353,
8853,
4855,
29918,
978,
1115,
1404,
29918,
978,
29892,
13,
462,
418,
376,
5630,
1115,
4800,
29913,
13,
18884,
282,
695,
29918,
562,
353,
1374,
29889,
3188,
29953,
29946,
23945,
280,
29898,
562,
29897,
13,
18884,
282,
695,
29918,
562,
353,
282,
695,
29918,
562,
29889,
13808,
580,
13,
18884,
282,
29893,
29918,
9006,
353,
376,
6214,
1404,
27107,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
788,
2659,
376,
718,
282,
695,
29918,
562,
13,
18884,
1583,
29889,
275,
29918,
8262,
29891,
353,
5852,
13,
18884,
1583,
29889,
2543,
342,
29918,
5415,
29889,
6717,
29898,
29886,
29893,
29918,
9006,
29897,
13,
9651,
5174,
8960,
408,
321,
29901,
13,
18884,
12020,
8960,
703,
2704,
4911,
27107,
29963,
4317,
23908,
29901,
1202,
2659,
376,
718,
851,
29898,
29872,
876,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
21707,
29889,
2704,
29898,
13,
18884,
376,
2220,
29901,
4911,
27107,
29963,
4317,
23908,
1057,
1202,
2659,
5229,
29901,
25280,
429,
29872,
5779,
7472,
6969,
3309,
470,
694,
4800,
338,
4944,
1159,
13,
13,
1678,
822,
1735,
2659,
29898,
1311,
29892,
1404,
29918,
978,
29892,
4800,
29922,
8516,
1125,
13,
4706,
9995,
13,
4706,
10726,
278,
1404,
393,
674,
367,
13817,
297,
304,
1156,
2446,
22538,
13,
4706,
732,
3207,
1404,
29918,
978,
29901,
4408,
310,
278,
1404,
393,
674,
367,
731,
472,
6136,
13,
4706,
732,
3207,
4800,
29901,
25280,
310,
278,
1404,
3633,
13,
4706,
9995,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
21707,
29889,
3888,
703,
2220,
29901,
4911,
27107,
29963,
4317,
23908,
29901,
3167,
2659,
1159,
13,
9651,
1583,
29889,
21707,
29889,
8382,
703,
2697,
376,
718,
1404,
29918,
978,
718,
376,
294,
2322,
1120,
520,
442,
1404,
1159,
13,
9651,
1274,
353,
8853,
4855,
29918,
978,
1115,
1404,
29918,
978,
29892,
13,
462,
29871,
376,
5630,
1115,
4800,
29913,
13,
9651,
282,
695,
29918,
562,
353,
1374,
29889,
3188,
29953,
29946,
23945,
280,
29898,
562,
29897,
13,
9651,
282,
695,
29918,
562,
353,
282,
695,
29918,
562,
29889,
13808,
580,
13,
9651,
282,
29893,
29918,
9006,
353,
376,
6214,
1404,
27107,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
1735,
2659,
376,
718,
282,
695,
29918,
562,
13,
9651,
1583,
29889,
275,
29918,
8262,
29891,
353,
5852,
13,
9651,
1583,
29889,
2543,
342,
29918,
5415,
29889,
6717,
29898,
29886,
29893,
29918,
9006,
29897,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
12020,
8960,
703,
2704,
4911,
27107,
29963,
4317,
23908,
29901,
3167,
2659,
1159,
13,
13,
1678,
822,
5217,
2659,
29898,
1311,
29892,
1404,
29918,
978,
29892,
270,
29918,
1853,
1125,
13,
4706,
9995,
13,
4706,
897,
1026,
292,
263,
4911,
373,
278,
17838,
1788,
13,
4706,
732,
3207,
1404,
29918,
978,
29901,
4408,
310,
278,
1404,
304,
5217,
13,
4706,
732,
3207,
270,
29918,
1853,
29901,
5167,
310,
21228,
1404,
848,
4852,
17462,
613,
376,
8143,
613,
376,
24216,
1159,
13,
4706,
9995,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
21707,
29889,
3888,
703,
2220,
29901,
4911,
27107,
29963,
4317,
23908,
29901,
8143,
2659,
1159,
13,
9651,
1583,
29889,
21707,
29889,
8382,
703,
311,
1026,
292,
1404,
29908,
718,
1404,
29918,
978,
718,
12159,
7374,
291,
1134,
6160,
718,
270,
29918,
1853,
29897,
13,
9651,
1274,
353,
8853,
4855,
29918,
978,
1115,
1404,
29918,
978,
29892,
13,
462,
29871,
376,
6144,
29918,
1853,
1115,
270,
29918,
1853,
29913,
13,
9651,
282,
695,
29918,
562,
353,
1374,
29889,
3188,
29953,
29946,
23945,
280,
29898,
562,
29897,
13,
9651,
282,
695,
29918,
562,
353,
282,
695,
29918,
562,
29889,
13808,
580,
13,
9651,
282,
29893,
29918,
9006,
353,
376,
6214,
1404,
27107,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
5217,
2659,
376,
718,
282,
695,
29918,
562,
13,
9651,
1583,
29889,
275,
29918,
8262,
29891,
353,
5852,
13,
9651,
1583,
29889,
2543,
342,
29918,
5415,
29889,
6717,
29898,
29886,
29893,
29918,
9006,
29897,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
12020,
8960,
703,
2704,
4911,
27107,
29963,
4317,
23908,
29901,
8143,
2659,
580,
376,
718,
851,
29898,
29872,
876,
13,
13,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
29937,
1876,
4167,
304,
6088,
373,
3495,
2625,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
1990,
4911,
27107,
29963,
4317,
23908,
5261,
4167,
29898,
4873,
29963,
4317,
23908,
5261,
4167,
1125,
13,
1678,
9995,
13,
1678,
4134,
411,
599,
8260,
363,
529,
1792,
27107,
29958,
607,
674,
367,
4520,
515,
278,
10823,
373,
278,
17838,
29889,
13,
1678,
624,
2454,
871,
29889,
13,
1678,
9995,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
8260,
29898,
2543,
342,
29918,
5415,
29892,
9920,
1125,
13,
4706,
396,
9920,
29961,
29900,
29962,
353,
5401,
29918,
333,
29936,
9920,
29961,
29896,
29962,
353,
2106,
13,
4706,
3883,
29918,
978,
353,
376,
1792,
27107,
29908,
13,
4706,
17838,
29918,
5415,
29889,
21707,
29889,
8382,
703,
2659,
27107,
29963,
4317,
23908,
5261,
4167,
1057,
26381,
29901,
376,
718,
9920,
29897,
13,
4706,
9920,
353,
9920,
29889,
5451,
703,
16521,
13,
4706,
1018,
29901,
13,
9651,
565,
376,
3150,
287,
29908,
297,
9920,
29961,
29896,
5387,
13,
18884,
17838,
29918,
5415,
29889,
21707,
29889,
8382,
703,
262,
6496,
1159,
13,
18884,
363,
5446,
297,
17838,
29918,
5415,
29889,
6214,
5907,
29961,
5453,
29918,
978,
5387,
13,
462,
1678,
565,
9920,
29961,
29900,
29962,
1275,
851,
29898,
5415,
29889,
7165,
29918,
333,
1125,
13,
462,
4706,
17838,
29918,
5415,
29889,
21707,
29889,
8382,
703,
7165,
29918,
333,
29901,
376,
718,
851,
29898,
5415,
29889,
7165,
29918,
333,
29897,
718,
376,
1476,
29991,
1159,
13,
462,
4706,
17838,
29918,
5415,
29889,
21707,
29889,
3888,
29898,
5453,
29918,
978,
718,
376,
411,
1178,
29901,
376,
718,
851,
29898,
5415,
29889,
7165,
29918,
333,
29897,
718,
376,
338,
29918,
3150,
287,
353,
1565,
1159,
13,
462,
4706,
5446,
29889,
275,
29918,
3150,
287,
353,
5852,
13,
462,
4706,
17838,
29918,
5415,
29889,
21707,
29889,
8382,
703,
5415,
29889,
275,
29918,
3150,
287,
338,
5852,
1286,
29991,
1159,
13,
13,
9651,
565,
376,
8262,
29891,
29908,
297,
9920,
29961,
29896,
5387,
13,
18884,
17838,
29918,
5415,
29889,
21707,
29889,
8382,
703,
262,
19587,
1159,
13,
18884,
363,
5446,
297,
17838,
29918,
5415,
29889,
6214,
5907,
29961,
5453,
29918,
978,
5387,
13,
462,
1678,
565,
9920,
29961,
29900,
29962,
1275,
851,
29898,
5415,
29889,
7165,
29918,
333,
1125,
13,
462,
4706,
17838,
29918,
5415,
29889,
21707,
29889,
3888,
29898,
5453,
29918,
978,
718,
376,
411,
1178,
29901,
376,
718,
851,
29898,
5415,
29889,
7165,
29918,
333,
29897,
718,
376,
338,
29918,
8262,
29891,
353,
1565,
1159,
13,
462,
4706,
5446,
29889,
275,
29918,
8262,
29891,
353,
5852,
13,
13,
9651,
565,
376,
2040,
29908,
297,
9920,
29961,
29896,
5387,
13,
18884,
17838,
29918,
5415,
29889,
21707,
29889,
8382,
703,
262,
7960,
1159,
13,
18884,
363,
5446,
297,
17838,
29918,
5415,
29889,
6214,
5907,
29961,
5453,
29918,
978,
5387,
13,
462,
1678,
565,
9920,
29961,
29900,
29962,
1275,
851,
29898,
5415,
29889,
7165,
29918,
333,
1125,
13,
462,
4706,
17838,
29918,
5415,
29889,
21707,
29889,
3888,
29898,
5453,
29918,
978,
718,
376,
411,
1178,
29901,
376,
718,
851,
29898,
5415,
29889,
7165,
29918,
333,
29897,
718,
376,
338,
29918,
8262,
29891,
353,
2089,
1159,
13,
462,
4706,
5446,
29889,
275,
29918,
8262,
29891,
353,
7700,
13,
13,
9651,
565,
376,
2704,
29908,
297,
9920,
29961,
29896,
5387,
13,
18884,
17838,
29918,
5415,
29889,
21707,
29889,
8382,
703,
262,
1059,
1159,
13,
18884,
363,
5446,
297,
17838,
29918,
5415,
29889,
6214,
5907,
29961,
5453,
29918,
978,
5387,
13,
462,
1678,
565,
9920,
29961,
29900,
29962,
1275,
851,
29898,
5415,
29889,
7165,
29918,
333,
1125,
13,
462,
4706,
17838,
29918,
5415,
29889,
21707,
29889,
3888,
29898,
5453,
29918,
978,
718,
376,
411,
1178,
29901,
376,
718,
851,
29898,
5415,
29889,
7165,
29918,
333,
29897,
718,
376,
756,
29918,
2704,
353,
5852,
1159,
13,
462,
4706,
5446,
29889,
5349,
29918,
2704,
353,
5852,
13,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
12020,
8960,
29898,
5453,
29918,
978,
718,
11119,
3069,
29918,
2975,
29918,
26381,
1057,
26381,
376,
718,
851,
29898,
29872,
876,
13,
13,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
29937,
2088,
342,
2625,
5314,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
1990,
4911,
27107,
9485,
342,
23908,
29898,
4873,
9485,
342,
23908,
1125,
13,
1678,
9995,
29966,
1792,
27107,
29958,
5314,
310,
278,
17838,
2625,
29889,
13,
13,
1678,
26991,
3852,
29892,
8074,
17838,
29915,
29879,
13,
1678,
770,
8393,
13,
1678,
3474,
29918,
333,
448,
450,
3553,
363,
278,
6496,
1203,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
10823,
29918,
5415,
29892,
17927,
1125,
13,
4706,
2428,
29898,
2659,
27107,
9485,
342,
23908,
29892,
1583,
467,
1649,
2344,
12035,
14748,
29918,
5415,
29892,
17927,
29897,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
5453,
29918,
978,
353,
376,
1792,
27107,
29908,
13,
9651,
1583,
29889,
15619,
353,
6213,
13,
9651,
1583,
29889,
7165,
29918,
275,
29918,
7283,
15392,
353,
6213,
13,
9651,
1583,
29889,
7165,
29918,
333,
353,
6213,
13,
9651,
1583,
29889,
14748,
29918,
3318,
353,
10823,
29918,
5415,
13,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
12020,
8960,
703,
2392,
297,
376,
718,
1583,
17255,
1990,
1649,
17255,
978,
1649,
718,
13,
462,
9651,
29242,
376,
718,
851,
29898,
29872,
876,
13,
13,
1678,
822,
1722,
29898,
1311,
29892,
6389,
1125,
13,
4706,
9995,
13,
4706,
4673,
263,
529,
1792,
27107,
29958,
322,
4078,
278,
1404,
27107,
1203,
411,
385,
1178,
297,
263,
8600,
29889,
13,
4706,
3789,
1813,
2254,
11815,
304,
29871,
29941,
29900,
6923,
29889,
13,
13,
4706,
736,
29901,
13,
4706,
15076,
304,
278,
3495,
297,
278,
2998,
304,
367,
1781,
2106,
29901,
13,
4706,
525,
6214,
529,
1792,
27107,
29958,
3474,
29918,
333,
1722,
4286,
13,
4706,
525,
6214,
529,
1792,
27107,
29958,
3474,
29918,
333,
7960,
4286,
13,
4706,
297,
278,
1059,
2106,
29901,
13,
4706,
525,
6214,
529,
1792,
27107,
29958,
3474,
29918,
333,
1059,
4286,
13,
4706,
6124,
635,
278,
525,
7165,
29918,
275,
29918,
7283,
15392,
29915,
5352,
338,
731,
29936,
577,
278,
2446,
13,
4706,
1246,
674,
1722,
263,
716,
3474,
29889,
13,
13,
4706,
9995,
13,
4706,
1018,
29901,
13,
9651,
6273,
353,
6389,
29889,
5451,
703,
16521,
13,
9651,
722,
353,
6273,
29961,
29900,
29962,
13,
9651,
722,
29906,
353,
6273,
29961,
29896,
29962,
13,
13,
9651,
1583,
29889,
21707,
29889,
3888,
29898,
1311,
29889,
5453,
29918,
978,
718,
376,
9485,
342,
23908,
1057,
3150,
1159,
13,
9651,
565,
722,
1275,
376,
1853,
1115,
13,
18884,
1583,
29889,
21707,
29889,
8382,
703,
10685,
363,
1369,
4911,
27107,
856,
1159,
13,
18884,
396,
1369,
2280,
529,
26050,
1026,
291,
29958,
13,
18884,
1583,
29889,
21707,
29889,
8382,
703,
2962,
287,
29991,
1159,
13,
9651,
25342,
722,
1275,
376,
1853,
29906,
1115,
13,
18884,
1583,
29889,
21707,
29889,
8382,
703,
10685,
363,
1369,
4911,
27107,
856,
1159,
13,
18884,
396,
1369,
2280,
529,
26050,
1026,
291,
29958,
13,
18884,
1583,
29889,
21707,
29889,
8382,
703,
2962,
287,
29991,
1159,
13,
9651,
1683,
29901,
13,
18884,
1583,
29889,
21707,
29889,
2704,
703,
26050,
1026,
291,
1134,
376,
718,
722,
718,
13,
462,
462,
29871,
376,
451,
8762,
1159,
13,
18884,
736,
13,
13,
9651,
396,
3638,
777,
2472,
1048,
278,
1404,
27107,
2106,
13,
9651,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
6496,
1159,
13,
13,
9651,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
7960,
1159,
13,
9651,
1583,
29889,
7165,
29918,
275,
29918,
7283,
15392,
353,
7700,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1583,
29889,
21707,
29889,
3888,
703,
2659,
27107,
9485,
342,
23908,
1057,
3150,
29901,
23186,
599,
1722,
5417,
322,
2821,
278,
1404,
27107,
1051,
1159,
13,
9651,
1014,
5014,
29889,
4804,
29898,
3366,
7662,
21174,
613,
5591,
7833,
613,
376,
1792,
27107,
29889,
8097,
613,
5591,
29943,
20068,
13,
9651,
396,
363,
5446,
297,
1583,
29889,
14748,
29918,
3318,
29889,
6214,
5907,
29961,
1311,
29889,
5453,
29918,
978,
5387,
13,
9651,
396,
1678,
1583,
29889,
14748,
29918,
5415,
29889,
6214,
5907,
29961,
1311,
29889,
5453,
29918,
978,
1822,
5992,
29898,
5415,
29897,
13,
9651,
396,
731,
263,
2181,
15392,
7353,
29889,
13,
9651,
1583,
29889,
7165,
29918,
275,
29918,
7283,
15392,
353,
5852,
13,
9651,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
1059,
1159,
13,
9651,
1583,
29889,
21707,
29889,
2704,
703,
2392,
297,
376,
718,
1583,
17255,
1990,
1649,
17255,
978,
1649,
718,
376,
1057,
3150,
29908,
718,
29242,
18866,
338,
2181,
15392,
29901,
376,
718,
851,
29898,
29872,
876,
13,
13,
1678,
822,
3802,
29898,
1311,
1125,
13,
4706,
9995,
11123,
697,
2183,
3474,
491,
3474,
29918,
333,
15945,
29908,
13,
4706,
1583,
29889,
21707,
29889,
3888,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
13,
462,
308,
376,
1057,
5358,
16521,
13,
4706,
1583,
29889,
27373,
12376,
29889,
28358,
580,
13,
13,
1678,
822,
788,
2659,
29898,
1311,
29892,
6389,
1125,
13,
4706,
9995,
13,
4706,
788,
263,
716,
1404,
3633,
304,
17838,
322,
19012,
363,
15003,
11161,
363,
393,
1404,
13,
4706,
9995,
13,
4706,
1583,
29889,
21707,
29889,
3888,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
13,
462,
308,
376,
1057,
1202,
2659,
16521,
13,
4706,
594,
353,
1374,
29889,
3188,
29953,
29946,
348,
23945,
280,
29898,
5085,
29897,
13,
4706,
1404,
353,
594,
3366,
4855,
29918,
978,
3108,
13,
4706,
4800,
353,
594,
3366,
5630,
3108,
13,
4706,
565,
7481,
29889,
5205,
580,
1275,
376,
7685,
1115,
13,
9651,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
29898,
13,
18884,
376,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
4969,
1404,
29901,
376,
718,
1404,
718,
376,
448,
4800,
29901,
376,
718,
4800,
29897,
13,
9651,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
19587,
1159,
13,
9651,
1583,
17255,
3258,
2659,
29898,
1792,
29892,
4800,
29897,
13,
9651,
396,
788,
716,
1404,
304,
2318,
6343,
4097,
13,
9651,
2318,
353,
1583,
17255,
657,
3253,
4056,
29878,
1132,
978,
580,
13,
9651,
1583,
17255,
2972,
2528,
29898,
1792,
29892,
2318,
29897,
13,
9651,
396,
1653,
1404,
3271,
3884,
13,
9651,
1583,
17255,
3258,
11184,
9170,
29898,
1792,
29892,
4800,
29897,
13,
9651,
396,
3509,
363,
15003,
848,
304,
716,
4160,
2726,
6883,
322,
9025,
2471,
8225,
373,
937,
6464,
13,
9651,
1583,
17255,
8552,
23271,
362,
10547,
29898,
1792,
29892,
4800,
29897,
13,
9651,
396,
731,
716,
1404,
408,
6136,
13,
9651,
1583,
29889,
21707,
29889,
3888,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
13,
462,
632,
376,
1057,
2659,
2825,
16521,
13,
9651,
396,
2767,
17838,
14334,
13,
9651,
330,
2481,
353,
330,
29873,
29889,
657,
9485,
342,
2481,
580,
13,
9651,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
2230,
426,
29900,
29913,
1642,
4830,
29898,
29887,
2481,
876,
13,
9651,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
7960,
1159,
13,
9651,
1583,
29889,
7165,
29918,
275,
29918,
7283,
15392,
353,
7700,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
7165,
29918,
275,
29918,
7283,
15392,
353,
5852,
13,
9651,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
1059,
1159,
13,
9651,
1583,
29889,
21707,
29889,
2704,
703,
14148,
2184,
28096,
29892,
871,
3852,
338,
6969,
472,
278,
3256,
1159,
13,
13,
1678,
396,
14402,
29901,
3462,
2984,
304,
1735,
1404,
4292,
936,
13,
1678,
822,
1735,
2659,
29898,
1311,
29892,
6389,
1125,
13,
4706,
9995,
13,
4706,
10726,
278,
1404,
29892,
393,
674,
367,
13817,
297,
746,
278,
1788,
8665,
701,
2446,
931,
29889,
13,
4706,
9995,
13,
4706,
1583,
29889,
21707,
29889,
3888,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
13,
462,
308,
376,
1057,
3167,
2659,
1159,
13,
4706,
594,
353,
1374,
29889,
3188,
29953,
29946,
348,
23945,
280,
29898,
5085,
29897,
13,
4706,
1404,
353,
594,
3366,
4855,
29918,
978,
3108,
13,
4706,
4800,
353,
594,
3366,
5630,
3108,
13,
4706,
565,
7481,
29889,
5205,
580,
1275,
376,
7685,
1115,
13,
9651,
565,
4800,
338,
6213,
29901,
13,
18884,
4800,
353,
5124,
13,
9651,
1480,
265,
29918,
2084,
353,
376,
29950,
10818,
29918,
16652,
1964,
29918,
1529,
3210,
8895,
1966,
6156,
7818,
12982,
1525,
1966,
11277,
1966,
7685,
405,
29911,
1966,
7583,
6594,
1966,
17734,
1188,
265,
29908,
13,
9651,
1018,
29901,
13,
18884,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
29898,
13,
462,
1678,
376,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
678,
9776,
6136,
4911,
373,
2446,
22538,
304,
29901,
376,
718,
1404,
29897,
13,
18884,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
19587,
1159,
13,
18884,
1014,
5014,
29889,
4804,
29898,
3366,
29907,
5773,
613,
5591,
29883,
613,
376,
1727,
613,
376,
17744,
613,
1480,
265,
29918,
2084,
29892,
5591,
29894,
613,
376,
12300,
12754,
3403,
265,
613,
5591,
29873,
613,
376,
18166,
29918,
29903,
29999,
613,
5591,
29881,
613,
376,
29896,
613,
5591,
29888,
20068,
13,
18884,
1014,
5014,
29889,
4804,
29898,
3366,
29907,
5773,
613,
5591,
29883,
613,
376,
1727,
613,
376,
17744,
613,
1480,
265,
29918,
2084,
29892,
5591,
29894,
613,
376,
4592,
28129,
613,
5591,
29873,
613,
376,
18166,
29918,
29903,
29999,
613,
5591,
29881,
613,
1404,
29892,
5591,
29888,
20068,
13,
18884,
1014,
5014,
29889,
4804,
29898,
3366,
29907,
5773,
613,
5591,
29883,
613,
376,
1727,
613,
376,
17744,
613,
1480,
265,
29918,
2084,
29892,
5591,
29894,
613,
376,
4592,
10048,
613,
5591,
29873,
613,
376,
18166,
29918,
29903,
29999,
613,
5591,
29881,
613,
4800,
29892,
5591,
29888,
20068,
13,
18884,
396,
5504,
2088,
342,
14334,
13,
18884,
330,
2481,
353,
330,
29873,
29889,
657,
9485,
342,
2481,
580,
13,
18884,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
2230,
426,
29900,
29913,
1642,
4830,
29898,
29887,
2481,
876,
13,
18884,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
7960,
1159,
13,
18884,
1583,
29889,
7165,
29918,
275,
29918,
7283,
15392,
353,
7700,
13,
9651,
5174,
8960,
408,
321,
29901,
13,
18884,
1583,
29889,
7165,
29918,
275,
29918,
7283,
15392,
353,
5852,
13,
18884,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
1059,
1159,
13,
18884,
1583,
29889,
21707,
29889,
2704,
703,
23323,
451,
731,
376,
718,
1404,
718,
376,
408,
2322,
1120,
520,
442,
1404,
29901,
376,
718,
6276,
8154,
580,
718,
525,
525,
718,
851,
29898,
29872,
876,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
7165,
29918,
275,
29918,
7283,
15392,
353,
5852,
13,
9651,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
1059,
1159,
13,
9651,
1583,
29889,
21707,
29889,
2704,
703,
14148,
2184,
28096,
29892,
871,
3852,
338,
6969,
472,
278,
3256,
1159,
13,
13,
1678,
822,
5217,
2659,
29898,
1311,
29892,
6389,
1125,
13,
4706,
9995,
13,
4706,
21267,
1404,
515,
278,
1788,
13,
4706,
9995,
13,
4706,
1583,
29889,
21707,
29889,
3888,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
13,
462,
308,
376,
1057,
12498,
2659,
1159,
13,
4706,
396,
6597,
11842,
9331,
13,
4706,
594,
353,
1374,
29889,
3188,
29953,
29946,
348,
23945,
280,
29898,
5085,
29897,
13,
4706,
1404,
353,
594,
3366,
4855,
29918,
978,
3108,
13,
4706,
270,
29918,
1853,
353,
594,
3366,
6144,
29918,
1853,
3108,
13,
4706,
565,
7481,
29889,
5205,
580,
1275,
376,
7685,
1115,
13,
9651,
1583,
29889,
21707,
29889,
8382,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
376,
1057,
2772,
1026,
291,
1542,
29901,
376,
718,
270,
29918,
1853,
29897,
13,
9651,
4660,
353,
7700,
13,
9651,
396,
5399,
565,
1404,
338,
5279,
13817,
297,
13,
9651,
10110,
353,
679,
3364,
29889,
657,
1792,
580,
13,
9651,
565,
10110,
29889,
21064,
580,
1275,
1404,
29889,
21064,
7295,
13,
18884,
1583,
29889,
21707,
29889,
2704,
703,
2659,
2609,
5217,
3528,
1159,
13,
18884,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
1059,
1159,
13,
18884,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
1404,
2609,
5217,
3528,
1159,
13,
9651,
396,
21267,
1404,
13,
9651,
1683,
29901,
13,
18884,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
29898,
13,
462,
1678,
376,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
897,
1026,
292,
4911,
29901,
376,
718,
1404,
718,
376,
448,
7374,
291,
1134,
29901,
376,
718,
270,
29918,
1853,
29897,
13,
18884,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
19587,
1159,
13,
18884,
1018,
29901,
13,
462,
1678,
1014,
5014,
29889,
4804,
29898,
3366,
29907,
5773,
613,
5591,
29883,
613,
376,
1212,
613,
376,
1792,
613,
1404,
29892,
5591,
8143,
20068,
13,
462,
1678,
1583,
29889,
21707,
29889,
8382,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
376,
1057,
2659,
2772,
22742,
1159,
13,
462,
1678,
4660,
353,
5852,
13,
18884,
5174,
8960,
408,
321,
29901,
13,
462,
1678,
1583,
29889,
7165,
29918,
275,
29918,
7283,
15392,
353,
5852,
13,
462,
1678,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
1059,
1159,
13,
462,
1678,
1583,
29889,
21707,
29889,
2704,
703,
23323,
451,
5217,
1404,
376,
718,
1404,
718,
29242,
376,
718,
851,
29898,
29872,
876,
13,
13,
9651,
396,
5217,
2066,
1156,
21228,
278,
1404,
13,
9651,
565,
4660,
29901,
13,
18884,
1583,
29889,
21707,
29889,
3888,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
376,
1057,
12498,
2659,
10547,
310,
1404,
29901,
426,
29900,
29913,
1642,
4830,
29898,
1792,
876,
13,
18884,
10876,
21594,
353,
2897,
29889,
657,
6272,
703,
3924,
29928,
4401,
1159,
13,
18884,
1404,
29918,
3921,
25525,
29918,
2084,
353,
29850,
29900,
9952,
5959,
1966,
29912,
29896,
9952,
17600,
1966,
3921,
25525,
1642,
4830,
29898,
9675,
21594,
29892,
1404,
29897,
13,
18884,
1404,
29918,
3921,
25525,
29918,
1300,
520,
442,
353,
29850,
29900,
9952,
5959,
1966,
29912,
29896,
9952,
27674,
1966,
9588,
11500,
1966,
11277,
1966,
7685,
1966,
4763,
20019,
1966,
9283,
29879,
1966,
4763,
786,
1966,
2962,
9485,
342,
19661,
29889,
3083,
29895,
1642,
4830,
29898,
9675,
21594,
29892,
1404,
29897,
13,
18884,
1404,
29918,
3921,
25525,
29918,
4691,
353,
29850,
29900,
9952,
5959,
1966,
29912,
29896,
9952,
27674,
1966,
9588,
11500,
1966,
11980,
1642,
4830,
29898,
9675,
21594,
29892,
1404,
29897,
13,
18884,
3271,
9170,
353,
29850,
29900,
9952,
5959,
1966,
29912,
29896,
29913,
1642,
4830,
29898,
9675,
21594,
29892,
1404,
29897,
13,
18884,
396,
11592,
5217,
363,
15003,
29899,
1272,
304,
10032,
24238,
29879,
13,
18884,
1018,
29901,
13,
462,
1678,
1583,
29889,
21707,
29889,
8382,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
376,
1057,
311,
1026,
292,
363,
15003,
3884,
1159,
13,
462,
1678,
1583,
17255,
24216,
12498,
29898,
1792,
29918,
3921,
25525,
29918,
2084,
29897,
13,
462,
1678,
1583,
29889,
21707,
29889,
8382,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
376,
1057,
3921,
25525,
3884,
11132,
1159,
13,
462,
1678,
1583,
29889,
21707,
29889,
8382,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
376,
1057,
311,
1026,
292,
1120,
520,
442,
1544,
1159,
13,
462,
1678,
396,
269,
8143,
2609,
5217,
263,
5829,
293,
1544,
13,
462,
1678,
1014,
5014,
29889,
4804,
29898,
3366,
29907,
5773,
613,
5591,
29883,
613,
376,
6144,
613,
1404,
29918,
3921,
25525,
29918,
1300,
520,
442,
29892,
5591,
29888,
613,
5591,
29939,
20068,
13,
462,
1678,
396,
1311,
17255,
24216,
12498,
9882,
703,
5931,
29912,
29900,
1012,
29908,
1642,
4830,
29898,
1792,
29918,
3921,
25525,
29918,
1300,
520,
442,
876,
13,
462,
1678,
396,
1311,
17255,
24216,
12498,
29898,
1792,
29918,
3921,
25525,
29918,
1300,
520,
442,
29897,
13,
462,
1678,
1583,
29889,
21707,
29889,
8382,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
376,
1057,
6595,
11132,
1159,
13,
462,
1678,
1583,
29889,
21707,
29889,
8382,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
376,
1057,
311,
1026,
292,
5132,
3268,
29899,
8318,
1159,
13,
462,
1678,
1583,
17255,
24216,
12498,
29898,
1792,
29918,
3921,
25525,
29918,
4691,
29897,
13,
462,
1678,
1583,
29889,
21707,
29889,
8382,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
376,
1057,
11980,
3268,
29899,
8318,
11132,
1159,
13,
18884,
5174,
8960,
408,
321,
29901,
13,
462,
1678,
1583,
29889,
7165,
29918,
275,
29918,
7283,
15392,
353,
5852,
13,
462,
1678,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
1059,
1159,
13,
462,
1678,
1583,
29889,
21707,
29889,
2704,
703,
23323,
451,
1120,
520,
442,
29899,
6595,
376,
718,
1404,
718,
29242,
376,
718,
851,
29898,
29872,
876,
13,
13,
18884,
396,
897,
8204,
920,
304,
4386,
1404,
3271,
3884,
13,
18884,
565,
270,
29918,
1853,
29889,
21064,
580,
1275,
376,
6059,
15488,
1115,
13,
462,
1678,
1583,
29889,
21707,
29889,
8382,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
376,
1057,
12498,
2659,
10547,
29898,
29940,
12413,
25760,
13,
18884,
25342,
270,
29918,
1853,
29889,
21064,
580,
1275,
376,
2287,
18476,
1115,
13,
462,
1678,
1583,
29889,
21707,
29889,
8382,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
376,
1057,
12498,
2659,
10547,
29898,
15227,
25760,
13,
462,
1678,
1583,
17255,
8143,
9882,
29898,
5184,
9170,
29897,
13,
18884,
25342,
270,
29918,
1853,
29889,
21064,
580,
1275,
376,
1660,
29907,
11499,
1115,
13,
462,
1678,
1583,
29889,
21707,
29889,
8382,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
376,
1057,
12498,
2659,
10547,
29898,
24216,
25760,
13,
462,
1678,
1583,
17255,
24216,
12498,
29898,
5184,
9170,
29897,
13,
462,
1678,
396,
14402,
29901,
3349,
14725,
304,
5217,
563,
29872,
1026,
519,
2401,
1469,
360,
12935,
13,
462,
1678,
1014,
5014,
29889,
4804,
29898,
3366,
29907,
5773,
613,
5591,
29883,
613,
376,
5499,
613,
5591,
29879,
613,
5591,
29939,
613,
3271,
9170,
2314,
13,
462,
1678,
396,
6222,
317,
12498,
8951,
304,
9801,
278,
2401,
1272,
29905,
2997,
3884,
338,
11132,
408,
1532,
13,
18884,
1683,
29901,
13,
462,
1678,
1583,
29889,
21707,
29889,
2704,
703,
29956,
29373,
24953,
363,
1404,
934,
7374,
291,
29889,
19152,
292,
1404,
2066,
29991,
1159,
13,
9651,
330,
2481,
353,
330,
29873,
29889,
657,
9485,
342,
2481,
580,
13,
9651,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
2230,
426,
29900,
29913,
1642,
4830,
29898,
29887,
2481,
876,
13,
9651,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
7960,
1159,
13,
9651,
1583,
29889,
7165,
29918,
275,
29918,
7283,
15392,
353,
7700,
13,
13,
1678,
822,
4770,
3258,
2659,
29898,
1311,
29892,
1404,
29892,
4800,
1125,
13,
4706,
9995,
13,
4706,
6204,
263,
716,
1404,
3633,
373,
278,
1788,
13,
4706,
732,
3207,
1404,
29901,
4408,
310,
278,
716,
1404,
13,
4706,
732,
3207,
4800,
29901,
25280,
310,
278,
529,
25711,
17013,
29958,
13,
4706,
9995,
13,
4706,
1018,
29901,
13,
9651,
1014,
5014,
29889,
4804,
29898,
3366,
29907,
5773,
613,
5591,
29883,
613,
376,
6006,
613,
376,
11889,
613,
1404,
29892,
4800,
29892,
5591,
17744,
20068,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1583,
29889,
21707,
29889,
2704,
703,
4676,
1404,
5229,
29901,
376,
718,
6276,
8154,
580,
718,
525,
525,
718,
851,
29898,
29872,
876,
13,
13,
1678,
822,
4770,
2972,
2528,
29898,
1311,
29892,
1404,
29892,
2318,
1125,
13,
4706,
396,
7561,
29877,
29901,
2318,
3349,
13,
4706,
9995,
13,
4706,
3462,
263,
1404,
304,
263,
5923,
2318,
13,
4706,
732,
3207,
1404,
29901,
4911,
978,
304,
788,
13,
4706,
732,
3207,
2318,
29901,
4408,
310,
278,
2318,
304,
393,
278,
1404,
674,
367,
2715,
13,
4706,
9995,
13,
4706,
1583,
29889,
21707,
29889,
3888,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
13,
462,
308,
376,
1057,
2972,
2528,
1159,
13,
4706,
1018,
29901,
13,
9651,
1014,
5014,
29889,
4804,
29898,
3366,
29907,
5773,
613,
5591,
29883,
613,
376,
6006,
613,
376,
16652,
1964,
26284,
613,
2318,
29892,
1404,
29892,
5591,
17744,
20068,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1583,
29889,
21707,
29889,
2704,
703,
29907,
5773,
613,
5591,
29883,
613,
376,
2659,
376,
718,
1404,
718,
376,
26680,
451,
367,
2715,
304,
2318,
376,
718,
2318,
718,
29242,
376,
718,
6276,
8154,
580,
718,
525,
525,
718,
851,
29898,
29872,
876,
13,
13,
1678,
822,
4770,
3258,
11184,
9170,
29898,
1311,
29892,
1404,
29892,
4800,
1125,
13,
4706,
9995,
13,
4706,
6204,
278,
1404,
3884,
373,
278,
1788,
13,
4706,
732,
3207,
1404,
29901,
4408,
310,
278,
716,
1404,
13,
4706,
732,
3207,
4800,
29901,
529,
25711,
17013,
29958,
278,
529,
25711,
17013,
29958,
13,
4706,
9995,
13,
4706,
1583,
29889,
21707,
29889,
3888,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
13,
462,
308,
376,
1057,
3258,
11184,
9170,
1159,
13,
4706,
396,
1423,
565,
8778,
29899,
9882,
2307,
4864,
13,
4706,
396,
1423,
363,
1788,
7899,
5497,
13,
4706,
10876,
21594,
353,
2897,
29889,
657,
6272,
703,
3924,
29928,
4401,
1159,
13,
4706,
565,
2897,
29889,
2084,
29889,
9933,
29898,
9675,
21594,
718,
376,
22298,
5959,
1966,
29908,
718,
1404,
1125,
13,
9651,
1583,
29889,
21707,
29889,
8382,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
13,
462,
795,
376,
1057,
11184,
9170,
338,
2307,
5923,
1159,
13,
9651,
736,
13,
4706,
1683,
29901,
13,
9651,
396,
4889,
11265,
310,
1404,
17525,
491,
2734,
1899,
297,
1404,
3030,
13,
9651,
1857,
2659,
353,
679,
3364,
29889,
657,
1792,
580,
13,
9651,
10927,
29916,
687,
29918,
29886,
353,
10876,
21594,
718,
376,
1966,
5959,
1966,
29912,
29900,
9952,
17600,
1966,
3921,
25525,
1966,
21570,
1966,
10499,
29899,
13239,
1966,
29925,
29879,
5379,
29953,
29946,
29889,
8097,
1642,
4830,
29898,
3784,
2659,
29897,
13,
9651,
281,
13076,
29918,
29886,
353,
10876,
21594,
718,
376,
1966,
7685,
1966,
5205,
29941,
29906,
1966,
29893,
29890,
331,
1966,
29893,
13076,
29908,
13,
9651,
1018,
29901,
13,
18884,
396,
13246,
385,
3852,
15057,
2799,
15461,
362,
4867,
29892,
607,
338,
4153,
5764,
1449,
13,
18884,
396,
445,
338,
3307,
304,
1653,
278,
716,
4160,
3271,
3884,
13,
18884,
396,
24953,
29901,
13,
18884,
396,
448,
29884,
29901,
4911,
13,
18884,
396,
448,
29886,
29901,
25280,
13,
18884,
396,
448,
29876,
711,
7310,
24028,
562,
13300,
371,
2497,
29901,
21301,
19039,
1962,
13,
18884,
1014,
5014,
29889,
4804,
4197,
29886,
14167,
687,
29918,
29886,
29892,
11663,
29884,
613,
1404,
29892,
11663,
29886,
613,
4800,
29892,
11663,
29876,
711,
7310,
613,
11663,
562,
13300,
371,
2497,
613,
281,
13076,
29918,
29886,
29892,
376,
13356,
1806,
20068,
13,
9651,
5174,
8960,
408,
321,
29901,
13,
18884,
1583,
29889,
21707,
29889,
2704,
703,
9832,
1218,
8778,
18862,
363,
1404,
376,
718,
1404,
718,
376,
26061,
29901,
376,
718,
6276,
8154,
580,
718,
525,
525,
718,
851,
29898,
29872,
876,
13,
13,
1678,
822,
4770,
8552,
23271,
362,
10547,
29898,
1311,
29892,
1404,
29892,
4800,
1125,
13,
4706,
9995,
13,
4706,
14187,
278,
363,
15003,
4138,
304,
263,
716,
4160,
14616,
29892,
577,
372,
508,
367,
5130,
322,
8283,
13,
4706,
732,
3207,
1404,
29901,
4408,
310,
278,
716,
1404,
13,
4706,
732,
3207,
4800,
29901,
25280,
310,
278,
529,
25711,
17013,
29958,
1404,
13,
4706,
9995,
13,
4706,
1583,
29889,
21707,
29889,
3888,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
13,
462,
308,
376,
1057,
8552,
23271,
362,
10547,
1159,
13,
4706,
10876,
21594,
353,
2897,
29889,
657,
6272,
703,
3924,
29928,
4401,
1159,
13,
4706,
1857,
2659,
353,
679,
3364,
29889,
657,
1792,
580,
13,
4706,
363,
15003,
29918,
29886,
353,
10876,
21594,
718,
376,
1966,
5959,
1966,
29912,
29900,
9952,
17600,
1966,
3921,
25525,
1642,
4830,
29898,
3784,
2659,
29897,
13,
4706,
363,
15003,
29918,
5182,
29918,
29886,
353,
10876,
21594,
718,
376,
1966,
5959,
1966,
29912,
29900,
9952,
17600,
1966,
3921,
25525,
1966,
1642,
4830,
29898,
1792,
29897,
13,
4706,
1018,
29901,
13,
9651,
396,
24953,
29901,
13,
9651,
396,
847,
29883,
11455,
4436,
13,
9651,
396,
847,
29872,
14591,
599,
1014,
11851,
3842,
29892,
3704,
953,
29873,
2272,
6743,
13,
9651,
396,
847,
29891,
975,
8231,
267,
5923,
2066,
13,
9651,
396,
847,
29939,
480,
2139,
267,
1962,
13,
9651,
1014,
5014,
29889,
4804,
29898,
3366,
29907,
5773,
613,
5591,
29883,
613,
376,
29990,
8552,
613,
363,
15003,
29918,
29886,
29892,
363,
15003,
29918,
5182,
29918,
29886,
29892,
5591,
29883,
613,
5591,
29872,
613,
5591,
29891,
613,
5591,
29939,
20068,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1583,
29889,
21707,
29889,
2704,
703,
11882,
292,
363,
15003,
848,
304,
716,
4160,
2726,
6883,
5229,
29901,
376,
718,
6276,
8154,
580,
718,
525,
525,
718,
851,
29898,
29872,
876,
13,
4706,
1583,
29889,
21707,
29889,
3888,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
13,
462,
308,
376,
1057,
4391,
4763,
786,
6595,
1159,
13,
4706,
396,
731,
5181,
10898,
363,
6645,
11265,
13,
4706,
1544,
29918,
3972,
353,
29850,
29900,
9952,
5959,
1966,
29912,
29896,
9952,
27674,
1966,
9588,
11500,
1966,
11277,
1966,
7685,
1966,
4763,
20019,
1966,
9283,
29879,
1966,
4763,
786,
1642,
4830,
29898,
13,
9651,
10876,
21594,
29892,
1404,
29897,
13,
4706,
1544,
29918,
978,
353,
10876,
21594,
718,
376,
1966,
5959,
1966,
29912,
29900,
9952,
27674,
1966,
9588,
11500,
1966,
11277,
1966,
7685,
1966,
4763,
20019,
1966,
9283,
29879,
1966,
4763,
786,
1966,
23271,
3921,
25525,
29889,
3083,
29895,
1642,
4830,
29898,
13,
9651,
1404,
29897,
13,
4706,
1544,
29918,
5182,
353,
10876,
21594,
718,
376,
1966,
5959,
1966,
29912,
29900,
9952,
17600,
1966,
3921,
25525,
1966,
6252,
29918,
8504,
1966,
6921,
6252,
29889,
10222,
1642,
4830,
29898,
1792,
29897,
13,
4706,
10927,
29916,
687,
29918,
29886,
353,
10876,
21594,
718,
376,
1966,
5959,
1966,
29912,
29900,
9952,
17600,
1966,
3921,
25525,
1966,
21570,
1966,
10499,
29899,
13239,
1966,
29925,
29879,
5379,
29953,
29946,
29889,
8097,
1642,
4830,
29898,
3784,
2659,
29897,
13,
13,
4706,
1018,
29901,
13,
9651,
2897,
29889,
11256,
3972,
29898,
2324,
29918,
3972,
29897,
13,
9651,
1014,
5014,
29889,
4804,
29898,
13,
18884,
518,
29886,
14167,
687,
29918,
29886,
29892,
11663,
29884,
613,
1404,
29892,
11663,
29886,
613,
4800,
29892,
11663,
29876,
711,
7310,
613,
11663,
562,
13300,
371,
2497,
613,
376,
9006,
613,
5591,
29883,
613,
376,
29924,
29968,
23714,
29968,
613,
1544,
29918,
978,
29892,
13,
462,
1544,
29918,
5182,
2314,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1583,
29889,
21707,
29889,
2704,
703,
6595,
363,
18428,
11161,
1033,
451,
367,
2825,
29901,
376,
718,
6276,
8154,
580,
718,
525,
525,
718,
851,
29898,
29872,
876,
13,
13,
1678,
822,
4770,
20472,
10048,
9544,
12232,
29898,
1311,
29892,
1404,
1125,
13,
4706,
9995,
13,
4706,
3295,
519,
278,
4800,
1518,
12232,
363,
263,
716,
1404,
13,
4706,
732,
3207,
1404,
29901,
4408,
310,
278,
1404,
3633,
363,
393,
278,
1518,
12232,
881,
367,
12708,
13,
4706,
6680,
338,
451,
297,
671,
472,
278,
3256,
29892,
3013,
565,
376,
4548,
2859,
4800,
29908,
4829,
5692,
1449,
13,
4706,
9995,
13,
4706,
1583,
29889,
21707,
29889,
3888,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
13,
462,
308,
376,
1057,
20472,
10048,
9544,
12232,
1159,
13,
4706,
1018,
29901,
13,
9651,
1014,
5014,
29889,
4804,
29898,
3366,
29907,
5773,
613,
5591,
29883,
613,
376,
26735,
2965,
613,
376,
11889,
2477,
18736,
613,
376,
22043,
613,
376,
5813,
2013,
29915,
29912,
29900,
1012,
29915,
1642,
4830,
29898,
1792,
511,
376,
10490,
613,
13,
462,
632,
376,
10048,
9544,
2658,
29922,
25717,
20068,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1583,
29889,
21707,
29889,
2704,
703,
2218,
17961,
6978,
17572,
1518,
12232,
471,
451,
1950,
29901,
376,
718,
6276,
8154,
580,
718,
525,
525,
718,
851,
29898,
29872,
876,
13,
13,
1678,
822,
4770,
657,
3253,
4056,
29878,
1132,
978,
29898,
1311,
1125,
13,
4706,
9995,
13,
539,
13355,
1598,
278,
2322,
1788,
4086,
322,
5480,
736,
278,
1024,
310,
278,
10229,
29899,
2972,
13,
539,
9995,
13,
4706,
1583,
29889,
21707,
29889,
3888,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
13,
462,
4706,
376,
1057,
657,
12754,
4782,
1170,
1159,
13,
4706,
4086,
29918,
401,
353,
29871,
29900,
13,
4706,
2318,
353,
376,
12754,
2132,
4097,
29908,
13,
4706,
1018,
29901,
13,
9651,
396,
3617,
1788,
4086,
322,
6597,
278,
4086,
775,
13,
9651,
1962,
353,
1014,
5014,
29889,
3198,
29918,
4905,
29898,
3366,
29907,
5773,
613,
5591,
29883,
613,
376,
26735,
2965,
613,
376,
3267,
613,
376,
7194,
613,
376,
359,
11675,
20068,
13,
9651,
1962,
353,
851,
29898,
4905,
29897,
13,
9651,
4086,
29918,
401,
353,
337,
29889,
2886,
497,
29898,
29878,
12764,
29881,
29974,
742,
1962,
9601,
29900,
29962,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1583,
29889,
21707,
29889,
2704,
703,
21233,
1033,
451,
367,
1303,
515,
1788,
29901,
376,
718,
6276,
8154,
580,
718,
525,
525,
718,
851,
29898,
29872,
876,
13,
4706,
565,
4086,
29918,
401,
1275,
29871,
29900,
29901,
13,
9651,
1583,
29889,
21707,
29889,
2704,
703,
3782,
17088,
5920,
471,
23892,
1159,
13,
9651,
1583,
29889,
21707,
29889,
8382,
703,
1057,
11609,
292,
2322,
4086,
2318,
24510,
4097,
1159,
13,
9651,
2318,
353,
376,
12754,
2132,
4097,
29908,
13,
9651,
736,
2318,
13,
4706,
25342,
4086,
29918,
401,
1275,
376,
29896,
29900,
29941,
29896,
1115,
13,
9651,
1583,
29889,
21707,
29889,
3888,
703,
1057,
3924,
4086,
338,
330,
3504,
1159,
13,
9651,
1583,
29889,
21707,
29889,
8382,
703,
1057,
11609,
292,
2318,
24510,
1061,
264,
1159,
13,
9651,
2318,
353,
376,
12754,
2132,
1061,
264,
29908,
13,
9651,
736,
2318,
13,
4706,
25342,
4086,
29918,
401,
1275,
376,
29896,
29900,
29941,
29941,
1115,
13,
9651,
1583,
29889,
21707,
29889,
3888,
703,
1057,
3924,
4086,
338,
3033,
1674,
1159,
13,
9651,
1583,
29889,
21707,
29889,
8382,
703,
1057,
11609,
292,
2318,
24510,
4097,
1159,
13,
9651,
2318,
353,
376,
12754,
2132,
4097,
29908,
13,
9651,
736,
2318,
13,
4706,
1683,
29901,
13,
9651,
396,
11161,
881,
367,
3033,
1674,
29892,
5480,
278,
2322,
2318,
674,
367,
24510,
4097,
13,
9651,
1583,
29889,
21707,
29889,
2704,
703,
348,
23765,
1788,
4086,
775,
13218,
29912,
29900,
1012,
613,
1811,
304,
671,
2322,
2318,
1642,
4830,
29898,
11675,
29918,
401,
876,
13,
9651,
1583,
29889,
21707,
29889,
8382,
703,
1057,
11609,
292,
2322,
4086,
2318,
24510,
4097,
1159,
13,
9651,
2318,
353,
376,
12754,
2132,
4097,
29908,
13,
9651,
736,
2318,
13,
13,
1678,
822,
4770,
8143,
9882,
29898,
1311,
29892,
3884,
1125,
13,
4706,
9995,
13,
4706,
5240,
586,
267,
3646,
3884,
13,
4706,
732,
3207,
3884,
29901,
3646,
3884,
304,
5217,
13,
4706,
9995,
13,
4706,
1018,
29901,
13,
9651,
1014,
5014,
29889,
4804,
29898,
3366,
29907,
5773,
613,
5591,
29883,
613,
376,
1758,
3972,
613,
3884,
29892,
5591,
29903,
613,
5591,
29984,
20068,
13,
9651,
1583,
29889,
21707,
29889,
8382,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
376,
1057,
1792,
5325,
11132,
1159,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1583,
29889,
7165,
29918,
275,
29918,
7283,
15392,
353,
5852,
13,
9651,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
1059,
1159,
13,
9651,
1583,
29889,
21707,
29889,
2704,
703,
23323,
451,
5217,
1404,
5325,
1057,
376,
718,
6276,
8154,
580,
718,
525,
525,
718,
851,
29898,
29872,
876,
13,
13,
1678,
822,
4770,
24216,
12498,
29898,
1311,
29892,
3646,
1125,
13,
4706,
9995,
13,
4706,
5356,
545,
7374,
291,
310,
263,
934,
470,
3884,
773,
278,
4583,
8096,
1899,
13,
4706,
732,
3207,
3646,
29901,
17157,
304,
5217,
13,
4706,
9995,
13,
4706,
1583,
29889,
21707,
29889,
3888,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
13,
462,
4706,
376,
1057,
24216,
12498,
1159,
13,
4706,
1583,
29889,
21707,
29889,
8382,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
13,
462,
4706,
376,
1057,
24216,
368,
21228,
29908,
718,
3646,
29897,
13,
4706,
10876,
21594,
353,
2897,
29889,
657,
6272,
703,
3924,
29928,
4401,
1159,
13,
4706,
1404,
353,
679,
3364,
29889,
657,
1792,
580,
13,
4706,
269,
8143,
29918,
29886,
353,
29850,
29900,
9952,
5959,
1966,
29912,
29896,
9952,
17600,
1966,
3921,
25525,
1966,
21570,
1966,
10499,
29899,
13239,
1966,
29879,
8143,
29953,
29946,
29889,
8097,
1642,
4830,
29898,
9675,
21594,
29892,
1404,
29897,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
21707,
29889,
8382,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
718,
376,
1057,
7898,
545,
897,
1026,
292,
1404,
2066,
29889,
910,
1122,
1850,
29874,
263,
1550,
856,
1159,
13,
9651,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
13,
18884,
1583,
29889,
7165,
29918,
333,
29897,
718,
376,
7898,
545,
897,
1026,
292,
1404,
2066,
29889,
910,
1122,
1850,
29874,
263,
1550,
856,
1159,
13,
9651,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
13,
18884,
1583,
29889,
7165,
29918,
333,
29897,
718,
376,
7898,
545,
897,
1026,
292,
426,
29900,
29913,
1642,
4830,
29898,
5182,
876,
13,
9651,
396,
5356,
545,
5217,
12745,
472,
4944,
2224,
13,
9651,
396,
448,
29879,
3599,
332,
344,
1014,
11851,
3842,
313,
361,
3884,
29897,
13,
9651,
396,
448,
29886,
9681,
310,
3064,
304,
26556,
13,
9651,
396,
448,
29878,
15154,
7523,
29899,
11730,
5352,
29889,
13,
9651,
396,
448,
29939,
1065,
1728,
18028,
11132,
2066,
13,
9651,
1014,
5014,
29889,
4804,
4197,
29879,
8143,
29918,
29886,
29892,
11663,
29879,
613,
11663,
29878,
613,
11663,
29939,
613,
11663,
29886,
613,
376,
29896,
613,
11663,
29876,
711,
7310,
613,
11663,
562,
13300,
371,
2497,
613,
3646,
2314,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1583,
29889,
7165,
29918,
275,
29918,
7283,
15392,
353,
5852,
13,
9651,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
1059,
1159,
13,
9651,
1583,
29889,
14748,
29918,
3318,
29889,
6717,
703,
6214,
376,
718,
1583,
29889,
5453,
29918,
978,
718,
376,
376,
718,
851,
29898,
1311,
29889,
7165,
29918,
333,
29897,
718,
376,
11592,
7374,
291,
471,
451,
1950,
1159,
13,
9651,
1583,
29889,
21707,
29889,
2704,
703,
23323,
451,
5217,
3646,
1057,
376,
718,
6276,
8154,
580,
718,
525,
525,
718,
851,
29898,
29872,
876,
13,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
29937,
1876,
4167,
304,
6088,
373,
17838,
2625,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
1990,
4911,
27107,
9485,
342,
23908,
5261,
4167,
29898,
4873,
9485,
342,
23908,
5261,
4167,
1125,
13,
1678,
9995,
13,
1678,
4134,
411,
599,
8260,
363,
697,
2280,
29889,
13,
13,
1678,
1246,
278,
2244,
1158,
363,
385,
1203,
29889,
450,
1246,
674,
367,
2309,
491,
263,
3244,
29892,
577,
565,
278,
11815,
338,
13,
1678,
7450,
29892,
278,
1722,
2280,
674,
367,
5764,
322,
6496,
1449,
29889,
13,
1678,
624,
2454,
871,
29889,
13,
1678,
9995,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
8260,
29898,
14748,
29918,
5415,
29892,
5446,
29892,
9920,
1125,
29871,
396,
8260,
29898,
5415,
29892,
9920,
29897,
5446,
515,
1051,
5446,
1761,
29961,
7165,
29918,
333,
29962,
5401,
1178,
297,
9920,
29961,
29896,
29962,
29973,
13,
4706,
1018,
29901,
13,
9651,
10823,
29918,
5415,
29889,
21707,
29889,
3888,
703,
7959,
740,
4911,
27107,
9485,
342,
23908,
5261,
4167,
1057,
26381,
1159,
13,
9651,
10823,
29918,
5415,
29889,
21707,
29889,
8382,
703,
6519,
304,
6088,
29901,
376,
718,
9920,
29897,
13,
9651,
419,
353,
9920,
29889,
5451,
703,
16521,
13,
9651,
565,
7431,
29898,
510,
29897,
1405,
29871,
29941,
29901,
13,
18884,
6389,
353,
376,
11393,
7122,
29898,
510,
29961,
29941,
29901,
2314,
13,
13,
9651,
3883,
353,
419,
29961,
29900,
29962,
29871,
396,
16096,
29889,
1429,
580,
14352,
29896,
3816,
29896,
1822,
5451,
17350,
1159,
29961,
29900,
29962,
13,
9651,
3474,
29918,
333,
353,
419,
29961,
29896,
29962,
13,
9651,
1158,
29918,
1807,
353,
419,
29961,
29906,
29962,
13,
13,
9651,
1158,
29918,
11940,
353,
7700,
13,
9651,
3519,
353,
16096,
29889,
657,
28109,
29898,
5415,
29892,
24384,
29922,
1144,
1103,
29889,
1608,
959,
29897,
13,
13,
9651,
363,
1158,
297,
3519,
29901,
13,
18884,
396,
1158,
29961,
29900,
29962,
674,
1286,
1712,
278,
1024,
310,
278,
1158,
13,
18884,
396,
1158,
29961,
29896,
29962,
674,
1712,
278,
995,
13,
13,
18884,
565,
1158,
29961,
29900,
29962,
1275,
1158,
29918,
1807,
29901,
13,
462,
1678,
396,
1369,
3519,
408,
9717,
13,
462,
1678,
1158,
29918,
11940,
353,
5852,
13,
462,
1678,
10823,
29918,
5415,
29889,
21707,
29889,
8382,
703,
5696,
304,
1246,
29901,
376,
718,
1158,
29961,
29900,
29962,
718,
376,
703,
718,
6389,
718,
16521,
1159,
13,
462,
1678,
10823,
29918,
5415,
29889,
21707,
29889,
8382,
703,
5085,
1159,
13,
462,
1678,
13128,
29918,
7097,
353,
3244,
292,
29889,
4899,
29898,
5182,
29922,
5696,
29961,
29896,
1402,
6389,
7607,
5085,
29892,
876,
13,
462,
1678,
10823,
29918,
5415,
29889,
21707,
29889,
8382,
703,
7097,
338,
3342,
1159,
13,
462,
1678,
13128,
29918,
7097,
29889,
2962,
580,
13,
462,
1678,
10823,
29918,
5415,
29889,
21707,
29889,
8382,
703,
7097,
4687,
1159,
13,
462,
1678,
396,
11664,
11815,
363,
11592,
29871,
7374,
291,
310,
1404,
2066,
13,
462,
1678,
13128,
29918,
7097,
29889,
7122,
29898,
29941,
29953,
29900,
29900,
29897,
29871,
396,
20340,
2745,
278,
3244,
338,
8676,
13,
462,
1678,
565,
13128,
29918,
7097,
29889,
275,
29918,
284,
573,
7295,
13,
462,
4706,
396,
3802,
1404,
27107,
322,
731,
5446,
304,
8095,
287,
13,
462,
4706,
10823,
29918,
5415,
29889,
21707,
29889,
2704,
703,
7097,
338,
18758,
856,
931,
714,
287,
1159,
13,
462,
4706,
10823,
29918,
5415,
29889,
21707,
29889,
3888,
29898,
13,
462,
9651,
376,
2659,
27107,
9485,
342,
23908,
5261,
4167,
1057,
26381,
29901,
23186,
599,
1722,
5417,
322,
376,
718,
376,
8551,
278,
1404,
27107,
1051,
1159,
13,
462,
4706,
1014,
5014,
29889,
4804,
29898,
3366,
7662,
21174,
613,
5591,
7833,
613,
376,
1792,
27107,
29889,
8097,
613,
5591,
29943,
20068,
13,
462,
4706,
363,
5446,
297,
10823,
29918,
5415,
29889,
6214,
5907,
29961,
5453,
5387,
13,
462,
9651,
10823,
29918,
5415,
29889,
6214,
5907,
29961,
5453,
1822,
5992,
29898,
5415,
29897,
13,
462,
4706,
396,
731,
263,
2181,
15392,
7353,
29889,
13,
462,
4706,
5446,
29889,
275,
29918,
3150,
287,
353,
7700,
13,
462,
4706,
5446,
29889,
275,
29918,
8262,
29891,
353,
7700,
13,
462,
4706,
5446,
29889,
5349,
29918,
2704,
353,
5852,
13,
13,
462,
4706,
10823,
29918,
5415,
29889,
21707,
29889,
3888,
703,
6214,
376,
718,
3883,
718,
376,
376,
718,
851,
29898,
7165,
29918,
333,
29897,
718,
376,
1059,
1159,
13,
462,
4706,
10823,
29918,
5415,
29889,
6717,
703,
6214,
376,
718,
3883,
718,
376,
376,
718,
851,
29898,
7165,
29918,
333,
29897,
718,
376,
1059,
1159,
13,
13,
9651,
565,
451,
1158,
29918,
11940,
29901,
13,
18884,
12020,
8960,
703,
4062,
376,
718,
1158,
29918,
1807,
718,
376,
338,
451,
3342,
29991,
1159,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
12020,
8960,
703,
2392,
297,
4911,
27107,
9485,
342,
23908,
5261,
4167,
1057,
26381,
376,
718,
851,
29898,
29872,
876,
13,
2
] |
example.py | davehenton/tf-lyrics | 0 | 34601 | <gh_stars>0
from tflyrics import Poet, LyricsGenerator
artists = ['<NAME>', '<NAME>', 'The Beatles']
gen = LyricsGenerator(artists, per_artist=5)
ds = gen.as_dataset(batch_size=4)
p = Poet()
p.train_on(ds, n_epochs=10)
poem = p.generate(start_string='Hey ', n_gen_chars=1000)
print(poem)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
15886,
368,
10817,
1053,
3929,
300,
29892,
365,
4316,
1199,
21575,
13,
13,
442,
2879,
353,
6024,
29966,
5813,
29958,
742,
12801,
5813,
29958,
742,
525,
1576,
18573,
793,
2033,
13,
1885,
353,
365,
4316,
1199,
21575,
29898,
442,
2879,
29892,
639,
29918,
442,
391,
29922,
29945,
29897,
13,
6289,
353,
2531,
29889,
294,
29918,
24713,
29898,
16175,
29918,
2311,
29922,
29946,
29897,
13,
13,
29886,
353,
3929,
300,
580,
13,
29886,
29889,
14968,
29918,
265,
29898,
6289,
29892,
302,
29918,
1022,
2878,
29879,
29922,
29896,
29900,
29897,
13,
1129,
331,
353,
282,
29889,
17158,
29898,
2962,
29918,
1807,
2433,
29950,
1032,
13420,
302,
29918,
1885,
29918,
305,
1503,
29922,
29896,
29900,
29900,
29900,
29897,
13,
2158,
29898,
1129,
331,
29897,
13,
2
] |
pkmn_type_scrapper.py | Cesar-Miranda/Pkm_Scrapper_DataAnalysis | 0 | 53772 | import scrapy
from scrapy.crawler import CrawlerProcess
def pkm_spider():
class PkmSpider(scrapy.Spider):
name = 'pkms'
def start_requests(self):
yield scrapy.Request('https://bulbapedia.bulbagarden.net/wiki/Bulbasaur_(Pok%C3%A9mon)')
def parse(self, response):
items = {}
# name = response.css('span.CurrentConditions--tempValue--1RYJJ::text').extract()
name = str(response.css('h1.firstHeading::text').get(default='Not Applicable').strip())[:-10]
next_pkm = str(response.xpath('//*[@id="mw-content-text"]/div/table[1]/tbody/tr[2]/td[3]/table/tbody/tr/td[1]/a/span/text()').get(default='Not Applicable').strip())[6:]
if next_pkm == 'plicable':
next_pkm = str(response.xpath('//*[@id="mw-content-text"]/div/table[1]/tbody/tr[1]/td[3]/table/tbody/tr/td[1]/a/span/text()').get(default='Not Applicable').strip())[6:]
else:
pass
type1 = response.xpath('//*[@id="mw-content-text"]/div/table[2]/tbody/tr[2]/td/table/tbody/tr/td[1]/table/tbody/tr/td[1]/a/span/b/text()').get(default='Not Applicable').strip()
type2 = response.xpath('//*[@id="mw-content-text"]/div/table[2]/tbody/tr[2]/td/table/tbody/tr/td[1]/table/tbody/tr/td[2]/a/span/b/text()').get(default='Not Applicable').strip()
items['name'] = name
items['type1'] = type1
items['type2'] = type2
yield items
yield scrapy.Request(f'https://bulbapedia.bulbagarden.net/wiki/{next_pkm}_(Pok%C3%A9mon)', callback=self.parse)
process = CrawlerProcess(settings={
'FEED_URI': 'pkmns_name_type.csv',
'FEED_FORMAT': 'csv'
})
process.crawl(PkmSpider)
process.start()
if __name__ == "__main__":
pkm_spider()
| [
1,
1053,
24559,
2272,
13,
3166,
24559,
2272,
29889,
29883,
1610,
1358,
1053,
315,
1610,
1358,
7032,
13,
13,
1753,
282,
8848,
29918,
1028,
1241,
7295,
13,
1678,
770,
349,
8848,
5592,
1241,
29898,
1557,
336,
2272,
29889,
5592,
1241,
1125,
13,
4706,
1024,
353,
525,
20571,
1516,
29915,
13,
13,
4706,
822,
1369,
29918,
24830,
29898,
1311,
1125,
13,
9651,
7709,
24559,
2272,
29889,
3089,
877,
991,
597,
8645,
29890,
481,
1381,
29889,
8645,
23156,
7879,
29889,
1212,
29914,
4594,
29914,
29933,
352,
6500,
6698,
23538,
29925,
554,
29995,
29907,
29941,
29995,
29909,
29929,
3712,
29897,
1495,
13,
13,
4706,
822,
6088,
29898,
1311,
29892,
2933,
1125,
13,
9651,
4452,
353,
6571,
13,
9651,
396,
1024,
353,
2933,
29889,
4268,
877,
9653,
29889,
7583,
10983,
2187,
489,
7382,
1917,
489,
29896,
13207,
29967,
29967,
1057,
726,
2824,
21111,
580,
13,
9651,
1024,
353,
851,
29898,
5327,
29889,
4268,
877,
29882,
29896,
29889,
4102,
5494,
292,
1057,
726,
2824,
657,
29898,
4381,
2433,
3664,
2401,
506,
519,
2824,
17010,
3101,
7503,
29899,
29896,
29900,
29962,
13,
9651,
2446,
29918,
29886,
8848,
353,
851,
29898,
5327,
29889,
23635,
877,
458,
29930,
17548,
333,
543,
29885,
29893,
29899,
3051,
29899,
726,
3108,
29914,
4563,
29914,
2371,
29961,
29896,
16261,
15370,
29914,
509,
29961,
29906,
16261,
1594,
29961,
29941,
16261,
2371,
29914,
15370,
29914,
509,
29914,
1594,
29961,
29896,
16261,
29874,
29914,
9653,
29914,
726,
580,
2824,
657,
29898,
4381,
2433,
3664,
2401,
506,
519,
2824,
17010,
3101,
29961,
29953,
17531,
13,
9651,
565,
2446,
29918,
29886,
8848,
1275,
525,
29886,
506,
519,
2396,
13,
18884,
2446,
29918,
29886,
8848,
353,
851,
29898,
5327,
29889,
23635,
877,
458,
29930,
17548,
333,
543,
29885,
29893,
29899,
3051,
29899,
726,
3108,
29914,
4563,
29914,
2371,
29961,
29896,
16261,
15370,
29914,
509,
29961,
29896,
16261,
1594,
29961,
29941,
16261,
2371,
29914,
15370,
29914,
509,
29914,
1594,
29961,
29896,
16261,
29874,
29914,
9653,
29914,
726,
580,
2824,
657,
29898,
4381,
2433,
3664,
2401,
506,
519,
2824,
17010,
3101,
29961,
29953,
17531,
13,
9651,
1683,
29901,
13,
18884,
1209,
13,
9651,
1134,
29896,
353,
2933,
29889,
23635,
877,
458,
29930,
17548,
333,
543,
29885,
29893,
29899,
3051,
29899,
726,
3108,
29914,
4563,
29914,
2371,
29961,
29906,
16261,
15370,
29914,
509,
29961,
29906,
16261,
1594,
29914,
2371,
29914,
15370,
29914,
509,
29914,
1594,
29961,
29896,
16261,
2371,
29914,
15370,
29914,
509,
29914,
1594,
29961,
29896,
16261,
29874,
29914,
9653,
29914,
29890,
29914,
726,
580,
2824,
657,
29898,
4381,
2433,
3664,
2401,
506,
519,
2824,
17010,
580,
13,
9651,
1134,
29906,
353,
2933,
29889,
23635,
877,
458,
29930,
17548,
333,
543,
29885,
29893,
29899,
3051,
29899,
726,
3108,
29914,
4563,
29914,
2371,
29961,
29906,
16261,
15370,
29914,
509,
29961,
29906,
16261,
1594,
29914,
2371,
29914,
15370,
29914,
509,
29914,
1594,
29961,
29896,
16261,
2371,
29914,
15370,
29914,
509,
29914,
1594,
29961,
29906,
16261,
29874,
29914,
9653,
29914,
29890,
29914,
726,
580,
2824,
657,
29898,
4381,
2433,
3664,
2401,
506,
519,
2824,
17010,
580,
13,
13,
9651,
4452,
1839,
978,
2033,
353,
1024,
13,
9651,
4452,
1839,
1853,
29896,
2033,
353,
1134,
29896,
13,
9651,
4452,
1839,
1853,
29906,
2033,
353,
1134,
29906,
13,
13,
9651,
7709,
4452,
13,
9651,
7709,
24559,
2272,
29889,
3089,
29898,
29888,
29915,
991,
597,
8645,
29890,
481,
1381,
29889,
8645,
23156,
7879,
29889,
1212,
29914,
4594,
19248,
4622,
29918,
29886,
8848,
2403,
29898,
29925,
554,
29995,
29907,
29941,
29995,
29909,
29929,
3712,
29897,
742,
6939,
29922,
1311,
29889,
5510,
29897,
13,
13,
13,
1678,
1889,
353,
315,
1610,
1358,
7032,
29898,
11027,
3790,
13,
4706,
525,
16359,
3352,
29918,
15551,
2396,
525,
29886,
8848,
1983,
29918,
978,
29918,
1853,
29889,
7638,
742,
13,
4706,
525,
16359,
3352,
29918,
19094,
1299,
2396,
525,
7638,
29915,
13,
1678,
5615,
13,
13,
1678,
1889,
29889,
29883,
1610,
29880,
29898,
29925,
8848,
5592,
1241,
29897,
13,
1678,
1889,
29889,
2962,
580,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
282,
8848,
29918,
1028,
1241,
580,
13,
2
] |
Posts/viewsAPI.py | CMPUT404-Fa21-Organization/CMPUT404-Project-Social-Distribution | 3 | 483 | from django.conf import settings
from django.core import serializers
from django.utils import timezone
import requests
from Posts.commentModel import Comments
#from Posts.commentView import add_Comment
from rest_framework import status
from rest_framework.decorators import api_view, authentication_classes, permission_classes
from rest_framework.response import Response
from django.shortcuts import HttpResponse, render
from requests import get
from .serializers import CommentSerializer, PostSerializer
from Author.serializers import LikeSerializer
from Author.models import Like
from Author.views import updateForeignAuthors, GetForeignAuthors
from .models import Post, Author
from .form import PostForm
from Posts.commentForm import CommentForm
import json
import uuid
import re
import base64
from django.db.models import Q
import django.core
from permissions import CustomAuthentication, AccessPermission
from django.core.paginator import Paginator
import traceback
def newPost(request, uid=None, auth_pk=None):
form = PostForm(request.POST, request.FILES)
if form.is_valid():
title = form.cleaned_data['title']
descirption = form.cleaned_data['description']
categories = form.cleaned_data['categories'].split(' ')
visibility = form.cleaned_data['visibility']
unlisted = form.cleaned_data['unlisted']
contentType = form.cleaned_data['contentType']
if contentType == "application/app":
content = request.FILES['file'].read() #Inputfile
elif contentType in ["image/png", "image/jpeg",]:
content = base64.b64encode(request.FILES['file'].read()) #Inputfile
else:
content = form.cleaned_data["text"]
source = settings.SERVER_URL + "/"
origin = settings.SERVER_URL + "/"
author_id = Author.objects.get(pk=auth_pk)
id = author_id.url
author = json.loads(serializers.serialize('json', Author.objects.filter(pk=auth_pk), fields=('type', 'id', 'host', 'displayName', 'url', 'github',)))[0]['fields']
if uid == None:
r_uid = uuid.uuid4().hex
uid = re.sub('-', '', r_uid)
id = id + '/posts/' + uid + "/"
comments_id = id + "comments/"
published = timezone.now()
posts = Post(pk=uid, id=id, author_id=author_id, author=author, title=title, source=source, origin=origin, description=descirption, contentType=contentType, count=0, size=10, categories=categories,visibility=visibility, unlisted=unlisted, published=published, content=content, comments=comments_id)
posts.save()
return True
else:
print(request.data)
print(form.errors)
print(form.data)
return False
def add_Comment(request, post_pk, auth_pk, uid=None):
form = CommentForm(request.POST, request.FILES)
if form.is_valid():
updateForeignAuthors()
published = timezone.now()
contentType = form.cleaned_data['contentType']
if contentType == "application/app":
content = request.FILES['file'].read() #Inputfile
elif contentType in ["image/png", "image/jpeg",]:
content = base64.b64encode(request.FILES['file'].read()) #Inputfile
else:
content = form.cleaned_data["text"]
author_id = json.loads(serializers.serialize('json', Author.objects.filter(email=auth_pk), fields=('type', 'id', 'host', 'displayName', 'url', 'github',)))[0]['fields']
post = Post.objects.get(pk = post_pk)
post_pk_str = post_pk
if uid == None:
r_uid = uuid.uuid4().hex
uid = re.sub('-', '', r_uid)
comment_id = getattr(post, 'comments') + uid
comments = Comments(pk=uid, id=comment_id, Post_pk=post, Post_pk_str = post_pk_str, auth_pk_str = auth_pk, author=author_id, size=10, published=published, contentType=contentType, content=content)
comments.save()
return True
else:
print(request.data)
return False
@api_view(['GET',])
@authentication_classes([CustomAuthentication])
@permission_classes([AccessPermission])
def PostLikesView(request, post_pk, auth_pk):
post = Post.objects.get(post_pk = post_pk)
author = Author.objects.get(pk = auth_pk)
likeObjs = Like.objects.filter(~Q(auth_pk = author), object = post.id)
Likes = LikeSerializer(likeObjs, read_only=True, many=True)
likes = []
for l in Likes.data:
like = {}
for key in l:
if(key != "context"):
like[key] = l[key]
like["@context"] = l["context"]
like["author"] = json.loads(django.core.serializers.serialize('json', Author.objects.filter(id=l["author"]), fields=('type', 'id', 'displayName', 'host', 'url', 'github',)))[0]['fields']
likes.append(like)
response_dict = {
"type": "likes",
"items": likes
}
return Response(response_dict)
@api_view(['GET', 'POST',])
@authentication_classes([CustomAuthentication])
@permission_classes([AccessPermission])
def PostsList(request, auth_pk=None):
page_number = request.GET.get('page')
if 'size' in request.GET:
page_size = request.GET.get('size')
else:
page_size = 5
if request.method == 'GET':
if auth_pk:
try:
author = Author.objects.get(auth_pk=auth_pk)
posts = Post.objects.filter(author_id=author, id__icontains = "linkedspace")
code = status.HTTP_200_OK
paginator = Paginator(posts, page_size)
page_obj = paginator.get_page(page_number)
data = PostSerializer(page_obj.object_list, many=True).data
except Exception as e:
print(e)
data = {}
code = status.HTTP_400_BAD_REQUEST
else:
code = status.HTTP_200_OK
posts = Post.objects.filter(id__icontains = "linkedspace")
paginator = Paginator(posts, page_size)
page_obj = paginator.get_page(page_number)
data = PostSerializer(page_obj.object_list, many=True).data
elif request.method == 'POST':
if newPost(request, auth_pk=request.data['auth_pk']):
code = status.HTTP_201_CREATED
post = Post.objects.latest("published")
data = PostSerializer(post).data
else:
code = status.HTTP_400_BAD_REQUEST
data = {}
return Response(data, code)
@api_view(['GET', 'POST',])
@authentication_classes([CustomAuthentication])
@permission_classes([AccessPermission])
def commentListView(request, post_pk, auth_pk=None):
page_number = request.GET.get('page')
if 'size' in request.GET:
page_size = request.GET.get('size')
else:
page_size = 5
if request.method == 'GET':
comments = Comments.objects.filter(Post_pk_str=post_pk)
post = Post.objects.get(pk=post_pk)
post_id = getattr(post, 'id')
comment_id = getattr(post, 'comments')
paginator = Paginator(comments, page_size)
page_obj = paginator.get_page(page_number)
serializer = CommentSerializer(page_obj.object_list, many=True)
response_dict = {
"type": "comments",
"page": page_number,
"size": page_size,
"post": post_id,
"id": comment_id,
"comments": serializer.data,
}
return Response(response_dict)
elif request.method == 'POST':
if add_Comment(request, post_pk=request.data['Post_pk'], auth_pk=request.data['auth_pk']):
code = status.HTTP_202_ACCEPTED
comment = Comments.objects.latest("published")
data = CommentSerializer(comment).data
else:
code = status.HTTP_400_BAD_REQUEST
data = {}
return Response(data, code)
@api_view(['GET', 'POST', 'PUT', 'DELETE', ])
@authentication_classes([CustomAuthentication])
@permission_classes([AccessPermission])
def PostDetail(request, post_pk, auth_pk=None):
page_number = request.GET.get('page')
if 'size' in request.GET:
page_size = request.GET.get('size')
else:
page_size = 5
if request.method == 'GET':
try:
code = status.HTTP_200_OK
post = Post.objects.get(post_pk=post_pk)
serializer = PostSerializer(post)
except Exception as e:
print(e)
code = status.HTTP_404_NOT_FOUND
post = Post.objects.all()
paginator = Paginator(post, page_size)
page_obj = paginator.get_page(page_number)
serializer = PostSerializer(page_obj.object_list, many=True)
elif request.method == 'POST':
try:
code = status.HTTP_200_OK
post = Post.objects.get(post_pk=post_pk)
if 'title' in request.data.keys():
post.title = request.data['title']
if 'description' in request.data.keys():
post.description = request.data['description']
if 'categories' in request.data.keys():
post.categories = request.data['categories'].split(' ')
if 'visibility' in request.data.keys():
post.visibility = request.data['visibility']
if 'unlisted' in request.data.keys():
post.unlisted = request.data['unlisted']
if 'contentType' in request.data.keys():
post.contentType = request.data['contentType']
if post.contentType == "application/app":
post.content = request.FILES['file'].read() #Inputfile
elif post.contentType in ["image/png", "image/jpeg",]:
post.content = base64.b64encode(request.FILES['file'].read()) #Inputfile
else:
post.content = request.data["text"]
post.save()
serializer = PostSerializer(post)
except Exception as e:
print(e)
code = status.HTTP_400_BAD_REQUEST
post = Post.objects.all()
paginator = Paginator(post, page_size)
page_obj = paginator.get_page(page_number)
serializer = PostSerializer(page_obj.object_list, many=True)
elif request.method == 'PUT':
try:
code = status.HTTP_201_CREATED
assert newPost(request, post_pk, request.data['auth_pk'])==True
post = Post.objects.get(post_pk=post_pk)
serializer = PostSerializer(post)
except Exception as e:
print(e)
code = status.HTTP_400_BAD_REQUEST
post = Post.objects.all()
paginator = Paginator(post, page_size)
page_obj = paginator.get_page(page_number)
serializer = PostSerializer(page_obj.object_list, many=True)
elif request.method == 'DELETE':
try:
post = Post.objects.get(post_pk=post_pk)
post.delete()
code = status.HTTP_200_OK
except Exception as e:
print(e)
code = status.HTTP_404_NOT_FOUND
post = Post.objects.all()
paginator = Paginator(post, page_size)
page_obj = paginator.get_page(page_number)
serializer = PostSerializer(page_obj.object_list, many=True)
return Response(serializer.data, code)
@api_view(['GET', 'POST', ])
@authentication_classes([CustomAuthentication])
@permission_classes([AccessPermission])
def commentDetail(request, post_pk, comment_pk, auth_pk=None):
page_number = request.GET.get('page')
if 'size' in request.GET:
page_size = request.GET.get('size')
else:
page_size = 5
if request.method == 'GET':
try:
code = status.HTTP_200_OK
comment = Comments.objects.get(pk=comment_pk)
serializer = CommentSerializer(comment)
except Exception as e:
print(e)
code = status.HTTP_404_NOT_FOUND
comment = Comments.objects.all()
paginator = Paginator(comment, page_size)
page_obj = paginator.get_page(page_number)
serializer = CommentSerializer(page_obj.object_list, many=True)
elif request.method == 'POST':
try:
code = status.HTTP_200_OK
comment = Comments.objects.get(pk=comment_pk)
if 'contentType' in request.data.keys():
comment.contentType = request.data['contentType']
if 'text' in request.data.keys():
comment.content = request.data['text']
comment.save()
serializer = CommentSerializer(comment)
except Exception as e:
print(e)
code = status.HTTP_400_BAD_REQUEST
comment = Comments.objects.all()
paginator = Paginator(comment, page_size)
page_obj = paginator.get_page(page_number)
serializer = CommentSerializer(page_obj.object_list, many=True)
return Response(serializer.data, code)
@api_view(['GET',])
def connection(request, auth_id=None):
data = []
team3 = get('https://social-dis.herokuapp.com/posts', auth=('socialdistribution_t03','c404t03'))
if team3.status_code == 200:
data.append(team3.json())
team15 = get('https://unhindled.herokuapp.com/service/allposts/', auth=('connectionsuperuser','404connection'))
if team15.status_code == 200:
data.append(team15.json())
team17 = get('https://cmput404f21t17.herokuapp.com/service/connect/public/', auth=('4cbe2def-feaa-4bb7-bce5-<PASSWORD>','123456'))
if team17.status_code == 200:
data.append(team17.json())
return Response({'connection': data})
| [
1,
515,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
3221,
1053,
7797,
19427,
13,
3166,
9557,
29889,
13239,
1053,
29431,
13,
5215,
7274,
13,
3166,
4918,
29879,
29889,
9342,
3195,
1053,
461,
29879,
13,
29937,
3166,
4918,
29879,
29889,
9342,
1043,
1053,
788,
29918,
20001,
13,
3166,
1791,
29918,
4468,
1053,
4660,
13,
3166,
1791,
29918,
4468,
29889,
19557,
4097,
1053,
7882,
29918,
1493,
29892,
10760,
29918,
13203,
29892,
10751,
29918,
13203,
13,
3166,
1791,
29918,
4468,
29889,
5327,
1053,
13291,
13,
3166,
9557,
29889,
12759,
7582,
29879,
1053,
9056,
5103,
29892,
4050,
13,
3166,
7274,
1053,
679,
13,
3166,
869,
15550,
19427,
1053,
461,
17679,
29892,
4918,
17679,
13,
3166,
13361,
29889,
15550,
19427,
1053,
8502,
17679,
13,
3166,
13361,
29889,
9794,
1053,
8502,
13,
3166,
13361,
29889,
7406,
1053,
2767,
27755,
6444,
943,
29892,
3617,
27755,
6444,
943,
13,
3166,
869,
9794,
1053,
4918,
29892,
13361,
13,
3166,
869,
689,
1053,
4918,
2500,
13,
3166,
4918,
29879,
29889,
9342,
2500,
1053,
461,
2500,
13,
5215,
4390,
13,
5215,
318,
5416,
13,
5215,
337,
13,
5215,
2967,
29953,
29946,
13,
3166,
9557,
29889,
2585,
29889,
9794,
1053,
660,
13,
5215,
9557,
29889,
3221,
13,
3166,
11239,
1053,
8701,
16746,
29892,
11028,
27293,
13,
3166,
9557,
29889,
3221,
29889,
13573,
262,
1061,
1053,
349,
26584,
1061,
13,
5215,
9637,
1627,
13,
13,
1753,
716,
6747,
29898,
3827,
29892,
318,
333,
29922,
8516,
29892,
4817,
29918,
20571,
29922,
8516,
1125,
13,
1678,
883,
353,
4918,
2500,
29898,
3827,
29889,
5438,
29892,
2009,
29889,
24483,
29897,
13,
1678,
565,
883,
29889,
275,
29918,
3084,
7295,
13,
4706,
3611,
353,
883,
29889,
14941,
287,
29918,
1272,
1839,
3257,
2033,
13,
4706,
5153,
381,
683,
353,
883,
29889,
14941,
287,
29918,
1272,
1839,
8216,
2033,
13,
4706,
13997,
353,
883,
29889,
14941,
287,
29918,
1272,
1839,
20683,
13359,
5451,
877,
25710,
13,
4706,
26401,
353,
883,
29889,
14941,
287,
29918,
1272,
1839,
28814,
2033,
13,
4706,
443,
1761,
287,
353,
883,
29889,
14941,
287,
29918,
1272,
1839,
348,
1761,
287,
2033,
13,
4706,
2793,
1542,
353,
883,
29889,
14941,
287,
29918,
1272,
1839,
3051,
1542,
2033,
13,
13,
4706,
565,
2793,
1542,
1275,
376,
6214,
29914,
932,
1115,
29871,
13,
9651,
2793,
353,
2009,
29889,
24483,
1839,
1445,
13359,
949,
580,
396,
4290,
1445,
13,
4706,
25342,
2793,
1542,
297,
6796,
3027,
29914,
2732,
613,
376,
3027,
29914,
26568,
613,
5387,
13,
9651,
2793,
353,
2967,
29953,
29946,
29889,
29890,
29953,
29946,
12508,
29898,
3827,
29889,
24483,
1839,
1445,
13359,
949,
3101,
396,
4290,
1445,
13,
4706,
1683,
29901,
13,
9651,
2793,
353,
883,
29889,
14941,
287,
29918,
1272,
3366,
726,
3108,
13,
13,
4706,
2752,
353,
6055,
29889,
18603,
29918,
4219,
718,
5591,
29908,
13,
4706,
3978,
353,
6055,
29889,
18603,
29918,
4219,
718,
5591,
29908,
13,
13,
4706,
4148,
29918,
333,
353,
13361,
29889,
12650,
29889,
657,
29898,
20571,
29922,
5150,
29918,
20571,
29897,
13,
4706,
1178,
353,
4148,
29918,
333,
29889,
2271,
13,
4706,
4148,
353,
4390,
29889,
18132,
29898,
15550,
19427,
29889,
643,
6646,
877,
3126,
742,
13361,
29889,
12650,
29889,
4572,
29898,
20571,
29922,
5150,
29918,
20571,
511,
4235,
29922,
877,
1853,
742,
525,
333,
742,
525,
3069,
742,
525,
4990,
1170,
742,
525,
2271,
742,
525,
3292,
742,
4961,
29961,
29900,
22322,
9621,
2033,
13,
13,
4706,
565,
318,
333,
1275,
6213,
29901,
13,
9651,
364,
29918,
5416,
353,
318,
5416,
29889,
25118,
29946,
2141,
20970,
13,
9651,
318,
333,
353,
337,
29889,
1491,
877,
29899,
742,
15516,
364,
29918,
5416,
29897,
13,
4706,
1178,
353,
1178,
718,
8207,
14080,
22208,
718,
318,
333,
718,
5591,
29908,
13,
4706,
6589,
29918,
333,
353,
1178,
718,
376,
21032,
12975,
13,
13,
4706,
6369,
353,
29431,
29889,
3707,
580,
13,
13,
4706,
11803,
353,
4918,
29898,
20571,
29922,
5416,
29892,
1178,
29922,
333,
29892,
4148,
29918,
333,
29922,
8921,
29918,
333,
29892,
4148,
29922,
8921,
29892,
3611,
29922,
3257,
29892,
2752,
29922,
4993,
29892,
3978,
29922,
12574,
29892,
6139,
29922,
14273,
381,
683,
29892,
2793,
1542,
29922,
3051,
1542,
29892,
2302,
29922,
29900,
29892,
2159,
29922,
29896,
29900,
29892,
13997,
29922,
20683,
29892,
28814,
29922,
28814,
29892,
443,
1761,
287,
29922,
348,
1761,
287,
29892,
6369,
29922,
5467,
3726,
29892,
2793,
29922,
3051,
29892,
6589,
29922,
21032,
29918,
333,
29897,
13,
4706,
11803,
29889,
7620,
580,
13,
4706,
736,
5852,
13,
1678,
1683,
29901,
13,
4706,
1596,
29898,
3827,
29889,
1272,
29897,
13,
4706,
1596,
29898,
689,
29889,
12523,
29897,
13,
4706,
1596,
29898,
689,
29889,
1272,
29897,
13,
4706,
736,
7700,
13,
13,
1753,
788,
29918,
20001,
29898,
3827,
29892,
1400,
29918,
20571,
29892,
4817,
29918,
20571,
29892,
318,
333,
29922,
8516,
1125,
13,
1678,
883,
353,
461,
2500,
29898,
3827,
29889,
5438,
29892,
2009,
29889,
24483,
29897,
13,
1678,
565,
883,
29889,
275,
29918,
3084,
7295,
13,
4706,
2767,
27755,
6444,
943,
580,
13,
4706,
6369,
353,
29431,
29889,
3707,
580,
13,
4706,
2793,
1542,
353,
883,
29889,
14941,
287,
29918,
1272,
1839,
3051,
1542,
2033,
13,
4706,
565,
2793,
1542,
1275,
376,
6214,
29914,
932,
1115,
29871,
13,
9651,
2793,
353,
2009,
29889,
24483,
1839,
1445,
13359,
949,
580,
396,
4290,
1445,
13,
4706,
25342,
2793,
1542,
297,
6796,
3027,
29914,
2732,
613,
376,
3027,
29914,
26568,
613,
5387,
13,
9651,
2793,
353,
2967,
29953,
29946,
29889,
29890,
29953,
29946,
12508,
29898,
3827,
29889,
24483,
1839,
1445,
13359,
949,
3101,
396,
4290,
1445,
13,
4706,
1683,
29901,
13,
9651,
2793,
353,
883,
29889,
14941,
287,
29918,
1272,
3366,
726,
3108,
13,
1669,
13,
4706,
4148,
29918,
333,
353,
4390,
29889,
18132,
29898,
15550,
19427,
29889,
643,
6646,
877,
3126,
742,
13361,
29889,
12650,
29889,
4572,
29898,
5269,
29922,
5150,
29918,
20571,
511,
4235,
29922,
877,
1853,
742,
525,
333,
742,
525,
3069,
742,
525,
4990,
1170,
742,
525,
2271,
742,
525,
3292,
742,
4961,
29961,
29900,
22322,
9621,
2033,
13,
13,
4706,
1400,
353,
4918,
29889,
12650,
29889,
657,
29898,
20571,
353,
1400,
29918,
20571,
29897,
13,
4706,
1400,
29918,
20571,
29918,
710,
353,
1400,
29918,
20571,
13,
4706,
565,
318,
333,
1275,
6213,
29901,
13,
9651,
364,
29918,
5416,
353,
318,
5416,
29889,
25118,
29946,
2141,
20970,
13,
9651,
318,
333,
353,
337,
29889,
1491,
877,
29899,
742,
15516,
364,
29918,
5416,
29897,
13,
4706,
3440,
29918,
333,
353,
679,
5552,
29898,
2490,
29892,
525,
21032,
1495,
718,
318,
333,
13,
4706,
6589,
353,
461,
29879,
29898,
20571,
29922,
5416,
29892,
1178,
29922,
9342,
29918,
333,
29892,
4918,
29918,
20571,
29922,
2490,
29892,
4918,
29918,
20571,
29918,
710,
353,
1400,
29918,
20571,
29918,
710,
29892,
4817,
29918,
20571,
29918,
710,
353,
4817,
29918,
20571,
29892,
4148,
29922,
8921,
29918,
333,
29892,
2159,
29922,
29896,
29900,
29892,
6369,
29922,
5467,
3726,
29892,
2793,
1542,
29922,
3051,
1542,
29892,
2793,
29922,
3051,
29897,
13,
4706,
6589,
29889,
7620,
580,
13,
4706,
736,
5852,
13,
1678,
1683,
29901,
13,
4706,
1596,
29898,
3827,
29889,
1272,
29897,
1678,
13,
4706,
736,
7700,
13,
308,
13,
29992,
2754,
29918,
1493,
18959,
7194,
742,
2314,
13,
29992,
23055,
29918,
13203,
4197,
7281,
16746,
2314,
13,
29992,
16074,
29918,
13203,
4197,
6638,
27293,
2314,
13,
1753,
4918,
29931,
29379,
1043,
29898,
3827,
29892,
1400,
29918,
20571,
29892,
4817,
29918,
20571,
1125,
13,
1678,
1400,
353,
4918,
29889,
12650,
29889,
657,
29898,
2490,
29918,
20571,
353,
1400,
29918,
20571,
29897,
13,
1678,
4148,
353,
13361,
29889,
12650,
29889,
657,
29898,
20571,
353,
4817,
29918,
20571,
29897,
13,
1678,
763,
6039,
1315,
353,
8502,
29889,
12650,
29889,
4572,
29898,
30022,
29984,
29898,
5150,
29918,
20571,
353,
4148,
511,
1203,
353,
1400,
29889,
333,
29897,
13,
13,
1678,
365,
29379,
353,
8502,
17679,
29898,
4561,
6039,
1315,
29892,
1303,
29918,
6194,
29922,
5574,
29892,
1784,
29922,
5574,
29897,
13,
1678,
4188,
267,
353,
5159,
13,
1678,
363,
301,
297,
365,
29379,
29889,
1272,
29901,
13,
4706,
763,
353,
6571,
13,
4706,
363,
1820,
297,
301,
29901,
13,
9651,
565,
29898,
1989,
2804,
376,
4703,
29908,
1125,
13,
18884,
763,
29961,
1989,
29962,
353,
301,
29961,
1989,
29962,
13,
4706,
763,
3366,
29992,
4703,
3108,
353,
301,
3366,
4703,
3108,
13,
4706,
763,
3366,
8921,
3108,
353,
4390,
29889,
18132,
29898,
14095,
29889,
3221,
29889,
15550,
19427,
29889,
643,
6646,
877,
3126,
742,
13361,
29889,
12650,
29889,
4572,
29898,
333,
29922,
29880,
3366,
8921,
3108,
511,
4235,
29922,
877,
1853,
742,
525,
333,
742,
525,
4990,
1170,
742,
525,
3069,
742,
525,
2271,
742,
525,
3292,
742,
4961,
29961,
29900,
22322,
9621,
2033,
13,
4706,
4188,
267,
29889,
4397,
29898,
4561,
29897,
13,
13,
268,
13,
1678,
2933,
29918,
8977,
353,
426,
13,
4706,
376,
1853,
1115,
376,
5081,
267,
613,
13,
4706,
376,
7076,
1115,
4188,
267,
13,
1678,
500,
13,
1678,
736,
13291,
29898,
5327,
29918,
8977,
29897,
13,
13,
13,
29992,
2754,
29918,
1493,
18959,
7194,
742,
525,
5438,
742,
2314,
13,
29992,
23055,
29918,
13203,
4197,
7281,
16746,
2314,
13,
29992,
16074,
29918,
13203,
4197,
6638,
27293,
2314,
13,
1753,
4918,
29879,
1293,
29898,
3827,
29892,
4817,
29918,
20571,
29922,
8516,
1125,
13,
1678,
1813,
29918,
4537,
353,
2009,
29889,
7194,
29889,
657,
877,
3488,
1495,
13,
1678,
565,
525,
2311,
29915,
297,
2009,
29889,
7194,
29901,
13,
4706,
1813,
29918,
2311,
353,
2009,
29889,
7194,
29889,
657,
877,
2311,
1495,
13,
1678,
1683,
29901,
13,
4706,
1813,
29918,
2311,
353,
29871,
29945,
13,
13,
1678,
565,
2009,
29889,
5696,
1275,
525,
7194,
2396,
13,
4706,
565,
4817,
29918,
20571,
29901,
13,
9651,
1018,
29901,
13,
18884,
4148,
353,
13361,
29889,
12650,
29889,
657,
29898,
5150,
29918,
20571,
29922,
5150,
29918,
20571,
29897,
13,
18884,
11803,
353,
4918,
29889,
12650,
29889,
4572,
29898,
8921,
29918,
333,
29922,
8921,
29892,
1178,
1649,
293,
609,
2708,
353,
376,
2324,
287,
3493,
1159,
13,
18884,
775,
353,
4660,
29889,
10493,
29918,
29906,
29900,
29900,
29918,
8949,
13,
18884,
10203,
262,
1061,
353,
349,
26584,
1061,
29898,
14080,
29892,
1813,
29918,
2311,
29897,
13,
18884,
1813,
29918,
5415,
353,
10203,
262,
1061,
29889,
657,
29918,
3488,
29898,
3488,
29918,
4537,
29897,
13,
18884,
848,
353,
4918,
17679,
29898,
3488,
29918,
5415,
29889,
3318,
29918,
1761,
29892,
1784,
29922,
5574,
467,
1272,
13,
9651,
5174,
8960,
408,
321,
29901,
13,
18884,
1596,
29898,
29872,
29897,
13,
18884,
848,
353,
6571,
13,
18884,
775,
353,
4660,
29889,
10493,
29918,
29946,
29900,
29900,
29918,
29933,
3035,
29918,
16244,
13,
4706,
1683,
29901,
13,
9651,
775,
353,
4660,
29889,
10493,
29918,
29906,
29900,
29900,
29918,
8949,
13,
9651,
11803,
353,
4918,
29889,
12650,
29889,
4572,
29898,
333,
1649,
293,
609,
2708,
353,
376,
2324,
287,
3493,
1159,
13,
9651,
10203,
262,
1061,
353,
349,
26584,
1061,
29898,
14080,
29892,
1813,
29918,
2311,
29897,
13,
9651,
1813,
29918,
5415,
353,
10203,
262,
1061,
29889,
657,
29918,
3488,
29898,
3488,
29918,
4537,
29897,
13,
9651,
848,
353,
4918,
17679,
29898,
3488,
29918,
5415,
29889,
3318,
29918,
1761,
29892,
1784,
29922,
5574,
467,
1272,
13,
13,
1678,
25342,
2009,
29889,
5696,
1275,
525,
5438,
2396,
13,
4706,
565,
716,
6747,
29898,
3827,
29892,
4817,
29918,
20571,
29922,
3827,
29889,
1272,
1839,
5150,
29918,
20571,
2033,
1125,
13,
9651,
775,
353,
4660,
29889,
10493,
29918,
29906,
29900,
29896,
29918,
27045,
29928,
13,
9651,
1400,
353,
4918,
29889,
12650,
29889,
12333,
703,
5467,
3726,
1159,
13,
9651,
848,
353,
4918,
17679,
29898,
2490,
467,
1272,
13,
4706,
1683,
29901,
13,
9651,
775,
353,
4660,
29889,
10493,
29918,
29946,
29900,
29900,
29918,
29933,
3035,
29918,
16244,
13,
9651,
848,
353,
6571,
13,
13,
1678,
736,
13291,
29898,
1272,
29892,
775,
29897,
13,
13,
29992,
2754,
29918,
1493,
18959,
7194,
742,
525,
5438,
742,
2314,
13,
29992,
23055,
29918,
13203,
4197,
7281,
16746,
2314,
13,
29992,
16074,
29918,
13203,
4197,
6638,
27293,
2314,
13,
1753,
3440,
15660,
29898,
3827,
29892,
1400,
29918,
20571,
29892,
4817,
29918,
20571,
29922,
8516,
1125,
13,
1678,
1813,
29918,
4537,
353,
2009,
29889,
7194,
29889,
657,
877,
3488,
1495,
13,
1678,
565,
525,
2311,
29915,
297,
2009,
29889,
7194,
29901,
13,
4706,
1813,
29918,
2311,
353,
2009,
29889,
7194,
29889,
657,
877,
2311,
1495,
13,
1678,
1683,
29901,
13,
4706,
1813,
29918,
2311,
353,
29871,
29945,
13,
308,
13,
1678,
565,
2009,
29889,
5696,
1275,
525,
7194,
2396,
13,
4706,
6589,
353,
461,
29879,
29889,
12650,
29889,
4572,
29898,
6747,
29918,
20571,
29918,
710,
29922,
2490,
29918,
20571,
29897,
13,
4706,
1400,
353,
4918,
29889,
12650,
29889,
657,
29898,
20571,
29922,
2490,
29918,
20571,
29897,
13,
4706,
1400,
29918,
333,
353,
679,
5552,
29898,
2490,
29892,
525,
333,
1495,
13,
4706,
3440,
29918,
333,
353,
679,
5552,
29898,
2490,
29892,
525,
21032,
1495,
13,
4706,
10203,
262,
1061,
353,
349,
26584,
1061,
29898,
21032,
29892,
1813,
29918,
2311,
29897,
13,
4706,
1813,
29918,
5415,
353,
10203,
262,
1061,
29889,
657,
29918,
3488,
29898,
3488,
29918,
4537,
29897,
13,
4706,
7797,
3950,
353,
461,
17679,
29898,
3488,
29918,
5415,
29889,
3318,
29918,
1761,
29892,
1784,
29922,
5574,
29897,
13,
308,
13,
4706,
2933,
29918,
8977,
353,
426,
13,
9651,
376,
1853,
1115,
376,
21032,
613,
13,
9651,
376,
3488,
1115,
1813,
29918,
4537,
29892,
13,
9651,
376,
2311,
1115,
1813,
29918,
2311,
29892,
13,
9651,
376,
2490,
1115,
1400,
29918,
333,
29892,
13,
9651,
376,
333,
1115,
3440,
29918,
333,
29892,
13,
9651,
376,
21032,
1115,
7797,
3950,
29889,
1272,
29892,
13,
4706,
500,
13,
308,
13,
4706,
736,
13291,
29898,
5327,
29918,
8977,
29897,
13,
308,
13,
1678,
25342,
2009,
29889,
5696,
1275,
525,
5438,
2396,
13,
4706,
565,
788,
29918,
20001,
29898,
3827,
29892,
1400,
29918,
20571,
29922,
3827,
29889,
1272,
1839,
6747,
29918,
20571,
7464,
4817,
29918,
20571,
29922,
3827,
29889,
1272,
1839,
5150,
29918,
20571,
2033,
1125,
13,
9651,
775,
353,
4660,
29889,
10493,
29918,
29906,
29900,
29906,
29918,
2477,
4741,
7982,
3352,
13,
9651,
3440,
353,
461,
29879,
29889,
12650,
29889,
12333,
703,
5467,
3726,
1159,
13,
9651,
848,
353,
461,
17679,
29898,
9342,
467,
1272,
13,
4706,
1683,
29901,
13,
9651,
775,
353,
4660,
29889,
10493,
29918,
29946,
29900,
29900,
29918,
29933,
3035,
29918,
16244,
13,
9651,
848,
353,
6571,
13,
308,
13,
4706,
736,
13291,
29898,
1272,
29892,
775,
29897,
13,
13,
29992,
2754,
29918,
1493,
18959,
7194,
742,
525,
5438,
742,
525,
12336,
742,
525,
2287,
18476,
742,
29871,
2314,
13,
29992,
23055,
29918,
13203,
4197,
7281,
16746,
2314,
13,
29992,
16074,
29918,
13203,
4197,
6638,
27293,
2314,
13,
1753,
4918,
16570,
29898,
3827,
29892,
1400,
29918,
20571,
29892,
4817,
29918,
20571,
29922,
8516,
1125,
13,
1678,
1813,
29918,
4537,
353,
2009,
29889,
7194,
29889,
657,
877,
3488,
1495,
13,
1678,
565,
525,
2311,
29915,
297,
2009,
29889,
7194,
29901,
13,
4706,
1813,
29918,
2311,
353,
2009,
29889,
7194,
29889,
657,
877,
2311,
1495,
13,
1678,
1683,
29901,
13,
4706,
1813,
29918,
2311,
353,
29871,
29945,
13,
13,
1678,
565,
2009,
29889,
5696,
1275,
525,
7194,
2396,
13,
4706,
1018,
29901,
13,
9651,
775,
353,
4660,
29889,
10493,
29918,
29906,
29900,
29900,
29918,
8949,
13,
9651,
1400,
353,
4918,
29889,
12650,
29889,
657,
29898,
2490,
29918,
20571,
29922,
2490,
29918,
20571,
29897,
13,
9651,
7797,
3950,
353,
4918,
17679,
29898,
2490,
29897,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1596,
29898,
29872,
29897,
13,
9651,
775,
353,
4660,
29889,
10493,
29918,
29946,
29900,
29946,
29918,
12256,
29918,
5800,
18783,
13,
13,
9651,
1400,
353,
4918,
29889,
12650,
29889,
497,
580,
13,
9651,
10203,
262,
1061,
353,
349,
26584,
1061,
29898,
2490,
29892,
1813,
29918,
2311,
29897,
13,
9651,
1813,
29918,
5415,
353,
10203,
262,
1061,
29889,
657,
29918,
3488,
29898,
3488,
29918,
4537,
29897,
13,
9651,
7797,
3950,
353,
4918,
17679,
29898,
3488,
29918,
5415,
29889,
3318,
29918,
1761,
29892,
1784,
29922,
5574,
29897,
13,
13,
1678,
25342,
2009,
29889,
5696,
1275,
525,
5438,
2396,
13,
4706,
1018,
29901,
13,
9651,
775,
353,
4660,
29889,
10493,
29918,
29906,
29900,
29900,
29918,
8949,
13,
9651,
1400,
353,
4918,
29889,
12650,
29889,
657,
29898,
2490,
29918,
20571,
29922,
2490,
29918,
20571,
29897,
13,
9651,
565,
525,
3257,
29915,
297,
2009,
29889,
1272,
29889,
8149,
7295,
13,
18884,
1400,
29889,
3257,
353,
2009,
29889,
1272,
1839,
3257,
2033,
13,
9651,
565,
525,
8216,
29915,
297,
2009,
29889,
1272,
29889,
8149,
7295,
13,
18884,
1400,
29889,
8216,
353,
2009,
29889,
1272,
1839,
8216,
2033,
13,
9651,
565,
525,
20683,
29915,
297,
2009,
29889,
1272,
29889,
8149,
7295,
13,
18884,
1400,
29889,
20683,
353,
2009,
29889,
1272,
1839,
20683,
13359,
5451,
877,
25710,
13,
9651,
565,
525,
28814,
29915,
297,
2009,
29889,
1272,
29889,
8149,
7295,
13,
18884,
1400,
29889,
28814,
353,
2009,
29889,
1272,
1839,
28814,
2033,
13,
9651,
565,
525,
348,
1761,
287,
29915,
297,
2009,
29889,
1272,
29889,
8149,
7295,
13,
18884,
1400,
29889,
348,
1761,
287,
353,
2009,
29889,
1272,
1839,
348,
1761,
287,
2033,
13,
9651,
565,
525,
3051,
1542,
29915,
297,
2009,
29889,
1272,
29889,
8149,
7295,
13,
18884,
1400,
29889,
3051,
1542,
353,
2009,
29889,
1272,
1839,
3051,
1542,
2033,
13,
13,
18884,
565,
1400,
29889,
3051,
1542,
1275,
376,
6214,
29914,
932,
1115,
13,
462,
268,
1400,
29889,
3051,
353,
2009,
29889,
24483,
1839,
1445,
13359,
949,
580,
396,
4290,
1445,
13,
18884,
25342,
1400,
29889,
3051,
1542,
297,
6796,
3027,
29914,
2732,
613,
376,
3027,
29914,
26568,
613,
5387,
13,
462,
268,
1400,
29889,
3051,
353,
2967,
29953,
29946,
29889,
29890,
29953,
29946,
12508,
29898,
3827,
29889,
24483,
1839,
1445,
13359,
949,
3101,
396,
4290,
1445,
13,
18884,
1683,
29901,
13,
462,
1678,
1400,
29889,
3051,
353,
2009,
29889,
1272,
3366,
726,
3108,
13,
13,
9651,
1400,
29889,
7620,
580,
13,
9651,
7797,
3950,
353,
4918,
17679,
29898,
2490,
29897,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1596,
29898,
29872,
29897,
13,
9651,
775,
353,
4660,
29889,
10493,
29918,
29946,
29900,
29900,
29918,
29933,
3035,
29918,
16244,
13,
13,
9651,
1400,
353,
4918,
29889,
12650,
29889,
497,
580,
13,
9651,
10203,
262,
1061,
353,
349,
26584,
1061,
29898,
2490,
29892,
1813,
29918,
2311,
29897,
13,
9651,
1813,
29918,
5415,
353,
10203,
262,
1061,
29889,
657,
29918,
3488,
29898,
3488,
29918,
4537,
29897,
13,
9651,
7797,
3950,
353,
4918,
17679,
29898,
3488,
29918,
5415,
29889,
3318,
29918,
1761,
29892,
1784,
29922,
5574,
29897,
13,
13,
1678,
25342,
2009,
29889,
5696,
1275,
525,
12336,
2396,
13,
4706,
1018,
29901,
13,
9651,
775,
353,
4660,
29889,
10493,
29918,
29906,
29900,
29896,
29918,
27045,
29928,
13,
9651,
4974,
716,
6747,
29898,
3827,
29892,
1400,
29918,
20571,
29892,
2009,
29889,
1272,
1839,
5150,
29918,
20571,
11287,
1360,
5574,
13,
9651,
1400,
353,
4918,
29889,
12650,
29889,
657,
29898,
2490,
29918,
20571,
29922,
2490,
29918,
20571,
29897,
13,
9651,
7797,
3950,
353,
4918,
17679,
29898,
2490,
29897,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1596,
29898,
29872,
29897,
13,
9651,
775,
353,
4660,
29889,
10493,
29918,
29946,
29900,
29900,
29918,
29933,
3035,
29918,
16244,
13,
13,
9651,
1400,
353,
4918,
29889,
12650,
29889,
497,
580,
13,
9651,
10203,
262,
1061,
353,
349,
26584,
1061,
29898,
2490,
29892,
1813,
29918,
2311,
29897,
13,
9651,
1813,
29918,
5415,
353,
10203,
262,
1061,
29889,
657,
29918,
3488,
29898,
3488,
29918,
4537,
29897,
13,
9651,
7797,
3950,
353,
4918,
17679,
29898,
3488,
29918,
5415,
29889,
3318,
29918,
1761,
29892,
1784,
29922,
5574,
29897,
13,
13,
1678,
25342,
2009,
29889,
5696,
1275,
525,
2287,
18476,
2396,
13,
4706,
1018,
29901,
13,
9651,
1400,
353,
4918,
29889,
12650,
29889,
657,
29898,
2490,
29918,
20571,
29922,
2490,
29918,
20571,
29897,
13,
9651,
1400,
29889,
8143,
580,
13,
9651,
775,
353,
4660,
29889,
10493,
29918,
29906,
29900,
29900,
29918,
8949,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1596,
29898,
29872,
29897,
13,
9651,
775,
353,
4660,
29889,
10493,
29918,
29946,
29900,
29946,
29918,
12256,
29918,
5800,
18783,
13,
13,
4706,
1400,
353,
4918,
29889,
12650,
29889,
497,
580,
13,
4706,
10203,
262,
1061,
353,
349,
26584,
1061,
29898,
2490,
29892,
1813,
29918,
2311,
29897,
13,
4706,
1813,
29918,
5415,
353,
10203,
262,
1061,
29889,
657,
29918,
3488,
29898,
3488,
29918,
4537,
29897,
13,
4706,
7797,
3950,
353,
4918,
17679,
29898,
3488,
29918,
5415,
29889,
3318,
29918,
1761,
29892,
1784,
29922,
5574,
29897,
13,
13,
1678,
736,
13291,
29898,
15550,
3950,
29889,
1272,
29892,
775,
29897,
13,
13,
29992,
2754,
29918,
1493,
18959,
7194,
742,
525,
5438,
742,
29871,
2314,
13,
29992,
23055,
29918,
13203,
4197,
7281,
16746,
2314,
13,
29992,
16074,
29918,
13203,
4197,
6638,
27293,
2314,
13,
1753,
3440,
16570,
29898,
3827,
29892,
1400,
29918,
20571,
29892,
3440,
29918,
20571,
29892,
4817,
29918,
20571,
29922,
8516,
1125,
13,
1678,
1813,
29918,
4537,
353,
2009,
29889,
7194,
29889,
657,
877,
3488,
1495,
13,
1678,
565,
525,
2311,
29915,
297,
2009,
29889,
7194,
29901,
13,
4706,
1813,
29918,
2311,
353,
2009,
29889,
7194,
29889,
657,
877,
2311,
1495,
13,
1678,
1683,
29901,
13,
4706,
1813,
29918,
2311,
353,
29871,
29945,
13,
308,
13,
1678,
565,
2009,
29889,
5696,
1275,
525,
7194,
2396,
13,
4706,
1018,
29901,
13,
9651,
775,
353,
4660,
29889,
10493,
29918,
29906,
29900,
29900,
29918,
8949,
13,
9651,
3440,
353,
461,
29879,
29889,
12650,
29889,
657,
29898,
20571,
29922,
9342,
29918,
20571,
29897,
13,
9651,
7797,
3950,
353,
461,
17679,
29898,
9342,
29897,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1596,
29898,
29872,
29897,
13,
9651,
775,
353,
4660,
29889,
10493,
29918,
29946,
29900,
29946,
29918,
12256,
29918,
5800,
18783,
13,
13,
9651,
3440,
353,
461,
29879,
29889,
12650,
29889,
497,
580,
13,
9651,
10203,
262,
1061,
353,
349,
26584,
1061,
29898,
9342,
29892,
1813,
29918,
2311,
29897,
13,
9651,
1813,
29918,
5415,
353,
10203,
262,
1061,
29889,
657,
29918,
3488,
29898,
3488,
29918,
4537,
29897,
13,
9651,
7797,
3950,
353,
461,
17679,
29898,
3488,
29918,
5415,
29889,
3318,
29918,
1761,
29892,
1784,
29922,
5574,
29897,
13,
13,
1678,
25342,
2009,
29889,
5696,
1275,
525,
5438,
2396,
13,
4706,
1018,
29901,
13,
9651,
775,
353,
4660,
29889,
10493,
29918,
29906,
29900,
29900,
29918,
8949,
13,
9651,
3440,
353,
461,
29879,
29889,
12650,
29889,
657,
29898,
20571,
29922,
9342,
29918,
20571,
29897,
13,
9651,
565,
525,
3051,
1542,
29915,
297,
2009,
29889,
1272,
29889,
8149,
7295,
13,
18884,
3440,
29889,
3051,
1542,
353,
2009,
29889,
1272,
1839,
3051,
1542,
2033,
13,
9651,
565,
525,
726,
29915,
297,
2009,
29889,
1272,
29889,
8149,
7295,
13,
18884,
3440,
29889,
3051,
353,
2009,
29889,
1272,
1839,
726,
2033,
13,
9651,
3440,
29889,
7620,
580,
13,
9651,
7797,
3950,
353,
461,
17679,
29898,
9342,
29897,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1596,
29898,
29872,
29897,
13,
9651,
775,
353,
4660,
29889,
10493,
29918,
29946,
29900,
29900,
29918,
29933,
3035,
29918,
16244,
13,
9651,
3440,
353,
461,
29879,
29889,
12650,
29889,
497,
580,
13,
9651,
10203,
262,
1061,
353,
349,
26584,
1061,
29898,
9342,
29892,
1813,
29918,
2311,
29897,
13,
9651,
1813,
29918,
5415,
353,
10203,
262,
1061,
29889,
657,
29918,
3488,
29898,
3488,
29918,
4537,
29897,
13,
9651,
7797,
3950,
353,
461,
17679,
29898,
3488,
29918,
5415,
29889,
3318,
29918,
1761,
29892,
1784,
29922,
5574,
29897,
13,
632,
13,
1678,
736,
13291,
29898,
15550,
3950,
29889,
1272,
29892,
775,
29897,
13,
632,
13,
632,
13,
29992,
2754,
29918,
1493,
18959,
7194,
742,
2314,
13,
1753,
3957,
29898,
3827,
29892,
4817,
29918,
333,
29922,
8516,
1125,
13,
1678,
848,
353,
5159,
13,
13,
1678,
3815,
29941,
353,
679,
877,
991,
597,
24911,
29899,
2218,
29889,
2276,
9154,
932,
29889,
510,
29914,
14080,
742,
4817,
29922,
877,
24911,
27691,
29918,
29873,
29900,
29941,
3788,
29883,
29946,
29900,
29946,
29873,
29900,
29941,
8785,
13,
1678,
565,
3815,
29941,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
29901,
13,
4706,
848,
29889,
4397,
29898,
14318,
29941,
29889,
3126,
3101,
13,
13,
1678,
3815,
29896,
29945,
353,
679,
877,
991,
597,
348,
16887,
839,
29889,
2276,
9154,
932,
29889,
510,
29914,
5509,
29914,
497,
14080,
29914,
742,
4817,
29922,
877,
11958,
1953,
14805,
1792,
3788,
29946,
29900,
29946,
9965,
8785,
13,
1678,
565,
3815,
29896,
29945,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
29901,
13,
4706,
848,
29889,
4397,
29898,
14318,
29896,
29945,
29889,
3126,
3101,
13,
13,
1678,
3815,
29896,
29955,
353,
679,
877,
991,
597,
4912,
649,
29946,
29900,
29946,
29888,
29906,
29896,
29873,
29896,
29955,
29889,
2276,
9154,
932,
29889,
510,
29914,
5509,
29914,
6915,
29914,
3597,
29914,
742,
4817,
29922,
877,
29946,
29883,
915,
29906,
1753,
29899,
1725,
7340,
29899,
29946,
1327,
29955,
29899,
29890,
346,
29945,
29899,
29966,
25711,
17013,
29958,
3788,
29896,
29906,
29941,
29946,
29945,
29953,
8785,
13,
1678,
565,
3815,
29896,
29955,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
29901,
13,
4706,
848,
29889,
4397,
29898,
14318,
29896,
29955,
29889,
3126,
3101,
13,
13,
1678,
736,
13291,
3319,
29915,
9965,
2396,
848,
1800,
13,
13,
2
] |
src/brewlog/utils/app.py | zgoda/brewlog | 3 | 110522 | from flask import Flask
class Brewlog(Flask):
@property
def jinja_options(self):
options = dict(super().jinja_options)
options.update({
'trim_blocks': True,
'lstrip_blocks': True,
})
return options
| [
1,
515,
29784,
1053,
2379,
1278,
13,
13,
13,
1990,
350,
3973,
1188,
29898,
8754,
1278,
1125,
13,
13,
1678,
732,
6799,
13,
1678,
822,
432,
262,
1764,
29918,
6768,
29898,
1311,
1125,
13,
4706,
3987,
353,
9657,
29898,
9136,
2141,
28789,
1764,
29918,
6768,
29897,
13,
4706,
3987,
29889,
5504,
3319,
13,
9651,
525,
15450,
29918,
1271,
29879,
2396,
5852,
29892,
13,
9651,
525,
29880,
17010,
29918,
1271,
29879,
2396,
5852,
29892,
13,
4706,
5615,
13,
4706,
736,
3987,
13,
2
] |
python/toy/weather_wechat.py | tagwan/scripts | 0 | 38632 | <reponame>tagwan/scripts
import requests
import json
import datetime
def weather(city):
url = "http://wthrcdn.etouch.cn/weather_mini?city=%s" % city
try:
data = requests.get(url).json()['data']
city = data['city']
ganmao = data['ganmao']
today_weather = data['forecast'][0]
res = "老婆今天是{}\n今天天气概况\n城市: {:<10}\n时间: {:<10}\n高温: {:<10}\n低温: {:<10}\n风力: {:<10}\n风向: {:<10}\n天气: {:<10}\n\n稍后会发送近期温度趋势图,请注意查看。\
".format(
ganmao,
city,
datetime.datetime.now().strftime('%Y-%m-%d'),
today_weather['high'].split()[1],
today_weather['low'].split()[1],
today_weather['fengli'].split('[')[2].split(']')[0],
today_weather['fengxiang'], today_weather['type'],
)
return {"source_data": data, "res": res}
except Exception as e:
return str(e)
"""
获取天气预报趋势图
"""
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import re
import datetime
def Future_weather_states(forecast, save_path, day_num=5):
'''
展示未来的天气预报趋势图
:param forecast: 天气预报预测的数据
:param day_num: 未来几天
:return: 趋势图
'''
future_forecast = forecast
dict = {}
for i in range(day_num):
data = []
date = future_forecast[i]["date"]
date = int(re.findall("\d+", date)[0])
data.append(int(re.findall("\d+", future_forecast[i]["high"])[0]))
data.append(int(re.findall("\d+", future_forecast[i]["low"])[0]))
data.append(future_forecast[i]["type"])
dict[date] = data
data_list = sorted(dict.items())
date = []
high_temperature = []
low_temperature = []
for each in data_list:
date.append(each[0])
high_temperature.append(each[1][0])
low_temperature.append(each[1][1])
fig = plt.plot(date, high_temperature, "r", date, low_temperature, "b")
current_date = datetime.datetime.now().strftime('%Y-%m')
plt.rcParams['font.sans-serif'] = ['SimHei']
plt.rcParams['axes.unicode_minus'] = False
plt.xlabel(current_date)
plt.ylabel("℃")
plt.legend(["高温", "低温"])
plt.xticks(date)
plt.title("最近几天温度变化趋势")
plt.savefig(save_path)
"""
发送到企业微信
"""
# -*- coding: utf-8 -*-
import requests
import json
class DLF:
def __init__(self, corpid, corpsecret):
self.url = "https://qyapi.weixin.qq.com/cgi-bin"
self.corpid = corpid
self.corpsecret = corpsecret
self._token = self._get_token()
def _get_token(self):
'''
获取企业微信API接口的access_token
:return:
'''
token_url = self.url + "/gettoken?corpid=%s&corpsecret=%s" % (self.corpid, self.corpsecret)
try:
res = requests.get(token_url).json()
token = res['access_token']
return token
except Exception as e:
return str(e)
def _get_media_id(self, file_obj):
get_media_url = self.url + "/media/upload?access_token={}&type=file".format(self._token)
data = {"media": file_obj}
try:
res = requests.post(url=get_media_url, files=data)
media_id = res.json()['media_id']
return media_id
except Exception as e:
return str(e)
def send_text(self, agentid, content, touser=None, toparty=None):
send_msg_url = self.url + "/message/send?access_token=%s" % (self._token)
send_data = {
"touser": touser,
"toparty": toparty,
"msgtype": "text",
"agentid": agentid,
"text": {
"content": content
}
}
try:
res = requests.post(send_msg_url, data=json.dumps(send_data))
except Exception as e:
return str(e)
def send_image(self, agentid, file_obj, touser=None, toparty=None):
media_id = self._get_media_id(file_obj)
send_msg_url = self.url + "/message/send?access_token=%s" % (self._token)
send_data = {
"touser": touser,
"toparty": toparty,
"msgtype": "image",
"agentid": agentid,
"image": {
"media_id": media_id
}
}
try:
res = requests.post(send_msg_url, data=json.dumps(send_data))
except Exception as e:
return str(e)
"""
main脚本
"""
# -*- coding: utf-8 -*-
from plugins.weather_forecast import weather
from plugins.trend_chart import Future_weather_states
from plugins.send_wechat import DLF
import os
# 企业微信相关信息
corpid = "xxx"
corpsecret = "xxx"
agentid = "xxx"
# 天气预报趋势图保存路径
_path = os.path.dirname(os.path.abspath(__file__))
save_path = os.path.join(_path, './tmp/weather_forecast.jpg')
# 获取天气预报信息
content = weather("大兴")
# 发送文字消息
dlf = DLF(corpid, corpsecret)
dlf.send_text(agentid=agentid, content=content['res'], toparty='1')
# 生成天气预报趋势图
Future_weather_states(content['source_data']['forecast'], save_path)
# 发送图片消息
file_obj = open(save_path, 'rb')
dlf.send_image(agentid=agentid, toparty='1', file_obj=file_obj)
| [
1,
529,
276,
1112,
420,
29958,
4039,
11440,
29914,
16713,
13,
5215,
7274,
13,
5215,
4390,
13,
5215,
12865,
13,
13,
13,
1753,
14826,
29898,
12690,
1125,
13,
1678,
3142,
353,
376,
1124,
597,
29893,
386,
2214,
5200,
29889,
300,
3222,
29889,
18038,
29914,
705,
1624,
29918,
1195,
29875,
29973,
12690,
16328,
29879,
29908,
1273,
4272,
13,
13,
1678,
1018,
29901,
13,
4706,
848,
353,
7274,
29889,
657,
29898,
2271,
467,
3126,
580,
1839,
1272,
2033,
13,
4706,
4272,
353,
848,
1839,
12690,
2033,
13,
4706,
9581,
655,
29877,
353,
848,
1839,
6249,
655,
29877,
2033,
13,
13,
4706,
9826,
29918,
705,
1624,
353,
848,
1839,
1079,
4384,
2033,
29961,
29900,
29962,
13,
4706,
620,
353,
376,
31506,
232,
172,
137,
31482,
30408,
30392,
29912,
1012,
29876,
31482,
30408,
30408,
233,
179,
151,
233,
169,
133,
232,
137,
184,
29905,
29876,
30626,
30461,
29901,
12365,
29966,
29896,
29900,
1012,
29876,
30594,
31016,
29901,
12365,
29966,
29896,
29900,
1012,
29876,
30528,
233,
187,
172,
29901,
12365,
29966,
29896,
29900,
1012,
29876,
231,
192,
145,
233,
187,
172,
29901,
12365,
29966,
29896,
29900,
1012,
29876,
236,
166,
145,
31074,
29901,
12365,
29966,
29896,
29900,
1012,
29876,
236,
166,
145,
31331,
29901,
12365,
29966,
29896,
29900,
1012,
29876,
30408,
233,
179,
151,
29901,
12365,
29966,
29896,
29900,
1012,
29876,
29905,
29876,
234,
171,
144,
30822,
30437,
30910,
31545,
31830,
31117,
233,
187,
172,
30898,
235,
185,
142,
232,
141,
194,
30861,
30214,
31088,
31368,
31474,
31213,
31811,
30267,
29905,
13,
9651,
11393,
4830,
29898,
13,
9651,
9581,
655,
29877,
29892,
13,
9651,
4272,
29892,
13,
9651,
12865,
29889,
12673,
29889,
3707,
2141,
710,
615,
603,
877,
29995,
29979,
19222,
29885,
19222,
29881,
5477,
13,
9651,
9826,
29918,
705,
1624,
1839,
9812,
13359,
5451,
580,
29961,
29896,
1402,
13,
9651,
9826,
29918,
705,
1624,
1839,
677,
13359,
5451,
580,
29961,
29896,
1402,
13,
9651,
9826,
29918,
705,
1624,
1839,
29888,
996,
492,
13359,
5451,
877,
29961,
29861,
29906,
1822,
5451,
877,
29962,
29861,
29900,
1402,
13,
9651,
9826,
29918,
705,
1624,
1839,
29888,
996,
5389,
574,
7464,
9826,
29918,
705,
1624,
1839,
1853,
7464,
13,
4706,
1723,
13,
13,
4706,
736,
8853,
4993,
29918,
1272,
1115,
848,
29892,
376,
690,
1115,
620,
29913,
13,
1678,
5174,
8960,
408,
321,
29901,
13,
4706,
736,
851,
29898,
29872,
29897,
13,
13,
13,
15945,
29908,
13,
31024,
30683,
30408,
233,
179,
151,
236,
165,
135,
233,
141,
168,
235,
185,
142,
232,
141,
194,
30861,
13,
15945,
29908,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
337,
13,
5215,
12865,
13,
13,
13,
1753,
16367,
29918,
705,
1624,
29918,
28631,
29898,
1079,
4384,
29892,
4078,
29918,
2084,
29892,
2462,
29918,
1949,
29922,
29945,
1125,
13,
1678,
14550,
13,
268,
31599,
30858,
31295,
30805,
30210,
30408,
233,
179,
151,
236,
165,
135,
233,
141,
168,
235,
185,
142,
232,
141,
194,
30861,
13,
1678,
584,
3207,
29821,
579,
29901,
29871,
30408,
233,
179,
151,
236,
165,
135,
233,
141,
168,
236,
165,
135,
31851,
30210,
30354,
30763,
13,
1678,
584,
3207,
2462,
29918,
1949,
29901,
29871,
31295,
30805,
232,
138,
163,
30408,
13,
1678,
584,
2457,
29901,
29871,
235,
185,
142,
232,
141,
194,
30861,
13,
1678,
14550,
13,
1678,
5434,
29918,
1079,
4384,
353,
29821,
579,
13,
1678,
9657,
353,
6571,
13,
13,
1678,
363,
474,
297,
3464,
29898,
3250,
29918,
1949,
1125,
13,
4706,
848,
353,
5159,
13,
4706,
2635,
353,
5434,
29918,
1079,
4384,
29961,
29875,
29962,
3366,
1256,
3108,
13,
4706,
2635,
353,
938,
29898,
276,
29889,
2886,
497,
14182,
29881,
29974,
613,
2635,
9601,
29900,
2314,
13,
4706,
848,
29889,
4397,
29898,
524,
29898,
276,
29889,
2886,
497,
14182,
29881,
29974,
613,
5434,
29918,
1079,
4384,
29961,
29875,
29962,
3366,
9812,
20068,
29961,
29900,
12622,
13,
4706,
848,
29889,
4397,
29898,
524,
29898,
276,
29889,
2886,
497,
14182,
29881,
29974,
613,
5434,
29918,
1079,
4384,
29961,
29875,
29962,
3366,
677,
20068,
29961,
29900,
12622,
13,
4706,
848,
29889,
4397,
29898,
29888,
9130,
29918,
1079,
4384,
29961,
29875,
29962,
3366,
1853,
20068,
13,
4706,
9657,
29961,
1256,
29962,
353,
848,
13,
13,
1678,
848,
29918,
1761,
353,
12705,
29898,
8977,
29889,
7076,
3101,
13,
1678,
2635,
353,
5159,
13,
1678,
1880,
29918,
12863,
1535,
353,
5159,
13,
1678,
4482,
29918,
12863,
1535,
353,
5159,
13,
1678,
363,
1269,
297,
848,
29918,
1761,
29901,
13,
4706,
2635,
29889,
4397,
29898,
4204,
29961,
29900,
2314,
13,
4706,
1880,
29918,
12863,
1535,
29889,
4397,
29898,
4204,
29961,
29896,
3816,
29900,
2314,
13,
4706,
4482,
29918,
12863,
1535,
29889,
4397,
29898,
4204,
29961,
29896,
3816,
29896,
2314,
13,
4706,
2537,
353,
14770,
29889,
5317,
29898,
1256,
29892,
1880,
29918,
12863,
1535,
29892,
376,
29878,
613,
2635,
29892,
4482,
29918,
12863,
1535,
29892,
376,
29890,
1159,
13,
13,
1678,
1857,
29918,
1256,
353,
12865,
29889,
12673,
29889,
3707,
2141,
710,
615,
603,
877,
29995,
29979,
19222,
29885,
1495,
13,
1678,
14770,
29889,
2214,
9629,
1839,
5657,
29889,
29879,
550,
29899,
643,
361,
2033,
353,
6024,
8942,
3868,
29875,
2033,
13,
1678,
14770,
29889,
2214,
9629,
1839,
1165,
267,
29889,
2523,
356,
29918,
12254,
2033,
353,
7700,
13,
1678,
14770,
29889,
29916,
1643,
29898,
3784,
29918,
1256,
29897,
13,
1678,
14770,
29889,
29891,
1643,
703,
229,
135,
134,
1159,
13,
1678,
14770,
29889,
26172,
29898,
3366,
30528,
233,
187,
172,
613,
376,
231,
192,
145,
233,
187,
172,
20068,
13,
1678,
14770,
29889,
486,
7358,
29898,
1256,
29897,
13,
1678,
14770,
29889,
3257,
703,
30878,
31830,
232,
138,
163,
30408,
233,
187,
172,
30898,
31462,
30705,
235,
185,
142,
232,
141,
194,
1159,
13,
1678,
14770,
29889,
7620,
1003,
29898,
7620,
29918,
2084,
29897,
13,
13,
13,
15945,
29908,
13,
30910,
31545,
30780,
231,
191,
132,
31729,
31935,
30689,
13,
15945,
29908,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
13,
5215,
7274,
13,
5215,
4390,
13,
13,
13,
1990,
360,
29931,
29943,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1034,
5935,
29892,
1034,
29886,
19024,
1125,
13,
4706,
1583,
29889,
2271,
353,
376,
991,
597,
29939,
29891,
2754,
29889,
705,
861,
262,
29889,
24349,
29889,
510,
29914,
20006,
29899,
2109,
29908,
13,
4706,
1583,
29889,
2616,
5935,
353,
1034,
5935,
13,
4706,
1583,
29889,
2616,
29886,
19024,
353,
1034,
29886,
19024,
13,
4706,
1583,
3032,
6979,
353,
1583,
3032,
657,
29918,
6979,
580,
13,
13,
1678,
822,
903,
657,
29918,
6979,
29898,
1311,
1125,
13,
4706,
14550,
13,
308,
31024,
30683,
231,
191,
132,
31729,
31935,
30689,
8787,
31092,
30856,
30210,
5943,
29918,
6979,
13,
4706,
584,
2457,
29901,
13,
4706,
14550,
13,
4706,
5993,
29918,
2271,
353,
1583,
29889,
2271,
718,
5591,
657,
6979,
29973,
2616,
5935,
16328,
29879,
29987,
2616,
29886,
19024,
16328,
29879,
29908,
1273,
313,
1311,
29889,
2616,
5935,
29892,
1583,
29889,
2616,
29886,
19024,
29897,
13,
4706,
1018,
29901,
13,
9651,
620,
353,
7274,
29889,
657,
29898,
6979,
29918,
2271,
467,
3126,
580,
13,
9651,
5993,
353,
620,
1839,
5943,
29918,
6979,
2033,
13,
9651,
736,
5993,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
736,
851,
29898,
29872,
29897,
13,
13,
1678,
822,
903,
657,
29918,
9799,
29918,
333,
29898,
1311,
29892,
934,
29918,
5415,
1125,
13,
4706,
679,
29918,
9799,
29918,
2271,
353,
1583,
29889,
2271,
718,
5591,
9799,
29914,
9009,
29973,
5943,
29918,
6979,
3790,
15704,
1853,
29922,
1445,
1642,
4830,
29898,
1311,
3032,
6979,
29897,
13,
4706,
848,
353,
8853,
9799,
1115,
934,
29918,
5415,
29913,
13,
13,
4706,
1018,
29901,
13,
9651,
620,
353,
7274,
29889,
2490,
29898,
2271,
29922,
657,
29918,
9799,
29918,
2271,
29892,
2066,
29922,
1272,
29897,
13,
9651,
5745,
29918,
333,
353,
620,
29889,
3126,
580,
1839,
9799,
29918,
333,
2033,
13,
9651,
736,
5745,
29918,
333,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
736,
851,
29898,
29872,
29897,
13,
13,
1678,
822,
3638,
29918,
726,
29898,
1311,
29892,
10823,
333,
29892,
2793,
29892,
11943,
643,
29922,
8516,
29892,
304,
22633,
29922,
8516,
1125,
13,
4706,
3638,
29918,
7645,
29918,
2271,
353,
1583,
29889,
2271,
718,
5591,
4906,
29914,
6717,
29973,
5943,
29918,
6979,
16328,
29879,
29908,
1273,
313,
1311,
3032,
6979,
29897,
13,
4706,
3638,
29918,
1272,
353,
426,
13,
9651,
376,
29873,
283,
643,
1115,
11943,
643,
29892,
13,
9651,
376,
3332,
442,
29891,
1115,
304,
22633,
29892,
13,
9651,
376,
7645,
1853,
1115,
376,
726,
613,
13,
9651,
376,
14748,
333,
1115,
10823,
333,
29892,
13,
9651,
376,
726,
1115,
426,
13,
18884,
376,
3051,
1115,
2793,
13,
9651,
500,
13,
4706,
500,
13,
13,
4706,
1018,
29901,
13,
9651,
620,
353,
7274,
29889,
2490,
29898,
6717,
29918,
7645,
29918,
2271,
29892,
848,
29922,
3126,
29889,
29881,
17204,
29898,
6717,
29918,
1272,
876,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
736,
851,
29898,
29872,
29897,
13,
13,
1678,
822,
3638,
29918,
3027,
29898,
1311,
29892,
10823,
333,
29892,
934,
29918,
5415,
29892,
11943,
643,
29922,
8516,
29892,
304,
22633,
29922,
8516,
1125,
13,
4706,
5745,
29918,
333,
353,
1583,
3032,
657,
29918,
9799,
29918,
333,
29898,
1445,
29918,
5415,
29897,
13,
4706,
3638,
29918,
7645,
29918,
2271,
353,
1583,
29889,
2271,
718,
5591,
4906,
29914,
6717,
29973,
5943,
29918,
6979,
16328,
29879,
29908,
1273,
313,
1311,
3032,
6979,
29897,
13,
4706,
3638,
29918,
1272,
353,
426,
13,
9651,
376,
29873,
283,
643,
1115,
11943,
643,
29892,
13,
9651,
376,
3332,
442,
29891,
1115,
304,
22633,
29892,
13,
9651,
376,
7645,
1853,
1115,
376,
3027,
613,
13,
9651,
376,
14748,
333,
1115,
10823,
333,
29892,
13,
9651,
376,
3027,
1115,
426,
13,
18884,
376,
9799,
29918,
333,
1115,
5745,
29918,
333,
13,
9651,
500,
13,
4706,
500,
13,
13,
4706,
1018,
29901,
13,
9651,
620,
353,
7274,
29889,
2490,
29898,
6717,
29918,
7645,
29918,
2271,
29892,
848,
29922,
3126,
29889,
29881,
17204,
29898,
6717,
29918,
1272,
876,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
736,
851,
29898,
29872,
29897,
13,
13,
13,
15945,
29908,
13,
3396,
235,
135,
157,
30346,
13,
15945,
29908,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
13,
3166,
18224,
29889,
705,
1624,
29918,
1079,
4384,
1053,
14826,
13,
3166,
18224,
29889,
509,
355,
29918,
15425,
1053,
16367,
29918,
705,
1624,
29918,
28631,
13,
3166,
18224,
29889,
6717,
29918,
705,
13496,
1053,
360,
29931,
29943,
13,
5215,
2897,
13,
13,
29937,
29871,
231,
191,
132,
31729,
31935,
30689,
30990,
31057,
30689,
31021,
13,
2616,
5935,
353,
376,
12353,
29908,
13,
2616,
29886,
19024,
353,
376,
12353,
29908,
13,
14748,
333,
353,
376,
12353,
29908,
13,
29937,
29871,
30408,
233,
179,
151,
236,
165,
135,
233,
141,
168,
235,
185,
142,
232,
141,
194,
30861,
30982,
30946,
30874,
232,
193,
135,
13,
29918,
2084,
353,
2897,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
370,
1028,
493,
22168,
1445,
1649,
876,
13,
7620,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
7373,
2084,
29892,
19283,
7050,
29914,
705,
1624,
29918,
1079,
4384,
29889,
6173,
1495,
13,
13,
29937,
29871,
31024,
30683,
30408,
233,
179,
151,
236,
165,
135,
233,
141,
168,
30689,
31021,
13,
3051,
353,
14826,
703,
30257,
31914,
1159,
13,
13,
29937,
29871,
30910,
31545,
30333,
30578,
31276,
31021,
13,
11671,
29888,
353,
360,
29931,
29943,
29898,
2616,
5935,
29892,
1034,
29886,
19024,
29897,
13,
11671,
29888,
29889,
6717,
29918,
726,
29898,
14748,
333,
29922,
14748,
333,
29892,
2793,
29922,
3051,
1839,
690,
7464,
304,
22633,
2433,
29896,
1495,
13,
13,
29937,
29871,
30486,
30494,
30408,
233,
179,
151,
236,
165,
135,
233,
141,
168,
235,
185,
142,
232,
141,
194,
30861,
13,
20154,
29918,
705,
1624,
29918,
28631,
29898,
3051,
1839,
4993,
29918,
1272,
16215,
1079,
4384,
7464,
4078,
29918,
2084,
29897,
13,
29937,
29871,
30910,
31545,
30861,
31122,
31276,
31021,
13,
1445,
29918,
5415,
353,
1722,
29898,
7620,
29918,
2084,
29892,
525,
6050,
1495,
13,
11671,
29888,
29889,
6717,
29918,
3027,
29898,
14748,
333,
29922,
14748,
333,
29892,
304,
22633,
2433,
29896,
742,
934,
29918,
5415,
29922,
1445,
29918,
5415,
29897,
13,
2
] |
data/free_st_chinese_mandarin_corpus.py | yeyupiaoling/MASR | 126 | 196409 | <filename>data/free_st_chinese_mandarin_corpus.py
import argparse
import functools
import codecs
import os
from utility import download, unpack
from utility import add_arguments, print_arguments
URL_ROOT = 'http://www.openslr.org/resources/38'
DATA_URL = URL_ROOT + '/ST-CMDS-20170001_1-OS.tar.gz'
MD5_DATA = 'c28ddfc8e4ebe48949bc79a0c23c5545'
parser = argparse.ArgumentParser(description=__doc__)
add_arg = functools.partial(add_arguments, argparser=parser)
parser.add_argument("--target_dir",
default="../dataset/audio/",
type=str,
help="Directory to save the dataset. (default: %(default)s)")
parser.add_argument("--annotation_text",
default="../dataset/annotation/",
type=str,
help="Sound annotation text save path. (default: %(default)s)")
args = parser.parse_args()
def create_annotation_text(data_dir, annotation_path):
print('Create Free ST-Chinese-Mandarin-Corpus annotation text ...')
f_a = codecs.open(os.path.join(annotation_path, 'free_st_chinese_mandarin_corpus.txt'), 'w', 'utf-8')
for subfolder, _, filelist in sorted(os.walk(data_dir)):
for file in filelist:
if '.wav' in file:
file = os.path.join(subfolder, file)
with codecs.open(file[:-4] + '.txt', 'r', 'utf-8') as f:
line = f.readline()
f_a.write(file[3:] + '\t' + line + '\n')
f_a.close()
def prepare_dataset(url, md5sum, target_dir, annotation_path):
"""Download, unpack and create manifest file."""
data_dir = os.path.join(target_dir, 'ST-CMDS-20170001_1-OS')
if not os.path.exists(data_dir):
filepath = download(url, md5sum, target_dir)
unpack(filepath, target_dir)
os.remove(filepath)
else:
print("Skip downloading and unpacking. Free ST-Chinese-Mandarin-Corpus data already exists in %s." % target_dir)
create_annotation_text(data_dir, annotation_path)
def main():
print_arguments(args)
if args.target_dir.startswith('~'):
args.target_dir = os.path.expanduser(args.target_dir)
prepare_dataset(url=DATA_URL,
md5sum=MD5_DATA,
target_dir=args.target_dir,
annotation_path=args.annotation_text)
if __name__ == '__main__':
main()
| [
1,
529,
9507,
29958,
1272,
29914,
9021,
29918,
303,
29918,
305,
8233,
29918,
29885,
392,
27139,
29918,
2616,
13364,
29889,
2272,
13,
5215,
1852,
5510,
13,
5215,
2090,
312,
8789,
13,
5215,
775,
2395,
13,
5215,
2897,
13,
3166,
19725,
1053,
5142,
29892,
443,
4058,
13,
3166,
19725,
1053,
788,
29918,
25699,
29892,
1596,
29918,
25699,
13,
13,
4219,
29918,
21289,
353,
525,
1124,
597,
1636,
29889,
22156,
29212,
29889,
990,
29914,
13237,
29914,
29941,
29947,
29915,
13,
14573,
29918,
4219,
353,
3988,
29918,
21289,
718,
8207,
1254,
29899,
29907,
5773,
29903,
29899,
29906,
29900,
29896,
29955,
29900,
29900,
29900,
29896,
29918,
29896,
29899,
3267,
29889,
12637,
29889,
18828,
29915,
13,
5773,
29945,
29918,
14573,
353,
525,
29883,
29906,
29947,
1289,
13801,
29947,
29872,
29946,
774,
29872,
29946,
29947,
29929,
29946,
29929,
12328,
29955,
29929,
29874,
29900,
29883,
29906,
29941,
29883,
29945,
29945,
29946,
29945,
29915,
13,
13,
16680,
353,
1852,
5510,
29889,
15730,
11726,
29898,
8216,
29922,
1649,
1514,
1649,
29897,
13,
1202,
29918,
1191,
353,
2090,
312,
8789,
29889,
3846,
29898,
1202,
29918,
25699,
29892,
1852,
16680,
29922,
16680,
29897,
13,
16680,
29889,
1202,
29918,
23516,
703,
489,
5182,
29918,
3972,
613,
13,
462,
1678,
2322,
543,
6995,
24713,
29914,
18494,
29914,
613,
13,
462,
1678,
1134,
29922,
710,
29892,
13,
462,
1678,
1371,
543,
9882,
304,
4078,
278,
8783,
29889,
313,
4381,
29901,
1273,
29898,
4381,
29897,
29879,
25760,
13,
16680,
29889,
1202,
29918,
23516,
703,
489,
18317,
29918,
726,
613,
13,
462,
1678,
2322,
543,
6995,
24713,
29914,
18317,
29914,
613,
13,
462,
1678,
1134,
29922,
710,
29892,
13,
462,
1678,
1371,
543,
29456,
17195,
1426,
4078,
2224,
29889,
313,
4381,
29901,
1273,
29898,
4381,
29897,
29879,
25760,
13,
5085,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
13,
13,
1753,
1653,
29918,
18317,
29918,
726,
29898,
1272,
29918,
3972,
29892,
17195,
29918,
2084,
1125,
13,
1678,
1596,
877,
4391,
12362,
6850,
29899,
1451,
8233,
29899,
29924,
392,
27139,
29899,
12521,
13364,
17195,
1426,
2023,
1495,
13,
1678,
285,
29918,
29874,
353,
775,
2395,
29889,
3150,
29898,
359,
29889,
2084,
29889,
7122,
29898,
18317,
29918,
2084,
29892,
525,
9021,
29918,
303,
29918,
305,
8233,
29918,
29885,
392,
27139,
29918,
2616,
13364,
29889,
3945,
5477,
525,
29893,
742,
525,
9420,
29899,
29947,
1495,
13,
1678,
363,
1014,
12083,
29892,
17117,
934,
1761,
297,
12705,
29898,
359,
29889,
20919,
29898,
1272,
29918,
3972,
22164,
13,
4706,
363,
934,
297,
934,
1761,
29901,
13,
9651,
565,
15300,
29893,
485,
29915,
297,
934,
29901,
13,
18884,
934,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1491,
12083,
29892,
934,
29897,
13,
18884,
411,
775,
2395,
29889,
3150,
29898,
1445,
7503,
29899,
29946,
29962,
718,
15300,
3945,
742,
525,
29878,
742,
525,
9420,
29899,
29947,
1495,
408,
285,
29901,
13,
462,
1678,
1196,
353,
285,
29889,
949,
1220,
580,
13,
18884,
285,
29918,
29874,
29889,
3539,
29898,
1445,
29961,
29941,
17531,
718,
11297,
29873,
29915,
718,
1196,
718,
11297,
29876,
1495,
13,
1678,
285,
29918,
29874,
29889,
5358,
580,
13,
13,
13,
1753,
19012,
29918,
24713,
29898,
2271,
29892,
22821,
29945,
2083,
29892,
3646,
29918,
3972,
29892,
17195,
29918,
2084,
1125,
13,
1678,
9995,
22954,
29892,
443,
4058,
322,
1653,
10419,
934,
1213,
15945,
13,
1678,
848,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
5182,
29918,
3972,
29892,
525,
1254,
29899,
29907,
5773,
29903,
29899,
29906,
29900,
29896,
29955,
29900,
29900,
29900,
29896,
29918,
29896,
29899,
3267,
1495,
13,
1678,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
1272,
29918,
3972,
1125,
13,
4706,
934,
2084,
353,
5142,
29898,
2271,
29892,
22821,
29945,
2083,
29892,
3646,
29918,
3972,
29897,
13,
4706,
443,
4058,
29898,
1445,
2084,
29892,
3646,
29918,
3972,
29897,
13,
4706,
2897,
29889,
5992,
29898,
1445,
2084,
29897,
13,
1678,
1683,
29901,
13,
4706,
1596,
703,
15797,
666,
28536,
322,
443,
4058,
292,
29889,
12362,
6850,
29899,
1451,
8233,
29899,
29924,
392,
27139,
29899,
12521,
13364,
848,
2307,
4864,
297,
1273,
29879,
1213,
1273,
3646,
29918,
3972,
29897,
13,
1678,
1653,
29918,
18317,
29918,
726,
29898,
1272,
29918,
3972,
29892,
17195,
29918,
2084,
29897,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
1596,
29918,
25699,
29898,
5085,
29897,
13,
1678,
565,
6389,
29889,
5182,
29918,
3972,
29889,
27382,
2541,
877,
30022,
29374,
13,
4706,
6389,
29889,
5182,
29918,
3972,
353,
2897,
29889,
2084,
29889,
18837,
1792,
29898,
5085,
29889,
5182,
29918,
3972,
29897,
13,
13,
1678,
19012,
29918,
24713,
29898,
2271,
29922,
14573,
29918,
4219,
29892,
13,
462,
1678,
22821,
29945,
2083,
29922,
5773,
29945,
29918,
14573,
29892,
13,
462,
1678,
3646,
29918,
3972,
29922,
5085,
29889,
5182,
29918,
3972,
29892,
13,
462,
1678,
17195,
29918,
2084,
29922,
5085,
29889,
18317,
29918,
726,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
13,
2
] |
server/src/voodoo/gen/caller_checker.py | zstars/weblabdeusto | 0 | 75106 | ALL = 'All servers'
def caller_check(servers = ALL):
def func_wrapper(func):
# TODO: To be implemented. Could get current_app and check it. Useful for anything?
return func
return func_wrapper
| [
1,
15149,
353,
525,
3596,
12424,
29915,
13,
13,
1753,
24959,
29918,
3198,
29898,
643,
874,
353,
15149,
1125,
13,
1678,
822,
3653,
29918,
17699,
29898,
9891,
1125,
13,
4706,
396,
14402,
29901,
1763,
367,
8762,
29889,
6527,
679,
1857,
29918,
932,
322,
1423,
372,
29889,
4803,
1319,
363,
3099,
29973,
13,
4706,
736,
3653,
13,
1678,
736,
3653,
29918,
17699,
13,
13,
2
] |
adapt.py | fredericcassin/adapt-config | 0 | 87405 | #!/usr/bin/env python3
import fnmatch
import os
import sys
import yaml
import json
import re
import glob
import argparse
import csv
from jinja2 import Template
import yamlordereddictloader
import fs
from shutil import copyfile
from jsonpath_rw import jsonpath, parse
from box import Box
from deepmerge import always_merger
def not_yet_implemented():
print("Error: NOT YET IMPLEMENTED.")
exit(1)
# ==========================================================
# Add a patch to the patches structure for the scanned current file
# ==========================================================
def add_patch(patches, current_file, fileRelPath, fileformat, **attributes):
change = dict()
for attribute, value in attributes.items():
change[attribute] = value
if (current_file is None) or fileRelPath != current_file['file'] or fileformat != current_file['format']:
current_file = dict()
current_file['file'] = fileRelPath
current_file['format'] = fileformat
current_file['changes'] = list()
patches.append(current_file)
current_file['changes'].append(change)
return current_file
# ==========================================================
# Add an artifact to the artifacts structure. The artifact is unique according the [type, name] key thus avoiding duplicated artifacts
# The index arg is like a method static var to manage indexes for [type,name] keys
# ==========================================================
def add_artifact(artifacts, type, name, index=dict(), **attributes):
if type not in artifacts:
artifacts[type] = list()
index[type] = dict()
if name in index[type]:
artifact = index[type][name]
else:
artifact = dict()
artifact['name'] = name
artifacts[type].append(artifact)
index[type][name] = artifact
for attribute, value in attributes.items():
artifact[attribute] = value
# ==========================================================
# Resolve with a given context a value contaning possible Jinja rules
# ==========================================================
def resolve(value, context):
if not type(value) is str:
return value
return Template(value).render(context)
# ==========================================================
# Do a global rollback in a folder tree of a patched resource
# All patched files are suffixed by .orig
# ==========================================================
def rollback_resource(args):
files_to_rollback = []
target_dir = args.TARGET_PATH
origin_folder = os.getcwd()
target_dir = os.path.abspath(target_dir)
# we work with relative paths to the kubespray root, then we go to this root folder
os.chdir(target_dir)
for root, _, filenames in os.walk('.'):
for filename in fnmatch.filter(filenames, '*.orig'):
relative_filename = os.path.join(root, filename)
files_to_rollback.append(relative_filename)
for filename_orig in files_to_rollback:
filename = filename_orig[:-5]
copyfile(filename_orig, filename)
os.chdir(origin_folder)
# ==========================================================
# Create the specific scan resulting of a Kubespray Playbook root folder scan
# Returns the artifacts structured result of the scan
# ==========================================================
def scan_kubespray_playbook(args):
current_file = None
artifacts = dict()
patches = artifacts['patch'] = list()
yaml_files_to_scan = []
files_to_scan_regex = []
for root, _, filenames in os.walk('.'):
for filename in fnmatch.filter(filenames, 'main.yml'):
yaml_files_to_scan.append(os.path.join(root, filename))
for filename in fnmatch.filter(filenames, '*.repo.j2'):
files_to_scan_regex.append(os.path.join(root, filename))
pattern_image_repo = re.compile('(.+)_image_repo')
pattern_download_url = re.compile('(.+)_download_url')
pattern_image_tag = re.compile('(.+)_image_tag')
pattern_context_loaded = re.compile('(.+)_version')
pattern_image_id = re.compile('([^/]+/)?(.*)')
pattern_url = re.compile(r'(?:https?:\/\/(?:[^\/]+\/)+)([^\/]+)')
context = {'image_arch': 'amd64'}
# Merge optional additonal context from arguments
if not args.context is None:
for key, value in args.context:
context[key] = value
# Scann all yaml files of the current folder
for filename in yaml_files_to_scan:
with open(filename, "r", encoding='utf8') as yamlFile:
doc_data = yaml.load(yamlFile, Loader=yamlordereddictloader.Loader)
fileformat = 'yaml'
if doc_data is None:
continue
data = doc_data if type(doc_data) is list else [doc_data]
for elem in data:
# Because faster and simpler and enouth for now: only global yaml vars are considered, no recursion into child elements
for key, value in elem.items():
# Case of an empty string, we ignore the key
if type(value) is str and len(value) == 0: continue
if pattern_context_loaded.match(key) is not None:
# Case of a yaml var that could be used by the Jinja templating for searched artifacts var values
context[key] = resolve(value, context)
continue
varname_matching = pattern_image_tag.match(key)
if varname_matching is not None:
# Case of a yaml var {name}_image_tag
name = varname_matching.group(1)
context[key] = resolved_value = resolve(
value, context)
add_artifact(artifacts, type='image_repo', name=name,
tag=resolved_value)
varname_matching = pattern_image_repo.match(key)
if varname_matching is not None:
# Case of a yaml var {name}_image_repo
name = varname_matching.group(1)
context[key] = resolved_value = resolve(
value, context)
image_id_matching = pattern_image_id.match(
resolved_value)
if image_id_matching is not None:
# the {name}_image_repo value is an image provided by an Internet URL, so we create a patch changing the registry prefix of this value
# to use a local registry where the image will be pushed in
current_file = add_patch(patches, current_file, filename, fileformat, json_path = varname_matching.group(0),
new_value = '{{{{ local_registry }}}}/{}'.format(
image_id_matching.group(2)),
old_value = value,
name = name)
# The image downloaded from the Internet mut be pushed to the local registry so it is added to the list of artifacts to dump
add_artifact(artifacts, type='image_repo', name=name,
ref=resolved_value, image=image_id_matching.group(2))
continue
varname_matching = pattern_download_url.match(key)
if varname_matching is not None:
# Case of a yaml var {name}_download_url
name = varname_matching.group(1)
context[key] = resolved_value = resolve(
value, context)
artifact_url = pattern_url.match(resolved_value)
if artifact_url is not None:
download_url_filename = artifact_url.group(1)
# The {name}_image_repo value is a file Internet download, we change the URL to use a local http or file repo
current_file = add_patch(patches, current_file, filename, fileformat, json_path = varname_matching.group(0),
new_value = '{{{{ local_folder }}}}/{}'.format(
download_url_filename),
old_value = value,
name = name)
# The file downloaded from the Internet must be pushed to the local repo so it is added to the list of artifacts to dump
add_artifact(artifacts, type='download_url', name=name,
url=resolved_value, filename=download_url_filename)
# Scan not structured files.
# And no ulike for Helm Charts, YAML files are not scanned as unstructured files
# so we don't execute files_to_scan_regex.extend(yaml_files_to_scan)
# scan git clone <url<name>> <folder>
# don't use this more comple able to capture the [named section] containing a given gpgcheck
#gpgcheck_re = re.compile(r'\[(?P<section_name>[^\n]*)\](?:(?!\n\[[^\n].*|\ngpgcheck=1)\n[^\n]*)*\n(?P<left_term>gpgcheck\s*=)\s*(?P<value>1)', re.MULTILINE + re.DOTALL)
gpgcheck_re = re.compile(r'^(?P<left_term>gpgcheck\s*=)\s*(?P<value>1)$', re.MULTILINE)
for filename in files_to_scan_regex:
with open(filename, "r", encoding='utf8') as unstructured_file:
data = unstructured_file.read()
for item in re.finditer(gpgcheck_re, data):
left_term, value = item.group('left_term'), item.group('value')
new_value = '{left_term}{value}'.format(left_term=left_term, value='0')
current_file = add_patch(patches, current_file, filename, 'text', new_value=new_value, old_value=item.group(0))
return artifacts
# ==========================================================
# Do a recursive scan of an OpenWhisk Helm Chart part elemTuple at given jsonpath for a current scanned file
# Add scanned dependencies resources in artifacts and change to be done in patches structure
# ==========================================================
def scan_helm_chart_element(artifacts, patches, current_file, filename, fileformat, jsonPath, elemTuple):
elem, keyElem, parentTuple = elemTuple
if type(elem) is list:
index = 0
for item in elem:
indexPath = '[{}]'.format(index)
current_file = scan_helm_chart_element(artifacts, patches, current_file, filename, fileformat, indexPath if jsonPath is None else jsonPath + indexPath, (item, index, elemTuple))
index += 1
elif type(elem) is dict or isinstance(elem, yamlordereddictloader.OrderedDict):
pattern_image_id = re.compile('([^/]+/)?(.*)')
# Because faster and simpler and enouth for now: only global yaml vars are considered, no recursion into child elements
for key, value in elem.items():
if (key == 'imageName' or key == 'image') and type(value) is str:
# Case of a yaml var imageName
#name = elem['name'] if 'name' in elem else jsonPath
image_id_matching = pattern_image_id.match(value)
if image_id_matching is not None:
# the value is an image provided by an Internet docker image name, so we create a patch changing the registry prefix of this value
# to use a local registry where the image will be pushed in
imageRef = value
imageName = image_id_matching.group(2)
imageTag = elem['imageTag'] if 'imageTag' in elem else None
imageNameTag = imageName if imageTag is None else imageName + ':' + imageTag
current_file = add_patch(patches, current_file, filename, fileformat, json_path = key if jsonPath is None else jsonPath + '.' + key,
new_value = '{{{{ local_registry }}}}/{}'.format(imageName),
old_value = value,
name = imageName)
# The image downloaded from the Internet mut be pushed to the local registry so it is added to the list of artifacts to dump
add_artifact(artifacts, type='image_repo', name=imageNameTag,
ref=imageRef, image=imageRef, tag=imageTag)
elif key == 'name' and type(value) is str and ('prefix' in elem or 'tag' in elem) and (keyElem == 'image' or (parentTuple[1] == 'blackboxes')):
# Case of a json var of type docker image
imageName = value
imagePrefix = elem['prefix'] if 'prefix' in elem else None
imageRef = imageName if imagePrefix is None else imagePrefix + '/' + imageName
imageTag = elem['tag'] if 'tag' in elem else None
imageNameTag = imageName if imageTag is None else imageName + ':' + imageTag
# the value is an image provided by an Internet docker image name, so we create a patch changing the registry prefix of this value
# to use a local registry where the image will be pushed in
current_file = add_patch(patches, current_file, filename, fileformat, json_path = jsonPath + '.prefix',
new_value = '{{ local_registry }}',
old_value = imagePrefix,
name = imageName)
# The image downloaded from the Internet mut be pushed to the local registry so it is added to the list of artifacts to dump
add_artifact(artifacts, type='image_repo', name=imageNameTag,
ref=imageRef, image=imageRef, tag=imageTag)
else:
current_file = scan_helm_chart_element(artifacts, patches, current_file, filename, fileformat, key if jsonPath is None else jsonPath + '.' + key, (value, key, elemTuple))
return current_file
# ==========================================================
# log functions
# ==========================================================
def log_error(message, args = None):
log(False, 'Error', message)
def log_alert(message, args = None):
log(False if args is None else args.quiet, 'Warning', message)
def log(is_quiet, level, message):
if not is_quiet:
print('{}:{}'.format(level, message))
# ==========================================================
# evaluate the x value as a python sentence using the context v
# ==========================================================
def eval_elem(x, v):
try:
if type(x) is str:
return eval(x)
else:
return x
except Exception as e:
log_error('"{}": {}'.format(x, e))
# ==========================================================
# map a function recursively to the something yaml doc
# ==========================================================
def recursive_map(something, func):
if isinstance(something, dict):
accumulator = {}
for key, value in something.items():
accumulator[key] = recursive_map(value, func)
return accumulator
elif isinstance(something, (list, tuple, set)):
accumulator = []
for item in something:
accumulator.append(recursive_map(item, func))
return type(something)(accumulator)
else:
return func(something)
# ==========================================================
# insert / update the scan_result yaml doc with the value using the parser as the path to to the value
# ==========================================================
def update_recursively(scan_result, parser, value):
# Not resolve means the parent (parser.left) must be extended by the parser.right
tp = type(parser)
if tp is jsonpath.Child:
tpr = type(parser.right)
recurs_value = None
if tpr is jsonpath.Fields:
recurs_value = dict()
elif tpr is jsonpath.Slice:
recurs_value = []
else:
raise Exception('Cannot manage a parser type {} in the recursive update'.format(tpr))
elem = update_recursively(scan_result, parser.left, recurs_value)
elif tp is jsonpath.Root:
return scan_result
# elem is extended by parser.right
if tpr is jsonpath.Fields:
if (len(parser.right.fields) != 1):
raise Exception('Several paths due to {}'.format(parser.right.fields))
if not type(elem) is dict:
raise Exception('Cannot create for the type {} the attribute {}'.format(type(elem), parser.right.fields[0]))
if not parser.right.fields[0] in elem:
elem[parser.right.fields[0]] = value
else:
elem[parser.right.fields[0]] = always_merger.merge(elem[parser.right.fields[0]], value)
return elem[parser.right.fields[0]]
elif tpr is jsonpath.Slice:
if parser.right.start is None and parser.right.end is None and parser.right.step is None:
elem.append(value)
return elem[-1]
raise Exception('Inconsistent algorithm')
# ==========================================================
# update the scan_result yaml doc using the set yaml descriptor and the context v
# ==========================================================
def update(scan_result, set, v):
parser = parse(set['path'])
update_recursively(scan_result, parser, recursive_map(set['value'], lambda x: eval_elem(x, v)))
# ==========================================================
# Create the specific scan resulting of a OpenWhisk Helm Chart root folder scan
# Returns the artifacts structured result of the scan
# ==========================================================
def scan_file(file_system, fs_path, data, actions, args, scan_result):
# Scan JSON well formed files
for action in actions:
if 'get' in action:
results = [match.value for match in parse(action['get']).find(data)]
else:
results = [data]
for item_data in results:
v = Box(item_data)
if 'perform' in action and not any([isinstance(item_data, list), isinstance(item_data, tuple)]):
perform_list = [action['perform']] if type(action['perform']) is dict else action['perform']
for perform in perform_list:
performed = v['performed'] = []
perform_result = None
try:
if 'finditer' in perform:
match_re = re.compile(perform['finditer'], re.MULTILINE)
matching_data = recursive_map(perform['value'], lambda x: eval_elem(x, v))
perform_result = []
for r in re.finditer(match_re, matching_data): perform_result.append(r)
elif 'match' in perform:
match_re = re.compile(perform['match'], re.MULTILINE)
matching_data = recursive_map(perform['value'], lambda x: eval_elem(x, v))
perform_result = re.match(match_re, matching_data)
else:
log_error('{} is an invalid perform item'.format(perform), args)
performed.append(perform_result)
if 'name' in perform: v[perform['name']] = perform_result
except Exception as e:
log_error('"{}" {}'.format(perform, e), args)
# do the set on each get item
if 'set' in action:
# get the hasattr condition
attr_list = []
if 'hasattr' in action:
attr_list = action['hasattr'] if type(action['hasattr']) is list else [action['hasattr']]
# get the if condition
if_condition = 'True'
if 'if' in action: if_condition = action['if']
try:
for attr in attr_list:
if attr[0] == '!':
if hasattr(v, attr[1:]):
if_condition = 'False'
break
else:
if not hasattr(v, attr):
if_condition = 'False'
break
except Exception as e:
v = item_data
try:
if eval(if_condition):
try:
update(scan_result, action['set'], v)
except Exception as e:
log_error('"{}" {}'.format(action['set'], e), args)
except Exception as e:
log_alert('"{}" {}'.format(if_condition, e), args)
# ==========================================================
# Create the scan resulting of a directory scan
# Returns the artifacts structured result of the scan
# ==========================================================
def scan_resource(args):
# read configurations
configs = list()
with open(args.CONFIG, "r", encoding='utf8') as config_yaml_file:
config_docs = yaml.load_all(config_yaml_file)
for config in config_docs:
configs.append(config)
# take into account context option
if type(args.context) is str:
try:
# A context for immediate substitution during the apply is provided. We tranform it in JSON/YAML
args.context = json.loads(args.context)
except ValueError:
args.context = eval(args.context)
## Take into account rollback option
if args.rollback: rollback_resource(args)
target_dir = args.TARGET_PATH
#(deprecated) origin_folder = os.getcwd()
target_dir = os.path.abspath(target_dir)
# we work with relative paths, then we go to this folder
# (deprecated) os.chdir(target_dir)
scan_result = dict()
res = scan_result['resource'] = dict()
res['path'] = target_dir
# check the type of resource
# if os.path.isdir('./roles/kubespray-defaults'):
# artifacts = scan_kubespray_playbook(args)
# elif os.path.isfile('./Chart.yml') or os.path.isfile('./Chart.yaml'):
# artifacts = scan_helm_chart(args)
# else:
# print("Error: '{}' seems to be not a kubespray playbook or a helm chart folder".format(target_dir))
# exit(1)
supported_file_contents = ['yaml', 'json', 'text']
for config in configs:
for content_type in supported_file_contents:
for typed_file_patterns in parse('$.{}.[*]'.format(content_type)).find(config):
print(typed_file_patterns.value)
inclusions = [match.value for match in parse('[*].include[*]').find(typed_file_patterns.value)]
exclusions = [match.value for match in parse('[*].exclude[*]').find(typed_file_patterns.value)]
with fs.open_fs(target_dir) as file_system:
for fs_path in file_system.walk.files(filter=None):
is_included = True
if len(inclusions) > 0:
is_included = False
for inclusion in inclusions:
if fs.glob.match(inclusion, fs_path):
is_included = True
break
for exclusion in exclusions:
if fs.glob.match(exclusion, fs_path):
is_included = False
break
if not is_included: continue
# The fs_path must be analysed, we get this content
try:
with file_system.open(fs_path, "r", encoding='utf8') as file_to_scan:
if content_type == 'yaml':
data = yaml.load(file_to_scan, Loader=yamlordereddictloader.Loader)
elif content_type == 'json':
data = json.load(file_to_scan)
elif content_type == 'text':
data = file_to_scan.load()
else:
log_alert('{} is a unknown file content type and then ignored. Only {} are supported.'.format(content_type, supported_file_contents), args)
# The file content data is scanned
if 'actions' in typed_file_patterns.value:
scan_file(file_system, fs_path, data, typed_file_patterns.value['actions'], args, scan_result)
else:
log_alert('{} is a unknown file content type and then ignored. Only {} are supported.'.format(content_type, supported_file_contents), args)
except yaml.parser.ParserError as ex:
log_alert('YAML error {} in {}. The file is ignored.'.format(ex, fs_path), args)
except yaml.scanner.ScannerError as ex:
log_alert('YAML error {} in {}. The file is ignored.'.format(ex, fs_path), args)
# restore the current working folder
#(deprecated) os.chdir(origin_folder)
# returns the scan result
return scan_result
# ==========================================================
# Get the output stream from args
# ==========================================================
def get_output_stream(args):
return sys.stdout if args.output is None else open(args.output, 'w', encoding='utf8')
# ==========================================================
# Get the input stream from args
# ==========================================================
def get_input_stream(args):
return sys.stdin if args.input is None else open(args.input, 'r', encoding='utf8')
# ==========================================================
# Dump the json structured content to the given stream in a YAML format
# ==========================================================
def dump_as_yaml(content, stream, args):
yaml.safe_dump(content, stream, default_flow_style=False)
# (deprecated because introduce 'item': !!python/unicode "some string"
# see https://stackoverflow.com/questions/20352794/pyyaml-is-producing-undesired-python-unicode-output/20369984
# yaml.dump(yaml_doc['patches'], sys.stdout, encoding='utf-8', allow_unicode=True,
# Dumper=yamlordereddictloader.Dumper)
# ==========================================================
# Dump the json structured content to the given stream in a CSV format
# The columns are defined by args.type
# ==========================================================
def dump_as_csv(content, stream, args, fieldnames_by_type={'download_url': ['name', 'url', 'filename'],
'image_repo': ['name', 'ref', 'tag', 'image'],
'git_repo': ['name', 'url', 'folder'],
'patch': ['file', 'json_path', 'name', 'new_value', 'old_value']}):
# Convert a patch list to be serializable in CSV
if args.type == 'patch':
content_csv = list()
for patched_file in content:
for patch in patched_file['changes']:
patch['file'] = patched_file['file']
content_csv.append(patch)
content = content_csv
listWriter = csv.DictWriter(
stream,
fieldnames=fieldnames_by_type[args.type] if args.type in fieldnames_by_type else content[0].keys(
),
delimiter=',',
quotechar='"',
quoting=csv.QUOTE_NONNUMERIC
)
listWriter.writerows(content)
# ==========================================================
# Dump the json structured content to the given stream in a format specified by args.format
# ==========================================================
def dump(content, stream, args):
globals()['dump_as_' + args.format](content, stream, args)
# ==========================================================
# Transform a jsonpath into a list of items like this:
# aaa.bbb[0][5].ccc ==> ('aaa', 'bbb', 0, 5, 'ccc')
# The resulting list facilitates the jsonpath processing
# ==========================================================
def jsonpath_to_list(str_path):
doted_list = str_path.split('.')
result = list()
for path_elem in doted_list:
elem_array = jsonpath_to_list.pathElem.match(path_elem)
if elem_array is None:
raise ValueError('{} is not a valid JSON/YAML path'.format(str_path))
else:
if not elem_array.group(1) is None: result.append(elem_array.group(1))
if not elem_array.group(2) is None: result.append(int(elem_array.group(2)))
return result
jsonpath_to_list.pathElem = re.compile(r'([^\[]*)(?:\[([0-9]+)\])?')
# ==========================================================
# Function returning a tuple which matches the json_path in thr root strctured object
# Returns a tuple (parent, key to the leaf , leaf)
# ==========================================================
def get_from_json_path(root, json_path):
if type(json_path) is str:
json_path = jsonpath_to_list(json_path)
key = json_path[0]
if (isinstance(key, int) and isinstance(root, list) and key < len(root)) or (key in root):
return (root, key, root[key]) if len(json_path) == 1 else get_from_json_path(root[key], json_path[1:])
return (None, None, None)
# ==========================================================
# Apply change to a data as a structured content (json or YAML)
# The change is as it is contained in a scan result
# Returns True if a change on the data has been done
# ==========================================================
def apply_change(data, change, args, filename):
has_changed = False
# Make imediately the template jinja2 exec using a context if it is provided, only on new values
new_value = change['new_value'] if args.context is None else resolve(change['new_value'], args.context)
old_value = change['old_value']
if 'json_path' in change:
# Case of a JSON / YAML change
if type(data) is str:
raise RuntimeError('The file cannot be read in YAML while a YAML modification must be applied to it')
key = json_path = change['json_path']
path_end, key, replaced_value = get_from_json_path(data, json_path)
if not replaced_value is None:
if replaced_value != old_value and replaced_value != new_value:
raise RuntimeError("'{}:{}' = '{}' but must be equal to '{}' to be changed to '{}'".format(
filename, json_path, replaced_value, old_value, new_value))
if replaced_value == new_value:
print("{}: '{}' = '{}' not found because probably the change has been done by a previous change".format(
filename, json_path, replaced_value))
else:
path_end[key] = new_value
has_changed = True
if args.dry_run:
print("Dry-run: file {}, '{}' at {} is replaced by '{}'".format(filename, old_value, json_path, new_value))
else:
raise RuntimeError('{} not found', json_path)
else:
# Case of a textual search and replace
count = 0
while data.find(old_value) != -1:
data = data.replace(old_value, new_value, 1)
count += 1
has_changed = True
if args.dry_run and count > 0:
print("Dry-run: file {}, {} '{}' has been replaced by {}".format(filename, str(count), old_value, new_value))
if count == 0:
print("{}: '{}' not found because probably the change has been done by a previous change".format(
filename, old_value))
return data, has_changed
# ==========================================================
# Apply changes to a given file of a given format.
# Returns True if the file has been changed
# ==========================================================
def apply_changes_to_file(filename, fileformat, changes, args):
is_file_changed = False
is_content_changed = False
doc_data = None
with open(filename, "r", encoding='utf8') as file_to_change:
try:
# PyYAML/yaml is able to read json too
doc_data = yaml.load(file_to_change, Loader=yamlordereddictloader.Loader)
except:
# If the file cannot be read as structured format, we work with text related changes
file_to_change.seek(0)
doc_data = file_to_change.read()
for change in changes:
try:
doc_data, has_changed = apply_change(doc_data, change, args, filename)
if has_changed: is_content_changed = True
except RuntimeError as err:
print('Error in file {}: {}'.format(filename, str(err)))
if not args.dry_run:
# We stop immediately
raise err
if is_content_changed:
if args.rollbackable:
# The file has been changed, whe make a copy if not already done and then the file is updated
filename_orig = filename + '.orig'
if args.dry_run:
print(
"Dry-run: {} has been copied to {}".format(filename, filename_orig))
else:
if not os.path.exists(filename_orig):
copyfile(filename, filename_orig)
else:
if args.dry_run:
print("Dry-run: {} already exists".format(filename_orig))
if not args.dry_run:
# Update the file
with open(filename, 'w', encoding='utf8') as updated_file:
if type(doc_data) is str and fileformat == 'text':
updated_file.write(doc_data)
else:
if fileformat == 'yaml':
yaml.dump(doc_data, updated_file, encoding='utf-8', default_flow_style=False,
Dumper=yamlordereddictloader.Dumper)
elif fileformat == 'json':
json.dump(doc_data, updated_file, sort_keys = False, indent = 4, ensure_ascii = False)
else:
raise RuntimeError('{} is not a supported file format. The file {} has not been changed'.format(fileformat, filename))
is_file_changed = True
return is_file_changed
# ==========================================================
# Apply a patch as it is structured in a scan result
# args give options and the target folder where to apply changes
# ==========================================================
def apply_patch(patch, args):
if args.rollback: rollback_resource(args)
if type(args.context) is str:
try:
# A context for immediate substitution during the apply is provided. We tranform it in JSON/YAML
args.context = json.loads(args.context)
except ValueError:
args.context = eval(args.context)
target_dir = args.TARGET_PATH
origin_folder = os.getcwd()
target_dir = os.path.abspath(target_dir)
# we work with relative paths to the kubespray root, then we go to this root folder
os.chdir(target_dir)
# iterate changes file by file
for file_changes in patch:
filename = file_changes['file']
fileformat = file_changes['format']
if apply_changes_to_file(filename, fileformat, file_changes['changes'], args):
if args.dry_run:
print("Dry-run: {} has been patched".format(filename))
else:
print("{} has been patched".format(filename))
# restore the current folder
os.chdir(origin_folder)
# ==========================================================
# scan command execution: build a YAML file containing all changes and Internet dependencies required by
# a kubespray playbook or an Helm Chart to be usd in a offline environment
# ==========================================================
def do_scan(args):
args.format = 'yaml'
yaml_doc = scan_resource(args)
dump(yaml_doc, get_output_stream(args), args)
# ==========================================================
# dump command execution: use as input the YAML file generated by scan.
# Produce the output for a given type of object in the CSV format by default
# ==========================================================
def do_dump(args):
yaml_doc = yaml.load(get_input_stream(
args), Loader=yamlordereddictloader.Loader)
if type(yaml_doc) is dict or isinstance(yaml_doc, yamlordereddictloader.OrderedDict):
# the yaml_doc seems to be a YAML document, we use it to execute a dump
dump(yaml_doc[args.type] if args.type in yaml_doc else list(), get_output_stream(args), args)
else:
print("Error: the input stream is not a valid YAML for the dump command.")
exit(1)
# ==========================================================
# apply command execution: use as input the YAML file generated by scan.
# Do changes (or simulate it if --dry-run) in a given folder tree of a
# Kubespray Ansible Playbook or a OpenWhisk Helm Chart
# ==========================================================
def do_apply(args):
not_yet_implemented()
if args.dry_run and args.rollback:
print("Error: the dry-run and rollback options cannot be used together.")
exit(1)
yaml_doc = yaml.load(get_input_stream(
args), Loader=yamlordereddictloader.Loader)
if type(yaml_doc) is dict or isinstance(yaml_doc, yamlordereddictloader.OrderedDict):
apply_patch(yaml_doc['patch'], args)
else:
print("Error: the input stream is not a valid YAML for the dump command.")
exit(1)
# ==========================================================
# roolback command execution
# ==========================================================
def do_rollback(args):
rollback_resource(args)
# ==========================================================
# list-vars command execution
# ==========================================================
def do_list_vars(args):
vars_in_new_values = set()
pattern_jinja_var = re.compile(r'\{\{[\s\r\n]*(?P<var_name>[A-Za-z_][\-A-Za-z_0-9]*)[\s\r\n]*\}\}')
yaml_doc = yaml.load(get_input_stream(
args), Loader=yamlordereddictloader.Loader)
if type(yaml_doc) is dict or isinstance(yaml_doc, yamlordereddictloader.OrderedDict):
for file_change in yaml_doc['patch']:
for change in file_change['changes']:
for var in re.findall(pattern_jinja_var, change['new_value']):
vars_in_new_values.add(var)
else:
print("Error: the input stream is not a valid YAML for the dump command.")
exit(1)
print(vars_in_new_values)
# ==========================================================
# Get the args parser related to given args
# ==========================================================
def parse_args(args):
# ==========================================================
# CLI syntax configuration and documentation defined and processed by the argparse python standard lib
# ==========================================================
parser = argparse.ArgumentParser(
description='CLI tool helper to adapt software configuration by scanning and changing files in a directory', formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('--version', action='version', version='1.0.0')
parser.add_argument('CONFIG', help='configuration file')
subparsers = parser.add_subparsers()
scan_parser = subparsers.add_parser(
'scan', help='make a scan (read only) and produce a YAML result which lists identified elements and patches to apply')
scan_parser.set_defaults(func=do_scan)
rollback_parser = subparsers.add_parser(
'rollback', help='do a rollback using a rollback file generated by a patch command')
rollback_parser.set_defaults(func=do_rollback)
dump_parser = subparsers.add_parser(
'dump', help='dump the input generated by the scan to produce a given type of object in the CSV format by default', formatter_class=argparse.RawTextHelpFormatter)
dump_parser.set_defaults(func=do_dump)
apply_parser = subparsers.add_parser(
'apply', help='apply changes identified by a scan and produce a rollback file if not already exists')
apply_parser.set_defaults(func=do_apply)
list_vars_parser = subparsers.add_parser(
'list-vars', help='list variables you can subsitute on applied changes using the command apply and the option --context')
list_vars_parser.set_defaults(func=do_list_vars)
list_vars_parser.add_argument(
'-i', '--input', help='file path of the source file as the YAML result of the scan command')
rollback_parser.add_argument('TARGET_PATH',
help='Kubespray playbook or helm chart folder location where to apply patches', default='.')
scan_parser.add_argument('--rollback', action='store_true',
help='do a global rollback before')
scan_parser.add_argument('--quiet', action='store_true',
help='do not display warnings and info messages')
scan_parser.add_argument(
'-o', '--output', help='file path of the destination file for the YAML result')
scan_parser.add_argument('TARGET_PATH',
help='Kubespray playbook or helm chart folder location', default='.')
scan_parser.add_argument(
'--context', help="""context as a json string to resolve scanned values on the fly (example: --context '{"a":"v1","b":3}')""")
dump_parser.add_argument(
'-t', '--type', nargs='?', default='patch', choices=['patch', 'download_url', 'image_repo', 'git_repo'], help='type of entry to dump')
dump_parser.add_argument(
'-f', '--format', nargs='?', default='csv', choices=['yaml', 'csv'], help='''output format of the dumped data.
For the CSV format, columns order depends of the type:
download_url: name, url, filename
image_repo: name, ref, tag, image
git_repo: name, url, folder
patch: file, json_path, name, new_value, old_value''')
dump_parser.add_argument(
'-i', '--input', help='file path of the source file as the YAML result of the scan command')
dump_parser.add_argument(
'-o', '--output', help='file path of the destination file for the YAML result')
apply_parser.add_argument(
'-i', '--input', help='file path of the patch file as the YAML result of the scan command')
apply_parser.add_argument(
'--rollbackable', action='store_true', help='files are copied to a same_filename.orig before any change. This copy is used by the --rollback operation')
apply_parser.add_argument(
'--context', help="""context as a json string to resolve patched values on the fly (example: --context '{"a":"v1","b":3}')""")
apply_parser.add_argument('--dry-run', action='store_true',
help='do all things whithout changing the playbook or helm chart. All changes are displayed on the standard output')
apply_parser.add_argument('--rollback', action='store_true',
help='do a global rollback before')
apply_parser.add_argument('TARGET_PATH',
help='Kubespray playbook or helm chart folder location where to apply patches', default='.')
return parser.parse_args(args)
# ==========================================================
# ========================== main ==========================
# ==========================================================
if __name__ == '__main__':
# ==========================================================
# Unit testing section, Sorry to not be capable to use advanced unit testing tools, but I'am a kind of beginner in the Python world
# ==========================================================
# For local test, uncomment the session you want to test:
"""
# Full Kubespray test session: --> rollback --> scan --> apply
sys_argv = sys.argv.copy()
sys.argv.extend(['rollback', r'c:\projects\src\kubespray'])
args = parser.parse_args()
args.func(args)
sys.argv = sys_argv.copy()
sys.argv.extend(['scan', '-o', r'c:\projects\src\scan.yml', r'c:\projects\src\kubespray'])
args = parser.parse_args()
args.func(args)
sys.argv = sys_argv.copy()
#sys.argv.extend(['apply', '--context', '{"local_registry":"W.X.Y.Z:5000","local_hfs":"http://W.X.Y.Z:80"}', '--input', r'c:\projects\src\scan.yml',
# r'c:\projects\src\kubespray'])
sys.argv.extend(['apply', '--input', r'c:\projects\src\scan.yml', r'c:\projects\src\kubespray'])
"""
# Helm Chart
sys.argv.extend(['openwhisk.adapt.yaml', 'scan', '--quiet', '-o', r'c:\projects\src\openwhisk.scan.yml', r'c:\projects\src\incubator-openwhisk-deploy-kube-master.old/helm/openwhisk'])
#sys.argv.extend(['dump', '--format', 'csv', '--type', 'image_repo', '--input', 'c:/projects/src/chart-scan.yml'])
#sys.argv.extend(['dump', '--format', 'csv', '--type', 'git_repo', '--input', 'c:/projects/src/chart-scan.yml'])
#sys.argv.extend(['apply', '--context', "{'local_registry':'W.X.Y.Z:5000'}", '--input', 'c:/projects/src/chart-scan.yml',
# '--dry-run', r'c:\projects\src\incubator-openwhisk-deploy-kube-master.old\helm\openwhisk'])
"""
# Full Helm test session: --> rollback --> scan --> apply
sys_argv = sys.argv.copy()
sys.argv.extend(['rollback', r'C:\projects\src\incubator-openwhisk-deploy-kube-master.old\helm\openwhisk'])
args = parser.parse_args()
args.func(args)
sys.argv = sys_argv.copy()
sys.argv.extend(['scan', '-o', r'c:\projects\src\chart-scan.yml', r'c:\projects\src\incubator-openwhisk-deploy-kube-master.old/helm/openwhisk'])
args = parser.parse_args()
args.func(args)
sys.argv = sys_argv.copy()
sys.argv.extend(['apply', '--context', '{"local_registry":"W.X.Y.Z:5000","local_hfs":"http://W.X.Y.Z:80"}', '--input', 'c:/projects/src/chart-scan.yml',
r'c:\projects\src\incubator-openwhisk-deploy-kube-master.old\helm\openwhisk'])
"""
#sys.argv.extend(['rollback', '--help'])
#sys.argv.extend(['list-vars', '--input', 'c:/projects/src/chart-scan.yml'])
#sys.argv.extend(['dump', '--help'])
# ==========================================================
# Parse args and execute the command with options if the syntax is OK
# ==========================================================
parser = parse_args(sys.argv[1:])
parser.func(parser)
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
5215,
7876,
4352,
13,
5215,
2897,
13,
5215,
10876,
13,
5215,
343,
8807,
13,
5215,
4390,
13,
5215,
337,
13,
5215,
13149,
13,
5215,
1852,
5510,
13,
5215,
11799,
13,
3166,
432,
262,
1764,
29906,
1053,
25663,
13,
5215,
343,
8807,
21693,
8977,
12657,
13,
5215,
18920,
13,
3166,
528,
4422,
1053,
3509,
1445,
13,
3166,
4390,
2084,
29918,
13975,
1053,
4390,
2084,
29892,
6088,
13,
3166,
3800,
1053,
11773,
13,
3166,
6483,
14634,
1053,
2337,
29918,
1050,
914,
13,
13,
13,
1753,
451,
29918,
29891,
300,
29918,
326,
2037,
287,
7295,
13,
1678,
1596,
703,
2392,
29901,
6058,
612,
2544,
306,
3580,
1307,
13780,
3352,
23157,
13,
1678,
6876,
29898,
29896,
29897,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
3462,
263,
13261,
304,
278,
13261,
267,
3829,
363,
278,
885,
11310,
1857,
934,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
788,
29918,
5041,
29898,
5041,
267,
29892,
1857,
29918,
1445,
29892,
934,
9662,
2605,
29892,
934,
4830,
29892,
3579,
15697,
1125,
13,
1678,
1735,
353,
9657,
580,
13,
1678,
363,
5352,
29892,
995,
297,
8393,
29889,
7076,
7295,
13,
4706,
1735,
29961,
12715,
29962,
353,
995,
13,
1678,
565,
313,
3784,
29918,
1445,
338,
6213,
29897,
470,
934,
9662,
2605,
2804,
1857,
29918,
1445,
1839,
1445,
2033,
470,
934,
4830,
2804,
1857,
29918,
1445,
1839,
4830,
2033,
29901,
13,
4706,
1857,
29918,
1445,
353,
9657,
580,
13,
4706,
1857,
29918,
1445,
1839,
1445,
2033,
353,
934,
9662,
2605,
13,
4706,
1857,
29918,
1445,
1839,
4830,
2033,
353,
934,
4830,
13,
4706,
1857,
29918,
1445,
1839,
25990,
2033,
353,
1051,
580,
13,
4706,
13261,
267,
29889,
4397,
29898,
3784,
29918,
1445,
29897,
13,
1678,
1857,
29918,
1445,
1839,
25990,
13359,
4397,
29898,
3167,
29897,
13,
1678,
736,
1857,
29918,
1445,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
3462,
385,
24238,
304,
278,
24238,
29879,
3829,
29889,
450,
24238,
338,
5412,
5034,
278,
518,
1853,
29892,
1024,
29962,
1820,
4550,
4772,
292,
5141,
9169,
24238,
29879,
29871,
13,
29937,
450,
2380,
1852,
338,
763,
263,
1158,
2294,
722,
304,
10933,
18111,
363,
518,
1853,
29892,
978,
29962,
6611,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
788,
29918,
8813,
29898,
8813,
29879,
29892,
1134,
29892,
1024,
29892,
2380,
29922,
8977,
3285,
3579,
15697,
1125,
13,
1678,
565,
1134,
451,
297,
24238,
29879,
29901,
13,
4706,
24238,
29879,
29961,
1853,
29962,
353,
1051,
580,
13,
4706,
2380,
29961,
1853,
29962,
353,
9657,
580,
13,
1678,
565,
1024,
297,
2380,
29961,
1853,
5387,
13,
4706,
24238,
353,
2380,
29961,
1853,
3816,
978,
29962,
13,
1678,
1683,
29901,
13,
4706,
24238,
353,
9657,
580,
13,
4706,
24238,
1839,
978,
2033,
353,
1024,
13,
4706,
24238,
29879,
29961,
1853,
1822,
4397,
29898,
8813,
29897,
13,
4706,
2380,
29961,
1853,
3816,
978,
29962,
353,
24238,
13,
1678,
363,
5352,
29892,
995,
297,
8393,
29889,
7076,
7295,
13,
4706,
24238,
29961,
12715,
29962,
353,
995,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
24062,
345,
411,
263,
2183,
3030,
263,
995,
640,
273,
292,
1950,
29779,
1764,
6865,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
8814,
29898,
1767,
29892,
3030,
1125,
13,
1678,
565,
451,
1134,
29898,
1767,
29897,
338,
851,
29901,
13,
4706,
736,
995,
13,
1678,
736,
25663,
29898,
1767,
467,
9482,
29898,
4703,
29897,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
1938,
263,
5534,
9679,
1627,
297,
263,
4138,
5447,
310,
263,
13261,
287,
6503,
13,
29937,
2178,
13261,
287,
2066,
526,
9378,
11925,
491,
869,
12683,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
9679,
1627,
29918,
10314,
29898,
5085,
1125,
13,
13,
1678,
2066,
29918,
517,
29918,
1245,
1627,
353,
5159,
13,
1678,
3646,
29918,
3972,
353,
6389,
29889,
29911,
1718,
7194,
29918,
10145,
13,
1678,
3978,
29918,
12083,
353,
2897,
29889,
657,
29883,
9970,
580,
13,
1678,
3646,
29918,
3972,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
5182,
29918,
3972,
29897,
13,
1678,
396,
591,
664,
411,
6198,
10898,
304,
278,
413,
431,
9983,
764,
3876,
29892,
769,
591,
748,
304,
445,
3876,
4138,
13,
1678,
2897,
29889,
305,
3972,
29898,
5182,
29918,
3972,
29897,
13,
13,
1678,
363,
3876,
29892,
17117,
977,
264,
1280,
297,
2897,
29889,
20919,
877,
6169,
1125,
13,
4706,
363,
10422,
297,
7876,
4352,
29889,
4572,
29898,
1777,
264,
1280,
29892,
525,
10521,
12683,
29374,
13,
9651,
6198,
29918,
9507,
353,
2897,
29889,
2084,
29889,
7122,
29898,
4632,
29892,
10422,
29897,
13,
9651,
2066,
29918,
517,
29918,
1245,
1627,
29889,
4397,
29898,
22925,
29918,
9507,
29897,
13,
13,
1678,
363,
10422,
29918,
12683,
297,
2066,
29918,
517,
29918,
1245,
1627,
29901,
13,
4706,
10422,
353,
10422,
29918,
12683,
7503,
29899,
29945,
29962,
13,
4706,
3509,
1445,
29898,
9507,
29918,
12683,
29892,
10422,
29897,
13,
29871,
13,
1678,
2897,
29889,
305,
3972,
29898,
12574,
29918,
12083,
29897,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
6204,
278,
2702,
12812,
9819,
310,
263,
29024,
9983,
764,
7412,
2909,
3876,
4138,
12812,
13,
29937,
16969,
278,
24238,
29879,
2281,
2955,
1121,
310,
278,
12812,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
12812,
29918,
29895,
431,
9983,
764,
29918,
1456,
2909,
29898,
5085,
1125,
13,
1678,
1857,
29918,
1445,
353,
6213,
13,
1678,
24238,
29879,
353,
9657,
580,
13,
1678,
13261,
267,
353,
24238,
29879,
1839,
5041,
2033,
353,
1051,
580,
13,
1678,
343,
8807,
29918,
5325,
29918,
517,
29918,
16192,
353,
5159,
13,
1678,
2066,
29918,
517,
29918,
16192,
29918,
13087,
353,
5159,
13,
13,
1678,
363,
3876,
29892,
17117,
977,
264,
1280,
297,
2897,
29889,
20919,
877,
6169,
1125,
13,
4706,
363,
10422,
297,
7876,
4352,
29889,
4572,
29898,
1777,
264,
1280,
29892,
525,
3396,
29889,
21053,
29374,
13,
9651,
343,
8807,
29918,
5325,
29918,
517,
29918,
16192,
29889,
4397,
29898,
359,
29889,
2084,
29889,
7122,
29898,
4632,
29892,
10422,
876,
13,
4706,
363,
10422,
297,
7876,
4352,
29889,
4572,
29898,
1777,
264,
1280,
29892,
525,
10521,
20095,
29889,
29926,
29906,
29374,
13,
9651,
2066,
29918,
517,
29918,
16192,
29918,
13087,
29889,
4397,
29898,
359,
29889,
2084,
29889,
7122,
29898,
4632,
29892,
10422,
876,
13,
13,
1678,
4766,
29918,
3027,
29918,
20095,
353,
337,
29889,
12198,
877,
11891,
29974,
20344,
3027,
29918,
20095,
1495,
13,
1678,
4766,
29918,
10382,
29918,
2271,
353,
337,
29889,
12198,
877,
11891,
29974,
20344,
10382,
29918,
2271,
1495,
13,
1678,
4766,
29918,
3027,
29918,
4039,
353,
337,
29889,
12198,
877,
11891,
29974,
20344,
3027,
29918,
4039,
1495,
13,
1678,
4766,
29918,
4703,
29918,
15638,
353,
337,
29889,
12198,
877,
11891,
29974,
20344,
3259,
1495,
13,
1678,
4766,
29918,
3027,
29918,
333,
353,
337,
29889,
12198,
877,
4197,
29985,
29914,
10062,
4551,
26889,
5575,
29897,
1495,
13,
1678,
4766,
29918,
2271,
353,
337,
29889,
12198,
29898,
29878,
29915,
10780,
29901,
991,
29973,
3583,
7998,
29914,
10780,
10834,
3823,
29914,
29962,
3124,
4551,
28135,
4197,
3823,
29914,
10062,
29897,
1495,
13,
1678,
3030,
353,
11117,
3027,
29918,
1279,
2396,
525,
22490,
29953,
29946,
10827,
13,
268,
13,
1678,
396,
4702,
479,
13136,
788,
277,
7177,
3030,
515,
6273,
13,
1678,
565,
451,
6389,
29889,
4703,
338,
6213,
29901,
13,
4706,
363,
1820,
29892,
995,
297,
6389,
29889,
4703,
29901,
13,
9651,
3030,
29961,
1989,
29962,
353,
995,
29871,
13,
13,
1678,
396,
2522,
812,
599,
343,
8807,
2066,
310,
278,
1857,
4138,
13,
1678,
363,
10422,
297,
343,
8807,
29918,
5325,
29918,
517,
29918,
16192,
29901,
13,
13,
4706,
411,
1722,
29898,
9507,
29892,
376,
29878,
613,
8025,
2433,
9420,
29947,
1495,
408,
343,
8807,
2283,
29901,
13,
9651,
1574,
29918,
1272,
353,
343,
8807,
29889,
1359,
29898,
25162,
2283,
29892,
4309,
1664,
29922,
25162,
21693,
8977,
12657,
29889,
10036,
29897,
13,
9651,
934,
4830,
353,
525,
25162,
29915,
13,
9651,
565,
1574,
29918,
1272,
338,
6213,
29901,
13,
18884,
6773,
13,
9651,
848,
353,
1574,
29918,
1272,
565,
1134,
29898,
1514,
29918,
1272,
29897,
338,
1051,
1683,
518,
1514,
29918,
1272,
29962,
13,
13,
9651,
363,
21268,
297,
848,
29901,
13,
13,
18884,
396,
7311,
8473,
322,
13682,
322,
427,
2438,
363,
1286,
29901,
871,
5534,
29871,
343,
8807,
24987,
526,
5545,
29892,
694,
20437,
964,
2278,
3161,
13,
18884,
363,
1820,
29892,
995,
297,
21268,
29889,
7076,
7295,
13,
13,
462,
1678,
396,
11733,
310,
385,
4069,
1347,
29892,
591,
11455,
278,
1820,
13,
462,
1678,
565,
1134,
29898,
1767,
29897,
338,
851,
322,
7431,
29898,
1767,
29897,
1275,
29871,
29900,
29901,
6773,
13,
462,
308,
13,
462,
1678,
565,
4766,
29918,
4703,
29918,
15638,
29889,
4352,
29898,
1989,
29897,
338,
451,
6213,
29901,
13,
462,
4706,
396,
11733,
310,
263,
343,
8807,
722,
393,
1033,
367,
1304,
491,
278,
29779,
1764,
1350,
572,
1218,
363,
17371,
24238,
29879,
722,
1819,
13,
462,
4706,
3030,
29961,
1989,
29962,
353,
8814,
29898,
1767,
29892,
3030,
29897,
13,
462,
4706,
6773,
13,
13,
462,
1678,
722,
978,
29918,
4352,
292,
353,
4766,
29918,
3027,
29918,
4039,
29889,
4352,
29898,
1989,
29897,
13,
462,
1678,
565,
722,
978,
29918,
4352,
292,
338,
451,
6213,
29901,
13,
462,
4706,
396,
11733,
310,
263,
343,
8807,
722,
426,
978,
2403,
3027,
29918,
4039,
13,
462,
4706,
1024,
353,
722,
978,
29918,
4352,
292,
29889,
2972,
29898,
29896,
29897,
13,
462,
4706,
3030,
29961,
1989,
29962,
353,
11527,
29918,
1767,
353,
8814,
29898,
13,
462,
9651,
995,
29892,
3030,
29897,
13,
462,
4706,
788,
29918,
8813,
29898,
8813,
29879,
29892,
1134,
2433,
3027,
29918,
20095,
742,
1024,
29922,
978,
29892,
13,
462,
462,
268,
4055,
29922,
9778,
1490,
29918,
1767,
29897,
13,
13,
462,
1678,
722,
978,
29918,
4352,
292,
353,
4766,
29918,
3027,
29918,
20095,
29889,
4352,
29898,
1989,
29897,
13,
462,
1678,
565,
722,
978,
29918,
4352,
292,
338,
451,
6213,
29901,
13,
462,
4706,
396,
11733,
310,
263,
343,
8807,
722,
426,
978,
2403,
3027,
29918,
20095,
13,
462,
4706,
1024,
353,
722,
978,
29918,
4352,
292,
29889,
2972,
29898,
29896,
29897,
13,
462,
4706,
3030,
29961,
1989,
29962,
353,
11527,
29918,
1767,
353,
8814,
29898,
13,
462,
9651,
995,
29892,
3030,
29897,
13,
462,
4706,
1967,
29918,
333,
29918,
4352,
292,
353,
4766,
29918,
3027,
29918,
333,
29889,
4352,
29898,
13,
462,
9651,
11527,
29918,
1767,
29897,
13,
462,
4706,
565,
1967,
29918,
333,
29918,
4352,
292,
338,
451,
6213,
29901,
13,
462,
9651,
396,
278,
426,
978,
2403,
3027,
29918,
20095,
995,
338,
385,
1967,
4944,
491,
385,
4685,
3988,
29892,
577,
591,
1653,
263,
13261,
6480,
278,
21235,
10944,
310,
445,
995,
13,
462,
9651,
396,
304,
671,
263,
1887,
21235,
988,
278,
1967,
674,
367,
18760,
297,
13,
462,
9651,
1857,
29918,
1445,
353,
788,
29918,
5041,
29898,
5041,
267,
29892,
1857,
29918,
1445,
29892,
10422,
29892,
934,
4830,
29892,
4390,
29918,
2084,
353,
722,
978,
29918,
4352,
292,
29889,
2972,
29898,
29900,
511,
13,
462,
462,
462,
268,
716,
29918,
1767,
353,
525,
6224,
6224,
1887,
29918,
1727,
6020,
500,
930,
6822,
8875,
4286,
4830,
29898,
13,
462,
462,
462,
308,
1967,
29918,
333,
29918,
4352,
292,
29889,
2972,
29898,
29906,
8243,
13,
462,
462,
462,
268,
2030,
29918,
1767,
353,
995,
29892,
13,
462,
462,
462,
268,
1024,
353,
1024,
29897,
13,
462,
9651,
396,
450,
1967,
16532,
515,
278,
4685,
5478,
367,
18760,
304,
278,
1887,
21235,
577,
372,
338,
2715,
304,
278,
1051,
310,
24238,
29879,
304,
16766,
13,
462,
9651,
788,
29918,
8813,
29898,
8813,
29879,
29892,
1134,
2433,
3027,
29918,
20095,
742,
1024,
29922,
978,
29892,
13,
462,
462,
308,
2143,
29922,
9778,
1490,
29918,
1767,
29892,
1967,
29922,
3027,
29918,
333,
29918,
4352,
292,
29889,
2972,
29898,
29906,
876,
13,
462,
9651,
6773,
13,
13,
462,
1678,
722,
978,
29918,
4352,
292,
353,
4766,
29918,
10382,
29918,
2271,
29889,
4352,
29898,
1989,
29897,
13,
462,
1678,
565,
722,
978,
29918,
4352,
292,
338,
451,
6213,
29901,
13,
462,
4706,
396,
11733,
310,
263,
343,
8807,
722,
426,
978,
2403,
10382,
29918,
2271,
13,
462,
4706,
1024,
353,
722,
978,
29918,
4352,
292,
29889,
2972,
29898,
29896,
29897,
13,
462,
4706,
3030,
29961,
1989,
29962,
353,
11527,
29918,
1767,
353,
8814,
29898,
13,
462,
9651,
995,
29892,
3030,
29897,
13,
462,
4706,
24238,
29918,
2271,
353,
4766,
29918,
2271,
29889,
4352,
29898,
9778,
1490,
29918,
1767,
29897,
13,
462,
4706,
565,
24238,
29918,
2271,
338,
451,
6213,
29901,
13,
462,
9651,
5142,
29918,
2271,
29918,
9507,
353,
24238,
29918,
2271,
29889,
2972,
29898,
29896,
29897,
13,
462,
9651,
396,
450,
426,
978,
2403,
3027,
29918,
20095,
995,
338,
263,
934,
4685,
5142,
29892,
591,
1735,
278,
3988,
304,
671,
263,
1887,
1732,
470,
934,
13761,
13,
462,
9651,
1857,
29918,
1445,
353,
788,
29918,
5041,
29898,
5041,
267,
29892,
1857,
29918,
1445,
29892,
10422,
29892,
934,
4830,
29892,
4390,
29918,
2084,
353,
722,
978,
29918,
4352,
292,
29889,
2972,
29898,
29900,
511,
13,
462,
462,
462,
268,
716,
29918,
1767,
353,
525,
6224,
6224,
1887,
29918,
12083,
500,
930,
6822,
8875,
4286,
4830,
29898,
13,
462,
462,
462,
308,
5142,
29918,
2271,
29918,
9507,
511,
13,
462,
462,
462,
268,
2030,
29918,
1767,
353,
995,
29892,
13,
462,
462,
462,
268,
1024,
353,
1024,
29897,
13,
462,
9651,
396,
450,
934,
16532,
515,
278,
4685,
1818,
367,
18760,
304,
278,
1887,
13761,
577,
372,
338,
2715,
304,
278,
1051,
310,
24238,
29879,
304,
16766,
13,
462,
9651,
788,
29918,
8813,
29898,
8813,
29879,
29892,
1134,
2433,
10382,
29918,
2271,
742,
1024,
29922,
978,
29892,
13,
462,
462,
308,
3142,
29922,
9778,
1490,
29918,
1767,
29892,
10422,
29922,
10382,
29918,
2271,
29918,
9507,
29897,
13,
13,
1678,
396,
2522,
273,
451,
2281,
2955,
2066,
29889,
29871,
13,
1678,
396,
1126,
694,
318,
4561,
363,
6162,
29885,
678,
5708,
29892,
612,
23956,
2066,
526,
451,
885,
11310,
408,
443,
4984,
2955,
2066,
13,
1678,
396,
577,
591,
1016,
29915,
29873,
6222,
2066,
29918,
517,
29918,
16192,
29918,
13087,
29889,
21843,
29898,
25162,
29918,
5325,
29918,
517,
29918,
16192,
29897,
13,
268,
13,
1678,
396,
12812,
6315,
17432,
529,
2271,
29966,
978,
6778,
529,
12083,
29958,
13,
1678,
396,
1016,
29915,
29873,
671,
445,
901,
1614,
2221,
304,
10446,
278,
518,
17514,
4004,
29962,
6943,
263,
2183,
330,
4061,
3198,
29871,
13,
1678,
396,
29887,
4061,
3198,
29918,
276,
353,
337,
29889,
12198,
29898,
29878,
12764,
29961,
10780,
29925,
29966,
2042,
29918,
978,
24566,
3823,
29876,
14178,
2144,
850,
29973,
5919,
29973,
9903,
29876,
29905,
8999,
3823,
29876,
1822,
29930,
4295,
865,
4061,
3198,
29922,
29896,
2144,
29876,
29961,
3823,
29876,
29962,
7528,
17710,
29876,
10780,
29925,
29966,
1563,
29918,
8489,
29958,
29887,
4061,
3198,
29905,
29879,
29930,
29922,
2144,
29879,
29930,
10780,
29925,
29966,
1767,
29958,
29896,
29897,
742,
337,
29889,
29924,
8647,
6227,
8895,
718,
337,
29889,
29928,
2891,
9818,
29897,
13,
1678,
330,
4061,
3198,
29918,
276,
353,
337,
29889,
12198,
29898,
29878,
29915,
29985,
10780,
29925,
29966,
1563,
29918,
8489,
29958,
29887,
4061,
3198,
29905,
29879,
29930,
29922,
2144,
29879,
29930,
10780,
29925,
29966,
1767,
29958,
29896,
1262,
742,
337,
29889,
29924,
8647,
6227,
8895,
29897,
13,
13,
1678,
363,
10422,
297,
2066,
29918,
517,
29918,
16192,
29918,
13087,
29901,
13,
4706,
411,
1722,
29898,
9507,
29892,
376,
29878,
613,
8025,
2433,
9420,
29947,
1495,
408,
443,
4984,
2955,
29918,
1445,
29901,
13,
9651,
848,
353,
443,
4984,
2955,
29918,
1445,
29889,
949,
580,
13,
9651,
363,
2944,
297,
337,
29889,
2886,
1524,
29898,
29887,
4061,
3198,
29918,
276,
29892,
848,
1125,
13,
18884,
2175,
29918,
8489,
29892,
995,
353,
2944,
29889,
2972,
877,
1563,
29918,
8489,
5477,
2944,
29889,
2972,
877,
1767,
1495,
13,
18884,
716,
29918,
1767,
353,
22372,
1563,
29918,
8489,
1157,
1767,
29913,
4286,
4830,
29898,
1563,
29918,
8489,
29922,
1563,
29918,
8489,
29892,
995,
2433,
29900,
1495,
13,
18884,
1857,
29918,
1445,
353,
788,
29918,
5041,
29898,
5041,
267,
29892,
1857,
29918,
1445,
29892,
10422,
29892,
525,
726,
742,
716,
29918,
1767,
29922,
1482,
29918,
1767,
29892,
2030,
29918,
1767,
29922,
667,
29889,
2972,
29898,
29900,
876,
13,
13,
1678,
736,
24238,
29879,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
1938,
263,
16732,
12812,
310,
385,
4673,
8809,
3873,
6162,
29885,
14477,
760,
21268,
23215,
552,
472,
2183,
4390,
2084,
363,
263,
1857,
885,
11310,
934,
13,
29937,
3462,
885,
11310,
9962,
7788,
297,
24238,
29879,
322,
1735,
304,
367,
2309,
297,
13261,
267,
3829,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
12812,
29918,
9421,
29918,
15425,
29918,
5029,
29898,
8813,
29879,
29892,
13261,
267,
29892,
1857,
29918,
1445,
29892,
10422,
29892,
934,
4830,
29892,
4390,
2605,
29892,
21268,
23215,
552,
1125,
13,
13,
1678,
21268,
29892,
1820,
29923,
2409,
29892,
3847,
23215,
552,
353,
21268,
23215,
552,
13,
1678,
565,
1134,
29898,
20461,
29897,
338,
1051,
29901,
13,
4706,
2380,
353,
29871,
29900,
13,
4706,
363,
2944,
297,
21268,
29901,
13,
9651,
28247,
353,
525,
19660,
6525,
4286,
4830,
29898,
2248,
29897,
13,
9651,
1857,
29918,
1445,
353,
12812,
29918,
9421,
29918,
15425,
29918,
5029,
29898,
8813,
29879,
29892,
13261,
267,
29892,
1857,
29918,
1445,
29892,
10422,
29892,
934,
4830,
29892,
28247,
565,
4390,
2605,
338,
6213,
1683,
4390,
2605,
718,
28247,
29892,
313,
667,
29892,
2380,
29892,
21268,
23215,
552,
876,
13,
9651,
2380,
4619,
29871,
29896,
13,
1678,
25342,
1134,
29898,
20461,
29897,
338,
9657,
470,
338,
8758,
29898,
20461,
29892,
343,
8807,
21693,
8977,
12657,
29889,
7514,
287,
21533,
1125,
13,
4706,
4766,
29918,
3027,
29918,
333,
353,
337,
29889,
12198,
877,
4197,
29985,
29914,
10062,
4551,
26889,
5575,
29897,
1495,
13,
4706,
396,
7311,
8473,
322,
13682,
322,
427,
2438,
363,
1286,
29901,
871,
5534,
29871,
343,
8807,
24987,
526,
5545,
29892,
694,
20437,
964,
2278,
3161,
13,
4706,
363,
1820,
29892,
995,
297,
21268,
29889,
7076,
7295,
13,
9651,
565,
313,
1989,
1275,
525,
3027,
1170,
29915,
470,
1820,
1275,
525,
3027,
1495,
322,
1134,
29898,
1767,
29897,
338,
851,
29901,
13,
18884,
396,
11733,
310,
263,
343,
8807,
722,
1967,
1170,
13,
18884,
396,
978,
353,
21268,
1839,
978,
2033,
565,
525,
978,
29915,
297,
21268,
1683,
4390,
2605,
13,
18884,
1967,
29918,
333,
29918,
4352,
292,
353,
4766,
29918,
3027,
29918,
333,
29889,
4352,
29898,
1767,
29897,
13,
18884,
565,
1967,
29918,
333,
29918,
4352,
292,
338,
451,
6213,
29901,
13,
462,
1678,
396,
278,
995,
338,
385,
1967,
4944,
491,
385,
4685,
10346,
1967,
1024,
29892,
577,
591,
1653,
263,
13261,
6480,
278,
21235,
10944,
310,
445,
995,
13,
462,
1678,
396,
304,
671,
263,
1887,
21235,
988,
278,
1967,
674,
367,
18760,
297,
462,
13,
462,
1678,
1967,
5620,
353,
995,
13,
462,
1678,
1967,
1170,
353,
1967,
29918,
333,
29918,
4352,
292,
29889,
2972,
29898,
29906,
29897,
13,
462,
1678,
1967,
8176,
353,
21268,
1839,
3027,
8176,
2033,
565,
525,
3027,
8176,
29915,
297,
21268,
1683,
6213,
13,
462,
1678,
1967,
1170,
8176,
353,
1967,
1170,
565,
1967,
8176,
338,
6213,
1683,
1967,
1170,
718,
525,
11283,
718,
1967,
8176,
13,
462,
1678,
1857,
29918,
1445,
353,
788,
29918,
5041,
29898,
5041,
267,
29892,
1857,
29918,
1445,
29892,
10422,
29892,
934,
4830,
29892,
4390,
29918,
2084,
353,
1820,
565,
4390,
2605,
338,
6213,
1683,
4390,
2605,
718,
525,
6169,
718,
1820,
29892,
13,
462,
462,
18884,
716,
29918,
1767,
353,
525,
6224,
6224,
1887,
29918,
1727,
6020,
500,
930,
6822,
8875,
4286,
4830,
29898,
3027,
1170,
511,
13,
462,
462,
18884,
2030,
29918,
1767,
353,
995,
29892,
13,
462,
462,
18884,
1024,
353,
1967,
1170,
29897,
13,
462,
1678,
396,
450,
1967,
16532,
515,
278,
4685,
5478,
367,
18760,
304,
278,
1887,
21235,
577,
372,
338,
2715,
304,
278,
1051,
310,
24238,
29879,
304,
16766,
13,
462,
1678,
788,
29918,
8813,
29898,
8813,
29879,
29892,
1134,
2433,
3027,
29918,
20095,
742,
1024,
29922,
3027,
1170,
8176,
29892,
13,
462,
462,
1678,
2143,
29922,
3027,
5620,
29892,
1967,
29922,
3027,
5620,
29892,
4055,
29922,
3027,
8176,
29897,
13,
9651,
25342,
1820,
1275,
525,
978,
29915,
322,
1134,
29898,
1767,
29897,
338,
851,
322,
6702,
13506,
29915,
297,
21268,
470,
525,
4039,
29915,
297,
21268,
29897,
322,
313,
1989,
29923,
2409,
1275,
525,
3027,
29915,
470,
313,
3560,
23215,
552,
29961,
29896,
29962,
1275,
525,
8517,
1884,
267,
8785,
29901,
13,
18884,
396,
11733,
310,
263,
4390,
722,
310,
1134,
10346,
1967,
13,
18884,
1967,
1170,
353,
995,
13,
18884,
1967,
23095,
353,
21268,
1839,
13506,
2033,
565,
525,
13506,
29915,
297,
21268,
1683,
6213,
13,
18884,
1967,
5620,
353,
1967,
1170,
565,
1967,
23095,
338,
6213,
1683,
1967,
23095,
718,
8207,
29915,
718,
1967,
1170,
13,
18884,
1967,
8176,
353,
21268,
1839,
4039,
2033,
565,
525,
4039,
29915,
297,
21268,
1683,
6213,
13,
18884,
1967,
1170,
8176,
353,
1967,
1170,
565,
1967,
8176,
338,
6213,
1683,
1967,
1170,
718,
525,
11283,
718,
1967,
8176,
13,
18884,
396,
278,
995,
338,
385,
1967,
4944,
491,
385,
4685,
10346,
1967,
1024,
29892,
577,
591,
1653,
263,
13261,
6480,
278,
21235,
10944,
310,
445,
995,
13,
18884,
396,
304,
671,
263,
1887,
21235,
988,
278,
1967,
674,
367,
18760,
297,
462,
13,
18884,
1857,
29918,
1445,
353,
788,
29918,
5041,
29898,
5041,
267,
29892,
1857,
29918,
1445,
29892,
10422,
29892,
934,
4830,
29892,
4390,
29918,
2084,
353,
4390,
2605,
718,
15300,
13506,
742,
13,
462,
462,
9651,
716,
29918,
1767,
353,
525,
6224,
1887,
29918,
1727,
6020,
9156,
742,
13,
462,
462,
9651,
2030,
29918,
1767,
353,
1967,
23095,
29892,
13,
462,
462,
9651,
1024,
353,
1967,
1170,
29897,
13,
18884,
396,
450,
1967,
16532,
515,
278,
4685,
5478,
367,
18760,
304,
278,
1887,
21235,
577,
372,
338,
2715,
304,
278,
1051,
310,
24238,
29879,
304,
16766,
13,
18884,
788,
29918,
8813,
29898,
8813,
29879,
29892,
1134,
2433,
3027,
29918,
20095,
742,
1024,
29922,
3027,
1170,
8176,
29892,
13,
462,
18884,
2143,
29922,
3027,
5620,
29892,
1967,
29922,
3027,
5620,
29892,
4055,
29922,
3027,
8176,
29897,
13,
9651,
1683,
29901,
13,
18884,
1857,
29918,
1445,
353,
12812,
29918,
9421,
29918,
15425,
29918,
5029,
29898,
8813,
29879,
29892,
13261,
267,
29892,
1857,
29918,
1445,
29892,
10422,
29892,
934,
4830,
29892,
1820,
565,
4390,
2605,
338,
6213,
1683,
4390,
2605,
718,
525,
6169,
718,
1820,
29892,
313,
1767,
29892,
1820,
29892,
21268,
23215,
552,
876,
13,
13,
13,
1678,
736,
1857,
29918,
1445,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
1480,
3168,
259,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
1480,
29918,
2704,
29898,
4906,
29892,
6389,
353,
6213,
1125,
13,
1678,
1480,
29898,
8824,
29892,
525,
2392,
742,
2643,
29897,
13,
13,
13,
1753,
1480,
29918,
12888,
29898,
4906,
29892,
6389,
353,
6213,
1125,
13,
1678,
1480,
29898,
8824,
565,
6389,
338,
6213,
1683,
6389,
29889,
339,
2035,
29892,
525,
22709,
742,
2643,
29897,
13,
13,
13,
1753,
1480,
29898,
275,
29918,
339,
2035,
29892,
3233,
29892,
2643,
1125,
13,
1678,
565,
451,
338,
29918,
339,
2035,
29901,
13,
4706,
1596,
877,
29912,
6177,
8875,
4286,
4830,
29898,
5563,
29892,
2643,
876,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
14707,
278,
921,
995,
408,
263,
3017,
10541,
773,
278,
3030,
325,
259,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
19745,
29918,
20461,
29898,
29916,
29892,
325,
1125,
13,
1678,
1018,
29901,
13,
4706,
565,
1134,
29898,
29916,
29897,
338,
851,
29901,
13,
9651,
736,
19745,
29898,
29916,
29897,
13,
4706,
1683,
29901,
13,
9651,
736,
921,
13,
1678,
5174,
8960,
408,
321,
29901,
13,
4706,
1480,
29918,
2704,
877,
29908,
8875,
1115,
6571,
4286,
4830,
29898,
29916,
29892,
321,
876,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
2910,
263,
740,
8304,
3598,
304,
278,
1554,
343,
8807,
1574,
29871,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
16732,
29918,
1958,
29898,
14481,
29892,
3653,
1125,
13,
29871,
565,
338,
8758,
29898,
14481,
29892,
9657,
1125,
13,
1678,
18414,
9183,
353,
6571,
13,
1678,
363,
1820,
29892,
995,
297,
1554,
29889,
7076,
7295,
13,
418,
18414,
9183,
29961,
1989,
29962,
353,
16732,
29918,
1958,
29898,
1767,
29892,
3653,
29897,
13,
1678,
736,
18414,
9183,
13,
29871,
25342,
338,
8758,
29898,
14481,
29892,
313,
1761,
29892,
18761,
29892,
731,
22164,
13,
1678,
18414,
9183,
353,
5159,
13,
1678,
363,
2944,
297,
1554,
29901,
13,
418,
18414,
9183,
29889,
4397,
29898,
3757,
25397,
29918,
1958,
29898,
667,
29892,
3653,
876,
13,
1678,
736,
1134,
29898,
14481,
5033,
5753,
398,
9183,
29897,
13,
29871,
1683,
29901,
13,
1678,
736,
3653,
29898,
14481,
29897,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
4635,
847,
2767,
278,
12812,
29918,
2914,
343,
8807,
1574,
411,
278,
995,
773,
278,
13812,
408,
278,
2224,
304,
304,
278,
995,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
2767,
29918,
3757,
1295,
3598,
29898,
16192,
29918,
2914,
29892,
13812,
29892,
995,
1125,
13,
1678,
396,
2216,
8814,
2794,
278,
3847,
313,
16680,
29889,
1563,
29897,
1818,
367,
10410,
491,
278,
13812,
29889,
1266,
13,
1678,
260,
29886,
353,
1134,
29898,
16680,
29897,
13,
1678,
565,
260,
29886,
338,
4390,
2084,
29889,
5938,
29901,
13,
4706,
260,
558,
353,
1134,
29898,
16680,
29889,
1266,
29897,
13,
4706,
8304,
29918,
1767,
353,
6213,
13,
4706,
565,
260,
558,
338,
4390,
2084,
29889,
14256,
29901,
13,
9651,
8304,
29918,
1767,
353,
9657,
580,
13,
4706,
25342,
260,
558,
338,
4390,
2084,
29889,
29903,
5897,
29901,
13,
9651,
8304,
29918,
1767,
353,
5159,
13,
4706,
1683,
29901,
13,
9651,
12020,
8960,
877,
29089,
10933,
263,
13812,
1134,
6571,
297,
278,
16732,
2767,
4286,
4830,
29898,
29873,
558,
876,
13,
4706,
21268,
353,
2767,
29918,
3757,
1295,
3598,
29898,
16192,
29918,
2914,
29892,
13812,
29889,
1563,
29892,
8304,
29918,
1767,
29897,
13,
1678,
25342,
260,
29886,
338,
4390,
2084,
29889,
10303,
29901,
13,
4706,
736,
12812,
29918,
2914,
13,
1678,
396,
21268,
338,
10410,
491,
13812,
29889,
1266,
13,
1678,
565,
260,
558,
338,
4390,
2084,
29889,
14256,
29901,
13,
4706,
565,
313,
2435,
29898,
16680,
29889,
1266,
29889,
9621,
29897,
2804,
29871,
29896,
1125,
13,
9651,
12020,
8960,
877,
29903,
1310,
284,
10898,
2861,
304,
6571,
4286,
4830,
29898,
16680,
29889,
1266,
29889,
9621,
876,
13,
4706,
565,
451,
1134,
29898,
20461,
29897,
338,
9657,
29901,
13,
9651,
12020,
8960,
877,
29089,
1653,
363,
278,
1134,
6571,
278,
5352,
6571,
4286,
4830,
29898,
1853,
29898,
20461,
511,
13812,
29889,
1266,
29889,
9621,
29961,
29900,
12622,
13,
4706,
565,
451,
13812,
29889,
1266,
29889,
9621,
29961,
29900,
29962,
297,
21268,
29901,
13,
9651,
21268,
29961,
16680,
29889,
1266,
29889,
9621,
29961,
29900,
5262,
353,
995,
13,
4706,
1683,
29901,
13,
9651,
21268,
29961,
16680,
29889,
1266,
29889,
9621,
29961,
29900,
5262,
353,
2337,
29918,
1050,
914,
29889,
14634,
29898,
20461,
29961,
16680,
29889,
1266,
29889,
9621,
29961,
29900,
20526,
995,
29897,
13,
4706,
736,
21268,
29961,
16680,
29889,
1266,
29889,
9621,
29961,
29900,
5262,
13,
1678,
25342,
260,
558,
338,
4390,
2084,
29889,
29903,
5897,
29901,
13,
4706,
565,
13812,
29889,
1266,
29889,
2962,
338,
6213,
322,
13812,
29889,
1266,
29889,
355,
338,
6213,
322,
13812,
29889,
1266,
29889,
10568,
338,
6213,
29901,
13,
9651,
21268,
29889,
4397,
29898,
1767,
29897,
13,
9651,
736,
21268,
14352,
29896,
29962,
13,
1678,
12020,
8960,
877,
797,
3200,
9696,
5687,
1495,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
2767,
278,
12812,
29918,
2914,
343,
8807,
1574,
773,
278,
731,
343,
8807,
553,
11709,
322,
278,
3030,
325,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
2767,
29898,
16192,
29918,
2914,
29892,
731,
29892,
325,
1125,
13,
1678,
13812,
353,
6088,
29898,
842,
1839,
2084,
11287,
13,
1678,
2767,
29918,
3757,
1295,
3598,
29898,
16192,
29918,
2914,
29892,
13812,
29892,
16732,
29918,
1958,
29898,
842,
1839,
1767,
7464,
14013,
921,
29901,
19745,
29918,
20461,
29898,
29916,
29892,
325,
4961,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
6204,
278,
2702,
12812,
9819,
310,
263,
4673,
8809,
3873,
6162,
29885,
14477,
3876,
4138,
12812,
13,
29937,
16969,
278,
24238,
29879,
2281,
2955,
1121,
310,
278,
12812,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
12812,
29918,
1445,
29898,
1445,
29918,
5205,
29892,
18920,
29918,
2084,
29892,
848,
29892,
8820,
29892,
6389,
29892,
12812,
29918,
2914,
1125,
13,
1678,
396,
2522,
273,
4663,
1532,
8429,
2066,
13,
1678,
363,
3158,
297,
8820,
29901,
13,
4706,
565,
525,
657,
29915,
297,
3158,
29901,
13,
9651,
2582,
353,
518,
4352,
29889,
1767,
363,
1993,
297,
6088,
29898,
2467,
1839,
657,
2033,
467,
2886,
29898,
1272,
4638,
13,
4706,
1683,
29901,
13,
9651,
2582,
353,
518,
1272,
29962,
13,
4706,
363,
2944,
29918,
1272,
297,
2582,
29901,
13,
9651,
325,
353,
11773,
29898,
667,
29918,
1272,
29897,
13,
9651,
565,
525,
19826,
29915,
297,
3158,
322,
451,
738,
4197,
275,
8758,
29898,
667,
29918,
1272,
29892,
1051,
511,
338,
8758,
29898,
667,
29918,
1272,
29892,
18761,
4638,
1125,
13,
18884,
2189,
29918,
1761,
353,
518,
2467,
1839,
19826,
2033,
29962,
565,
1134,
29898,
2467,
1839,
19826,
11287,
338,
9657,
1683,
3158,
1839,
19826,
2033,
13,
18884,
363,
2189,
297,
2189,
29918,
1761,
29901,
13,
462,
1678,
8560,
353,
325,
1839,
546,
15628,
2033,
353,
5159,
13,
462,
1678,
2189,
29918,
2914,
353,
6213,
13,
462,
1678,
1018,
29901,
13,
462,
4706,
565,
525,
2886,
1524,
29915,
297,
2189,
29901,
13,
462,
9651,
1993,
29918,
276,
353,
337,
29889,
12198,
29898,
19826,
1839,
2886,
1524,
7464,
337,
29889,
29924,
8647,
6227,
8895,
29897,
13,
462,
9651,
9686,
29918,
1272,
353,
16732,
29918,
1958,
29898,
19826,
1839,
1767,
7464,
14013,
921,
29901,
19745,
29918,
20461,
29898,
29916,
29892,
325,
876,
13,
462,
9651,
2189,
29918,
2914,
353,
5159,
13,
462,
9651,
363,
364,
297,
337,
29889,
2886,
1524,
29898,
4352,
29918,
276,
29892,
9686,
29918,
1272,
1125,
2189,
29918,
2914,
29889,
4397,
29898,
29878,
29897,
13,
462,
4706,
25342,
525,
4352,
29915,
297,
2189,
29901,
13,
462,
9651,
1993,
29918,
276,
353,
337,
29889,
12198,
29898,
19826,
1839,
4352,
7464,
337,
29889,
29924,
8647,
6227,
8895,
29897,
13,
462,
9651,
9686,
29918,
1272,
353,
16732,
29918,
1958,
29898,
19826,
1839,
1767,
7464,
14013,
921,
29901,
19745,
29918,
20461,
29898,
29916,
29892,
325,
876,
13,
462,
9651,
2189,
29918,
2914,
353,
337,
29889,
4352,
29898,
4352,
29918,
276,
29892,
9686,
29918,
1272,
29897,
13,
462,
4706,
1683,
29901,
13,
462,
9651,
1480,
29918,
2704,
877,
8875,
338,
385,
8340,
2189,
2944,
4286,
4830,
29898,
19826,
511,
6389,
29897,
13,
462,
4706,
8560,
29889,
4397,
29898,
19826,
29918,
2914,
29897,
13,
462,
4706,
565,
525,
978,
29915,
297,
2189,
29901,
325,
29961,
19826,
1839,
978,
2033,
29962,
353,
2189,
29918,
2914,
13,
462,
1678,
5174,
8960,
408,
321,
29901,
13,
462,
4706,
1480,
29918,
2704,
877,
29908,
29912,
5038,
6571,
4286,
4830,
29898,
19826,
29892,
321,
511,
6389,
29897,
13,
9651,
396,
437,
278,
731,
373,
1269,
679,
2944,
29871,
13,
9651,
565,
525,
842,
29915,
297,
3158,
29901,
13,
18884,
396,
679,
278,
756,
5552,
4195,
13,
18884,
12421,
29918,
1761,
353,
5159,
13,
18884,
565,
525,
5349,
5552,
29915,
297,
3158,
29901,
13,
462,
1678,
12421,
29918,
1761,
353,
3158,
1839,
5349,
5552,
2033,
565,
1134,
29898,
2467,
1839,
5349,
5552,
11287,
338,
1051,
1683,
518,
2467,
1839,
5349,
5552,
2033,
29962,
13,
18884,
396,
679,
278,
565,
4195,
13,
18884,
565,
29918,
16122,
353,
525,
5574,
29915,
13,
18884,
565,
525,
361,
29915,
297,
3158,
29901,
565,
29918,
16122,
353,
3158,
1839,
361,
2033,
13,
18884,
1018,
29901,
13,
462,
1678,
363,
12421,
297,
12421,
29918,
1761,
29901,
13,
462,
4706,
565,
12421,
29961,
29900,
29962,
1275,
525,
29991,
2396,
13,
462,
9651,
565,
756,
5552,
29898,
29894,
29892,
12421,
29961,
29896,
17531,
1125,
13,
462,
18884,
565,
29918,
16122,
353,
525,
8824,
29915,
13,
462,
18884,
2867,
13,
462,
4706,
1683,
29901,
13,
462,
9651,
565,
451,
756,
5552,
29898,
29894,
29892,
12421,
1125,
13,
462,
18884,
565,
29918,
16122,
353,
525,
8824,
29915,
13,
462,
18884,
2867,
13,
18884,
5174,
8960,
408,
321,
29901,
13,
462,
1678,
325,
353,
2944,
29918,
1272,
13,
18884,
1018,
29901,
13,
462,
1678,
565,
19745,
29898,
361,
29918,
16122,
1125,
13,
462,
4706,
1018,
29901,
13,
462,
9651,
2767,
29898,
16192,
29918,
2914,
29892,
3158,
1839,
842,
7464,
325,
29897,
13,
462,
4706,
5174,
8960,
408,
321,
29901,
13,
462,
9651,
1480,
29918,
2704,
877,
29908,
29912,
5038,
6571,
4286,
4830,
29898,
2467,
1839,
842,
7464,
321,
511,
6389,
29897,
13,
18884,
5174,
8960,
408,
321,
29901,
13,
462,
1678,
1480,
29918,
12888,
877,
29908,
29912,
5038,
6571,
4286,
4830,
29898,
361,
29918,
16122,
29892,
321,
511,
6389,
29897,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
6204,
278,
12812,
9819,
310,
263,
3884,
12812,
13,
29937,
16969,
278,
24238,
29879,
2281,
2955,
1121,
310,
278,
12812,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
12812,
29918,
10314,
29898,
5085,
1125,
13,
13,
1678,
396,
1303,
22920,
13,
1678,
2295,
29879,
353,
1051,
580,
13,
1678,
411,
1722,
29898,
5085,
29889,
25903,
29892,
376,
29878,
613,
8025,
2433,
9420,
29947,
1495,
408,
2295,
29918,
25162,
29918,
1445,
29901,
13,
4706,
2295,
29918,
2640,
353,
343,
8807,
29889,
1359,
29918,
497,
29898,
2917,
29918,
25162,
29918,
1445,
29897,
13,
4706,
363,
2295,
297,
2295,
29918,
2640,
29901,
13,
9651,
2295,
29879,
29889,
4397,
29898,
2917,
29897,
13,
13,
1678,
396,
2125,
964,
3633,
3030,
2984,
13,
1678,
565,
1134,
29898,
5085,
29889,
4703,
29897,
338,
851,
29901,
13,
4706,
1018,
29901,
13,
9651,
396,
319,
3030,
363,
16800,
23697,
2645,
278,
3394,
338,
4944,
29889,
1334,
22024,
689,
372,
297,
4663,
29914,
29979,
23956,
13,
9651,
6389,
29889,
4703,
353,
4390,
29889,
18132,
29898,
5085,
29889,
4703,
29897,
13,
4706,
5174,
7865,
2392,
29901,
13,
9651,
6389,
29889,
4703,
353,
19745,
29898,
5085,
29889,
4703,
29897,
13,
13,
1678,
444,
11190,
964,
3633,
9679,
1627,
2984,
13,
1678,
565,
6389,
29889,
1245,
1627,
29901,
9679,
1627,
29918,
10314,
29898,
5085,
29897,
13,
13,
1678,
3646,
29918,
3972,
353,
6389,
29889,
29911,
1718,
7194,
29918,
10145,
13,
1678,
27355,
311,
17990,
630,
29897,
3978,
29918,
12083,
353,
2897,
29889,
657,
29883,
9970,
580,
13,
1678,
3646,
29918,
3972,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
5182,
29918,
3972,
29897,
13,
1678,
396,
591,
664,
411,
6198,
10898,
29892,
769,
591,
748,
304,
445,
4138,
13,
1678,
396,
313,
311,
17990,
630,
29897,
2897,
29889,
305,
3972,
29898,
5182,
29918,
3972,
29897,
13,
1678,
12812,
29918,
2914,
353,
9657,
580,
13,
1678,
620,
353,
12812,
29918,
2914,
1839,
10314,
2033,
353,
9657,
580,
13,
1678,
620,
1839,
2084,
2033,
353,
3646,
29918,
3972,
13,
13,
1678,
396,
1423,
278,
1134,
310,
6503,
13,
1678,
396,
565,
2897,
29889,
2084,
29889,
275,
3972,
877,
6904,
307,
793,
29914,
29895,
431,
9983,
764,
29899,
4381,
29879,
29374,
13,
1678,
396,
268,
24238,
29879,
353,
12812,
29918,
29895,
431,
9983,
764,
29918,
1456,
2909,
29898,
5085,
29897,
13,
1678,
396,
25342,
2897,
29889,
2084,
29889,
275,
1445,
877,
6904,
14732,
29889,
21053,
1495,
470,
2897,
29889,
2084,
29889,
275,
1445,
877,
6904,
14732,
29889,
25162,
29374,
13,
1678,
396,
268,
24238,
29879,
353,
12812,
29918,
9421,
29918,
15425,
29898,
5085,
29897,
13,
1678,
396,
1683,
29901,
13,
1678,
396,
268,
1596,
703,
2392,
29901,
525,
8875,
29915,
2444,
304,
367,
451,
263,
413,
431,
9983,
764,
1708,
2909,
470,
263,
1081,
29885,
8727,
4138,
1642,
4830,
29898,
5182,
29918,
3972,
876,
13,
1678,
396,
268,
6876,
29898,
29896,
29897,
13,
1678,
6969,
29918,
1445,
29918,
10853,
353,
6024,
25162,
742,
525,
3126,
742,
525,
726,
2033,
13,
13,
1678,
363,
2295,
297,
2295,
29879,
29901,
13,
4706,
363,
2793,
29918,
1853,
297,
6969,
29918,
1445,
29918,
10853,
29901,
13,
9651,
363,
13033,
29918,
1445,
29918,
11037,
29879,
297,
6088,
877,
1504,
29912,
1836,
29961,
29930,
29962,
4286,
4830,
29898,
3051,
29918,
1853,
8106,
2886,
29898,
2917,
1125,
13,
18884,
1596,
29898,
1017,
9795,
29918,
1445,
29918,
11037,
29879,
29889,
1767,
29897,
13,
18884,
20978,
1080,
353,
518,
4352,
29889,
1767,
363,
1993,
297,
6088,
877,
29961,
29930,
1822,
2856,
29961,
29930,
29962,
2824,
2886,
29898,
1017,
9795,
29918,
1445,
29918,
11037,
29879,
29889,
1767,
4638,
13,
18884,
13489,
1080,
353,
518,
4352,
29889,
1767,
363,
1993,
297,
6088,
877,
29961,
29930,
1822,
735,
2325,
29961,
29930,
29962,
2824,
2886,
29898,
1017,
9795,
29918,
1445,
29918,
11037,
29879,
29889,
1767,
4638,
13,
18884,
411,
18920,
29889,
3150,
29918,
5847,
29898,
5182,
29918,
3972,
29897,
408,
934,
29918,
5205,
29901,
13,
462,
1678,
363,
18920,
29918,
2084,
297,
934,
29918,
5205,
29889,
20919,
29889,
5325,
29898,
4572,
29922,
8516,
1125,
13,
462,
4706,
338,
29918,
11707,
287,
353,
5852,
259,
13,
462,
4706,
565,
7431,
29898,
262,
7009,
1080,
29897,
1405,
29871,
29900,
29901,
13,
462,
9651,
338,
29918,
11707,
287,
353,
7700,
13,
462,
9651,
363,
28694,
297,
20978,
1080,
29901,
13,
462,
18884,
565,
18920,
29889,
23705,
29889,
4352,
29898,
262,
10085,
29892,
18920,
29918,
2084,
1125,
13,
462,
462,
1678,
338,
29918,
11707,
287,
353,
5852,
13,
462,
462,
1678,
2867,
13,
462,
4706,
363,
429,
10085,
297,
13489,
1080,
29901,
13,
462,
9651,
565,
18920,
29889,
23705,
29889,
4352,
29898,
735,
10085,
29892,
18920,
29918,
2084,
1125,
13,
462,
18884,
338,
29918,
11707,
287,
353,
7700,
13,
462,
18884,
2867,
13,
462,
4706,
565,
451,
338,
29918,
11707,
287,
29901,
6773,
13,
462,
4706,
396,
450,
18920,
29918,
2084,
1818,
367,
3483,
952,
287,
29892,
591,
679,
445,
2793,
13,
462,
4706,
1018,
29901,
13,
462,
9651,
411,
934,
29918,
5205,
29889,
3150,
29898,
5847,
29918,
2084,
29892,
376,
29878,
613,
8025,
2433,
9420,
29947,
1495,
408,
934,
29918,
517,
29918,
16192,
29901,
13,
462,
18884,
565,
2793,
29918,
1853,
1275,
525,
25162,
2396,
13,
462,
462,
4706,
848,
353,
343,
8807,
29889,
1359,
29898,
1445,
29918,
517,
29918,
16192,
29892,
4309,
1664,
29922,
25162,
21693,
8977,
12657,
29889,
10036,
29897,
13,
462,
18884,
25342,
2793,
29918,
1853,
1275,
525,
3126,
2396,
13,
462,
462,
1678,
848,
353,
4390,
29889,
1359,
29898,
1445,
29918,
517,
29918,
16192,
29897,
13,
462,
18884,
25342,
2793,
29918,
1853,
1275,
525,
726,
2396,
13,
462,
462,
1678,
848,
353,
934,
29918,
517,
29918,
16192,
29889,
1359,
580,
13,
462,
18884,
1683,
29901,
13,
462,
462,
1678,
1480,
29918,
12888,
877,
8875,
338,
263,
9815,
934,
2793,
1134,
322,
769,
17262,
29889,
9333,
6571,
526,
6969,
29889,
4286,
4830,
29898,
3051,
29918,
1853,
29892,
6969,
29918,
1445,
29918,
10853,
511,
6389,
29897,
13,
462,
18884,
396,
450,
934,
2793,
848,
338,
885,
11310,
13,
462,
18884,
565,
525,
7387,
29915,
297,
13033,
29918,
1445,
29918,
11037,
29879,
29889,
1767,
29901,
13,
462,
462,
1678,
12812,
29918,
1445,
29898,
1445,
29918,
5205,
29892,
18920,
29918,
2084,
29892,
848,
29892,
13033,
29918,
1445,
29918,
11037,
29879,
29889,
1767,
1839,
7387,
7464,
6389,
29892,
12812,
29918,
2914,
29897,
13,
462,
18884,
1683,
29901,
13,
462,
462,
1678,
1480,
29918,
12888,
877,
8875,
338,
263,
9815,
934,
2793,
1134,
322,
769,
17262,
29889,
9333,
6571,
526,
6969,
29889,
4286,
4830,
29898,
3051,
29918,
1853,
29892,
6969,
29918,
1445,
29918,
10853,
511,
6389,
29897,
13,
462,
4706,
5174,
343,
8807,
29889,
16680,
29889,
11726,
2392,
408,
429,
29901,
13,
462,
9651,
1480,
29918,
12888,
877,
29979,
23956,
1059,
6571,
297,
426,
1836,
450,
934,
338,
17262,
29889,
4286,
4830,
29898,
735,
29892,
18920,
29918,
2084,
511,
6389,
29897,
13,
462,
4706,
5174,
343,
8807,
29889,
1557,
7310,
29889,
4421,
7310,
2392,
408,
429,
29901,
13,
462,
9651,
1480,
29918,
12888,
877,
29979,
23956,
1059,
6571,
297,
426,
1836,
450,
934,
338,
17262,
29889,
4286,
4830,
29898,
735,
29892,
18920,
29918,
2084,
511,
6389,
29897,
13,
462,
632,
13,
13,
13,
1678,
396,
17749,
278,
1857,
1985,
4138,
13,
1678,
27355,
311,
17990,
630,
29897,
2897,
29889,
305,
3972,
29898,
12574,
29918,
12083,
29897,
13,
13,
1678,
396,
3639,
278,
12812,
1121,
13,
1678,
736,
12812,
29918,
2914,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
3617,
278,
1962,
4840,
515,
6389,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
679,
29918,
4905,
29918,
5461,
29898,
5085,
1125,
13,
1678,
736,
10876,
29889,
25393,
565,
6389,
29889,
4905,
338,
6213,
1683,
1722,
29898,
5085,
29889,
4905,
29892,
525,
29893,
742,
8025,
2433,
9420,
29947,
1495,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
3617,
278,
1881,
4840,
515,
6389,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
679,
29918,
2080,
29918,
5461,
29898,
5085,
1125,
13,
1678,
736,
10876,
29889,
4172,
262,
565,
6389,
29889,
2080,
338,
6213,
1683,
1722,
29898,
5085,
29889,
2080,
29892,
525,
29878,
742,
8025,
2433,
9420,
29947,
1495,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
360,
3427,
278,
4390,
2281,
2955,
2793,
304,
278,
2183,
4840,
297,
263,
612,
23956,
3402,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
16766,
29918,
294,
29918,
25162,
29898,
3051,
29892,
4840,
29892,
6389,
1125,
13,
1678,
343,
8807,
29889,
11177,
29918,
15070,
29898,
3051,
29892,
4840,
29892,
2322,
29918,
1731,
29918,
3293,
29922,
8824,
29897,
13,
1678,
396,
313,
311,
17990,
630,
1363,
14944,
525,
667,
2396,
21443,
4691,
29914,
2523,
356,
376,
5372,
1347,
29908,
13,
1678,
396,
1074,
2045,
597,
2417,
29889,
510,
29914,
2619,
29914,
29906,
29900,
29941,
29945,
29906,
29955,
29929,
29946,
29914,
2272,
25162,
29899,
275,
29899,
5498,
3277,
29899,
7204,
2859,
29899,
4691,
29899,
2523,
356,
29899,
4905,
29914,
29906,
29900,
29941,
29953,
29929,
29929,
29947,
29946,
13,
1678,
396,
343,
8807,
29889,
15070,
29898,
25162,
29918,
1514,
1839,
5041,
267,
7464,
10876,
29889,
25393,
29892,
8025,
2433,
9420,
29899,
29947,
742,
2758,
29918,
2523,
356,
29922,
5574,
29892,
13,
1678,
396,
965,
21139,
546,
29922,
25162,
21693,
8977,
12657,
29889,
29928,
398,
546,
29897,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
360,
3427,
278,
4390,
2281,
2955,
2793,
304,
278,
2183,
4840,
297,
263,
16874,
3402,
13,
29937,
450,
4341,
526,
3342,
491,
6389,
29889,
1853,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
16766,
29918,
294,
29918,
7638,
29898,
3051,
29892,
4840,
29892,
6389,
29892,
1746,
7039,
29918,
1609,
29918,
1853,
3790,
29915,
10382,
29918,
2271,
2396,
6024,
978,
742,
525,
2271,
742,
525,
9507,
7464,
13,
462,
462,
462,
965,
525,
3027,
29918,
20095,
2396,
6024,
978,
742,
525,
999,
742,
525,
4039,
742,
525,
3027,
7464,
13,
462,
462,
462,
965,
525,
5559,
29918,
20095,
2396,
6024,
978,
742,
525,
2271,
742,
525,
12083,
7464,
13,
462,
462,
462,
965,
525,
5041,
2396,
6024,
1445,
742,
525,
3126,
29918,
2084,
742,
525,
978,
742,
525,
1482,
29918,
1767,
742,
525,
1025,
29918,
1767,
2033,
29913,
1125,
13,
1678,
396,
14806,
263,
13261,
1051,
304,
367,
7797,
13902,
297,
16874,
13,
1678,
565,
6389,
29889,
1853,
1275,
525,
5041,
2396,
13,
4706,
2793,
29918,
7638,
353,
1051,
580,
13,
4706,
363,
13261,
287,
29918,
1445,
297,
2793,
29901,
13,
9651,
363,
13261,
297,
13261,
287,
29918,
1445,
1839,
25990,
2033,
29901,
13,
18884,
13261,
1839,
1445,
2033,
353,
13261,
287,
29918,
1445,
1839,
1445,
2033,
13,
18884,
2793,
29918,
7638,
29889,
4397,
29898,
5041,
29897,
13,
4706,
2793,
353,
2793,
29918,
7638,
13,
13,
1678,
1051,
10507,
353,
11799,
29889,
21533,
10507,
29898,
13,
4706,
4840,
29892,
13,
4706,
1746,
7039,
29922,
2671,
7039,
29918,
1609,
29918,
1853,
29961,
5085,
29889,
1853,
29962,
565,
6389,
29889,
1853,
297,
1746,
7039,
29918,
1609,
29918,
1853,
1683,
2793,
29961,
29900,
1822,
8149,
29898,
13,
4706,
10353,
13,
4706,
28552,
29922,
742,
742,
13,
4706,
14978,
3090,
2433,
29908,
742,
13,
4706,
439,
11427,
29922,
7638,
29889,
13356,
2891,
29923,
29918,
29940,
1164,
13967,
1001,
2965,
13,
1678,
1723,
13,
1678,
1051,
10507,
29889,
13236,
1242,
29898,
3051,
29897,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
360,
3427,
278,
4390,
2281,
2955,
2793,
304,
278,
2183,
4840,
297,
263,
3402,
6790,
491,
6389,
29889,
4830,
259,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
16766,
29898,
3051,
29892,
4840,
29892,
6389,
1125,
13,
1678,
13149,
1338,
580,
1839,
15070,
29918,
294,
29918,
29915,
718,
6389,
29889,
4830,
850,
3051,
29892,
4840,
29892,
6389,
29897,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
4103,
689,
263,
4390,
2084,
964,
263,
1051,
310,
4452,
763,
445,
29901,
13,
29937,
263,
7340,
29889,
1327,
29890,
29961,
29900,
3816,
29945,
1822,
26854,
25230,
6702,
7340,
29874,
742,
525,
1327,
29890,
742,
29871,
29900,
29892,
29871,
29945,
29892,
525,
26854,
1495,
13,
29937,
450,
9819,
1051,
16089,
277,
1078,
278,
4390,
2084,
9068,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
4390,
2084,
29918,
517,
29918,
1761,
29898,
710,
29918,
2084,
1125,
13,
1678,
270,
5715,
29918,
1761,
353,
851,
29918,
2084,
29889,
5451,
12839,
1495,
13,
1678,
1121,
353,
1051,
580,
13,
1678,
363,
2224,
29918,
20461,
297,
270,
5715,
29918,
1761,
29901,
13,
4706,
21268,
29918,
2378,
353,
4390,
2084,
29918,
517,
29918,
1761,
29889,
2084,
29923,
2409,
29889,
4352,
29898,
2084,
29918,
20461,
29897,
13,
4706,
565,
21268,
29918,
2378,
338,
6213,
29901,
13,
9651,
12020,
7865,
2392,
877,
8875,
338,
451,
263,
2854,
4663,
29914,
29979,
23956,
2224,
4286,
4830,
29898,
710,
29918,
2084,
876,
13,
4706,
1683,
29901,
13,
9651,
565,
451,
21268,
29918,
2378,
29889,
2972,
29898,
29896,
29897,
338,
6213,
29901,
1121,
29889,
4397,
29898,
20461,
29918,
2378,
29889,
2972,
29898,
29896,
876,
13,
9651,
565,
451,
21268,
29918,
2378,
29889,
2972,
29898,
29906,
29897,
338,
6213,
29901,
1121,
29889,
4397,
29898,
524,
29898,
20461,
29918,
2378,
29889,
2972,
29898,
29906,
4961,
13,
1678,
736,
1121,
13,
13,
3126,
2084,
29918,
517,
29918,
1761,
29889,
2084,
29923,
2409,
353,
337,
29889,
12198,
29898,
29878,
29915,
4197,
3823,
2636,
29930,
5033,
29973,
3583,
29961,
4197,
29900,
29899,
29929,
10062,
2144,
2314,
29973,
1495,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
6680,
7863,
263,
18761,
607,
7087,
278,
4390,
29918,
2084,
297,
1468,
3876,
851,
312,
2955,
1203,
13,
29937,
16969,
263,
18761,
313,
3560,
29892,
1820,
304,
278,
20447,
1919,
20447,
29897,
29871,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
679,
29918,
3166,
29918,
3126,
29918,
2084,
29898,
4632,
29892,
4390,
29918,
2084,
1125,
13,
1678,
565,
1134,
29898,
3126,
29918,
2084,
29897,
338,
851,
29901,
13,
4706,
4390,
29918,
2084,
353,
4390,
2084,
29918,
517,
29918,
1761,
29898,
3126,
29918,
2084,
29897,
13,
1678,
1820,
353,
4390,
29918,
2084,
29961,
29900,
29962,
13,
1678,
565,
313,
275,
8758,
29898,
1989,
29892,
938,
29897,
322,
338,
8758,
29898,
4632,
29892,
1051,
29897,
322,
1820,
529,
7431,
29898,
4632,
876,
470,
313,
1989,
297,
3876,
1125,
13,
4706,
736,
313,
4632,
29892,
1820,
29892,
3876,
29961,
1989,
2314,
565,
7431,
29898,
3126,
29918,
2084,
29897,
1275,
29871,
29896,
1683,
679,
29918,
3166,
29918,
3126,
29918,
2084,
29898,
4632,
29961,
1989,
1402,
4390,
29918,
2084,
29961,
29896,
29901,
2314,
13,
1678,
736,
313,
8516,
29892,
6213,
29892,
6213,
29897,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
2401,
368,
1735,
304,
263,
848,
408,
263,
2281,
2955,
2793,
313,
3126,
470,
612,
23956,
29897,
29871,
13,
29937,
450,
1735,
338,
408,
372,
338,
11122,
297,
263,
12812,
1121,
29871,
13,
29937,
16969,
5852,
565,
263,
1735,
373,
278,
848,
756,
1063,
2309,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
3394,
29918,
3167,
29898,
1272,
29892,
1735,
29892,
6389,
29892,
10422,
1125,
13,
1678,
756,
29918,
15033,
353,
7700,
13,
1678,
396,
8561,
527,
15844,
2486,
278,
4472,
432,
262,
1764,
29906,
2279,
773,
263,
3030,
565,
372,
338,
4944,
29892,
871,
373,
716,
1819,
13,
1678,
716,
29918,
1767,
353,
1735,
1839,
1482,
29918,
1767,
2033,
565,
6389,
29889,
4703,
338,
6213,
1683,
8814,
29898,
3167,
1839,
1482,
29918,
1767,
7464,
6389,
29889,
4703,
29897,
13,
1678,
2030,
29918,
1767,
353,
1735,
1839,
1025,
29918,
1767,
2033,
13,
1678,
565,
525,
3126,
29918,
2084,
29915,
297,
1735,
29901,
13,
4706,
396,
11733,
310,
263,
4663,
847,
612,
23956,
1735,
13,
4706,
565,
1134,
29898,
1272,
29897,
338,
851,
29901,
13,
9651,
12020,
24875,
2392,
877,
1576,
934,
2609,
367,
1303,
297,
612,
23956,
1550,
263,
612,
23956,
21733,
1818,
367,
7436,
304,
372,
1495,
13,
4706,
1820,
353,
4390,
29918,
2084,
353,
1735,
1839,
3126,
29918,
2084,
2033,
13,
4706,
2224,
29918,
355,
29892,
1820,
29892,
8611,
29918,
1767,
353,
679,
29918,
3166,
29918,
3126,
29918,
2084,
29898,
1272,
29892,
4390,
29918,
2084,
29897,
13,
4706,
565,
451,
8611,
29918,
1767,
338,
6213,
29901,
13,
9651,
565,
8611,
29918,
1767,
2804,
2030,
29918,
1767,
322,
8611,
29918,
1767,
2804,
716,
29918,
1767,
29901,
13,
18884,
12020,
24875,
2392,
703,
29915,
29912,
6177,
8875,
29915,
353,
525,
8875,
29915,
541,
1818,
367,
5186,
304,
525,
8875,
29915,
304,
367,
3939,
304,
525,
8875,
29915,
1642,
4830,
29898,
13,
462,
1678,
10422,
29892,
4390,
29918,
2084,
29892,
8611,
29918,
1767,
29892,
2030,
29918,
1767,
29892,
716,
29918,
1767,
876,
13,
9651,
565,
8611,
29918,
1767,
1275,
716,
29918,
1767,
29901,
13,
18884,
1596,
703,
29912,
6177,
525,
8875,
29915,
353,
525,
8875,
29915,
451,
1476,
1363,
3117,
278,
1735,
756,
1063,
2309,
491,
263,
3517,
1735,
1642,
4830,
29898,
13,
462,
4706,
10422,
29892,
4390,
29918,
2084,
29892,
8611,
29918,
1767,
876,
13,
9651,
1683,
29901,
13,
18884,
2224,
29918,
355,
29961,
1989,
29962,
353,
716,
29918,
1767,
13,
18884,
756,
29918,
15033,
353,
5852,
13,
18884,
565,
6389,
29889,
29881,
719,
29918,
3389,
29901,
13,
462,
1678,
1596,
703,
29928,
719,
29899,
3389,
29901,
934,
24335,
525,
8875,
29915,
472,
6571,
338,
8611,
491,
525,
8875,
29915,
1642,
4830,
29898,
9507,
29892,
2030,
29918,
1767,
29892,
4390,
29918,
2084,
29892,
716,
29918,
1767,
876,
13,
4706,
1683,
29901,
13,
9651,
12020,
24875,
2392,
877,
8875,
451,
1476,
742,
4390,
29918,
2084,
29897,
13,
1678,
1683,
29901,
13,
4706,
396,
11733,
310,
263,
1426,
950,
2740,
322,
5191,
13,
4706,
2302,
353,
29871,
29900,
13,
4706,
1550,
848,
29889,
2886,
29898,
1025,
29918,
1767,
29897,
2804,
448,
29896,
29901,
13,
9651,
848,
353,
848,
29889,
6506,
29898,
1025,
29918,
1767,
29892,
716,
29918,
1767,
29892,
29871,
29896,
29897,
13,
9651,
2302,
4619,
29871,
29896,
13,
9651,
756,
29918,
15033,
353,
5852,
3986,
13,
4706,
565,
6389,
29889,
29881,
719,
29918,
3389,
322,
2302,
1405,
29871,
29900,
29901,
13,
9651,
1596,
703,
29928,
719,
29899,
3389,
29901,
934,
24335,
6571,
525,
8875,
29915,
756,
1063,
8611,
491,
6571,
1642,
4830,
29898,
9507,
29892,
851,
29898,
2798,
511,
2030,
29918,
1767,
29892,
716,
29918,
1767,
876,
13,
4706,
565,
2302,
1275,
29871,
29900,
29901,
13,
9651,
1596,
703,
29912,
6177,
525,
8875,
29915,
451,
1476,
1363,
3117,
278,
1735,
756,
1063,
2309,
491,
263,
3517,
1735,
1642,
4830,
29898,
13,
462,
1678,
10422,
29892,
2030,
29918,
1767,
876,
13,
13,
1678,
736,
848,
29892,
756,
29918,
15033,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
2401,
368,
3620,
304,
263,
2183,
934,
310,
263,
2183,
3402,
29889,
13,
29937,
16969,
5852,
565,
278,
934,
756,
1063,
3939,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
3394,
29918,
25990,
29918,
517,
29918,
1445,
29898,
9507,
29892,
934,
4830,
29892,
3620,
29892,
6389,
1125,
13,
1678,
338,
29918,
1445,
29918,
15033,
353,
7700,
13,
1678,
338,
29918,
3051,
29918,
15033,
353,
7700,
13,
1678,
1574,
29918,
1272,
353,
6213,
13,
1678,
411,
1722,
29898,
9507,
29892,
376,
29878,
613,
8025,
2433,
9420,
29947,
1495,
408,
934,
29918,
517,
29918,
3167,
29901,
13,
4706,
1018,
29901,
13,
9651,
396,
10772,
29979,
23956,
29914,
25162,
338,
2221,
304,
1303,
4390,
2086,
29871,
13,
9651,
1574,
29918,
1272,
353,
343,
8807,
29889,
1359,
29898,
1445,
29918,
517,
29918,
3167,
29892,
4309,
1664,
29922,
25162,
21693,
8977,
12657,
29889,
10036,
29897,
13,
4706,
5174,
29901,
13,
9651,
396,
960,
278,
934,
2609,
367,
1303,
408,
2281,
2955,
3402,
29892,
591,
664,
411,
1426,
4475,
3620,
13,
9651,
934,
29918,
517,
29918,
3167,
29889,
344,
1416,
29898,
29900,
29897,
13,
9651,
1574,
29918,
1272,
353,
934,
29918,
517,
29918,
3167,
29889,
949,
580,
13,
4706,
363,
1735,
297,
3620,
29901,
13,
9651,
1018,
29901,
13,
18884,
1574,
29918,
1272,
29892,
756,
29918,
15033,
353,
3394,
29918,
3167,
29898,
1514,
29918,
1272,
29892,
1735,
29892,
6389,
29892,
10422,
29897,
13,
18884,
565,
756,
29918,
15033,
29901,
338,
29918,
3051,
29918,
15033,
353,
5852,
259,
13,
9651,
5174,
24875,
2392,
408,
4589,
29901,
13,
18884,
1596,
877,
2392,
297,
934,
426,
6177,
6571,
4286,
4830,
29898,
9507,
29892,
851,
29898,
3127,
4961,
13,
18884,
565,
451,
6389,
29889,
29881,
719,
29918,
3389,
29901,
13,
462,
1678,
396,
1334,
5040,
7389,
13,
462,
1678,
12020,
4589,
13,
1678,
565,
338,
29918,
3051,
29918,
15033,
29901,
13,
4706,
565,
6389,
29889,
1245,
1627,
519,
29901,
13,
9651,
396,
450,
934,
756,
1063,
3939,
29892,
21266,
1207,
263,
3509,
565,
451,
2307,
2309,
322,
769,
278,
934,
338,
4784,
13,
9651,
10422,
29918,
12683,
353,
10422,
718,
15300,
12683,
29915,
13,
9651,
565,
6389,
29889,
29881,
719,
29918,
3389,
29901,
13,
18884,
1596,
29898,
13,
462,
1678,
376,
29928,
719,
29899,
3389,
29901,
6571,
756,
1063,
13746,
304,
6571,
1642,
4830,
29898,
9507,
29892,
10422,
29918,
12683,
876,
13,
9651,
1683,
29901,
13,
18884,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
9507,
29918,
12683,
1125,
13,
462,
1678,
3509,
1445,
29898,
9507,
29892,
10422,
29918,
12683,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
565,
6389,
29889,
29881,
719,
29918,
3389,
29901,
13,
462,
4706,
1596,
703,
29928,
719,
29899,
3389,
29901,
6571,
2307,
4864,
1642,
4830,
29898,
9507,
29918,
12683,
876,
13,
4706,
565,
451,
6389,
29889,
29881,
719,
29918,
3389,
29901,
13,
9651,
396,
10318,
278,
934,
13,
9651,
411,
1722,
29898,
9507,
29892,
525,
29893,
742,
8025,
2433,
9420,
29947,
1495,
408,
4784,
29918,
1445,
29901,
13,
18884,
565,
1134,
29898,
1514,
29918,
1272,
29897,
338,
851,
322,
934,
4830,
1275,
525,
726,
2396,
13,
462,
1678,
4784,
29918,
1445,
29889,
3539,
29898,
1514,
29918,
1272,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
565,
934,
4830,
1275,
525,
25162,
2396,
13,
462,
4706,
343,
8807,
29889,
15070,
29898,
1514,
29918,
1272,
29892,
4784,
29918,
1445,
29892,
8025,
2433,
9420,
29899,
29947,
742,
2322,
29918,
1731,
29918,
3293,
29922,
8824,
29892,
13,
462,
18884,
21139,
546,
29922,
25162,
21693,
8977,
12657,
29889,
29928,
398,
546,
29897,
13,
462,
1678,
25342,
934,
4830,
1275,
525,
3126,
2396,
13,
462,
4706,
4390,
29889,
15070,
29898,
1514,
29918,
1272,
29892,
4784,
29918,
1445,
29892,
2656,
29918,
8149,
353,
7700,
29892,
29536,
353,
29871,
29946,
29892,
9801,
29918,
294,
18869,
353,
7700,
29897,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
12020,
24875,
2392,
877,
8875,
338,
451,
263,
6969,
934,
3402,
29889,
450,
934,
6571,
756,
451,
1063,
3939,
4286,
4830,
29898,
1445,
4830,
29892,
10422,
876,
13,
4706,
338,
29918,
1445,
29918,
15033,
353,
5852,
13,
13,
1678,
736,
338,
29918,
1445,
29918,
15033,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
2401,
368,
263,
13261,
408,
372,
338,
2281,
2955,
297,
263,
12812,
1121,
13,
29937,
6389,
2367,
3987,
322,
278,
3646,
4138,
988,
304,
3394,
3620,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
3394,
29918,
5041,
29898,
5041,
29892,
6389,
1125,
13,
1678,
565,
6389,
29889,
1245,
1627,
29901,
9679,
1627,
29918,
10314,
29898,
5085,
29897,
13,
13,
1678,
565,
1134,
29898,
5085,
29889,
4703,
29897,
338,
851,
29901,
13,
4706,
1018,
29901,
13,
9651,
396,
319,
3030,
363,
16800,
23697,
2645,
278,
3394,
338,
4944,
29889,
1334,
22024,
689,
372,
297,
4663,
29914,
29979,
23956,
13,
9651,
6389,
29889,
4703,
353,
4390,
29889,
18132,
29898,
5085,
29889,
4703,
29897,
13,
4706,
5174,
7865,
2392,
29901,
13,
9651,
6389,
29889,
4703,
353,
19745,
29898,
5085,
29889,
4703,
29897,
13,
13,
1678,
3646,
29918,
3972,
353,
6389,
29889,
29911,
1718,
7194,
29918,
10145,
13,
1678,
3978,
29918,
12083,
353,
2897,
29889,
657,
29883,
9970,
580,
13,
1678,
3646,
29918,
3972,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
5182,
29918,
3972,
29897,
13,
1678,
396,
591,
664,
411,
6198,
10898,
304,
278,
413,
431,
9983,
764,
3876,
29892,
769,
591,
748,
304,
445,
3876,
4138,
13,
1678,
2897,
29889,
305,
3972,
29898,
5182,
29918,
3972,
29897,
13,
13,
1678,
396,
13649,
3620,
934,
491,
934,
13,
1678,
363,
934,
29918,
25990,
297,
13261,
29901,
13,
4706,
10422,
353,
934,
29918,
25990,
1839,
1445,
2033,
13,
4706,
934,
4830,
353,
934,
29918,
25990,
1839,
4830,
2033,
13,
4706,
565,
3394,
29918,
25990,
29918,
517,
29918,
1445,
29898,
9507,
29892,
934,
4830,
29892,
934,
29918,
25990,
1839,
25990,
7464,
6389,
1125,
13,
9651,
565,
6389,
29889,
29881,
719,
29918,
3389,
29901,
13,
18884,
1596,
703,
29928,
719,
29899,
3389,
29901,
6571,
756,
1063,
13261,
287,
1642,
4830,
29898,
9507,
876,
13,
9651,
1683,
29901,
13,
18884,
1596,
703,
8875,
756,
1063,
13261,
287,
1642,
4830,
29898,
9507,
876,
13,
13,
1678,
396,
17749,
278,
1857,
4138,
13,
1678,
2897,
29889,
305,
3972,
29898,
12574,
29918,
12083,
29897,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
12812,
1899,
8225,
29901,
2048,
263,
612,
23956,
934,
6943,
599,
3620,
322,
4685,
9962,
3734,
491,
13,
29937,
29871,
263,
413,
431,
9983,
764,
1708,
2909,
470,
385,
6162,
29885,
14477,
304,
367,
502,
29881,
297,
263,
1283,
1220,
5177,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
437,
29918,
16192,
29898,
5085,
1125,
13,
1678,
6389,
29889,
4830,
353,
525,
25162,
29915,
13,
1678,
343,
8807,
29918,
1514,
353,
12812,
29918,
10314,
29898,
5085,
29897,
13,
1678,
16766,
29898,
25162,
29918,
1514,
29892,
679,
29918,
4905,
29918,
5461,
29898,
5085,
511,
6389,
29897,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
16766,
1899,
8225,
29901,
671,
408,
1881,
278,
612,
23956,
934,
5759,
491,
12812,
29889,
13,
29937,
7138,
346,
278,
1962,
363,
263,
2183,
1134,
310,
1203,
297,
278,
16874,
3402,
491,
2322,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
437,
29918,
15070,
29898,
5085,
1125,
13,
1678,
343,
8807,
29918,
1514,
353,
343,
8807,
29889,
1359,
29898,
657,
29918,
2080,
29918,
5461,
29898,
13,
4706,
6389,
511,
4309,
1664,
29922,
25162,
21693,
8977,
12657,
29889,
10036,
29897,
13,
1678,
565,
1134,
29898,
25162,
29918,
1514,
29897,
338,
9657,
470,
338,
8758,
29898,
25162,
29918,
1514,
29892,
343,
8807,
21693,
8977,
12657,
29889,
7514,
287,
21533,
1125,
13,
4706,
396,
278,
343,
8807,
29918,
1514,
2444,
304,
367,
263,
612,
23956,
1842,
29892,
591,
671,
372,
304,
6222,
263,
16766,
13,
4706,
16766,
29898,
25162,
29918,
1514,
29961,
5085,
29889,
1853,
29962,
565,
6389,
29889,
1853,
297,
343,
8807,
29918,
1514,
1683,
1051,
3285,
679,
29918,
4905,
29918,
5461,
29898,
5085,
511,
6389,
29897,
13,
1678,
1683,
29901,
13,
4706,
1596,
703,
2392,
29901,
278,
1881,
4840,
338,
451,
263,
2854,
612,
23956,
363,
278,
16766,
1899,
23157,
13,
4706,
6876,
29898,
29896,
29897,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
3394,
1899,
8225,
29901,
671,
408,
1881,
278,
612,
23956,
934,
5759,
491,
12812,
29889,
13,
29937,
1938,
3620,
313,
272,
29611,
372,
565,
1192,
29881,
719,
29899,
3389,
29897,
297,
263,
2183,
4138,
5447,
310,
263,
13,
29937,
29871,
29024,
9983,
764,
530,
1687,
7412,
2909,
470,
263,
4673,
8809,
3873,
6162,
29885,
14477,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
437,
29918,
7302,
29898,
5085,
1125,
13,
1678,
451,
29918,
29891,
300,
29918,
326,
2037,
287,
580,
13,
1678,
565,
6389,
29889,
29881,
719,
29918,
3389,
322,
6389,
29889,
1245,
1627,
29901,
13,
4706,
1596,
703,
2392,
29901,
278,
15589,
29899,
3389,
322,
9679,
1627,
3987,
2609,
367,
1304,
4208,
23157,
13,
4706,
6876,
29898,
29896,
29897,
13,
1678,
343,
8807,
29918,
1514,
353,
343,
8807,
29889,
1359,
29898,
657,
29918,
2080,
29918,
5461,
29898,
13,
4706,
6389,
511,
4309,
1664,
29922,
25162,
21693,
8977,
12657,
29889,
10036,
29897,
13,
1678,
565,
1134,
29898,
25162,
29918,
1514,
29897,
338,
9657,
470,
338,
8758,
29898,
25162,
29918,
1514,
29892,
343,
8807,
21693,
8977,
12657,
29889,
7514,
287,
21533,
1125,
13,
4706,
3394,
29918,
5041,
29898,
25162,
29918,
1514,
1839,
5041,
7464,
6389,
29897,
13,
1678,
1683,
29901,
13,
4706,
1596,
703,
2392,
29901,
278,
1881,
4840,
338,
451,
263,
2854,
612,
23956,
363,
278,
16766,
1899,
23157,
13,
4706,
6876,
29898,
29896,
29897,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
696,
324,
1627,
1899,
8225,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
437,
29918,
1245,
1627,
29898,
5085,
1125,
13,
1678,
9679,
1627,
29918,
10314,
29898,
5085,
29897,
13,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
1051,
29899,
16908,
1899,
8225,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
437,
29918,
1761,
29918,
16908,
29898,
5085,
1125,
13,
1678,
24987,
29918,
262,
29918,
1482,
29918,
5975,
353,
731,
580,
13,
1678,
4766,
29918,
28789,
1764,
29918,
1707,
353,
337,
29889,
12198,
29898,
29878,
12764,
741,
29912,
7110,
29879,
29905,
29878,
29905,
29876,
14178,
10780,
29925,
29966,
1707,
29918,
978,
24566,
29909,
29899,
29999,
29874,
29899,
29920,
29918,
3816,
29905,
29899,
29909,
29899,
29999,
29874,
29899,
29920,
29918,
29900,
29899,
29929,
29962,
7528,
7110,
29879,
29905,
29878,
29905,
29876,
14178,
25848,
29913,
1495,
13,
1678,
343,
8807,
29918,
1514,
353,
343,
8807,
29889,
1359,
29898,
657,
29918,
2080,
29918,
5461,
29898,
13,
4706,
6389,
511,
4309,
1664,
29922,
25162,
21693,
8977,
12657,
29889,
10036,
29897,
13,
1678,
565,
1134,
29898,
25162,
29918,
1514,
29897,
338,
9657,
470,
338,
8758,
29898,
25162,
29918,
1514,
29892,
343,
8807,
21693,
8977,
12657,
29889,
7514,
287,
21533,
1125,
13,
4706,
363,
934,
29918,
3167,
297,
343,
8807,
29918,
1514,
1839,
5041,
2033,
29901,
13,
9651,
363,
1735,
297,
934,
29918,
3167,
1839,
25990,
2033,
29901,
13,
18884,
363,
722,
297,
337,
29889,
2886,
497,
29898,
11037,
29918,
28789,
1764,
29918,
1707,
29892,
1735,
1839,
1482,
29918,
1767,
2033,
1125,
13,
462,
1678,
24987,
29918,
262,
29918,
1482,
29918,
5975,
29889,
1202,
29898,
1707,
29897,
13,
1678,
1683,
29901,
13,
4706,
1596,
703,
2392,
29901,
278,
1881,
4840,
338,
451,
263,
2854,
612,
23956,
363,
278,
16766,
1899,
23157,
13,
4706,
6876,
29898,
29896,
29897,
13,
1678,
1596,
29898,
16908,
29918,
262,
29918,
1482,
29918,
5975,
29897,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
3617,
278,
6389,
13812,
4475,
304,
2183,
6389,
29871,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
1753,
6088,
29918,
5085,
29898,
5085,
1125,
13,
1678,
396,
1275,
9166,
9166,
9166,
4936,
13,
1678,
396,
24492,
5877,
5285,
322,
5106,
3342,
322,
19356,
491,
278,
1852,
5510,
3017,
3918,
4303,
13,
1678,
396,
1275,
9166,
9166,
9166,
4936,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
29898,
13,
4706,
6139,
2433,
27205,
5780,
16876,
304,
7744,
7047,
5285,
491,
885,
9450,
322,
6480,
2066,
297,
263,
3884,
742,
883,
2620,
29918,
1990,
29922,
1191,
5510,
29889,
22131,
1626,
29648,
18522,
29897,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
3259,
742,
3158,
2433,
3259,
742,
1873,
2433,
29896,
29889,
29900,
29889,
29900,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
25903,
742,
1371,
2433,
13305,
934,
1495,
13,
1678,
1014,
862,
4253,
353,
13812,
29889,
1202,
29918,
1491,
862,
4253,
580,
13,
13,
1678,
12812,
29918,
16680,
353,
1014,
862,
4253,
29889,
1202,
29918,
16680,
29898,
13,
4706,
525,
16192,
742,
1371,
2433,
5675,
263,
12812,
313,
949,
871,
29897,
322,
7738,
263,
612,
23956,
1121,
607,
8857,
15659,
3161,
322,
13261,
267,
304,
3394,
1495,
13,
1678,
12812,
29918,
16680,
29889,
842,
29918,
4381,
29879,
29898,
9891,
29922,
1867,
29918,
16192,
29897,
13,
13,
1678,
9679,
1627,
29918,
16680,
353,
1014,
862,
4253,
29889,
1202,
29918,
16680,
29898,
13,
4706,
525,
1245,
1627,
742,
1371,
2433,
1867,
263,
9679,
1627,
773,
263,
9679,
1627,
934,
5759,
491,
263,
13261,
1899,
1495,
13,
1678,
9679,
1627,
29918,
16680,
29889,
842,
29918,
4381,
29879,
29898,
9891,
29922,
1867,
29918,
1245,
1627,
29897,
13,
13,
1678,
16766,
29918,
16680,
353,
1014,
862,
4253,
29889,
1202,
29918,
16680,
29898,
13,
4706,
525,
15070,
742,
1371,
2433,
15070,
278,
1881,
5759,
491,
278,
12812,
304,
7738,
263,
2183,
1134,
310,
1203,
297,
278,
16874,
3402,
491,
2322,
742,
883,
2620,
29918,
1990,
29922,
1191,
5510,
29889,
22131,
1626,
29648,
18522,
29897,
13,
1678,
16766,
29918,
16680,
29889,
842,
29918,
4381,
29879,
29898,
9891,
29922,
1867,
29918,
15070,
29897,
13,
13,
1678,
3394,
29918,
16680,
353,
1014,
862,
4253,
29889,
1202,
29918,
16680,
29898,
13,
4706,
525,
7302,
742,
1371,
2433,
7302,
3620,
15659,
491,
263,
12812,
322,
7738,
263,
9679,
1627,
934,
565,
451,
2307,
4864,
1495,
13,
1678,
3394,
29918,
16680,
29889,
842,
29918,
4381,
29879,
29898,
9891,
29922,
1867,
29918,
7302,
29897,
13,
13,
1678,
1051,
29918,
16908,
29918,
16680,
353,
1014,
862,
4253,
29889,
1202,
29918,
16680,
29898,
13,
4706,
525,
1761,
29899,
16908,
742,
1371,
2433,
1761,
3651,
366,
508,
11684,
12356,
373,
7436,
3620,
773,
278,
1899,
3394,
322,
278,
2984,
1192,
4703,
1495,
13,
1678,
1051,
29918,
16908,
29918,
16680,
29889,
842,
29918,
4381,
29879,
29898,
9891,
29922,
1867,
29918,
1761,
29918,
16908,
29897,
13,
1678,
1051,
29918,
16908,
29918,
16680,
29889,
1202,
29918,
23516,
29898,
13,
4706,
17411,
29875,
742,
525,
489,
2080,
742,
1371,
2433,
1445,
2224,
310,
278,
2752,
934,
408,
278,
612,
23956,
1121,
310,
278,
12812,
1899,
1495,
13,
13,
1678,
9679,
1627,
29918,
16680,
29889,
1202,
29918,
23516,
877,
29911,
1718,
7194,
29918,
10145,
742,
13,
462,
9651,
1371,
2433,
29968,
431,
9983,
764,
1708,
2909,
470,
1081,
29885,
8727,
4138,
4423,
988,
304,
3394,
13261,
267,
742,
2322,
2433,
29889,
1495,
13,
1678,
12812,
29918,
16680,
29889,
1202,
29918,
23516,
877,
489,
1245,
1627,
742,
3158,
2433,
8899,
29918,
3009,
742,
13,
462,
9651,
1371,
2433,
1867,
263,
5534,
9679,
1627,
1434,
1495,
13,
1678,
12812,
29918,
16680,
29889,
1202,
29918,
23516,
877,
489,
339,
2035,
742,
3158,
2433,
8899,
29918,
3009,
742,
13,
462,
9651,
1371,
2433,
1867,
451,
2479,
18116,
322,
5235,
7191,
1495,
13,
1678,
12812,
29918,
16680,
29889,
1202,
29918,
23516,
29898,
13,
4706,
17411,
29877,
742,
525,
489,
4905,
742,
1371,
2433,
1445,
2224,
310,
278,
12551,
934,
363,
278,
612,
23956,
1121,
1495,
13,
1678,
12812,
29918,
16680,
29889,
1202,
29918,
23516,
877,
29911,
1718,
7194,
29918,
10145,
742,
13,
462,
9651,
1371,
2433,
29968,
431,
9983,
764,
1708,
2909,
470,
1081,
29885,
8727,
4138,
4423,
742,
2322,
2433,
29889,
1495,
13,
1678,
12812,
29918,
16680,
29889,
1202,
29918,
23516,
29898,
13,
4706,
525,
489,
4703,
742,
1371,
13776,
29908,
4703,
408,
263,
4390,
1347,
304,
8814,
885,
11310,
1819,
373,
278,
11340,
313,
4773,
29901,
1192,
4703,
525,
6377,
29874,
4710,
29894,
29896,
3284,
29890,
1115,
29941,
29913,
1495,
15945,
1159,
13,
1678,
16766,
29918,
16680,
29889,
1202,
29918,
23516,
29898,
13,
4706,
17411,
29873,
742,
525,
489,
1853,
742,
302,
5085,
2433,
29973,
742,
2322,
2433,
5041,
742,
19995,
29922,
1839,
5041,
742,
525,
10382,
29918,
2271,
742,
525,
3027,
29918,
20095,
742,
525,
5559,
29918,
20095,
7464,
1371,
2433,
1853,
310,
6251,
304,
16766,
1495,
13,
1678,
16766,
29918,
16680,
29889,
1202,
29918,
23516,
29898,
13,
4706,
17411,
29888,
742,
525,
489,
4830,
742,
302,
5085,
2433,
29973,
742,
2322,
2433,
7638,
742,
19995,
29922,
1839,
25162,
742,
525,
7638,
7464,
1371,
2433,
4907,
4905,
3402,
310,
278,
16766,
287,
848,
29889,
13,
1678,
1152,
278,
16874,
3402,
29892,
4341,
1797,
7111,
310,
278,
1134,
29901,
13,
4706,
5142,
29918,
2271,
29901,
1024,
29892,
3142,
29892,
10422,
13,
4706,
1967,
29918,
20095,
29901,
1024,
29892,
2143,
29892,
4055,
29892,
1967,
13,
4706,
6315,
29918,
20095,
29901,
1024,
29892,
3142,
29892,
4138,
13,
4706,
13261,
29901,
934,
29892,
4390,
29918,
2084,
29892,
1024,
29892,
716,
29918,
1767,
29892,
2030,
29918,
1767,
4907,
1495,
13,
1678,
16766,
29918,
16680,
29889,
1202,
29918,
23516,
29898,
13,
4706,
17411,
29875,
742,
525,
489,
2080,
742,
1371,
2433,
1445,
2224,
310,
278,
2752,
934,
408,
278,
612,
23956,
1121,
310,
278,
12812,
1899,
1495,
13,
1678,
16766,
29918,
16680,
29889,
1202,
29918,
23516,
29898,
13,
4706,
17411,
29877,
742,
525,
489,
4905,
742,
1371,
2433,
1445,
2224,
310,
278,
12551,
934,
363,
278,
612,
23956,
1121,
1495,
13,
1678,
3394,
29918,
16680,
29889,
1202,
29918,
23516,
29898,
13,
4706,
17411,
29875,
742,
525,
489,
2080,
742,
1371,
2433,
1445,
2224,
310,
278,
13261,
934,
408,
278,
612,
23956,
1121,
310,
278,
12812,
1899,
1495,
13,
1678,
3394,
29918,
16680,
29889,
1202,
29918,
23516,
29898,
13,
4706,
525,
489,
1245,
1627,
519,
742,
3158,
2433,
8899,
29918,
3009,
742,
1371,
2433,
5325,
526,
13746,
304,
263,
1021,
29918,
9507,
29889,
12683,
1434,
738,
1735,
29889,
910,
3509,
338,
1304,
491,
278,
1192,
1245,
1627,
5858,
1495,
13,
1678,
3394,
29918,
16680,
29889,
1202,
29918,
23516,
29898,
13,
4706,
525,
489,
4703,
742,
1371,
13776,
29908,
4703,
408,
263,
4390,
1347,
304,
8814,
13261,
287,
1819,
373,
278,
11340,
313,
4773,
29901,
1192,
4703,
525,
6377,
29874,
4710,
29894,
29896,
3284,
29890,
1115,
29941,
29913,
1495,
15945,
1159,
13,
1678,
3394,
29918,
16680,
29889,
1202,
29918,
23516,
877,
489,
29881,
719,
29899,
3389,
742,
3158,
2433,
8899,
29918,
3009,
742,
13,
462,
9651,
1371,
2433,
1867,
599,
2712,
377,
389,
449,
6480,
278,
1708,
2909,
470,
1081,
29885,
8727,
29889,
2178,
3620,
526,
8833,
373,
278,
3918,
1962,
1495,
13,
1678,
3394,
29918,
16680,
29889,
1202,
29918,
23516,
877,
489,
1245,
1627,
742,
3158,
2433,
8899,
29918,
3009,
742,
13,
462,
9651,
1371,
2433,
1867,
263,
5534,
9679,
1627,
1434,
1495,
13,
1678,
3394,
29918,
16680,
29889,
1202,
29918,
23516,
877,
29911,
1718,
7194,
29918,
10145,
742,
13,
462,
9651,
1371,
2433,
29968,
431,
9983,
764,
1708,
2909,
470,
1081,
29885,
8727,
4138,
4423,
988,
304,
3394,
13261,
267,
742,
2322,
2433,
29889,
1495,
13,
1678,
736,
13812,
29889,
5510,
29918,
5085,
29898,
5085,
29897,
13,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
29937,
1275,
9166,
4936,
1667,
1275,
9166,
4936,
13,
29937,
1275,
9166,
9166,
9166,
4936,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
396,
1275,
9166,
9166,
9166,
4936,
13,
1678,
396,
13223,
6724,
4004,
29892,
8221,
304,
451,
367,
15390,
304,
671,
12862,
5190,
6724,
8492,
29892,
541,
306,
29915,
314,
263,
2924,
310,
26605,
297,
278,
5132,
3186,
13,
1678,
396,
1275,
9166,
9166,
9166,
4936,
13,
1678,
396,
1152,
1887,
1243,
29892,
443,
9342,
278,
4867,
366,
864,
304,
1243,
29901,
13,
1678,
9995,
13,
1678,
396,
14846,
29024,
9983,
764,
1243,
4867,
29901,
6660,
9679,
1627,
6660,
12812,
6660,
3394,
13,
1678,
10876,
29918,
19218,
353,
10876,
29889,
19218,
29889,
8552,
580,
13,
1678,
10876,
29889,
19218,
29889,
21843,
18959,
1245,
1627,
742,
364,
29915,
29883,
3583,
16418,
29905,
4351,
29905,
29895,
431,
9983,
764,
11287,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
1678,
6389,
29889,
9891,
29898,
5085,
29897,
13,
1678,
10876,
29889,
19218,
353,
10876,
29918,
19218,
29889,
8552,
580,
13,
1678,
10876,
29889,
19218,
29889,
21843,
18959,
16192,
742,
17411,
29877,
742,
364,
29915,
29883,
3583,
16418,
29905,
4351,
29905,
16192,
29889,
21053,
742,
364,
29915,
29883,
3583,
16418,
29905,
4351,
29905,
29895,
431,
9983,
764,
11287,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
1678,
6389,
29889,
9891,
29898,
5085,
29897,
13,
1678,
10876,
29889,
19218,
353,
10876,
29918,
19218,
29889,
8552,
580,
13,
1678,
396,
9675,
29889,
19218,
29889,
21843,
18959,
7302,
742,
525,
489,
4703,
742,
525,
6377,
2997,
29918,
1727,
6020,
4710,
29956,
29889,
29990,
29889,
29979,
29889,
29999,
29901,
29945,
29900,
29900,
29900,
3284,
2997,
29918,
29882,
5847,
4710,
1124,
597,
29956,
29889,
29990,
29889,
29979,
29889,
29999,
29901,
29947,
29900,
9092,
742,
525,
489,
2080,
742,
364,
29915,
29883,
3583,
16418,
29905,
4351,
29905,
16192,
29889,
21053,
742,
13,
1678,
396,
462,
364,
29915,
29883,
3583,
16418,
29905,
4351,
29905,
29895,
431,
9983,
764,
11287,
13,
1678,
10876,
29889,
19218,
29889,
21843,
18959,
7302,
742,
525,
489,
2080,
742,
364,
29915,
29883,
3583,
16418,
29905,
4351,
29905,
16192,
29889,
21053,
742,
364,
29915,
29883,
3583,
16418,
29905,
4351,
29905,
29895,
431,
9983,
764,
11287,
13,
1678,
9995,
13,
1678,
396,
6162,
29885,
14477,
13,
1678,
10876,
29889,
19218,
29889,
21843,
18959,
3150,
1332,
3873,
29889,
1114,
415,
29889,
25162,
742,
525,
16192,
742,
525,
489,
339,
2035,
742,
17411,
29877,
742,
364,
29915,
29883,
3583,
16418,
29905,
4351,
29905,
3150,
1332,
3873,
29889,
16192,
29889,
21053,
742,
364,
29915,
29883,
3583,
16418,
29905,
4351,
29905,
3742,
431,
1061,
29899,
3150,
1332,
3873,
29899,
16519,
29899,
29895,
4003,
29899,
6207,
29889,
1025,
29914,
9421,
29914,
3150,
1332,
3873,
11287,
13,
1678,
396,
9675,
29889,
19218,
29889,
21843,
18959,
15070,
742,
525,
489,
4830,
742,
525,
7638,
742,
525,
489,
1853,
742,
525,
3027,
29918,
20095,
742,
525,
489,
2080,
742,
525,
29883,
8419,
16418,
29914,
4351,
29914,
15425,
29899,
16192,
29889,
21053,
11287,
13,
1678,
396,
9675,
29889,
19218,
29889,
21843,
18959,
15070,
742,
525,
489,
4830,
742,
525,
7638,
742,
525,
489,
1853,
742,
525,
5559,
29918,
20095,
742,
525,
489,
2080,
742,
525,
29883,
8419,
16418,
29914,
4351,
29914,
15425,
29899,
16192,
29889,
21053,
11287,
13,
1678,
396,
9675,
29889,
19218,
29889,
21843,
18959,
7302,
742,
525,
489,
4703,
742,
376,
10998,
2997,
29918,
1727,
6020,
22099,
29956,
29889,
29990,
29889,
29979,
29889,
29999,
29901,
29945,
29900,
29900,
29900,
10827,
613,
525,
489,
2080,
742,
525,
29883,
8419,
16418,
29914,
4351,
29914,
15425,
29899,
16192,
29889,
21053,
742,
13,
1678,
396,
462,
525,
489,
29881,
719,
29899,
3389,
742,
364,
29915,
29883,
3583,
16418,
29905,
4351,
29905,
3742,
431,
1061,
29899,
3150,
1332,
3873,
29899,
16519,
29899,
29895,
4003,
29899,
6207,
29889,
1025,
29905,
9421,
29905,
3150,
1332,
3873,
11287,
13,
1678,
9995,
13,
1678,
396,
14846,
6162,
29885,
1243,
4867,
29901,
6660,
9679,
1627,
6660,
12812,
6660,
3394,
13,
1678,
10876,
29918,
19218,
353,
10876,
29889,
19218,
29889,
8552,
580,
13,
1678,
10876,
29889,
19218,
29889,
21843,
18959,
1245,
1627,
742,
364,
29915,
29907,
3583,
16418,
29905,
4351,
29905,
3742,
431,
1061,
29899,
3150,
1332,
3873,
29899,
16519,
29899,
29895,
4003,
29899,
6207,
29889,
1025,
29905,
9421,
29905,
3150,
1332,
3873,
11287,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
1678,
6389,
29889,
9891,
29898,
5085,
29897,
13,
1678,
10876,
29889,
19218,
353,
10876,
29918,
19218,
29889,
8552,
580,
13,
1678,
10876,
29889,
19218,
29889,
21843,
18959,
16192,
742,
17411,
29877,
742,
364,
29915,
29883,
3583,
16418,
29905,
4351,
29905,
15425,
29899,
16192,
29889,
21053,
742,
364,
29915,
29883,
3583,
16418,
29905,
4351,
29905,
3742,
431,
1061,
29899,
3150,
1332,
3873,
29899,
16519,
29899,
29895,
4003,
29899,
6207,
29889,
1025,
29914,
9421,
29914,
3150,
1332,
3873,
11287,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
1678,
6389,
29889,
9891,
29898,
5085,
29897,
13,
1678,
10876,
29889,
19218,
353,
10876,
29918,
19218,
29889,
8552,
580,
13,
1678,
10876,
29889,
19218,
29889,
21843,
18959,
7302,
742,
525,
489,
4703,
742,
525,
6377,
2997,
29918,
1727,
6020,
4710,
29956,
29889,
29990,
29889,
29979,
29889,
29999,
29901,
29945,
29900,
29900,
29900,
3284,
2997,
29918,
29882,
5847,
4710,
1124,
597,
29956,
29889,
29990,
29889,
29979,
29889,
29999,
29901,
29947,
29900,
9092,
742,
525,
489,
2080,
742,
525,
29883,
8419,
16418,
29914,
4351,
29914,
15425,
29899,
16192,
29889,
21053,
742,
13,
462,
268,
364,
29915,
29883,
3583,
16418,
29905,
4351,
29905,
3742,
431,
1061,
29899,
3150,
1332,
3873,
29899,
16519,
29899,
29895,
4003,
29899,
6207,
29889,
1025,
29905,
9421,
29905,
3150,
1332,
3873,
11287,
13,
1678,
9995,
13,
1678,
396,
9675,
29889,
19218,
29889,
21843,
18959,
1245,
1627,
742,
525,
489,
8477,
11287,
13,
1678,
396,
9675,
29889,
19218,
29889,
21843,
18959,
1761,
29899,
16908,
742,
525,
489,
2080,
742,
525,
29883,
8419,
16418,
29914,
4351,
29914,
15425,
29899,
16192,
29889,
21053,
11287,
13,
1678,
396,
9675,
29889,
19218,
29889,
21843,
18959,
15070,
742,
525,
489,
8477,
11287,
13,
13,
1678,
396,
1275,
9166,
9166,
9166,
4936,
13,
1678,
396,
20969,
6389,
322,
6222,
278,
1899,
411,
3987,
565,
278,
5877,
338,
9280,
13,
1678,
396,
1275,
9166,
9166,
9166,
4936,
13,
1678,
13812,
353,
6088,
29918,
5085,
29898,
9675,
29889,
19218,
29961,
29896,
29901,
2314,
13,
1678,
13812,
29889,
9891,
29898,
16680,
29897,
13,
2
] |
tvm_benchmark/test_resnet_inference.py | adwwsd/HAWQ | 0 | 28573 | <gh_stars>0
import torch
import tvm
from tvm import autotvm
from tvm import relay
from tvm.contrib import download
from tvm.contrib.debugger import debug_runtime
from PIL import Image
import matplotlib.pyplot as plt
import numpy as np
import argparse
import os
from os.path import join, isfile
import sys
import json, requests
from io import BytesIO
import re
import mixed_precision_models.quantized_resnet_v1 as quantized_resnet_v1
from mixed_precision_models.layers import QConfig, QuantizeContext
import hawq_utils_resnet
import torch.cuda.profiler as profiler
import pyprof
pyprof.init()
import logging
logging.basicConfig(level=logging.CRITICAL)
parser = argparse.ArgumentParser(description='Resnet accuracy test',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--model-dir', required=True,
help='Model data directory')
parser.add_argument('--debug-unit', default=None,
help='Debug specific unit input, compare the unit input to the pytorch result (stage1_unit1, stage1_unit2 ...)')
parser.add_argument('--rounding', default='TONEAREST',
help='Round scheme (TONEAREST, TRUNCATE)')
parser.add_argument('--num-classes', type=int, default=1000,
help='Total number of classes')
parser.add_argument('--arch', default='resnet50',
help='resnet architecture')
args = parser.parse_args()
###############################################################################
# Set target device
# -----------------
TARGET_NAME = 'cuda'
CTX = tvm.context(TARGET_NAME, 0)
#CTX = tvm.gpu(0)
###############################################################################
# Load params
# -----------------
if args.arch == 'resnet50':
isRes18 = False
if args.num_classes == 10: # Cifar 10
num_stages = 3
units = [3, 4, 6]
print("Use Cifar 10")
else:
num_stages = 4
units = [3, 4, 6, 3]
elif args.arch == 'resnet18':
isRes18 = True
num_stages = 4
units = [2, 2, 2, 2]
else:
assert 0
weights = np.load(os.path.join(args.model_dir, "weights.npy"), allow_pickle=True)[()]
bias = np.load(os.path.join(args.model_dir, "bias.npy"), allow_pickle=True)[()]
hawq_utils_resnet.load_qconfig("uint4", "int4", num_stages, units, file_name=os.path.join(args.model_dir, "quantized_checkpoint.pth.tar"), isRes18=isRes18)
#hawq_utils_resnet50.load_qconfig("int8", "int8", num_stages, units, file_name=os.path.join(args.model_dir, "quantized_checkpoint.pth.tar"))
input_image = np.load(os.path.join(args.model_dir, "input_image_batch_1.npy"))
input_image = input_image / QuantizeContext.qconfig_dict["conv0_qconfig"].input_scale
input_image = np.clip(input_image, -128, 127)
if args.rounding == "TONEAREST":
input_image = np.round(input_image)
elif args.rounding == "TRUNCATE":
input_image = np.trunc(input_image)
input_image = input_image.astype("int8")
params = {**weights, **bias}
###############################################################################
# Load model
# -----------------
batch_size = 8
shape = list(input_image.shape)
image_shape = (shape[3], shape[1], shape[2])
input_dtype = 'int8'
model_type = "int4"
num_layers = 18 if isRes18 else 50
data_layout = "NHWC"
kernel_layout = "HWOI"
func, _ = quantized_resnet_v1.get_workload(batch_size=batch_size,
image_shape=image_shape,
num_classes=args.num_classes,
num_layers=num_layers,
dtype=input_dtype,
data_layout=data_layout,
kernel_layout=kernel_layout,
with_bn=False,
debug_unit=args.debug_unit,
rounding=args.rounding)
# Download ImageNet categories
categ_url = "https://github.com/uwsaml/web-data/raw/main/vta/models/"
categ_fn = "synset.txt"
download.download(join(categ_url, categ_fn), categ_fn)
synset = eval(open(categ_fn).read())
image = input_image
input_data = np.repeat(image, batch_size, axis=0)
###############################################################################
# Run the model
# -----------------
log_filename = "/home/zach_zheng/hawq_tvm/mixed_precision_models/tuning_logs/resnet%d_%s_%s_batch_%d.log" % (num_layers, data_layout, model_type, batch_size)
if not os.path.exists(log_filename):
log_filename = None
else:
print("Apply tuning log " + log_filename)
with autotvm.apply_history_best(log_filename):
with relay.build_config(opt_level=3):
print("building relay")
graph, lib, params = relay.build(func, target=TARGET_NAME, params=params)
if args.debug_unit is not None:
m = tvm.contrib.graph_runtime.create(graph, lib, CTX)
#m = tvm.contrib.graph_executor.create(graph, lib, CTX)
# Set the network parameters and inputs
m.set_input(**params)
m.set_input('data', input_data)
m.run()
np.set_printoptions(threshold=sys.maxsize)
out = m.get_output(0).asnumpy()
if not os.path.exists(os.path.join(args.model_dir, "tvm_result")):
os.mkdir(os.path.join(args.model_dir, "tvm_result"))
unit_str_regex = re.search('stage(\d)_unit(\d)', args.debug_unit)
if unit_str_regex is not None:
unit_str = unit_str_regex.group(0)
else:
unit_str = ""
if args.debug_unit == "fc_input":
actual_result = out
np.save(os.path.join(args.model_dir, "tvm_result/fc_input_int8.npy"), actual_result[0])
golden_result = np.load(os.path.join(args.model_dir, "pytorch_result/fc_input_int8.npy")).astype("int8")
elif args.debug_unit == "fc_output":
golden_result = np.load(os.path.join(args.model_dir, "pytorch_result/fc_output_int32.npy"))
actual_result = out
np.save(os.path.join(args.model_dir, "tvm_result/fc_output_int32.npy"), actual_result[0])
# golden_result = np.load(os.path.join(args.model_dir, "pytorch_result/fc_output_float32.npy"))#.astype("int32")
elif args.debug_unit == "avg_pool":
actual_result = out
np.save(os.path.join(args.model_dir, "tvm_result/avg_pool_int32.npy"), actual_result[0])
golden_result = np.load(os.path.join(args.model_dir, "pytorch_result/avg_pool_int32.npy")).astype("int32")
elif args.debug_unit == "softmax":
actual_result = out
np.save(os.path.join(args.model_dir, "tvm_result/avg_pool_int32.npy"), actual_result[0])
golden_result = np.load(os.path.join(args.model_dir, "pytorch_result/avg_pool_int32.npy")).astype("int32")
elif args.debug_unit == unit_str + "_output":
actual_result = out * QuantizeContext.qconfig_dict["%s_qconfig_add" % unit_str].output_scale
# actual_result = out
np.save(os.path.join(args.model_dir, "tvm_result/%s_output_int32.npy" % unit_str), actual_result[0])
golden_result = np.load(os.path.join(args.model_dir, "pytorch_result/%s_output_float32.npy" % unit_str))
elif args.debug_unit == unit_str + "_input":
actual_result = hawq_utils_resnet.unpack_int4_to_int32(out)
np.save(os.path.join(args.model_dir, "tvm_result/%s_input_int4.npy" % unit_str), actual_result[0])
golden_result = np.load(os.path.join(args.model_dir, "pytorch_result/%s_input_int4.npy" % unit_str)).astype("int32")
else:
print("Error: Unsupported debug unit.")
print("Above is Pytorch result, under is TVM result")
tvm.testing.assert_allclose(golden_result, actual_result[0])
print(args.debug_unit + " is 100% matched !")
else:
module = tvm.contrib.graph_runtime.create(graph, lib, ctx=CTX)
#module = tvm.contrib.graph_executor.create(graph, lib, ctx=CTX)
module.set_input(**params)
module.set_input('data', input_data)
module.run()
tvm_output = module.get_output(0)
print(tvm_output.shape)
for b in range(batch_size):
top_categories = np.argsort(tvm_output.asnumpy()[b])
# Report top-5 classification results
print("\n prediction for sample {}".format(b))
print("\t#1:", synset[top_categories[-1]])
print("\t#2:", synset[top_categories[-2]])
print("\t#3:", synset[top_categories[-3]])
print("\t#4:", synset[top_categories[-4]])
print("\t#5:", synset[top_categories[-5]])
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
4842,
305,
13,
5215,
260,
6925,
13,
3166,
260,
6925,
1053,
1120,
327,
6925,
13,
3166,
260,
6925,
1053,
29856,
13,
3166,
260,
6925,
29889,
21570,
1053,
5142,
13,
3166,
260,
6925,
29889,
21570,
29889,
8382,
914,
1053,
4744,
29918,
15634,
13,
13,
3166,
349,
6227,
1053,
7084,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
1852,
5510,
13,
5215,
2897,
13,
3166,
2897,
29889,
2084,
1053,
5988,
29892,
338,
1445,
13,
5215,
10876,
13,
5215,
4390,
29892,
7274,
13,
3166,
12013,
1053,
2648,
2167,
5971,
13,
5215,
337,
13,
13,
5215,
12849,
29918,
17990,
2459,
29918,
9794,
29889,
12150,
1891,
29918,
690,
1212,
29918,
29894,
29896,
408,
4323,
1891,
29918,
690,
1212,
29918,
29894,
29896,
13,
3166,
12849,
29918,
17990,
2459,
29918,
9794,
29889,
29277,
1053,
660,
3991,
29892,
22746,
675,
2677,
13,
13,
5215,
447,
29893,
29939,
29918,
13239,
29918,
690,
1212,
13,
13,
5215,
4842,
305,
29889,
29883,
6191,
29889,
771,
1777,
261,
408,
20077,
261,
13,
5215,
11451,
23221,
13,
2272,
23221,
29889,
2344,
580,
13,
13,
5215,
12183,
13,
21027,
29889,
16121,
3991,
29898,
5563,
29922,
21027,
29889,
11341,
1806,
2965,
1964,
29897,
13,
13,
16680,
353,
1852,
5510,
29889,
15730,
11726,
29898,
8216,
2433,
1666,
1212,
13600,
1243,
742,
13,
462,
462,
308,
883,
2620,
29918,
1990,
29922,
1191,
5510,
29889,
15730,
24863,
29648,
18522,
29897,
13,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
4299,
29899,
3972,
742,
3734,
29922,
5574,
29892,
13,
462,
1678,
1371,
2433,
3195,
848,
3884,
1495,
13,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
8382,
29899,
5441,
742,
2322,
29922,
8516,
29892,
13,
462,
1678,
1371,
2433,
11862,
2702,
5190,
1881,
29892,
7252,
278,
5190,
1881,
304,
278,
282,
3637,
25350,
1121,
313,
19190,
29896,
29918,
5441,
29896,
29892,
7408,
29896,
29918,
5441,
29906,
29757,
1495,
13,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
29878,
12449,
742,
2322,
2433,
29911,
12413,
29909,
1525,
1254,
742,
13,
462,
1678,
1371,
2433,
29934,
618,
11380,
313,
29911,
12413,
29909,
1525,
1254,
29892,
10014,
3904,
29907,
3040,
29897,
1495,
13,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
1949,
29899,
13203,
742,
1134,
29922,
524,
29892,
2322,
29922,
29896,
29900,
29900,
29900,
29892,
13,
462,
1678,
1371,
2433,
11536,
1353,
310,
4413,
1495,
13,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
1279,
742,
2322,
2433,
690,
1212,
29945,
29900,
742,
13,
462,
1678,
1371,
2433,
690,
1212,
11258,
1495,
13,
13,
5085,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
29937,
3789,
3646,
4742,
13,
29937,
448,
2683,
13,
13,
29911,
1718,
7194,
29918,
5813,
353,
525,
29883,
6191,
29915,
13,
1783,
29990,
353,
260,
6925,
29889,
4703,
29898,
29911,
1718,
7194,
29918,
5813,
29892,
29871,
29900,
29897,
13,
29937,
1783,
29990,
353,
260,
6925,
29889,
29887,
3746,
29898,
29900,
29897,
13,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
29937,
16012,
8636,
13,
29937,
448,
2683,
13,
13,
361,
6389,
29889,
1279,
1275,
525,
690,
1212,
29945,
29900,
2396,
13,
1678,
338,
1666,
29896,
29947,
353,
7700,
13,
1678,
565,
6389,
29889,
1949,
29918,
13203,
1275,
29871,
29896,
29900,
29901,
396,
315,
361,
279,
29871,
29896,
29900,
13,
4706,
954,
29918,
303,
1179,
353,
29871,
29941,
13,
4706,
10340,
353,
518,
29941,
29892,
29871,
29946,
29892,
29871,
29953,
29962,
13,
4706,
1596,
703,
11403,
315,
361,
279,
29871,
29896,
29900,
1159,
13,
1678,
1683,
29901,
13,
4706,
954,
29918,
303,
1179,
353,
29871,
29946,
13,
4706,
10340,
353,
518,
29941,
29892,
29871,
29946,
29892,
29871,
29953,
29892,
29871,
29941,
29962,
13,
23681,
6389,
29889,
1279,
1275,
525,
690,
1212,
29896,
29947,
2396,
13,
1678,
338,
1666,
29896,
29947,
353,
5852,
13,
1678,
954,
29918,
303,
1179,
353,
29871,
29946,
13,
1678,
10340,
353,
518,
29906,
29892,
29871,
29906,
29892,
29871,
29906,
29892,
29871,
29906,
29962,
13,
2870,
29901,
13,
1678,
4974,
29871,
29900,
13,
13,
705,
5861,
353,
7442,
29889,
1359,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
705,
5861,
29889,
29876,
2272,
4968,
2758,
29918,
23945,
280,
29922,
5574,
9601,
580,
29962,
13,
29890,
3173,
353,
7442,
29889,
1359,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
29890,
3173,
29889,
29876,
2272,
4968,
2758,
29918,
23945,
280,
29922,
5574,
9601,
580,
29962,
13,
29882,
1450,
29939,
29918,
13239,
29918,
690,
1212,
29889,
1359,
29918,
29939,
2917,
703,
13470,
29946,
613,
376,
524,
29946,
613,
954,
29918,
303,
1179,
29892,
10340,
29892,
934,
29918,
978,
29922,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
12150,
1891,
29918,
3198,
3149,
29889,
29886,
386,
29889,
12637,
4968,
338,
1666,
29896,
29947,
29922,
275,
1666,
29896,
29947,
29897,
13,
29937,
29882,
1450,
29939,
29918,
13239,
29918,
690,
1212,
29945,
29900,
29889,
1359,
29918,
29939,
2917,
703,
524,
29947,
613,
376,
524,
29947,
613,
954,
29918,
303,
1179,
29892,
10340,
29892,
934,
29918,
978,
29922,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
12150,
1891,
29918,
3198,
3149,
29889,
29886,
386,
29889,
12637,
5783,
13,
13,
2080,
29918,
3027,
353,
7442,
29889,
1359,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
2080,
29918,
3027,
29918,
16175,
29918,
29896,
29889,
29876,
2272,
5783,
13,
2080,
29918,
3027,
353,
1881,
29918,
3027,
847,
22746,
675,
2677,
29889,
29939,
2917,
29918,
8977,
3366,
20580,
29900,
29918,
29939,
2917,
16862,
2080,
29918,
7052,
13,
2080,
29918,
3027,
353,
7442,
29889,
24049,
29898,
2080,
29918,
3027,
29892,
448,
29896,
29906,
29947,
29892,
29871,
29896,
29906,
29955,
29897,
13,
13,
361,
6389,
29889,
29878,
12449,
1275,
376,
29911,
12413,
29909,
1525,
1254,
1115,
13,
1678,
1881,
29918,
3027,
353,
7442,
29889,
14486,
29898,
2080,
29918,
3027,
29897,
13,
23681,
6389,
29889,
29878,
12449,
1275,
376,
5659,
3904,
29907,
3040,
1115,
13,
1678,
1881,
29918,
3027,
353,
7442,
29889,
509,
4661,
29898,
2080,
29918,
3027,
29897,
13,
13,
2080,
29918,
3027,
353,
1881,
29918,
3027,
29889,
579,
668,
703,
524,
29947,
1159,
13,
7529,
353,
426,
1068,
705,
5861,
29892,
3579,
29890,
3173,
29913,
13,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
29937,
16012,
1904,
13,
29937,
448,
2683,
13,
16175,
29918,
2311,
353,
29871,
29947,
13,
12181,
353,
1051,
29898,
2080,
29918,
3027,
29889,
12181,
29897,
13,
3027,
29918,
12181,
353,
313,
12181,
29961,
29941,
1402,
8267,
29961,
29896,
1402,
8267,
29961,
29906,
2314,
13,
2080,
29918,
29881,
1853,
353,
525,
524,
29947,
29915,
13,
4299,
29918,
1853,
353,
376,
524,
29946,
29908,
13,
1949,
29918,
29277,
353,
29871,
29896,
29947,
565,
338,
1666,
29896,
29947,
1683,
29871,
29945,
29900,
13,
1272,
29918,
2680,
353,
376,
29940,
29950,
29956,
29907,
29908,
13,
17460,
29918,
2680,
353,
376,
29950,
29956,
29949,
29902,
29908,
13,
13,
9891,
29892,
903,
353,
4323,
1891,
29918,
690,
1212,
29918,
29894,
29896,
29889,
657,
29918,
1287,
1359,
29898,
16175,
29918,
2311,
29922,
16175,
29918,
2311,
29892,
13,
462,
462,
18884,
1967,
29918,
12181,
29922,
3027,
29918,
12181,
29892,
13,
462,
462,
18884,
954,
29918,
13203,
29922,
5085,
29889,
1949,
29918,
13203,
29892,
13,
462,
462,
18884,
954,
29918,
29277,
29922,
1949,
29918,
29277,
29892,
13,
462,
462,
18884,
26688,
29922,
2080,
29918,
29881,
1853,
29892,
13,
462,
462,
18884,
848,
29918,
2680,
29922,
1272,
29918,
2680,
29892,
13,
462,
462,
18884,
8466,
29918,
2680,
29922,
17460,
29918,
2680,
29892,
13,
462,
462,
18884,
411,
29918,
11197,
29922,
8824,
29892,
13,
462,
462,
18884,
4744,
29918,
5441,
29922,
5085,
29889,
8382,
29918,
5441,
29892,
13,
462,
462,
18884,
4513,
292,
29922,
5085,
29889,
29878,
12449,
29897,
13,
13,
13,
29937,
25553,
7084,
6779,
13997,
13,
29883,
1845,
29918,
2271,
353,
376,
991,
597,
3292,
29889,
510,
29914,
29884,
5652,
8807,
29914,
2676,
29899,
1272,
29914,
1610,
29914,
3396,
29914,
29894,
941,
29914,
9794,
12975,
13,
29883,
1845,
29918,
9144,
353,
376,
19274,
842,
29889,
3945,
29908,
13,
10382,
29889,
10382,
29898,
7122,
29898,
29883,
1845,
29918,
2271,
29892,
6107,
29918,
9144,
511,
6107,
29918,
9144,
29897,
13,
19274,
842,
353,
19745,
29898,
3150,
29898,
29883,
1845,
29918,
9144,
467,
949,
3101,
13,
13,
3027,
353,
1881,
29918,
3027,
13,
2080,
29918,
1272,
353,
7442,
29889,
14358,
29898,
3027,
29892,
9853,
29918,
2311,
29892,
9685,
29922,
29900,
29897,
13,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
29937,
13,
29937,
7525,
278,
1904,
13,
29937,
448,
2683,
13,
1188,
29918,
9507,
353,
5591,
5184,
29914,
29920,
496,
29918,
17599,
996,
29914,
29882,
1450,
29939,
29918,
29873,
6925,
29914,
29885,
11925,
29918,
17990,
2459,
29918,
9794,
29914,
29873,
27964,
29918,
20756,
29914,
690,
1212,
29995,
29881,
29918,
29995,
29879,
29918,
29995,
29879,
29918,
16175,
29918,
29995,
29881,
29889,
1188,
29908,
1273,
313,
1949,
29918,
29277,
29892,
848,
29918,
2680,
29892,
1904,
29918,
1853,
29892,
9853,
29918,
2311,
29897,
13,
13,
361,
451,
2897,
29889,
2084,
29889,
9933,
29898,
1188,
29918,
9507,
1125,
13,
1678,
1480,
29918,
9507,
353,
6213,
13,
2870,
29901,
13,
1678,
1596,
703,
2052,
368,
18515,
292,
1480,
376,
718,
1480,
29918,
9507,
29897,
13,
13,
2541,
1120,
327,
6925,
29889,
7302,
29918,
18434,
29918,
13318,
29898,
1188,
29918,
9507,
1125,
13,
1678,
411,
29856,
29889,
4282,
29918,
2917,
29898,
3670,
29918,
5563,
29922,
29941,
1125,
13,
13,
4706,
1596,
703,
25237,
29856,
1159,
13,
4706,
3983,
29892,
4303,
29892,
8636,
353,
29856,
29889,
4282,
29898,
9891,
29892,
3646,
29922,
29911,
1718,
7194,
29918,
5813,
29892,
8636,
29922,
7529,
29897,
13,
13,
4706,
565,
6389,
29889,
8382,
29918,
5441,
338,
451,
6213,
29901,
13,
9651,
286,
353,
260,
6925,
29889,
21570,
29889,
4262,
29918,
15634,
29889,
3258,
29898,
4262,
29892,
4303,
29892,
26637,
29990,
29897,
13,
9651,
396,
29885,
353,
260,
6925,
29889,
21570,
29889,
4262,
29918,
4258,
3406,
29889,
3258,
29898,
4262,
29892,
4303,
29892,
26637,
29990,
29897,
13,
13,
9651,
396,
3789,
278,
3564,
4128,
322,
10970,
13,
9651,
286,
29889,
842,
29918,
2080,
29898,
1068,
7529,
29897,
13,
9651,
286,
29889,
842,
29918,
2080,
877,
1272,
742,
1881,
29918,
1272,
29897,
13,
9651,
286,
29889,
3389,
580,
13,
13,
9651,
7442,
29889,
842,
29918,
558,
8941,
1980,
29898,
386,
12268,
29922,
9675,
29889,
3317,
2311,
29897,
13,
13,
9651,
714,
353,
286,
29889,
657,
29918,
4905,
29898,
29900,
467,
294,
23749,
580,
13,
13,
9651,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
29873,
6925,
29918,
2914,
5783,
29901,
13,
18884,
2897,
29889,
11256,
3972,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
29873,
6925,
29918,
2914,
5783,
13,
13,
9651,
5190,
29918,
710,
29918,
13087,
353,
337,
29889,
4478,
877,
19190,
1194,
29881,
20344,
5441,
1194,
29881,
29897,
742,
6389,
29889,
8382,
29918,
5441,
29897,
13,
9651,
565,
5190,
29918,
710,
29918,
13087,
338,
451,
6213,
29901,
13,
18884,
5190,
29918,
710,
353,
5190,
29918,
710,
29918,
13087,
29889,
2972,
29898,
29900,
29897,
13,
9651,
1683,
29901,
13,
18884,
5190,
29918,
710,
353,
5124,
13,
13,
9651,
565,
6389,
29889,
8382,
29918,
5441,
1275,
376,
13801,
29918,
2080,
1115,
13,
18884,
3935,
29918,
2914,
353,
714,
13,
18884,
7442,
29889,
7620,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
29873,
6925,
29918,
2914,
29914,
13801,
29918,
2080,
29918,
524,
29947,
29889,
29876,
2272,
4968,
3935,
29918,
2914,
29961,
29900,
2314,
13,
18884,
22843,
29918,
2914,
353,
7442,
29889,
1359,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
2272,
7345,
305,
29918,
2914,
29914,
13801,
29918,
2080,
29918,
524,
29947,
29889,
29876,
2272,
1159,
467,
579,
668,
703,
524,
29947,
1159,
13,
9651,
25342,
6389,
29889,
8382,
29918,
5441,
1275,
376,
13801,
29918,
4905,
1115,
13,
18884,
22843,
29918,
2914,
353,
7442,
29889,
1359,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
2272,
7345,
305,
29918,
2914,
29914,
13801,
29918,
4905,
29918,
524,
29941,
29906,
29889,
29876,
2272,
5783,
13,
18884,
3935,
29918,
2914,
353,
714,
13,
18884,
7442,
29889,
7620,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
29873,
6925,
29918,
2914,
29914,
13801,
29918,
4905,
29918,
524,
29941,
29906,
29889,
29876,
2272,
4968,
3935,
29918,
2914,
29961,
29900,
2314,
13,
18884,
396,
22843,
29918,
2914,
353,
7442,
29889,
1359,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
2272,
7345,
305,
29918,
2914,
29914,
13801,
29918,
4905,
29918,
7411,
29941,
29906,
29889,
29876,
2272,
5783,
29937,
29889,
579,
668,
703,
524,
29941,
29906,
1159,
13,
9651,
25342,
6389,
29889,
8382,
29918,
5441,
1275,
376,
485,
29887,
29918,
10109,
1115,
13,
18884,
3935,
29918,
2914,
353,
714,
13,
18884,
7442,
29889,
7620,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
29873,
6925,
29918,
2914,
29914,
485,
29887,
29918,
10109,
29918,
524,
29941,
29906,
29889,
29876,
2272,
4968,
3935,
29918,
2914,
29961,
29900,
2314,
13,
18884,
22843,
29918,
2914,
353,
7442,
29889,
1359,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
2272,
7345,
305,
29918,
2914,
29914,
485,
29887,
29918,
10109,
29918,
524,
29941,
29906,
29889,
29876,
2272,
1159,
467,
579,
668,
703,
524,
29941,
29906,
1159,
13,
9651,
25342,
6389,
29889,
8382,
29918,
5441,
1275,
376,
2695,
3317,
1115,
13,
18884,
3935,
29918,
2914,
353,
714,
13,
18884,
7442,
29889,
7620,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
29873,
6925,
29918,
2914,
29914,
485,
29887,
29918,
10109,
29918,
524,
29941,
29906,
29889,
29876,
2272,
4968,
3935,
29918,
2914,
29961,
29900,
2314,
13,
18884,
22843,
29918,
2914,
353,
7442,
29889,
1359,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
2272,
7345,
305,
29918,
2914,
29914,
485,
29887,
29918,
10109,
29918,
524,
29941,
29906,
29889,
29876,
2272,
1159,
467,
579,
668,
703,
524,
29941,
29906,
1159,
13,
9651,
25342,
6389,
29889,
8382,
29918,
5441,
1275,
5190,
29918,
710,
718,
11119,
4905,
1115,
13,
18884,
3935,
29918,
2914,
353,
714,
334,
22746,
675,
2677,
29889,
29939,
2917,
29918,
8977,
3366,
29995,
29879,
29918,
29939,
2917,
29918,
1202,
29908,
1273,
5190,
29918,
710,
1822,
4905,
29918,
7052,
13,
18884,
396,
3935,
29918,
2914,
353,
714,
13,
18884,
7442,
29889,
7620,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
29873,
6925,
29918,
2914,
22584,
29879,
29918,
4905,
29918,
524,
29941,
29906,
29889,
29876,
2272,
29908,
1273,
5190,
29918,
710,
511,
3935,
29918,
2914,
29961,
29900,
2314,
13,
18884,
22843,
29918,
2914,
353,
7442,
29889,
1359,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
2272,
7345,
305,
29918,
2914,
22584,
29879,
29918,
4905,
29918,
7411,
29941,
29906,
29889,
29876,
2272,
29908,
1273,
5190,
29918,
710,
876,
13,
9651,
25342,
6389,
29889,
8382,
29918,
5441,
1275,
5190,
29918,
710,
718,
11119,
2080,
1115,
13,
18884,
3935,
29918,
2914,
353,
447,
29893,
29939,
29918,
13239,
29918,
690,
1212,
29889,
348,
4058,
29918,
524,
29946,
29918,
517,
29918,
524,
29941,
29906,
29898,
449,
29897,
13,
18884,
7442,
29889,
7620,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
29873,
6925,
29918,
2914,
22584,
29879,
29918,
2080,
29918,
524,
29946,
29889,
29876,
2272,
29908,
1273,
5190,
29918,
710,
511,
3935,
29918,
2914,
29961,
29900,
2314,
13,
18884,
22843,
29918,
2914,
353,
7442,
29889,
1359,
29898,
359,
29889,
2084,
29889,
7122,
29898,
5085,
29889,
4299,
29918,
3972,
29892,
376,
2272,
7345,
305,
29918,
2914,
22584,
29879,
29918,
2080,
29918,
524,
29946,
29889,
29876,
2272,
29908,
1273,
5190,
29918,
710,
8106,
579,
668,
703,
524,
29941,
29906,
1159,
13,
9651,
1683,
29901,
13,
18884,
1596,
703,
2392,
29901,
853,
23765,
4744,
5190,
23157,
13,
13,
9651,
1596,
703,
29909,
29205,
338,
349,
3637,
25350,
1121,
29892,
1090,
338,
5648,
29924,
1121,
1159,
13,
9651,
260,
6925,
29889,
13424,
29889,
9294,
29918,
497,
5358,
29898,
29887,
1025,
264,
29918,
2914,
29892,
3935,
29918,
2914,
29961,
29900,
2314,
13,
13,
9651,
1596,
29898,
5085,
29889,
8382,
29918,
5441,
718,
376,
338,
29871,
29896,
29900,
29900,
29995,
19228,
1738,
1159,
13,
4706,
1683,
29901,
13,
9651,
3883,
353,
260,
6925,
29889,
21570,
29889,
4262,
29918,
15634,
29889,
3258,
29898,
4262,
29892,
4303,
29892,
12893,
29922,
1783,
29990,
29897,
13,
9651,
396,
5453,
353,
260,
6925,
29889,
21570,
29889,
4262,
29918,
4258,
3406,
29889,
3258,
29898,
4262,
29892,
4303,
29892,
12893,
29922,
1783,
29990,
29897,
13,
9651,
3883,
29889,
842,
29918,
2080,
29898,
1068,
7529,
29897,
13,
9651,
3883,
29889,
842,
29918,
2080,
877,
1272,
742,
1881,
29918,
1272,
29897,
13,
13,
9651,
3883,
29889,
3389,
580,
13,
13,
9651,
260,
6925,
29918,
4905,
353,
3883,
29889,
657,
29918,
4905,
29898,
29900,
29897,
13,
13,
9651,
1596,
29898,
29873,
6925,
29918,
4905,
29889,
12181,
29897,
13,
13,
9651,
363,
289,
297,
3464,
29898,
16175,
29918,
2311,
1125,
13,
18884,
2246,
29918,
20683,
353,
7442,
29889,
5085,
441,
29898,
29873,
6925,
29918,
4905,
29889,
294,
23749,
580,
29961,
29890,
2314,
13,
18884,
396,
13969,
2246,
29899,
29945,
12965,
2582,
13,
18884,
1596,
14182,
29876,
18988,
363,
4559,
6571,
1642,
4830,
29898,
29890,
876,
13,
18884,
1596,
14182,
29873,
29937,
29896,
29901,
613,
5222,
842,
29961,
3332,
29918,
20683,
14352,
29896,
24960,
13,
18884,
1596,
14182,
29873,
29937,
29906,
29901,
613,
5222,
842,
29961,
3332,
29918,
20683,
14352,
29906,
24960,
13,
18884,
1596,
14182,
29873,
29937,
29941,
29901,
613,
5222,
842,
29961,
3332,
29918,
20683,
14352,
29941,
24960,
13,
18884,
1596,
14182,
29873,
29937,
29946,
29901,
613,
5222,
842,
29961,
3332,
29918,
20683,
14352,
29946,
24960,
13,
18884,
1596,
14182,
29873,
29937,
29945,
29901,
613,
5222,
842,
29961,
3332,
29918,
20683,
14352,
29945,
24960,
13,
2
] |
atv/tests/factories.py | City-of-Helsinki/atv | 0 | 166978 | import factory
from django.contrib.auth.models import Group
class GroupFactory(factory.django.DjangoModelFactory):
name = factory.Sequence(lambda n: "group-%d" % n)
class Meta:
model = Group
django_get_or_create = ("name",)
| [
1,
1053,
12529,
13,
3166,
9557,
29889,
21570,
29889,
5150,
29889,
9794,
1053,
6431,
13,
13,
13,
1990,
6431,
5126,
29898,
14399,
29889,
14095,
29889,
29928,
5364,
3195,
5126,
1125,
13,
1678,
1024,
353,
12529,
29889,
20529,
29898,
2892,
302,
29901,
376,
2972,
19222,
29881,
29908,
1273,
302,
29897,
13,
13,
1678,
770,
20553,
29901,
13,
4706,
1904,
353,
6431,
13,
4706,
9557,
29918,
657,
29918,
272,
29918,
3258,
353,
4852,
978,
613,
29897,
13,
2
] |
scripts/pickrunner/visibility_widget.py | ColinKennedy/pickrunner | 1 | 76406 | <reponame>ColinKennedy/pickrunner
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''A set of small widgets that are meant to show/hide themselves.'''
# IMPORT THIRD-PARTY LIBRARIES
from Qt import QtWidgets
from Qt import QtCore
class ExpandCollapseWidget(QtWidgets.QWidget):
'''A "show/hide" widget which opens and closes itself.
It works by creating an inner widget which is hidden by default which you
can expand/collapse using "toggle" or "set_children_visible". To add your
widgets to the section that shows/hides itself, use "add_layout" or
"add_widget".
'''
toggled = QtCore.Signal()
def __init__(
self,
label='',
side='left',
layout=QtWidgets.QVBoxLayout,
parent=None):
'''Create the GUI's widgets.
Args:
label (:obj:`str`, optional):
A word or phrase to put next to the button.
Suggestion: "Advanced Settings". Default: "".
side (:obj:`str`, optional):
Which direction of the widget to display the show/hide button.
Options: ('left', 'right'). Default: 'left'.
layout (:obj:`<callable=QtWidgets.QBoxLayout>`, optional):
The layout for all the widgets that will be shown/hidden.
Default: 'QtWidgets.QVBoxLayout'.
parent (:obj:`<QtCore.QObject>`, optional):
The Qt-based associated object. Default is None.
'''
super(ExpandCollapseWidget, self).__init__(parent=parent)
self.setLayout(layout())
options = ('left', 'right')
if side.lower() not in options:
raise ValueError('Got side: "{side}" but expected an option, '
'"{opt}"'.format(side=side, opt=options))
self.button = QtWidgets.QToolButton(parent=self)
self.label = QtWidgets.QLabel(label, parent=self)
self.expand_widget = QtWidgets.QWidget(parent=self)
self.expand_widget.setLayout(self.layout().__class__())
top_layout = QtWidgets.QHBoxLayout()
if side.lower() == 'left':
top_layout.addWidget(self.button)
top_layout.addWidget(self.label)
elif side.lower() == 'right':
top_layout.addWidget(self.label)
top_layout.addWidget(self.button)
self.layout().addLayout(top_layout)
self.layout().addWidget(self.expand_widget)
self.init_default_settings()
self.init_interactive_settings()
def init_default_settings(self):
'''Set-up our expand/collapse button's appearance.'''
# Hide children by default
self.set_children_visible(False)
self.button.setArrowType(QtCore.Qt.RightArrow)
self.button.setToolTip('Click to expand or collapse the section below')
self.label.setToolTip('Click the expand button to show/hide widgets')
self.button.setObjectName('expand_button')
self.label.setObjectName('expand_label')
self.expand_widget.setObjectName('expand_hide_widget')
self.update_toggle_button(self.expand_widget.isVisible())
def init_interactive_settings(self):
'''Set our widget's toggle button to emit a signal when it is clicked.'''
self.button.clicked.connect(self.toggled.emit)
self.toggled.connect(self.toggle)
def add_layout(self, layout, *args, **kwargs):
'''Add Qt layout to the shown/hidden widgets.'''
self.expand_widget.layout().addLayout(layout)
def add_widget(self, widget, *args, **kwargs):
'''Add Qt widget to the shown/hidden widgets.'''
self.expand_widget.layout().addWidget(widget, *args, **kwargs)
def set_children_visible(self, visible):
'''Show/Hide the widgets contained in this object.
This method will also update all GUI-appearance related code, like
changing the button icon.
Args:
visible (bool): Show the widgets if True. Hide them if False.
'''
self.expand_widget.setVisible(visible)
self.update_toggle_button(visible)
def update_toggle_button(self, is_visible):
'''Set the show/hide section to the given value.'''
if is_visible:
self.button.setArrowType(QtCore.Qt.DownArrow)
else:
self.button.setArrowType(QtCore.Qt.RightArrow)
def toggle(self):
'''If the inner-widget section is hidden, show it, and vice-versa.'''
self.set_children_visible(not self.expand_widget.isVisible())
| [
1,
529,
276,
1112,
420,
29958,
1625,
262,
29968,
2108,
7584,
29914,
23945,
27492,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
12008,
29909,
731,
310,
2319,
11109,
29879,
393,
526,
6839,
304,
1510,
29914,
11458,
6053,
29889,
12008,
13,
13,
29937,
306,
3580,
8476,
3446,
8193,
29928,
29899,
26092,
29979,
365,
8979,
29934,
1718,
29059,
13,
3166,
14705,
1053,
14705,
8801,
29879,
13,
3166,
14705,
1053,
14705,
9203,
13,
13,
13,
1990,
12027,
392,
1625,
13938,
8801,
29898,
17303,
8801,
29879,
29889,
29984,
8801,
1125,
13,
13,
1678,
14550,
29909,
376,
4294,
29914,
11458,
29908,
11109,
607,
13246,
322,
4694,
267,
3528,
29889,
13,
13,
1678,
739,
1736,
491,
4969,
385,
6426,
11109,
607,
338,
7934,
491,
2322,
607,
366,
13,
1678,
508,
7985,
29914,
27756,
773,
376,
13270,
29908,
470,
376,
842,
29918,
11991,
29918,
12872,
1642,
1763,
788,
596,
13,
1678,
11109,
29879,
304,
278,
4004,
393,
3697,
29914,
29882,
2247,
3528,
29892,
671,
376,
1202,
29918,
2680,
29908,
470,
13,
1678,
376,
1202,
29918,
8030,
1642,
13,
13,
1678,
14550,
13,
13,
1678,
17304,
839,
353,
14705,
9203,
29889,
10140,
284,
580,
13,
13,
1678,
822,
4770,
2344,
12035,
13,
9651,
1583,
29892,
13,
9651,
3858,
2433,
742,
13,
9651,
2625,
2433,
1563,
742,
13,
9651,
5912,
29922,
17303,
8801,
29879,
29889,
29984,
29963,
3313,
3453,
29892,
13,
9651,
3847,
29922,
8516,
1125,
13,
4706,
14550,
4391,
278,
14839,
29915,
29879,
11109,
29879,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
3858,
13940,
5415,
18078,
710,
1673,
13136,
1125,
13,
18884,
319,
1734,
470,
16549,
304,
1925,
2446,
304,
278,
2826,
29889,
13,
18884,
317,
12981,
602,
29901,
376,
3253,
16858,
19215,
1642,
13109,
29901,
376,
1642,
13,
9651,
2625,
13940,
5415,
18078,
710,
1673,
13136,
1125,
13,
18884,
8449,
5305,
310,
278,
11109,
304,
2479,
278,
1510,
29914,
11458,
2826,
29889,
13,
18884,
25186,
29901,
6702,
1563,
742,
525,
1266,
2824,
13109,
29901,
525,
1563,
4286,
13,
9651,
5912,
13940,
5415,
18078,
29966,
4804,
519,
29922,
17303,
8801,
29879,
29889,
29984,
3313,
3453,
29958,
1673,
13136,
1125,
13,
18884,
450,
5912,
363,
599,
278,
11109,
29879,
393,
674,
367,
4318,
29914,
10892,
29889,
13,
18884,
13109,
29901,
525,
17303,
8801,
29879,
29889,
29984,
29963,
3313,
3453,
4286,
13,
9651,
3847,
13940,
5415,
18078,
29966,
17303,
9203,
29889,
29984,
2061,
29958,
1673,
13136,
1125,
13,
18884,
450,
14705,
29899,
6707,
6942,
1203,
29889,
13109,
338,
6213,
29889,
13,
13,
4706,
14550,
13,
4706,
2428,
29898,
29777,
1625,
13938,
8801,
29892,
1583,
467,
1649,
2344,
12035,
3560,
29922,
3560,
29897,
13,
4706,
1583,
29889,
842,
3453,
29898,
2680,
3101,
13,
13,
4706,
3987,
353,
6702,
1563,
742,
525,
1266,
1495,
13,
4706,
565,
2625,
29889,
13609,
580,
451,
297,
3987,
29901,
13,
9651,
12020,
7865,
2392,
877,
29954,
327,
2625,
29901,
29850,
2975,
5038,
541,
3806,
385,
2984,
29892,
525,
13,
462,
632,
18793,
29912,
3670,
5038,
4286,
4830,
29898,
2975,
29922,
2975,
29892,
3523,
29922,
6768,
876,
13,
13,
4706,
1583,
29889,
3092,
353,
14705,
8801,
29879,
29889,
29984,
12229,
3125,
29898,
3560,
29922,
1311,
29897,
13,
4706,
1583,
29889,
1643,
353,
14705,
8801,
29879,
29889,
2239,
1107,
29898,
1643,
29892,
3847,
29922,
1311,
29897,
13,
13,
4706,
1583,
29889,
18837,
29918,
8030,
353,
14705,
8801,
29879,
29889,
29984,
8801,
29898,
3560,
29922,
1311,
29897,
13,
4706,
1583,
29889,
18837,
29918,
8030,
29889,
842,
3453,
29898,
1311,
29889,
2680,
2141,
1649,
1990,
1649,
3101,
13,
13,
4706,
2246,
29918,
2680,
353,
14705,
8801,
29879,
29889,
29984,
29950,
3313,
3453,
580,
13,
13,
4706,
565,
2625,
29889,
13609,
580,
1275,
525,
1563,
2396,
13,
9651,
2246,
29918,
2680,
29889,
1202,
8801,
29898,
1311,
29889,
3092,
29897,
13,
9651,
2246,
29918,
2680,
29889,
1202,
8801,
29898,
1311,
29889,
1643,
29897,
13,
4706,
25342,
2625,
29889,
13609,
580,
1275,
525,
1266,
2396,
13,
9651,
2246,
29918,
2680,
29889,
1202,
8801,
29898,
1311,
29889,
1643,
29897,
13,
9651,
2246,
29918,
2680,
29889,
1202,
8801,
29898,
1311,
29889,
3092,
29897,
13,
13,
4706,
1583,
29889,
2680,
2141,
1202,
3453,
29898,
3332,
29918,
2680,
29897,
13,
4706,
1583,
29889,
2680,
2141,
1202,
8801,
29898,
1311,
29889,
18837,
29918,
8030,
29897,
13,
13,
4706,
1583,
29889,
2344,
29918,
4381,
29918,
11027,
580,
13,
4706,
1583,
29889,
2344,
29918,
1639,
4925,
29918,
11027,
580,
13,
13,
1678,
822,
2069,
29918,
4381,
29918,
11027,
29898,
1311,
1125,
13,
4706,
14550,
2697,
29899,
786,
1749,
7985,
29914,
27756,
2826,
29915,
29879,
10097,
29889,
12008,
13,
4706,
396,
379,
680,
4344,
491,
2322,
13,
4706,
1583,
29889,
842,
29918,
11991,
29918,
12872,
29898,
8824,
29897,
13,
13,
4706,
1583,
29889,
3092,
29889,
842,
1433,
798,
1542,
29898,
17303,
9203,
29889,
17303,
29889,
7341,
1433,
798,
29897,
13,
13,
4706,
1583,
29889,
3092,
29889,
842,
12229,
29911,
666,
877,
4164,
304,
7985,
470,
24382,
278,
4004,
2400,
1495,
13,
4706,
1583,
29889,
1643,
29889,
842,
12229,
29911,
666,
877,
4164,
278,
7985,
2826,
304,
1510,
29914,
11458,
11109,
29879,
1495,
13,
13,
4706,
1583,
29889,
3092,
29889,
842,
2061,
1170,
877,
18837,
29918,
3092,
1495,
13,
4706,
1583,
29889,
1643,
29889,
842,
2061,
1170,
877,
18837,
29918,
1643,
1495,
13,
4706,
1583,
29889,
18837,
29918,
8030,
29889,
842,
2061,
1170,
877,
18837,
29918,
11458,
29918,
8030,
1495,
13,
13,
4706,
1583,
29889,
5504,
29918,
13270,
29918,
3092,
29898,
1311,
29889,
18837,
29918,
8030,
29889,
275,
12911,
3101,
13,
13,
1678,
822,
2069,
29918,
1639,
4925,
29918,
11027,
29898,
1311,
1125,
13,
4706,
14550,
2697,
1749,
11109,
29915,
29879,
20429,
2826,
304,
20076,
263,
7182,
746,
372,
338,
11484,
29889,
12008,
13,
4706,
1583,
29889,
3092,
29889,
3808,
287,
29889,
6915,
29898,
1311,
29889,
29873,
468,
29887,
839,
29889,
21976,
29897,
13,
4706,
1583,
29889,
29873,
468,
29887,
839,
29889,
6915,
29898,
1311,
29889,
13270,
29897,
13,
13,
1678,
822,
788,
29918,
2680,
29898,
1311,
29892,
5912,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
14550,
2528,
14705,
5912,
304,
278,
4318,
29914,
10892,
11109,
29879,
29889,
12008,
13,
4706,
1583,
29889,
18837,
29918,
8030,
29889,
2680,
2141,
1202,
3453,
29898,
2680,
29897,
13,
13,
1678,
822,
788,
29918,
8030,
29898,
1311,
29892,
11109,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
14550,
2528,
14705,
11109,
304,
278,
4318,
29914,
10892,
11109,
29879,
29889,
12008,
13,
4706,
1583,
29889,
18837,
29918,
8030,
29889,
2680,
2141,
1202,
8801,
29898,
8030,
29892,
334,
5085,
29892,
3579,
19290,
29897,
13,
13,
1678,
822,
731,
29918,
11991,
29918,
12872,
29898,
1311,
29892,
7962,
1125,
13,
4706,
14550,
8964,
29914,
29950,
680,
278,
11109,
29879,
11122,
297,
445,
1203,
29889,
13,
13,
4706,
910,
1158,
674,
884,
2767,
599,
14839,
29899,
932,
21711,
4475,
775,
29892,
763,
13,
4706,
6480,
278,
2826,
9849,
29889,
13,
13,
4706,
826,
3174,
29901,
13,
9651,
7962,
313,
11227,
1125,
7704,
278,
11109,
29879,
565,
5852,
29889,
379,
680,
963,
565,
7700,
29889,
13,
13,
4706,
14550,
13,
4706,
1583,
29889,
18837,
29918,
8030,
29889,
842,
12911,
29898,
12872,
29897,
13,
4706,
1583,
29889,
5504,
29918,
13270,
29918,
3092,
29898,
12872,
29897,
13,
13,
1678,
822,
2767,
29918,
13270,
29918,
3092,
29898,
1311,
29892,
338,
29918,
12872,
1125,
13,
4706,
14550,
2697,
278,
1510,
29914,
11458,
4004,
304,
278,
2183,
995,
29889,
12008,
13,
4706,
565,
338,
29918,
12872,
29901,
13,
9651,
1583,
29889,
3092,
29889,
842,
1433,
798,
1542,
29898,
17303,
9203,
29889,
17303,
29889,
6767,
1433,
798,
29897,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
3092,
29889,
842,
1433,
798,
1542,
29898,
17303,
9203,
29889,
17303,
29889,
7341,
1433,
798,
29897,
13,
13,
1678,
822,
20429,
29898,
1311,
1125,
13,
4706,
14550,
3644,
278,
6426,
29899,
8030,
4004,
338,
7934,
29892,
1510,
372,
29892,
322,
11289,
29899,
874,
29874,
29889,
12008,
13,
4706,
1583,
29889,
842,
29918,
11991,
29918,
12872,
29898,
1333,
1583,
29889,
18837,
29918,
8030,
29889,
275,
12911,
3101,
13,
2
] |
tools/benchmark/do_not_run_create_benchmark_data.py | dangervon/ironic | 0 | 37718 | <gh_stars>0
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import sys
import time
from oslo_db.sqlalchemy import enginefacade
from sqlalchemy import sql
from ironic.common import service
from ironic.conf import CONF # noqa To Load Configuration
from ironic.objects import node
def _create_test_nodes():
print("Starting creation of fake nodes.")
start = time.time()
node_count = 10000
checkin = time.time()
for i in range(0, node_count):
new_node = node.Node({
'power_state': 'power off',
'driver': 'ipmi',
'driver_internal_info': {'test-meow': i},
'name': 'BenchmarkTestNode-%s' % i,
'driver_info': {
'ipmi_username': 'admin',
'ipmi_password': '<PASSWORD>',
'ipmi_address': 'testhost%s.env.top.level.domain' % i},
'resource_class': 'CUSTOM_BAREMETAL',
'properties': {
'cpu': 4,
'memory': 32,
'cats': i,
'meowing': True}})
new_node.create()
delta = time.time() - checkin
if delta > 10:
checkin = time.time()
print('* At %s nodes, %0.02f seconds. Total elapsed: %s'
% (i, delta, time.time() - start))
created = time.time()
elapse = created - start
print('Created %s nodes in %s seconds.\n' % (node_count, elapse))
def _mix_up_nodes_data():
engine = enginefacade.writer.get_engine()
conn = engine.connect()
# A list of commands to mix up indexed field data a bit to emulate what
# a production database may somewhat look like.
commands = [
"UPDATE nodes set maintenance = True where RAND() < 0.1", # noqa Easier to read this way
"UPDATE nodes set driver = 'redfish' where RAND() < 0.5", # noqa Easier to read this way
"UPDATE nodes set reservation = 'fake_conductor01' where RAND() < 0.02", # noqa Easier to read this way
"UPDATE nodes set reservation = 'fake_conductor02' where RAND() < 0.02", # noqa Easier to read this way
"UPDATE nodes set reservation = 'fake_conductor03' where RAND() < 0.02", # noqa Easier to read this way
"UPDATE nodes set reservation = 'fake_conductor04' where RAND() < 0.02", # noqa Easier to read this way
"UPDATE nodes set reservation = 'fake_conductor05' where RAND() < 0.02", # noqa Easier to read this way
"UPDATE nodes set reservation = 'fake_conductor06' where RAND() < 0.02", # noqa Easier to read this way
"UPDATE nodes set provision_state = 'active' where RAND() < 0.8", # noqa Easier to read this way
"UPDATE nodes set power_state = 'power on' where provision_state = 'active' and RAND() < 0.95", # noqa Easier to read this way
"UPDATE nodes set provision_state = 'available' where RAND() < 0.1", # noqa Easier to read this way
"UPDATE nodes set provision_state = 'manageable' where RAND() < 0.1", # noqa Easier to read this way
"UPDATE nodes set provision_state = 'clean wait' where RAND() < 0.05", # noqa Easier to read this way
"UPDATE nodes set provision_state = 'error' where RAND() < 0.05", # noqa Easier to read this way
"UPDATE nodes set owner = (select UUID()) where RAND() < 0.2", # noqa Easier to read this way
"UPDATE nodes set lessee = (select UUID()) where RAND() < 0.2", # noqa Easier to read this way
"UPDATE nodes set instance_uuid = (select UUID()) where RAND() < 0.95 and provision_state = 'active'", # noqa Easier to read this way
"UPDATE nodes set last_error = (select UUID()) where RAND() <0.05", # noqa Easier to read this way
]
start = time.time()
for command in commands:
print("Executing SQL command: \\" + command + ";\n")
conn.execute(sql.text(command))
print("* Completed command. %0.04f elapsed since start of commands."
% (time.time() - start))
def main():
service.prepare_command()
CONF.set_override('debug', False)
_create_test_nodes()
if __name__ == '__main__':
sys.exit(main())
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
13,
29937,
1678,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
366,
1122,
13,
29937,
1678,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
887,
1122,
4017,
13,
29937,
1678,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
308,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
29937,
13,
29937,
1678,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
1678,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
399,
1806,
8187,
2692,
13,
29937,
1678,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
2823,
278,
13,
29937,
1678,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
27028,
13,
29937,
1678,
1090,
278,
19245,
29889,
13,
13,
5215,
10876,
13,
5215,
931,
13,
13,
3166,
2897,
417,
29918,
2585,
29889,
2850,
284,
305,
6764,
1053,
6012,
17470,
1943,
13,
3166,
4576,
284,
305,
6764,
1053,
4576,
13,
13,
3166,
3805,
8927,
29889,
9435,
1053,
2669,
13,
3166,
3805,
8927,
29889,
5527,
1053,
8707,
29943,
29871,
396,
694,
25621,
1763,
16012,
20999,
13,
3166,
3805,
8927,
29889,
12650,
1053,
2943,
13,
13,
13,
1753,
903,
3258,
29918,
1688,
29918,
18010,
7295,
13,
1678,
1596,
703,
4763,
292,
11265,
310,
25713,
7573,
23157,
13,
1678,
1369,
353,
931,
29889,
2230,
580,
13,
1678,
2943,
29918,
2798,
353,
29871,
29896,
29900,
29900,
29900,
29900,
13,
1678,
1423,
262,
353,
931,
29889,
2230,
580,
13,
1678,
363,
474,
297,
3464,
29898,
29900,
29892,
2943,
29918,
2798,
1125,
13,
13,
4706,
716,
29918,
3177,
353,
2943,
29889,
4247,
3319,
13,
9651,
525,
13519,
29918,
3859,
2396,
525,
13519,
1283,
742,
13,
9651,
525,
9465,
2396,
525,
666,
2460,
742,
13,
9651,
525,
9465,
29918,
7564,
29918,
3888,
2396,
11117,
1688,
29899,
1004,
340,
2396,
474,
1118,
13,
9651,
525,
978,
2396,
525,
20841,
16580,
3057,
4247,
19222,
29879,
29915,
1273,
474,
29892,
13,
9651,
525,
9465,
29918,
3888,
2396,
426,
13,
18884,
525,
666,
2460,
29918,
6786,
2396,
525,
6406,
742,
13,
18884,
525,
666,
2460,
29918,
5630,
2396,
12801,
25711,
17013,
29958,
742,
13,
18884,
525,
666,
2460,
29918,
7328,
2396,
525,
1688,
3069,
29995,
29879,
29889,
6272,
29889,
3332,
29889,
5563,
29889,
7247,
29915,
1273,
474,
1118,
13,
9651,
525,
10314,
29918,
1990,
2396,
525,
29907,
17321,
6488,
29918,
5688,
1525,
2303,
29911,
1964,
742,
13,
9651,
525,
11330,
2396,
426,
13,
18884,
525,
21970,
2396,
29871,
29946,
29892,
13,
18884,
525,
14834,
2396,
29871,
29941,
29906,
29892,
13,
18884,
525,
29883,
1446,
2396,
474,
29892,
13,
18884,
525,
1004,
340,
292,
2396,
5852,
24289,
13,
4706,
716,
29918,
3177,
29889,
3258,
580,
13,
4706,
19471,
353,
931,
29889,
2230,
580,
448,
1423,
262,
13,
4706,
565,
19471,
1405,
29871,
29896,
29900,
29901,
13,
9651,
1423,
262,
353,
931,
29889,
2230,
580,
13,
9651,
1596,
877,
29930,
2180,
1273,
29879,
7573,
29892,
1273,
29900,
29889,
29900,
29906,
29888,
6923,
29889,
14990,
560,
28170,
29901,
1273,
29879,
29915,
13,
462,
29871,
1273,
313,
29875,
29892,
19471,
29892,
931,
29889,
2230,
580,
448,
1369,
876,
13,
1678,
2825,
353,
931,
29889,
2230,
580,
13,
1678,
560,
481,
344,
353,
2825,
448,
1369,
13,
1678,
1596,
877,
20399,
1273,
29879,
7573,
297,
1273,
29879,
6923,
7790,
29876,
29915,
1273,
313,
3177,
29918,
2798,
29892,
560,
481,
344,
876,
13,
13,
13,
1753,
903,
28084,
29918,
786,
29918,
18010,
29918,
1272,
7295,
13,
1678,
6012,
353,
6012,
17470,
1943,
29889,
13236,
29889,
657,
29918,
10599,
580,
13,
1678,
11009,
353,
6012,
29889,
6915,
580,
13,
13,
1678,
396,
319,
1051,
310,
8260,
304,
6837,
701,
27541,
1746,
848,
263,
2586,
304,
953,
5987,
825,
13,
1678,
396,
263,
5802,
2566,
1122,
10579,
1106,
763,
29889,
13,
1678,
8260,
353,
518,
13,
4706,
376,
14474,
7573,
731,
25413,
353,
5852,
988,
390,
9468,
580,
529,
29871,
29900,
29889,
29896,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
4706,
376,
14474,
7573,
731,
7156,
353,
525,
1127,
15161,
29915,
988,
390,
9468,
580,
529,
29871,
29900,
29889,
29945,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
4706,
376,
14474,
7573,
731,
620,
20525,
353,
525,
29888,
1296,
29918,
535,
2199,
272,
29900,
29896,
29915,
988,
390,
9468,
580,
529,
29871,
29900,
29889,
29900,
29906,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
4706,
376,
14474,
7573,
731,
620,
20525,
353,
525,
29888,
1296,
29918,
535,
2199,
272,
29900,
29906,
29915,
988,
390,
9468,
580,
529,
29871,
29900,
29889,
29900,
29906,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
4706,
376,
14474,
7573,
731,
620,
20525,
353,
525,
29888,
1296,
29918,
535,
2199,
272,
29900,
29941,
29915,
988,
390,
9468,
580,
529,
29871,
29900,
29889,
29900,
29906,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
4706,
376,
14474,
7573,
731,
620,
20525,
353,
525,
29888,
1296,
29918,
535,
2199,
272,
29900,
29946,
29915,
988,
390,
9468,
580,
529,
29871,
29900,
29889,
29900,
29906,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
4706,
376,
14474,
7573,
731,
620,
20525,
353,
525,
29888,
1296,
29918,
535,
2199,
272,
29900,
29945,
29915,
988,
390,
9468,
580,
529,
29871,
29900,
29889,
29900,
29906,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
4706,
376,
14474,
7573,
731,
620,
20525,
353,
525,
29888,
1296,
29918,
535,
2199,
272,
29900,
29953,
29915,
988,
390,
9468,
580,
529,
29871,
29900,
29889,
29900,
29906,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
4706,
376,
14474,
7573,
731,
25161,
29918,
3859,
353,
525,
4925,
29915,
988,
390,
9468,
580,
529,
29871,
29900,
29889,
29947,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
4706,
376,
14474,
7573,
731,
3081,
29918,
3859,
353,
525,
13519,
373,
29915,
988,
25161,
29918,
3859,
353,
525,
4925,
29915,
322,
390,
9468,
580,
529,
29871,
29900,
29889,
29929,
29945,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
4706,
376,
14474,
7573,
731,
25161,
29918,
3859,
353,
525,
16515,
29915,
988,
390,
9468,
580,
529,
29871,
29900,
29889,
29896,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
4706,
376,
14474,
7573,
731,
25161,
29918,
3859,
353,
525,
1171,
482,
519,
29915,
988,
390,
9468,
580,
529,
29871,
29900,
29889,
29896,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
4706,
376,
14474,
7573,
731,
25161,
29918,
3859,
353,
525,
14941,
4480,
29915,
988,
390,
9468,
580,
529,
29871,
29900,
29889,
29900,
29945,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
4706,
376,
14474,
7573,
731,
25161,
29918,
3859,
353,
525,
2704,
29915,
988,
390,
9468,
580,
529,
29871,
29900,
29889,
29900,
29945,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
4706,
376,
14474,
7573,
731,
12271,
353,
313,
2622,
501,
11150,
3101,
988,
390,
9468,
580,
529,
29871,
29900,
29889,
29906,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
4706,
376,
14474,
7573,
731,
966,
4149,
353,
313,
2622,
501,
11150,
3101,
988,
390,
9468,
580,
529,
29871,
29900,
29889,
29906,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
4706,
376,
14474,
7573,
731,
2777,
29918,
25118,
353,
313,
2622,
501,
11150,
3101,
988,
390,
9468,
580,
529,
29871,
29900,
29889,
29929,
29945,
322,
25161,
29918,
3859,
353,
525,
4925,
29915,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
4706,
376,
14474,
7573,
731,
1833,
29918,
2704,
353,
313,
2622,
501,
11150,
3101,
988,
390,
9468,
580,
529,
29900,
29889,
29900,
29945,
613,
29871,
396,
694,
25621,
382,
294,
631,
304,
1303,
445,
982,
13,
1678,
4514,
13,
1678,
1369,
353,
931,
29889,
2230,
580,
13,
1678,
363,
1899,
297,
8260,
29901,
13,
4706,
1596,
703,
5379,
17068,
3758,
1899,
29901,
2474,
29908,
718,
1899,
718,
376,
10436,
29876,
1159,
13,
4706,
11009,
29889,
7978,
29898,
2850,
29889,
726,
29898,
6519,
876,
13,
4706,
1596,
703,
29930,
15642,
9446,
1899,
29889,
1273,
29900,
29889,
29900,
29946,
29888,
560,
28170,
1951,
1369,
310,
8260,
1213,
13,
795,
1273,
313,
2230,
29889,
2230,
580,
448,
1369,
876,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
2669,
29889,
19125,
29918,
6519,
580,
13,
1678,
8707,
29943,
29889,
842,
29918,
15752,
877,
8382,
742,
7700,
29897,
13,
1678,
903,
3258,
29918,
1688,
29918,
18010,
580,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
10876,
29889,
13322,
29898,
3396,
3101,
13,
2
] |
j24/learn.py | juhi24/j24py | 0 | 58409 | <filename>j24/learn.py<gh_stars>0
# coding: utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
__metaclass__ = type
import pandas as pd
import matplotlib.pyplot as plt
def fit_predict(t, km):
km.fit(t.T)
classes = pd.Series(data=km.predict(t.T), index=t.columns)
return classes
def centroids(t, km):
"""cluster centroids as DataFrame"""
return pd.DataFrame(km.cluster_centers_.T, index=t.index)
def class_fraction(classes):
"""occurrence fraction of each cluster"""
counts = classes.groupby(classes).count()
return counts/classes.count()
def normalized_class_sizes(classes):
"""cluster sizes normalized around 1"""
return class_fraction(classes)*classes.unique().size
def pca_stats(pca):
with plt.style.context('fivethirtyeight'):
plt.figure();
plt.title('Explained variance ratio over component');
plt.plot(pca.explained_variance_ratio_);
plt.figure();
plt.title('Cumulative explained variance over component');
plt.plot(pca.explained_variance_ratio_.cumsum());
print('PCA captures {:.2f}% of the variance in the dataset.'.format(pca.explained_variance_ratio_.sum() * 100))
| [
1,
529,
9507,
29958,
29926,
29906,
29946,
29914,
19668,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
8542,
29892,
1596,
29918,
2220,
29892,
29104,
29918,
20889,
1338,
13,
1649,
2527,
562,
605,
1649,
353,
1134,
13,
13,
5215,
11701,
408,
10518,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
13,
13,
1753,
6216,
29918,
27711,
29898,
29873,
29892,
2383,
1125,
13,
1678,
2383,
29889,
9202,
29898,
29873,
29889,
29911,
29897,
13,
1678,
4413,
353,
10518,
29889,
19204,
29898,
1272,
29922,
8848,
29889,
27711,
29898,
29873,
29889,
29911,
511,
2380,
29922,
29873,
29889,
13099,
29897,
13,
1678,
736,
4413,
13,
13,
13,
1753,
1644,
1007,
29879,
29898,
29873,
29892,
2383,
1125,
13,
1678,
9995,
19594,
1644,
1007,
29879,
408,
3630,
4308,
15945,
29908,
13,
1678,
736,
10518,
29889,
17271,
29898,
8848,
29889,
19594,
29918,
1760,
414,
5396,
29911,
29892,
2380,
29922,
29873,
29889,
2248,
29897,
13,
13,
13,
1753,
770,
29918,
29888,
13857,
29898,
13203,
1125,
13,
1678,
9995,
15693,
26841,
15958,
310,
1269,
9867,
15945,
29908,
13,
1678,
18139,
353,
4413,
29889,
27789,
29898,
13203,
467,
2798,
580,
13,
1678,
736,
18139,
29914,
13203,
29889,
2798,
580,
13,
13,
13,
1753,
4226,
1891,
29918,
1990,
29918,
29879,
7093,
29898,
13203,
1125,
13,
1678,
9995,
19594,
15786,
4226,
1891,
2820,
29871,
29896,
15945,
29908,
13,
1678,
736,
770,
29918,
29888,
13857,
29898,
13203,
11877,
13203,
29889,
13092,
2141,
2311,
13,
13,
13,
1753,
282,
1113,
29918,
16202,
29898,
29886,
1113,
1125,
13,
1678,
411,
14770,
29889,
3293,
29889,
4703,
877,
29888,
440,
621,
13163,
29872,
523,
29374,
13,
4706,
14770,
29889,
4532,
890,
13,
4706,
14770,
29889,
3257,
877,
9544,
433,
1312,
20162,
11959,
975,
4163,
2157,
13,
4706,
14770,
29889,
5317,
29898,
29886,
1113,
29889,
4548,
433,
1312,
29918,
1707,
8837,
29918,
3605,
601,
29918,
416,
13,
4706,
14770,
29889,
4532,
890,
13,
4706,
14770,
29889,
3257,
877,
29907,
398,
28524,
10824,
20162,
975,
4163,
2157,
13,
4706,
14770,
29889,
5317,
29898,
29886,
1113,
29889,
4548,
433,
1312,
29918,
1707,
8837,
29918,
3605,
601,
5396,
29883,
398,
2083,
3310,
13,
1678,
1596,
877,
29925,
5454,
4332,
1973,
12365,
29889,
29906,
29888,
10560,
310,
278,
20162,
297,
278,
8783,
29889,
4286,
4830,
29898,
29886,
1113,
29889,
4548,
433,
1312,
29918,
1707,
8837,
29918,
3605,
601,
5396,
2083,
580,
334,
29871,
29896,
29900,
29900,
876,
13,
2
] |
ocellaris/__init__.py | TormodLandet/Ocellaris | 1 | 58956 | # Copyright (C) 2015-2019 <NAME>
# SPDX-License-Identifier: Apache-2.0
# Check for presence of FEniCS etc
from .verify_environment import verify_env
verify_env()
__version__ = '2019.0.2'
# This should potentially be made local to the mesh creation routines
import dolfin
dolfin.parameters['ghost_mode'] = 'shared_vertex'
del dolfin
def get_version():
"""
Return the version number of Ocellaris
"""
return __version__
def get_detailed_version():
"""
Return the version number of Ocellaris including
source control commit revision information
"""
import os
import subprocess
this_dir = os.path.dirname(os.path.abspath(__file__))
proj_dir = os.path.abspath(os.path.join(this_dir, '..'))
if os.path.isdir(os.path.join(proj_dir, '.git')):
cmd = ['git', 'describe', '--always']
version = subprocess.check_output(cmd, cwd=proj_dir)
local_version = '+git.' + version.decode('utf8').strip()
else:
local_version = ''
return get_version() + local_version
# Convenience imports for scripting
from .simulation import Simulation
from .run import setup_simulation, run_simulation
| [
1,
396,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29945,
29899,
29906,
29900,
29896,
29929,
529,
5813,
29958,
13,
29937,
10937,
29928,
29990,
29899,
29931,
293,
1947,
29899,
12889,
29901,
13380,
29899,
29906,
29889,
29900,
13,
13,
29937,
5399,
363,
10122,
310,
383,
29923,
1240,
9295,
2992,
13,
3166,
869,
27902,
29918,
20944,
1053,
11539,
29918,
6272,
13,
13,
27902,
29918,
6272,
580,
13,
13,
13,
1649,
3259,
1649,
353,
525,
29906,
29900,
29896,
29929,
29889,
29900,
29889,
29906,
29915,
13,
13,
13,
29937,
910,
881,
19998,
367,
1754,
1887,
304,
278,
27716,
11265,
6745,
1475,
13,
5215,
270,
4369,
262,
13,
13,
29881,
4369,
262,
29889,
16744,
1839,
29887,
3069,
29918,
8513,
2033,
353,
525,
12366,
29918,
369,
4776,
29915,
13,
6144,
270,
4369,
262,
13,
13,
13,
1753,
679,
29918,
3259,
7295,
13,
1678,
9995,
13,
1678,
7106,
278,
1873,
1353,
310,
438,
3729,
12260,
13,
1678,
9995,
13,
1678,
736,
4770,
3259,
1649,
13,
13,
13,
1753,
679,
29918,
29881,
11881,
29918,
3259,
7295,
13,
1678,
9995,
13,
1678,
7106,
278,
1873,
1353,
310,
438,
3729,
12260,
3704,
13,
1678,
2752,
2761,
9063,
26554,
2472,
13,
1678,
9995,
13,
1678,
1053,
2897,
13,
1678,
1053,
1014,
5014,
13,
13,
1678,
445,
29918,
3972,
353,
2897,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
370,
1028,
493,
22168,
1445,
1649,
876,
13,
1678,
410,
29926,
29918,
3972,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1366,
29918,
3972,
29892,
525,
636,
8785,
13,
1678,
565,
2897,
29889,
2084,
29889,
275,
3972,
29898,
359,
29889,
2084,
29889,
7122,
29898,
20865,
29918,
3972,
29892,
15300,
5559,
8785,
29901,
13,
4706,
9920,
353,
6024,
5559,
742,
525,
2783,
29581,
742,
525,
489,
21936,
2033,
13,
4706,
1873,
353,
1014,
5014,
29889,
3198,
29918,
4905,
29898,
9006,
29892,
274,
9970,
29922,
20865,
29918,
3972,
29897,
13,
4706,
1887,
29918,
3259,
353,
525,
29974,
5559,
6169,
718,
1873,
29889,
13808,
877,
9420,
29947,
2824,
17010,
580,
13,
1678,
1683,
29901,
13,
4706,
1887,
29918,
3259,
353,
6629,
13,
1678,
736,
679,
29918,
3259,
580,
718,
1887,
29918,
3259,
13,
13,
13,
29937,
1281,
854,
5597,
24802,
363,
2471,
292,
13,
3166,
869,
3601,
2785,
1053,
3439,
2785,
13,
3166,
869,
3389,
1053,
6230,
29918,
3601,
2785,
29892,
1065,
29918,
3601,
2785,
13,
2
] |
main_app/app.py | johncoleman83/AirBnB | 2 | 1610911 | #!/usr/bin/python3
"""
Flask App that integrates with AirBnB static HTML Template
"""
from flask import Flask, render_template, request, url_for
import json
from models import storage
import requests
from uuid import uuid4
# flask setup
app = Flask(__name__)
app.url_map.strict_slashes = False
port = 8000
host = '0.0.0.0'
# begin flask page rendering
@app.teardown_appcontext
def teardown_db(exception):
"""
after each request, this method calls .close() (i.e. .remove()) on
the current SQLAlchemy Session
"""
storage.close()
@app.route('/', methods=['GET', 'POST'])
def main_index():
"""
handles request to main index, currently a login page
"""
cache_id = uuid4()
if request.method == 'GET':
return render_template('index.html', cache_id=cache_id, message=None)
if request.method == 'POST':
email = request.form.get('email', None)
password = request.form.get('password', None)
payload = {
'email': email,
'password': password
}
headers = {
'content-type': 'application/json'
}
action = request.form.get('action')
if action == 'login':
url = 'http://0.0.0.0:5001/auth/login'
elif action == 'signup':
url = 'http://0.0.0.0:5001/auth/register'
else:
auth_token = request.form.get('logout')
return logout(auth_token=auth_token)
r = requests.post(url, headers=headers,
data=json.dumps(payload))
r_data = r.json()
if r_data.get('error'):
return render_template('index.html',
cache_id=cache_id,
message=r_data.get('error'))
auth_token = r_data.get('auth_token')
if auth_token is None:
return render_template('index.html',
cache_id=cache_id,
message=r_data.get('error'))
if 'register' in url:
signup_message = 'thank you for signing up'
return render_template('index.html',
cache_id=cache_id,
message=signup_message)
state_objs = storage.all('State').values()
states = dict([state.name, state] for state in state_objs)
amens = list(storage.all('Amenity').values())
cache_id = uuid4()
return render_template('places.html', cache_id=cache_id, states=states,
amens=amens, auth_token=auth_token)
@app.route('/logout', methods=['GET', 'POST'])
def logout(auth_token=None):
"""
handles request to main index, currently a login page
"""
if request.method == 'GET':
cache_id =uuid4()
return render_template('404.html', cache_id=cache_id), 404
cache_id = uuid4()
if auth_token is None:
auth_token = request.form.get('logout')
headers = {
'content-type': 'application/json',
'Authorization': 'Bearer {}'.format(auth_token)
}
url = 'http://0.0.0.0:5001/auth/logout'
r = requests.post(url, headers=headers)
r_data = r.json()
if r_data.get('error'):
return render_template('index.html',
cache_id=cach_id,
message=r_data.get('error'))
message = 'You are now logged out.'
cache_id = uuid4()
return render_template('index.html',
cache_id=cache_id,
message=message)
@app.errorhandler(404)
def page_not_found(error):
"""
404 Error Handler
"""
cache_id = uuid4()
return render_template('404.html', cache_id=cache_id), 404
if __name__ == "__main__":
"""
MAIN Flask App
"""
app.run(host=host, port=port)
| [
1,
18787,
4855,
29914,
2109,
29914,
4691,
29941,
13,
15945,
29908,
13,
8754,
1278,
2401,
393,
3990,
1078,
411,
5593,
29933,
29876,
29933,
2294,
4544,
25663,
13,
15945,
29908,
13,
3166,
29784,
1053,
2379,
1278,
29892,
4050,
29918,
6886,
29892,
2009,
29892,
3142,
29918,
1454,
13,
5215,
4390,
13,
3166,
4733,
1053,
8635,
13,
5215,
7274,
13,
3166,
318,
5416,
1053,
318,
5416,
29946,
13,
13,
13,
29937,
29784,
6230,
13,
932,
353,
2379,
1278,
22168,
978,
1649,
29897,
13,
932,
29889,
2271,
29918,
1958,
29889,
710,
919,
29918,
17057,
267,
353,
7700,
13,
637,
353,
29871,
29947,
29900,
29900,
29900,
13,
3069,
353,
525,
29900,
29889,
29900,
29889,
29900,
29889,
29900,
29915,
13,
13,
13,
29937,
3380,
29784,
1813,
15061,
13,
29992,
932,
29889,
371,
538,
776,
29918,
932,
4703,
13,
1753,
734,
538,
776,
29918,
2585,
29898,
11739,
1125,
13,
1678,
9995,
13,
1678,
1156,
1269,
2009,
29892,
445,
1158,
5717,
869,
5358,
580,
313,
29875,
29889,
29872,
29889,
869,
5992,
3101,
373,
13,
1678,
278,
1857,
3758,
2499,
305,
6764,
16441,
13,
1678,
9995,
13,
1678,
8635,
29889,
5358,
580,
13,
13,
13,
29992,
932,
29889,
13134,
11219,
742,
3519,
29922,
1839,
7194,
742,
525,
5438,
11287,
13,
1753,
1667,
29918,
2248,
7295,
13,
1678,
9995,
13,
1678,
17766,
2009,
304,
1667,
2380,
29892,
5279,
263,
6464,
1813,
13,
1678,
9995,
13,
1678,
7090,
29918,
333,
353,
318,
5416,
29946,
580,
13,
1678,
565,
2009,
29889,
5696,
1275,
525,
7194,
2396,
13,
4706,
736,
4050,
29918,
6886,
877,
2248,
29889,
1420,
742,
7090,
29918,
333,
29922,
8173,
29918,
333,
29892,
2643,
29922,
8516,
29897,
13,
1678,
565,
2009,
29889,
5696,
1275,
525,
5438,
2396,
13,
4706,
4876,
353,
2009,
29889,
689,
29889,
657,
877,
5269,
742,
6213,
29897,
13,
4706,
4800,
353,
2009,
29889,
689,
29889,
657,
877,
5630,
742,
6213,
29897,
13,
4706,
20092,
353,
426,
13,
9651,
525,
5269,
2396,
4876,
29892,
13,
9651,
525,
5630,
2396,
4800,
13,
4706,
500,
13,
4706,
9066,
353,
426,
13,
9651,
525,
3051,
29899,
1853,
2396,
525,
6214,
29914,
3126,
29915,
13,
4706,
500,
13,
4706,
3158,
353,
2009,
29889,
689,
29889,
657,
877,
2467,
1495,
13,
4706,
565,
3158,
1275,
525,
7507,
2396,
13,
9651,
3142,
353,
525,
1124,
597,
29900,
29889,
29900,
29889,
29900,
29889,
29900,
29901,
29945,
29900,
29900,
29896,
29914,
5150,
29914,
7507,
29915,
13,
4706,
25342,
3158,
1275,
525,
4530,
786,
2396,
13,
9651,
3142,
353,
525,
1124,
597,
29900,
29889,
29900,
29889,
29900,
29889,
29900,
29901,
29945,
29900,
29900,
29896,
29914,
5150,
29914,
9573,
29915,
13,
4706,
1683,
29901,
13,
9651,
4817,
29918,
6979,
353,
2009,
29889,
689,
29889,
657,
877,
1188,
449,
1495,
13,
9651,
736,
1480,
449,
29898,
5150,
29918,
6979,
29922,
5150,
29918,
6979,
29897,
13,
4706,
364,
353,
7274,
29889,
2490,
29898,
2271,
29892,
9066,
29922,
13662,
29892,
13,
462,
3986,
848,
29922,
3126,
29889,
29881,
17204,
29898,
23813,
876,
13,
4706,
364,
29918,
1272,
353,
364,
29889,
3126,
580,
13,
4706,
565,
364,
29918,
1272,
29889,
657,
877,
2704,
29374,
13,
9651,
736,
4050,
29918,
6886,
877,
2248,
29889,
1420,
742,
13,
462,
462,
259,
7090,
29918,
333,
29922,
8173,
29918,
333,
29892,
13,
462,
462,
259,
2643,
29922,
29878,
29918,
1272,
29889,
657,
877,
2704,
8785,
13,
4706,
4817,
29918,
6979,
353,
364,
29918,
1272,
29889,
657,
877,
5150,
29918,
6979,
1495,
13,
4706,
565,
4817,
29918,
6979,
338,
6213,
29901,
13,
9651,
736,
4050,
29918,
6886,
877,
2248,
29889,
1420,
742,
13,
462,
462,
259,
7090,
29918,
333,
29922,
8173,
29918,
333,
29892,
13,
462,
462,
259,
2643,
29922,
29878,
29918,
1272,
29889,
657,
877,
2704,
8785,
13,
4706,
565,
525,
9573,
29915,
297,
3142,
29901,
13,
9651,
1804,
786,
29918,
4906,
353,
525,
386,
804,
366,
363,
26188,
701,
29915,
13,
9651,
736,
4050,
29918,
6886,
877,
2248,
29889,
1420,
742,
13,
462,
462,
259,
7090,
29918,
333,
29922,
8173,
29918,
333,
29892,
13,
462,
462,
259,
2643,
29922,
4530,
786,
29918,
4906,
29897,
13,
4706,
2106,
29918,
711,
1315,
353,
8635,
29889,
497,
877,
2792,
2824,
5975,
580,
13,
4706,
5922,
353,
9657,
4197,
3859,
29889,
978,
29892,
2106,
29962,
363,
2106,
297,
2106,
29918,
711,
1315,
29897,
13,
4706,
626,
575,
353,
1051,
29898,
12925,
29889,
497,
877,
29909,
1527,
537,
2824,
5975,
3101,
13,
4706,
7090,
29918,
333,
353,
318,
5416,
29946,
580,
13,
4706,
736,
4050,
29918,
6886,
877,
29886,
6048,
29889,
1420,
742,
7090,
29918,
333,
29922,
8173,
29918,
333,
29892,
5922,
29922,
28631,
29892,
13,
462,
1669,
626,
575,
29922,
314,
575,
29892,
4817,
29918,
6979,
29922,
5150,
29918,
6979,
29897,
13,
13,
13,
29992,
932,
29889,
13134,
11219,
1188,
449,
742,
3519,
29922,
1839,
7194,
742,
525,
5438,
11287,
13,
1753,
1480,
449,
29898,
5150,
29918,
6979,
29922,
8516,
1125,
13,
1678,
9995,
13,
1678,
17766,
2009,
304,
1667,
2380,
29892,
5279,
263,
6464,
1813,
13,
1678,
9995,
13,
1678,
565,
2009,
29889,
5696,
1275,
525,
7194,
2396,
13,
4706,
7090,
29918,
333,
353,
25118,
29946,
580,
13,
4706,
736,
4050,
29918,
6886,
877,
29946,
29900,
29946,
29889,
1420,
742,
7090,
29918,
333,
29922,
8173,
29918,
333,
511,
29871,
29946,
29900,
29946,
13,
1678,
7090,
29918,
333,
353,
318,
5416,
29946,
580,
13,
1678,
565,
4817,
29918,
6979,
338,
6213,
29901,
13,
4706,
4817,
29918,
6979,
353,
2009,
29889,
689,
29889,
657,
877,
1188,
449,
1495,
13,
1678,
9066,
353,
426,
13,
4706,
525,
3051,
29899,
1853,
2396,
525,
6214,
29914,
3126,
742,
13,
4706,
525,
25471,
2396,
525,
29933,
799,
261,
6571,
4286,
4830,
29898,
5150,
29918,
6979,
29897,
13,
1678,
500,
13,
1678,
3142,
353,
525,
1124,
597,
29900,
29889,
29900,
29889,
29900,
29889,
29900,
29901,
29945,
29900,
29900,
29896,
29914,
5150,
29914,
1188,
449,
29915,
13,
1678,
364,
353,
7274,
29889,
2490,
29898,
2271,
29892,
9066,
29922,
13662,
29897,
13,
1678,
364,
29918,
1272,
353,
364,
29889,
3126,
580,
13,
1678,
565,
364,
29918,
1272,
29889,
657,
877,
2704,
29374,
13,
4706,
736,
4050,
29918,
6886,
877,
2248,
29889,
1420,
742,
13,
462,
1669,
7090,
29918,
333,
29922,
29883,
496,
29918,
333,
29892,
13,
462,
1669,
2643,
29922,
29878,
29918,
1272,
29889,
657,
877,
2704,
8785,
13,
1678,
2643,
353,
525,
3492,
526,
1286,
13817,
714,
6169,
13,
1678,
7090,
29918,
333,
353,
318,
5416,
29946,
580,
13,
1678,
736,
4050,
29918,
6886,
877,
2248,
29889,
1420,
742,
13,
462,
965,
7090,
29918,
333,
29922,
8173,
29918,
333,
29892,
13,
462,
965,
2643,
29922,
4906,
29897,
13,
13,
13,
29992,
932,
29889,
2704,
13789,
29898,
29946,
29900,
29946,
29897,
13,
1753,
1813,
29918,
1333,
29918,
11940,
29898,
2704,
1125,
13,
1678,
9995,
13,
268,
29946,
29900,
29946,
4829,
5166,
1358,
13,
1678,
9995,
13,
1678,
7090,
29918,
333,
353,
318,
5416,
29946,
580,
13,
1678,
736,
4050,
29918,
6886,
877,
29946,
29900,
29946,
29889,
1420,
742,
7090,
29918,
333,
29922,
8173,
29918,
333,
511,
29871,
29946,
29900,
29946,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
9995,
13,
1678,
14861,
1177,
2379,
1278,
2401,
13,
1678,
9995,
13,
1678,
623,
29889,
3389,
29898,
3069,
29922,
3069,
29892,
2011,
29922,
637,
29897,
13,
2
] |
me/storage/mongodb/collections/Collection.py | me-env/me. | 2 | 1608693 | from me.storage.mongodb.config import BULK_LIMIT, BULK_MIN
from me.storage.mongodb.config import mongo_to_python
from me.tools import fread_json
class Collection:
def __init__(self, db, name, logger, reset=False, schema_file=None):
self.db = db
self.name = name
self.bulk_buffer = []
self.schema = fread_json(schema_file)
self.col = self.getCollection()
self.log = logger
if reset is True and self.col is not None:
self.resetCollection()
elif self.col is None:
self.createCollection(self.schema)
def collectionExists(self):
return self.name in self.db.list_collection_names()
def getCollection(self):
if not self.collectionExists():
return None
return self.db[self.name]
def createCollection(self, val_expr=None):
self.db.create_collection(self.name)
if val_expr:
self.log.debug("val_expr", val_expr)
self.db.command('collMod', self.name, validator=val_expr, validationLevel='moderate')
self.col = self.getCollection()
self.log.info(f"Collection {self.name} created.")
def dropCollection(self):
self.col.drop()
self.log.info(f"Collection {self.name} dropped.")
def resetCollection(self):
"""
Drop the collection and recreate it
"""
self.dropCollection()
self.createCollection(self.schema)
self.log.info(f"Collection {self.name} reset.")
def deleteAll(self):
self.col.delete_many({})
def bulkWrite(self, content, force=False):
self.bulk_buffer.append(content)
if len(self.bulk_buffer) >= BULK_LIMIT or force:
self.flushBulk()
def flushBulk(self):
if len(self.bulk_buffer) >= BULK_MIN:
self.log.debug('Write Flush', self.name, "len", len(self.bulk_buffer))
results = self.col.bulk_write(self.bulk_buffer)
self.bulk_buffer = []
self.log.debug("bulk write result", results.bulk_api_result)
def flush(self):
self.flushBulk()
def update(self, query, update):
self.col.update_many(query, update)
def insert(self, document):
self.log.debug('insert', document)
self.col.insert_one(document)
def delete(self, query):
self.col.delete_one(query)
@property
def schema_types(self):
__required = {i: object for i in self.schema['$jsonSchema']['required']}
self.log.debug(self.schema['$jsonSchema']['properties'])
__properties = {i: self.schema['$jsonSchema']['properties'][i]['bsonType'] for i in self.schema['$jsonSchema']['properties']}
res = {**__required, **__properties}
check = {i: mongo_to_python(res[i], 'check') for i in res}
convert = {i: mongo_to_python(res[i], 'convert') for i in res}
return check, convert
def __getitem__(self, arg):
"""
:description: Perform a query over a collection (within a specific shard)
:arg arg: filters to perform the query
"""
return self.col.find(arg)
def __str__(self):
return ''.join([u.__str__() for u in self.col.find({})])
| [
1,
515,
592,
29889,
12925,
29889,
23264,
29889,
2917,
1053,
350,
13309,
29968,
29918,
5265,
26349,
29892,
350,
13309,
29968,
29918,
16173,
13,
3166,
592,
29889,
12925,
29889,
23264,
29889,
2917,
1053,
19476,
29918,
517,
29918,
4691,
13,
3166,
592,
29889,
8504,
1053,
285,
949,
29918,
3126,
13,
13,
13,
1990,
14348,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4833,
29892,
1024,
29892,
17927,
29892,
10092,
29922,
8824,
29892,
10938,
29918,
1445,
29922,
8516,
1125,
13,
4706,
1583,
29889,
2585,
353,
4833,
13,
4706,
1583,
29889,
978,
353,
1024,
13,
4706,
1583,
29889,
8645,
29895,
29918,
9040,
353,
5159,
13,
4706,
1583,
29889,
11010,
353,
285,
949,
29918,
3126,
29898,
11010,
29918,
1445,
29897,
13,
4706,
1583,
29889,
1054,
353,
1583,
29889,
657,
7196,
580,
13,
4706,
1583,
29889,
1188,
353,
17927,
13,
13,
4706,
565,
10092,
338,
5852,
322,
1583,
29889,
1054,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
12071,
7196,
580,
13,
4706,
25342,
1583,
29889,
1054,
338,
6213,
29901,
13,
9651,
1583,
29889,
3258,
7196,
29898,
1311,
29889,
11010,
29897,
13,
13,
1678,
822,
4333,
24217,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
978,
297,
1583,
29889,
2585,
29889,
1761,
29918,
10855,
29918,
7039,
580,
13,
13,
1678,
822,
679,
7196,
29898,
1311,
1125,
13,
4706,
565,
451,
1583,
29889,
10855,
24217,
7295,
13,
9651,
736,
6213,
13,
4706,
736,
1583,
29889,
2585,
29961,
1311,
29889,
978,
29962,
13,
13,
1678,
822,
1653,
7196,
29898,
1311,
29892,
659,
29918,
13338,
29922,
8516,
1125,
13,
4706,
1583,
29889,
2585,
29889,
3258,
29918,
10855,
29898,
1311,
29889,
978,
29897,
13,
4706,
565,
659,
29918,
13338,
29901,
13,
9651,
1583,
29889,
1188,
29889,
8382,
703,
791,
29918,
13338,
613,
659,
29918,
13338,
29897,
13,
9651,
1583,
29889,
2585,
29889,
6519,
877,
22017,
2111,
742,
1583,
29889,
978,
29892,
2854,
1061,
29922,
791,
29918,
13338,
29892,
8845,
10108,
2433,
1545,
261,
403,
1495,
13,
4706,
1583,
29889,
1054,
353,
1583,
29889,
657,
7196,
580,
13,
4706,
1583,
29889,
1188,
29889,
3888,
29898,
29888,
29908,
7196,
426,
1311,
29889,
978,
29913,
2825,
23157,
13,
13,
1678,
822,
5768,
7196,
29898,
1311,
1125,
13,
4706,
1583,
29889,
1054,
29889,
8865,
580,
13,
4706,
1583,
29889,
1188,
29889,
3888,
29898,
29888,
29908,
7196,
426,
1311,
29889,
978,
29913,
13700,
23157,
13,
13,
1678,
822,
10092,
7196,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
20724,
278,
4333,
322,
337,
3258,
372,
13,
4706,
9995,
13,
4706,
1583,
29889,
8865,
7196,
580,
13,
4706,
1583,
29889,
3258,
7196,
29898,
1311,
29889,
11010,
29897,
13,
4706,
1583,
29889,
1188,
29889,
3888,
29898,
29888,
29908,
7196,
426,
1311,
29889,
978,
29913,
10092,
23157,
13,
13,
1678,
822,
5217,
3596,
29898,
1311,
1125,
13,
4706,
1583,
29889,
1054,
29889,
8143,
29918,
13011,
3319,
1800,
13,
13,
1678,
822,
21610,
6113,
29898,
1311,
29892,
2793,
29892,
4889,
29922,
8824,
1125,
13,
4706,
1583,
29889,
8645,
29895,
29918,
9040,
29889,
4397,
29898,
3051,
29897,
13,
4706,
565,
7431,
29898,
1311,
29889,
8645,
29895,
29918,
9040,
29897,
6736,
350,
13309,
29968,
29918,
5265,
26349,
470,
4889,
29901,
13,
9651,
1583,
29889,
23126,
29933,
24456,
580,
13,
13,
1678,
822,
28371,
29933,
24456,
29898,
1311,
1125,
13,
4706,
565,
7431,
29898,
1311,
29889,
8645,
29895,
29918,
9040,
29897,
6736,
350,
13309,
29968,
29918,
16173,
29901,
13,
9651,
1583,
29889,
1188,
29889,
8382,
877,
6113,
2379,
1878,
742,
1583,
29889,
978,
29892,
376,
2435,
613,
7431,
29898,
1311,
29889,
8645,
29895,
29918,
9040,
876,
13,
9651,
2582,
353,
1583,
29889,
1054,
29889,
8645,
29895,
29918,
3539,
29898,
1311,
29889,
8645,
29895,
29918,
9040,
29897,
13,
9651,
1583,
29889,
8645,
29895,
29918,
9040,
353,
5159,
13,
9651,
1583,
29889,
1188,
29889,
8382,
703,
8645,
29895,
2436,
1121,
613,
2582,
29889,
8645,
29895,
29918,
2754,
29918,
2914,
29897,
13,
13,
1678,
822,
28371,
29898,
1311,
1125,
13,
4706,
1583,
29889,
23126,
29933,
24456,
580,
13,
13,
1678,
822,
2767,
29898,
1311,
29892,
2346,
29892,
2767,
1125,
13,
4706,
1583,
29889,
1054,
29889,
5504,
29918,
13011,
29898,
1972,
29892,
2767,
29897,
13,
13,
1678,
822,
4635,
29898,
1311,
29892,
1842,
1125,
13,
4706,
1583,
29889,
1188,
29889,
8382,
877,
7851,
742,
1842,
29897,
13,
4706,
1583,
29889,
1054,
29889,
7851,
29918,
650,
29898,
3225,
29897,
13,
13,
1678,
822,
5217,
29898,
1311,
29892,
2346,
1125,
13,
4706,
1583,
29889,
1054,
29889,
8143,
29918,
650,
29898,
1972,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
10938,
29918,
8768,
29898,
1311,
1125,
13,
4706,
4770,
12403,
353,
426,
29875,
29901,
1203,
363,
474,
297,
1583,
29889,
11010,
1839,
29938,
3126,
12763,
16215,
12403,
2033,
29913,
13,
4706,
1583,
29889,
1188,
29889,
8382,
29898,
1311,
29889,
11010,
1839,
29938,
3126,
12763,
16215,
11330,
11287,
13,
4706,
4770,
11330,
353,
426,
29875,
29901,
1583,
29889,
11010,
1839,
29938,
3126,
12763,
16215,
11330,
2033,
29961,
29875,
22322,
29890,
1100,
1542,
2033,
363,
474,
297,
1583,
29889,
11010,
1839,
29938,
3126,
12763,
16215,
11330,
2033,
29913,
13,
4706,
620,
353,
426,
1068,
1649,
12403,
29892,
3579,
1649,
11330,
29913,
13,
4706,
1423,
353,
426,
29875,
29901,
19476,
29918,
517,
29918,
4691,
29898,
690,
29961,
29875,
1402,
525,
3198,
1495,
363,
474,
297,
620,
29913,
13,
4706,
3588,
353,
426,
29875,
29901,
19476,
29918,
517,
29918,
4691,
29898,
690,
29961,
29875,
1402,
525,
13441,
1495,
363,
474,
297,
620,
29913,
13,
4706,
736,
1423,
29892,
3588,
13,
13,
1678,
822,
4770,
657,
667,
12035,
1311,
29892,
1852,
1125,
13,
4706,
9995,
13,
4706,
584,
8216,
29901,
27313,
263,
2346,
975,
263,
4333,
313,
2541,
262,
263,
2702,
528,
538,
29897,
13,
4706,
584,
1191,
1852,
29901,
18094,
304,
2189,
278,
2346,
13,
4706,
9995,
13,
4706,
736,
1583,
29889,
1054,
29889,
2886,
29898,
1191,
29897,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
525,
4286,
7122,
4197,
29884,
17255,
710,
1649,
580,
363,
318,
297,
1583,
29889,
1054,
29889,
2886,
3319,
1800,
2314,
13,
2
] |
gym_combat/gym_combat/envs/main.py | refaev/combat_gym | 0 | 3992 | <filename>gym_combat/gym_combat/envs/main.py
from matplotlib import style
from tqdm import tqdm
style.use("ggplot")
from gym_combat.envs.Arena.CState import State
from gym_combat.envs.Arena.Entity import Entity
from gym_combat.envs.Arena.Environment import Environment, Episode
from gym_combat.envs.Common.constants import *
from gym_combat.envs.Qtable import Qtable_DecisionMaker
from gym_combat.envs.DQN import DQNAgent_keras
from gym_combat.envs.Greedy import Greedy_player
import matplotlib.pyplot as plt
def print_start_of_game_info(blue_decision_maker, red_decision_maker):
print("Starting tournament!")
print("Blue player type: ", Agent_type_str[blue_decision_maker.type()])
if blue_decision_maker.path_model_to_load==None:
print("Blue player starting with no model")
else:
print("Blue player starting tournament with trained model: " , blue_decision_maker.path_model_to_load)
print("Red player type: ", Agent_type_str[red_decision_maker.type()])
if red_decision_maker.path_model_to_load==None:
print("Red player starting with no model")
else:
print("Red player starting tournament with trained model: " , red_decision_maker.path_model_to_load)
print("Number of rounds: ", NUM_OF_EPISODES)
print("~~~ GO! ~~~\n\n")
def evaluate(episode_number):
#if episode_number % EVALUATE_PLAYERS_EVERY == 0:
a = episode_number % EVALUATE_PLAYERS_EVERY
if a>=0 and a<EVALUATE_BATCH_SIZE:
EVALUATE = True
else:
EVALUATE = False
return EVALUATE
def print_states(observation_for_blue_s0, observation_for_blue_s1):
import matplotlib.pyplot as plt
plt.matshow(observation_for_blue_s0.img)
plt.show()
plt.matshow(observation_for_blue_s1.img)
plt.show()
if __name__ == '__main__':
env = Environment(IS_TRAINING)
print("Starting Blue player")
blue_decision_maker = DQNAgent_keras.DQNAgent_keras()
#blue_decision_maker = DQNAgent_keras.DQNAgent_keras(UPDATE_CONTEXT=True, path_model_to_load='conv1(6_6_1_256)_conv2(4_4_256_128)_conv3(3_3_128_128)_flatten_fc__blue_202001_ 0.95max_ -0.04avg_ -3.10min__1620558885.model')
print("Starting red player")
### Red Decision Maker
red_decision_maker = Greedy_player.Greedy_player()
env.blue_player = Entity(blue_decision_maker)
env.red_player = Entity(red_decision_maker)
print_start_of_game_info(blue_decision_maker, red_decision_maker)
NUM_OF_EPISODES = env.NUMBER_OF_EPISODES
for episode in tqdm(range(1, NUM_OF_EPISODES + 1), ascii=True, unit='episodes'):
EVALUATE = evaluate(episode)
current_episode = Episode(episode, EVALUATE, show_always=False if IS_TRAINING else True)
# set new start position for the players
env.reset_game(episode)
# get observation
observation_for_blue_s0: State = env.get_observation_for_blue()
action_blue = -1
# initialize the decision_makers for the players
blue_decision_maker.set_initial_state(observation_for_blue_s0, episode)
#red_decision_maker.set_initial_state(observation_for_red_s0, episode) # for non-greedy players
blue_won_the_game = False
red_won_the_game = False
for steps_current_game in range(1, MAX_STEPS_PER_EPISODE + 1):
##### Blue's turn! #####
observation_for_blue_s0: State = env.get_observation_for_blue()
current_episode.print_episode(env, steps_current_game)
action_blue: AgentAction = blue_decision_maker.get_action(observation_for_blue_s0, EVALUATE)
env.take_action(Color.Blue, action_blue) # take the action!
current_episode.print_episode(env, steps_current_game)
current_episode.is_terminal = (env.compute_terminal(whos_turn=Color.Blue) is not WinEnum.NoWin)
if current_episode.is_terminal:# Blue won the game!
blue_won_the_game=True
else:
##### Red's turn! #####
observation_for_red_s0: State = env.get_observation_for_red()
action_red: AgentAction = red_decision_maker.get_action(observation_for_red_s0, EVALUATE)
env.take_action(Color.Red, action_red) # take the action!
current_episode.is_terminal = (env.compute_terminal(whos_turn=Color.Red) is not WinEnum.NoWin)
if current_episode.is_terminal: # Blue won the game!
red_won_the_game = True
current_episode.print_episode(env, steps_current_game)
reward_step_blue, reward_step_red = env.handle_reward(steps_current_game)
current_episode.episode_reward_red += reward_step_red
current_episode.episode_reward_blue += reward_step_blue
observation_for_blue_s1: State = env.get_observation_for_blue()
blue_decision_maker.update_context(observation_for_blue_s0, action_blue, reward_step_blue, observation_for_blue_s1,
current_episode.is_terminal, EVALUATE)
if steps_current_game == MAX_STEPS_PER_EPISODE:
# if we exited the loop because we reached MAX_STEPS_PER_EPISODE
current_episode.is_terminal = True
if blue_won_the_game or red_won_the_game:
break
# for statistics
env.update_win_counters(steps_current_game)
env.data_for_statistics(current_episode.episode_reward_blue, current_episode.episode_reward_red, steps_current_game, blue_decision_maker.get_epsolon())
env.evaluate_info(EVALUATE, episode, steps_current_game, blue_decision_maker.get_epsolon())
if current_episode.episode_number % SAVE_STATS_EVERY == 0:
if False:#blue_decision_maker.type()== AgentType.DQN_keras or blue_decision_maker.type() == AgentType.DQN_basic:
blue_decision_maker._decision_maker.print_model(observation_for_blue_s0, episode, "conv")#env.save_folder_path)
# print info of episode:
current_episode.print_info_of_episode(env, steps_current_game, blue_decision_maker.get_epsolon(), episode)
env.end_run()
if blue_decision_maker.type() == AgentType.DQN_keras or blue_decision_maker.type() == AgentType.DQN_basic:
blue_decision_maker._decision_maker.print_model(observation_for_blue_s0, episode, env.save_folder_path)
| [
1,
529,
9507,
29958,
29887,
962,
29918,
510,
10222,
29914,
29887,
962,
29918,
510,
10222,
29914,
264,
4270,
29914,
3396,
29889,
2272,
13,
3166,
22889,
1053,
3114,
13,
3166,
260,
29939,
18933,
1053,
260,
29939,
18933,
13,
13,
3293,
29889,
1509,
703,
1505,
5317,
1159,
13,
3166,
330,
962,
29918,
510,
10222,
29889,
264,
4270,
29889,
29909,
1267,
29874,
29889,
29907,
2792,
1053,
4306,
13,
3166,
330,
962,
29918,
510,
10222,
29889,
264,
4270,
29889,
29909,
1267,
29874,
29889,
6691,
1053,
14945,
13,
3166,
330,
962,
29918,
510,
10222,
29889,
264,
4270,
29889,
29909,
1267,
29874,
29889,
18649,
1053,
16738,
29892,
382,
12907,
13,
3166,
330,
962,
29918,
510,
10222,
29889,
264,
4270,
29889,
18877,
29889,
3075,
1934,
1053,
334,
13,
3166,
330,
962,
29918,
510,
10222,
29889,
264,
4270,
29889,
29984,
2371,
1053,
660,
2371,
29918,
6185,
2459,
29924,
5790,
13,
3166,
330,
962,
29918,
510,
10222,
29889,
264,
4270,
29889,
29928,
29984,
29940,
1053,
360,
29984,
3521,
5362,
29918,
3946,
294,
13,
3166,
330,
962,
29918,
510,
10222,
29889,
264,
4270,
29889,
25120,
7584,
1053,
4122,
7584,
29918,
9106,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
13,
1753,
1596,
29918,
2962,
29918,
974,
29918,
11802,
29918,
3888,
29898,
9539,
29918,
7099,
2459,
29918,
28107,
29892,
2654,
29918,
7099,
2459,
29918,
28107,
1125,
13,
1678,
1596,
703,
4763,
292,
14743,
29991,
1159,
13,
1678,
1596,
703,
21319,
4847,
1134,
29901,
9162,
28330,
29918,
1853,
29918,
710,
29961,
9539,
29918,
7099,
2459,
29918,
28107,
29889,
1853,
580,
2314,
13,
1678,
565,
7254,
29918,
7099,
2459,
29918,
28107,
29889,
2084,
29918,
4299,
29918,
517,
29918,
1359,
1360,
8516,
29901,
13,
4706,
1596,
703,
21319,
4847,
6257,
411,
694,
1904,
1159,
13,
1678,
1683,
29901,
13,
4706,
1596,
703,
21319,
4847,
6257,
14743,
411,
16370,
1904,
29901,
376,
1919,
7254,
29918,
7099,
2459,
29918,
28107,
29889,
2084,
29918,
4299,
29918,
517,
29918,
1359,
29897,
13,
13,
1678,
1596,
703,
9039,
4847,
1134,
29901,
9162,
28330,
29918,
1853,
29918,
710,
29961,
1127,
29918,
7099,
2459,
29918,
28107,
29889,
1853,
580,
2314,
13,
1678,
565,
2654,
29918,
7099,
2459,
29918,
28107,
29889,
2084,
29918,
4299,
29918,
517,
29918,
1359,
1360,
8516,
29901,
13,
4706,
1596,
703,
9039,
4847,
6257,
411,
694,
1904,
1159,
13,
1678,
1683,
29901,
13,
4706,
1596,
703,
9039,
4847,
6257,
14743,
411,
16370,
1904,
29901,
376,
1919,
2654,
29918,
7099,
2459,
29918,
28107,
29889,
2084,
29918,
4299,
29918,
517,
29918,
1359,
29897,
13,
13,
13,
1678,
1596,
703,
4557,
310,
364,
3885,
29901,
9162,
28019,
29918,
9800,
29918,
29923,
2227,
6156,
2287,
29903,
29897,
13,
1678,
1596,
703,
7377,
30022,
21947,
29991,
3695,
30022,
2651,
29876,
29905,
29876,
1159,
13,
13,
13,
1753,
14707,
29898,
1022,
275,
356,
29918,
4537,
1125,
13,
1678,
396,
361,
12720,
29918,
4537,
1273,
382,
8932,
29965,
3040,
29918,
29925,
18799,
23598,
29918,
29923,
5348,
29979,
1275,
29871,
29900,
29901,
13,
1678,
263,
353,
12720,
29918,
4537,
1273,
382,
8932,
29965,
3040,
29918,
29925,
18799,
23598,
29918,
29923,
5348,
29979,
13,
1678,
565,
263,
18572,
29900,
322,
263,
29966,
29923,
8932,
29965,
3040,
29918,
29933,
14789,
29918,
14226,
29901,
13,
4706,
382,
8932,
29965,
3040,
353,
5852,
13,
1678,
1683,
29901,
13,
4706,
382,
8932,
29965,
3040,
353,
7700,
13,
1678,
736,
382,
8932,
29965,
3040,
13,
13,
1753,
1596,
29918,
28631,
29898,
26739,
362,
29918,
1454,
29918,
9539,
29918,
29879,
29900,
29892,
15500,
29918,
1454,
29918,
9539,
29918,
29879,
29896,
1125,
13,
1678,
1053,
22889,
29889,
2272,
5317,
408,
14770,
13,
1678,
14770,
29889,
2922,
4294,
29898,
26739,
362,
29918,
1454,
29918,
9539,
29918,
29879,
29900,
29889,
2492,
29897,
13,
1678,
14770,
29889,
4294,
580,
13,
13,
1678,
14770,
29889,
2922,
4294,
29898,
26739,
362,
29918,
1454,
29918,
9539,
29918,
29879,
29896,
29889,
2492,
29897,
13,
1678,
14770,
29889,
4294,
580,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
13,
13,
1678,
8829,
353,
16738,
29898,
3235,
29918,
29911,
4717,
1177,
4214,
29897,
13,
13,
1678,
1596,
703,
4763,
292,
10924,
4847,
1159,
13,
13,
1678,
7254,
29918,
7099,
2459,
29918,
28107,
353,
360,
29984,
3521,
5362,
29918,
3946,
294,
29889,
29928,
29984,
3521,
5362,
29918,
3946,
294,
580,
13,
1678,
396,
9539,
29918,
7099,
2459,
29918,
28107,
353,
360,
29984,
3521,
5362,
29918,
3946,
294,
29889,
29928,
29984,
3521,
5362,
29918,
3946,
294,
29898,
14474,
29918,
6007,
16975,
29922,
5574,
29892,
2224,
29918,
4299,
29918,
517,
29918,
1359,
2433,
20580,
29896,
29898,
29953,
29918,
29953,
29918,
29896,
29918,
29906,
29945,
29953,
20344,
20580,
29906,
29898,
29946,
29918,
29946,
29918,
29906,
29945,
29953,
29918,
29896,
29906,
29947,
20344,
20580,
29941,
29898,
29941,
29918,
29941,
29918,
29896,
29906,
29947,
29918,
29896,
29906,
29947,
20344,
1579,
8606,
29918,
13801,
1649,
9539,
29918,
29906,
29900,
29906,
29900,
29900,
29896,
29918,
1678,
29900,
29889,
29929,
29945,
3317,
29918,
29871,
448,
29900,
29889,
29900,
29946,
485,
29887,
29918,
29871,
448,
29941,
29889,
29896,
29900,
1195,
1649,
29896,
29953,
29906,
29900,
29945,
29945,
29947,
29947,
29947,
29945,
29889,
4299,
1495,
13,
13,
1678,
1596,
703,
4763,
292,
2654,
4847,
1159,
13,
1678,
835,
4367,
3826,
2459,
341,
5790,
13,
1678,
2654,
29918,
7099,
2459,
29918,
28107,
353,
4122,
7584,
29918,
9106,
29889,
25120,
7584,
29918,
9106,
580,
13,
13,
13,
1678,
8829,
29889,
9539,
29918,
9106,
353,
14945,
29898,
9539,
29918,
7099,
2459,
29918,
28107,
29897,
13,
1678,
8829,
29889,
1127,
29918,
9106,
353,
14945,
29898,
1127,
29918,
7099,
2459,
29918,
28107,
29897,
13,
13,
1678,
1596,
29918,
2962,
29918,
974,
29918,
11802,
29918,
3888,
29898,
9539,
29918,
7099,
2459,
29918,
28107,
29892,
2654,
29918,
7099,
2459,
29918,
28107,
29897,
13,
13,
1678,
28019,
29918,
9800,
29918,
29923,
2227,
6156,
2287,
29903,
353,
8829,
29889,
23207,
29918,
9800,
29918,
29923,
2227,
6156,
2287,
29903,
13,
1678,
363,
12720,
297,
260,
29939,
18933,
29898,
3881,
29898,
29896,
29892,
28019,
29918,
9800,
29918,
29923,
2227,
6156,
2287,
29903,
718,
29871,
29896,
511,
408,
18869,
29922,
5574,
29892,
5190,
2433,
1022,
275,
2631,
29374,
13,
13,
4706,
382,
8932,
29965,
3040,
353,
14707,
29898,
1022,
275,
356,
29897,
13,
4706,
1857,
29918,
1022,
275,
356,
353,
382,
12907,
29898,
1022,
275,
356,
29892,
382,
8932,
29965,
3040,
29892,
1510,
29918,
21936,
29922,
8824,
565,
8519,
29918,
29911,
4717,
1177,
4214,
1683,
5852,
29897,
13,
13,
4706,
396,
731,
716,
1369,
2602,
363,
278,
10769,
13,
4706,
8829,
29889,
12071,
29918,
11802,
29898,
1022,
275,
356,
29897,
13,
4706,
396,
679,
15500,
13,
4706,
15500,
29918,
1454,
29918,
9539,
29918,
29879,
29900,
29901,
4306,
353,
8829,
29889,
657,
29918,
26739,
362,
29918,
1454,
29918,
9539,
580,
13,
4706,
3158,
29918,
9539,
353,
448,
29896,
13,
13,
4706,
396,
11905,
278,
10608,
29918,
29885,
21079,
363,
278,
10769,
13,
4706,
7254,
29918,
7099,
2459,
29918,
28107,
29889,
842,
29918,
11228,
29918,
3859,
29898,
26739,
362,
29918,
1454,
29918,
9539,
29918,
29879,
29900,
29892,
12720,
29897,
13,
4706,
396,
1127,
29918,
7099,
2459,
29918,
28107,
29889,
842,
29918,
11228,
29918,
3859,
29898,
26739,
362,
29918,
1454,
29918,
1127,
29918,
29879,
29900,
29892,
12720,
29897,
396,
363,
1661,
29899,
7979,
7584,
10769,
13,
13,
13,
4706,
7254,
29918,
12620,
29918,
1552,
29918,
11802,
353,
7700,
13,
4706,
2654,
29918,
12620,
29918,
1552,
29918,
11802,
353,
7700,
13,
13,
4706,
363,
6576,
29918,
3784,
29918,
11802,
297,
3464,
29898,
29896,
29892,
18134,
29918,
1254,
29923,
7024,
29918,
13171,
29918,
29923,
2227,
6156,
2287,
718,
29871,
29896,
1125,
13,
9651,
16101,
10924,
29915,
29879,
2507,
29991,
16101,
13,
9651,
15500,
29918,
1454,
29918,
9539,
29918,
29879,
29900,
29901,
4306,
353,
8829,
29889,
657,
29918,
26739,
362,
29918,
1454,
29918,
9539,
580,
13,
9651,
1857,
29918,
1022,
275,
356,
29889,
2158,
29918,
1022,
275,
356,
29898,
6272,
29892,
6576,
29918,
3784,
29918,
11802,
29897,
13,
13,
9651,
3158,
29918,
9539,
29901,
28330,
4276,
353,
7254,
29918,
7099,
2459,
29918,
28107,
29889,
657,
29918,
2467,
29898,
26739,
362,
29918,
1454,
29918,
9539,
29918,
29879,
29900,
29892,
382,
8932,
29965,
3040,
29897,
13,
9651,
8829,
29889,
19730,
29918,
2467,
29898,
3306,
29889,
21319,
29892,
3158,
29918,
9539,
29897,
29871,
396,
2125,
278,
3158,
29991,
13,
9651,
1857,
29918,
1022,
275,
356,
29889,
2158,
29918,
1022,
275,
356,
29898,
6272,
29892,
6576,
29918,
3784,
29918,
11802,
29897,
13,
13,
9651,
1857,
29918,
1022,
275,
356,
29889,
275,
29918,
8489,
979,
353,
313,
6272,
29889,
26017,
29918,
8489,
979,
29898,
1332,
359,
29918,
685,
29922,
3306,
29889,
21319,
29897,
338,
451,
8892,
16854,
29889,
3782,
17734,
29897,
13,
13,
9651,
565,
1857,
29918,
1022,
275,
356,
29889,
275,
29918,
8489,
979,
21968,
10924,
2113,
278,
3748,
29991,
13,
18884,
7254,
29918,
12620,
29918,
1552,
29918,
11802,
29922,
5574,
13,
9651,
1683,
29901,
13,
18884,
16101,
4367,
29915,
29879,
2507,
29991,
16101,
13,
18884,
15500,
29918,
1454,
29918,
1127,
29918,
29879,
29900,
29901,
4306,
353,
8829,
29889,
657,
29918,
26739,
362,
29918,
1454,
29918,
1127,
580,
13,
18884,
3158,
29918,
1127,
29901,
28330,
4276,
353,
2654,
29918,
7099,
2459,
29918,
28107,
29889,
657,
29918,
2467,
29898,
26739,
362,
29918,
1454,
29918,
1127,
29918,
29879,
29900,
29892,
382,
8932,
29965,
3040,
29897,
13,
18884,
8829,
29889,
19730,
29918,
2467,
29898,
3306,
29889,
9039,
29892,
3158,
29918,
1127,
29897,
29871,
396,
2125,
278,
3158,
29991,
13,
18884,
1857,
29918,
1022,
275,
356,
29889,
275,
29918,
8489,
979,
353,
313,
6272,
29889,
26017,
29918,
8489,
979,
29898,
1332,
359,
29918,
685,
29922,
3306,
29889,
9039,
29897,
338,
451,
8892,
16854,
29889,
3782,
17734,
29897,
13,
18884,
565,
1857,
29918,
1022,
275,
356,
29889,
275,
29918,
8489,
979,
29901,
29871,
396,
10924,
2113,
278,
3748,
29991,
13,
462,
1678,
2654,
29918,
12620,
29918,
1552,
29918,
11802,
353,
5852,
13,
18884,
1857,
29918,
1022,
275,
356,
29889,
2158,
29918,
1022,
275,
356,
29898,
6272,
29892,
6576,
29918,
3784,
29918,
11802,
29897,
13,
13,
13,
9651,
20751,
29918,
10568,
29918,
9539,
29892,
20751,
29918,
10568,
29918,
1127,
353,
8829,
29889,
8411,
29918,
276,
1328,
29898,
24530,
29918,
3784,
29918,
11802,
29897,
13,
9651,
1857,
29918,
1022,
275,
356,
29889,
1022,
275,
356,
29918,
276,
1328,
29918,
1127,
4619,
20751,
29918,
10568,
29918,
1127,
13,
9651,
1857,
29918,
1022,
275,
356,
29889,
1022,
275,
356,
29918,
276,
1328,
29918,
9539,
4619,
20751,
29918,
10568,
29918,
9539,
13,
13,
9651,
15500,
29918,
1454,
29918,
9539,
29918,
29879,
29896,
29901,
4306,
353,
8829,
29889,
657,
29918,
26739,
362,
29918,
1454,
29918,
9539,
580,
13,
9651,
7254,
29918,
7099,
2459,
29918,
28107,
29889,
5504,
29918,
4703,
29898,
26739,
362,
29918,
1454,
29918,
9539,
29918,
29879,
29900,
29892,
3158,
29918,
9539,
29892,
20751,
29918,
10568,
29918,
9539,
29892,
15500,
29918,
1454,
29918,
9539,
29918,
29879,
29896,
29892,
13,
462,
462,
1669,
1857,
29918,
1022,
275,
356,
29889,
275,
29918,
8489,
979,
29892,
382,
8932,
29965,
3040,
29897,
13,
13,
9651,
565,
6576,
29918,
3784,
29918,
11802,
1275,
18134,
29918,
1254,
29923,
7024,
29918,
13171,
29918,
29923,
2227,
6156,
2287,
29901,
13,
18884,
396,
565,
591,
429,
1573,
278,
2425,
1363,
591,
7450,
18134,
29918,
1254,
29923,
7024,
29918,
13171,
29918,
29923,
2227,
6156,
2287,
13,
18884,
1857,
29918,
1022,
275,
356,
29889,
275,
29918,
8489,
979,
353,
5852,
13,
13,
9651,
565,
7254,
29918,
12620,
29918,
1552,
29918,
11802,
470,
2654,
29918,
12620,
29918,
1552,
29918,
11802,
29901,
13,
18884,
2867,
13,
13,
13,
4706,
396,
363,
13964,
13,
4706,
8829,
29889,
5504,
29918,
5080,
29918,
29883,
1309,
2153,
29898,
24530,
29918,
3784,
29918,
11802,
29897,
13,
4706,
8829,
29889,
1272,
29918,
1454,
29918,
6112,
6765,
29898,
3784,
29918,
1022,
275,
356,
29889,
1022,
275,
356,
29918,
276,
1328,
29918,
9539,
29892,
1857,
29918,
1022,
275,
356,
29889,
1022,
275,
356,
29918,
276,
1328,
29918,
1127,
29892,
6576,
29918,
3784,
29918,
11802,
29892,
7254,
29918,
7099,
2459,
29918,
28107,
29889,
657,
29918,
8961,
324,
265,
3101,
13,
4706,
8829,
29889,
24219,
403,
29918,
3888,
29898,
29923,
8932,
29965,
3040,
29892,
12720,
29892,
6576,
29918,
3784,
29918,
11802,
29892,
7254,
29918,
7099,
2459,
29918,
28107,
29889,
657,
29918,
8961,
324,
265,
3101,
13,
13,
4706,
565,
1857,
29918,
1022,
275,
356,
29889,
1022,
275,
356,
29918,
4537,
1273,
317,
7520,
29923,
29918,
17816,
29903,
29918,
29923,
5348,
29979,
1275,
29871,
29900,
29901,
13,
9651,
565,
7700,
21968,
9539,
29918,
7099,
2459,
29918,
28107,
29889,
1853,
580,
1360,
28330,
1542,
29889,
29928,
29984,
29940,
29918,
3946,
294,
470,
7254,
29918,
7099,
2459,
29918,
28107,
29889,
1853,
580,
1275,
28330,
1542,
29889,
29928,
29984,
29940,
29918,
16121,
29901,
13,
18884,
7254,
29918,
7099,
2459,
29918,
28107,
3032,
7099,
2459,
29918,
28107,
29889,
2158,
29918,
4299,
29898,
26739,
362,
29918,
1454,
29918,
9539,
29918,
29879,
29900,
29892,
12720,
29892,
376,
20580,
1159,
29937,
6272,
29889,
7620,
29918,
12083,
29918,
2084,
29897,
13,
13,
13,
4706,
396,
1596,
5235,
310,
12720,
29901,
13,
4706,
1857,
29918,
1022,
275,
356,
29889,
2158,
29918,
3888,
29918,
974,
29918,
1022,
275,
356,
29898,
6272,
29892,
6576,
29918,
3784,
29918,
11802,
29892,
7254,
29918,
7099,
2459,
29918,
28107,
29889,
657,
29918,
8961,
324,
265,
3285,
12720,
29897,
13,
13,
13,
1678,
8829,
29889,
355,
29918,
3389,
580,
13,
1678,
565,
7254,
29918,
7099,
2459,
29918,
28107,
29889,
1853,
580,
1275,
28330,
1542,
29889,
29928,
29984,
29940,
29918,
3946,
294,
470,
7254,
29918,
7099,
2459,
29918,
28107,
29889,
1853,
580,
1275,
28330,
1542,
29889,
29928,
29984,
29940,
29918,
16121,
29901,
13,
4706,
7254,
29918,
7099,
2459,
29918,
28107,
3032,
7099,
2459,
29918,
28107,
29889,
2158,
29918,
4299,
29898,
26739,
362,
29918,
1454,
29918,
9539,
29918,
29879,
29900,
29892,
12720,
29892,
8829,
29889,
7620,
29918,
12083,
29918,
2084,
29897,
13,
13,
13,
2
] |
qf_lib/analysis/strategy_monitoring/assets_monitoring_sheet.py | webclinic017/qf-lib | 198 | 100317 | # Copyright 2016-present CERN – European Organization for Nuclear Research
#
# 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 datetime import datetime
from typing import List, Union, Dict
import numpy as np
import matplotlib as plt
import pandas as pd
from pandas.core.dtypes.common import is_numeric_dtype
from qf_lib.analysis.strategy_monitoring.pnl_calculator import PnLCalculator
from qf_lib.backtesting.contract.contract import Contract
from qf_lib.analysis.common.abstract_document import AbstractDocument
from qf_lib.backtesting.contract.contract_to_ticker_conversion.base import ContractTickerMapper
from qf_lib.backtesting.portfolio.transaction import Transaction
from qf_lib.common.enums.frequency import Frequency
from qf_lib.common.enums.price_field import PriceField
from qf_lib.common.exceptions.future_contracts_exceptions import NoValidTickerException
from qf_lib.common.tickers.tickers import Ticker
from qf_lib.common.utils.dateutils.timer import SettableTimer
from qf_lib.common.utils.error_handling import ErrorHandling
from qf_lib.common.utils.logging.qf_parent_logger import qf_logger
from qf_lib.containers.dataframe.prices_dataframe import PricesDataFrame
from qf_lib.containers.dataframe.qf_dataframe import QFDataFrame
from qf_lib.containers.futures.future_tickers.future_ticker import FutureTicker
from qf_lib.containers.futures.futures_adjustment_method import FuturesAdjustmentMethod
from qf_lib.containers.futures.futures_chain import FuturesChain
from qf_lib.containers.series.prices_series import PricesSeries
from qf_lib.containers.series.simple_returns_series import SimpleReturnsSeries
from qf_lib.data_providers.data_provider import DataProvider
from qf_lib.documents_utils.document_exporting.element.df_table import DFTable
from qf_lib.documents_utils.document_exporting.element.heading import HeadingElement
from qf_lib.documents_utils.document_exporting.element.new_page import NewPageElement
from qf_lib.documents_utils.document_exporting.element.paragraph import ParagraphElement
from qf_lib.documents_utils.document_exporting.pdf_exporter import PDFExporter
from qf_lib.settings import Settings
@ErrorHandling.class_error_logging()
class AssetPerfAndDrawdownSheet(AbstractDocument):
"""
For each of the given tickers, provides performance and drawdown comparison of the strategy vs buy and hold.
It also computed the performance contribution and PnL of each of the assets with the given frequency (either yearly
or monthly).
Note: It is assumed that at the beginning no positions are open in the portfolio.
Parameters
-----------
category_to_model_tickers: Dict[str, List[Ticker]]
Dictionary mapping a string, which denotes a category / sector etc, into a list of tickers. The categories are
used to provide aggregated information about performance contribution in each of them (e.g. to compute
performance contribution of different sectors, a dictionary mapping sector names into tickers objects).
contract_ticker_mapper: ContractTickerMapper
An instance of the ContractTickerMapper used to map the tickers into corresponding contracts, which are
used in the Transactions objects
transactions: Union[List[Transaction], str]
Either list of Transaction objects or a path to the Transactions file.
start_date: datetime
end_date: datetime
Dates to used as start and end date for the statistics
data_provider: DataProvider
Data provider used to download the prices and future contracts information, necessary to compute Buy and Hold
benchmark performance
settings: Settings
Necessary settings
pdf_exporter: PDFExporter
Used to export the document to PDF
title: str
Title of the document, will be a part of the filename. Do not use special characters.
initial_cash: int
Initial cash in the portfolio (used to compute the performance contribution for each asset)
frequency: Frequency
Frequency which should be used to compute the performance contribution. Currently only Yearly and Monthly
frequencies are supported.
"""
def __init__(self, category_to_model_tickers: Dict[str, List[Ticker]], contract_ticker_mapper: ContractTickerMapper,
transactions: Union[List[Transaction], str], start_date: datetime, end_date: datetime,
data_provider: DataProvider, settings: Settings, pdf_exporter: PDFExporter,
title: str = "Assets Monitoring Sheet", initial_cash: int = 10000000,
frequency: Frequency = Frequency.YEARLY):
super().__init__(settings, pdf_exporter, title=title)
self.tickers = [t for tickers_list in category_to_model_tickers.values() for t in tickers_list]
self._ticker_to_category = {ticker: c for c, tickers_list in category_to_model_tickers.items()
for ticker in tickers_list}
self._contract_ticker_mapper = contract_ticker_mapper
self._pnl_calculator = PnLCalculator(data_provider, contract_ticker_mapper)
self.transactions = self._parse_transactions_file(transactions) if isinstance(transactions, str) \
else transactions
self._start_date = start_date
self._end_date = end_date
self._data_provider = data_provider
self._initial_cash = initial_cash
if frequency not in (Frequency.MONTHLY, Frequency.YEARLY):
raise NotImplementedError("Only monthly and yearly frequencies are currently supported.")
self._frequency = frequency
self._max_columns_per_page = 7
self._logger = qf_logger.getChild(self.__class__.__name__)
def build_document(self):
self._add_header()
self.document.add_element(ParagraphElement("\n"))
ticker_to_pnl_series = self._compute_pnl()
self._add_pnl_and_performance_contribution_tables(ticker_to_pnl_series)
self._add_performance_statistics(ticker_to_pnl_series)
def _parse_transactions_file(self, path_to_transactions_file: str) -> List[Transaction]:
""" Parse the Transactions csv file created by the Monitor and generate a list of transactions objects. """
transactions_df = pd.read_csv(path_to_transactions_file)
transactions = [
Transaction(
time=pd.to_datetime(row.loc["Timestamp"]),
contract=Contract(
symbol=row.loc["Contract symbol"],
security_type=row.loc["Security type"],
exchange=row.loc["Exchange"],
contract_size=row.loc["Contract size"]
),
quantity=row.loc["Quantity"],
price=row.loc["Price"],
commission=row.loc["Commission"]
) for _, row in transactions_df.iterrows()
]
return transactions
def _compute_pnl(self) -> Dict[Ticker, PricesSeries]:
""" Computes PnL time series for each of the tickers. """
ticker_to_pnl_series = {ticker: self._pnl_calculator.compute_pnl(ticker, self.transactions, self._start_date,
self._end_date) for ticker in self.tickers}
return ticker_to_pnl_series
def _add_performance_statistics(self, ticker_to_pnl_series: Dict[Ticker, PricesSeries]):
""" Generate performance and drawdown plots, which provide the comparison between the strategy performance
and Buy and Hold performance for each of the assets.
"""
self.document.add_element(NewPageElement())
self.document.add_element(HeadingElement(level=2, text="Performance and Drawdowns - Strategy vs Buy and Hold"))
self.document.add_element(ParagraphElement("\n"))
for ticker in self.tickers:
grid = self._get_new_grid()
buy_and_hold_returns = self._generate_buy_and_hold_returns(ticker)
strategy_exposure_series = ticker_to_pnl_series[ticker].to_simple_returns().fillna(0.0)
strategy_exposure_series = strategy_exposure_series.where(strategy_exposure_series == 0.0).fillna(1.0)
strategy_returns = buy_and_hold_returns * strategy_exposure_series
strategy_returns = strategy_returns.dropna()
strategy_returns.name = "Strategy"
if len(strategy_returns) > 0:
perf_chart = self._get_perf_chart([buy_and_hold_returns, strategy_returns], False,
"Performance - {}".format(ticker.name))
underwater_chart = self._get_underwater_chart(strategy_returns.to_prices(),
title="Drawdown - {}".format(ticker.name),
benchmark_series=buy_and_hold_returns.to_prices(),
rotate_x_axis=True)
grid.add_chart(perf_chart)
grid.add_chart(underwater_chart)
self.document.add_element(grid)
else:
self._logger.warning("No data is available for {}. No plots will be generated.".format(ticker.name))
def _generate_buy_and_hold_returns(self, ticker: Ticker) -> SimpleReturnsSeries:
""" Computes series of simple returns, which would be returned by the Buy and Hold strategy. """
if isinstance(ticker, FutureTicker):
try:
ticker.initialize_data_provider(SettableTimer(self._end_date), self._data_provider)
futures_chain = FuturesChain(ticker, self._data_provider, FuturesAdjustmentMethod.BACK_ADJUSTED)
prices_series = futures_chain.get_price(PriceField.Close, self._start_date, self._end_date)
except NoValidTickerException:
prices_series = PricesSeries()
else:
prices_series = self._data_provider.get_price(ticker, PriceField.Close, self._start_date, self._end_date)
returns_tms = prices_series.to_simple_returns().replace([-np.inf, np.inf], np.nan).fillna(0.0)
returns_tms.name = "Buy and Hold"
return returns_tms
def _add_pnl_and_performance_contribution_tables(self, ticker_to_pnl: Dict[Ticker, PricesSeries]):
# For each ticker compute the PnL for each period (each year, month etc)
pnl_df = QFDataFrame.from_dict(ticker_to_pnl)
agg_performance = pnl_df.groupby(pd.Grouper(key=pnl_df.index.name, freq=self._frequency.to_pandas_freq())) \
.apply(lambda s: s.iloc[-1] - s.iloc[0])
# Format the column labels, so that they point exactly to the considered time frame
column_labels_format = {
Frequency.YEARLY: "%Y",
Frequency.MONTHLY: "%b %Y",
}
columns_format = column_labels_format[self._frequency]
performance_df = agg_performance.rename(index=lambda timestamp: timestamp.strftime(columns_format))
# Transpose the original data frame, so that performance for each period is presented in a separate column
performance_df = performance_df.transpose()
performance_df.index = performance_df.index.set_names("Asset")
performance_df = performance_df.reset_index()
performance_df["Asset"] = performance_df["Asset"].apply(lambda t: t.name)
performance_tables = self._create_performance_tables(performance_df.copy())
performance_contribution_tables = self._create_performance_contribution_tables(performance_df.copy())
# Add the text and all figures into the document
self.document.add_element(HeadingElement(level=2, text="Profit and Loss"))
self.document.add_element(ParagraphElement("The following tables provide the details on the Total profit and "
"loss for each asset (notional in currency units)."))
self.document.add_element(ParagraphElement("\n"))
for table in performance_tables:
self.document.add_element(HeadingElement(level=3, text="Performance between: {} - {}".format(
table.model.data.columns[1], table.model.data.columns[-1])))
self.document.add_element(table)
self.document.add_element(ParagraphElement("\n"))
self.document.add_element(NewPageElement())
# Add performance contribution table
self.document.add_element(HeadingElement(level=2, text="Performance contribution"))
for table in performance_contribution_tables:
self.document.add_element(HeadingElement(level=3, text="Performance contribution between {} - {}".format(
table.model.data.columns[1], table.model.data.columns[-1])))
self.document.add_element(table)
def _create_performance_tables(self, performance_df: QFDataFrame) -> List[DFTable]:
""" Create a formatted DFTable out of the performance_df data frame. """
numeric_columns = [col for col in performance_df.columns if is_numeric_dtype(performance_df[col])]
performance_df[numeric_columns] = performance_df[numeric_columns].applymap(lambda x: '{:,.0f}'.format(x))
performance_df = performance_df.set_index("Asset").sort_index()
# Divide the performance df into a number of data frames, so that each of them contains up to
# self.max_col_per_page columns, but keep the first column of the original df in all of them
split_dfs = np.array_split(performance_df, np.ceil(performance_df.num_of_columns / self._max_columns_per_page),
axis=1)
df_tables = [DFTable(df.reset_index(), css_classes=['table', 'shrink-font', 'right-align', 'wide-first-column'])
for df in split_dfs]
return df_tables
def _create_performance_contribution_tables(self, performance_df: QFDataFrame) -> List[DFTable]:
"""
Create a list of DFTables with assets names in the index and different years / months in columns, which contains
details on the performance contribution for each asset.
"""
# Create a QFSeries which contains the initial amount of cash in the portfolio for each year / month
numeric_columns = [col for col in performance_df.columns if is_numeric_dtype(performance_df[col])]
portfolio_values = performance_df[numeric_columns].sum().shift(fill_value=self._initial_cash).cumsum()
performance_df[numeric_columns] = performance_df[numeric_columns] / portfolio_values[numeric_columns]
# Add category column and aggregate data accordingly
ticker_name_to_category = {t.name: category for t, category in self._ticker_to_category.items()}
performance_df["Category"] = performance_df["Asset"].apply(lambda t: ticker_name_to_category[t])
all_categories = list(set(ticker_name_to_category.values()))
performance_df = performance_df.sort_values(by=["Category", "Asset"])
performance_df = performance_df.groupby("Category").apply(
lambda d: pd.concat([PricesDataFrame({**{"Asset": [d.name], "Category": [d.name]},
**{c: [d[c].sum()] for c in numeric_columns}}), d],
ignore_index=True)).drop(columns=["Category"])
# Add the Total Performance row (divide by 2 as the df contains already aggregated data for each group)
total_sum_row = performance_df[numeric_columns].sum() / 2
total_sum_row["Asset"] = "Total Performance"
performance_df = performance_df.append(total_sum_row, ignore_index=True)
# Format the rows using the percentage formatter
performance_df[numeric_columns] = performance_df[numeric_columns].applymap(lambda x: '{:.2%}'.format(x))
# Divide the performance dataframe into a number of dataframes, so that each of them contains up to
# self._max_columns_per_page columns
split_dfs = np.array_split(performance_df.set_index("Asset"),
np.ceil((performance_df.num_of_columns - 1) / self._max_columns_per_page), axis=1)
df_tables = [DFTable(df.reset_index(), css_classes=['table', 'shrink-font', 'right-align', 'wide-first-column'])
for df in split_dfs]
# Get the indices of rows, which contain category info
category_indices = performance_df[performance_df["Asset"].isin(all_categories)].index
for df_table in df_tables:
# Add table formatting, highlight rows showing the total contribution of the given category
df_table.add_rows_styles(category_indices, {"font-weight": "bold", "font-size": "0.95em",
"background-color": "#cbd0d2"})
df_table.add_rows_styles([performance_df.index[-1]], {"font-weight": "bold", "font-size": "0.95em",
"background-color": "#b9bcbd"})
return df_tables
def save(self, report_dir: str = ""):
# Set the style for the report
plt.style.use(['tearsheet'])
filename = "%Y_%m_%d-%H%M {}.pdf".format(self.title)
filename = datetime.now().strftime(filename)
return self.pdf_exporter.generate([self.document], report_dir, filename)
| [
1,
396,
268,
14187,
1266,
29871,
29906,
29900,
29896,
29953,
29899,
6338,
315,
1001,
29940,
785,
7824,
9205,
2133,
363,
405,
1682,
1945,
10550,
13,
29937,
13,
29937,
268,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
268,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
29937,
268,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
308,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
29937,
13,
29937,
268,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
268,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
29937,
268,
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,
268,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
268,
27028,
1090,
278,
19245,
29889,
13,
13,
3166,
12865,
1053,
12865,
13,
3166,
19229,
1053,
2391,
29892,
7761,
29892,
360,
919,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
22889,
408,
14770,
13,
5215,
11701,
408,
10518,
13,
3166,
11701,
29889,
3221,
29889,
29881,
8768,
29889,
9435,
1053,
338,
29918,
21574,
29918,
29881,
1853,
13,
13,
3166,
3855,
29888,
29918,
1982,
29889,
15916,
29889,
710,
8963,
29918,
3712,
2105,
292,
29889,
29886,
12938,
29918,
15807,
1061,
1053,
349,
29876,
29931,
27065,
1061,
13,
3166,
3855,
29888,
29918,
1982,
29889,
1627,
13424,
29889,
1285,
1461,
29889,
1285,
1461,
1053,
2866,
1461,
13,
13,
3166,
3855,
29888,
29918,
1982,
29889,
15916,
29889,
9435,
29889,
16595,
29918,
3225,
1053,
25513,
6268,
13,
3166,
3855,
29888,
29918,
1982,
29889,
1627,
13424,
29889,
1285,
1461,
29889,
1285,
1461,
29918,
517,
29918,
29873,
6541,
29918,
535,
3259,
29889,
3188,
1053,
2866,
1461,
29911,
6541,
19968,
13,
13,
3166,
3855,
29888,
29918,
1982,
29889,
1627,
13424,
29889,
637,
25648,
29889,
20736,
1053,
4103,
2467,
13,
3166,
3855,
29888,
29918,
1982,
29889,
9435,
29889,
264,
6762,
29889,
10745,
23860,
1053,
3878,
23860,
13,
3166,
3855,
29888,
29918,
1982,
29889,
9435,
29889,
264,
6762,
29889,
9175,
29918,
2671,
1053,
20743,
3073,
13,
3166,
3855,
29888,
29918,
1982,
29889,
9435,
29889,
11739,
29879,
29889,
29888,
9130,
29918,
1285,
1461,
29879,
29918,
11739,
29879,
1053,
1939,
7211,
29911,
6541,
2451,
13,
3166,
3855,
29888,
29918,
1982,
29889,
9435,
29889,
24667,
414,
29889,
24667,
414,
1053,
323,
6541,
13,
3166,
3855,
29888,
29918,
1982,
29889,
9435,
29889,
13239,
29889,
1256,
13239,
29889,
20404,
1053,
317,
1803,
519,
14745,
13,
3166,
3855,
29888,
29918,
1982,
29889,
9435,
29889,
13239,
29889,
2704,
29918,
3179,
1847,
1053,
4829,
3481,
1847,
13,
3166,
3855,
29888,
29918,
1982,
29889,
9435,
29889,
13239,
29889,
21027,
29889,
29939,
29888,
29918,
3560,
29918,
21707,
1053,
3855,
29888,
29918,
21707,
13,
3166,
3855,
29888,
29918,
1982,
29889,
1285,
475,
414,
29889,
1272,
2557,
29889,
558,
1575,
29918,
1272,
2557,
1053,
1588,
1575,
17271,
13,
3166,
3855,
29888,
29918,
1982,
29889,
1285,
475,
414,
29889,
1272,
2557,
29889,
29939,
29888,
29918,
1272,
2557,
1053,
660,
29943,
17271,
13,
3166,
3855,
29888,
29918,
1982,
29889,
1285,
475,
414,
29889,
29888,
329,
1973,
29889,
29888,
9130,
29918,
24667,
414,
29889,
29888,
9130,
29918,
29873,
6541,
1053,
16367,
29911,
6541,
13,
3166,
3855,
29888,
29918,
1982,
29889,
1285,
475,
414,
29889,
29888,
329,
1973,
29889,
29888,
329,
1973,
29918,
328,
5143,
358,
29918,
5696,
1053,
20582,
1973,
3253,
5143,
358,
4062,
13,
3166,
3855,
29888,
29918,
1982,
29889,
1285,
475,
414,
29889,
29888,
329,
1973,
29889,
29888,
329,
1973,
29918,
14153,
1053,
20582,
1973,
14688,
13,
3166,
3855,
29888,
29918,
1982,
29889,
1285,
475,
414,
29889,
13757,
29889,
558,
1575,
29918,
13757,
1053,
1588,
1575,
19204,
13,
3166,
3855,
29888,
29918,
1982,
29889,
1285,
475,
414,
29889,
13757,
29889,
12857,
29918,
18280,
29918,
13757,
1053,
12545,
11609,
29879,
19204,
13,
3166,
3855,
29888,
29918,
1982,
29889,
1272,
29918,
771,
29454,
29889,
1272,
29918,
18121,
1053,
3630,
6980,
13,
3166,
3855,
29888,
29918,
1982,
29889,
3225,
29879,
29918,
13239,
29889,
3225,
29918,
15843,
292,
29889,
5029,
29889,
2176,
29918,
2371,
1053,
360,
29943,
3562,
13,
3166,
3855,
29888,
29918,
1982,
29889,
3225,
29879,
29918,
13239,
29889,
3225,
29918,
15843,
292,
29889,
5029,
29889,
2813,
292,
1053,
940,
9382,
2642,
13,
3166,
3855,
29888,
29918,
1982,
29889,
3225,
29879,
29918,
13239,
29889,
3225,
29918,
15843,
292,
29889,
5029,
29889,
1482,
29918,
3488,
1053,
1570,
5074,
2642,
13,
3166,
3855,
29888,
29918,
1982,
29889,
3225,
29879,
29918,
13239,
29889,
3225,
29918,
15843,
292,
29889,
5029,
29889,
26956,
1053,
1459,
9895,
2642,
13,
3166,
3855,
29888,
29918,
1982,
29889,
3225,
29879,
29918,
13239,
29889,
3225,
29918,
15843,
292,
29889,
5140,
29918,
735,
18505,
1053,
11328,
1252,
18505,
13,
3166,
3855,
29888,
29918,
1982,
29889,
11027,
1053,
19215,
13,
13,
13,
29992,
2392,
3481,
1847,
29889,
1990,
29918,
2704,
29918,
21027,
580,
13,
1990,
1094,
842,
5894,
29888,
2855,
8537,
3204,
10654,
29898,
9118,
6268,
1125,
13,
1678,
9995,
13,
1678,
1152,
1269,
310,
278,
2183,
16892,
414,
29892,
8128,
4180,
322,
4216,
3204,
10230,
310,
278,
13705,
7186,
15649,
322,
4808,
29889,
13,
1678,
739,
884,
15712,
278,
4180,
11896,
322,
349,
29876,
29931,
310,
1269,
310,
278,
21608,
411,
278,
2183,
10868,
313,
29872,
2121,
1629,
368,
13,
1678,
470,
4098,
368,
467,
13,
13,
1678,
3940,
29901,
739,
338,
12023,
393,
472,
278,
6763,
694,
11909,
526,
1722,
297,
278,
2011,
25648,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
28400,
13,
1678,
7663,
29918,
517,
29918,
4299,
29918,
24667,
414,
29901,
360,
919,
29961,
710,
29892,
2391,
29961,
29911,
6541,
5262,
13,
4706,
13343,
10417,
263,
1347,
29892,
607,
20169,
263,
7663,
847,
17535,
2992,
29892,
964,
263,
1051,
310,
16892,
414,
29889,
450,
13997,
526,
13,
4706,
1304,
304,
3867,
11404,
630,
2472,
1048,
4180,
11896,
297,
1269,
310,
963,
313,
29872,
29889,
29887,
29889,
304,
10272,
13,
4706,
4180,
11896,
310,
1422,
409,
14359,
29892,
263,
8600,
10417,
17535,
2983,
964,
16892,
414,
3618,
467,
13,
1678,
8078,
29918,
29873,
6541,
29918,
655,
2496,
29901,
2866,
1461,
29911,
6541,
19968,
13,
4706,
530,
2777,
310,
278,
2866,
1461,
29911,
6541,
19968,
1304,
304,
2910,
278,
16892,
414,
964,
6590,
8078,
29879,
29892,
607,
526,
13,
4706,
1304,
297,
278,
4103,
7387,
3618,
13,
1678,
22160,
29901,
7761,
29961,
1293,
29961,
12460,
1402,
851,
29962,
13,
4706,
20370,
1051,
310,
4103,
2467,
3618,
470,
263,
2224,
304,
278,
4103,
7387,
934,
29889,
13,
1678,
1369,
29918,
1256,
29901,
12865,
13,
1678,
1095,
29918,
1256,
29901,
12865,
13,
4706,
360,
1078,
304,
1304,
408,
1369,
322,
1095,
2635,
363,
278,
13964,
13,
1678,
848,
29918,
18121,
29901,
3630,
6980,
13,
4706,
3630,
13113,
1304,
304,
5142,
278,
26094,
322,
5434,
8078,
29879,
2472,
29892,
5181,
304,
10272,
5373,
29891,
322,
21771,
13,
4706,
23513,
4180,
13,
1678,
6055,
29901,
19215,
13,
4706,
405,
687,
404,
653,
6055,
13,
1678,
13552,
29918,
735,
18505,
29901,
11328,
1252,
18505,
13,
4706,
501,
8485,
304,
5609,
278,
1842,
304,
11328,
13,
1678,
3611,
29901,
851,
13,
4706,
18527,
310,
278,
1842,
29892,
674,
367,
263,
760,
310,
278,
10422,
29889,
1938,
451,
671,
4266,
4890,
29889,
13,
1678,
2847,
29918,
29883,
1161,
29901,
938,
13,
4706,
17250,
274,
1161,
297,
278,
2011,
25648,
313,
3880,
304,
10272,
278,
4180,
11896,
363,
1269,
24342,
29897,
13,
1678,
10868,
29901,
3878,
23860,
13,
4706,
3878,
23860,
607,
881,
367,
1304,
304,
10272,
278,
4180,
11896,
29889,
15447,
871,
8905,
368,
322,
23471,
368,
13,
4706,
29511,
526,
6969,
29889,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
7663,
29918,
517,
29918,
4299,
29918,
24667,
414,
29901,
360,
919,
29961,
710,
29892,
2391,
29961,
29911,
6541,
20526,
8078,
29918,
29873,
6541,
29918,
655,
2496,
29901,
2866,
1461,
29911,
6541,
19968,
29892,
13,
462,
22160,
29901,
7761,
29961,
1293,
29961,
12460,
1402,
851,
1402,
1369,
29918,
1256,
29901,
12865,
29892,
1095,
29918,
1256,
29901,
12865,
29892,
13,
462,
848,
29918,
18121,
29901,
3630,
6980,
29892,
6055,
29901,
19215,
29892,
13552,
29918,
735,
18505,
29901,
11328,
1252,
18505,
29892,
13,
462,
3611,
29901,
851,
353,
376,
2887,
7224,
2598,
2105,
292,
2296,
300,
613,
2847,
29918,
29883,
1161,
29901,
938,
353,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29892,
13,
462,
10868,
29901,
3878,
23860,
353,
3878,
23860,
29889,
29979,
26441,
16786,
1125,
13,
13,
4706,
2428,
2141,
1649,
2344,
12035,
11027,
29892,
13552,
29918,
735,
18505,
29892,
3611,
29922,
3257,
29897,
13,
13,
4706,
1583,
29889,
24667,
414,
353,
518,
29873,
363,
16892,
414,
29918,
1761,
297,
7663,
29918,
517,
29918,
4299,
29918,
24667,
414,
29889,
5975,
580,
363,
260,
297,
16892,
414,
29918,
1761,
29962,
13,
4706,
1583,
3032,
29873,
6541,
29918,
517,
29918,
7320,
353,
426,
29873,
6541,
29901,
274,
363,
274,
29892,
16892,
414,
29918,
1761,
297,
7663,
29918,
517,
29918,
4299,
29918,
24667,
414,
29889,
7076,
580,
13,
462,
462,
1678,
363,
260,
6541,
297,
16892,
414,
29918,
1761,
29913,
13,
4706,
1583,
3032,
1285,
1461,
29918,
29873,
6541,
29918,
655,
2496,
353,
8078,
29918,
29873,
6541,
29918,
655,
2496,
13,
13,
4706,
1583,
3032,
29886,
12938,
29918,
15807,
1061,
353,
349,
29876,
29931,
27065,
1061,
29898,
1272,
29918,
18121,
29892,
8078,
29918,
29873,
6541,
29918,
655,
2496,
29897,
13,
13,
4706,
1583,
29889,
3286,
7387,
353,
1583,
3032,
5510,
29918,
3286,
7387,
29918,
1445,
29898,
3286,
7387,
29897,
565,
338,
8758,
29898,
3286,
7387,
29892,
851,
29897,
320,
13,
9651,
1683,
22160,
13,
13,
4706,
1583,
3032,
2962,
29918,
1256,
353,
1369,
29918,
1256,
13,
4706,
1583,
3032,
355,
29918,
1256,
353,
1095,
29918,
1256,
13,
4706,
1583,
3032,
1272,
29918,
18121,
353,
848,
29918,
18121,
13,
4706,
1583,
3032,
11228,
29918,
29883,
1161,
353,
2847,
29918,
29883,
1161,
13,
13,
4706,
565,
10868,
451,
297,
313,
23923,
23860,
29889,
22877,
4690,
16786,
29892,
3878,
23860,
29889,
29979,
26441,
16786,
1125,
13,
9651,
12020,
2216,
1888,
2037,
287,
2392,
703,
11730,
4098,
368,
322,
1629,
368,
29511,
526,
5279,
6969,
23157,
13,
13,
4706,
1583,
3032,
10745,
23860,
353,
10868,
13,
4706,
1583,
3032,
3317,
29918,
13099,
29918,
546,
29918,
3488,
353,
29871,
29955,
13,
4706,
1583,
3032,
21707,
353,
3855,
29888,
29918,
21707,
29889,
657,
5938,
29898,
1311,
17255,
1990,
1649,
17255,
978,
1649,
29897,
13,
13,
1678,
822,
2048,
29918,
3225,
29898,
1311,
1125,
13,
4706,
1583,
3032,
1202,
29918,
6672,
580,
13,
4706,
1583,
29889,
3225,
29889,
1202,
29918,
5029,
29898,
2177,
9895,
2642,
14182,
29876,
5783,
13,
13,
4706,
260,
6541,
29918,
517,
29918,
29886,
12938,
29918,
13757,
353,
1583,
3032,
26017,
29918,
29886,
12938,
580,
13,
4706,
1583,
3032,
1202,
29918,
29886,
12938,
29918,
392,
29918,
546,
13390,
29918,
1285,
3224,
29918,
24051,
29898,
29873,
6541,
29918,
517,
29918,
29886,
12938,
29918,
13757,
29897,
13,
4706,
1583,
3032,
1202,
29918,
546,
13390,
29918,
6112,
6765,
29898,
29873,
6541,
29918,
517,
29918,
29886,
12938,
29918,
13757,
29897,
13,
13,
1678,
822,
903,
5510,
29918,
3286,
7387,
29918,
1445,
29898,
1311,
29892,
2224,
29918,
517,
29918,
3286,
7387,
29918,
1445,
29901,
851,
29897,
1599,
2391,
29961,
12460,
5387,
13,
4706,
9995,
20969,
278,
4103,
7387,
11799,
934,
2825,
491,
278,
2598,
2105,
322,
5706,
263,
1051,
310,
22160,
3618,
29889,
9995,
13,
4706,
22160,
29918,
2176,
353,
10518,
29889,
949,
29918,
7638,
29898,
2084,
29918,
517,
29918,
3286,
7387,
29918,
1445,
29897,
13,
4706,
22160,
353,
518,
13,
9651,
4103,
2467,
29898,
13,
18884,
931,
29922,
15926,
29889,
517,
29918,
12673,
29898,
798,
29889,
2029,
3366,
27939,
3108,
511,
13,
18884,
8078,
29922,
21263,
29898,
13,
462,
1678,
5829,
29922,
798,
29889,
2029,
3366,
21263,
5829,
12436,
13,
462,
1678,
6993,
29918,
1853,
29922,
798,
29889,
2029,
3366,
13228,
1134,
12436,
13,
462,
1678,
14523,
29922,
798,
29889,
2029,
3366,
1252,
3167,
12436,
13,
462,
1678,
8078,
29918,
2311,
29922,
798,
29889,
2029,
3366,
21263,
2159,
3108,
13,
18884,
10353,
13,
18884,
14728,
29922,
798,
29889,
2029,
3366,
22930,
537,
12436,
13,
18884,
8666,
29922,
798,
29889,
2029,
3366,
13026,
12436,
13,
18884,
12969,
29922,
798,
29889,
2029,
3366,
5261,
2333,
3108,
13,
9651,
1723,
363,
17117,
1948,
297,
22160,
29918,
2176,
29889,
1524,
5727,
580,
13,
4706,
4514,
13,
4706,
736,
22160,
13,
13,
1678,
822,
903,
26017,
29918,
29886,
12938,
29898,
1311,
29897,
1599,
360,
919,
29961,
29911,
6541,
29892,
1588,
1575,
19204,
5387,
13,
4706,
9995,
11796,
267,
349,
29876,
29931,
931,
3652,
363,
1269,
310,
278,
16892,
414,
29889,
9995,
13,
4706,
260,
6541,
29918,
517,
29918,
29886,
12938,
29918,
13757,
353,
426,
29873,
6541,
29901,
1583,
3032,
29886,
12938,
29918,
15807,
1061,
29889,
26017,
29918,
29886,
12938,
29898,
29873,
6541,
29892,
1583,
29889,
3286,
7387,
29892,
1583,
3032,
2962,
29918,
1256,
29892,
13,
462,
462,
462,
462,
308,
1583,
3032,
355,
29918,
1256,
29897,
363,
260,
6541,
297,
1583,
29889,
24667,
414,
29913,
13,
4706,
736,
260,
6541,
29918,
517,
29918,
29886,
12938,
29918,
13757,
13,
13,
1678,
822,
903,
1202,
29918,
546,
13390,
29918,
6112,
6765,
29898,
1311,
29892,
260,
6541,
29918,
517,
29918,
29886,
12938,
29918,
13757,
29901,
360,
919,
29961,
29911,
6541,
29892,
1588,
1575,
19204,
29962,
1125,
13,
4706,
9995,
3251,
403,
4180,
322,
4216,
3204,
24580,
29892,
607,
3867,
278,
10230,
1546,
278,
13705,
4180,
13,
4706,
322,
5373,
29891,
322,
21771,
4180,
363,
1269,
310,
278,
21608,
29889,
13,
4706,
9995,
13,
4706,
1583,
29889,
3225,
29889,
1202,
29918,
5029,
29898,
4373,
5074,
2642,
3101,
13,
4706,
1583,
29889,
3225,
29889,
1202,
29918,
5029,
29898,
5494,
292,
2642,
29898,
5563,
29922,
29906,
29892,
1426,
543,
5894,
13390,
322,
18492,
3204,
29879,
448,
3767,
8963,
7186,
5373,
29891,
322,
21771,
5783,
13,
4706,
1583,
29889,
3225,
29889,
1202,
29918,
5029,
29898,
2177,
9895,
2642,
14182,
29876,
5783,
13,
13,
4706,
363,
260,
6541,
297,
1583,
29889,
24667,
414,
29901,
13,
9651,
6856,
353,
1583,
3032,
657,
29918,
1482,
29918,
7720,
580,
13,
9651,
15649,
29918,
392,
29918,
8948,
29918,
18280,
353,
1583,
3032,
17158,
29918,
2423,
29891,
29918,
392,
29918,
8948,
29918,
18280,
29898,
29873,
6541,
29897,
13,
13,
9651,
13705,
29918,
735,
1066,
545,
29918,
13757,
353,
260,
6541,
29918,
517,
29918,
29886,
12938,
29918,
13757,
29961,
29873,
6541,
1822,
517,
29918,
12857,
29918,
18280,
2141,
5589,
1056,
29898,
29900,
29889,
29900,
29897,
13,
9651,
13705,
29918,
735,
1066,
545,
29918,
13757,
353,
13705,
29918,
735,
1066,
545,
29918,
13757,
29889,
3062,
29898,
710,
8963,
29918,
735,
1066,
545,
29918,
13757,
1275,
29871,
29900,
29889,
29900,
467,
5589,
1056,
29898,
29896,
29889,
29900,
29897,
13,
9651,
13705,
29918,
18280,
353,
15649,
29918,
392,
29918,
8948,
29918,
18280,
334,
13705,
29918,
735,
1066,
545,
29918,
13757,
13,
9651,
13705,
29918,
18280,
353,
13705,
29918,
18280,
29889,
8865,
1056,
580,
13,
9651,
13705,
29918,
18280,
29889,
978,
353,
376,
26910,
29908,
13,
13,
9651,
565,
7431,
29898,
710,
8963,
29918,
18280,
29897,
1405,
29871,
29900,
29901,
13,
18884,
23895,
29918,
15425,
353,
1583,
3032,
657,
29918,
546,
29888,
29918,
15425,
4197,
2423,
29891,
29918,
392,
29918,
8948,
29918,
18280,
29892,
13705,
29918,
18280,
1402,
7700,
29892,
13,
462,
462,
462,
29871,
376,
5894,
13390,
448,
6571,
1642,
4830,
29898,
29873,
6541,
29889,
978,
876,
13,
13,
18884,
1090,
13405,
29918,
15425,
353,
1583,
3032,
657,
29918,
5062,
13405,
29918,
15425,
29898,
710,
8963,
29918,
18280,
29889,
517,
29918,
558,
1575,
3285,
13,
462,
462,
462,
795,
3611,
543,
8537,
3204,
448,
6571,
1642,
4830,
29898,
29873,
6541,
29889,
978,
511,
13,
462,
462,
462,
795,
23513,
29918,
13757,
29922,
2423,
29891,
29918,
392,
29918,
8948,
29918,
18280,
29889,
517,
29918,
558,
1575,
3285,
13,
462,
462,
462,
795,
16734,
29918,
29916,
29918,
8990,
29922,
5574,
29897,
13,
13,
18884,
6856,
29889,
1202,
29918,
15425,
29898,
546,
29888,
29918,
15425,
29897,
13,
18884,
6856,
29889,
1202,
29918,
15425,
29898,
5062,
13405,
29918,
15425,
29897,
13,
18884,
1583,
29889,
3225,
29889,
1202,
29918,
5029,
29898,
7720,
29897,
13,
9651,
1683,
29901,
13,
18884,
1583,
3032,
21707,
29889,
27392,
703,
3782,
848,
338,
3625,
363,
426,
1836,
1939,
24580,
674,
367,
5759,
1213,
29889,
4830,
29898,
29873,
6541,
29889,
978,
876,
13,
13,
1678,
822,
903,
17158,
29918,
2423,
29891,
29918,
392,
29918,
8948,
29918,
18280,
29898,
1311,
29892,
260,
6541,
29901,
323,
6541,
29897,
1599,
12545,
11609,
29879,
19204,
29901,
13,
4706,
9995,
11796,
267,
3652,
310,
2560,
3639,
29892,
607,
723,
367,
4133,
491,
278,
5373,
29891,
322,
21771,
13705,
29889,
9995,
13,
4706,
565,
338,
8758,
29898,
29873,
6541,
29892,
16367,
29911,
6541,
1125,
13,
9651,
1018,
29901,
13,
18884,
260,
6541,
29889,
24926,
29918,
1272,
29918,
18121,
29898,
29903,
1803,
519,
14745,
29898,
1311,
3032,
355,
29918,
1256,
511,
1583,
3032,
1272,
29918,
18121,
29897,
13,
18884,
3105,
1973,
29918,
14153,
353,
20582,
1973,
14688,
29898,
29873,
6541,
29892,
1583,
3032,
1272,
29918,
18121,
29892,
20582,
1973,
3253,
5143,
358,
4062,
29889,
29933,
11375,
29918,
3035,
29967,
17321,
3352,
29897,
13,
18884,
26094,
29918,
13757,
353,
3105,
1973,
29918,
14153,
29889,
657,
29918,
9175,
29898,
13026,
3073,
29889,
11123,
29892,
1583,
3032,
2962,
29918,
1256,
29892,
1583,
3032,
355,
29918,
1256,
29897,
13,
9651,
5174,
1939,
7211,
29911,
6541,
2451,
29901,
13,
18884,
26094,
29918,
13757,
353,
1588,
1575,
19204,
580,
13,
4706,
1683,
29901,
13,
9651,
26094,
29918,
13757,
353,
1583,
3032,
1272,
29918,
18121,
29889,
657,
29918,
9175,
29898,
29873,
6541,
29892,
20743,
3073,
29889,
11123,
29892,
1583,
3032,
2962,
29918,
1256,
29892,
1583,
3032,
355,
29918,
1256,
29897,
13,
13,
4706,
3639,
29918,
29873,
1516,
353,
26094,
29918,
13757,
29889,
517,
29918,
12857,
29918,
18280,
2141,
6506,
4197,
29899,
9302,
29889,
7192,
29892,
7442,
29889,
7192,
1402,
7442,
29889,
13707,
467,
5589,
1056,
29898,
29900,
29889,
29900,
29897,
13,
4706,
3639,
29918,
29873,
1516,
29889,
978,
353,
376,
3727,
29891,
322,
21771,
29908,
13,
4706,
736,
3639,
29918,
29873,
1516,
13,
13,
1678,
822,
903,
1202,
29918,
29886,
12938,
29918,
392,
29918,
546,
13390,
29918,
1285,
3224,
29918,
24051,
29898,
1311,
29892,
260,
6541,
29918,
517,
29918,
29886,
12938,
29901,
360,
919,
29961,
29911,
6541,
29892,
1588,
1575,
19204,
29962,
1125,
13,
4706,
396,
1152,
1269,
260,
6541,
10272,
278,
349,
29876,
29931,
363,
1269,
3785,
313,
4204,
1629,
29892,
4098,
2992,
29897,
13,
4706,
282,
12938,
29918,
2176,
353,
660,
29943,
17271,
29889,
3166,
29918,
8977,
29898,
29873,
6541,
29918,
517,
29918,
29886,
12938,
29897,
13,
4706,
946,
29887,
29918,
546,
13390,
353,
282,
12938,
29918,
2176,
29889,
27789,
29898,
15926,
29889,
3338,
283,
546,
29898,
1989,
29922,
29886,
12938,
29918,
2176,
29889,
2248,
29889,
978,
29892,
3005,
29939,
29922,
1311,
3032,
10745,
23860,
29889,
517,
29918,
15112,
29918,
29888,
7971,
22130,
320,
13,
9651,
869,
7302,
29898,
2892,
269,
29901,
269,
29889,
309,
542,
14352,
29896,
29962,
448,
269,
29889,
309,
542,
29961,
29900,
2314,
13,
13,
4706,
396,
19191,
278,
1897,
11073,
29892,
577,
393,
896,
1298,
3721,
304,
278,
5545,
931,
3515,
13,
4706,
1897,
29918,
21134,
29918,
4830,
353,
426,
13,
9651,
3878,
23860,
29889,
29979,
26441,
16786,
29901,
11860,
29979,
613,
13,
9651,
3878,
23860,
29889,
22877,
4690,
16786,
29901,
11860,
29890,
1273,
29979,
613,
13,
4706,
500,
13,
4706,
4341,
29918,
4830,
353,
1897,
29918,
21134,
29918,
4830,
29961,
1311,
3032,
10745,
23860,
29962,
13,
4706,
4180,
29918,
2176,
353,
946,
29887,
29918,
546,
13390,
29889,
1267,
420,
29898,
2248,
29922,
2892,
14334,
29901,
14334,
29889,
710,
615,
603,
29898,
13099,
29918,
4830,
876,
13,
13,
4706,
396,
4103,
4220,
278,
2441,
848,
3515,
29892,
577,
393,
4180,
363,
1269,
3785,
338,
9132,
297,
263,
5004,
1897,
13,
4706,
4180,
29918,
2176,
353,
4180,
29918,
2176,
29889,
3286,
4220,
580,
13,
4706,
4180,
29918,
2176,
29889,
2248,
353,
4180,
29918,
2176,
29889,
2248,
29889,
842,
29918,
7039,
703,
26405,
1159,
13,
4706,
4180,
29918,
2176,
353,
4180,
29918,
2176,
29889,
12071,
29918,
2248,
580,
13,
4706,
4180,
29918,
2176,
3366,
26405,
3108,
353,
4180,
29918,
2176,
3366,
26405,
16862,
7302,
29898,
2892,
260,
29901,
260,
29889,
978,
29897,
13,
13,
4706,
4180,
29918,
24051,
353,
1583,
3032,
3258,
29918,
546,
13390,
29918,
24051,
29898,
546,
13390,
29918,
2176,
29889,
8552,
3101,
13,
4706,
4180,
29918,
1285,
3224,
29918,
24051,
353,
1583,
3032,
3258,
29918,
546,
13390,
29918,
1285,
3224,
29918,
24051,
29898,
546,
13390,
29918,
2176,
29889,
8552,
3101,
13,
13,
4706,
396,
3462,
278,
1426,
322,
599,
13994,
964,
278,
1842,
13,
4706,
1583,
29889,
3225,
29889,
1202,
29918,
5029,
29898,
5494,
292,
2642,
29898,
5563,
29922,
29906,
29892,
1426,
543,
1184,
9202,
322,
365,
2209,
5783,
13,
4706,
1583,
29889,
3225,
29889,
1202,
29918,
5029,
29898,
2177,
9895,
2642,
703,
1576,
1494,
6131,
3867,
278,
4902,
373,
278,
14990,
21665,
322,
376,
13,
462,
462,
462,
259,
376,
6758,
363,
1269,
24342,
313,
1333,
1848,
297,
27550,
10340,
467,
5783,
13,
4706,
1583,
29889,
3225,
29889,
1202,
29918,
5029,
29898,
2177,
9895,
2642,
14182,
29876,
5783,
13,
13,
4706,
363,
1591,
297,
4180,
29918,
24051,
29901,
13,
9651,
1583,
29889,
3225,
29889,
1202,
29918,
5029,
29898,
5494,
292,
2642,
29898,
5563,
29922,
29941,
29892,
1426,
543,
5894,
13390,
1546,
29901,
6571,
448,
6571,
1642,
4830,
29898,
13,
18884,
1591,
29889,
4299,
29889,
1272,
29889,
13099,
29961,
29896,
1402,
1591,
29889,
4299,
29889,
1272,
29889,
13099,
14352,
29896,
29962,
4961,
13,
9651,
1583,
29889,
3225,
29889,
1202,
29918,
5029,
29898,
2371,
29897,
13,
9651,
1583,
29889,
3225,
29889,
1202,
29918,
5029,
29898,
2177,
9895,
2642,
14182,
29876,
5783,
13,
13,
4706,
1583,
29889,
3225,
29889,
1202,
29918,
5029,
29898,
4373,
5074,
2642,
3101,
13,
13,
4706,
396,
3462,
4180,
11896,
1591,
13,
4706,
1583,
29889,
3225,
29889,
1202,
29918,
5029,
29898,
5494,
292,
2642,
29898,
5563,
29922,
29906,
29892,
1426,
543,
5894,
13390,
11896,
5783,
13,
4706,
363,
1591,
297,
4180,
29918,
1285,
3224,
29918,
24051,
29901,
13,
9651,
1583,
29889,
3225,
29889,
1202,
29918,
5029,
29898,
5494,
292,
2642,
29898,
5563,
29922,
29941,
29892,
1426,
543,
5894,
13390,
11896,
1546,
6571,
448,
6571,
1642,
4830,
29898,
13,
18884,
1591,
29889,
4299,
29889,
1272,
29889,
13099,
29961,
29896,
1402,
1591,
29889,
4299,
29889,
1272,
29889,
13099,
14352,
29896,
29962,
4961,
13,
9651,
1583,
29889,
3225,
29889,
1202,
29918,
5029,
29898,
2371,
29897,
13,
13,
1678,
822,
903,
3258,
29918,
546,
13390,
29918,
24051,
29898,
1311,
29892,
4180,
29918,
2176,
29901,
660,
29943,
17271,
29897,
1599,
2391,
29961,
4037,
3562,
5387,
13,
4706,
9995,
6204,
263,
20917,
360,
29943,
3562,
714,
310,
278,
4180,
29918,
2176,
848,
3515,
29889,
9995,
13,
4706,
16985,
29918,
13099,
353,
518,
1054,
363,
784,
297,
4180,
29918,
2176,
29889,
13099,
565,
338,
29918,
21574,
29918,
29881,
1853,
29898,
546,
13390,
29918,
2176,
29961,
1054,
2314,
29962,
13,
4706,
4180,
29918,
2176,
29961,
21574,
29918,
13099,
29962,
353,
4180,
29918,
2176,
29961,
21574,
29918,
13099,
1822,
7302,
1958,
29898,
2892,
921,
29901,
22372,
29901,
7671,
29900,
29888,
29913,
4286,
4830,
29898,
29916,
876,
13,
4706,
4180,
29918,
2176,
353,
4180,
29918,
2176,
29889,
842,
29918,
2248,
703,
26405,
2564,
6605,
29918,
2248,
580,
13,
13,
4706,
396,
4910,
680,
278,
4180,
4489,
964,
263,
1353,
310,
848,
16608,
29892,
577,
393,
1269,
310,
963,
3743,
701,
304,
13,
4706,
396,
1583,
29889,
3317,
29918,
1054,
29918,
546,
29918,
3488,
4341,
29892,
541,
3013,
278,
937,
1897,
310,
278,
2441,
4489,
297,
599,
310,
963,
13,
4706,
6219,
29918,
29069,
353,
7442,
29889,
2378,
29918,
5451,
29898,
546,
13390,
29918,
2176,
29892,
7442,
29889,
27696,
29898,
546,
13390,
29918,
2176,
29889,
1949,
29918,
974,
29918,
13099,
847,
1583,
3032,
3317,
29918,
13099,
29918,
546,
29918,
3488,
511,
13,
462,
462,
259,
9685,
29922,
29896,
29897,
13,
4706,
4489,
29918,
24051,
353,
518,
4037,
3562,
29898,
2176,
29889,
12071,
29918,
2248,
3285,
5997,
29918,
13203,
29922,
1839,
2371,
742,
525,
845,
29878,
682,
29899,
5657,
742,
525,
1266,
29899,
2520,
742,
525,
8157,
29899,
4102,
29899,
4914,
11287,
13,
462,
268,
363,
4489,
297,
6219,
29918,
29069,
29962,
13,
4706,
736,
4489,
29918,
24051,
13,
13,
1678,
822,
903,
3258,
29918,
546,
13390,
29918,
1285,
3224,
29918,
24051,
29898,
1311,
29892,
4180,
29918,
2176,
29901,
660,
29943,
17271,
29897,
1599,
2391,
29961,
4037,
3562,
5387,
13,
4706,
9995,
13,
4706,
6204,
263,
1051,
310,
360,
7818,
1849,
411,
21608,
2983,
297,
278,
2380,
322,
1422,
2440,
847,
7378,
297,
4341,
29892,
607,
3743,
13,
4706,
4902,
373,
278,
4180,
11896,
363,
1269,
24342,
29889,
13,
4706,
9995,
13,
4706,
396,
6204,
263,
660,
29943,
19204,
607,
3743,
278,
2847,
5253,
310,
274,
1161,
297,
278,
2011,
25648,
363,
1269,
1629,
847,
4098,
13,
4706,
16985,
29918,
13099,
353,
518,
1054,
363,
784,
297,
4180,
29918,
2176,
29889,
13099,
565,
338,
29918,
21574,
29918,
29881,
1853,
29898,
546,
13390,
29918,
2176,
29961,
1054,
2314,
29962,
13,
4706,
2011,
25648,
29918,
5975,
353,
4180,
29918,
2176,
29961,
21574,
29918,
13099,
1822,
2083,
2141,
10889,
29898,
5589,
29918,
1767,
29922,
1311,
3032,
11228,
29918,
29883,
1161,
467,
29883,
398,
2083,
580,
13,
4706,
4180,
29918,
2176,
29961,
21574,
29918,
13099,
29962,
353,
4180,
29918,
2176,
29961,
21574,
29918,
13099,
29962,
847,
2011,
25648,
29918,
5975,
29961,
21574,
29918,
13099,
29962,
13,
13,
4706,
396,
3462,
7663,
1897,
322,
20431,
848,
16205,
13,
4706,
260,
6541,
29918,
978,
29918,
517,
29918,
7320,
353,
426,
29873,
29889,
978,
29901,
7663,
363,
260,
29892,
7663,
297,
1583,
3032,
29873,
6541,
29918,
517,
29918,
7320,
29889,
7076,
28296,
13,
4706,
4180,
29918,
2176,
3366,
10900,
3108,
353,
4180,
29918,
2176,
3366,
26405,
16862,
7302,
29898,
2892,
260,
29901,
260,
6541,
29918,
978,
29918,
517,
29918,
7320,
29961,
29873,
2314,
13,
4706,
599,
29918,
20683,
353,
1051,
29898,
842,
29898,
29873,
6541,
29918,
978,
29918,
517,
29918,
7320,
29889,
5975,
22130,
13,
4706,
4180,
29918,
2176,
353,
4180,
29918,
2176,
29889,
6605,
29918,
5975,
29898,
1609,
29922,
3366,
10900,
613,
376,
26405,
20068,
13,
4706,
4180,
29918,
2176,
353,
4180,
29918,
2176,
29889,
27789,
703,
10900,
2564,
7302,
29898,
13,
9651,
14013,
270,
29901,
10518,
29889,
17685,
4197,
4040,
1575,
17271,
3319,
1068,
6377,
26405,
1115,
518,
29881,
29889,
978,
1402,
376,
10900,
1115,
518,
29881,
29889,
978,
29962,
1118,
13,
462,
462,
462,
29871,
3579,
29912,
29883,
29901,
518,
29881,
29961,
29883,
1822,
2083,
580,
29962,
363,
274,
297,
16985,
29918,
13099,
930,
511,
270,
1402,
13,
462,
18884,
11455,
29918,
2248,
29922,
5574,
8106,
8865,
29898,
13099,
29922,
3366,
10900,
20068,
13,
13,
4706,
396,
3462,
278,
14990,
23768,
1948,
313,
4563,
680,
491,
29871,
29906,
408,
278,
4489,
3743,
2307,
11404,
630,
848,
363,
1269,
2318,
29897,
13,
4706,
3001,
29918,
2083,
29918,
798,
353,
4180,
29918,
2176,
29961,
21574,
29918,
13099,
1822,
2083,
580,
847,
29871,
29906,
13,
4706,
3001,
29918,
2083,
29918,
798,
3366,
26405,
3108,
353,
376,
11536,
23768,
29908,
13,
4706,
4180,
29918,
2176,
353,
4180,
29918,
2176,
29889,
4397,
29898,
7827,
29918,
2083,
29918,
798,
29892,
11455,
29918,
2248,
29922,
5574,
29897,
13,
13,
4706,
396,
19191,
278,
4206,
773,
278,
19649,
883,
2620,
13,
4706,
4180,
29918,
2176,
29961,
21574,
29918,
13099,
29962,
353,
4180,
29918,
2176,
29961,
21574,
29918,
13099,
1822,
7302,
1958,
29898,
2892,
921,
29901,
22372,
29901,
29889,
29906,
29995,
29913,
4286,
4830,
29898,
29916,
876,
13,
13,
4706,
396,
4910,
680,
278,
4180,
12205,
964,
263,
1353,
310,
848,
19935,
29892,
577,
393,
1269,
310,
963,
3743,
701,
304,
13,
4706,
396,
1583,
3032,
3317,
29918,
13099,
29918,
546,
29918,
3488,
4341,
13,
4706,
6219,
29918,
29069,
353,
7442,
29889,
2378,
29918,
5451,
29898,
546,
13390,
29918,
2176,
29889,
842,
29918,
2248,
703,
26405,
4968,
13,
462,
462,
259,
7442,
29889,
27696,
3552,
546,
13390,
29918,
2176,
29889,
1949,
29918,
974,
29918,
13099,
448,
29871,
29896,
29897,
847,
1583,
3032,
3317,
29918,
13099,
29918,
546,
29918,
3488,
511,
9685,
29922,
29896,
29897,
13,
4706,
4489,
29918,
24051,
353,
518,
4037,
3562,
29898,
2176,
29889,
12071,
29918,
2248,
3285,
5997,
29918,
13203,
29922,
1839,
2371,
742,
525,
845,
29878,
682,
29899,
5657,
742,
525,
1266,
29899,
2520,
742,
525,
8157,
29899,
4102,
29899,
4914,
11287,
13,
462,
268,
363,
4489,
297,
6219,
29918,
29069,
29962,
13,
13,
4706,
396,
3617,
278,
16285,
310,
4206,
29892,
607,
1712,
7663,
5235,
13,
4706,
7663,
29918,
513,
1575,
353,
4180,
29918,
2176,
29961,
546,
13390,
29918,
2176,
3366,
26405,
16862,
275,
262,
29898,
497,
29918,
20683,
29897,
1822,
2248,
13,
13,
4706,
363,
4489,
29918,
2371,
297,
4489,
29918,
24051,
29901,
13,
9651,
396,
3462,
1591,
15998,
29892,
12141,
4206,
6445,
278,
3001,
11896,
310,
278,
2183,
7663,
13,
9651,
4489,
29918,
2371,
29889,
1202,
29918,
5727,
29918,
9783,
29898,
7320,
29918,
513,
1575,
29892,
8853,
5657,
29899,
7915,
1115,
376,
8934,
613,
376,
5657,
29899,
2311,
1115,
376,
29900,
29889,
29929,
29945,
331,
613,
13,
462,
462,
462,
4706,
376,
7042,
29899,
2780,
1115,
12305,
29883,
6448,
29900,
29881,
29906,
29908,
1800,
13,
9651,
4489,
29918,
2371,
29889,
1202,
29918,
5727,
29918,
9783,
4197,
546,
13390,
29918,
2176,
29889,
2248,
14352,
29896,
20526,
8853,
5657,
29899,
7915,
1115,
376,
8934,
613,
376,
5657,
29899,
2311,
1115,
376,
29900,
29889,
29929,
29945,
331,
613,
13,
462,
462,
462,
462,
29871,
376,
7042,
29899,
2780,
1115,
12305,
29890,
29929,
12328,
6448,
29908,
1800,
13,
4706,
736,
4489,
29918,
24051,
13,
13,
1678,
822,
4078,
29898,
1311,
29892,
3461,
29918,
3972,
29901,
851,
353,
5124,
1125,
13,
4706,
396,
3789,
278,
3114,
363,
278,
3461,
13,
4706,
14770,
29889,
3293,
29889,
1509,
18959,
371,
1503,
4155,
11287,
13,
4706,
10422,
353,
11860,
29979,
29918,
29995,
29885,
29918,
29995,
29881,
19222,
29950,
29995,
29924,
426,
1836,
5140,
1642,
4830,
29898,
1311,
29889,
3257,
29897,
13,
4706,
10422,
353,
12865,
29889,
3707,
2141,
710,
615,
603,
29898,
9507,
29897,
13,
13,
4706,
736,
1583,
29889,
5140,
29918,
735,
18505,
29889,
17158,
4197,
1311,
29889,
3225,
1402,
3461,
29918,
3972,
29892,
10422,
29897,
13,
2
] |
prologix_usb.py | rohankumardubey/pylt | 0 | 54089 | #!/usr/local/bin/python
from __future__ import print_function
import sys
import time
import serial
import pylt
pusb = dict()
ver = "Prologix GPIB-USB Controller version 6.95"
hwset = (
"addr",
"auto",
"eoi",
"eos",
"eot_enable",
"eot_char",
"read_tmo_ms"
)
def def_set(setting):
setting["auto"] = 0
setting["eoi"] = 1
setting["eos"] = 0
setting["eot_enable"] = 0
setting["eot_char"] = 0
setting["read_tmo_ms"] = 500
setting["rd_mode"] = "eoi"
setting["autocr"] = 1
class prologix_usb(object):
def __init__(self, name):
self.name = name
self.debug_fd = open("_." + name, "w")
self.debug("====", "=============================")
self.ser = serial.Serial("/dev/" + name, 115200, timeout = 0.5)
self.version_check()
self.curset = dict()
self.rd_settings()
d = dict()
def_set(d)
self.set(d)
pusb[name] = self
def debug(self, pfx, str):
print((self.name, "%.6f" % time.time(), pfx, str),
file=self.debug_fd)
self.debug_fd.flush()
def version_check(self):
self.ser.write("\r")
self.cmd("++mode 1")
self.cmd("++auto 0")
self.cmd("++addr 0")
self.cmd("++savecfg 0")
self.cmd("++ifc")
while True:
x = self.ask("++ver")
if x == ver:
break;
assert x == ver
def ask(self, str):
self.cmd(str)
x = self.ser.readline()
x = x.strip("\r\n")
self.debug("{r", x)
return (x)
def rd_settings(self):
for i in hwset:
self.curset[i] = self.ask("++" + i)
def cmd(self, str):
assert str[0:2] == "++"
self.debug("}w", str)
self.ser.write(str + "\r")
def rd_eoi(self):
self.cmd("++read eoi")
x = self.ser.readline()
self.debug("<eoi<", x)
return (x)
def rd_chr(self, chr):
self.cmd("++read %d" % chr)
x = self.ser.readline()
self.debug("<%d<" % chr, x)
return (x)
def rd_bin(self, nbr, eoi = True):
if eoi:
self.cmd("++read eoi")
else:
self.cmd("++read")
x = self.ser.read(nbr)
x = bytearray(x)
self.debug("<%d/%d<" % (nbr, len(x)), x)
return (x)
def wr(self, str):
assert str[0:2] != "++"
self.debug(">", str)
self.ser.write(str + "\r")
def set(self, settings):
for i in hwset:
if i not in settings:
continue
if str(settings[i]) == self.curset[i]:
continue
self.cmd("++" + i + " %d" % settings[i])
self.curset[i] = "%d" % settings[i]
if "read_tmo_ms" in settings:
to = settings["read_tmo_ms"]
self.ser.timeout = (to + 500) * 1e-3
def spoll(self):
self.cmd("++spoll")
while True:
a = self.ser.readline()
self.debug("<sp<", a)
if a.strip().isdigit():
break
return(int(a))
def trigger(self):
self.cmd("++trg")
def clear(self):
self.cmd("++clr")
class gpib_dev(pylt.pylt):
def __init__(self, name, adr):
if not name in pusb:
x = prologix_usb(name)
self.pusb = pusb[name]
self.debug_fd = self.pusb.debug_fd
pylt.pylt.__init__(self)
self.setting = dict()
def_set(self.setting)
self.setting["addr"] = adr
def wr(self, str):
self.pusb.set(self.setting)
self.pusb.wr(str)
def rd_eoi(self, tmo=None, fail=True):
self.pusb.set(self.setting)
x = self.pusb.rd_eoi()
if self.setting["autocr"]:
x = x.strip("\r\n")
return (x)
def rd_chr(self, chr=10, tmo=None, fail=True):
self.pusb.set(self.setting)
x = self.pusb.rd_chr(chr)
if self.setting["autocr"]:
x = x.strip("\r\n")
return (x)
def rd_bin(self, cnt=1, tmo=None, fail=True):
self.pusb.set(self.setting)
x = self.pusb.rd_bin(cnt)
return (x)
def rd(self, tmo=None, fail=True):
m = self.setting["rd_mode"]
if m == "eoi":
return self.rd_eoi()
else:
return self.rd_chr(m)
def attr(self, name, val):
self.setting[name] = val
def spoll(self):
self.pusb.set(self.setting)
return(self.pusb.spoll())
def trigger(self):
self.pusb.set(self.setting)
return(self.pusb.trigger())
def clear(self):
self.pusb.set(self.setting)
self.pusb.clear()
| [
1,
18787,
4855,
29914,
2997,
29914,
2109,
29914,
4691,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
13,
5215,
10876,
13,
5215,
931,
13,
5215,
7797,
13,
5215,
11451,
1896,
13,
13,
13364,
29890,
353,
9657,
580,
13,
13,
369,
353,
376,
1184,
1188,
861,
402,
2227,
29933,
29899,
29965,
1744,
15830,
1873,
29871,
29953,
29889,
29929,
29945,
29908,
13,
13,
26828,
842,
353,
313,
13,
12,
12,
29908,
10030,
613,
13,
12,
12,
29908,
6921,
613,
13,
12,
12,
29908,
29872,
7768,
613,
13,
12,
12,
29908,
29872,
359,
613,
13,
12,
12,
29908,
29872,
327,
29918,
12007,
613,
13,
12,
12,
29908,
29872,
327,
29918,
3090,
613,
13,
12,
12,
29908,
949,
29918,
29873,
4346,
29918,
1516,
29908,
13,
12,
29897,
13,
13,
1753,
822,
29918,
842,
29898,
26740,
1125,
13,
12,
26740,
3366,
6921,
3108,
353,
29871,
29900,
13,
12,
26740,
3366,
29872,
7768,
3108,
353,
29871,
29896,
13,
12,
26740,
3366,
29872,
359,
3108,
353,
29871,
29900,
13,
12,
26740,
3366,
29872,
327,
29918,
12007,
3108,
353,
29871,
29900,
13,
12,
26740,
3366,
29872,
327,
29918,
3090,
3108,
353,
29871,
29900,
13,
12,
26740,
3366,
949,
29918,
29873,
4346,
29918,
1516,
3108,
353,
29871,
29945,
29900,
29900,
13,
12,
26740,
3366,
5499,
29918,
8513,
3108,
353,
376,
29872,
7768,
29908,
13,
13,
12,
26740,
3366,
1300,
8415,
3108,
353,
29871,
29896,
13,
13,
1990,
410,
1188,
861,
29918,
28685,
29898,
3318,
1125,
13,
13,
12,
1753,
4770,
2344,
12035,
1311,
29892,
1024,
1125,
13,
12,
12,
1311,
29889,
978,
353,
1024,
13,
12,
12,
1311,
29889,
8382,
29918,
11512,
353,
1722,
703,
29918,
1213,
718,
1024,
29892,
376,
29893,
1159,
13,
12,
12,
1311,
29889,
8382,
703,
25512,
543,
29892,
376,
9166,
4936,
2751,
543,
29897,
13,
13,
12,
12,
1311,
29889,
643,
353,
7797,
29889,
9125,
11974,
3359,
12975,
718,
1024,
29892,
29871,
29896,
29896,
29945,
29906,
29900,
29900,
29892,
11815,
353,
29871,
29900,
29889,
29945,
29897,
13,
12,
12,
1311,
29889,
3259,
29918,
3198,
580,
13,
12,
12,
1311,
29889,
2764,
842,
353,
9657,
580,
13,
12,
12,
1311,
29889,
5499,
29918,
11027,
580,
13,
12,
12,
29881,
353,
9657,
580,
13,
12,
12,
1753,
29918,
842,
29898,
29881,
29897,
13,
12,
12,
1311,
29889,
842,
29898,
29881,
29897,
13,
12,
12,
13364,
29890,
29961,
978,
29962,
353,
1583,
13,
13,
12,
1753,
4744,
29898,
1311,
29892,
282,
11093,
29892,
851,
1125,
13,
12,
12,
2158,
3552,
1311,
29889,
978,
29892,
11860,
29889,
29953,
29888,
29908,
1273,
931,
29889,
2230,
3285,
282,
11093,
29892,
851,
511,
13,
12,
12,
1678,
934,
29922,
1311,
29889,
8382,
29918,
11512,
29897,
13,
12,
12,
1311,
29889,
8382,
29918,
11512,
29889,
23126,
580,
13,
13,
12,
1753,
1873,
29918,
3198,
29898,
1311,
1125,
13,
12,
12,
1311,
29889,
643,
29889,
3539,
14182,
29878,
1159,
13,
12,
12,
1311,
29889,
9006,
703,
1817,
8513,
29871,
29896,
1159,
13,
12,
12,
1311,
29889,
9006,
703,
1817,
6921,
29871,
29900,
1159,
13,
12,
12,
1311,
29889,
9006,
703,
1817,
10030,
29871,
29900,
1159,
13,
12,
12,
1311,
29889,
9006,
703,
1817,
7620,
16859,
29871,
29900,
1159,
13,
12,
12,
1311,
29889,
9006,
703,
1817,
361,
29883,
1159,
13,
12,
12,
8000,
5852,
29901,
13,
12,
12,
12,
29916,
353,
1583,
29889,
1278,
703,
1817,
369,
1159,
13,
12,
12,
12,
361,
921,
1275,
1147,
29901,
13,
12,
12,
12,
12,
8690,
29936,
13,
12,
12,
9294,
921,
1275,
1147,
13,
13,
12,
1753,
2244,
29898,
1311,
29892,
851,
1125,
13,
12,
12,
1311,
29889,
9006,
29898,
710,
29897,
13,
12,
12,
29916,
353,
1583,
29889,
643,
29889,
949,
1220,
580,
13,
12,
12,
29916,
353,
921,
29889,
17010,
14182,
29878,
29905,
29876,
1159,
13,
12,
12,
1311,
29889,
8382,
703,
29912,
29878,
613,
921,
29897,
13,
12,
12,
2457,
313,
29916,
29897,
13,
13,
12,
1753,
364,
29881,
29918,
11027,
29898,
1311,
1125,
13,
12,
12,
1454,
474,
297,
298,
29893,
842,
29901,
13,
12,
12,
12,
1311,
29889,
2764,
842,
29961,
29875,
29962,
353,
1583,
29889,
1278,
703,
1817,
29908,
718,
474,
29897,
13,
13,
12,
1753,
9920,
29898,
1311,
29892,
851,
1125,
13,
12,
12,
9294,
851,
29961,
29900,
29901,
29906,
29962,
1275,
376,
1817,
29908,
13,
12,
12,
1311,
29889,
8382,
703,
29913,
29893,
613,
851,
29897,
13,
12,
12,
1311,
29889,
643,
29889,
3539,
29898,
710,
718,
6634,
29878,
1159,
13,
13,
12,
1753,
364,
29881,
29918,
29872,
7768,
29898,
1311,
1125,
13,
12,
12,
1311,
29889,
9006,
703,
1817,
949,
321,
7768,
1159,
13,
12,
12,
29916,
353,
1583,
29889,
643,
29889,
949,
1220,
580,
13,
12,
12,
1311,
29889,
8382,
28945,
29872,
7768,
29966,
613,
29871,
921,
29897,
13,
12,
12,
2457,
313,
29916,
29897,
13,
13,
12,
1753,
364,
29881,
29918,
22495,
29898,
1311,
29892,
18460,
1125,
13,
12,
12,
1311,
29889,
9006,
703,
1817,
949,
1273,
29881,
29908,
1273,
18460,
29897,
13,
12,
12,
29916,
353,
1583,
29889,
643,
29889,
949,
1220,
580,
13,
12,
12,
1311,
29889,
8382,
28945,
29995,
29881,
29966,
29908,
1273,
18460,
29892,
29871,
921,
29897,
13,
12,
12,
2457,
313,
29916,
29897,
13,
13,
12,
1753,
364,
29881,
29918,
2109,
29898,
1311,
29892,
302,
1182,
29892,
321,
7768,
353,
5852,
1125,
13,
12,
12,
361,
321,
7768,
29901,
13,
12,
12,
12,
1311,
29889,
9006,
703,
1817,
949,
321,
7768,
1159,
13,
12,
12,
2870,
29901,
13,
12,
12,
12,
1311,
29889,
9006,
703,
1817,
949,
1159,
13,
12,
12,
29916,
353,
1583,
29889,
643,
29889,
949,
29898,
29876,
1182,
29897,
13,
12,
12,
29916,
353,
7023,
2378,
29898,
29916,
29897,
13,
12,
12,
1311,
29889,
8382,
28945,
29995,
29881,
22584,
29881,
29966,
29908,
1273,
313,
29876,
1182,
29892,
7431,
29898,
29916,
8243,
29871,
921,
29897,
13,
12,
12,
2457,
313,
29916,
29897,
13,
13,
12,
1753,
2358,
29898,
1311,
29892,
851,
1125,
13,
12,
12,
9294,
851,
29961,
29900,
29901,
29906,
29962,
2804,
376,
1817,
29908,
13,
12,
12,
1311,
29889,
8382,
703,
28341,
851,
29897,
13,
12,
12,
1311,
29889,
643,
29889,
3539,
29898,
710,
718,
6634,
29878,
1159,
13,
13,
12,
1753,
731,
29898,
1311,
29892,
6055,
1125,
13,
12,
12,
1454,
474,
297,
298,
29893,
842,
29901,
13,
12,
12,
12,
361,
474,
451,
297,
6055,
29901,
13,
12,
12,
12,
12,
19878,
13,
12,
12,
12,
361,
851,
29898,
11027,
29961,
29875,
2314,
1275,
1583,
29889,
2764,
842,
29961,
29875,
5387,
13,
12,
12,
12,
12,
19878,
13,
12,
12,
12,
1311,
29889,
9006,
703,
1817,
29908,
718,
474,
718,
376,
29871,
1273,
29881,
29908,
1273,
6055,
29961,
29875,
2314,
13,
12,
12,
12,
1311,
29889,
2764,
842,
29961,
29875,
29962,
353,
11860,
29881,
29908,
1273,
6055,
29961,
29875,
29962,
13,
12,
12,
361,
376,
949,
29918,
29873,
4346,
29918,
1516,
29908,
297,
6055,
29901,
13,
12,
12,
12,
517,
353,
6055,
3366,
949,
29918,
29873,
4346,
29918,
1516,
3108,
13,
12,
12,
12,
1311,
29889,
643,
29889,
15619,
353,
313,
517,
718,
29871,
29945,
29900,
29900,
29897,
334,
29871,
29896,
29872,
29899,
29941,
13,
13,
12,
1753,
805,
3028,
29898,
1311,
1125,
13,
12,
12,
1311,
29889,
9006,
703,
1817,
1028,
3028,
1159,
13,
12,
12,
8000,
5852,
29901,
13,
12,
12,
12,
29874,
353,
1583,
29889,
643,
29889,
949,
1220,
580,
13,
12,
12,
12,
1311,
29889,
8382,
28945,
1028,
29966,
613,
263,
29897,
13,
12,
12,
12,
361,
263,
29889,
17010,
2141,
275,
26204,
7295,
13,
12,
12,
12,
12,
8690,
13,
12,
12,
2457,
29898,
524,
29898,
29874,
876,
13,
13,
12,
1753,
7135,
29898,
1311,
1125,
13,
12,
12,
1311,
29889,
9006,
703,
1817,
509,
29887,
1159,
13,
13,
12,
1753,
2821,
29898,
1311,
1125,
13,
12,
12,
1311,
29889,
9006,
703,
1817,
695,
29878,
1159,
13,
13,
1990,
330,
29886,
747,
29918,
3359,
29898,
2272,
1896,
29889,
2272,
1896,
1125,
13,
13,
12,
1753,
4770,
2344,
12035,
1311,
29892,
1024,
29892,
594,
29878,
1125,
13,
12,
12,
361,
451,
1024,
297,
282,
28685,
29901,
13,
12,
12,
12,
29916,
353,
410,
1188,
861,
29918,
28685,
29898,
978,
29897,
13,
13,
12,
12,
1311,
29889,
13364,
29890,
353,
282,
28685,
29961,
978,
29962,
13,
12,
12,
1311,
29889,
8382,
29918,
11512,
353,
1583,
29889,
13364,
29890,
29889,
8382,
29918,
11512,
13,
12,
12,
2272,
1896,
29889,
2272,
1896,
17255,
2344,
12035,
1311,
29897,
13,
13,
12,
12,
1311,
29889,
26740,
353,
9657,
580,
13,
12,
12,
1753,
29918,
842,
29898,
1311,
29889,
26740,
29897,
13,
12,
12,
1311,
29889,
26740,
3366,
10030,
3108,
353,
594,
29878,
13,
13,
13,
12,
1753,
2358,
29898,
1311,
29892,
851,
1125,
13,
12,
12,
1311,
29889,
13364,
29890,
29889,
842,
29898,
1311,
29889,
26740,
29897,
13,
12,
12,
1311,
29889,
13364,
29890,
29889,
15866,
29898,
710,
29897,
13,
13,
12,
1753,
364,
29881,
29918,
29872,
7768,
29898,
1311,
29892,
260,
4346,
29922,
8516,
29892,
4418,
29922,
5574,
1125,
13,
12,
12,
1311,
29889,
13364,
29890,
29889,
842,
29898,
1311,
29889,
26740,
29897,
13,
12,
12,
29916,
353,
1583,
29889,
13364,
29890,
29889,
5499,
29918,
29872,
7768,
580,
13,
12,
12,
361,
1583,
29889,
26740,
3366,
1300,
8415,
3108,
29901,
13,
12,
12,
12,
29916,
353,
921,
29889,
17010,
14182,
29878,
29905,
29876,
1159,
13,
12,
12,
2457,
313,
29916,
29897,
13,
13,
12,
1753,
364,
29881,
29918,
22495,
29898,
1311,
29892,
18460,
29922,
29896,
29900,
29892,
260,
4346,
29922,
8516,
29892,
4418,
29922,
5574,
1125,
13,
12,
12,
1311,
29889,
13364,
29890,
29889,
842,
29898,
1311,
29889,
26740,
29897,
13,
12,
12,
29916,
353,
1583,
29889,
13364,
29890,
29889,
5499,
29918,
22495,
29898,
22495,
29897,
13,
12,
12,
361,
1583,
29889,
26740,
3366,
1300,
8415,
3108,
29901,
13,
12,
12,
12,
29916,
353,
921,
29889,
17010,
14182,
29878,
29905,
29876,
1159,
13,
12,
12,
2457,
313,
29916,
29897,
13,
13,
12,
1753,
364,
29881,
29918,
2109,
29898,
1311,
29892,
274,
593,
29922,
29896,
29892,
260,
4346,
29922,
8516,
29892,
4418,
29922,
5574,
1125,
13,
12,
12,
1311,
29889,
13364,
29890,
29889,
842,
29898,
1311,
29889,
26740,
29897,
13,
12,
12,
29916,
353,
1583,
29889,
13364,
29890,
29889,
5499,
29918,
2109,
29898,
20047,
29897,
13,
12,
12,
2457,
313,
29916,
29897,
13,
13,
12,
1753,
364,
29881,
29898,
1311,
29892,
260,
4346,
29922,
8516,
29892,
4418,
29922,
5574,
1125,
13,
12,
12,
29885,
353,
1583,
29889,
26740,
3366,
5499,
29918,
8513,
3108,
13,
12,
12,
361,
286,
1275,
376,
29872,
7768,
1115,
13,
12,
12,
12,
2457,
1583,
29889,
5499,
29918,
29872,
7768,
580,
13,
12,
12,
2870,
29901,
13,
12,
12,
12,
2457,
1583,
29889,
5499,
29918,
22495,
29898,
29885,
29897,
13,
13,
12,
1753,
12421,
29898,
1311,
29892,
1024,
29892,
659,
1125,
13,
12,
12,
1311,
29889,
26740,
29961,
978,
29962,
353,
659,
13,
13,
12,
1753,
805,
3028,
29898,
1311,
1125,
13,
12,
12,
1311,
29889,
13364,
29890,
29889,
842,
29898,
1311,
29889,
26740,
29897,
13,
12,
12,
2457,
29898,
1311,
29889,
13364,
29890,
29889,
1028,
3028,
3101,
13,
13,
12,
1753,
7135,
29898,
1311,
1125,
13,
12,
12,
1311,
29889,
13364,
29890,
29889,
842,
29898,
1311,
29889,
26740,
29897,
13,
12,
12,
2457,
29898,
1311,
29889,
13364,
29890,
29889,
21001,
3101,
13,
13,
12,
1753,
2821,
29898,
1311,
1125,
13,
12,
12,
1311,
29889,
13364,
29890,
29889,
842,
29898,
1311,
29889,
26740,
29897,
13,
12,
12,
1311,
29889,
13364,
29890,
29889,
8551,
580,
13,
13,
2
] |
ML/nlp/reuters_analysis.py | saneravi/ML_Stuff | 209 | 107210 | #!/usr/bin/env python
from collections import defaultdict
import numpy as np
from nltk.corpus import reuters
def analyze_data_distribution(cat2count):
i = 1
most_frequent_words = sorted(cat2count.items(),
key=lambda n: n[1]['train'],
reverse=True)
for el in most_frequent_words:
cat = el[0]
print("\t{:>2}: {:<20}: {:>4}\t{:>4}\t{:0.1f}"
.format(i, cat,
cat2count[cat]['train'],
cat2count[cat]['test'],
np.array(cat2count[cat]['words']).mean()))
i += 1
def analyze_vocabulary(corpus):
word2count = defaultdict(int)
for word in corpus:
word2count[word] += 1
most_freq = sorted(word2count.items(), key=lambda n: n[1], reverse=True)
for i, el in enumerate(most_freq[:10]):
print("{}. frequent word is {} ({} occurences)"
.format(i, el[0], el[1]))
# Create vocabulary
min_occurences = 20
max_occurences = 50
vocabulary = [word[0]
for word in word2count.items()
if word[1] >= min_occurences and word[1] <= max_occurences]
# Design decision: Should there be a pseudo-word OOV
# (out of vocabulary)?
with_oov = True
if with_oov:
word2wid = {'<OOV>': 0}
else:
word2wid = {}
vocabulary = list(vocabulary)
for wid, word in enumerate(vocabulary, start=len(word2wid)):
word2wid[word] = wid
print("Created word2wid")
# Analyze the vocabulary
print("total vocabulary = {}".format(len(word2count)))
print("vocabulary size = {} (min_occ={}, max_occ={})"
.format(len(word2wid), min_occurences, max_occurences))
def main(categories, document_ids, verbose=False):
print(f"categories: {categories}")
print("number of categories: {}".format(len(categories)))
cat2catid = {}
for catid, cat in enumerate(sorted(categories)):
cat2catid[cat] = catid
documents = document_ids
test = [d for d in documents if d.startswith('test/')]
train = [d for d in documents if d.startswith('training/')]
print("train documents: {}".format(len(train)))
print("test documents: {}".format(len(test)))
# make it easy to map data to label
# gather simple statistics
id2cats = defaultdict(list)
cat2count = {}
for cat in categories:
for fid in reuters.fileids(cat):
id2cats[fid].append(cat)
if cat not in cat2count:
cat2count[cat] = {'train': 0, 'test': 0, 'words': []}
if fid in train:
cat2count[cat]['train'] += 1
else:
cat2count[cat]['test'] += 1
cat2count[cat]['words'].append(len(reuters.words(fid)))
print("How many labels do documents usually have?")
labelcount2doccount = defaultdict(int)
for _, cats in id2cats.items():
labelcount2doccount[len(cats)] += 1
s = sorted(labelcount2doccount.items(), reverse=True, key=lambda n: n[1])
for labelcount, documentcount in s:
print("\tlabelcount={:>3}, documentcount={:>3}"
.format(labelcount, documentcount))
# Analyze data distribution to classes
analyze_data_distribution(cat2count)
# Build corpus
corpus = []
for document_id in train:
corpus += list(reuters.words(document_id))
analyze_vocabulary(corpus)
def find_class_predictors(ys):
class_pred_corr = [[0.0 for _ in range(90)] for _ in range(90)]
class_pred_total = [[0.0 for _ in range(90)] for _ in range(90)]
for document_cats in ys:
for take_i in range(90):
for predict_i in range(90):
if take_i == 0:
continue
class_pred_total[take_i][predict_i] += 1
if document_cats[take_i] == document_cats[predict_i]:
class_pred_corr[take_i][predict_i] += 1
acc = []
for i in range(90):
line = []
for j in range(90):
if class_pred_total[i][j] == 0.0:
score = 0.0
else:
score = class_pred_corr[i][j] / class_pred_total[i][j]
line.append(score)
acc.append(line)
return acc
def print_class_predictors(acc):
score_list = []
for take_i in range(90):
for predict_i in range(90):
score_list.append({'take': take_i,
'pred': predict_i,
'acc': acc[take_i][predict_i]})
score_list = sorted(score_list, key=lambda n: n['acc'], reverse=True)
for el in score_list:
if el['take'] == el['pred']:
continue
take = reuters.labels[el['take']]
pred = reuters.labels[el['pred']]
print("{} => {} ({})".format(take, pred, el['acc']))
if __name__ == '__main__':
# main(reuters.categories(), reuters.fileids())
import reuters
acc = find_class_predictors(reuters.load_data()['y_train'])
print_class_predictors(acc)
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
3166,
16250,
1053,
2322,
8977,
13,
13,
5215,
12655,
408,
7442,
13,
3166,
302,
1896,
29895,
29889,
2616,
13364,
1053,
337,
329,
414,
13,
13,
13,
1753,
27599,
29918,
1272,
29918,
27691,
29898,
4117,
29906,
2798,
1125,
13,
1678,
474,
353,
29871,
29896,
13,
1678,
1556,
29918,
10745,
16011,
29918,
9303,
353,
12705,
29898,
4117,
29906,
2798,
29889,
7076,
3285,
13,
462,
462,
1820,
29922,
2892,
302,
29901,
302,
29961,
29896,
22322,
14968,
7464,
13,
462,
462,
11837,
29922,
5574,
29897,
13,
1678,
363,
560,
297,
1556,
29918,
10745,
16011,
29918,
9303,
29901,
13,
4706,
6635,
353,
560,
29961,
29900,
29962,
13,
4706,
1596,
14182,
29873,
25641,
29958,
29906,
6177,
12365,
29966,
29906,
29900,
6177,
12365,
29958,
29946,
1012,
29873,
25641,
29958,
29946,
1012,
29873,
25641,
29900,
29889,
29896,
29888,
5038,
13,
795,
869,
4830,
29898,
29875,
29892,
6635,
29892,
13,
462,
418,
6635,
29906,
2798,
29961,
4117,
22322,
14968,
7464,
13,
462,
418,
6635,
29906,
2798,
29961,
4117,
22322,
1688,
7464,
13,
462,
418,
7442,
29889,
2378,
29898,
4117,
29906,
2798,
29961,
4117,
22322,
9303,
2033,
467,
12676,
22130,
13,
4706,
474,
4619,
29871,
29896,
13,
13,
13,
1753,
27599,
29918,
29894,
542,
370,
352,
653,
29898,
2616,
13364,
1125,
13,
1678,
1734,
29906,
2798,
353,
2322,
8977,
29898,
524,
29897,
13,
1678,
363,
1734,
297,
1034,
13364,
29901,
13,
4706,
1734,
29906,
2798,
29961,
1742,
29962,
4619,
29871,
29896,
13,
13,
1678,
1556,
29918,
29888,
7971,
353,
12705,
29898,
1742,
29906,
2798,
29889,
7076,
3285,
1820,
29922,
2892,
302,
29901,
302,
29961,
29896,
1402,
11837,
29922,
5574,
29897,
13,
1678,
363,
474,
29892,
560,
297,
26985,
29898,
3242,
29918,
29888,
7971,
7503,
29896,
29900,
29962,
1125,
13,
4706,
1596,
703,
29912,
1836,
17091,
1734,
338,
6571,
313,
8875,
6403,
2063,
5513,
13,
795,
869,
4830,
29898,
29875,
29892,
560,
29961,
29900,
1402,
560,
29961,
29896,
12622,
13,
13,
1678,
396,
6204,
7931,
370,
352,
653,
13,
13,
1678,
1375,
29918,
542,
2764,
2063,
353,
29871,
29906,
29900,
13,
1678,
4236,
29918,
542,
2764,
2063,
353,
29871,
29945,
29900,
13,
1678,
7931,
370,
352,
653,
353,
518,
1742,
29961,
29900,
29962,
13,
462,
29871,
363,
1734,
297,
1734,
29906,
2798,
29889,
7076,
580,
13,
462,
29871,
565,
1734,
29961,
29896,
29962,
6736,
1375,
29918,
542,
2764,
2063,
322,
1734,
29961,
29896,
29962,
5277,
4236,
29918,
542,
2764,
2063,
29962,
13,
13,
1678,
396,
12037,
10608,
29901,
10575,
727,
367,
263,
17381,
29899,
1742,
438,
29949,
29963,
13,
1678,
396,
313,
449,
310,
7931,
370,
352,
653,
6877,
13,
1678,
411,
29918,
29877,
586,
353,
5852,
13,
1678,
565,
411,
29918,
29877,
586,
29901,
13,
4706,
1734,
29906,
9163,
353,
11117,
29966,
29949,
29949,
29963,
29958,
2396,
29871,
29900,
29913,
13,
1678,
1683,
29901,
13,
4706,
1734,
29906,
9163,
353,
6571,
13,
1678,
7931,
370,
352,
653,
353,
1051,
29898,
29894,
542,
370,
352,
653,
29897,
13,
1678,
363,
9449,
29892,
1734,
297,
26985,
29898,
29894,
542,
370,
352,
653,
29892,
1369,
29922,
2435,
29898,
1742,
29906,
9163,
22164,
13,
4706,
1734,
29906,
9163,
29961,
1742,
29962,
353,
9449,
13,
1678,
1596,
703,
20399,
1734,
29906,
9163,
1159,
13,
13,
1678,
396,
11597,
29891,
911,
278,
7931,
370,
352,
653,
13,
1678,
1596,
703,
7827,
7931,
370,
352,
653,
353,
6571,
1642,
4830,
29898,
2435,
29898,
1742,
29906,
2798,
4961,
13,
1678,
1596,
703,
29894,
542,
370,
352,
653,
2159,
353,
6571,
313,
1195,
29918,
15693,
3790,
1118,
4236,
29918,
15693,
3790,
1800,
29908,
13,
3986,
869,
4830,
29898,
2435,
29898,
1742,
29906,
9163,
511,
1375,
29918,
542,
2764,
2063,
29892,
4236,
29918,
542,
2764,
2063,
876,
13,
13,
13,
1753,
1667,
29898,
20683,
29892,
1842,
29918,
4841,
29892,
26952,
29922,
8824,
1125,
13,
1678,
1596,
29898,
29888,
29908,
20683,
29901,
426,
20683,
27195,
13,
1678,
1596,
703,
4537,
310,
13997,
29901,
6571,
1642,
4830,
29898,
2435,
29898,
20683,
4961,
13,
1678,
6635,
29906,
4117,
333,
353,
6571,
13,
1678,
363,
6635,
333,
29892,
6635,
297,
26985,
29898,
24582,
29898,
20683,
22164,
13,
4706,
6635,
29906,
4117,
333,
29961,
4117,
29962,
353,
6635,
333,
13,
13,
1678,
10701,
353,
1842,
29918,
4841,
13,
1678,
1243,
353,
518,
29881,
363,
270,
297,
10701,
565,
270,
29889,
27382,
2541,
877,
1688,
29914,
1495,
29962,
13,
1678,
7945,
353,
518,
29881,
363,
270,
297,
10701,
565,
270,
29889,
27382,
2541,
877,
26495,
29914,
1495,
29962,
13,
1678,
1596,
703,
14968,
10701,
29901,
6571,
1642,
4830,
29898,
2435,
29898,
14968,
4961,
13,
1678,
1596,
703,
1688,
10701,
29901,
6571,
1642,
4830,
29898,
2435,
29898,
1688,
4961,
13,
13,
1678,
396,
1207,
372,
4780,
304,
2910,
848,
304,
3858,
13,
1678,
396,
11705,
2560,
13964,
13,
1678,
1178,
29906,
29883,
1446,
353,
2322,
8977,
29898,
1761,
29897,
13,
1678,
6635,
29906,
2798,
353,
6571,
13,
1678,
363,
6635,
297,
13997,
29901,
13,
4706,
363,
25947,
297,
337,
329,
414,
29889,
1445,
4841,
29898,
4117,
1125,
13,
9651,
1178,
29906,
29883,
1446,
29961,
29888,
333,
1822,
4397,
29898,
4117,
29897,
13,
9651,
565,
6635,
451,
297,
6635,
29906,
2798,
29901,
13,
18884,
6635,
29906,
2798,
29961,
4117,
29962,
353,
11117,
14968,
2396,
29871,
29900,
29892,
525,
1688,
2396,
29871,
29900,
29892,
525,
9303,
2396,
5159,
29913,
13,
9651,
565,
25947,
297,
7945,
29901,
13,
18884,
6635,
29906,
2798,
29961,
4117,
22322,
14968,
2033,
4619,
29871,
29896,
13,
9651,
1683,
29901,
13,
18884,
6635,
29906,
2798,
29961,
4117,
22322,
1688,
2033,
4619,
29871,
29896,
13,
9651,
6635,
29906,
2798,
29961,
4117,
22322,
9303,
13359,
4397,
29898,
2435,
29898,
276,
329,
414,
29889,
9303,
29898,
29888,
333,
4961,
13,
13,
1678,
1596,
703,
5328,
1784,
11073,
437,
10701,
5491,
505,
29973,
1159,
13,
1678,
3858,
2798,
29906,
1514,
2798,
353,
2322,
8977,
29898,
524,
29897,
13,
1678,
363,
17117,
274,
1446,
297,
1178,
29906,
29883,
1446,
29889,
7076,
7295,
13,
4706,
3858,
2798,
29906,
1514,
2798,
29961,
2435,
29898,
29883,
1446,
4638,
4619,
29871,
29896,
13,
1678,
269,
353,
12705,
29898,
1643,
2798,
29906,
1514,
2798,
29889,
7076,
3285,
11837,
29922,
5574,
29892,
1820,
29922,
2892,
302,
29901,
302,
29961,
29896,
2314,
13,
1678,
363,
3858,
2798,
29892,
1842,
2798,
297,
269,
29901,
13,
4706,
1596,
14182,
29873,
1643,
2798,
3790,
29901,
29958,
29941,
1118,
1842,
2798,
3790,
29901,
29958,
29941,
5038,
13,
795,
869,
4830,
29898,
1643,
2798,
29892,
1842,
2798,
876,
13,
13,
1678,
396,
11597,
29891,
911,
848,
4978,
304,
4413,
13,
1678,
27599,
29918,
1272,
29918,
27691,
29898,
4117,
29906,
2798,
29897,
13,
13,
1678,
396,
8878,
1034,
13364,
13,
1678,
1034,
13364,
353,
5159,
13,
1678,
363,
1842,
29918,
333,
297,
7945,
29901,
13,
4706,
1034,
13364,
4619,
1051,
29898,
276,
329,
414,
29889,
9303,
29898,
3225,
29918,
333,
876,
13,
13,
1678,
27599,
29918,
29894,
542,
370,
352,
653,
29898,
2616,
13364,
29897,
13,
13,
13,
1753,
1284,
29918,
1990,
29918,
27711,
943,
29898,
952,
1125,
13,
1678,
770,
29918,
11965,
29918,
29725,
353,
5519,
29900,
29889,
29900,
363,
903,
297,
3464,
29898,
29929,
29900,
4638,
363,
903,
297,
3464,
29898,
29929,
29900,
4638,
13,
1678,
770,
29918,
11965,
29918,
7827,
353,
5519,
29900,
29889,
29900,
363,
903,
297,
3464,
29898,
29929,
29900,
4638,
363,
903,
297,
3464,
29898,
29929,
29900,
4638,
13,
1678,
363,
1842,
29918,
29883,
1446,
297,
343,
29879,
29901,
13,
4706,
363,
2125,
29918,
29875,
297,
3464,
29898,
29929,
29900,
1125,
13,
9651,
363,
8500,
29918,
29875,
297,
3464,
29898,
29929,
29900,
1125,
13,
18884,
565,
2125,
29918,
29875,
1275,
29871,
29900,
29901,
13,
462,
1678,
6773,
13,
18884,
770,
29918,
11965,
29918,
7827,
29961,
19730,
29918,
29875,
3816,
27711,
29918,
29875,
29962,
4619,
29871,
29896,
13,
18884,
565,
1842,
29918,
29883,
1446,
29961,
19730,
29918,
29875,
29962,
1275,
1842,
29918,
29883,
1446,
29961,
27711,
29918,
29875,
5387,
13,
462,
1678,
770,
29918,
11965,
29918,
29725,
29961,
19730,
29918,
29875,
3816,
27711,
29918,
29875,
29962,
4619,
29871,
29896,
13,
1678,
1035,
353,
5159,
13,
1678,
363,
474,
297,
3464,
29898,
29929,
29900,
1125,
13,
4706,
1196,
353,
5159,
13,
4706,
363,
432,
297,
3464,
29898,
29929,
29900,
1125,
13,
9651,
565,
770,
29918,
11965,
29918,
7827,
29961,
29875,
3816,
29926,
29962,
1275,
29871,
29900,
29889,
29900,
29901,
13,
18884,
8158,
353,
29871,
29900,
29889,
29900,
13,
9651,
1683,
29901,
13,
18884,
8158,
353,
770,
29918,
11965,
29918,
29725,
29961,
29875,
3816,
29926,
29962,
847,
770,
29918,
11965,
29918,
7827,
29961,
29875,
3816,
29926,
29962,
13,
9651,
1196,
29889,
4397,
29898,
13628,
29897,
13,
4706,
1035,
29889,
4397,
29898,
1220,
29897,
13,
1678,
736,
1035,
13,
13,
13,
1753,
1596,
29918,
1990,
29918,
27711,
943,
29898,
5753,
1125,
13,
1678,
8158,
29918,
1761,
353,
5159,
13,
1678,
363,
2125,
29918,
29875,
297,
3464,
29898,
29929,
29900,
1125,
13,
4706,
363,
8500,
29918,
29875,
297,
3464,
29898,
29929,
29900,
1125,
13,
9651,
8158,
29918,
1761,
29889,
4397,
3319,
29915,
19730,
2396,
2125,
29918,
29875,
29892,
13,
462,
1669,
525,
11965,
2396,
8500,
29918,
29875,
29892,
13,
462,
1669,
525,
5753,
2396,
1035,
29961,
19730,
29918,
29875,
3816,
27711,
29918,
29875,
29962,
1800,
13,
1678,
8158,
29918,
1761,
353,
12705,
29898,
13628,
29918,
1761,
29892,
1820,
29922,
2892,
302,
29901,
302,
1839,
5753,
7464,
11837,
29922,
5574,
29897,
13,
1678,
363,
560,
297,
8158,
29918,
1761,
29901,
13,
4706,
565,
560,
1839,
19730,
2033,
1275,
560,
1839,
11965,
2033,
29901,
13,
9651,
6773,
13,
4706,
2125,
353,
337,
329,
414,
29889,
21134,
29961,
295,
1839,
19730,
2033,
29962,
13,
4706,
4450,
353,
337,
329,
414,
29889,
21134,
29961,
295,
1839,
11965,
2033,
29962,
13,
4706,
1596,
703,
8875,
1149,
6571,
21313,
1800,
1642,
4830,
29898,
19730,
29892,
4450,
29892,
560,
1839,
5753,
25901,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
396,
1667,
29898,
276,
329,
414,
29889,
20683,
3285,
337,
329,
414,
29889,
1445,
4841,
3101,
13,
1678,
1053,
337,
329,
414,
13,
1678,
1035,
353,
1284,
29918,
1990,
29918,
27711,
943,
29898,
276,
329,
414,
29889,
1359,
29918,
1272,
580,
1839,
29891,
29918,
14968,
11287,
13,
1678,
1596,
29918,
1990,
29918,
27711,
943,
29898,
5753,
29897,
13,
2
] |
convert_rhd.py | miketrumpis/rhd-to-hdf5 | 0 | 1605128 | <reponame>miketrumpis/rhd-to-hdf5
#!/usr/bin/env python
import os
import sys
import json
import numpy as np
import h5py
import logging
from rhdlib.rhd_reader import RHDFile, signed_arrays
def convert(filenames, outfile):
"""
Concatenate the contents of the RHD files into contiguous HDF5 datasets
Parameters
----------
filenames: sequence
Sequence of RHD paths.
outfile: Path, str
Output path for the HDF5 file
"""
info = logging.getLogger().info
info('Creating RHD file maps')
rhd_files = [RHDFile(f) for f in filenames]
with h5py.File(outfile, 'w') as data:
first_file = rhd_files[0]
arrays = first_file.struct_map
hdf_arrays = dict()
hdf_offsets = dict()
for name, shape in arrays:
if name in signed_arrays:
dtype = 'h'
else:
dtype = first_file.rhd_map[name].dtype
num_channels = shape[0]
all_samples = np.sum([rhd.array_sizes[name][1] for rhd in rhd_files])
shape = (num_channels, all_samples) if num_channels > 1 else (all_samples,)
info('dataset name {}, dtype {}, shape {}'.format(name, dtype, shape))
arr = data.create_dataset(name, dtype=dtype, shape=shape, chunks=True)
hdf_arrays[name] = arr
hdf_offsets[name] = 0
for n, rhd in enumerate(rhd_files):
print('Converting {} ({} of {})'.format(rhd.file_path, n + 1, len(rhd_files)))
rhd.to_arrays(arrays=hdf_arrays, offsets=hdf_offsets, apply_scales=False)
info('Offsets: {}'.format(list(hdf_offsets.items())))
data.attrs['JSON_header'] = json.dumps(first_file.header)
info('End of conversion')
print('Done: {}'.format(outfile))
if __name__ == '__main__':
import argparse
from glob import glob
class CustomFormatter(argparse.ArgumentDefaultsHelpFormatter, argparse.RawDescriptionHelpFormatter):
pass
app_description = \
"""Combine and convert packetized Intan RHD files into continuous arrays in HDF5 format.
Arrays in the output file may include:
* amplifier_data: converted to signed int16, scale to uV by multiplying 0.195
* aux_input_data: unsigned uint16, scale by 37.4e-6 for Volts (sampled at 1/4 rate as amplifier data)
* board_adc_data: converted to signed int16, scale by 312.5e-6 for Volts
* supply_voltage_data: uint16, scale by 74.8e-6 for Volts (sampled once per data block)
* temp_sensor_data: uint16, scale by 0.01
* board_dig_in_data: boolean
* board_dig_out_data: boolean
To load (Python example):
>>> import h5py
>>> f = h5py.File('ecog_256_array.h5', 'r')
>>> electrodes_uv = f['amplifier_data'][:, 100:200] * 0.195
>>> electrodes_uv.shape
(256, 100)
>>> f['amplifier_data'].shape # total available data
(256, 7200000)
The original header information is stored as a JSON string, which can be parsed like this:
>>> import json
>>> header = json.loads(f.attrs['JSON_header'])
>>> header['sample_rate']
20000.0
"""
ap = argparse.ArgumentParser(description=app_description, formatter_class=CustomFormatter)
ap.add_argument('--doc', action='store_true', help='Print usage message to README.txt')
ap.add_argument('hdf_file', type=str, nargs='?', help='Output filename (.h5 extension will be issued)',
default='out')
ap.add_argument('-i', '--input-files', type=str, nargs='+', help='Input RHD files in order')
ap.add_argument('-d', '--input-dir', type=str, help='Input directory: RHD files will be converted in sorted order')
ap.add_argument('-v', '--verbose', action='store_true', help='Turn on logging channel')
args = ap.parse_args()
if args.doc:
with open('README.txt', 'w') as fw:
fw.write(app_description)
sys.exit(0)
if args.verbose:
root = logging.getLogger()
root.setLevel(logging.INFO)
handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
handler.setFormatter(formatter)
root.addHandler(handler)
if args.input_files is not None and len(args.input_files):
input_files = args.input_files
elif args.input_dir is not None and len(args.input_dir):
input_files = glob(os.path.join(os.path.abspath(args.input_dir), '*.rhd'))
input_files = sorted(input_files)
else:
print('No input files were given!')
ap.print_usage()
sys.exit(2)
print(input_files)
outfile = os.path.splitext(args.hdf_file)[0] + '.h5'
print(outfile)
convert(input_files, outfile)
| [
1,
529,
276,
1112,
420,
29958,
29885,
638,
300,
5848,
3334,
29914,
29878,
16440,
29899,
517,
29899,
29882,
2176,
29945,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
5215,
2897,
13,
5215,
10876,
13,
5215,
4390,
13,
5215,
12655,
408,
7442,
13,
5215,
298,
29945,
2272,
13,
5215,
12183,
13,
3166,
364,
16440,
1982,
29889,
29878,
16440,
29918,
16950,
1053,
390,
26124,
2283,
29892,
8794,
29918,
2378,
29879,
13,
13,
13,
1753,
3588,
29898,
1777,
264,
1280,
29892,
714,
1445,
1125,
13,
1678,
9995,
13,
1678,
23924,
2579,
403,
278,
8118,
310,
278,
390,
26124,
2066,
964,
640,
5526,
681,
379,
4037,
29945,
20035,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
977,
264,
1280,
29901,
5665,
13,
4706,
922,
3910,
310,
390,
26124,
10898,
29889,
13,
1678,
714,
1445,
29901,
10802,
29892,
851,
13,
4706,
10604,
2224,
363,
278,
379,
4037,
29945,
934,
13,
13,
1678,
9995,
13,
1678,
5235,
353,
12183,
29889,
657,
16363,
2141,
3888,
13,
1678,
5235,
877,
9832,
1218,
390,
26124,
934,
11053,
1495,
13,
1678,
364,
16440,
29918,
5325,
353,
518,
29934,
26124,
2283,
29898,
29888,
29897,
363,
285,
297,
977,
264,
1280,
29962,
13,
1678,
411,
298,
29945,
2272,
29889,
2283,
29898,
449,
1445,
29892,
525,
29893,
1495,
408,
848,
29901,
13,
4706,
937,
29918,
1445,
353,
364,
16440,
29918,
5325,
29961,
29900,
29962,
13,
4706,
7049,
353,
937,
29918,
1445,
29889,
4984,
29918,
1958,
13,
4706,
298,
2176,
29918,
2378,
29879,
353,
9657,
580,
13,
4706,
298,
2176,
29918,
2696,
7224,
353,
9657,
580,
13,
4706,
363,
1024,
29892,
8267,
297,
7049,
29901,
13,
9651,
565,
1024,
297,
8794,
29918,
2378,
29879,
29901,
13,
18884,
26688,
353,
525,
29882,
29915,
13,
9651,
1683,
29901,
13,
18884,
26688,
353,
937,
29918,
1445,
29889,
29878,
16440,
29918,
1958,
29961,
978,
1822,
29881,
1853,
13,
9651,
954,
29918,
305,
12629,
353,
8267,
29961,
29900,
29962,
13,
9651,
599,
29918,
27736,
353,
7442,
29889,
2083,
4197,
29878,
16440,
29889,
2378,
29918,
29879,
7093,
29961,
978,
3816,
29896,
29962,
363,
364,
16440,
297,
364,
16440,
29918,
5325,
2314,
13,
9651,
8267,
353,
313,
1949,
29918,
305,
12629,
29892,
599,
29918,
27736,
29897,
565,
954,
29918,
305,
12629,
1405,
29871,
29896,
1683,
313,
497,
29918,
27736,
29892,
29897,
13,
9651,
5235,
877,
24713,
1024,
24335,
26688,
24335,
8267,
6571,
4286,
4830,
29898,
978,
29892,
26688,
29892,
8267,
876,
13,
9651,
3948,
353,
848,
29889,
3258,
29918,
24713,
29898,
978,
29892,
26688,
29922,
29881,
1853,
29892,
8267,
29922,
12181,
29892,
521,
18801,
29922,
5574,
29897,
13,
9651,
298,
2176,
29918,
2378,
29879,
29961,
978,
29962,
353,
3948,
13,
9651,
298,
2176,
29918,
2696,
7224,
29961,
978,
29962,
353,
29871,
29900,
13,
13,
4706,
363,
302,
29892,
364,
16440,
297,
26985,
29898,
29878,
16440,
29918,
5325,
1125,
13,
9651,
1596,
877,
1168,
369,
1259,
6571,
313,
8875,
310,
426,
1800,
4286,
4830,
29898,
29878,
16440,
29889,
1445,
29918,
2084,
29892,
302,
718,
29871,
29896,
29892,
7431,
29898,
29878,
16440,
29918,
5325,
4961,
13,
9651,
364,
16440,
29889,
517,
29918,
2378,
29879,
29898,
2378,
29879,
29922,
29882,
2176,
29918,
2378,
29879,
29892,
1283,
7224,
29922,
29882,
2176,
29918,
2696,
7224,
29892,
3394,
29918,
19529,
267,
29922,
8824,
29897,
13,
9651,
5235,
877,
6880,
7224,
29901,
6571,
4286,
4830,
29898,
1761,
29898,
29882,
2176,
29918,
2696,
7224,
29889,
7076,
580,
4961,
13,
4706,
848,
29889,
5552,
29879,
1839,
7249,
29918,
6672,
2033,
353,
4390,
29889,
29881,
17204,
29898,
4102,
29918,
1445,
29889,
6672,
29897,
13,
4706,
5235,
877,
5044,
310,
11301,
1495,
13,
1678,
1596,
877,
25632,
29901,
6571,
4286,
4830,
29898,
449,
1445,
876,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1053,
1852,
5510,
13,
1678,
515,
13149,
1053,
13149,
13,
13,
13,
1678,
770,
8701,
18522,
29898,
1191,
5510,
29889,
15730,
24863,
29648,
18522,
29892,
1852,
5510,
29889,
22131,
9868,
29648,
18522,
1125,
13,
4706,
1209,
13,
13,
13,
1678,
623,
29918,
8216,
353,
320,
13,
4706,
9995,
1523,
26062,
322,
3588,
18203,
1891,
3159,
273,
390,
26124,
2066,
964,
9126,
7049,
297,
379,
4037,
29945,
3402,
29889,
13,
308,
13,
4706,
4398,
29879,
297,
278,
1962,
934,
1122,
3160,
29901,
13,
4706,
334,
20563,
3709,
29918,
1272,
29901,
11543,
304,
8794,
938,
29896,
29953,
29892,
6287,
304,
318,
29963,
491,
6674,
5890,
29871,
29900,
29889,
29896,
29929,
29945,
13,
4706,
334,
3479,
29918,
2080,
29918,
1272,
29901,
12780,
13122,
29896,
29953,
29892,
6287,
491,
29871,
29941,
29955,
29889,
29946,
29872,
29899,
29953,
363,
3684,
1372,
313,
11249,
29881,
472,
29871,
29896,
29914,
29946,
6554,
408,
20563,
3709,
848,
29897,
13,
4706,
334,
7613,
29918,
328,
29883,
29918,
1272,
29901,
11543,
304,
8794,
938,
29896,
29953,
29892,
6287,
491,
29871,
29941,
29896,
29906,
29889,
29945,
29872,
29899,
29953,
363,
3684,
1372,
13,
4706,
334,
11421,
29918,
1555,
29873,
482,
29918,
1272,
29901,
13122,
29896,
29953,
29892,
6287,
491,
29871,
29955,
29946,
29889,
29947,
29872,
29899,
29953,
363,
3684,
1372,
313,
11249,
29881,
2748,
639,
848,
2908,
29897,
13,
4706,
334,
5694,
29918,
29879,
6073,
29918,
1272,
29901,
13122,
29896,
29953,
29892,
6287,
491,
29871,
29900,
29889,
29900,
29896,
13,
4706,
334,
7613,
29918,
7501,
29918,
262,
29918,
1272,
29901,
7223,
13,
4706,
334,
7613,
29918,
7501,
29918,
449,
29918,
1272,
29901,
7223,
13,
308,
13,
4706,
1763,
2254,
313,
11980,
1342,
1125,
13,
4706,
8653,
1053,
298,
29945,
2272,
13,
4706,
8653,
285,
353,
298,
29945,
2272,
29889,
2283,
877,
687,
468,
29918,
29906,
29945,
29953,
29918,
2378,
29889,
29882,
29945,
742,
525,
29878,
1495,
13,
4706,
8653,
28118,
2783,
29918,
4090,
353,
285,
1839,
314,
572,
3709,
29918,
1272,
2033,
7503,
29892,
29871,
29896,
29900,
29900,
29901,
29906,
29900,
29900,
29962,
334,
29871,
29900,
29889,
29896,
29929,
29945,
13,
4706,
8653,
28118,
2783,
29918,
4090,
29889,
12181,
13,
4706,
313,
29906,
29945,
29953,
29892,
29871,
29896,
29900,
29900,
29897,
13,
4706,
8653,
285,
1839,
314,
572,
3709,
29918,
1272,
13359,
12181,
259,
396,
3001,
3625,
848,
13,
4706,
313,
29906,
29945,
29953,
29892,
29871,
29955,
29906,
29900,
29900,
29900,
29900,
29900,
29897,
13,
308,
13,
4706,
450,
2441,
4839,
2472,
338,
6087,
408,
263,
4663,
1347,
29892,
607,
508,
367,
21213,
763,
445,
29901,
13,
308,
13,
4706,
8653,
1053,
4390,
13,
4706,
8653,
4839,
353,
4390,
29889,
18132,
29898,
29888,
29889,
5552,
29879,
1839,
7249,
29918,
6672,
11287,
13,
4706,
8653,
4839,
1839,
11249,
29918,
10492,
2033,
13,
308,
29906,
29900,
29900,
29900,
29900,
29889,
29900,
13,
4706,
9995,
13,
1678,
3095,
353,
1852,
5510,
29889,
15730,
11726,
29898,
8216,
29922,
932,
29918,
8216,
29892,
883,
2620,
29918,
1990,
29922,
7281,
18522,
29897,
13,
1678,
3095,
29889,
1202,
29918,
23516,
877,
489,
1514,
742,
3158,
2433,
8899,
29918,
3009,
742,
1371,
2433,
11816,
8744,
2643,
304,
5195,
3035,
2303,
29889,
3945,
1495,
13,
1678,
3095,
29889,
1202,
29918,
23516,
877,
29882,
2176,
29918,
1445,
742,
1134,
29922,
710,
29892,
302,
5085,
2433,
29973,
742,
1371,
2433,
6466,
10422,
14544,
29882,
29945,
6081,
674,
367,
16610,
29897,
742,
13,
462,
1678,
2322,
2433,
449,
1495,
13,
1678,
3095,
29889,
1202,
29918,
23516,
877,
29899,
29875,
742,
525,
489,
2080,
29899,
5325,
742,
1134,
29922,
710,
29892,
302,
5085,
2433,
29974,
742,
1371,
2433,
4290,
390,
26124,
2066,
297,
1797,
1495,
13,
1678,
3095,
29889,
1202,
29918,
23516,
877,
29899,
29881,
742,
525,
489,
2080,
29899,
3972,
742,
1134,
29922,
710,
29892,
1371,
2433,
4290,
3884,
29901,
390,
26124,
2066,
674,
367,
11543,
297,
12705,
1797,
1495,
13,
1678,
3095,
29889,
1202,
29918,
23516,
877,
29899,
29894,
742,
525,
489,
369,
15828,
742,
3158,
2433,
8899,
29918,
3009,
742,
1371,
2433,
27407,
373,
12183,
8242,
1495,
13,
1678,
6389,
353,
3095,
29889,
5510,
29918,
5085,
580,
13,
1678,
565,
6389,
29889,
1514,
29901,
13,
4706,
411,
1722,
877,
16310,
2303,
29889,
3945,
742,
525,
29893,
1495,
408,
285,
29893,
29901,
13,
9651,
285,
29893,
29889,
3539,
29898,
932,
29918,
8216,
29897,
13,
4706,
10876,
29889,
13322,
29898,
29900,
29897,
13,
1678,
565,
6389,
29889,
369,
15828,
29901,
13,
4706,
3876,
353,
12183,
29889,
657,
16363,
580,
13,
4706,
3876,
29889,
842,
10108,
29898,
21027,
29889,
11690,
29897,
13,
4706,
7834,
353,
12183,
29889,
3835,
4598,
29898,
9675,
29889,
25393,
29897,
13,
4706,
7834,
29889,
842,
10108,
29898,
21027,
29889,
18525,
29897,
13,
4706,
883,
2620,
353,
12183,
29889,
18522,
877,
29995,
29898,
294,
312,
603,
29897,
29879,
448,
1273,
29898,
978,
29897,
29879,
448,
1273,
29898,
5563,
978,
29897,
29879,
448,
1273,
29898,
4906,
29897,
29879,
1495,
13,
4706,
7834,
29889,
842,
18522,
29898,
689,
2620,
29897,
13,
4706,
3876,
29889,
1202,
4598,
29898,
13789,
29897,
13,
1678,
565,
6389,
29889,
2080,
29918,
5325,
338,
451,
6213,
322,
7431,
29898,
5085,
29889,
2080,
29918,
5325,
1125,
13,
4706,
1881,
29918,
5325,
353,
6389,
29889,
2080,
29918,
5325,
13,
1678,
25342,
6389,
29889,
2080,
29918,
3972,
338,
451,
6213,
322,
7431,
29898,
5085,
29889,
2080,
29918,
3972,
1125,
13,
4706,
1881,
29918,
5325,
353,
13149,
29898,
359,
29889,
2084,
29889,
7122,
29898,
359,
29889,
2084,
29889,
370,
1028,
493,
29898,
5085,
29889,
2080,
29918,
3972,
511,
525,
10521,
29878,
16440,
8785,
13,
4706,
1881,
29918,
5325,
353,
12705,
29898,
2080,
29918,
5325,
29897,
13,
1678,
1683,
29901,
13,
4706,
1596,
877,
3782,
1881,
2066,
892,
2183,
29991,
1495,
13,
4706,
3095,
29889,
2158,
29918,
21125,
580,
13,
4706,
10876,
29889,
13322,
29898,
29906,
29897,
13,
1678,
1596,
29898,
2080,
29918,
5325,
29897,
13,
1678,
714,
1445,
353,
2897,
29889,
2084,
29889,
23579,
568,
486,
29898,
5085,
29889,
29882,
2176,
29918,
1445,
9601,
29900,
29962,
718,
15300,
29882,
29945,
29915,
13,
1678,
1596,
29898,
449,
1445,
29897,
13,
1678,
3588,
29898,
2080,
29918,
5325,
29892,
714,
1445,
29897,
13,
2
] |
users/serializers.py | tahasama/Bugatti-Django-Docker-API | 0 | 150660 | from django.db import transaction
from rest_framework import serializers
from dj_rest_auth.registration.serializers import RegisterSerializer
from django_countries.serializer_fields import CountryField
from .models import GENDER_CHOICES,CustomUser
class CustomUserRegistrationSerializer(RegisterSerializer):
name=serializers.CharField(max_length=100)
gender=serializers.ChoiceField(choices=GENDER_CHOICES)
phone_number = serializers.CharField(max_length=40)
net_worth = serializers.CharField(max_length=255)
country=CountryField()
@transaction.atomic
def save(self,request):
user=super().save(request)
user.name=self.data.get("name")
user.gender=self.data.get("gender")
user.phone_number=self.data.get("phone_number")
user.country=self.data.get("country")
user.net_worth=self.data.get("net_worth")
user.save()
return user
class CustomUserDetailsSerializer(serializers.ModelSerializer):
class Meta:
model=CustomUser
fields=['pk','email','name','phone_number','gender','country','net_worth']
read_only_fields=['pk','email','name','net_worth']
| [
1,
515,
9557,
29889,
2585,
1053,
10804,
13,
3166,
1791,
29918,
4468,
1053,
7797,
19427,
13,
3166,
270,
29926,
29918,
5060,
29918,
5150,
29889,
1727,
8306,
29889,
15550,
19427,
1053,
12577,
17679,
13,
3166,
9557,
29918,
2798,
2722,
29889,
15550,
3950,
29918,
9621,
1053,
15456,
3073,
13,
3166,
869,
9794,
1053,
402,
1430,
8032,
29918,
3210,
29949,
2965,
2890,
29892,
7281,
2659,
13,
13,
13,
1990,
8701,
2659,
4597,
8306,
17679,
29898,
15213,
17679,
1125,
13,
1678,
1024,
29922,
15550,
19427,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29896,
29900,
29900,
29897,
13,
1678,
23346,
29922,
15550,
19427,
29889,
29620,
3073,
29898,
1859,
1575,
29922,
24647,
8032,
29918,
3210,
29949,
2965,
2890,
29897,
13,
1678,
9008,
29918,
4537,
353,
7797,
19427,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29946,
29900,
29897,
13,
1678,
7787,
29918,
12554,
353,
7797,
19427,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29945,
29945,
29897,
13,
1678,
4234,
29922,
20779,
3073,
580,
13,
13,
1678,
732,
20736,
29889,
21641,
13,
1678,
822,
4078,
29898,
1311,
29892,
3827,
1125,
13,
4706,
1404,
29922,
9136,
2141,
7620,
29898,
3827,
29897,
13,
4706,
1404,
29889,
978,
29922,
1311,
29889,
1272,
29889,
657,
703,
978,
1159,
13,
4706,
1404,
29889,
26098,
29922,
1311,
29889,
1272,
29889,
657,
703,
26098,
1159,
13,
4706,
1404,
29889,
6710,
29918,
4537,
29922,
1311,
29889,
1272,
29889,
657,
703,
6710,
29918,
4537,
1159,
13,
4706,
1404,
29889,
13509,
29922,
1311,
29889,
1272,
29889,
657,
703,
13509,
1159,
13,
4706,
1404,
29889,
1212,
29918,
12554,
29922,
1311,
29889,
1272,
29889,
657,
703,
1212,
29918,
12554,
1159,
13,
4706,
1404,
29889,
7620,
580,
13,
4706,
736,
1404,
13,
268,
13,
13,
1990,
8701,
2659,
10602,
17679,
29898,
15550,
19427,
29889,
3195,
17679,
1125,
13,
1678,
770,
20553,
29901,
13,
4706,
1904,
29922,
7281,
2659,
13,
4706,
4235,
29922,
1839,
20571,
3788,
5269,
3788,
978,
3788,
6710,
29918,
4537,
3788,
26098,
3788,
13509,
3788,
1212,
29918,
12554,
2033,
13,
4706,
1303,
29918,
6194,
29918,
9621,
29922,
1839,
20571,
3788,
5269,
3788,
978,
3788,
1212,
29918,
12554,
2033,
13,
13,
308,
2
] |
AlphaGoZero/code/UI/UI.py | OoSnowfxm/AlphaZero_Othello | 0 | 46941 | '''
@Author: fxm
@Date: Dec 27, 2020.
@Title: UI class.
'''
import sys
sys.path.append('..')
import pygame
import logging
from pygame.locals import *
import pygame.gfxdraw
from collections import namedtuple
from Framework.Net import dotdict
from Othello.Board import Board
log = logging.getLogger(__name__)
'''
参数设置
'''
SIZE = 30 # 棋盘每个点之间的间隔
Line_Points = 9 # 棋盘每行/每列点数
Outer_Width = 20 # 棋盘外宽度
Border_Width = 4 # 边框宽度
Inside_Width = 4 # 边框跟实际的棋盘之间的间隔
Border_Length = SIZE * (Line_Points - 1) + Inside_Width * 2 + Border_Width # 边框线的长度
Start_X = Outer_Width + int(Border_Width / 2) + Inside_Width # 起始点X坐标
Start_Y = Outer_Width + int(Border_Width / 2) + Inside_Width # 起始点Y坐标
SCREEN_HEIGHT = SIZE * (Line_Points - 1) + Outer_Width \
* 2 + Border_Width + Inside_Width * 2 # 游戏屏幕的高
SCREEN_WIDTH = SCREEN_HEIGHT + 200 # 游戏屏幕的宽
Stone_Radius = SIZE // 2 # 棋子半径
Checkerboard_Color = (0xE3, 0x92, 0x65) # 棋盘颜色
BLACK_COLOR = (0, 0, 0) # 黑色
WHITE_COLOR = (255, 255, 255) # 白色
RED_COLOR = (245, 222, 179) # 淡黄色
BLUE_COLOR = (30, 30, 200) # 蓝色
RIGHT_INFO_POS_X = SCREEN_HEIGHT + Stone_Radius * 2 + 10
'''
UI类,游戏界面设置对象
'''
class UI():
'''
初始化
参数设置:
game:游戏对象
screen_h:游戏屏幕高
screen_w:游戏屏幕宽
'''
def __init__(self, game):
self.game = game
self.screen_h = SCREEN_HEIGHT
self.screen_w = SCREEN_WIDTH
'''输出一段文字信息'''
def printText(self, screen, font, x, y, text, fcolor=(255, 255, 255)):
imgText = font.render(text, True, fcolor)
screen.blit(imgText, (x, y))
'''画棋盘'''
def drawCheckerboard(self, screen):
# 填充棋盘背景色
screen.fill(Checkerboard_Color)
# 画棋盘网格线外的边框
pygame.draw.rect(screen, BLACK_COLOR, (Outer_Width, Outer_Width, \
Border_Length, Border_Length), Border_Width)
# 画网格线
for i in range(Line_Points): #竖线
pygame.draw.line(screen, BLACK_COLOR, (Start_Y, Start_Y + SIZE * i), \
(Start_Y + SIZE * (Line_Points - 1), Start_Y + SIZE * i), 1)
for j in range(Line_Points): #横线
pygame.draw.line(screen, BLACK_COLOR, (Start_X + SIZE * j, Start_X), \
(Start_X + SIZE * j, Start_X + SIZE * (Line_Points - 1)), 1)
'''画棋子'''
def drawChessman(self, screen, point, stone_color):
pygame.gfxdraw.aacircle(screen, Start_X + SIZE * point[0] + SIZE // 2, \
Start_Y + SIZE * point[1] + SIZE // 2, Stone_Radius, stone_color)
pygame.gfxdraw.filled_circle(screen, Start_X + SIZE * point[0] + SIZE // 2, \
Start_Y + SIZE * point[1] + SIZE // 2, Stone_Radius, stone_color)
'''画一个单独的不在棋盘内的棋子'''
def drawChessmanPos(self, screen, pos, stone_color):
pygame.gfxdraw.aacircle(screen, pos[0], pos[1], Stone_Radius, stone_color)
pygame.gfxdraw.filled_circle(screen, pos[0], pos[1], Stone_Radius, stone_color)
'''画提示可以走的棋子位置'''
def drawMoves(self, screen, point, stone_color):
pygame.gfxdraw.aacircle(screen, Start_X + SIZE * point[0] + SIZE // 2, \
Start_Y + SIZE * point[1] + SIZE // 2, Stone_Radius // 3, stone_color)
pygame.gfxdraw.filled_circle(screen, Start_X + SIZE * point[0] + SIZE // 2, \
Start_Y + SIZE * point[1] + SIZE // 2, Stone_Radius // 3, stone_color)
'''画右侧信息显示'''
def drawRightInfo(self, screen, font, moves, curplayer, is_human_first):
self.drawChessmanPos(screen, (SCREEN_HEIGHT + Stone_Radius, Start_X + Stone_Radius), BLACK_COLOR)
self.drawChessmanPos(screen, (SCREEN_HEIGHT + Stone_Radius, Start_X + Stone_Radius * 4), WHITE_COLOR)
if is_human_first == True:
self.printText(screen, font, RIGHT_INFO_POS_X, Start_X + 3, '玩家', BLUE_COLOR)
self.printText(screen, font, RIGHT_INFO_POS_X, Start_X + Stone_Radius * 3 + 3, '电脑', BLUE_COLOR)
else:
self.printText(screen, font, RIGHT_INFO_POS_X, Start_X + 3, '电脑', BLUE_COLOR)
self.printText(screen, font, RIGHT_INFO_POS_X, Start_X + Stone_Radius * 3 + 3, '玩家', BLUE_COLOR)
if curplayer == -1:
self.printText(screen, font, SCREEN_HEIGHT, SCREEN_HEIGHT//2, f'当前出棋:黑棋', BLUE_COLOR)
else:
self.printText(screen, font, SCREEN_HEIGHT, SCREEN_HEIGHT//2, f'当前出棋:白棋', BLUE_COLOR)
'''根据鼠标点击位置,返回游戏区坐标'''
def getClickpoint(self, click_pos):
pos_x = click_pos[0] - Start_X
pos_y = click_pos[1] - Start_Y
# 如果鼠标点击范围不在游戏区内,就返回None
if pos_x < -Inside_Width or pos_y < -Inside_Width:
return None
x = int(pos_x / SIZE)
y = int(pos_y / SIZE)
# 如果鼠标点击范围超过棋盘另一侧长度,也返回None
if x >= Line_Points or y >= Line_Points:
return None
return (x, y)
'''画出棋盘的所有信息'''
def drawAll(self, screen, board, end, moves, curplayer, is_human_first):
# 画棋盘
font1 = pygame.font.SysFont('SimHei', 72)
font2 = pygame.font.SysFont('SimHei', 24)
fwidth, fheight = font1.size('黑方获胜')
self.drawCheckerboard(screen)
self.drawRightInfo(screen, font2, moves, curplayer, is_human_first)
# 画棋盘上已有的棋子
for i in range(len(board)):
for j in range(len(board[0])):
if board[i][j] == 1:
self.drawChessman(screen, (j,i), WHITE_COLOR)
elif board[i][j] == -1:
self.drawChessman(screen, (j,i), BLACK_COLOR)
if (is_human_first == True and curplayer == -1) or \
(is_human_first == False and curplayer == 1):
for move in moves:
x = move[0]
y = move[1]
self.drawMoves(screen, (y,x), RED_COLOR)
if end != -2:
if end == 1:
self.printText(screen, font1, (SCREEN_WIDTH - fwidth)//2, (SCREEN_HEIGHT - fheight)//2, '白子获胜', RED_COLOR)
elif end == -1:
self.printText(screen, font1, (SCREEN_WIDTH - fwidth)//2, (SCREEN_HEIGHT - fheight)//2, '黑子获胜', RED_COLOR)
elif end == 0:
self.printText(screen, font1, (SCREEN_WIDTH - fwidth)//2, (SCREEN_HEIGHT - fheight)//2, '平局', RED_COLOR)
pygame.display.flip()
'''人类走棋'''
def humanplay(self, board):
valid = self.game.getValid(board, 1)
while True:
for event in pygame.event.get():
if event.type == MOUSEBUTTONDOWN: # 鼠标有输入,则为落子
pressed_array = pygame.mouse.get_pressed()
if pressed_array[0]:
mouse_pos = pygame.mouse.get_pos()
point = self.getClickpoint(mouse_pos)
y,x = point[0], point[1]
if ((0 <= x) and (x < self.game.size) and (0 <= y) and (y < self.game.size)) or \
((x == self.game.size) and (y == 0)):
a = self.game.size * x + y if x != -1 else self.game.size ** 2
if valid[a]:
return a
else:continue
else:continue
'''游戏仿真主过程'''
def display(self, screen, ai, is_human_first):
if is_human_first:
players = ['human', None, 'ai']
else:
players = ['ai', None, 'human']
curplayer = -1
board = self.game.initBoard()
while True:
b = Board(self.game.size)
b.matrix = board
moves = b.getLegalMoves(curplayer)
end = self.game.getGameEnded(board, curplayer)
self.drawAll(screen, board, curplayer * end, moves, curplayer, is_human_first)
if end != -2:
continue
# 如果当前无路可走,就让对方连走两步
if self.game.getNoAction(board, curplayer) == True:
# 更改状态,交换执棋者
board, curplayer = self.game.getNextState(board, curplayer, self.game.size **2)
continue
if players[curplayer+1] == 'human':
action = self.humanplay(self.game.getCanonicalForm(board, curplayer))
elif players[curplayer+1] == 'ai':
action = ai(self.game.getCanonicalForm(board, curplayer))
valids = self.game.getValid(self.game.getCanonicalForm(board, curplayer), 1)
# 如果动作不在合法动作列表内,返回错误
if valids[action] == 0:
log.error(f'Action {action} is not valid!')
log.debug(f'valids = {valids}')
assert valids[action] > 0
# 更改状态,交换执棋者
board, curplayer = self.game.getNextState(board, curplayer, action) | [
1,
14550,
13,
1678,
732,
13720,
29901,
285,
29916,
29885,
13,
1678,
732,
2539,
29901,
3826,
29871,
29906,
29955,
29892,
29871,
29906,
29900,
29906,
29900,
29889,
13,
1678,
732,
7030,
29901,
3740,
770,
29889,
13,
12008,
13,
5215,
10876,
13,
9675,
29889,
2084,
29889,
4397,
877,
636,
1495,
13,
5215,
22028,
13,
5215,
12183,
13,
3166,
22028,
29889,
2997,
29879,
1053,
334,
13,
5215,
22028,
29889,
29887,
11093,
4012,
13,
3166,
16250,
1053,
4257,
23583,
13,
3166,
16657,
29889,
6779,
1053,
8329,
8977,
13,
3166,
438,
386,
3156,
29889,
28397,
1053,
12590,
13,
13,
1188,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
12008,
13,
268,
31125,
30354,
30872,
30669,
13,
12008,
13,
14226,
353,
29871,
29941,
29900,
462,
462,
462,
462,
539,
396,
29871,
233,
166,
142,
234,
158,
155,
31951,
30502,
30940,
30577,
31016,
30210,
31016,
236,
157,
151,
13,
3542,
29918,
20325,
353,
29871,
29929,
462,
462,
462,
462,
396,
29871,
233,
166,
142,
234,
158,
155,
31951,
30448,
29914,
31951,
31025,
30940,
30354,
13,
3744,
261,
29918,
6110,
353,
29871,
29906,
29900,
462,
462,
462,
18884,
396,
29871,
233,
166,
142,
234,
158,
155,
31066,
232,
177,
192,
30898,
13,
17025,
29918,
6110,
353,
29871,
29946,
462,
462,
462,
18884,
396,
29871,
31993,
233,
164,
137,
232,
177,
192,
30898,
13,
797,
2975,
29918,
6110,
353,
29871,
29946,
462,
462,
462,
18884,
396,
29871,
31993,
233,
164,
137,
235,
186,
162,
31195,
236,
156,
136,
30210,
233,
166,
142,
234,
158,
155,
30577,
31016,
30210,
31016,
236,
157,
151,
13,
17025,
29918,
6513,
353,
22717,
10721,
334,
313,
3542,
29918,
20325,
448,
29871,
29896,
29897,
718,
22804,
29918,
6110,
334,
29871,
29906,
718,
20830,
29918,
6110,
418,
396,
29871,
31993,
233,
164,
137,
31532,
30210,
31143,
30898,
13,
4763,
29918,
29990,
353,
4451,
261,
29918,
6110,
718,
938,
29898,
17025,
29918,
6110,
847,
29871,
29906,
29897,
718,
22804,
29918,
6110,
462,
1678,
396,
29871,
31558,
31020,
30940,
29990,
232,
160,
147,
31062,
13,
4763,
29918,
29979,
353,
4451,
261,
29918,
6110,
718,
938,
29898,
17025,
29918,
6110,
847,
29871,
29906,
29897,
718,
22804,
29918,
6110,
462,
1678,
396,
29871,
31558,
31020,
30940,
29979,
232,
160,
147,
31062,
13,
7187,
1525,
1430,
29918,
9606,
22530,
353,
22717,
10721,
334,
313,
3542,
29918,
20325,
448,
29871,
29896,
29897,
718,
4451,
261,
29918,
6110,
320,
13,
1678,
334,
29871,
29906,
718,
20830,
29918,
6110,
718,
22804,
29918,
6110,
334,
29871,
29906,
462,
462,
539,
396,
29871,
233,
187,
187,
233,
139,
146,
232,
180,
146,
232,
188,
152,
30210,
30528,
13,
7187,
1525,
1430,
29918,
22574,
353,
12314,
1525,
1430,
29918,
9606,
22530,
718,
29871,
29906,
29900,
29900,
462,
462,
795,
396,
29871,
233,
187,
187,
233,
139,
146,
232,
180,
146,
232,
188,
152,
30210,
232,
177,
192,
13,
855,
650,
29918,
20494,
353,
22717,
10721,
849,
29871,
29906,
462,
462,
462,
4706,
396,
29871,
233,
166,
142,
30319,
232,
144,
141,
232,
193,
135,
13,
5596,
261,
3377,
29918,
3306,
353,
313,
29900,
29916,
29923,
29941,
29892,
29871,
29900,
29916,
29929,
29906,
29892,
29871,
29900,
29916,
29953,
29945,
29897,
462,
462,
308,
396,
29871,
233,
166,
142,
234,
158,
155,
236,
165,
159,
31085,
13,
13367,
11375,
29918,
15032,
1955,
353,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29897,
462,
462,
462,
308,
396,
29871,
236,
190,
148,
31085,
13,
25039,
9094,
29918,
15032,
1955,
353,
313,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
29897,
462,
462,
462,
259,
396,
29871,
30868,
31085,
13,
19386,
29918,
15032,
1955,
353,
313,
29906,
29946,
29945,
29892,
29871,
29906,
29906,
29906,
29892,
29871,
29896,
29955,
29929,
29897,
462,
462,
462,
268,
396,
29871,
233,
186,
164,
31491,
31085,
13,
13367,
4462,
29918,
15032,
1955,
353,
313,
29941,
29900,
29892,
29871,
29941,
29900,
29892,
29871,
29906,
29900,
29900,
29897,
462,
462,
462,
418,
396,
29871,
235,
150,
160,
31085,
13,
22789,
3912,
29918,
11690,
29918,
24815,
29918,
29990,
353,
12314,
1525,
1430,
29918,
9606,
22530,
718,
15681,
29918,
20494,
334,
29871,
29906,
718,
29871,
29896,
29900,
13,
13,
12008,
13,
1678,
3740,
30832,
30214,
233,
187,
187,
233,
139,
146,
30967,
30806,
30872,
30669,
30783,
31133,
13,
12008,
13,
1990,
3740,
7295,
13,
1678,
14550,
13,
308,
31120,
31020,
30705,
13,
308,
31125,
30354,
30872,
30669,
30383,
13,
4706,
3748,
30383,
233,
187,
187,
233,
139,
146,
30783,
31133,
13,
4706,
4315,
29918,
29882,
30383,
233,
187,
187,
233,
139,
146,
232,
180,
146,
232,
188,
152,
30528,
13,
4706,
4315,
29918,
29893,
30383,
233,
187,
187,
233,
139,
146,
232,
180,
146,
232,
188,
152,
232,
177,
192,
13,
1678,
14550,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3748,
1125,
13,
4706,
1583,
29889,
11802,
353,
3748,
13,
4706,
1583,
29889,
10525,
29918,
29882,
353,
12314,
1525,
1430,
29918,
9606,
22530,
13,
4706,
1583,
29889,
10525,
29918,
29893,
353,
12314,
1525,
1430,
29918,
22574,
13,
13,
1678,
14550,
31573,
30544,
30287,
31559,
30333,
30578,
30689,
31021,
12008,
13,
1678,
822,
1596,
1626,
29898,
1311,
29892,
4315,
29892,
4079,
29892,
921,
29892,
343,
29892,
1426,
29892,
285,
2780,
7607,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
29892,
29871,
29906,
29945,
29945,
22164,
13,
4706,
10153,
1626,
353,
4079,
29889,
9482,
29898,
726,
29892,
5852,
29892,
285,
2780,
29897,
13,
4706,
4315,
29889,
2204,
277,
29898,
2492,
1626,
29892,
313,
29916,
29892,
343,
876,
13,
13,
13,
1678,
14550,
31046,
233,
166,
142,
234,
158,
155,
12008,
13,
1678,
822,
4216,
5596,
261,
3377,
29898,
1311,
29892,
4315,
1125,
13,
4706,
396,
29871,
232,
164,
174,
232,
136,
136,
233,
166,
142,
234,
158,
155,
235,
134,
143,
31495,
31085,
13,
4706,
4315,
29889,
5589,
29898,
5596,
261,
3377,
29918,
3306,
29897,
13,
4706,
396,
29871,
31046,
233,
166,
142,
234,
158,
155,
31222,
31168,
31532,
31066,
30210,
31993,
233,
164,
137,
13,
4706,
22028,
29889,
4012,
29889,
1621,
29898,
10525,
29892,
350,
29931,
11375,
29918,
15032,
1955,
29892,
313,
3744,
261,
29918,
6110,
29892,
4451,
261,
29918,
6110,
29892,
320,
13,
9651,
20830,
29918,
6513,
29892,
20830,
29918,
6513,
511,
20830,
29918,
6110,
29897,
13,
4706,
396,
29871,
31046,
31222,
31168,
31532,
13,
4706,
363,
474,
297,
3464,
29898,
3542,
29918,
20325,
1125,
396,
234,
174,
153,
31532,
13,
9651,
22028,
29889,
4012,
29889,
1220,
29898,
10525,
29892,
350,
29931,
11375,
29918,
15032,
1955,
29892,
313,
4763,
29918,
29979,
29892,
7370,
29918,
29979,
718,
22717,
10721,
334,
474,
511,
320,
13,
18884,
313,
4763,
29918,
29979,
718,
22717,
10721,
334,
313,
3542,
29918,
20325,
448,
29871,
29896,
511,
7370,
29918,
29979,
718,
22717,
10721,
334,
474,
511,
29871,
29896,
29897,
13,
4706,
363,
432,
297,
3464,
29898,
3542,
29918,
20325,
1125,
396,
233,
171,
173,
31532,
13,
9651,
22028,
29889,
4012,
29889,
1220,
29898,
10525,
29892,
350,
29931,
11375,
29918,
15032,
1955,
29892,
313,
4763,
29918,
29990,
718,
22717,
10721,
334,
432,
29892,
7370,
29918,
29990,
511,
320,
13,
18884,
313,
4763,
29918,
29990,
718,
22717,
10721,
334,
432,
29892,
7370,
29918,
29990,
718,
22717,
10721,
334,
313,
3542,
29918,
20325,
448,
29871,
29896,
8243,
29871,
29896,
29897,
13,
13,
1678,
14550,
31046,
233,
166,
142,
30319,
12008,
13,
1678,
822,
4216,
1451,
404,
1171,
29898,
1311,
29892,
4315,
29892,
1298,
29892,
12565,
29918,
2780,
1125,
13,
4706,
22028,
29889,
29887,
11093,
4012,
29889,
29874,
562,
2076,
280,
29898,
10525,
29892,
7370,
29918,
29990,
718,
22717,
10721,
334,
1298,
29961,
29900,
29962,
718,
22717,
10721,
849,
29871,
29906,
29892,
320,
13,
9651,
7370,
29918,
29979,
718,
22717,
10721,
334,
1298,
29961,
29896,
29962,
718,
22717,
10721,
849,
29871,
29906,
29892,
15681,
29918,
20494,
29892,
12565,
29918,
2780,
29897,
13,
4706,
22028,
29889,
29887,
11093,
4012,
29889,
26940,
29918,
16622,
29898,
10525,
29892,
7370,
29918,
29990,
718,
22717,
10721,
334,
1298,
29961,
29900,
29962,
718,
22717,
10721,
849,
29871,
29906,
29892,
320,
13,
9651,
7370,
29918,
29979,
718,
22717,
10721,
334,
1298,
29961,
29896,
29962,
718,
22717,
10721,
849,
29871,
29906,
29892,
15681,
29918,
20494,
29892,
12565,
29918,
2780,
29897,
13,
13,
1678,
14550,
31046,
30287,
30502,
31166,
234,
142,
175,
30210,
30413,
30505,
233,
166,
142,
234,
158,
155,
30728,
30210,
233,
166,
142,
30319,
12008,
13,
1678,
822,
4216,
1451,
404,
1171,
9135,
29898,
1311,
29892,
4315,
29892,
926,
29892,
12565,
29918,
2780,
1125,
13,
4706,
22028,
29889,
29887,
11093,
4012,
29889,
29874,
562,
2076,
280,
29898,
10525,
29892,
926,
29961,
29900,
1402,
926,
29961,
29896,
1402,
15681,
29918,
20494,
29892,
12565,
29918,
2780,
29897,
13,
4706,
22028,
29889,
29887,
11093,
4012,
29889,
26940,
29918,
16622,
29898,
10525,
29892,
926,
29961,
29900,
1402,
926,
29961,
29896,
1402,
15681,
29918,
20494,
29892,
12565,
29918,
2780,
29897,
13,
268,
13,
1678,
14550,
31046,
31302,
30858,
30682,
30651,
235,
184,
179,
30210,
233,
166,
142,
30319,
30956,
30669,
12008,
13,
1678,
822,
4216,
29924,
586,
267,
29898,
1311,
29892,
4315,
29892,
1298,
29892,
12565,
29918,
2780,
1125,
13,
4706,
22028,
29889,
29887,
11093,
4012,
29889,
29874,
562,
2076,
280,
29898,
10525,
29892,
7370,
29918,
29990,
718,
22717,
10721,
334,
1298,
29961,
29900,
29962,
718,
22717,
10721,
849,
29871,
29906,
29892,
320,
13,
9651,
7370,
29918,
29979,
718,
22717,
10721,
334,
1298,
29961,
29896,
29962,
718,
22717,
10721,
849,
29871,
29906,
29892,
15681,
29918,
20494,
849,
29871,
29941,
29892,
12565,
29918,
2780,
29897,
13,
4706,
22028,
29889,
29887,
11093,
4012,
29889,
26940,
29918,
16622,
29898,
10525,
29892,
7370,
29918,
29990,
718,
22717,
10721,
334,
1298,
29961,
29900,
29962,
718,
22717,
10721,
849,
29871,
29906,
29892,
320,
13,
9651,
7370,
29918,
29979,
718,
22717,
10721,
334,
1298,
29961,
29896,
29962,
718,
22717,
10721,
849,
29871,
29906,
29892,
15681,
29918,
20494,
849,
29871,
29941,
29892,
12565,
29918,
2780,
29897,
13,
268,
13,
1678,
14550,
31046,
31803,
231,
193,
170,
30689,
31021,
31542,
30858,
12008,
13,
1678,
822,
4216,
7341,
3401,
29898,
1311,
29892,
4315,
29892,
4079,
29892,
16229,
29892,
3151,
9106,
29892,
338,
29918,
26029,
29918,
4102,
1125,
13,
4706,
1583,
29889,
4012,
1451,
404,
1171,
9135,
29898,
10525,
29892,
313,
7187,
1525,
1430,
29918,
9606,
22530,
718,
15681,
29918,
20494,
29892,
7370,
29918,
29990,
718,
15681,
29918,
20494,
511,
350,
29931,
11375,
29918,
15032,
1955,
29897,
13,
4706,
1583,
29889,
4012,
1451,
404,
1171,
9135,
29898,
10525,
29892,
313,
7187,
1525,
1430,
29918,
9606,
22530,
718,
15681,
29918,
20494,
29892,
7370,
29918,
29990,
718,
15681,
29918,
20494,
334,
29871,
29946,
511,
12317,
9094,
29918,
15032,
1955,
29897,
13,
4706,
565,
338,
29918,
26029,
29918,
4102,
1275,
5852,
29901,
13,
9651,
1583,
29889,
2158,
1626,
29898,
10525,
29892,
4079,
29892,
390,
22530,
29918,
11690,
29918,
24815,
29918,
29990,
29892,
7370,
29918,
29990,
718,
29871,
29941,
29892,
525,
234,
145,
172,
30613,
742,
350,
29931,
4462,
29918,
15032,
1955,
29897,
13,
9651,
1583,
29889,
2158,
1626,
29898,
10525,
29892,
4079,
29892,
390,
22530,
29918,
11690,
29918,
24815,
29918,
29990,
29892,
7370,
29918,
29990,
718,
15681,
29918,
20494,
334,
29871,
29941,
718,
29871,
29941,
29892,
525,
31679,
235,
135,
148,
742,
350,
29931,
4462,
29918,
15032,
1955,
29897,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
2158,
1626,
29898,
10525,
29892,
4079,
29892,
390,
22530,
29918,
11690,
29918,
24815,
29918,
29990,
29892,
7370,
29918,
29990,
718,
29871,
29941,
29892,
525,
31679,
235,
135,
148,
742,
350,
29931,
4462,
29918,
15032,
1955,
29897,
13,
9651,
1583,
29889,
2158,
1626,
29898,
10525,
29892,
4079,
29892,
390,
22530,
29918,
11690,
29918,
24815,
29918,
29990,
29892,
7370,
29918,
29990,
718,
15681,
29918,
20494,
334,
29871,
29941,
718,
29871,
29941,
29892,
525,
234,
145,
172,
30613,
742,
350,
29931,
4462,
29918,
15032,
1955,
29897,
13,
4706,
565,
3151,
9106,
1275,
448,
29896,
29901,
13,
9651,
1583,
29889,
2158,
1626,
29898,
10525,
29892,
4079,
29892,
12314,
1525,
1430,
29918,
9606,
22530,
29892,
12314,
1525,
1430,
29918,
9606,
22530,
458,
29906,
29892,
285,
29915,
30948,
30658,
30544,
233,
166,
142,
30383,
236,
190,
148,
233,
166,
142,
742,
350,
29931,
4462,
29918,
15032,
1955,
29897,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
2158,
1626,
29898,
10525,
29892,
4079,
29892,
12314,
1525,
1430,
29918,
9606,
22530,
29892,
12314,
1525,
1430,
29918,
9606,
22530,
458,
29906,
29892,
285,
29915,
30948,
30658,
30544,
233,
166,
142,
30383,
30868,
233,
166,
142,
742,
350,
29931,
4462,
29918,
15032,
1955,
29897,
13,
308,
13,
308,
13,
13,
1678,
14550,
31393,
30763,
236,
191,
163,
31062,
30940,
31768,
30956,
30669,
30214,
31086,
30742,
233,
187,
187,
233,
139,
146,
30467,
232,
160,
147,
31062,
12008,
13,
1678,
822,
679,
4164,
3149,
29898,
1311,
29892,
2828,
29918,
1066,
1125,
13,
4706,
926,
29918,
29916,
353,
2828,
29918,
1066,
29961,
29900,
29962,
448,
7370,
29918,
29990,
13,
4706,
926,
29918,
29891,
353,
2828,
29918,
1066,
29961,
29896,
29962,
448,
7370,
29918,
29979,
13,
4706,
396,
29871,
30847,
30801,
236,
191,
163,
31062,
30940,
31768,
235,
143,
134,
232,
158,
183,
30413,
30505,
233,
187,
187,
233,
139,
146,
30467,
30728,
30214,
31238,
31086,
30742,
8516,
13,
4706,
565,
926,
29918,
29916,
529,
448,
797,
2975,
29918,
6110,
470,
926,
29918,
29891,
529,
448,
797,
2975,
29918,
6110,
29901,
13,
9651,
736,
6213,
13,
308,
13,
4706,
921,
353,
938,
29898,
1066,
29918,
29916,
29871,
847,
22717,
10721,
29897,
29871,
13,
4706,
343,
353,
938,
29898,
1066,
29918,
29891,
29871,
847,
22717,
10721,
29897,
13,
4706,
396,
29871,
30847,
30801,
236,
191,
163,
31062,
30940,
31768,
235,
143,
134,
232,
158,
183,
31480,
31138,
233,
166,
142,
234,
158,
155,
232,
146,
169,
30287,
231,
193,
170,
31143,
30898,
30214,
30953,
31086,
30742,
8516,
13,
4706,
565,
921,
6736,
7407,
29918,
20325,
470,
343,
6736,
7407,
29918,
20325,
29901,
13,
9651,
736,
6213,
13,
13,
4706,
736,
313,
29916,
29892,
343,
29897,
13,
268,
13,
1678,
14550,
31046,
30544,
233,
166,
142,
234,
158,
155,
30210,
30744,
30417,
30689,
31021,
12008,
13,
1678,
822,
4216,
3596,
29898,
1311,
29892,
4315,
29892,
7613,
29892,
1095,
29892,
16229,
29892,
3151,
9106,
29892,
338,
29918,
26029,
29918,
4102,
1125,
13,
4706,
396,
29871,
31046,
233,
166,
142,
234,
158,
155,
13,
4706,
4079,
29896,
353,
22028,
29889,
5657,
29889,
29903,
952,
9824,
877,
8942,
3868,
29875,
742,
29871,
29955,
29906,
29897,
13,
4706,
4079,
29906,
353,
22028,
29889,
5657,
29889,
29903,
952,
9824,
877,
8942,
3868,
29875,
742,
29871,
29906,
29946,
29897,
13,
4706,
285,
2103,
29892,
285,
3545,
353,
4079,
29896,
29889,
2311,
877,
236,
190,
148,
30525,
31024,
235,
134,
159,
1495,
13,
4706,
1583,
29889,
4012,
5596,
261,
3377,
29898,
10525,
29897,
13,
13,
4706,
1583,
29889,
4012,
7341,
3401,
29898,
10525,
29892,
4079,
29906,
29892,
16229,
29892,
3151,
9106,
29892,
338,
29918,
26029,
29918,
4102,
29897,
13,
4706,
396,
29871,
31046,
233,
166,
142,
234,
158,
155,
30429,
31290,
30417,
30210,
233,
166,
142,
30319,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
3377,
22164,
13,
9651,
363,
432,
297,
3464,
29898,
2435,
29898,
3377,
29961,
29900,
12622,
29901,
13,
18884,
565,
7613,
29961,
29875,
3816,
29926,
29962,
1275,
29871,
29896,
29901,
13,
462,
1678,
1583,
29889,
4012,
1451,
404,
1171,
29898,
10525,
29892,
313,
29926,
29892,
29875,
511,
12317,
9094,
29918,
15032,
1955,
29897,
13,
18884,
25342,
7613,
29961,
29875,
3816,
29926,
29962,
1275,
448,
29896,
29901,
13,
462,
1678,
1583,
29889,
4012,
1451,
404,
1171,
29898,
10525,
29892,
313,
29926,
29892,
29875,
511,
350,
29931,
11375,
29918,
15032,
1955,
29897,
13,
308,
13,
4706,
565,
313,
275,
29918,
26029,
29918,
4102,
1275,
5852,
322,
3151,
9106,
1275,
448,
29896,
29897,
470,
320,
13,
9651,
313,
275,
29918,
26029,
29918,
4102,
1275,
7700,
322,
3151,
9106,
1275,
29871,
29896,
1125,
13,
9651,
363,
4337,
297,
16229,
29901,
13,
18884,
921,
353,
4337,
29961,
29900,
29962,
13,
18884,
343,
353,
4337,
29961,
29896,
29962,
13,
18884,
1583,
29889,
4012,
29924,
586,
267,
29898,
10525,
29892,
313,
29891,
29892,
29916,
511,
390,
3352,
29918,
15032,
1955,
29897,
13,
13,
4706,
565,
1095,
2804,
448,
29906,
29901,
13,
9651,
565,
1095,
1275,
29871,
29896,
29901,
13,
18884,
1583,
29889,
2158,
1626,
29898,
10525,
29892,
4079,
29896,
29892,
313,
7187,
1525,
1430,
29918,
22574,
448,
285,
2103,
29897,
458,
29906,
29892,
313,
7187,
1525,
1430,
29918,
9606,
22530,
448,
285,
3545,
29897,
458,
29906,
29892,
525,
30868,
30319,
31024,
235,
134,
159,
742,
390,
3352,
29918,
15032,
1955,
29897,
13,
9651,
25342,
1095,
1275,
448,
29896,
29901,
13,
18884,
1583,
29889,
2158,
1626,
29898,
10525,
29892,
4079,
29896,
29892,
313,
7187,
1525,
1430,
29918,
22574,
448,
285,
2103,
29897,
458,
29906,
29892,
313,
7187,
1525,
1430,
29918,
9606,
22530,
448,
285,
3545,
29897,
458,
29906,
29892,
525,
236,
190,
148,
30319,
31024,
235,
134,
159,
742,
390,
3352,
29918,
15032,
1955,
29897,
13,
9651,
25342,
1095,
1275,
29871,
29900,
29901,
13,
18884,
1583,
29889,
2158,
1626,
29898,
10525,
29892,
4079,
29896,
29892,
313,
7187,
1525,
1430,
29918,
22574,
448,
285,
2103,
29897,
458,
29906,
29892,
313,
7187,
1525,
1430,
29918,
9606,
22530,
448,
285,
3545,
29897,
458,
29906,
29892,
525,
30606,
31655,
742,
390,
3352,
29918,
15032,
1955,
29897,
13,
4706,
22028,
29889,
4990,
29889,
29888,
3466,
580,
1678,
13,
13,
1678,
14550,
30313,
30832,
235,
184,
179,
233,
166,
142,
12008,
13,
1678,
822,
5199,
1456,
29898,
1311,
29892,
7613,
1125,
13,
4706,
2854,
353,
1583,
29889,
11802,
29889,
657,
7211,
29898,
3377,
29892,
29871,
29896,
29897,
13,
4706,
1550,
5852,
29901,
13,
9651,
363,
1741,
297,
22028,
29889,
3696,
29889,
657,
7295,
29871,
13,
18884,
565,
1741,
29889,
1853,
1275,
16999,
17171,
29933,
2692,
29911,
1164,
3970,
16048,
29901,
1669,
396,
29871,
236,
191,
163,
31062,
30417,
31573,
30752,
30214,
31403,
30573,
235,
147,
192,
30319,
29871,
13,
462,
1678,
15385,
29918,
2378,
353,
22028,
29889,
15769,
29889,
657,
29918,
13120,
580,
13,
462,
1678,
565,
15385,
29918,
2378,
29961,
29900,
5387,
13,
462,
4706,
9495,
29918,
1066,
353,
22028,
29889,
15769,
29889,
657,
29918,
1066,
580,
13,
462,
4706,
1298,
353,
1583,
29889,
657,
4164,
3149,
29898,
15769,
29918,
1066,
29897,
13,
462,
4706,
343,
29892,
29916,
353,
1298,
29961,
29900,
1402,
1298,
29961,
29896,
29962,
13,
462,
4706,
565,
5135,
29900,
5277,
921,
29897,
322,
313,
29916,
529,
1583,
29889,
11802,
29889,
2311,
29897,
322,
313,
29900,
5277,
343,
29897,
322,
313,
29891,
529,
1583,
29889,
11802,
29889,
2311,
876,
470,
320,
13,
462,
9651,
5135,
29916,
1275,
1583,
29889,
11802,
29889,
2311,
29897,
322,
313,
29891,
1275,
29871,
29900,
22164,
13,
462,
9651,
263,
353,
1583,
29889,
11802,
29889,
2311,
334,
921,
718,
343,
565,
921,
2804,
448,
29896,
1683,
1583,
29889,
11802,
29889,
2311,
3579,
29871,
29906,
13,
462,
9651,
565,
2854,
29961,
29874,
5387,
13,
462,
18884,
736,
263,
13,
462,
9651,
1683,
29901,
19878,
13,
462,
4706,
1683,
29901,
19878,
13,
13,
1678,
14550,
233,
187,
187,
233,
139,
146,
231,
190,
194,
30848,
30888,
31138,
31101,
12008,
13,
1678,
822,
2479,
29898,
1311,
29892,
4315,
29892,
7468,
29892,
338,
29918,
26029,
29918,
4102,
1125,
13,
4706,
565,
338,
29918,
26029,
29918,
4102,
29901,
13,
9651,
10769,
353,
6024,
26029,
742,
6213,
29892,
525,
1794,
2033,
13,
4706,
1683,
29901,
13,
9651,
10769,
353,
6024,
1794,
742,
6213,
29892,
525,
26029,
2033,
13,
13,
4706,
3151,
9106,
353,
448,
29896,
13,
4706,
7613,
353,
1583,
29889,
11802,
29889,
2344,
28397,
580,
13,
308,
13,
4706,
1550,
5852,
29901,
13,
9651,
289,
353,
12590,
29898,
1311,
29889,
11802,
29889,
2311,
29897,
13,
9651,
289,
29889,
5344,
353,
7613,
13,
9651,
16229,
353,
289,
29889,
657,
22988,
284,
29924,
586,
267,
29898,
2764,
9106,
29897,
13,
9651,
1095,
353,
1583,
29889,
11802,
29889,
657,
14199,
5044,
287,
29898,
3377,
29892,
3151,
9106,
29897,
13,
9651,
1583,
29889,
4012,
3596,
29898,
10525,
29892,
7613,
29892,
3151,
9106,
334,
1095,
29892,
16229,
29892,
3151,
9106,
29892,
338,
29918,
26029,
29918,
4102,
29897,
13,
9651,
565,
1095,
2804,
448,
29906,
29901,
13,
18884,
6773,
13,
632,
13,
9651,
396,
29871,
30847,
30801,
30948,
30658,
31352,
30874,
30682,
235,
184,
179,
30214,
31238,
235,
177,
172,
30783,
30525,
31903,
235,
184,
179,
31977,
233,
176,
168,
13,
9651,
565,
1583,
29889,
11802,
29889,
657,
3782,
4276,
29898,
3377,
29892,
3151,
9106,
29897,
1275,
5852,
29901,
13,
18884,
396,
29871,
31100,
31264,
31531,
31613,
30214,
31398,
31640,
233,
140,
170,
233,
166,
142,
30767,
13,
18884,
7613,
29892,
3151,
9106,
353,
1583,
29889,
11802,
29889,
657,
9190,
2792,
29898,
3377,
29892,
3151,
9106,
29892,
1583,
29889,
11802,
29889,
2311,
3579,
29906,
29897,
13,
18884,
6773,
13,
462,
268,
13,
9651,
565,
10769,
29961,
2764,
9106,
29974,
29896,
29962,
1275,
525,
26029,
2396,
13,
18884,
3158,
353,
1583,
29889,
26029,
1456,
29898,
1311,
29889,
11802,
29889,
657,
6028,
265,
936,
2500,
29898,
3377,
29892,
3151,
9106,
876,
13,
9651,
25342,
10769,
29961,
2764,
9106,
29974,
29896,
29962,
1275,
525,
1794,
2396,
13,
18884,
3158,
353,
7468,
29898,
1311,
29889,
11802,
29889,
657,
6028,
265,
936,
2500,
29898,
3377,
29892,
3151,
9106,
876,
13,
632,
13,
9651,
2854,
29879,
353,
1583,
29889,
11802,
29889,
657,
7211,
29898,
1311,
29889,
11802,
29889,
657,
6028,
265,
936,
2500,
29898,
3377,
29892,
3151,
9106,
511,
29871,
29896,
29897,
13,
13,
9651,
396,
29871,
30847,
30801,
30846,
30732,
30413,
30505,
30733,
30545,
30846,
30732,
31025,
30746,
30728,
30214,
31086,
30742,
31745,
235,
178,
178,
13,
9651,
565,
2854,
29879,
29961,
2467,
29962,
1275,
29871,
29900,
29901,
13,
18884,
1480,
29889,
2704,
29898,
29888,
29915,
4276,
426,
2467,
29913,
338,
451,
2854,
29991,
1495,
13,
18884,
1480,
29889,
8382,
29898,
29888,
29915,
3084,
29879,
353,
426,
3084,
29879,
29913,
1495,
13,
18884,
4974,
2854,
29879,
29961,
2467,
29962,
1405,
29871,
29900,
13,
9651,
396,
29871,
31100,
31264,
31531,
31613,
30214,
31398,
31640,
233,
140,
170,
233,
166,
142,
30767,
13,
9651,
7613,
29892,
3151,
9106,
353,
1583,
29889,
11802,
29889,
657,
9190,
2792,
29898,
3377,
29892,
3151,
9106,
29892,
3158,
29897,
2
] |
im_v2/common/db/remove_db.py | alphamatic/amp | 5 | 50340 | <gh_stars>1-10
#!/usr/bin/env python
"""
Script to remove IM database using connection.
# Remove a DB named 'test_db' using environment variables: >
remove_db.py --db_name 'test_db'
"""
import argparse
import helpers.hparser as hparser
import helpers.hsql as hsql
import im_v2.im_lib_tasks as imvimlita
def _parse() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(
description=__doc__,
formatter_class=argparse.RawTextHelpFormatter,
)
parser.add_argument(
"--db_name",
action="store",
required=True,
type=str,
help="DB to drop",
)
parser.add_argument(
"--db_stage",
action="store",
type=str,
default="local",
help="Which env is used: local, dev or prod",
)
parser = hparser.add_verbosity_arg(parser)
return parser
def _main(parser: argparse.ArgumentParser) -> None:
args = parser.parse_args()
# Load DB credentials from env file.
db_stage = args.db_stage
env_file = imvimlita.get_db_env_path(db_stage)
connection_params = hsql.get_connection_info_from_env_file(env_file)
#
db_connection = hsql.get_connection(*connection_params)
# Drop selected database.
hsql.remove_database(connection=db_connection, dbname=args.db_name)
if __name__ == "__main__":
_main(_parse())
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
15945,
29908,
13,
4081,
304,
3349,
22313,
2566,
773,
3957,
29889,
13,
13,
29937,
15154,
263,
6535,
4257,
525,
1688,
29918,
2585,
29915,
773,
5177,
3651,
29901,
1405,
13,
5992,
29918,
2585,
29889,
2272,
1192,
2585,
29918,
978,
525,
1688,
29918,
2585,
29915,
13,
15945,
29908,
13,
13,
5215,
1852,
5510,
13,
13,
5215,
1371,
414,
29889,
29882,
16680,
408,
298,
16680,
13,
5215,
1371,
414,
29889,
29882,
2850,
408,
298,
2850,
13,
5215,
527,
29918,
29894,
29906,
29889,
326,
29918,
1982,
29918,
20673,
408,
527,
26770,
29880,
2028,
13,
13,
13,
1753,
903,
5510,
580,
1599,
1852,
5510,
29889,
15730,
11726,
29901,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
29898,
13,
4706,
6139,
29922,
1649,
1514,
1649,
29892,
13,
4706,
883,
2620,
29918,
1990,
29922,
1191,
5510,
29889,
22131,
1626,
29648,
18522,
29892,
13,
1678,
1723,
13,
1678,
13812,
29889,
1202,
29918,
23516,
29898,
13,
4706,
376,
489,
2585,
29918,
978,
613,
13,
4706,
3158,
543,
8899,
613,
13,
4706,
3734,
29922,
5574,
29892,
13,
4706,
1134,
29922,
710,
29892,
13,
4706,
1371,
543,
4051,
304,
5768,
613,
13,
1678,
1723,
13,
1678,
13812,
29889,
1202,
29918,
23516,
29898,
13,
4706,
376,
489,
2585,
29918,
19190,
613,
13,
4706,
3158,
543,
8899,
613,
13,
4706,
1134,
29922,
710,
29892,
13,
4706,
2322,
543,
2997,
613,
13,
4706,
1371,
543,
8809,
436,
8829,
338,
1304,
29901,
1887,
29892,
2906,
470,
11859,
613,
13,
1678,
1723,
13,
1678,
13812,
353,
298,
16680,
29889,
1202,
29918,
18248,
359,
537,
29918,
1191,
29898,
16680,
29897,
13,
1678,
736,
13812,
13,
13,
13,
1753,
903,
3396,
29898,
16680,
29901,
1852,
5510,
29889,
15730,
11726,
29897,
1599,
6213,
29901,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
1678,
396,
16012,
6535,
16140,
515,
8829,
934,
29889,
13,
1678,
4833,
29918,
19190,
353,
6389,
29889,
2585,
29918,
19190,
13,
1678,
8829,
29918,
1445,
353,
527,
26770,
29880,
2028,
29889,
657,
29918,
2585,
29918,
6272,
29918,
2084,
29898,
2585,
29918,
19190,
29897,
13,
1678,
3957,
29918,
7529,
353,
298,
2850,
29889,
657,
29918,
9965,
29918,
3888,
29918,
3166,
29918,
6272,
29918,
1445,
29898,
6272,
29918,
1445,
29897,
13,
1678,
396,
13,
1678,
4833,
29918,
9965,
353,
298,
2850,
29889,
657,
29918,
9965,
10456,
9965,
29918,
7529,
29897,
13,
1678,
396,
20724,
4629,
2566,
29889,
13,
1678,
298,
2850,
29889,
5992,
29918,
9803,
29898,
9965,
29922,
2585,
29918,
9965,
29892,
4833,
978,
29922,
5085,
29889,
2585,
29918,
978,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
903,
3396,
7373,
5510,
3101,
13,
2
] |
qiime_2_ll_quick_viewer/cli.py | gluque/qiime_2_ll_quick_viewer | 1 | 188834 | # -*- coding: utf-8 -*-
"""Console script for qiime_2_ll_quick_viewer."""
import click
from qiime_2_ll_quick_viewer import qiime_2_ll_quick_viewer
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
@click.command(context_settings=CONTEXT_SETTINGS)
@click.option('-f', '--filename', required=True,
help="Full path to a Qiime2 visualization file (*.qzv).")
@click.option('-p', '--port', required=True, default=8080,
help="Port to launch the web server.")
def main(filename, port):
"""Quick viewer for Qiime 2 artifacts.
It launches a simple web server to visualize the contents of the data
folder in a browser.
You can access to the server using a SSH tunnel session.
"""
qiime_2_ll_quick_viewer.launch_server(filename, port)
if __name__ == "__main__":
main()
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
15945,
29908,
20008,
2471,
363,
3855,
29875,
603,
29918,
29906,
29918,
645,
29918,
24561,
29918,
29894,
15580,
1213,
15945,
13,
13,
5215,
2828,
13,
3166,
3855,
29875,
603,
29918,
29906,
29918,
645,
29918,
24561,
29918,
29894,
15580,
1053,
3855,
29875,
603,
29918,
29906,
29918,
645,
29918,
24561,
29918,
29894,
15580,
13,
13,
13,
6007,
16975,
29918,
10490,
29911,
4214,
29903,
353,
9657,
29898,
8477,
29918,
3385,
29918,
7039,
29922,
1839,
29899,
29882,
742,
525,
489,
8477,
11287,
13,
13,
13,
29992,
3808,
29889,
6519,
29898,
4703,
29918,
11027,
29922,
6007,
16975,
29918,
10490,
29911,
4214,
29903,
29897,
13,
29992,
3808,
29889,
3385,
877,
29899,
29888,
742,
525,
489,
9507,
742,
3734,
29922,
5574,
29892,
13,
795,
1371,
543,
13658,
2224,
304,
263,
660,
29875,
603,
29906,
7604,
2133,
934,
3070,
29889,
29939,
29920,
29894,
467,
1159,
13,
29992,
3808,
29889,
3385,
877,
29899,
29886,
742,
525,
489,
637,
742,
3734,
29922,
5574,
29892,
2322,
29922,
29947,
29900,
29947,
29900,
29892,
13,
795,
1371,
543,
2290,
304,
6826,
278,
1856,
1923,
23157,
13,
1753,
1667,
29898,
9507,
29892,
2011,
1125,
13,
1678,
9995,
2182,
860,
6316,
556,
363,
660,
29875,
603,
29871,
29906,
24238,
29879,
29889,
13,
13,
1678,
739,
6826,
267,
263,
2560,
1856,
1923,
304,
7604,
675,
278,
8118,
310,
278,
848,
13,
1678,
4138,
297,
263,
4714,
29889,
13,
1678,
887,
508,
2130,
304,
278,
1923,
773,
263,
22343,
26086,
4867,
29889,
13,
1678,
9995,
13,
1678,
3855,
29875,
603,
29918,
29906,
29918,
645,
29918,
24561,
29918,
29894,
15580,
29889,
15343,
29918,
2974,
29898,
9507,
29892,
2011,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1667,
580,
13,
2
] |
cfgov/jobmanager/models/django.py | thephillipsequation/cfgov-refresh | 0 | 135384 | <gh_stars>0
from django.db import models
from wagtail.admin.edit_handlers import FieldPanel, InlinePanel
from wagtail.core.fields import RichTextField
from modelcluster.fields import ParentalKey
from modelcluster.models import ClusterableModel
class ApplicantType(models.Model):
applicant_type = models.CharField(max_length=255)
display_title = models.CharField(
max_length=255,
blank=True,
null=True)
description = models.TextField()
def __str__(self):
return self.applicant_type
class Meta:
ordering = ['applicant_type']
def __lt__(self, other):
return self.applicant_type < other.applicant_type
def __gt__(self, other):
return self.applicant_type > other.applicant_type
class Grade(models.Model):
grade = models.CharField(max_length=32)
salary_min = models.IntegerField()
salary_max = models.IntegerField()
def __str__(self):
return self.grade
class Meta:
ordering = ['grade']
def __lt__(self, other):
return self.grade < other.grade
def __gt__(self, other):
return self.grade > other.grade
class JobCategory(models.Model):
job_category = models.CharField(max_length=255)
blurb = RichTextField(null=True, blank=True)
def __str__(self):
return self.job_category
class Meta:
ordering = ['job_category']
class ServiceType(models.Model):
service_type = models.CharField(max_length=255)
def __str__(self):
return self.service_type
class Meta:
ordering = ['service_type']
class JobLength(models.Model):
job_length = models.CharField(max_length=255)
def __str__(self):
return self.job_length
class Meta:
ordering = ['job_length']
class JobLocation(ClusterableModel):
abbreviation = models.CharField(
max_length=2,
primary_key=True)
name = models.CharField(max_length=255)
def __str__(self):
return self.name
class Meta:
ordering = ('abbreviation',)
class Region(JobLocation):
panels = [
FieldPanel('abbreviation'),
FieldPanel('name'),
InlinePanel('states', label="States"),
InlinePanel('cities', label="Cities"),
]
class Office(JobLocation):
panels = [
FieldPanel('abbreviation'),
FieldPanel('name'),
InlinePanel('cities', label="Office location", max_num=1),
]
class State(models.Model):
name = models.CharField(
max_length=255,
verbose_name="State name")
abbreviation = models.CharField(
max_length=2,
primary_key=True)
region = ParentalKey(
'Region',
related_name="states")
def __str__(self):
return self.name
class Meta:
ordering = ('abbreviation',)
class City(models.Model):
name = models.CharField(
max_length=255,
verbose_name="City name")
state = models.ForeignKey(
State,
null=False,
blank=False,
default=None,
related_name='cities')
location = ParentalKey(
'JobLocation',
related_name='cities'
)
class Meta:
ordering = ('state_id', 'name')
def __str__(self):
return '{}, {}'.format(self.name, self.state.abbreviation)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
13,
3166,
281,
351,
18237,
29889,
6406,
29889,
5628,
29918,
3179,
9306,
1053,
8989,
7490,
29892,
512,
1220,
7490,
13,
3166,
281,
351,
18237,
29889,
3221,
29889,
9621,
1053,
4385,
15778,
13,
13,
3166,
1904,
19594,
29889,
9621,
1053,
1459,
13703,
2558,
13,
3166,
1904,
19594,
29889,
9794,
1053,
2233,
5402,
519,
3195,
13,
13,
13,
1990,
2401,
506,
424,
1542,
29898,
9794,
29889,
3195,
1125,
13,
1678,
15576,
424,
29918,
1853,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29945,
29945,
29897,
13,
1678,
2479,
29918,
3257,
353,
4733,
29889,
27890,
29898,
13,
4706,
4236,
29918,
2848,
29922,
29906,
29945,
29945,
29892,
13,
4706,
9654,
29922,
5574,
29892,
13,
4706,
1870,
29922,
5574,
29897,
13,
1678,
6139,
353,
4733,
29889,
15778,
580,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
932,
506,
424,
29918,
1853,
13,
13,
1678,
770,
20553,
29901,
13,
4706,
20520,
353,
6024,
932,
506,
424,
29918,
1853,
2033,
13,
13,
1678,
822,
4770,
1896,
12035,
1311,
29892,
916,
1125,
13,
4706,
736,
1583,
29889,
932,
506,
424,
29918,
1853,
529,
916,
29889,
932,
506,
424,
29918,
1853,
13,
13,
1678,
822,
4770,
4141,
12035,
1311,
29892,
916,
1125,
13,
4706,
736,
1583,
29889,
932,
506,
424,
29918,
1853,
1405,
916,
29889,
932,
506,
424,
29918,
1853,
13,
13,
13,
1990,
4989,
311,
29898,
9794,
29889,
3195,
1125,
13,
1678,
19468,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29941,
29906,
29897,
13,
1678,
4497,
653,
29918,
1195,
353,
4733,
29889,
7798,
3073,
580,
13,
1678,
4497,
653,
29918,
3317,
353,
4733,
29889,
7798,
3073,
580,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
8228,
13,
13,
1678,
770,
20553,
29901,
13,
4706,
20520,
353,
6024,
8228,
2033,
13,
13,
1678,
822,
4770,
1896,
12035,
1311,
29892,
916,
1125,
13,
4706,
736,
1583,
29889,
8228,
529,
916,
29889,
8228,
13,
13,
1678,
822,
4770,
4141,
12035,
1311,
29892,
916,
1125,
13,
4706,
736,
1583,
29889,
8228,
1405,
916,
29889,
8228,
13,
13,
13,
1990,
17163,
10900,
29898,
9794,
29889,
3195,
1125,
13,
1678,
4982,
29918,
7320,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29945,
29945,
29897,
13,
1678,
1999,
9265,
353,
4385,
15778,
29898,
4304,
29922,
5574,
29892,
9654,
29922,
5574,
29897,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
9057,
29918,
7320,
13,
13,
1678,
770,
20553,
29901,
13,
4706,
20520,
353,
6024,
9057,
29918,
7320,
2033,
13,
13,
13,
1990,
6692,
1542,
29898,
9794,
29889,
3195,
1125,
13,
1678,
2669,
29918,
1853,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29945,
29945,
29897,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
5509,
29918,
1853,
13,
13,
1678,
770,
20553,
29901,
13,
4706,
20520,
353,
6024,
5509,
29918,
1853,
2033,
13,
13,
13,
1990,
17163,
6513,
29898,
9794,
29889,
3195,
1125,
13,
1678,
4982,
29918,
2848,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29945,
29945,
29897,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
9057,
29918,
2848,
13,
13,
1678,
770,
20553,
29901,
13,
4706,
20520,
353,
6024,
9057,
29918,
2848,
2033,
13,
13,
13,
1990,
17163,
6508,
29898,
6821,
5402,
519,
3195,
1125,
13,
1678,
29759,
14641,
353,
4733,
29889,
27890,
29898,
13,
4706,
4236,
29918,
2848,
29922,
29906,
29892,
13,
4706,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
1024,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29906,
29945,
29945,
29897,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
978,
13,
13,
1678,
770,
20553,
29901,
13,
4706,
20520,
353,
6702,
370,
1030,
14641,
742,
29897,
13,
13,
13,
1990,
11069,
29898,
11947,
6508,
1125,
13,
1678,
7243,
1379,
353,
518,
13,
4706,
8989,
7490,
877,
370,
1030,
14641,
5477,
13,
4706,
8989,
7490,
877,
978,
5477,
13,
4706,
512,
1220,
7490,
877,
28631,
742,
3858,
543,
855,
1078,
4968,
13,
4706,
512,
1220,
7490,
877,
29883,
1907,
742,
3858,
543,
29907,
1907,
4968,
13,
1678,
4514,
13,
13,
13,
1990,
11367,
29898,
11947,
6508,
1125,
13,
1678,
7243,
1379,
353,
518,
13,
4706,
8989,
7490,
877,
370,
1030,
14641,
5477,
13,
4706,
8989,
7490,
877,
978,
5477,
13,
4706,
512,
1220,
7490,
877,
29883,
1907,
742,
3858,
543,
27247,
4423,
613,
4236,
29918,
1949,
29922,
29896,
511,
13,
1678,
4514,
13,
13,
13,
1990,
4306,
29898,
9794,
29889,
3195,
1125,
13,
1678,
1024,
353,
4733,
29889,
27890,
29898,
13,
4706,
4236,
29918,
2848,
29922,
29906,
29945,
29945,
29892,
13,
4706,
26952,
29918,
978,
543,
2792,
1024,
1159,
13,
1678,
29759,
14641,
353,
4733,
29889,
27890,
29898,
13,
4706,
4236,
29918,
2848,
29922,
29906,
29892,
13,
4706,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
5120,
353,
1459,
13703,
2558,
29898,
13,
4706,
525,
18457,
742,
13,
4706,
4475,
29918,
978,
543,
28631,
1159,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
978,
13,
13,
1678,
770,
20553,
29901,
13,
4706,
20520,
353,
6702,
370,
1030,
14641,
742,
29897,
13,
13,
13,
1990,
4412,
29898,
9794,
29889,
3195,
1125,
13,
1678,
1024,
353,
4733,
29889,
27890,
29898,
13,
4706,
4236,
29918,
2848,
29922,
29906,
29945,
29945,
29892,
13,
4706,
26952,
29918,
978,
543,
16885,
1024,
1159,
13,
1678,
2106,
353,
4733,
29889,
27755,
2558,
29898,
13,
4706,
4306,
29892,
13,
4706,
1870,
29922,
8824,
29892,
13,
4706,
9654,
29922,
8824,
29892,
13,
4706,
2322,
29922,
8516,
29892,
13,
4706,
4475,
29918,
978,
2433,
29883,
1907,
1495,
13,
1678,
4423,
353,
1459,
13703,
2558,
29898,
13,
4706,
525,
11947,
6508,
742,
13,
4706,
4475,
29918,
978,
2433,
29883,
1907,
29915,
13,
1678,
1723,
13,
13,
1678,
770,
20553,
29901,
13,
4706,
20520,
353,
6702,
3859,
29918,
333,
742,
525,
978,
1495,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
22372,
1118,
6571,
4286,
4830,
29898,
1311,
29889,
978,
29892,
1583,
29889,
3859,
29889,
370,
1030,
14641,
29897,
13,
2
] |
python/revegetate.py | TenType/competition | 1 | 170418 | <reponame>TenType/competition
n, m = map(int, input().split())
connected = []
seeds = []
for i in range(0, n):
connected.append([])
for i in range(0, m):
a, b = map(int, input().split())
if (b not in connected[a-1]):
connected[a-1].append(b)
if (a not in connected[b-1]):
connected[b-1].append(a)
print(connected)
# for each pasture
for i in range(0, n):
# for each seed
for j in range(1, 4):
valid = True
# for each other pasture
for k in range(1, 4):
if k == j:
continue
if k in connected[j]:
valid = False
break
if valid:
seeds.append(k)
break
print(seeds)
| [
1,
529,
276,
1112,
420,
29958,
29911,
264,
1542,
29914,
2388,
300,
654,
13,
29876,
29892,
286,
353,
2910,
29898,
524,
29892,
1881,
2141,
5451,
3101,
13,
18045,
353,
5159,
13,
344,
5779,
353,
5159,
13,
1454,
474,
297,
3464,
29898,
29900,
29892,
302,
1125,
13,
12,
18045,
29889,
4397,
4197,
2314,
13,
12,
13,
1454,
474,
297,
3464,
29898,
29900,
29892,
286,
1125,
13,
12,
29874,
29892,
289,
353,
2910,
29898,
524,
29892,
1881,
2141,
5451,
3101,
13,
12,
361,
313,
29890,
451,
297,
6631,
29961,
29874,
29899,
29896,
29962,
1125,
13,
12,
12,
18045,
29961,
29874,
29899,
29896,
1822,
4397,
29898,
29890,
29897,
13,
12,
361,
313,
29874,
451,
297,
6631,
29961,
29890,
29899,
29896,
29962,
1125,
13,
12,
12,
18045,
29961,
29890,
29899,
29896,
1822,
4397,
29898,
29874,
29897,
13,
13,
2158,
29898,
18045,
29897,
13,
12,
12,
13,
13,
29937,
363,
1269,
4940,
545,
13,
1454,
474,
297,
3464,
29898,
29900,
29892,
302,
1125,
13,
13,
12,
29937,
363,
1269,
16717,
13,
12,
1454,
432,
297,
3464,
29898,
29896,
29892,
29871,
29946,
1125,
13,
12,
12,
3084,
353,
5852,
13,
13,
12,
12,
29937,
363,
1269,
916,
4940,
545,
13,
12,
12,
1454,
413,
297,
3464,
29898,
29896,
29892,
29871,
29946,
1125,
13,
12,
12,
12,
361,
413,
1275,
432,
29901,
13,
12,
12,
12,
12,
19878,
13,
12,
12,
12,
361,
413,
297,
6631,
29961,
29926,
5387,
13,
12,
12,
12,
12,
3084,
353,
7700,
13,
12,
12,
12,
12,
8690,
13,
13,
12,
12,
361,
2854,
29901,
13,
12,
12,
12,
344,
5779,
29889,
4397,
29898,
29895,
29897,
13,
12,
12,
12,
8690,
13,
13,
2158,
29898,
344,
5779,
29897,
13,
12,
12,
12,
13,
13,
12,
13,
2
] |
lib/datasets/carla.py | BuiKhoi/DDRNet.pytorch | 0 | 160702 | <reponame>BuiKhoi/DDRNet.pytorch
# ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Written by <NAME> (<EMAIL>)
# ------------------------------------------------------------------------------
import os
import cv2
import numpy as np
from PIL import Image
import torch
from torch.nn import functional as F
from .base_dataset import BaseDataset
class Carla(BaseDataset):
def __init__(self,
root,
list_path,
num_samples=None,
num_classes=8,
multi_scale=True,
flip=True,
ignore_label=-1,
base_size=2048,
crop_size=(512, 1024),
downsample_rate=1,
scale_factor=16,
mean=[0.485, 0.456, 0.406],
std=[0.229, 0.224, 0.225]):
super(Carla, self).__init__(ignore_label, base_size,
crop_size, downsample_rate, scale_factor, mean, std, )
self.root = root
self.list_path = list_path
self.num_classes = num_classes
self.multi_scale = multi_scale
self.flip = flip
self.img_list = [line.strip().split() for line in open(root + list_path)]
self.files = self.read_files()
if num_samples:
self.files = self.files[:num_samples]
self.label_mapping = {
0: 0, 1: 1, 2: 2, 3: 3, 4: 4,
5: 5, 6: 6, 7: 7, 8: 8
}
# Nothing, Bridges, Pedestrian, Road, Road line, Side walk, Traffic sign, Traffic light, Vehicles
# self.class_weights = None
self.class_weights = torch.FloatTensor([
0.0373, 0.9345, 1.4843, 0.8373,
1.2577, 0.918, 1.2489, 1.245, 1.037
]).cuda()
self.color_palette = [
(0, 0, 0),
(150, 100, 100),
(220, 20, 60),
(128, 64, 128),
(157, 234, 50),
(244, 35, 232),
(220, 220, 0),
(250, 170, 30),
(0, 0, 142)
]
def read_files(self):
files = []
if 'test' in self.list_path:
for item in self.img_list:
image_path = item
name = os.path.splitext(os.path.basename(image_path[0]))[0]
files.append({
"img": image_path[0],
"name": name,
})
else:
for item in self.img_list:
image_path, label_path = item
name = os.path.splitext(os.path.basename(label_path))[0]
files.append({
"img": image_path,
"label": label_path,
"name": name,
"weight": 1
})
return files
def convert_label(self, label, inverse=False):
temp = label.copy()
if inverse:
for v, k in self.label_mapping.items():
label[temp == k] = v
else:
for k, v in self.label_mapping.items():
label[temp == k] = v
return label
def __getitem__(self, index):
item = self.files[index]
name = item["name"]
image = cv2.imread(os.path.join(self.root, 'carla', item["img"]),
cv2.IMREAD_COLOR)
size = image.shape
if 'test' in self.list_path:
image = self.input_transform(image)
image = image.transpose((2, 0, 1))
return image.copy(), np.array(size), name
label = cv2.imread(os.path.join(self.root, 'carla', item["label"]),
cv2.IMREAD_GRAYSCALE)
label = self.convert_label(label)
image, label = self.gen_sample(image, label,
self.multi_scale, self.flip)
return image.copy(), label.copy(), np.array(size), name
def multi_scale_inference(self, config, model, image, scales=[1], flip=False):
batch, _, ori_height, ori_width = image.size()
assert batch == 1, "only supporting batchsize 1."
image = image.numpy()[0].transpose((1, 2, 0)).copy()
stride_h = np.int(self.crop_size[0] * 1.0)
stride_w = np.int(self.crop_size[1] * 1.0)
final_pred = torch.zeros([1, self.num_classes,
ori_height, ori_width]).cuda()
for scale in scales:
new_img = self.multi_scale_aug(image=image,
rand_scale=scale,
rand_crop=False)
height, width = new_img.shape[:-1]
if scale <= 1.0:
new_img = new_img.transpose((2, 0, 1))
new_img = np.expand_dims(new_img, axis=0)
new_img = torch.from_numpy(new_img)
preds = self.inference(config, model, new_img, flip)
preds = preds[:, :, 0:height, 0:width]
else:
new_h, new_w = new_img.shape[:-1]
rows = np.int(np.ceil(1.0 * (new_h -
self.crop_size[0]) / stride_h)) + 1
cols = np.int(np.ceil(1.0 * (new_w -
self.crop_size[1]) / stride_w)) + 1
preds = torch.zeros([1, self.num_classes,
new_h, new_w]).cuda()
count = torch.zeros([1, 1, new_h, new_w]).cuda()
for r in range(rows):
for c in range(cols):
h0 = r * stride_h
w0 = c * stride_w
h1 = min(h0 + self.crop_size[0], new_h)
w1 = min(w0 + self.crop_size[1], new_w)
h0 = max(int(h1 - self.crop_size[0]), 0)
w0 = max(int(w1 - self.crop_size[1]), 0)
crop_img = new_img[h0:h1, w0:w1, :]
crop_img = crop_img.transpose((2, 0, 1))
crop_img = np.expand_dims(crop_img, axis=0)
crop_img = torch.from_numpy(crop_img)
pred = self.inference(config, model, crop_img, flip)
preds[:, :, h0:h1, w0:w1] += pred[:, :, 0:h1 - h0, 0:w1 - w0]
count[:, :, h0:h1, w0:w1] += 1
preds = preds / count
preds = preds[:, :, :height, :width]
preds = F.interpolate(
preds, (ori_height, ori_width),
mode='bilinear', align_corners=config.MODEL.ALIGN_CORNERS
)
final_pred += preds
return final_pred
def save_pred(self, image, preds, sv_path, name):
h, w = preds.shape
image_canvas = np.empty((w, h*2, 3), np.uint8)
image_canvas[:h] = image[:, :, ::-1]
image_canvas[h:] = self.fill_color_palette(self.color_palette, preds)
cv2.imwrite(
os.path.join(sv_path, name[0] + '.png'),
image_canvas
)
def fill_color_palette(self, labels, segmentation):
canvas = np.zeros((*segmentation.shape, 3), np.uint8)
for idx, label in enumerate(labels):
indices = np.where(segmentation == idx)
canvas[indices[0], indices[1], :] = label
return canvas
| [
1,
529,
276,
1112,
420,
29958,
29933,
1481,
29968,
1251,
29875,
29914,
7858,
29934,
6779,
29889,
2272,
7345,
305,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
29899,
13,
29937,
14187,
1266,
313,
29883,
29897,
7783,
13,
29937,
10413,
21144,
1090,
278,
341,
1806,
19245,
29889,
13,
29937,
16849,
841,
491,
529,
5813,
29958,
313,
29966,
26862,
6227,
12948,
13,
29937,
448,
2683,
2683,
2683,
2683,
9072,
29899,
13,
13,
5215,
2897,
13,
13,
5215,
13850,
29906,
13,
5215,
12655,
408,
7442,
13,
3166,
349,
6227,
1053,
7084,
13,
13,
5215,
4842,
305,
13,
3166,
4842,
305,
29889,
15755,
1053,
13303,
408,
383,
13,
13,
3166,
869,
3188,
29918,
24713,
1053,
7399,
16390,
24541,
13,
13,
13,
1990,
1704,
433,
29898,
5160,
16390,
24541,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
3876,
29892,
13,
462,
1051,
29918,
2084,
29892,
13,
462,
954,
29918,
27736,
29922,
8516,
29892,
13,
462,
954,
29918,
13203,
29922,
29947,
29892,
13,
462,
2473,
29918,
7052,
29922,
5574,
29892,
13,
462,
285,
3466,
29922,
5574,
29892,
13,
462,
11455,
29918,
1643,
10457,
29896,
29892,
13,
462,
2967,
29918,
2311,
29922,
29906,
29900,
29946,
29947,
29892,
13,
462,
274,
1336,
29918,
2311,
7607,
29945,
29896,
29906,
29892,
29871,
29896,
29900,
29906,
29946,
511,
13,
462,
1623,
11249,
29918,
10492,
29922,
29896,
29892,
13,
462,
6287,
29918,
19790,
29922,
29896,
29953,
29892,
13,
462,
2099,
11759,
29900,
29889,
29946,
29947,
29945,
29892,
29871,
29900,
29889,
29946,
29945,
29953,
29892,
29871,
29900,
29889,
29946,
29900,
29953,
1402,
13,
462,
3659,
11759,
29900,
29889,
29906,
29906,
29929,
29892,
29871,
29900,
29889,
29906,
29906,
29946,
29892,
29871,
29900,
29889,
29906,
29906,
29945,
29962,
1125,
13,
13,
4706,
2428,
29898,
8179,
433,
29892,
1583,
467,
1649,
2344,
12035,
17281,
29918,
1643,
29892,
2967,
29918,
2311,
29892,
13,
462,
462,
1678,
274,
1336,
29918,
2311,
29892,
1623,
11249,
29918,
10492,
29892,
6287,
29918,
19790,
29892,
2099,
29892,
3659,
29892,
1723,
13,
13,
4706,
1583,
29889,
4632,
353,
3876,
13,
4706,
1583,
29889,
1761,
29918,
2084,
353,
1051,
29918,
2084,
13,
4706,
1583,
29889,
1949,
29918,
13203,
353,
954,
29918,
13203,
13,
13,
4706,
1583,
29889,
9910,
29918,
7052,
353,
2473,
29918,
7052,
13,
4706,
1583,
29889,
29888,
3466,
353,
285,
3466,
13,
13,
4706,
1583,
29889,
2492,
29918,
1761,
353,
518,
1220,
29889,
17010,
2141,
5451,
580,
363,
1196,
297,
1722,
29898,
4632,
718,
1051,
29918,
2084,
4638,
13,
13,
4706,
1583,
29889,
5325,
353,
1583,
29889,
949,
29918,
5325,
580,
13,
4706,
565,
954,
29918,
27736,
29901,
13,
9651,
1583,
29889,
5325,
353,
1583,
29889,
5325,
7503,
1949,
29918,
27736,
29962,
13,
13,
4706,
1583,
29889,
1643,
29918,
20698,
353,
426,
13,
632,
29900,
29901,
29871,
29900,
29892,
29871,
29896,
29901,
29871,
29896,
29892,
29871,
29906,
29901,
29871,
29906,
29892,
29871,
29941,
29901,
29871,
29941,
29892,
29871,
29946,
29901,
29871,
29946,
29892,
13,
632,
29945,
29901,
29871,
29945,
29892,
29871,
29953,
29901,
29871,
29953,
29892,
29871,
29955,
29901,
29871,
29955,
29892,
29871,
29947,
29901,
29871,
29947,
13,
4706,
500,
13,
13,
4706,
396,
9531,
29892,
1771,
333,
2710,
29892,
9293,
342,
6392,
29892,
9321,
29892,
9321,
1196,
29892,
19160,
6686,
29892,
3201,
2416,
1804,
29892,
3201,
2416,
3578,
29892,
8980,
29882,
4027,
13,
13,
4706,
396,
1583,
29889,
1990,
29918,
705,
5861,
353,
6213,
13,
13,
4706,
1583,
29889,
1990,
29918,
705,
5861,
353,
4842,
305,
29889,
11031,
29911,
6073,
4197,
13,
632,
29900,
29889,
29900,
29941,
29955,
29941,
29892,
29871,
29900,
29889,
29929,
29941,
29946,
29945,
29892,
29871,
29896,
29889,
29946,
29947,
29946,
29941,
29892,
29871,
29900,
29889,
29947,
29941,
29955,
29941,
29892,
13,
632,
29896,
29889,
29906,
29945,
29955,
29955,
29892,
29871,
29900,
29889,
29929,
29896,
29947,
29892,
29871,
29896,
29889,
29906,
29946,
29947,
29929,
29892,
29871,
29896,
29889,
29906,
29946,
29945,
29892,
29871,
29896,
29889,
29900,
29941,
29955,
13,
4706,
4514,
467,
29883,
6191,
580,
13,
13,
4706,
1583,
29889,
2780,
29918,
29886,
26456,
353,
518,
13,
9651,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
511,
13,
9651,
313,
29896,
29945,
29900,
29892,
29871,
29896,
29900,
29900,
29892,
29871,
29896,
29900,
29900,
511,
13,
9651,
313,
29906,
29906,
29900,
29892,
29871,
29906,
29900,
29892,
29871,
29953,
29900,
511,
13,
9651,
313,
29896,
29906,
29947,
29892,
29871,
29953,
29946,
29892,
29871,
29896,
29906,
29947,
511,
13,
9651,
313,
29896,
29945,
29955,
29892,
29871,
29906,
29941,
29946,
29892,
29871,
29945,
29900,
511,
13,
9651,
313,
29906,
29946,
29946,
29892,
29871,
29941,
29945,
29892,
29871,
29906,
29941,
29906,
511,
13,
9651,
313,
29906,
29906,
29900,
29892,
29871,
29906,
29906,
29900,
29892,
29871,
29900,
511,
13,
9651,
313,
29906,
29945,
29900,
29892,
29871,
29896,
29955,
29900,
29892,
29871,
29941,
29900,
511,
13,
9651,
313,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
29946,
29906,
29897,
13,
4706,
4514,
13,
13,
1678,
822,
1303,
29918,
5325,
29898,
1311,
1125,
13,
4706,
2066,
353,
5159,
13,
4706,
565,
525,
1688,
29915,
297,
1583,
29889,
1761,
29918,
2084,
29901,
13,
9651,
363,
2944,
297,
1583,
29889,
2492,
29918,
1761,
29901,
13,
18884,
1967,
29918,
2084,
353,
2944,
13,
18884,
1024,
353,
2897,
29889,
2084,
29889,
23579,
568,
486,
29898,
359,
29889,
2084,
29889,
6500,
3871,
29898,
3027,
29918,
2084,
29961,
29900,
12622,
29961,
29900,
29962,
13,
18884,
2066,
29889,
4397,
3319,
13,
462,
1678,
376,
2492,
1115,
1967,
29918,
2084,
29961,
29900,
1402,
13,
462,
1678,
376,
978,
1115,
1024,
29892,
13,
18884,
5615,
13,
4706,
1683,
29901,
13,
9651,
363,
2944,
297,
1583,
29889,
2492,
29918,
1761,
29901,
13,
18884,
1967,
29918,
2084,
29892,
3858,
29918,
2084,
353,
2944,
13,
18884,
1024,
353,
2897,
29889,
2084,
29889,
23579,
568,
486,
29898,
359,
29889,
2084,
29889,
6500,
3871,
29898,
1643,
29918,
2084,
876,
29961,
29900,
29962,
13,
18884,
2066,
29889,
4397,
3319,
13,
462,
1678,
376,
2492,
1115,
1967,
29918,
2084,
29892,
13,
462,
1678,
376,
1643,
1115,
3858,
29918,
2084,
29892,
13,
462,
1678,
376,
978,
1115,
1024,
29892,
13,
462,
1678,
376,
7915,
1115,
29871,
29896,
13,
18884,
5615,
13,
4706,
736,
2066,
13,
13,
1678,
822,
3588,
29918,
1643,
29898,
1311,
29892,
3858,
29892,
16402,
29922,
8824,
1125,
13,
4706,
5694,
353,
3858,
29889,
8552,
580,
13,
4706,
565,
16402,
29901,
13,
9651,
363,
325,
29892,
413,
297,
1583,
29889,
1643,
29918,
20698,
29889,
7076,
7295,
13,
18884,
3858,
29961,
7382,
1275,
413,
29962,
353,
325,
13,
4706,
1683,
29901,
13,
9651,
363,
413,
29892,
325,
297,
1583,
29889,
1643,
29918,
20698,
29889,
7076,
7295,
13,
18884,
3858,
29961,
7382,
1275,
413,
29962,
353,
325,
13,
4706,
736,
3858,
13,
13,
1678,
822,
4770,
657,
667,
12035,
1311,
29892,
2380,
1125,
13,
4706,
2944,
353,
1583,
29889,
5325,
29961,
2248,
29962,
13,
4706,
1024,
353,
2944,
3366,
978,
3108,
13,
4706,
1967,
353,
13850,
29906,
29889,
326,
949,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
4632,
29892,
525,
4287,
433,
742,
2944,
3366,
2492,
3108,
511,
13,
462,
965,
13850,
29906,
29889,
7833,
16310,
29918,
15032,
1955,
29897,
13,
4706,
2159,
353,
1967,
29889,
12181,
13,
13,
4706,
565,
525,
1688,
29915,
297,
1583,
29889,
1761,
29918,
2084,
29901,
13,
9651,
1967,
353,
1583,
29889,
2080,
29918,
9067,
29898,
3027,
29897,
13,
9651,
1967,
353,
1967,
29889,
3286,
4220,
3552,
29906,
29892,
29871,
29900,
29892,
29871,
29896,
876,
13,
13,
9651,
736,
1967,
29889,
8552,
3285,
7442,
29889,
2378,
29898,
2311,
511,
1024,
13,
13,
4706,
3858,
353,
13850,
29906,
29889,
326,
949,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
4632,
29892,
525,
4287,
433,
742,
2944,
3366,
1643,
3108,
511,
13,
462,
965,
13850,
29906,
29889,
7833,
16310,
29918,
29954,
4717,
21554,
5454,
1307,
29897,
13,
4706,
3858,
353,
1583,
29889,
13441,
29918,
1643,
29898,
1643,
29897,
13,
13,
4706,
1967,
29892,
3858,
353,
1583,
29889,
1885,
29918,
11249,
29898,
3027,
29892,
3858,
29892,
13,
462,
462,
539,
1583,
29889,
9910,
29918,
7052,
29892,
1583,
29889,
29888,
3466,
29897,
13,
13,
4706,
736,
1967,
29889,
8552,
3285,
3858,
29889,
8552,
3285,
7442,
29889,
2378,
29898,
2311,
511,
1024,
13,
13,
1678,
822,
2473,
29918,
7052,
29918,
262,
1659,
29898,
1311,
29892,
2295,
29892,
1904,
29892,
1967,
29892,
23431,
11759,
29896,
1402,
285,
3466,
29922,
8824,
1125,
13,
4706,
9853,
29892,
17117,
470,
29875,
29918,
3545,
29892,
470,
29875,
29918,
2103,
353,
1967,
29889,
2311,
580,
13,
4706,
4974,
9853,
1275,
29871,
29896,
29892,
376,
6194,
20382,
9853,
2311,
29871,
29896,
1213,
13,
4706,
1967,
353,
1967,
29889,
23749,
580,
29961,
29900,
1822,
3286,
4220,
3552,
29896,
29892,
29871,
29906,
29892,
29871,
29900,
8106,
8552,
580,
13,
4706,
380,
2426,
29918,
29882,
353,
7442,
29889,
524,
29898,
1311,
29889,
29883,
1336,
29918,
2311,
29961,
29900,
29962,
334,
29871,
29896,
29889,
29900,
29897,
13,
4706,
380,
2426,
29918,
29893,
353,
7442,
29889,
524,
29898,
1311,
29889,
29883,
1336,
29918,
2311,
29961,
29896,
29962,
334,
29871,
29896,
29889,
29900,
29897,
13,
4706,
2186,
29918,
11965,
353,
4842,
305,
29889,
3298,
359,
4197,
29896,
29892,
1583,
29889,
1949,
29918,
13203,
29892,
13,
462,
462,
29871,
470,
29875,
29918,
3545,
29892,
470,
29875,
29918,
2103,
14664,
29883,
6191,
580,
13,
4706,
363,
6287,
297,
23431,
29901,
13,
9651,
716,
29918,
2492,
353,
1583,
29889,
9910,
29918,
7052,
29918,
2987,
29898,
3027,
29922,
3027,
29892,
13,
462,
462,
965,
20088,
29918,
7052,
29922,
7052,
29892,
13,
462,
462,
965,
20088,
29918,
29883,
1336,
29922,
8824,
29897,
13,
9651,
3171,
29892,
2920,
353,
716,
29918,
2492,
29889,
12181,
7503,
29899,
29896,
29962,
13,
13,
9651,
565,
6287,
5277,
29871,
29896,
29889,
29900,
29901,
13,
18884,
716,
29918,
2492,
353,
716,
29918,
2492,
29889,
3286,
4220,
3552,
29906,
29892,
29871,
29900,
29892,
29871,
29896,
876,
13,
18884,
716,
29918,
2492,
353,
7442,
29889,
18837,
29918,
6229,
29879,
29898,
1482,
29918,
2492,
29892,
9685,
29922,
29900,
29897,
13,
18884,
716,
29918,
2492,
353,
4842,
305,
29889,
3166,
29918,
23749,
29898,
1482,
29918,
2492,
29897,
13,
18884,
4450,
29879,
353,
1583,
29889,
262,
1659,
29898,
2917,
29892,
1904,
29892,
716,
29918,
2492,
29892,
285,
3466,
29897,
13,
18884,
4450,
29879,
353,
4450,
29879,
7503,
29892,
584,
29892,
29871,
29900,
29901,
3545,
29892,
29871,
29900,
29901,
2103,
29962,
13,
9651,
1683,
29901,
13,
18884,
716,
29918,
29882,
29892,
716,
29918,
29893,
353,
716,
29918,
2492,
29889,
12181,
7503,
29899,
29896,
29962,
13,
18884,
4206,
353,
7442,
29889,
524,
29898,
9302,
29889,
27696,
29898,
29896,
29889,
29900,
334,
313,
1482,
29918,
29882,
448,
13,
462,
462,
632,
1583,
29889,
29883,
1336,
29918,
2311,
29961,
29900,
2314,
847,
380,
2426,
29918,
29882,
876,
718,
29871,
29896,
13,
18884,
28730,
353,
7442,
29889,
524,
29898,
9302,
29889,
27696,
29898,
29896,
29889,
29900,
334,
313,
1482,
29918,
29893,
448,
13,
462,
462,
632,
1583,
29889,
29883,
1336,
29918,
2311,
29961,
29896,
2314,
847,
380,
2426,
29918,
29893,
876,
718,
29871,
29896,
13,
18884,
4450,
29879,
353,
4842,
305,
29889,
3298,
359,
4197,
29896,
29892,
1583,
29889,
1949,
29918,
13203,
29892,
13,
462,
462,
268,
716,
29918,
29882,
29892,
716,
29918,
29893,
14664,
29883,
6191,
580,
13,
18884,
2302,
353,
4842,
305,
29889,
3298,
359,
4197,
29896,
29892,
29871,
29896,
29892,
716,
29918,
29882,
29892,
716,
29918,
29893,
14664,
29883,
6191,
580,
13,
13,
18884,
363,
364,
297,
3464,
29898,
5727,
1125,
13,
462,
1678,
363,
274,
297,
3464,
29898,
22724,
1125,
13,
462,
4706,
298,
29900,
353,
364,
334,
380,
2426,
29918,
29882,
13,
462,
4706,
281,
29900,
353,
274,
334,
380,
2426,
29918,
29893,
13,
462,
4706,
298,
29896,
353,
1375,
29898,
29882,
29900,
718,
1583,
29889,
29883,
1336,
29918,
2311,
29961,
29900,
1402,
716,
29918,
29882,
29897,
13,
462,
4706,
281,
29896,
353,
1375,
29898,
29893,
29900,
718,
1583,
29889,
29883,
1336,
29918,
2311,
29961,
29896,
1402,
716,
29918,
29893,
29897,
13,
462,
4706,
298,
29900,
353,
4236,
29898,
524,
29898,
29882,
29896,
448,
1583,
29889,
29883,
1336,
29918,
2311,
29961,
29900,
11724,
29871,
29900,
29897,
13,
462,
4706,
281,
29900,
353,
4236,
29898,
524,
29898,
29893,
29896,
448,
1583,
29889,
29883,
1336,
29918,
2311,
29961,
29896,
11724,
29871,
29900,
29897,
13,
462,
4706,
274,
1336,
29918,
2492,
353,
716,
29918,
2492,
29961,
29882,
29900,
29901,
29882,
29896,
29892,
281,
29900,
29901,
29893,
29896,
29892,
584,
29962,
13,
462,
4706,
274,
1336,
29918,
2492,
353,
274,
1336,
29918,
2492,
29889,
3286,
4220,
3552,
29906,
29892,
29871,
29900,
29892,
29871,
29896,
876,
13,
462,
4706,
274,
1336,
29918,
2492,
353,
7442,
29889,
18837,
29918,
6229,
29879,
29898,
29883,
1336,
29918,
2492,
29892,
9685,
29922,
29900,
29897,
13,
462,
4706,
274,
1336,
29918,
2492,
353,
4842,
305,
29889,
3166,
29918,
23749,
29898,
29883,
1336,
29918,
2492,
29897,
13,
462,
4706,
4450,
353,
1583,
29889,
262,
1659,
29898,
2917,
29892,
1904,
29892,
274,
1336,
29918,
2492,
29892,
285,
3466,
29897,
13,
462,
4706,
4450,
29879,
7503,
29892,
584,
29892,
298,
29900,
29901,
29882,
29896,
29892,
281,
29900,
29901,
29893,
29896,
29962,
4619,
4450,
7503,
29892,
584,
29892,
29871,
29900,
29901,
29882,
29896,
448,
298,
29900,
29892,
29871,
29900,
29901,
29893,
29896,
448,
281,
29900,
29962,
13,
462,
4706,
2302,
7503,
29892,
584,
29892,
298,
29900,
29901,
29882,
29896,
29892,
281,
29900,
29901,
29893,
29896,
29962,
4619,
29871,
29896,
13,
18884,
4450,
29879,
353,
4450,
29879,
847,
2302,
13,
18884,
4450,
29879,
353,
4450,
29879,
7503,
29892,
584,
29892,
584,
3545,
29892,
584,
2103,
29962,
13,
13,
9651,
4450,
29879,
353,
383,
29889,
1639,
3733,
403,
29898,
13,
18884,
4450,
29879,
29892,
313,
4170,
29918,
3545,
29892,
470,
29875,
29918,
2103,
511,
13,
18884,
4464,
2433,
18152,
457,
279,
742,
7595,
29918,
29883,
1398,
414,
29922,
2917,
29889,
20387,
29931,
29889,
1964,
17298,
29918,
29907,
1955,
13865,
29903,
13,
9651,
1723,
13,
9651,
2186,
29918,
11965,
4619,
4450,
29879,
13,
4706,
736,
2186,
29918,
11965,
13,
13,
1678,
822,
4078,
29918,
11965,
29898,
1311,
29892,
1967,
29892,
4450,
29879,
29892,
3731,
29918,
2084,
29892,
1024,
1125,
13,
4706,
298,
29892,
281,
353,
4450,
29879,
29889,
12181,
13,
4706,
1967,
29918,
15257,
353,
7442,
29889,
6310,
3552,
29893,
29892,
298,
29930,
29906,
29892,
29871,
29941,
511,
7442,
29889,
13470,
29947,
29897,
13,
4706,
1967,
29918,
15257,
7503,
29882,
29962,
353,
1967,
7503,
29892,
584,
29892,
4761,
29899,
29896,
29962,
13,
4706,
1967,
29918,
15257,
29961,
29882,
17531,
353,
1583,
29889,
5589,
29918,
2780,
29918,
29886,
26456,
29898,
1311,
29889,
2780,
29918,
29886,
26456,
29892,
4450,
29879,
29897,
13,
4706,
13850,
29906,
29889,
326,
3539,
29898,
13,
9651,
2897,
29889,
2084,
29889,
7122,
29898,
4501,
29918,
2084,
29892,
1024,
29961,
29900,
29962,
718,
15300,
2732,
5477,
13,
9651,
1967,
29918,
15257,
13,
4706,
1723,
13,
13,
1678,
822,
5445,
29918,
2780,
29918,
29886,
26456,
29898,
1311,
29892,
11073,
29892,
10768,
362,
1125,
13,
4706,
10508,
353,
7442,
29889,
3298,
359,
3552,
29930,
28192,
362,
29889,
12181,
29892,
29871,
29941,
511,
7442,
29889,
13470,
29947,
29897,
13,
4706,
363,
22645,
29892,
3858,
297,
26985,
29898,
21134,
1125,
13,
9651,
16285,
353,
7442,
29889,
3062,
29898,
28192,
362,
1275,
22645,
29897,
13,
9651,
10508,
29961,
513,
1575,
29961,
29900,
1402,
16285,
29961,
29896,
1402,
584,
29962,
353,
3858,
13,
4706,
736,
10508,
13,
2
] |
examples/distributed_dl/distributed_ml.py | james-tn/ray-on-aml | 19 | 117045 | <filename>examples/distributed_dl/distributed_ml.py
from ray_on_aml.core import Ray_On_AML
from azureml.core import Run
import numpy as np
import torch
import torch.optim as optim
import torch.nn as nn
from torchvision import datasets, transforms
from torch.utils.data import DataLoader
import torch.nn.functional as F
import ray.train.torch
from ray import train
from ray.train import Trainer
from ray import tune
# from ray.tune import Callback
import torch
import torch.nn as nn
from torch.nn.modules.utils import consume_prefix_in_state_dict_if_present
from torch.optim import Adam
import numpy as np
def train_func(config):
cuda = torch.device('cuda')
n = 100
# create a toy dataset
# data : X - dim = (n, 4)
# target : Y - dim = (n, 1)
X = torch.Tensor(np.random.normal(0, 1, size=(n, 4))).detach().to(cuda)
Y = torch.Tensor(np.random.uniform(0, 1, size=(n, 1))).detach().to(cuda)
# toy neural network : 1-layer
# wrap the model in DDP
model = ray.train.torch.prepare_model(nn.Linear(4, 1))
criterion = nn.MSELoss()
optimizer = Adam(model.parameters(), lr=3e-4)
for epoch in range(config["num_epochs"]):
y = model.forward(X)
# compute loss
loss = criterion(y, Y)
print("epoch ", epoch, " loss ", loss)
# back-propagate loss
optimizer.zero_grad()
loss.backward()
optimizer.step()
# To fetch non-DDP state_dict
# w/o DDP: model.state_dict()
# w/ DDP: model.module.state_dict()
# See: https://github.com/ray-project/ray/issues/20915
state_dict = model.state_dict()
consume_prefix_in_state_dict_if_present(state_dict, "module.")
train.save_checkpoint(epoch=epoch, model_weights=state_dict)
if __name__ == "__main__":
run = Run.get_context()
ws = run.experiment.workspace
ray_on_aml =Ray_On_AML()
ray = ray_on_aml.getRay()
if ray: #in the headnode
print("head node detected")
print("test distributed DL trainining")
print("resources for ray cluster ", ray.cluster_resources())
trainer = Trainer(backend="torch", num_workers=2,use_gpu =True)
trainer.start()
trainer.run(train_func, config={"num_epochs": 5})
trainer.shutdown()
print(trainer.latest_checkpoint)
else:
print("in worker node")
| [
1,
529,
9507,
29958,
19057,
29914,
5721,
7541,
29918,
11671,
29914,
5721,
7541,
29918,
828,
29889,
2272,
13,
13,
3166,
15570,
29918,
265,
29918,
8807,
29889,
3221,
1053,
9596,
29918,
2951,
29918,
23956,
13,
3166,
15699,
828,
29889,
3221,
1053,
7525,
13,
5215,
12655,
408,
7442,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
20640,
408,
5994,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
3166,
4842,
305,
4924,
1053,
20035,
29892,
4327,
29879,
13,
3166,
4842,
305,
29889,
13239,
29889,
1272,
1053,
3630,
10036,
13,
5215,
4842,
305,
29889,
15755,
29889,
2220,
284,
408,
383,
13,
5215,
15570,
29889,
14968,
29889,
7345,
305,
13,
3166,
15570,
1053,
7945,
13,
3166,
15570,
29889,
14968,
1053,
3201,
4983,
13,
3166,
15570,
1053,
260,
1540,
13,
29937,
515,
15570,
29889,
29873,
1540,
1053,
8251,
1627,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
3166,
4842,
305,
29889,
15755,
29889,
7576,
29889,
13239,
1053,
29151,
29918,
13506,
29918,
262,
29918,
3859,
29918,
8977,
29918,
361,
29918,
6338,
13,
3166,
4842,
305,
29889,
20640,
1053,
11783,
13,
5215,
12655,
408,
7442,
13,
13,
1753,
7945,
29918,
9891,
29898,
2917,
1125,
13,
1678,
274,
6191,
353,
4842,
305,
29889,
10141,
877,
29883,
6191,
1495,
13,
1678,
302,
353,
29871,
29896,
29900,
29900,
13,
1678,
396,
1653,
263,
304,
29891,
8783,
13,
1678,
396,
848,
259,
584,
1060,
448,
3964,
353,
313,
29876,
29892,
29871,
29946,
29897,
13,
1678,
396,
3646,
584,
612,
448,
3964,
353,
313,
29876,
29892,
29871,
29896,
29897,
13,
1678,
1060,
353,
4842,
305,
29889,
29911,
6073,
29898,
9302,
29889,
8172,
29889,
8945,
29898,
29900,
29892,
29871,
29896,
29892,
2159,
7607,
29876,
29892,
29871,
29946,
876,
467,
4801,
496,
2141,
517,
29898,
29883,
6191,
29897,
13,
1678,
612,
353,
4842,
305,
29889,
29911,
6073,
29898,
9302,
29889,
8172,
29889,
29590,
29898,
29900,
29892,
29871,
29896,
29892,
2159,
7607,
29876,
29892,
29871,
29896,
876,
467,
4801,
496,
2141,
517,
29898,
29883,
6191,
29897,
13,
1678,
396,
304,
29891,
19677,
3564,
584,
29871,
29896,
29899,
13148,
13,
1678,
396,
12244,
278,
1904,
297,
360,
11191,
13,
1678,
1904,
353,
15570,
29889,
14968,
29889,
7345,
305,
29889,
19125,
29918,
4299,
29898,
15755,
29889,
12697,
29898,
29946,
29892,
29871,
29896,
876,
13,
1678,
28770,
291,
353,
302,
29876,
29889,
29924,
1660,
29931,
2209,
580,
13,
13,
1678,
5994,
3950,
353,
11783,
29898,
4299,
29889,
16744,
3285,
301,
29878,
29922,
29941,
29872,
29899,
29946,
29897,
13,
1678,
363,
21502,
305,
297,
3464,
29898,
2917,
3366,
1949,
29918,
1022,
2878,
29879,
3108,
1125,
13,
4706,
343,
353,
1904,
29889,
11333,
29898,
29990,
29897,
13,
4706,
396,
10272,
6410,
13,
4706,
6410,
353,
28770,
291,
29898,
29891,
29892,
612,
29897,
13,
4706,
1596,
703,
1022,
2878,
9162,
21502,
305,
29892,
376,
6410,
9162,
6410,
29897,
13,
13,
4706,
396,
1250,
29899,
7728,
351,
403,
6410,
13,
4706,
5994,
3950,
29889,
9171,
29918,
5105,
580,
13,
4706,
6410,
29889,
1627,
1328,
580,
13,
4706,
5994,
3950,
29889,
10568,
580,
13,
4706,
396,
1763,
6699,
1661,
29899,
7858,
29925,
2106,
29918,
8977,
13,
4706,
396,
281,
29914,
29877,
360,
11191,
29901,
1904,
29889,
3859,
29918,
8977,
580,
13,
4706,
396,
281,
29914,
29871,
360,
11191,
29901,
1904,
29889,
5453,
29889,
3859,
29918,
8977,
580,
13,
4706,
396,
2823,
29901,
2045,
597,
3292,
29889,
510,
29914,
764,
29899,
4836,
29914,
764,
29914,
12175,
29914,
29906,
29900,
29929,
29896,
29945,
13,
4706,
2106,
29918,
8977,
353,
1904,
29889,
3859,
29918,
8977,
580,
13,
4706,
29151,
29918,
13506,
29918,
262,
29918,
3859,
29918,
8977,
29918,
361,
29918,
6338,
29898,
3859,
29918,
8977,
29892,
376,
5453,
23157,
13,
4706,
7945,
29889,
7620,
29918,
3198,
3149,
29898,
1022,
2878,
29922,
1022,
2878,
29892,
1904,
29918,
705,
5861,
29922,
3859,
29918,
8977,
29897,
13,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1065,
353,
7525,
29889,
657,
29918,
4703,
580,
13,
1678,
16904,
353,
1065,
29889,
735,
15362,
29889,
1287,
3493,
13,
1678,
15570,
29918,
265,
29918,
8807,
353,
29934,
388,
29918,
2951,
29918,
23956,
580,
13,
1678,
15570,
353,
15570,
29918,
265,
29918,
8807,
29889,
657,
29934,
388,
580,
13,
13,
1678,
565,
15570,
29901,
396,
262,
278,
2343,
3177,
13,
4706,
1596,
703,
2813,
2943,
17809,
1159,
13,
4706,
1596,
703,
1688,
13235,
360,
29931,
7945,
2827,
1159,
13,
4706,
1596,
703,
13237,
363,
15570,
9867,
9162,
15570,
29889,
19594,
29918,
13237,
3101,
13,
13,
13,
4706,
1020,
4983,
353,
3201,
4983,
29898,
27852,
543,
7345,
305,
613,
954,
29918,
1287,
414,
29922,
29906,
29892,
1509,
29918,
29887,
3746,
353,
5574,
29897,
13,
4706,
1020,
4983,
29889,
2962,
580,
13,
4706,
1020,
4983,
29889,
3389,
29898,
14968,
29918,
9891,
29892,
2295,
3790,
29908,
1949,
29918,
1022,
2878,
29879,
1115,
29871,
29945,
1800,
13,
4706,
1020,
4983,
29889,
845,
329,
3204,
580,
13,
13,
4706,
1596,
29898,
3018,
4983,
29889,
12333,
29918,
3198,
3149,
29897,
13,
1678,
1683,
29901,
13,
4706,
1596,
703,
262,
15645,
2943,
1159,
13,
2
] |
src/z3c/viewtemplate/macro.py | zopefoundation/z3c.viewtemplate | 0 | 1608576 | ##############################################################################
#
# Copyright (c) 2005 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""
$Id$
"""
__docformat__ = "reStructuredText"
from StringIO import StringIO
from zope.tal.talinterpreter import TALInterpreter
class Macro(object):
"""Provides a single macro from a template for rendering."""
def __init__(self, template, macroName, view, request, contentType):
self.template = template
self.macroName = macroName
self.view = view
self.request = request
self.contentType = contentType
def __call__(self, *args, **kwargs):
try:
program = self.template.macros[self.macroName]
except KeyError:
raise KeyError('Macro "%s" not found in file "%s"'% (
self.macroName, self.template.filename))
output = StringIO(u'')
namespace = self.template.pt_getContext(self.view,
self.request,
options=kwargs)
context = self.template.pt_getEngineContext(namespace)
debug_flags = self.request.debug
TALInterpreter(
program,
None,
context,
output,
tal=True,
showtal=getattr(debug_flags, 'showTAL', 0),
strictinsert=0,
sourceAnnotations=getattr(debug_flags, 'sourceAnnotations', 0),
)()
if not self.request.response.getHeader("Content-Type"):
self.request.response.setHeader("Content-Type",
self.contentType)
return output.getvalue()
| [
1,
835,
13383,
13383,
13383,
13383,
7346,
2277,
29937,
13,
29937,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29900,
29945,
796,
2300,
10606,
322,
2866,
1091,
29560,
29889,
13,
29937,
2178,
26863,
2538,
9841,
29889,
13,
29937,
13,
29937,
910,
7047,
338,
4967,
304,
278,
1326,
12112,
310,
278,
796,
2300,
5236,
19245,
29892,
13,
29937,
10079,
29871,
29906,
29889,
29896,
313,
29999,
7390,
467,
29871,
319,
3509,
310,
278,
796,
7390,
881,
10259,
1384,
445,
4978,
29889,
13,
29937,
3446,
3235,
7791,
7818,
12982,
1525,
8519,
13756,
13044,
3352,
376,
3289,
8519,
29908,
5300,
13764,
29979,
5300,
15149,
8528,
15094,
1799,
6323,
306,
3580,
5265,
3352,
13,
29937,
399,
1718,
29934,
13566,
29059,
319,
1525,
28657,
13875,
8890,
29928,
29892,
2672,
6154,
15789,
4214,
29892,
350,
2692,
6058,
27848,
3352,
7495,
29892,
6093,
306,
3580,
5265,
3352,
13,
29937,
399,
1718,
29934,
13566,
29059,
8079,
323,
1806,
1307,
29892,
341,
1001,
3210,
13566,
2882,
6227,
11937,
29892,
319,
12739,
25580,
2672,
15860,
1177,
1692,
13780,
29892,
5300,
383,
1806,
8186,
1799,
13,
29937,
15842,
319,
349,
8322,
2965,
13309,
1718,
349,
4574,
13152,
1660,
29889,
13,
29937,
13,
13383,
13383,
13383,
13383,
7346,
4136,
2277,
13,
15945,
29908,
13,
29938,
1204,
29938,
13,
15945,
29908,
13,
1649,
1514,
4830,
1649,
353,
376,
276,
19560,
2955,
1626,
29908,
13,
13,
3166,
1714,
5971,
1053,
1714,
5971,
13,
13,
3166,
503,
2300,
29889,
20411,
29889,
20411,
1639,
1457,
357,
1053,
323,
1964,
4074,
1457,
357,
13,
13,
1990,
4326,
307,
29898,
3318,
1125,
13,
1678,
9995,
1184,
29894,
2247,
263,
2323,
11758,
515,
263,
4472,
363,
15061,
1213,
15945,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4472,
29892,
11758,
1170,
29892,
1776,
29892,
2009,
29892,
2793,
1542,
1125,
13,
4706,
1583,
29889,
6886,
353,
4472,
13,
4706,
1583,
29889,
25254,
1170,
353,
11758,
1170,
13,
4706,
1583,
29889,
1493,
353,
1776,
13,
4706,
1583,
29889,
3827,
353,
2009,
13,
4706,
1583,
29889,
3051,
1542,
353,
2793,
1542,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
1018,
29901,
13,
9651,
1824,
353,
1583,
29889,
6886,
29889,
8628,
1883,
29961,
1311,
29889,
25254,
1170,
29962,
13,
4706,
5174,
7670,
2392,
29901,
13,
9651,
12020,
7670,
2392,
877,
15735,
307,
11860,
29879,
29908,
451,
1476,
297,
934,
11860,
29879,
29908,
29915,
29995,
313,
13,
18884,
1583,
29889,
25254,
1170,
29892,
1583,
29889,
6886,
29889,
9507,
876,
13,
4706,
1962,
353,
1714,
5971,
29898,
29884,
29915,
1495,
13,
4706,
7397,
353,
1583,
29889,
6886,
29889,
415,
29918,
657,
2677,
29898,
1311,
29889,
1493,
29892,
13,
462,
462,
18884,
1583,
29889,
3827,
29892,
13,
462,
462,
18884,
3987,
29922,
19290,
29897,
13,
4706,
3030,
353,
1583,
29889,
6886,
29889,
415,
29918,
657,
12412,
2677,
29898,
22377,
29897,
13,
4706,
4744,
29918,
15764,
353,
1583,
29889,
3827,
29889,
8382,
13,
4706,
323,
1964,
4074,
1457,
357,
29898,
13,
18884,
1824,
29892,
13,
18884,
6213,
29892,
13,
18884,
3030,
29892,
13,
18884,
1962,
29892,
13,
18884,
5969,
29922,
5574,
29892,
13,
18884,
1510,
20411,
29922,
657,
5552,
29898,
8382,
29918,
15764,
29892,
525,
4294,
29911,
1964,
742,
29871,
29900,
511,
13,
18884,
9406,
7851,
29922,
29900,
29892,
13,
18884,
2752,
2744,
1333,
800,
29922,
657,
5552,
29898,
8382,
29918,
15764,
29892,
525,
4993,
2744,
1333,
800,
742,
29871,
29900,
511,
13,
18884,
1723,
580,
13,
4706,
565,
451,
1583,
29889,
3827,
29889,
5327,
29889,
657,
7850,
703,
3916,
29899,
1542,
29908,
1125,
13,
9651,
1583,
29889,
3827,
29889,
5327,
29889,
842,
7850,
703,
3916,
29899,
1542,
613,
13,
462,
462,
9651,
1583,
29889,
3051,
1542,
29897,
13,
4706,
736,
1962,
29889,
657,
1767,
580,
13,
13,
2
] |
Chapter 05/thread_sync.py | bpbpublications/Advance-Core-Python-Programming | 0 | 90764 | <gh_stars>0
import threading
x = 0
range_val = int(input("Enter the range : "))
def thread_sync(lock):
global x
for i in range(range_val):
# lock.acquire()
x += 1
lock.release()
lock = threading.Lock()
t1 = threading.Thread(target = thread_sync, args = (lock,))
t2 = threading.Thread(target = thread_sync, args = (lock,))
t1.start()
t2.start()
t1.join()
t2.join()
print(x)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
3244,
292,
30004,
13,
30004,
13,
29916,
353,
29871,
29900,
30004,
13,
3881,
29918,
791,
353,
938,
29898,
2080,
703,
10399,
278,
3464,
584,
376,
876,
30004,
13,
30004,
13,
30004,
13,
1753,
3244,
29918,
16593,
29898,
908,
1125,
30004,
13,
1678,
5534,
921,
30004,
13,
1678,
363,
474,
297,
3464,
29898,
3881,
29918,
791,
1125,
30004,
13,
539,
396,
7714,
29889,
562,
1548,
26471,
13,
4706,
921,
4619,
29871,
29896,
30004,
13,
4706,
7714,
29889,
14096,
26471,
13,
4706,
6756,
13,
1678,
6756,
13,
908,
353,
3244,
292,
29889,
16542,
26471,
13,
29873,
29896,
353,
3244,
292,
29889,
4899,
29898,
5182,
353,
3244,
29918,
16593,
29892,
6389,
353,
313,
908,
29892,
876,
30004,
13,
29873,
29906,
353,
3244,
292,
29889,
4899,
29898,
5182,
353,
3244,
29918,
16593,
29892,
6389,
353,
313,
908,
29892,
876,
30004,
13,
29873,
29896,
29889,
2962,
26471,
13,
29873,
29906,
29889,
2962,
26471,
13,
29873,
29896,
29889,
7122,
26471,
13,
29873,
29906,
29889,
7122,
26471,
13,
30004,
13,
2158,
29898,
29916,
8443,
13,
2
] |
backend/test.py | Harin329/Masterplan | 0 | 38114 | <reponame>Harin329/Masterplan<gh_stars>0
import boto3
import os
from dotenv import load_dotenv
load_dotenv()
client = boto3.client(
'dynamodb',
aws_access_key_id=os.getenv('AWS_ACCESS_KEY_ID'),
aws_secret_access_key=os.getenv('AWS_SECRET_ACCESS_KEY'),
region_name="us-east-1"
)
| [
1,
529,
276,
1112,
420,
29958,
21972,
262,
29941,
29906,
29929,
29914,
19203,
9018,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
289,
3747,
29941,
13,
5215,
2897,
13,
3166,
8329,
6272,
1053,
2254,
29918,
6333,
6272,
13,
13,
1359,
29918,
6333,
6272,
580,
13,
13,
4645,
353,
289,
3747,
29941,
29889,
4645,
29898,
13,
1678,
525,
29881,
2926,
10396,
742,
13,
1678,
25879,
29918,
5943,
29918,
1989,
29918,
333,
29922,
359,
29889,
657,
6272,
877,
29909,
7811,
29918,
2477,
23524,
29918,
10818,
29918,
1367,
5477,
13,
1678,
25879,
29918,
19024,
29918,
5943,
29918,
1989,
29922,
359,
29889,
657,
6272,
877,
29909,
7811,
29918,
1660,
22245,
29911,
29918,
2477,
23524,
29918,
10818,
5477,
13,
1678,
5120,
29918,
978,
543,
375,
29899,
23027,
29899,
29896,
29908,
13,
29897,
13,
2
] |
med_files_api/med_result/migrations/0003_auto_20200509_1024.py | TheProrok29/med-files-api | 0 | 101591 | <reponame>TheProrok29/med-files-api
# Generated by Django 3.0.5 on 2020-05-09 08:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('med_result', '0002_medresult_name'),
]
operations = [
migrations.AlterField(
model_name='medresult',
name='date_of_exam',
field=models.DateField(),
),
]
| [
1,
529,
276,
1112,
420,
29958,
1576,
29925,
729,
554,
29906,
29929,
29914,
2168,
29899,
5325,
29899,
2754,
13,
29937,
3251,
630,
491,
15337,
29871,
29941,
29889,
29900,
29889,
29945,
373,
29871,
29906,
29900,
29906,
29900,
29899,
29900,
29945,
29899,
29900,
29929,
29871,
29900,
29947,
29901,
29906,
29946,
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,
2168,
29918,
2914,
742,
525,
29900,
29900,
29900,
29906,
29918,
2168,
2914,
29918,
978,
5477,
13,
1678,
4514,
13,
13,
1678,
6931,
353,
518,
13,
4706,
9725,
800,
29889,
2499,
357,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
2168,
2914,
742,
13,
9651,
1024,
2433,
1256,
29918,
974,
29918,
735,
314,
742,
13,
9651,
1746,
29922,
9794,
29889,
2539,
3073,
3285,
13,
4706,
10353,
13,
1678,
4514,
13,
2
] |
render_utils.py | IBM/photorealistic-blocksworld | 17 | 50045 | from __future__ import print_function
import sys, random, json, os, tempfile
from collections import Counter
import numpy as np
INSIDE_BLENDER = True
try:
import bpy
from mathutils import Vector
except ImportError as e:
INSIDE_BLENDER = False
if INSIDE_BLENDER:
try:
import utils
except ImportError as e:
print("\nERROR")
print("Running render_images.py from Blender and cannot import utils.py.")
print("You may need to add a .pth file to the site-packages of Blender's")
print("bundled python with a command like this:\n")
print("echo $PWD >> $BLENDER/$VERSION/python/lib/python3.5/site-packages/clevr.pth")
print("\nWhere $BLENDER is the directory where Blender is installed, and")
print("$VERSION is your Blender version (such as 2.78).")
sys.exit(1)
def render_scene(args,
output_image='render.png',
output_scene='render_json',
output_blendfile=None,
objects=[],
**kwargs
):
# Load the main blendfile
bpy.ops.wm.open_mainfile(filepath=args.base_scene_blendfile)
# Load materials
utils.load_materials(args.material_dir)
# Set render arguments so we can get pixel coordinates later.
# We use functionality specific to the CYCLES renderer so BLENDER_RENDER
# cannot be used.
render_args = bpy.context.scene.render
render_args.engine = "CYCLES"
render_args.filepath = output_image
render_args.resolution_x = args.width
render_args.resolution_y = args.height
render_args.resolution_percentage = 100
render_args.tile_x = args.render_tile_size
render_args.tile_y = args.render_tile_size
if args.use_gpu == 1:
# Blender changed the API for enabling CUDA at some point
if bpy.app.version < (2, 78, 0):
bpy.context.user_preferences.system.compute_device_type = 'CUDA'
bpy.context.user_preferences.system.compute_device = 'CUDA_0'
else:
cycles_prefs = bpy.context.user_preferences.addons['cycles'].preferences
cycles_prefs.compute_device_type = 'CUDA'
# Some CYCLES-specific stuff
bpy.data.worlds['World'].cycles.sample_as_light = True
bpy.context.scene.cycles.blur_glossy = 2.0
bpy.context.scene.cycles.samples = args.render_num_samples
bpy.context.scene.cycles.transparent_min_bounces = args.render_min_bounces
bpy.context.scene.cycles.transparent_max_bounces = args.render_max_bounces
if args.use_gpu == 1:
bpy.context.scene.cycles.device = 'GPU'
# This will give ground-truth information about the scene and its objects
scene_struct = {
'image_filename': os.path.basename(output_image),
'objects': [],
'directions': {},
}
scene_struct.update(kwargs)
if bpy.app.version < (2, 80, 0):
bpy.ops.mesh.primitive_plane_add(radius=5)
else:
bpy.ops.mesh.primitive_plane_add(size=5)
plane = bpy.context.object
def rand(L):
return 2.0 * L * (random.random() - 0.5)
# Add random jitter to camera position
if args.camera_jitter > 0:
for i in range(3):
bpy.data.objects['Camera'].location[i] += rand(args.camera_jitter)
# Figure out the left, up, and behind directions along the plane and record
# them in the scene structure
camera = bpy.data.objects['Camera']
plane_normal = plane.data.vertices[0].normal
if bpy.app.version < (2, 80, 0):
cam_behind = camera.matrix_world.to_quaternion() * Vector((0, 0, -1))
cam_left = camera.matrix_world.to_quaternion() * Vector((-1, 0, 0))
cam_up = camera.matrix_world.to_quaternion() * Vector((0, 1, 0))
else:
cam_behind = camera.matrix_world.to_quaternion() @ Vector((0, 0, -1))
cam_left = camera.matrix_world.to_quaternion() @ Vector((-1, 0, 0))
cam_up = camera.matrix_world.to_quaternion() @ Vector((0, 1, 0))
plane_behind = (cam_behind - cam_behind.project(plane_normal)).normalized()
plane_left = (cam_left - cam_left.project(plane_normal)).normalized()
plane_up = cam_up.project(plane_normal).normalized()
# Delete the plane; we only used it for normals anyway. The base scene file
# contains the actual ground plane.
utils.delete_object(plane)
# Save all six axis-aligned directions in the scene struct
scene_struct['directions']['behind'] = tuple(plane_behind)
scene_struct['directions']['front'] = tuple(-plane_behind)
scene_struct['directions']['left'] = tuple(plane_left)
scene_struct['directions']['right'] = tuple(-plane_left)
scene_struct['directions']['above'] = tuple(plane_up)
scene_struct['directions']['below'] = tuple(-plane_up)
# Add random jitter to lamp positions
if args.key_light_jitter > 0:
for i in range(3):
bpy.data.objects['Lamp_Key'].location[i] += rand(args.key_light_jitter)
if args.back_light_jitter > 0:
for i in range(3):
bpy.data.objects['Lamp_Back'].location[i] += rand(args.back_light_jitter)
if args.fill_light_jitter > 0:
for i in range(3):
bpy.data.objects['Lamp_Fill'].location[i] += rand(args.fill_light_jitter)
# Now make some random objects
blender_objects = add_objects(args, scene_struct, camera, objects)
# Render the scene and dump the scene data structure
scene_struct['objects'] = objects
scene_struct['relationships'] = compute_all_relationships(scene_struct)
while True:
try:
bpy.ops.render.render(write_still=True)
break
except Exception as e:
print(e)
with open(output_scene, 'w') as f:
json.dump(scene_struct, f, indent=2)
if output_blendfile is not None:
bpy.ops.wm.save_as_mainfile(filepath=output_blendfile)
def add_objects(args, scene_struct, camera, objects):
"""
Add objects to the current blender scene
"""
blender_objects = []
for obj in objects:
# Actually add the object to the scene
utils.add_object(args.shape_dir,
obj["shape"],
obj["size"],
obj["location"],
theta=obj["rotation"])
bobj = bpy.context.object
blender_objects.append(bobj)
utils.add_material(obj["material"], Color=obj["color"])
obj["pixel_coords"] = utils.get_camera_coords(camera, bobj.location)
loc = np.array(bobj.location)
dim = np.array(bobj.dimensions)
half = dim / 2
corners = []
corners.append(loc + half * [1,1,1])
corners.append(loc + half * [1,1,-1])
corners.append(loc + half * [1,-1,1])
corners.append(loc + half * [1,-1,-1])
corners.append(loc + half * [-1,1,1])
corners.append(loc + half * [-1,1,-1])
corners.append(loc + half * [-1,-1,1])
corners.append(loc + half * [-1,-1,-1])
import mathutils
corners_camera_coords = np.array([ utils.get_camera_coords(camera, mathutils.Vector(tuple(corner)))
for corner in corners ])
xmax = np.amax(corners_camera_coords[:,0])
ymax = np.amax(corners_camera_coords[:,1])
xmin = np.amin(corners_camera_coords[:,0])
ymin = np.amin(corners_camera_coords[:,1])
obj["bbox"] = (float(xmin), float(ymin), float(xmax), float(ymax))
return blender_objects
def compute_all_relationships(scene_struct, eps=0.2):
"""
Computes relationships between all pairs of objects in the scene.
Returns a dictionary mapping string relationship names to lists of lists of
integers, where output[rel][i] gives a list of object indices that have the
relationship rel with object i. For example if j is in output['left'][i] then
object j is left of object i.
"""
all_relationships = {}
for name, direction_vec in scene_struct['directions'].items():
if name == 'above' or name == 'below': continue
all_relationships[name] = []
for i, obj1 in enumerate(scene_struct['objects']):
coords1 = obj1['location']
related = set()
for j, obj2 in enumerate(scene_struct['objects']):
if obj1 == obj2: continue
coords2 = obj2['location']
diff = [coords2[k] - coords1[k] for k in [0, 1, 2]]
dot = sum(diff[k] * direction_vec[k] for k in [0, 1, 2])
if dot > eps:
related.add(j)
all_relationships[name].append(sorted(list(related)))
return all_relationships
def check_visibility(blender_objects, min_pixels_per_object):
"""
Check whether all objects in the scene have some minimum number of visible
pixels; to accomplish this we assign random (but distinct) colors to all
objects, and render using no lighting or shading or antialiasing; this
ensures that each object is just a solid uniform color. We can then count
the number of pixels of each color in the output image to check the visibility
of each object.
Returns True if all objects are visible and False otherwise.
"""
f, path = tempfile.mkstemp(suffix='.png')
object_colors = render_shadeless(blender_objects, path=path)
img = bpy.data.images.load(path)
p = list(img.pixels)
color_count = Counter((p[i], p[i+1], p[i+2], p[i+3])
for i in range(0, len(p), 4))
os.remove(path)
if len(color_count) != len(blender_objects) + 1:
return False
for _, count in color_count.most_common():
if count < min_pixels_per_object:
return False
return True
def render_shadeless(blender_objects, path='flat.png'):
"""
Render a version of the scene with shading disabled and unique materials
assigned to all objects, and return a set of all colors that should be in the
rendered image. The image itself is written to path. This is used to ensure
that all objects will be visible in the final rendered scene.
"""
render_args = bpy.context.scene.render
# Cache the render args we are about to clobber
old_filepath = render_args.filepath
old_engine = render_args.engine
old_use_antialiasing = render_args.use_antialiasing
# Override some render settings to have flat shading
render_args.filepath = path
render_args.engine = 'BLENDER_RENDER'
render_args.use_antialiasing = False
# Move the lights and ground to layer 2 so they don't render
utils.set_layer(bpy.data.objects['Lamp_Key'], 2)
utils.set_layer(bpy.data.objects['Lamp_Fill'], 2)
utils.set_layer(bpy.data.objects['Lamp_Back'], 2)
utils.set_layer(bpy.data.objects['Ground'], 2)
# Add random shadeless materials to all objects
object_colors = set()
old_materials = []
for i, obj in enumerate(blender_objects):
old_materials.append(obj.data.materials[0])
bpy.ops.material.new()
mat = bpy.data.materials['Material']
mat.name = 'Material_%d' % i
while True:
r, g, b = [random.random() for _ in range(3)]
if (r, g, b) not in object_colors: break
object_colors.add((r, g, b))
mat.diffuse_color = [r, g, b]
mat.use_shadeless = True
obj.data.materials[0] = mat
# Render the scene
bpy.ops.render.render(write_still=True)
# Undo the above; first restore the materials to objects
for mat, obj in zip(old_materials, blender_objects):
obj.data.materials[0] = mat
# Move the lights and ground back to layer 0
utils.set_layer(bpy.data.objects['Lamp_Key'], 0)
utils.set_layer(bpy.data.objects['Lamp_Fill'], 0)
utils.set_layer(bpy.data.objects['Lamp_Back'], 0)
utils.set_layer(bpy.data.objects['Ground'], 0)
# Set the render settings back to what they were
render_args.filepath = old_filepath
render_args.engine = old_engine
render_args.use_antialiasing = old_use_antialiasing
return object_colors
| [
1,
515,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
5215,
10876,
29892,
4036,
29892,
4390,
29892,
2897,
29892,
5694,
1445,
13,
3166,
16250,
1053,
315,
5336,
13,
5215,
12655,
408,
7442,
13,
13,
1177,
29903,
22027,
29918,
29933,
1307,
2797,
1001,
353,
5852,
13,
2202,
29901,
13,
29871,
1053,
289,
2272,
13,
29871,
515,
5844,
13239,
1053,
16510,
13,
19499,
16032,
2392,
408,
321,
29901,
13,
29871,
2672,
29903,
22027,
29918,
29933,
1307,
2797,
1001,
353,
7700,
13,
361,
2672,
29903,
22027,
29918,
29933,
1307,
2797,
1001,
29901,
13,
29871,
1018,
29901,
13,
1678,
1053,
3667,
29879,
13,
29871,
5174,
16032,
2392,
408,
321,
29901,
13,
1678,
1596,
14182,
29876,
11432,
1159,
13,
1678,
1596,
703,
27795,
4050,
29918,
8346,
29889,
2272,
515,
3164,
1581,
322,
2609,
1053,
3667,
29879,
29889,
2272,
23157,
29871,
13,
1678,
1596,
703,
3492,
1122,
817,
304,
788,
263,
869,
29886,
386,
934,
304,
278,
3268,
29899,
8318,
310,
3164,
1581,
29915,
29879,
1159,
13,
1678,
1596,
703,
16293,
839,
3017,
411,
263,
1899,
763,
445,
3583,
29876,
1159,
13,
1678,
1596,
703,
8057,
395,
29925,
24668,
5099,
395,
29933,
1307,
2797,
1001,
13346,
16358,
29914,
4691,
29914,
1982,
29914,
4691,
29941,
29889,
29945,
29914,
2746,
29899,
8318,
29914,
29883,
2608,
29878,
29889,
29886,
386,
1159,
13,
1678,
1596,
14182,
29876,
11921,
395,
29933,
1307,
2797,
1001,
338,
278,
3884,
988,
3164,
1581,
338,
5130,
29892,
322,
1159,
13,
1678,
1596,
703,
29938,
16358,
338,
596,
3164,
1581,
1873,
313,
14565,
408,
29871,
29906,
29889,
29955,
29947,
467,
1159,
13,
1678,
10876,
29889,
13322,
29898,
29896,
29897,
13,
13,
13,
1753,
4050,
29918,
24645,
29898,
5085,
29892,
13,
1678,
1962,
29918,
3027,
2433,
9482,
29889,
2732,
742,
13,
1678,
1962,
29918,
24645,
2433,
9482,
29918,
3126,
742,
13,
1678,
1962,
29918,
2204,
355,
1445,
29922,
8516,
29892,
13,
1678,
3618,
11759,
1402,
13,
1678,
3579,
19290,
13,
259,
1125,
13,
13,
29871,
396,
16012,
278,
1667,
1999,
355,
1445,
13,
29871,
289,
2272,
29889,
3554,
29889,
29893,
29885,
29889,
3150,
29918,
3396,
1445,
29898,
1445,
2084,
29922,
5085,
29889,
3188,
29918,
24645,
29918,
2204,
355,
1445,
29897,
13,
13,
29871,
396,
16012,
17279,
13,
29871,
3667,
29879,
29889,
1359,
29918,
15388,
29879,
29898,
5085,
29889,
15388,
29918,
3972,
29897,
13,
13,
29871,
396,
3789,
4050,
6273,
577,
591,
508,
679,
15526,
10350,
2678,
29889,
13,
29871,
396,
1334,
671,
9863,
2702,
304,
278,
315,
29979,
29907,
17101,
4050,
261,
577,
350,
1307,
2797,
1001,
29918,
29934,
1430,
8032,
13,
29871,
396,
2609,
367,
1304,
29889,
13,
29871,
4050,
29918,
5085,
353,
289,
2272,
29889,
4703,
29889,
24645,
29889,
9482,
13,
29871,
4050,
29918,
5085,
29889,
10599,
353,
376,
29907,
29979,
29907,
17101,
29908,
13,
29871,
4050,
29918,
5085,
29889,
1445,
2084,
353,
1962,
29918,
3027,
13,
29871,
4050,
29918,
5085,
29889,
9778,
918,
29918,
29916,
353,
6389,
29889,
2103,
13,
29871,
4050,
29918,
5085,
29889,
9778,
918,
29918,
29891,
353,
6389,
29889,
3545,
13,
29871,
4050,
29918,
5085,
29889,
9778,
918,
29918,
25376,
482,
353,
29871,
29896,
29900,
29900,
13,
29871,
4050,
29918,
5085,
29889,
29873,
488,
29918,
29916,
353,
6389,
29889,
9482,
29918,
29873,
488,
29918,
2311,
13,
29871,
4050,
29918,
5085,
29889,
29873,
488,
29918,
29891,
353,
6389,
29889,
9482,
29918,
29873,
488,
29918,
2311,
13,
29871,
565,
6389,
29889,
1509,
29918,
29887,
3746,
1275,
29871,
29896,
29901,
13,
1678,
396,
3164,
1581,
3939,
278,
3450,
363,
427,
17961,
315,
29965,
7698,
472,
777,
1298,
13,
1678,
565,
289,
2272,
29889,
932,
29889,
3259,
529,
313,
29906,
29892,
29871,
29955,
29947,
29892,
29871,
29900,
1125,
13,
418,
289,
2272,
29889,
4703,
29889,
1792,
29918,
1457,
10662,
29889,
5205,
29889,
26017,
29918,
10141,
29918,
1853,
353,
525,
29907,
29965,
7698,
29915,
13,
418,
289,
2272,
29889,
4703,
29889,
1792,
29918,
1457,
10662,
29889,
5205,
29889,
26017,
29918,
10141,
353,
525,
29907,
29965,
7698,
29918,
29900,
29915,
13,
1678,
1683,
29901,
13,
418,
25785,
29918,
29886,
24539,
353,
289,
2272,
29889,
4703,
29889,
1792,
29918,
1457,
10662,
29889,
1202,
787,
1839,
1270,
7799,
13359,
1457,
10662,
13,
418,
25785,
29918,
29886,
24539,
29889,
26017,
29918,
10141,
29918,
1853,
353,
525,
29907,
29965,
7698,
29915,
13,
13,
29871,
396,
3834,
315,
29979,
29907,
17101,
29899,
14940,
6433,
13,
29871,
289,
2272,
29889,
1272,
29889,
11526,
29879,
1839,
14058,
13359,
1270,
7799,
29889,
11249,
29918,
294,
29918,
4366,
353,
5852,
13,
29871,
289,
2272,
29889,
4703,
29889,
24645,
29889,
1270,
7799,
29889,
2204,
332,
29918,
3820,
2209,
29891,
353,
29871,
29906,
29889,
29900,
13,
29871,
289,
2272,
29889,
4703,
29889,
24645,
29889,
1270,
7799,
29889,
27736,
353,
6389,
29889,
9482,
29918,
1949,
29918,
27736,
13,
29871,
289,
2272,
29889,
4703,
29889,
24645,
29889,
1270,
7799,
29889,
3286,
3560,
29918,
1195,
29918,
29890,
1309,
778,
353,
6389,
29889,
9482,
29918,
1195,
29918,
29890,
1309,
778,
13,
29871,
289,
2272,
29889,
4703,
29889,
24645,
29889,
1270,
7799,
29889,
3286,
3560,
29918,
3317,
29918,
29890,
1309,
778,
353,
6389,
29889,
9482,
29918,
3317,
29918,
29890,
1309,
778,
13,
29871,
565,
6389,
29889,
1509,
29918,
29887,
3746,
1275,
29871,
29896,
29901,
13,
1678,
289,
2272,
29889,
4703,
29889,
24645,
29889,
1270,
7799,
29889,
10141,
353,
525,
29954,
7056,
29915,
13,
13,
29871,
396,
910,
674,
2367,
5962,
29899,
509,
2806,
2472,
1048,
278,
9088,
322,
967,
3618,
13,
29871,
9088,
29918,
4984,
353,
426,
13,
418,
525,
3027,
29918,
9507,
2396,
2897,
29889,
2084,
29889,
6500,
3871,
29898,
4905,
29918,
3027,
511,
13,
418,
525,
12650,
2396,
19997,
13,
418,
525,
20146,
1953,
2396,
24335,
13,
29871,
500,
13,
29871,
9088,
29918,
4984,
29889,
5504,
29898,
19290,
29897,
13,
13,
29871,
565,
289,
2272,
29889,
932,
29889,
3259,
529,
313,
29906,
29892,
29871,
29947,
29900,
29892,
29871,
29900,
1125,
13,
1678,
289,
2272,
29889,
3554,
29889,
4467,
29882,
29889,
9469,
3321,
29918,
22116,
29918,
1202,
29898,
13471,
29922,
29945,
29897,
13,
29871,
1683,
29901,
13,
1678,
289,
2272,
29889,
3554,
29889,
4467,
29882,
29889,
9469,
3321,
29918,
22116,
29918,
1202,
29898,
2311,
29922,
29945,
29897,
13,
13,
29871,
10694,
353,
289,
2272,
29889,
4703,
29889,
3318,
13,
13,
29871,
822,
20088,
29898,
29931,
1125,
13,
1678,
736,
29871,
29906,
29889,
29900,
334,
365,
334,
313,
8172,
29889,
8172,
580,
448,
29871,
29900,
29889,
29945,
29897,
13,
13,
29871,
396,
3462,
4036,
432,
5171,
304,
10656,
2602,
13,
29871,
565,
6389,
29889,
26065,
29918,
29926,
5171,
1405,
29871,
29900,
29901,
13,
1678,
363,
474,
297,
3464,
29898,
29941,
1125,
13,
418,
289,
2272,
29889,
1272,
29889,
12650,
1839,
20717,
13359,
5479,
29961,
29875,
29962,
4619,
20088,
29898,
5085,
29889,
26065,
29918,
29926,
5171,
29897,
13,
13,
29871,
396,
11479,
714,
278,
2175,
29892,
701,
29892,
322,
5742,
18112,
3412,
278,
10694,
322,
2407,
13,
29871,
396,
963,
297,
278,
9088,
3829,
13,
29871,
10656,
353,
289,
2272,
29889,
1272,
29889,
12650,
1839,
20717,
2033,
13,
29871,
10694,
29918,
8945,
353,
10694,
29889,
1272,
29889,
1765,
1575,
29961,
29900,
1822,
8945,
13,
29871,
565,
289,
2272,
29889,
932,
29889,
3259,
529,
313,
29906,
29892,
29871,
29947,
29900,
29892,
29871,
29900,
1125,
13,
1678,
3949,
29918,
915,
16887,
353,
10656,
29889,
5344,
29918,
11526,
29889,
517,
29918,
339,
25744,
291,
580,
334,
16510,
3552,
29900,
29892,
29871,
29900,
29892,
448,
29896,
876,
13,
1678,
3949,
29918,
1563,
353,
10656,
29889,
5344,
29918,
11526,
29889,
517,
29918,
339,
25744,
291,
580,
334,
16510,
3552,
29899,
29896,
29892,
29871,
29900,
29892,
29871,
29900,
876,
13,
1678,
3949,
29918,
786,
353,
10656,
29889,
5344,
29918,
11526,
29889,
517,
29918,
339,
25744,
291,
580,
334,
16510,
3552,
29900,
29892,
29871,
29896,
29892,
29871,
29900,
876,
13,
29871,
1683,
29901,
13,
1678,
3949,
29918,
915,
16887,
353,
10656,
29889,
5344,
29918,
11526,
29889,
517,
29918,
339,
25744,
291,
580,
732,
16510,
3552,
29900,
29892,
29871,
29900,
29892,
448,
29896,
876,
13,
1678,
3949,
29918,
1563,
353,
10656,
29889,
5344,
29918,
11526,
29889,
517,
29918,
339,
25744,
291,
580,
732,
16510,
3552,
29899,
29896,
29892,
29871,
29900,
29892,
29871,
29900,
876,
13,
1678,
3949,
29918,
786,
353,
10656,
29889,
5344,
29918,
11526,
29889,
517,
29918,
339,
25744,
291,
580,
732,
16510,
3552,
29900,
29892,
29871,
29896,
29892,
29871,
29900,
876,
13,
29871,
10694,
29918,
915,
16887,
353,
313,
11108,
29918,
915,
16887,
448,
3949,
29918,
915,
16887,
29889,
4836,
29898,
22116,
29918,
8945,
8106,
8945,
1891,
580,
13,
29871,
10694,
29918,
1563,
353,
313,
11108,
29918,
1563,
448,
3949,
29918,
1563,
29889,
4836,
29898,
22116,
29918,
8945,
8106,
8945,
1891,
580,
13,
29871,
10694,
29918,
786,
353,
3949,
29918,
786,
29889,
4836,
29898,
22116,
29918,
8945,
467,
8945,
1891,
580,
13,
13,
29871,
396,
21267,
278,
10694,
29936,
591,
871,
1304,
372,
363,
6056,
1338,
8763,
29889,
450,
2967,
9088,
934,
13,
29871,
396,
3743,
278,
3935,
5962,
10694,
29889,
13,
29871,
3667,
29879,
29889,
8143,
29918,
3318,
29898,
22116,
29897,
13,
13,
29871,
396,
16913,
599,
4832,
9685,
29899,
13671,
18112,
297,
278,
9088,
2281,
13,
29871,
9088,
29918,
4984,
1839,
20146,
1953,
16215,
915,
16887,
2033,
353,
18761,
29898,
22116,
29918,
915,
16887,
29897,
13,
29871,
9088,
29918,
4984,
1839,
20146,
1953,
16215,
8862,
2033,
353,
18761,
6278,
22116,
29918,
915,
16887,
29897,
13,
29871,
9088,
29918,
4984,
1839,
20146,
1953,
16215,
1563,
2033,
353,
18761,
29898,
22116,
29918,
1563,
29897,
13,
29871,
9088,
29918,
4984,
1839,
20146,
1953,
16215,
1266,
2033,
353,
18761,
6278,
22116,
29918,
1563,
29897,
13,
29871,
9088,
29918,
4984,
1839,
20146,
1953,
16215,
27215,
2033,
353,
18761,
29898,
22116,
29918,
786,
29897,
13,
29871,
9088,
29918,
4984,
1839,
20146,
1953,
16215,
22503,
2033,
353,
18761,
6278,
22116,
29918,
786,
29897,
13,
13,
29871,
396,
3462,
4036,
432,
5171,
304,
28692,
11909,
13,
29871,
565,
6389,
29889,
1989,
29918,
4366,
29918,
29926,
5171,
1405,
29871,
29900,
29901,
13,
1678,
363,
474,
297,
3464,
29898,
29941,
1125,
13,
418,
289,
2272,
29889,
1272,
29889,
12650,
1839,
29931,
1160,
29918,
2558,
13359,
5479,
29961,
29875,
29962,
4619,
20088,
29898,
5085,
29889,
1989,
29918,
4366,
29918,
29926,
5171,
29897,
13,
29871,
565,
6389,
29889,
1627,
29918,
4366,
29918,
29926,
5171,
1405,
29871,
29900,
29901,
13,
1678,
363,
474,
297,
3464,
29898,
29941,
1125,
13,
418,
289,
2272,
29889,
1272,
29889,
12650,
1839,
29931,
1160,
29918,
5841,
13359,
5479,
29961,
29875,
29962,
4619,
20088,
29898,
5085,
29889,
1627,
29918,
4366,
29918,
29926,
5171,
29897,
13,
29871,
565,
6389,
29889,
5589,
29918,
4366,
29918,
29926,
5171,
1405,
29871,
29900,
29901,
13,
1678,
363,
474,
297,
3464,
29898,
29941,
1125,
13,
418,
289,
2272,
29889,
1272,
29889,
12650,
1839,
29931,
1160,
29918,
20876,
13359,
5479,
29961,
29875,
29962,
4619,
20088,
29898,
5085,
29889,
5589,
29918,
4366,
29918,
29926,
5171,
29897,
13,
13,
29871,
396,
2567,
1207,
777,
4036,
3618,
13,
29871,
1999,
1581,
29918,
12650,
353,
788,
29918,
12650,
29898,
5085,
29892,
9088,
29918,
4984,
29892,
10656,
29892,
3618,
29897,
13,
13,
29871,
396,
26000,
278,
9088,
322,
16766,
278,
9088,
848,
3829,
13,
29871,
9088,
29918,
4984,
1839,
12650,
2033,
353,
3618,
13,
29871,
9088,
29918,
4984,
1839,
2674,
800,
14587,
2033,
353,
10272,
29918,
497,
29918,
2674,
800,
14587,
29898,
24645,
29918,
4984,
29897,
13,
29871,
1550,
5852,
29901,
13,
1678,
1018,
29901,
13,
418,
289,
2272,
29889,
3554,
29889,
9482,
29889,
9482,
29898,
3539,
29918,
303,
453,
29922,
5574,
29897,
13,
418,
2867,
13,
1678,
5174,
8960,
408,
321,
29901,
13,
418,
1596,
29898,
29872,
29897,
13,
13,
29871,
411,
1722,
29898,
4905,
29918,
24645,
29892,
525,
29893,
1495,
408,
285,
29901,
13,
1678,
4390,
29889,
15070,
29898,
24645,
29918,
4984,
29892,
285,
29892,
29536,
29922,
29906,
29897,
13,
13,
29871,
565,
1962,
29918,
2204,
355,
1445,
338,
451,
6213,
29901,
13,
1678,
289,
2272,
29889,
3554,
29889,
29893,
29885,
29889,
7620,
29918,
294,
29918,
3396,
1445,
29898,
1445,
2084,
29922,
4905,
29918,
2204,
355,
1445,
29897,
13,
13,
13,
1753,
788,
29918,
12650,
29898,
5085,
29892,
9088,
29918,
4984,
29892,
10656,
29892,
3618,
1125,
13,
29871,
9995,
13,
29871,
3462,
3618,
304,
278,
1857,
1999,
1581,
9088,
13,
29871,
9995,
13,
29871,
1999,
1581,
29918,
12650,
353,
5159,
13,
29871,
363,
5446,
297,
3618,
29901,
13,
268,
13,
1678,
396,
12823,
788,
278,
1203,
304,
278,
9088,
13,
1678,
3667,
29879,
29889,
1202,
29918,
3318,
29898,
5085,
29889,
12181,
29918,
3972,
29892,
13,
462,
268,
5446,
3366,
12181,
12436,
13,
462,
268,
5446,
3366,
2311,
12436,
13,
462,
268,
5446,
3366,
5479,
12436,
13,
462,
268,
278,
941,
29922,
5415,
3366,
5450,
362,
20068,
13,
1678,
289,
5415,
353,
289,
2272,
29889,
4703,
29889,
3318,
13,
1678,
1999,
1581,
29918,
12650,
29889,
4397,
29898,
29890,
5415,
29897,
13,
1678,
3667,
29879,
29889,
1202,
29918,
15388,
29898,
5415,
3366,
15388,
12436,
9159,
29922,
5415,
3366,
2780,
20068,
13,
1678,
5446,
3366,
29886,
15711,
29918,
1111,
4339,
3108,
353,
3667,
29879,
29889,
657,
29918,
26065,
29918,
1111,
4339,
29898,
26065,
29892,
289,
5415,
29889,
5479,
29897,
13,
13,
1678,
1180,
353,
7442,
29889,
2378,
29898,
29890,
5415,
29889,
5479,
29897,
13,
1678,
3964,
353,
7442,
29889,
2378,
29898,
29890,
5415,
29889,
6229,
5580,
29897,
13,
1678,
4203,
353,
3964,
847,
29871,
29906,
13,
1678,
26995,
353,
5159,
13,
1678,
26995,
29889,
4397,
29898,
2029,
718,
4203,
334,
518,
29896,
29892,
29896,
29892,
29896,
2314,
13,
1678,
26995,
29889,
4397,
29898,
2029,
718,
4203,
334,
518,
29896,
29892,
29896,
6653,
29896,
2314,
13,
1678,
26995,
29889,
4397,
29898,
2029,
718,
4203,
334,
518,
29896,
6653,
29896,
29892,
29896,
2314,
13,
1678,
26995,
29889,
4397,
29898,
2029,
718,
4203,
334,
518,
29896,
6653,
29896,
6653,
29896,
2314,
13,
1678,
26995,
29889,
4397,
29898,
2029,
718,
4203,
334,
21069,
29896,
29892,
29896,
29892,
29896,
2314,
13,
1678,
26995,
29889,
4397,
29898,
2029,
718,
4203,
334,
21069,
29896,
29892,
29896,
6653,
29896,
2314,
13,
1678,
26995,
29889,
4397,
29898,
2029,
718,
4203,
334,
21069,
29896,
6653,
29896,
29892,
29896,
2314,
13,
1678,
26995,
29889,
4397,
29898,
2029,
718,
4203,
334,
21069,
29896,
6653,
29896,
6653,
29896,
2314,
13,
13,
1678,
1053,
5844,
13239,
13,
1678,
26995,
29918,
26065,
29918,
1111,
4339,
353,
7442,
29889,
2378,
4197,
3667,
29879,
29889,
657,
29918,
26065,
29918,
1111,
4339,
29898,
26065,
29892,
5844,
13239,
29889,
12877,
29898,
23583,
29898,
2616,
1089,
4961,
13,
462,
462,
539,
363,
11155,
297,
26995,
29871,
2314,
13,
1678,
921,
3317,
353,
7442,
29889,
314,
1165,
29898,
29883,
1398,
414,
29918,
26065,
29918,
1111,
4339,
7503,
29892,
29900,
2314,
13,
1678,
343,
3317,
353,
7442,
29889,
314,
1165,
29898,
29883,
1398,
414,
29918,
26065,
29918,
1111,
4339,
7503,
29892,
29896,
2314,
13,
1678,
921,
1195,
353,
7442,
29889,
9103,
29898,
29883,
1398,
414,
29918,
26065,
29918,
1111,
4339,
7503,
29892,
29900,
2314,
13,
1678,
343,
1195,
353,
7442,
29889,
9103,
29898,
29883,
1398,
414,
29918,
26065,
29918,
1111,
4339,
7503,
29892,
29896,
2314,
13,
1678,
5446,
3366,
29890,
1884,
3108,
353,
313,
7411,
29898,
29916,
1195,
511,
5785,
29898,
962,
262,
511,
5785,
29898,
29916,
3317,
511,
5785,
29898,
29891,
3317,
876,
13,
29871,
736,
1999,
1581,
29918,
12650,
13,
13,
13,
1753,
10272,
29918,
497,
29918,
2674,
800,
14587,
29898,
24645,
29918,
4984,
29892,
321,
567,
29922,
29900,
29889,
29906,
1125,
13,
29871,
9995,
13,
29871,
11796,
267,
21702,
1546,
599,
11000,
310,
3618,
297,
278,
9088,
29889,
13,
259,
13,
29871,
16969,
263,
8600,
10417,
1347,
9443,
2983,
304,
8857,
310,
8857,
310,
13,
29871,
11920,
29892,
988,
1962,
29961,
2674,
3816,
29875,
29962,
4076,
263,
1051,
310,
1203,
16285,
393,
505,
278,
13,
29871,
9443,
1104,
411,
1203,
474,
29889,
1152,
1342,
565,
432,
338,
297,
1962,
1839,
1563,
2033,
29961,
29875,
29962,
769,
13,
29871,
1203,
432,
338,
2175,
310,
1203,
474,
29889,
13,
29871,
9995,
13,
29871,
599,
29918,
2674,
800,
14587,
353,
6571,
13,
29871,
363,
1024,
29892,
5305,
29918,
2003,
297,
9088,
29918,
4984,
1839,
20146,
1953,
13359,
7076,
7295,
13,
1678,
565,
1024,
1275,
525,
27215,
29915,
470,
1024,
1275,
525,
22503,
2396,
6773,
13,
1678,
599,
29918,
2674,
800,
14587,
29961,
978,
29962,
353,
5159,
13,
1678,
363,
474,
29892,
5446,
29896,
297,
26985,
29898,
24645,
29918,
4984,
1839,
12650,
2033,
1125,
13,
418,
1302,
4339,
29896,
353,
5446,
29896,
1839,
5479,
2033,
13,
418,
4475,
353,
731,
580,
13,
418,
363,
432,
29892,
5446,
29906,
297,
26985,
29898,
24645,
29918,
4984,
1839,
12650,
2033,
1125,
13,
4706,
565,
5446,
29896,
1275,
5446,
29906,
29901,
6773,
13,
4706,
1302,
4339,
29906,
353,
5446,
29906,
1839,
5479,
2033,
13,
4706,
2923,
353,
518,
1111,
4339,
29906,
29961,
29895,
29962,
448,
1302,
4339,
29896,
29961,
29895,
29962,
363,
413,
297,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
5262,
13,
4706,
8329,
353,
2533,
29898,
12765,
29961,
29895,
29962,
334,
5305,
29918,
2003,
29961,
29895,
29962,
363,
413,
297,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
2314,
13,
4706,
565,
8329,
1405,
321,
567,
29901,
13,
3986,
4475,
29889,
1202,
29898,
29926,
29897,
13,
418,
599,
29918,
2674,
800,
14587,
29961,
978,
1822,
4397,
29898,
24582,
29898,
1761,
29898,
12817,
4961,
13,
29871,
736,
599,
29918,
2674,
800,
14587,
13,
13,
13,
1753,
1423,
29918,
28814,
29898,
2204,
1581,
29918,
12650,
29892,
1375,
29918,
29886,
861,
1379,
29918,
546,
29918,
3318,
1125,
13,
29871,
9995,
13,
29871,
5399,
3692,
599,
3618,
297,
278,
9088,
505,
777,
9212,
1353,
310,
7962,
13,
29871,
17036,
29936,
304,
12709,
445,
591,
3566,
4036,
313,
4187,
8359,
29897,
11955,
304,
599,
13,
29871,
3618,
29892,
322,
4050,
773,
694,
3578,
292,
470,
528,
9382,
470,
3677,
616,
3173,
292,
29936,
445,
13,
29871,
5662,
1973,
393,
1269,
1203,
338,
925,
263,
7773,
9090,
2927,
29889,
1334,
508,
769,
2302,
13,
29871,
278,
1353,
310,
17036,
310,
1269,
2927,
297,
278,
1962,
1967,
304,
1423,
278,
26401,
13,
29871,
310,
1269,
1203,
29889,
13,
13,
29871,
16969,
5852,
565,
599,
3618,
526,
7962,
322,
7700,
6467,
29889,
13,
29871,
9995,
13,
29871,
285,
29892,
2224,
353,
5694,
1445,
29889,
11256,
303,
3451,
29898,
2146,
600,
861,
2433,
29889,
2732,
1495,
13,
29871,
1203,
29918,
27703,
353,
4050,
29918,
845,
328,
6393,
29898,
2204,
1581,
29918,
12650,
29892,
2224,
29922,
2084,
29897,
13,
29871,
10153,
353,
289,
2272,
29889,
1272,
29889,
8346,
29889,
1359,
29898,
2084,
29897,
13,
29871,
282,
353,
1051,
29898,
2492,
29889,
29886,
861,
1379,
29897,
13,
29871,
2927,
29918,
2798,
353,
315,
5336,
3552,
29886,
29961,
29875,
1402,
282,
29961,
29875,
29974,
29896,
1402,
282,
29961,
29875,
29974,
29906,
1402,
282,
29961,
29875,
29974,
29941,
2314,
13,
462,
4706,
363,
474,
297,
3464,
29898,
29900,
29892,
7431,
29898,
29886,
511,
29871,
29946,
876,
13,
29871,
2897,
29889,
5992,
29898,
2084,
29897,
13,
29871,
565,
7431,
29898,
2780,
29918,
2798,
29897,
2804,
7431,
29898,
2204,
1581,
29918,
12650,
29897,
718,
29871,
29896,
29901,
13,
1678,
736,
7700,
13,
29871,
363,
17117,
2302,
297,
2927,
29918,
2798,
29889,
3242,
29918,
9435,
7295,
13,
1678,
565,
2302,
529,
1375,
29918,
29886,
861,
1379,
29918,
546,
29918,
3318,
29901,
13,
418,
736,
7700,
13,
29871,
736,
5852,
13,
13,
13,
1753,
4050,
29918,
845,
328,
6393,
29898,
2204,
1581,
29918,
12650,
29892,
2224,
2433,
20620,
29889,
2732,
29374,
13,
29871,
9995,
13,
29871,
26000,
263,
1873,
310,
278,
9088,
411,
528,
9382,
12708,
322,
5412,
17279,
13,
29871,
9859,
304,
599,
3618,
29892,
322,
736,
263,
731,
310,
599,
11955,
393,
881,
367,
297,
278,
13,
29871,
13751,
1967,
29889,
450,
1967,
3528,
338,
3971,
304,
2224,
29889,
910,
338,
1304,
304,
9801,
13,
29871,
393,
599,
3618,
674,
367,
7962,
297,
278,
2186,
13751,
9088,
29889,
13,
29871,
9995,
13,
29871,
4050,
29918,
5085,
353,
289,
2272,
29889,
4703,
29889,
24645,
29889,
9482,
13,
13,
29871,
396,
28540,
278,
4050,
6389,
591,
526,
1048,
304,
274,
2127,
495,
13,
29871,
2030,
29918,
1445,
2084,
353,
4050,
29918,
5085,
29889,
1445,
2084,
13,
29871,
2030,
29918,
10599,
353,
4050,
29918,
5085,
29889,
10599,
13,
29871,
2030,
29918,
1509,
29918,
424,
616,
3173,
292,
353,
4050,
29918,
5085,
29889,
1509,
29918,
424,
616,
3173,
292,
13,
13,
29871,
396,
6811,
2426,
777,
4050,
6055,
304,
505,
12151,
528,
9382,
13,
29871,
4050,
29918,
5085,
29889,
1445,
2084,
353,
2224,
13,
29871,
4050,
29918,
5085,
29889,
10599,
353,
525,
29933,
1307,
2797,
1001,
29918,
29934,
1430,
8032,
29915,
13,
29871,
4050,
29918,
5085,
29889,
1509,
29918,
424,
616,
3173,
292,
353,
7700,
13,
13,
29871,
396,
25249,
278,
26068,
322,
5962,
304,
7546,
29871,
29906,
577,
896,
1016,
29915,
29873,
4050,
13,
29871,
3667,
29879,
29889,
842,
29918,
13148,
29898,
29890,
2272,
29889,
1272,
29889,
12650,
1839,
29931,
1160,
29918,
2558,
7464,
29871,
29906,
29897,
13,
29871,
3667,
29879,
29889,
842,
29918,
13148,
29898,
29890,
2272,
29889,
1272,
29889,
12650,
1839,
29931,
1160,
29918,
20876,
7464,
29871,
29906,
29897,
13,
29871,
3667,
29879,
29889,
842,
29918,
13148,
29898,
29890,
2272,
29889,
1272,
29889,
12650,
1839,
29931,
1160,
29918,
5841,
7464,
29871,
29906,
29897,
13,
29871,
3667,
29879,
29889,
842,
29918,
13148,
29898,
29890,
2272,
29889,
1272,
29889,
12650,
1839,
3338,
618,
7464,
29871,
29906,
29897,
13,
13,
29871,
396,
3462,
4036,
528,
328,
6393,
17279,
304,
599,
3618,
13,
29871,
1203,
29918,
27703,
353,
731,
580,
13,
29871,
2030,
29918,
15388,
29879,
353,
5159,
13,
29871,
363,
474,
29892,
5446,
297,
26985,
29898,
2204,
1581,
29918,
12650,
1125,
13,
1678,
2030,
29918,
15388,
29879,
29889,
4397,
29898,
5415,
29889,
1272,
29889,
15388,
29879,
29961,
29900,
2314,
13,
1678,
289,
2272,
29889,
3554,
29889,
15388,
29889,
1482,
580,
13,
1678,
1775,
353,
289,
2272,
29889,
1272,
29889,
15388,
29879,
1839,
24095,
2033,
13,
1678,
1775,
29889,
978,
353,
525,
24095,
29918,
29995,
29881,
29915,
1273,
474,
13,
1678,
1550,
5852,
29901,
13,
418,
364,
29892,
330,
29892,
289,
353,
518,
8172,
29889,
8172,
580,
363,
903,
297,
3464,
29898,
29941,
4638,
13,
418,
565,
313,
29878,
29892,
330,
29892,
289,
29897,
451,
297,
1203,
29918,
27703,
29901,
2867,
13,
1678,
1203,
29918,
27703,
29889,
1202,
3552,
29878,
29892,
330,
29892,
289,
876,
13,
1678,
1775,
29889,
12765,
1509,
29918,
2780,
353,
518,
29878,
29892,
330,
29892,
289,
29962,
13,
1678,
1775,
29889,
1509,
29918,
845,
328,
6393,
353,
5852,
13,
1678,
5446,
29889,
1272,
29889,
15388,
29879,
29961,
29900,
29962,
353,
1775,
13,
13,
29871,
396,
26000,
278,
9088,
13,
29871,
289,
2272,
29889,
3554,
29889,
9482,
29889,
9482,
29898,
3539,
29918,
303,
453,
29922,
5574,
29897,
13,
13,
29871,
396,
14211,
29877,
278,
2038,
29936,
937,
17749,
278,
17279,
304,
3618,
13,
29871,
363,
1775,
29892,
5446,
297,
14319,
29898,
1025,
29918,
15388,
29879,
29892,
1999,
1581,
29918,
12650,
1125,
13,
1678,
5446,
29889,
1272,
29889,
15388,
29879,
29961,
29900,
29962,
353,
1775,
13,
13,
29871,
396,
25249,
278,
26068,
322,
5962,
1250,
304,
7546,
29871,
29900,
13,
29871,
3667,
29879,
29889,
842,
29918,
13148,
29898,
29890,
2272,
29889,
1272,
29889,
12650,
1839,
29931,
1160,
29918,
2558,
7464,
29871,
29900,
29897,
13,
29871,
3667,
29879,
29889,
842,
29918,
13148,
29898,
29890,
2272,
29889,
1272,
29889,
12650,
1839,
29931,
1160,
29918,
20876,
7464,
29871,
29900,
29897,
13,
29871,
3667,
29879,
29889,
842,
29918,
13148,
29898,
29890,
2272,
29889,
1272,
29889,
12650,
1839,
29931,
1160,
29918,
5841,
7464,
29871,
29900,
29897,
13,
29871,
3667,
29879,
29889,
842,
29918,
13148,
29898,
29890,
2272,
29889,
1272,
29889,
12650,
1839,
3338,
618,
7464,
29871,
29900,
29897,
13,
13,
29871,
396,
3789,
278,
4050,
6055,
1250,
304,
825,
896,
892,
13,
29871,
4050,
29918,
5085,
29889,
1445,
2084,
353,
2030,
29918,
1445,
2084,
13,
29871,
4050,
29918,
5085,
29889,
10599,
353,
2030,
29918,
10599,
13,
29871,
4050,
29918,
5085,
29889,
1509,
29918,
424,
616,
3173,
292,
353,
2030,
29918,
1509,
29918,
424,
616,
3173,
292,
13,
13,
29871,
736,
1203,
29918,
27703,
13,
13,
2
] |
display_stats.py | rionbr/ddi-blumenau | 1 | 124620 | # coding=utf-8
# Author: <NAME>
# Date: Nov 16, 2014
#
# Description: Plot DDI Statistics
#
#
# coding=utf-8
from __future__ import division
import numpy as np
import pandas as pd
import scipy.stats
from scipy import stats
slice = pd.IndexSlice
pd.set_option('display.max_rows', 24)
pd.set_option('display.max_columns', 24)
pd.set_option('display.width', 300)
pd.set_option('display.precision', 2)
pd.set_option('display.float_format', lambda x: '%.2f' % x)
import util
from collections import OrderedDict
import math
def calc_conf_interval(r, **kwargs):
df = kwargs['n_runs']-1
mean = r.iloc[0]
std = r.iloc[1]
sigma = std/math.sqrt(n_runs)
(ci_min,ci_max) = stats.t.interval(alpha=0.95, df=n_runs-1, loc=mean, scale=sigma)
return pd.Series([ci_min, ci_max], index=['ci_min', 'ci_max'])
#
# Load CSVs
#
dfu, dfc, dfi = util.dfUsersInteractionsSummary(loadCoAdmin=False)
#dfig = dfi.groupby('id_user').agg({'n_drugs':'sum','n_ij_ddi':'sum','n_coadmin':'sum'})
dfd = pd.read_csv('results/dd_drugs.csv.gz', header=0, encoding='utf-8',
names=['id_user','DB_label','count','en_i'],
dtype={'id_user':np.int64})
print '>> dfu'
print dfu.head()
print dfu.shape
print '>> dfc'
print dfc.head()
print dfc.shape
print '>> dfi'
print dfi.head()
print dfi.shape
print '>> dfd'
print dfd.head()
print dfd.shape
dfiu = pd.merge(dfi, dfu[['gender','age','age_group']], how='left', left_on='id_user', right_index=True)
print '>> dfiu'
print dfiu.head()
print '--- --- ---'
#
# Removed Hormones
#
female_hormones = ['Ethinyl Estradiol','Estradiol','Norethisterone','Levonorgestrel','Estrogens Conj.']
dfiu_nh = dfiu.loc[ (~(dfiu['en_i'].isin(female_hormones)) & ~(dfiu['en_j'].isin(female_hormones)) ) , : ].reset_index(drop=True)
dfu['len_ij_ddi_not_hormone'] = dfiu_nh['len_ij_ddi']
dfiug_nh = dfiu_nh.groupby('id_user').agg({'len_ij_ddi':'sum','id_user':'count'})
dfu['n_ij_ddi_not_hormone'] = dfiug_nh['id_user']
print dfu.loc[ dfu['len_ij_ddi']>dfu['len_ij_ddi_not_hormone'], : ].head()
#
# Variables
#
n_user = len( dfu.index.unique() )
n_user_adult = len( dfu.loc[ (dfu['age']>=20), : ].index.unique() )
n_user_male = len( dfu.loc[ (dfu['gender']=='Male'), : ].index.unique() )
n_user_female = len( dfu.loc[ (dfu['gender']=='Female'), : ].index.unique() )
n_user_40p = len( dfu.loc[ ( (dfu['age']>=40) ), :].index.unique() )
n_user_65p = len( dfu.loc[ ( (dfu['age']>=66) ), :].index.unique() )
n_a = dfu['n_a'].sum()
n_i = dfd.groupby('DB_label').agg({'en_i':'first'}).shape[0]
n_i_inter = len(np.unique(dfi[['db_i','db_j']].values))
n_ij = dfu['n_ij'].sum()
n_ij_ddi = dfu['n_ij_ddi'].sum()
n_ij_ddi_unique = len( dfiu['db_ij'].unique() )
n_ij_ddi_unique_nh = len( dfiu_nh['db_ij'].unique() )
n_user_gt2drugs = len( dfu.loc[ (dfu['n_i']>1), : ].index.unique() )
n_user_gt1coadmin = len( dfu.loc[ (dfu['n_ij']>0), : ].index.unique() )
n_user_male_ij = len( dfu.loc[ ((dfu['gender']=='Male') & (dfu['n_ij']>0)), : ].index.unique() )
n_user_female_ij = len( dfu.loc[ ((dfu['gender']=='Female') & (dfu['n_ij']>0)), : ].index.unique() )
n_user_ij_ddi = len( dfu.loc[ (dfu['n_ij_ddi']>0), : ].index.unique() )
n_user_ij_ddi_major = len( dfiu.loc[ (dfiu['severity'].isin(['Major'])) , : ]['id_user'].unique() )
n_user_adult_ij_ddi = len( dfu.loc[ ((dfu['age']>=20) & (dfu['n_ij_ddi']>0)), : ].index.unique() )
n_user_adult_ij_ddi_major = len( dfiu.loc[ ((dfiu['age']>=20) & (dfiu['severity'].isin(['Major']))) , : ]['id_user'].unique() )
n_males_qt1inter = len( dfu.loc[ ((dfu['gender']=='Male') & (dfu['n_ij_ddi']>0)), : ].index.unique() )
n_females_qt1inter = len( dfu.loc[ ((dfu['gender']=='Female') & (dfu['n_ij_ddi']>0)), : ].index.unique() )
n_males_qt1inter_nh = len( dfu.loc[ ((dfu['gender']=='Male') & (dfu['n_ij_ddi_not_hormone']>0)), : ].index.unique() )
n_females_qt1inter_nh = len( dfu.loc[ ((dfu['gender']=='Female') & (dfu['n_ij_ddi_not_hormone']>0)), : ].index.unique() )
n_user_ij_ddi_40p = len( dfu.loc[ ((dfu['n_ij_ddi']>0) & (dfu['age']>=40) ), :].index.unique() )
n_user_ij_ddi_major_65p = len( dfiu.loc[ ((dfiu['age']>=66) & (dfiu['severity'].isin(['Major']))) , : ]['id_user'].unique() )
##
print '--- RRC/RRI direct computation ---'
p_female = n_user_female/n_user
p_male = n_user_male/n_user
print 'P(u^[F]) = {:,.4f}'.format( (p_female) )
print 'P(u^[M]) = {:,.4f}'.format( (p_male) )
print
RRCF = (n_user_female_ij/n_user_female)/(n_user_male_ij/n_user_male)
RRIF = (n_females_qt1inter/n_user_female)/(n_males_qt1inter/n_user_male)
print 'RRC^[F] = ( |U^[c,F]| / |U^[F]| ) / ( |U^[c,M]| / |U^[M]| ) = ({:,d} / {:,d}) / ({:,d}/{:,d}) = {:,.4f}'.format( n_user_female_ij,n_user_female,n_user_male_ij,n_user_male,RRCF )
print 'RRI^[F] = ( |U^[c,F]| / |U^[F]| ) / ( |U^[c,M]| / |U^[M]| ) = ({:,d} / {:,d}) / ({:,d}/{:,d}) = {:,.4f}'.format( n_females_qt1inter,n_user_female,n_males_qt1inter,n_user_male,RRIF )
#print 'P(u^{i*}) = No Hormones'
#p_iNHf = n_females_qt1inter_nh/n_user
#p_iNHm = n_males_qt1inter_nh/n_user
#print 'P(I*>0|g=F) / P(I*>0|g=F) = {:,.4f} / {:,.4f} = {:,.4f}'.format( (p_iNHf/p_f) , (p_iNHm/p_m) , (p_iNHf/p_f)/(p_iNHm/p_m) )
# Load BNU
dfBnu = util.BnuData(age_per_gender=False)
city_pop = int(dfBnu['population'].sum())
city_pop_males = int(dfBnu['males'].sum())
city_pop_females = int(dfBnu['females'].sum())
city_pop_adults = int(dfBnu.iloc[:,4:21].sum().sum())
# Load Censo
#dfCenso = util.dfCenso(age_per_gender=False)
#
# Overall Statistics
#
print '--- Overall Statistics ---'
print "Blumenau population: {:,d}".format(city_pop)
print "Blumenau Males: {:,d}".format(city_pop_males)
print "Blumenau Females: {:,d}".format(city_pop_females)
print
print "Pronto population: {:,d} ({:.2%} of Blumenau)".format(n_user, n_user/city_pop)
print "Pronto males: {:,d} ({:.2%})".format(n_user_male, n_user_male/n_user)
print "Pronto females: {:,d} ({:.2%})".format(n_user_female, n_user_female/n_user)
print
print "Pronto adults (>=20) {:,d}".format(n_user_adult)
print "Unique drugs: {:,d}".format(n_i)
print "Unique drugs involved in DDI: {:,d}".format(n_i_inter)
print "Drugs intervals dispensed: {:,d}".format(n_a)
print "Co-administrations: {:,d}".format(n_ij)
print "Interactions: {:,d} ({:.2%})".format(n_ij_ddi, n_ij_ddi/n_ij )
print "Unique DDI pairs: {:,d}".format(n_ij_ddi_unique)
print "Unique DDI pairs (not hormones): {:,d}".format(n_ij_ddi_unique_nh)
print "Patients with 2+ drugs dispensed: {:,d} ({:.2%})".format(n_user_gt2drugs, n_user_gt2drugs/n_user)
print
print "Patients with 1+ co-administration: {:,d} ({:.2%})".format(n_user_gt1coadmin, n_user_gt1coadmin/n_user)
print "Male patients with 1+ co-administration: {:,d}, ({:.2%})".format(n_user_male_ij , n_user_male_ij/n_user_gt1coadmin)
print "Female patients with 1+ co-administration: {:,d}, ({:.2%})".format(n_user_female_ij , n_user_female_ij/n_user_gt1coadmin)
print
print "Patients with 1+ DDI: {:,d} ({:.2%} Pronto, {:.2%} Bnu)".format(n_user_ij_ddi, n_user_ij_ddi/n_user, n_user_ij_ddi/city_pop)
print "Male patients with 1+ DDI: {:,d} ({:.2%})".format(n_males_qt1inter, n_males_qt1inter/n_user_ij_ddi)
print "Female patients with 1+ DDI: {:,d} ({:.2%})".format(n_females_qt1inter, n_females_qt1inter/n_user_ij_ddi)
print
print "Adults patients (20+) with 1+ DDI: {:,d} ({:.2%} Pronto Adults, {:.2%} Bnu Adults/{:.2%} Pronto, {:.2%} Bnu)".format(n_user_adult_ij_ddi, n_user_adult_ij_ddi/n_user_adult, n_user_adult_ij_ddi/city_pop_adults, n_user_adult_ij_ddi/n_user, n_user_adult_ij_ddi/city_pop)
print "Adult patients (20+) with 1+ MAJOR DDI: {:,d} ({:.2%} Pronto Adults, {:.2%} Bnu Adults/{:.2%} Pronto, {:.2%} Bnu)".format(n_user_adult_ij_ddi_major, n_user_adult_ij_ddi_major/n_user_adult, n_user_adult_ij_ddi_major/city_pop_adults, n_user_adult_ij_ddi_major/n_user, n_user_adult_ij_ddi_major/city_pop)
print "Elderly patients (40+) with 1+ DDI: {:,d} ({:.2%} of patients with DDI, {:.2%} of 40+ patients)".format(n_user_ij_ddi_40p, n_user_ij_ddi_40p/n_user_ij_ddi, n_user_ij_ddi_40p/n_user_40p)
print "Elderly patients (65+) with 1+ MAJOR DDI: {:,d} ({:.2%} of 65+ patients)".format(n_user_ij_ddi_major_65p, n_user_ij_ddi_major_65p/n_user_65p)
#
# Education Stats (everyone)
#
print 'Education (everyone)'
dfEdu = dfu['education'].value_counts().to_frame()
dfEdu.sort_index(inplace=True)
dfEdu['prob1'] = dfEdu['education'] / dfEdu['education'].sum()
dfEdu['cumsum1'] = dfEdu['prob1'].cumsum()
#dfEdu = dfEdu.iloc[:-1,:]
dfEdu['prob2'] = dfEdu['education'] / dfEdu.iloc[:-1,0].sum()
dfEdu['cumsum2'] = dfEdu['prob2'].cumsum()
print dfEdu.to_latex(escape=False)
print dfEdu.sum()
#
# Education stats (above 25 y-old)
#
print 'Education (>25 yld)'
dfEdu = dfu.loc[ dfu['age']>=25 , 'education'].value_counts().to_frame()
dfEdu.sort_index(inplace=True)
dfEdu['prob1'] = dfEdu['education'] / dfEdu['education'].sum()
dfEdu['cumsum1'] = dfEdu['prob1'].cumsum()
#dfEdu = dfEdu.iloc[:-1,:]
dfEdu['prob2'] = dfEdu['education'] / dfEdu.iloc[:-1,0].sum()
dfEdu['cumsum2'] = dfEdu['prob2'].cumsum()
print dfEdu.to_latex(escape=False)
print dfEdu.sum()
#
# Age (Just Patient age distribution, nothing more)
#
print 'Age (distribution)'
dfAge = dfu['age_group'].value_counts().to_frame().sort_index()
dfAge['prob'] = dfAge['age_group'] / dfAge['age_group'].sum()
dfAge['cumsum'] = dfAge['prob'].cumsum()
print dfAge
print dfAge.sum()
#
# DDI per Severity
#
print '--- DDI per Severity ---'
dfi_s = dfi.groupby('severity').agg({'inter':'count','id_user': pd.Series.nunique})
dfi_s.rename(columns={'inter':'n_ij_ddi','id_user':'users'}, inplace=True) # RENAME id_usuario to users
dfi_s['i_per'] = dfi_s['n_ij_ddi'] / dfi_s['n_ij_ddi'].sum() * 100
dfi_s['u_per-pronto'] = dfi_s['users'] / n_user * 100
dfi_s['u_per-pop'] = dfi_s['users'] / city_pop * 100
#dfi_s = dfi_s.rename(index={'NONE':'None'})
columns = ['n_ij_ddi','i_per','users','u_per-pronto','u_per-pop']
print dfi_s.to_latex(columns=columns)
print dfi_s.sum(axis=0)
## Print summing None and *
dfi_s_ = dfi_s
dfi_s_['severity_s'] = pd.Categorical(['Major','Moderate','Minor','None','None'], ordered=True)
dfi_s_ = dfi_s_.groupby('severity_s').agg(sum)
print dfi_s_.to_latex(columns=columns)
## Print only for adult population
dfiu_s = dfiu.loc[ (dfiu['age']>=20), : ].groupby('severity').agg({'id_user':pd.Series.nunique})
dfiu_s.rename(columns={'id_user':'users'}, inplace=True) # RENAME id_usuario to users
dfiu_s['u_per-pronto-adult'] = dfiu_s['users'] / n_user_adult * 100
print dfiu_s.to_latex()
#print dfiu_s.head()
dfiu_s_ = dfiu_s
dfiu_s_['severity_s'] = pd.Categorical(['Major','Moderate','Minor','None','None'], ordered=True)
dfiu_s_ = dfiu_s_.groupby('severity_s').agg(sum)
print dfiu_s_.to_latex()
## Print summing Major-Moderate and Moderate-Minor
dfi_ = dfi[['severity','inter','id_user']].copy()
dfi_['severity'] = dfi_['severity'].cat.add_categories(['MajorModerate','ModerateMinor'])
dfi_majmod = dfi_.copy()
dfi_modmin = dfi_.copy()
dfi_majmod.loc[ (dfi_majmod['severity'].isin(['Major','Moderate'])) , 'severity'] = 'MajorModerate'
dfi_modmin.loc[ (dfi_modmin['severity'].isin(['Moderate','Minor'])) , 'severity'] = 'ModerateMinor'
dfi_majmod_s = dfi_majmod.groupby('severity').agg({'inter':'count','id_user':pd.Series.nunique})
dfi_modmin_s = dfi_modmin.groupby('severity').agg({'inter':'count','id_user':pd.Series.nunique})
dfi_majmod_s.rename(columns={'inter':'n_ij_ddi','id_user':'users'}, inplace=True) # RENAME id_usuario to users
dfi_modmin_s.rename(columns={'inter':'n_ij_ddi','id_user':'users'}, inplace=True) # RENAME id_usuario to users
dfi_majmod_s['i_per'] = dfi_majmod_s['n_ij_ddi'] / dfi_majmod_s['n_ij_ddi'].sum()
dfi_majmod_s['u_per-pronto'] = dfi_majmod_s['users'] / n_user * 100
dfi_majmod_s['u_per-pop'] = dfi_majmod_s['users'] / city_pop * 100
dfi_modmin_s['i_per'] = dfi_modmin_s['n_ij_ddi'] / dfi_modmin_s['n_ij_ddi'].sum()
dfi_modmin_s['u_per-pronto'] = dfi_modmin_s['users'] / n_user * 100
dfi_modmin_s['u_per-pop'] = dfi_modmin_s['users'] / city_pop * 100
print dfi_majmod_s.to_latex(columns=columns)
print dfi_modmin_s.to_latex(columns=columns)
## Print summing Major-Moderate and Moderate-Minor only for ADULTs
dfi_ = dfiu.loc[ (dfiu['age']>=20) , ['severity','id_user']].copy()
dfi_['severity'] = dfi_['severity'].cat.add_categories(['MajorModerate','ModerateMinor'])
dfi_majmod = dfi_.copy()
dfi_modmin = dfi_.copy()
dfi_majmod.loc[ (dfi_majmod['severity'].isin(['Major','Moderate'])) , 'severity'] = 'MajorModerate'
dfi_modmin.loc[ (dfi_modmin['severity'].isin(['Moderate','Minor'])) , 'severity'] = 'ModerateMinor'
dfi_majmod_s = dfi_majmod.groupby('severity').agg({'id_user':pd.Series.nunique})
dfi_modmin_s = dfi_modmin.groupby('severity').agg({'id_user':pd.Series.nunique})
dfi_majmod_s.rename(columns={'id_user':'users'}, inplace=True)
dfi_modmin_s.rename(columns={'id_user':'users'}, inplace=True)
dfi_majmod_s['u_per-pronto-adult'] = dfi_majmod_s['users'] / n_user_adult * 100
dfi_modmin_s['u_per-pronto-adult'] = dfi_modmin_s['users'] / n_user_adult * 100
print dfi_majmod_s.to_latex()
print dfi_modmin_s.to_latex()
#
# DDI per Gender
#
print '--- DDI per Gender ---'
dfi_g = dfiu.groupby('gender').agg({'inter':'count','id_user': pd.Series.nunique})
dfi_g.rename(columns={'inter':'n_ij_ddi','id_user':'users'}, inplace=True) # RENAME id_usuario to users
dfi_g['i_per'] = dfi_g['n_ij_ddi'] / dfi_g['n_ij_ddi'].sum()
dfi_g['u_per-pronto'] = dfi_g['users'] / n_user * 100
dfi_g['u_per-pop'] = dfi_g['users'] / city_pop * 100
columns = ['n_ij_ddi','i_per','users','u_per-pronto','u_per-pop']
print dfi_g.to_latex(columns=columns)
print dfi_g.sum(axis=0)
#
# DDI per Age
#
print '--- DDI per Age ---'
dfu_y = dfu.loc[ (dfu['n_ij_ddi']>0) , : ].reset_index().groupby('age_group').agg({'n_ij_ddi':'sum','id_user':pd.Series.nunique})
dfu_y.rename(columns={'id_user':'n_u_ddi'}, inplace=True) # RENAME id_usuario to users
dfu_y['i_per'] = dfu_y['n_ij_ddi'] / dfu_y['n_ij_ddi'].sum()
dfu_y['u_per-pronto'] = dfu_y['n_u_ddi'] / n_user * 100
dfu_y['u_per-city'] = dfu_y['n_u_ddi'] / city_pop * 100
print dfu_y[['n_ij_ddi','i_per','n_u_ddi','u_per-pronto','u_per-city']].to_latex(escape=False)
print dfu_y.sum(axis=0)
# Print summing None and *
dfu_y = dfu_y.rename(index={'*':'NONE'}).rename(index={'NONE':'n/a'})
print dfu_y.groupby(dfu_y.index).agg(sum)[['n_ij_ddi','i_per','n_u_ddi','u_per-pronto','u_per-city']].to_latex(escape=False)
#
# RRC/RRI per Gender
#
pd.set_option('display.precision', 4)
pd.set_option('display.float_format', lambda x: '%.4f' % x)
print '--- RRC/RRI per Gender ---'
dfR_g = pd.concat([
dfu.reset_index().groupby('gender').agg({'id_user':pd.Series.nunique}).rename(columns={'id_user':'u'}),
dfu.loc[ (dfu['n_i']>=2) , :].reset_index().groupby('gender', sort=False).agg({'id_user':pd.Series.nunique}).rename(columns={'id_user':'u^{n2}'}),
dfu.loc[ (dfu['n_ij']>0) , :].reset_index().groupby('gender', sort=False).agg({'id_user':pd.Series.nunique}).rename(columns={'id_user':'u^{c}'}),
dfu.loc[ (dfu['n_ij_ddi']>0) , :].reset_index().groupby('gender', sort=False).agg({'id_user':pd.Series.nunique}).rename(columns={'id_user':'u^{i}'})
], axis=1)
dfR_g.to_csv('csv/gender.csv', encoding='utf-8')
dfR_g['RRC^{F}'] = (dfR_g['u^{c}'] / dfR_g['u']) / (dfR_g.loc['Male','u^{c}'] / dfR_g.loc['Male','u'])
dfR_g['RRI^{F}'] = (dfR_g['u^{i}'] / dfR_g['u']) / (dfR_g.loc['Male','u^{i}'] / dfR_g.loc['Male','u'])
print dfR_g.to_latex(escape=False)
#
# RRC/RRI per Severity and Gender
#
print '--- RRC/RRI per Severity & Gender ---'
dfR_gs = dfiu.groupby(['gender','severity']).agg({'id_user':pd.Series.nunique}).rename(columns={'id_user':'u'})
dfR_gs = dfR_gs.unstack(level=0)
dfR_gs.columns = ['%s^{i,%s}_{s}' % (i,j[0]) for i,j in dfR_gs.columns.values]
dfR_gs['RRI^{F}_{s}'] = (dfR_gs['u^{i,F}_{s}'] / n_user_female) / ( dfR_gs['u^{i,M}_{s}'] / n_user_male)
print dfR_gs.to_latex(escape=False)
#
# RRC/RRI per Age
#
print '--- RRC/RRI per Age ---'
dfR_y = pd.concat([
dfu.reset_index().groupby('age_group').agg({'id_user':pd.Series.nunique}).rename(columns={'id_user':'u'}),
dfu.loc[ (dfu['n_i']>=2) , :].reset_index().groupby('age_group', sort=False).agg({'id_user':pd.Series.nunique}).rename(columns={'id_user':'u^{n2}'}),
dfu.loc[ (dfu['n_ij']>0) , :].reset_index().groupby('age_group', sort=False).agg({'id_user':pd.Series.nunique}).rename(columns={'id_user':'u^{c}'}),
dfu.loc[ (dfu['n_ij_ddi']>0) , :].reset_index().groupby('age_group', sort=False).agg({'id_user':pd.Series.nunique}).rename(columns={'id_user':'u^{i}'})
], axis=1)
# Make Short Table (Concatenating edges values)
df00_89 = dfR_y.iloc[ 0:18, 0:4 ]
df00_89.index = df00_89.index.add_categories(['90+'])
df90_pl = dfR_y.iloc[ 18: , 0:4 ].sum(axis=0).to_frame(name='90+').T
dfRs_y = pd.concat([df00_89, df90_pl], axis=0)
dfR_y.to_csv('csv/age.csv', encoding='utf-8')
dfRs_y['RC^{y}'] = dfRs_y['u^{c}'] / dfRs_y['u^{n2}']
dfRs_y['RI^{y}'] = dfRs_y['u^{i}'] / dfRs_y['u^{c}']
print dfRs_y.to_latex(escape=False)
#dfRs_y.to_csv('csv/age_short.csv', encoding='utf-8')
#
# RRC/RRI per Age and Gender
#
print '--- RRC/RRI per Age and Gender ---'
dfR_gy_u = dfu.reset_index().groupby(['gender','age_group'], sort=False).agg({'id_user':pd.Series.nunique}).astype(np.int64)
dfR_gy_u.rename(columns={'id_user':'u'}, inplace=True)
dfR_gy_n = dfu.loc[ (dfu['n_i']>=2) , :].reset_index().groupby(['gender','age_group'], sort=False).agg({'id_user':pd.Series.nunique}).astype(np.int64)
dfR_gy_n.rename(columns={'id_user':'u^{n2}'}, inplace=True)
dfR_gy_c = dfu.loc[ (dfu['n_ij']>0) , :].reset_index().groupby(['gender','age_group'], sort=False).agg({'id_user':pd.Series.nunique}).astype(np.int64)
dfR_gy_c.rename(columns={'id_user':'u^{c}'}, inplace=True)
dfR_gy_i = dfu.loc[ (dfu['n_ij_ddi']>=1) , :].reset_index().groupby(['gender','age_group'], sort=False).agg({'id_user':pd.Series.nunique}).astype(np.int64)
dfR_gy_i.rename(columns={'id_user':'u^{i}'}, inplace=True)
for (gender,dftmp_u), (_,dftmp_n), (_, dftmp_c), (_,dftmp_i) in zip(dfR_gy_u.groupby(level=0), dfR_gy_n.groupby(level=0), dfR_gy_c.groupby(level=0), dfR_gy_i.groupby(level=0)):
print gender
dfR_gy = pd.concat([dftmp_u,dftmp_n,dftmp_c,dftmp_i], axis=1)
dfR_gy.index = dfR_gy.index.droplevel(level=0)
# Make Short Table (Concatenating edges values)
df00_89 = dfR_gy.iloc[ 0:18, 0:4 ]
df90_pl = dfR_gy.iloc[ 18: , 0:4 ].sum(axis=0).to_frame(name='90+').T
dfRs_gy = pd.concat([df00_89, df90_pl], axis=0)
dfR_gy.to_csv('csv/age_%s.csv' % (gender.lower()), encoding='utf-8')
dfRs_gy['RC^{y}'] = dfRs_gy['u^{c}'] / dfRs_gy['u^{n2}']
dfRs_gy['RI^{y}'] = dfRs_gy['u^{i}'] / dfRs_gy['u^{c}']
print dfRs_gy.to_latex(escape=False)
# Statistical Test Males and Females distribution per age are different
ui_gy_m = dfR_gy_i.loc[ slice['Male',:] , 'u^{i}'].values
ui_gy_f = dfR_gy_i.loc[ slice['Female',:] , 'u^{i}'].values
tstat, pvalue = stats.chisquare(ui_gy_f, f_exp=ui_gy_m)
print 'Chi Square the two samples are independent'
print 't-stat: {:.4f}, p-value: {:.4f}'.format(tstat, pvalue)
KS, pvalue = stats.ks_2samp(ui_gy_m, ui_gy_f)
print 'Kolmogorov-Sminov statistic two samples came from the same continuos distribution'
print 't-stat: {:.4f}, p-value: {:.4f}'.format(KS, pvalue)
#
# RRC/RRI per Number of Unique Drugs
#
dfR = pd.concat([
dfu.reset_index().groupby('n_i', sort=False).agg({'id_user':pd.Series.nunique}).rename(columns={'id_user':'u'}),
dfu.loc[ (dfu['n_i']>=2) , :].reset_index().groupby('n_i', sort=False).agg({'id_user':pd.Series.nunique}).rename(columns={'id_user':'u^{n2}'}),
dfu.loc[ (dfu['n_ij']>0) , :].reset_index().groupby('n_i', sort=False).agg({'id_user':pd.Series.nunique}).rename(columns={'id_user':'u^{c}'}),
dfu.loc[ (dfu['n_ij_ddi']>=1) , :].reset_index().groupby('n_i', sort=False).agg({'id_user':pd.Series.nunique}).rename(columns={'id_user':'u^{i}'})
], axis=1).fillna(0).astype(np.int64)
# Make Short Table (Concatenating edges values)
df00_20 = dfR.iloc[ 0:20, 0:4 ]
df20_pl = dfR.iloc[ 20: , 0:4 ].sum(axis=0).to_frame(name='>20').T
dfRs = pd.concat([df00_20, df20_pl], axis=0)
dfRs['RRC^{y}'] = (dfRs['u^{c}'] / dfRs['u']) / (dfRs.loc[2,'u^{c}'] / dfRs.loc[2,'u'])
dfRs['RRI^{y}'] = (dfRs['u^{i}'] / dfRs['u']) / (dfRs.loc[2,'u^{i}'] / dfRs.loc[2,'u'])
# Don't forget to remove the extra zeros manually, Rion
print dfRs.to_latex(escape=False)
#
# RRI^g > x
#
dfR = pd.concat([
dfiu.loc[ (dfiu['gender']=='Male') , : ].groupby(['db_ij']).agg({'id_user':set}).rename(columns={'id_user':'set(u^{M})'}),
dfiu.loc[ (dfiu['gender']=='Female') , : ].groupby(['db_ij']).agg({'id_user':set}).rename(columns={'id_user':'set(u^{F})'}),
dfiu.groupby(['db_ij']).agg({'severity':'first','db_i':'first','db_j':'first'})
], axis=1, sort=False)
dfR[['set(u^{F})','set(u^{M})']] = dfR[['set(u^{F})','set(u^{M})']].applymap(lambda x:set([]) if isinstance(x,float) else x)
dfR['u^{i,M}'] = dfR['set(u^{M})'].apply(len)
dfR['u^{i,F}'] = dfR['set(u^{F})'].apply(len)
dfR['u^{i}'] = dfR.apply(lambda r:len(r['set(u^{M})'].union(r['set(u^{F})'])), axis=1)
dfR['RRI^{F}'] = (dfR['u^{i,F}'] / n_user_female) / (dfR['u^{i,M}'] / n_user_female)
dfR['RRI^{M}'] = (dfR['u^{i,M}'] / n_user_male) / (dfR['u^{i,F}'] / n_user_female)
print dfR.head()
us,ds = [],[]
for RRIgx in [1,2,3,4,5,6,7,8,9,10]:
n_i_female = len( np.unique( dfR.loc[ (dfR['RRI^{F}']>=RRIgx) , ['db_i','db_j'] ].values ) )
n_i_male = len( np.unique( dfR.loc[ (dfR['RRI^{M}']>=RRIgx) , ['db_i','db_j'] ].values ) )
n_ij_female = dfR.loc[ (dfR['RRI^{F}']>=RRIgx) , : ].shape[0]
n_ij_male = dfR.loc[ (dfR['RRI^{M}']>=RRIgx) , : ].shape[0]
n_ij_major_female = dfR.loc[ ((dfR['severity']=='Major') & (dfR['RRI^{F}']>=RRIgx)), : ].shape[0]
n_ij_major_male = dfR.loc[ ((dfR['severity']=='Major') & (dfR['RRI^{M}']>=RRIgx)), : ].shape[0]
ds.append( (RRIgx,n_i_female,n_i_male,n_ij_female,n_ij_male,n_ij_major_female,n_ij_major_male) )
n_user_minrri_female = len( set.union( *dfR.loc[ (dfR['RRI^{F}']>=RRIgx) , 'set(u^{F})'].tolist() ) )
n_user_minrri_male = len( set.union( *dfR.loc[ (dfR['RRI^{M}']>=RRIgx), 'set(u^{M})'].tolist() ) )
n_user_minrri_maj_female = len( set.union( *dfR.loc[ ((dfR['severity']=='Major') & (dfR['RRI^{F}']>=RRIgx)), 'set(u^{F})'].tolist() ) )
n_user_minrri_maj_male = len( set.union( *dfR.loc[ ((dfR['severity']=='Major') & (dfR['RRI^{M}']>=RRIgx)), 'set(u^{M})'].tolist() ) )
us.append( (RRIgx,n_user_minrri_female,n_user_minrri_male,n_user_minrri_maj_female,n_user_minrri_maj_male) )
dfRdr = pd.DataFrame(ds, columns=['RRI>x','d^{F}','d^{M}','ij^{F}','ij^{M}','ij^{F}_{maj}','ij^{M}_{maj}']).set_index('RRI>x')
dfRur = pd.DataFrame(us, columns=['RRI>x','u^{F}','u^{M}','u^{F}_{maj}','u^{M}_{maj}']).set_index('RRI>x')
dfRur['u^{F}-per'] = dfRur['u^{F}'] / n_user_female
dfRur['u^{M}-per'] = dfRur['u^{M}'] / n_user_male
dfRur['u^{F}_{maj}-per'] = dfRur['u^{F}_{maj}'] / n_user_female
dfRur['u^{M}_{maj}-per'] = dfRur['u^{M}_{maj}'] / n_user_male
print dfRdr.to_latex(escape=False)
print dfRur.to_latex(escape=False)
#
# Null Models - Age
# RI^{y}
#
pd.set_option('display.precision', 2)
pd.set_option('display.float_format', lambda x: '%.2f' % x)
dfN = pd.read_csv('csv/age_gender_null.csv', index_col=0, encoding='utf-8')
n_runs = dfN['run'].max()
dfN['u^{i}_{rnd}'] = dfN['u^{i,F}_{rnd}'] + dfN['u^{i,M}_{rnd}']
dfN = dfN.groupby('age_group').agg(OrderedDict([
('u',['mean']),
('u^{i}_{rnd}',['mean','std']),
]))
dfN.columns = ['-'.join(col).strip() for col in dfN.columns.values]
dfN00_89 = dfN.iloc[ 0:18, : ]
dfN90_pl = dfN.iloc[ 18: , : ].sum(axis=0).to_frame(name='90+').T
dfN = pd.concat([dfN00_89, dfN90_pl], axis=0)
dfN['RI^{y}_{rnd}'] = dfN['u^{i}_{rnd}-mean'] / dfR_y['u^{c}']
dfN[['u^{i}_{rnd}-ci_min','u^{i}_{rnd}-ci_max']] = dfN[['u^{i}_{rnd}-mean','u^{i}_{rnd}-std']].apply(calc_conf_interval, axis=1, n_runs=n_runs)
dfN['RI^{y}_{rnd}-ci_min'] = dfN['u^{i}_{rnd}-ci_min'] / dfR_y['u^{c}']
dfN['RI^{y}_{rnd}-ci_max'] = dfN['u^{i}_{rnd}-ci_max'] / dfR_y['u^{c}']
print dfN.to_latex(escape=False)
#
# Null Models - Age & Gender
# RI^{y,g}
dfN = pd.read_csv('csv/age_gender_null.csv', index_col=0, encoding='utf-8')
dfM = pd.read_csv('csv/age_male.csv', index_col=0, encoding='utf-8')
dfF = pd.read_csv('csv/age_female.csv', index_col=0, encoding='utf-8')
n_runs = dfN['run'].max()
dfN['u^{i}_{rnd}'] = dfN['u^{i,F}_{rnd}'] + dfN['u^{i,M}_{rnd}']
dfN = dfN.groupby('age_group').agg(OrderedDict([
('u',['mean']),
('u^{i}_{rnd}',['mean','std']),
('u^{i,F}_{rnd}',['mean','std']),
('u^{i,M}_{rnd}',['mean','std'])
]))
dfN.columns = ['-'.join(col).strip() for col in dfN.columns.values]
dfN['u'] = dfM['u'] + dfF['u']
dfN['u^{F}'] = dfF['u']
dfN['u^{M}'] = dfM['u']
dfN['u^{c,F}'] = dfF['u^{c}']
dfN['u^{c,M}'] = dfM['u^{c}']
dfN00_89 = dfN.iloc[ 0:18, : ]
dfN90_pl = dfN.iloc[ 18: , : ].sum(axis=0).to_frame(name='90+').T
dfN = pd.concat([dfN00_89, dfN90_pl], axis=0)
dfN['RI^{y,F}_{rnd}'] = dfN['u^{i,F}_{rnd}-mean'] / dfF['u^{c}']
dfN['RI^{y,M}_{rnd}'] = dfN['u^{i,M}_{rnd}-mean'] / dfM['u^{c}']
# Confidence Interval
dfN[['u^{i,F}_{rnd}-ci_min','u^{i,F}_{rnd}-ci_max']] = dfN[['u^{i,F}_{rnd}-mean','u^{i,F}_{rnd}-std']].apply(calc_conf_interval, axis=1, n_runs=n_runs)
dfN[['u^{i,M}_{rnd}-ci_min','u^{i,M}_{rnd}-ci_max']] = dfN[['u^{i,M}_{rnd}-mean','u^{i,M}_{rnd}-std']].apply(calc_conf_interval, axis=1, n_runs=n_runs)
dfN['RI^{y,F}_{rnd}-ci_min'] = dfN['u^{i,F}_{rnd}-ci_min'] / dfN['u^{c,F}']
dfN['RI^{y,F}_{rnd}-ci_max'] = dfN['u^{i,F}_{rnd}-ci_max'] / dfN['u^{c,F}']
dfN['RI^{y,M}_{rnd}-ci_min'] = dfN['u^{i,M}_{rnd}-ci_min'] / dfN['u^{c,M}']
dfN['RI^{y,M}_{rnd}-ci_max'] = dfN['u^{i,M}_{rnd}-ci_max'] / dfN['u^{c,M}']
print dfN.to_latex(escape=False)
| [
1,
396,
14137,
29922,
9420,
29899,
29947,
13,
29937,
13361,
29901,
529,
5813,
29958,
13,
29937,
4712,
29901,
2864,
29871,
29896,
29953,
29892,
29871,
29906,
29900,
29896,
29946,
13,
29937,
13,
29937,
12953,
29901,
18399,
360,
4571,
27098,
13,
29937,
13,
29937,
13,
29937,
14137,
29922,
9420,
29899,
29947,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
5215,
4560,
2272,
29889,
16202,
13,
3166,
4560,
2272,
1053,
22663,
13,
18337,
353,
10518,
29889,
3220,
29903,
5897,
13,
15926,
29889,
842,
29918,
3385,
877,
4990,
29889,
3317,
29918,
5727,
742,
29871,
29906,
29946,
29897,
13,
15926,
29889,
842,
29918,
3385,
877,
4990,
29889,
3317,
29918,
13099,
742,
29871,
29906,
29946,
29897,
13,
15926,
29889,
842,
29918,
3385,
877,
4990,
29889,
2103,
742,
29871,
29941,
29900,
29900,
29897,
13,
15926,
29889,
842,
29918,
3385,
877,
4990,
29889,
17990,
2459,
742,
29871,
29906,
29897,
13,
15926,
29889,
842,
29918,
3385,
877,
4990,
29889,
7411,
29918,
4830,
742,
14013,
921,
29901,
14210,
29889,
29906,
29888,
29915,
1273,
921,
29897,
13,
5215,
3667,
13,
3166,
16250,
1053,
8170,
287,
21533,
13,
5215,
5844,
13,
13,
13,
1753,
22235,
29918,
5527,
29918,
19207,
29898,
29878,
29892,
3579,
19290,
1125,
13,
12,
2176,
353,
9049,
5085,
1839,
29876,
29918,
3389,
29879,
2033,
29899,
29896,
13,
12,
12676,
353,
364,
29889,
309,
542,
29961,
29900,
29962,
13,
12,
4172,
353,
364,
29889,
309,
542,
29961,
29896,
29962,
13,
12,
3754,
353,
3659,
29914,
755,
29889,
3676,
29898,
29876,
29918,
3389,
29879,
29897,
13,
12,
29898,
455,
29918,
1195,
29892,
455,
29918,
3317,
29897,
353,
22663,
29889,
29873,
29889,
19207,
29898,
2312,
29922,
29900,
29889,
29929,
29945,
29892,
4489,
29922,
29876,
29918,
3389,
29879,
29899,
29896,
29892,
1180,
29922,
12676,
29892,
6287,
29922,
3754,
29897,
13,
12,
2457,
10518,
29889,
19204,
4197,
455,
29918,
1195,
29892,
4583,
29918,
3317,
1402,
2380,
29922,
1839,
455,
29918,
1195,
742,
525,
455,
29918,
3317,
11287,
13,
13,
29937,
13,
29937,
16012,
16874,
29879,
13,
29937,
13,
2176,
29884,
29892,
4489,
29883,
29892,
4489,
29875,
353,
3667,
29889,
2176,
5959,
4074,
7387,
26289,
29898,
1359,
7967,
12754,
29922,
8824,
29897,
13,
29937,
29881,
1003,
353,
4489,
29875,
29889,
27789,
877,
333,
29918,
1792,
2824,
16170,
3319,
29915,
29876,
29918,
26179,
3174,
22099,
2083,
3788,
29876,
29918,
823,
29918,
1289,
29875,
22099,
2083,
3788,
29876,
29918,
1111,
6406,
22099,
2083,
29915,
1800,
13,
13,
2176,
29881,
353,
10518,
29889,
949,
29918,
7638,
877,
9902,
29914,
1289,
29918,
26179,
3174,
29889,
7638,
29889,
18828,
742,
4839,
29922,
29900,
29892,
8025,
2433,
9420,
29899,
29947,
742,
13,
12,
12,
7039,
29922,
1839,
333,
29918,
1792,
3788,
4051,
29918,
1643,
3788,
2798,
3788,
264,
29918,
29875,
7464,
13,
12,
12,
29881,
1853,
3790,
29915,
333,
29918,
1792,
2396,
9302,
29889,
524,
29953,
29946,
1800,
13,
13,
13,
2158,
525,
6778,
4489,
29884,
29915,
13,
2158,
4489,
29884,
29889,
2813,
580,
13,
2158,
4489,
29884,
29889,
12181,
13,
2158,
525,
6778,
4489,
29883,
29915,
13,
2158,
4489,
29883,
29889,
2813,
580,
13,
2158,
4489,
29883,
29889,
12181,
13,
2158,
525,
6778,
4489,
29875,
29915,
13,
2158,
4489,
29875,
29889,
2813,
580,
13,
2158,
4489,
29875,
29889,
12181,
13,
2158,
525,
6778,
4489,
29881,
29915,
13,
2158,
4489,
29881,
29889,
2813,
580,
13,
2158,
4489,
29881,
29889,
12181,
13,
13,
13,
2176,
5871,
353,
10518,
29889,
14634,
29898,
2176,
29875,
29892,
4489,
29884,
29961,
1839,
26098,
3788,
482,
3788,
482,
29918,
2972,
2033,
1402,
920,
2433,
1563,
742,
2175,
29918,
265,
2433,
333,
29918,
1792,
742,
1492,
29918,
2248,
29922,
5574,
29897,
13,
13,
2158,
525,
6778,
4489,
5871,
29915,
13,
2158,
4489,
5871,
29889,
2813,
580,
13,
13,
2158,
525,
5634,
11474,
11474,
29915,
13,
13,
29937,
13,
29937,
5240,
8238,
379,
555,
2873,
13,
29937,
13,
29888,
331,
744,
29918,
29882,
555,
2873,
353,
6024,
29923,
386,
262,
2904,
382,
710,
10129,
324,
3788,
29923,
710,
10129,
324,
3788,
29940,
272,
621,
1531,
650,
3788,
3226,
23696,
990,
342,
2674,
3788,
12787,
9102,
575,
1281,
29926,
29889,
2033,
13,
2176,
5871,
29918,
29876,
29882,
353,
4489,
5871,
29889,
2029,
29961,
313,
30022,
29898,
2176,
5871,
1839,
264,
29918,
29875,
13359,
275,
262,
29898,
29888,
331,
744,
29918,
29882,
555,
2873,
876,
669,
3695,
29898,
2176,
5871,
1839,
264,
29918,
29926,
13359,
275,
262,
29898,
29888,
331,
744,
29918,
29882,
555,
2873,
876,
1723,
1919,
584,
29871,
1822,
12071,
29918,
2248,
29898,
8865,
29922,
5574,
29897,
13,
2176,
29884,
1839,
2435,
29918,
823,
29918,
1289,
29875,
29918,
1333,
29918,
29882,
555,
650,
2033,
353,
4489,
5871,
29918,
29876,
29882,
1839,
2435,
29918,
823,
29918,
1289,
29875,
2033,
13,
2176,
29875,
688,
29918,
29876,
29882,
353,
4489,
5871,
29918,
29876,
29882,
29889,
27789,
877,
333,
29918,
1792,
2824,
16170,
3319,
29915,
2435,
29918,
823,
29918,
1289,
29875,
22099,
2083,
3788,
333,
29918,
1792,
22099,
2798,
29915,
1800,
13,
2176,
29884,
1839,
29876,
29918,
823,
29918,
1289,
29875,
29918,
1333,
29918,
29882,
555,
650,
2033,
353,
4489,
29875,
688,
29918,
29876,
29882,
1839,
333,
29918,
1792,
2033,
13,
2158,
4489,
29884,
29889,
2029,
29961,
4489,
29884,
1839,
2435,
29918,
823,
29918,
1289,
29875,
2033,
29958,
2176,
29884,
1839,
2435,
29918,
823,
29918,
1289,
29875,
29918,
1333,
29918,
29882,
555,
650,
7464,
584,
29871,
1822,
2813,
580,
13,
13,
29937,
13,
29937,
9586,
1849,
13,
29937,
13,
29876,
29918,
1792,
4706,
353,
7431,
29898,
4489,
29884,
29889,
2248,
29889,
13092,
580,
1723,
13,
29876,
29918,
1792,
29918,
328,
499,
29871,
353,
7431,
29898,
4489,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
482,
2033,
18572,
29906,
29900,
511,
584,
29871,
1822,
2248,
29889,
13092,
580,
1723,
13,
29876,
29918,
1792,
29918,
19202,
259,
353,
7431,
29898,
4489,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
26098,
2033,
1360,
29915,
29924,
744,
5477,
584,
29871,
1822,
2248,
29889,
13092,
580,
1723,
13,
29876,
29918,
1792,
29918,
29888,
331,
744,
353,
7431,
29898,
4489,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
26098,
2033,
1360,
29915,
29943,
331,
744,
5477,
584,
29871,
1822,
2248,
29889,
13092,
580,
1723,
13,
29876,
29918,
1792,
29918,
29946,
29900,
29886,
29871,
353,
7431,
29898,
4489,
29884,
29889,
2029,
29961,
313,
313,
2176,
29884,
1839,
482,
2033,
18572,
29946,
29900,
29897,
10353,
584,
1822,
2248,
29889,
13092,
580,
1723,
13,
29876,
29918,
1792,
29918,
29953,
29945,
29886,
1678,
353,
7431,
29898,
4489,
29884,
29889,
2029,
29961,
313,
313,
2176,
29884,
1839,
482,
2033,
18572,
29953,
29953,
29897,
10353,
584,
1822,
2248,
29889,
13092,
580,
1723,
13,
13,
29876,
29918,
29874,
353,
4489,
29884,
1839,
29876,
29918,
29874,
13359,
2083,
580,
13,
29876,
29918,
29875,
353,
4489,
29881,
29889,
27789,
877,
4051,
29918,
1643,
2824,
16170,
3319,
29915,
264,
29918,
29875,
22099,
4102,
29915,
7690,
12181,
29961,
29900,
29962,
13,
29876,
29918,
29875,
29918,
1639,
353,
7431,
29898,
9302,
29889,
13092,
29898,
2176,
29875,
29961,
1839,
2585,
29918,
29875,
3788,
2585,
29918,
29926,
2033,
1822,
5975,
876,
13,
29876,
29918,
823,
353,
4489,
29884,
1839,
29876,
29918,
823,
13359,
2083,
580,
13,
29876,
29918,
823,
29918,
1289,
29875,
353,
4489,
29884,
1839,
29876,
29918,
823,
29918,
1289,
29875,
13359,
2083,
580,
13,
29876,
29918,
823,
29918,
1289,
29875,
29918,
13092,
353,
7431,
29898,
4489,
5871,
1839,
2585,
29918,
823,
13359,
13092,
580,
1723,
13,
29876,
29918,
823,
29918,
1289,
29875,
29918,
13092,
29918,
29876,
29882,
353,
7431,
29898,
4489,
5871,
29918,
29876,
29882,
1839,
2585,
29918,
823,
13359,
13092,
580,
1723,
13,
13,
29876,
29918,
1792,
29918,
4141,
29906,
26179,
3174,
353,
7431,
29898,
4489,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
29876,
29918,
29875,
2033,
29958,
29896,
511,
584,
29871,
1822,
2248,
29889,
13092,
580,
1723,
13,
13,
29876,
29918,
1792,
29918,
4141,
29896,
1111,
6406,
353,
7431,
29898,
4489,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
29876,
29918,
823,
2033,
29958,
29900,
511,
584,
29871,
1822,
2248,
29889,
13092,
580,
1723,
13,
29876,
29918,
1792,
29918,
19202,
29918,
823,
353,
7431,
29898,
4489,
29884,
29889,
2029,
29961,
5135,
2176,
29884,
1839,
26098,
2033,
1360,
29915,
29924,
744,
1495,
29871,
669,
313,
2176,
29884,
1839,
29876,
29918,
823,
2033,
29958,
29900,
8243,
584,
29871,
1822,
2248,
29889,
13092,
580,
1723,
13,
29876,
29918,
1792,
29918,
29888,
331,
744,
29918,
823,
353,
7431,
29898,
4489,
29884,
29889,
2029,
29961,
5135,
2176,
29884,
1839,
26098,
2033,
1360,
29915,
29943,
331,
744,
1495,
669,
313,
2176,
29884,
1839,
29876,
29918,
823,
2033,
29958,
29900,
8243,
584,
29871,
1822,
2248,
29889,
13092,
580,
1723,
13,
13,
29876,
29918,
1792,
29918,
823,
29918,
1289,
29875,
353,
7431,
29898,
4489,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
29876,
29918,
823,
29918,
1289,
29875,
2033,
29958,
29900,
511,
584,
29871,
1822,
2248,
29889,
13092,
580,
1723,
13,
29876,
29918,
1792,
29918,
823,
29918,
1289,
29875,
29918,
21355,
353,
7431,
29898,
4489,
5871,
29889,
2029,
29961,
313,
2176,
5871,
1839,
344,
369,
537,
13359,
275,
262,
18959,
29924,
1175,
272,
25901,
1919,
584,
4514,
1839,
333,
29918,
1792,
13359,
13092,
580,
29871,
1723,
13,
29876,
29918,
1792,
29918,
328,
499,
29918,
823,
29918,
1289,
29875,
353,
7431,
29898,
4489,
29884,
29889,
2029,
29961,
5135,
2176,
29884,
1839,
482,
2033,
18572,
29906,
29900,
29897,
669,
313,
2176,
29884,
1839,
29876,
29918,
823,
29918,
1289,
29875,
2033,
29958,
29900,
8243,
584,
29871,
1822,
2248,
29889,
13092,
580,
1723,
29871,
13,
29876,
29918,
1792,
29918,
328,
499,
29918,
823,
29918,
1289,
29875,
29918,
21355,
353,
7431,
29898,
4489,
5871,
29889,
2029,
29961,
5135,
2176,
5871,
1839,
482,
2033,
18572,
29906,
29900,
29897,
669,
313,
2176,
5871,
1839,
344,
369,
537,
13359,
275,
262,
18959,
29924,
1175,
272,
2033,
4961,
1919,
584,
4514,
1839,
333,
29918,
1792,
13359,
13092,
580,
29871,
1723,
13,
13,
29876,
29918,
29885,
2122,
29918,
17915,
29896,
1639,
353,
7431,
29898,
4489,
29884,
29889,
2029,
29961,
5135,
2176,
29884,
1839,
26098,
2033,
1360,
29915,
29924,
744,
1495,
29871,
669,
313,
2176,
29884,
1839,
29876,
29918,
823,
29918,
1289,
29875,
2033,
29958,
29900,
8243,
584,
29871,
1822,
2248,
29889,
13092,
580,
1723,
13,
29876,
29918,
29888,
331,
2122,
29918,
17915,
29896,
1639,
353,
7431,
29898,
4489,
29884,
29889,
2029,
29961,
5135,
2176,
29884,
1839,
26098,
2033,
1360,
29915,
29943,
331,
744,
1495,
669,
313,
2176,
29884,
1839,
29876,
29918,
823,
29918,
1289,
29875,
2033,
29958,
29900,
8243,
584,
29871,
1822,
2248,
29889,
13092,
580,
1723,
13,
13,
29876,
29918,
29885,
2122,
29918,
17915,
29896,
1639,
29918,
29876,
29882,
353,
7431,
29898,
4489,
29884,
29889,
2029,
29961,
5135,
2176,
29884,
1839,
26098,
2033,
1360,
29915,
29924,
744,
1495,
669,
313,
2176,
29884,
1839,
29876,
29918,
823,
29918,
1289,
29875,
29918,
1333,
29918,
29882,
555,
650,
2033,
29958,
29900,
8243,
584,
29871,
1822,
2248,
29889,
13092,
580,
1723,
13,
29876,
29918,
29888,
331,
2122,
29918,
17915,
29896,
1639,
29918,
29876,
29882,
353,
7431,
29898,
4489,
29884,
29889,
2029,
29961,
5135,
2176,
29884,
1839,
26098,
2033,
1360,
29915,
29943,
331,
744,
1495,
669,
313,
2176,
29884,
1839,
29876,
29918,
823,
29918,
1289,
29875,
29918,
1333,
29918,
29882,
555,
650,
2033,
29958,
29900,
8243,
584,
29871,
1822,
2248,
29889,
13092,
580,
1723,
13,
13,
29876,
29918,
1792,
29918,
823,
29918,
1289,
29875,
29918,
29946,
29900,
29886,
353,
7431,
29898,
4489,
29884,
29889,
2029,
29961,
5135,
2176,
29884,
1839,
29876,
29918,
823,
29918,
1289,
29875,
2033,
29958,
29900,
29897,
669,
313,
2176,
29884,
1839,
482,
2033,
18572,
29946,
29900,
29897,
10353,
584,
1822,
2248,
29889,
13092,
580,
1723,
13,
29876,
29918,
1792,
29918,
823,
29918,
1289,
29875,
29918,
21355,
29918,
29953,
29945,
29886,
353,
7431,
29898,
4489,
5871,
29889,
2029,
29961,
5135,
2176,
5871,
1839,
482,
2033,
18572,
29953,
29953,
29897,
669,
313,
2176,
5871,
1839,
344,
369,
537,
13359,
275,
262,
18959,
29924,
1175,
272,
2033,
4961,
1919,
584,
4514,
1839,
333,
29918,
1792,
13359,
13092,
580,
29871,
1723,
13,
2277,
13,
13,
2158,
525,
5634,
390,
10363,
29914,
29934,
3960,
1513,
16287,
11474,
29915,
13,
29886,
29918,
29888,
331,
744,
353,
302,
29918,
1792,
29918,
29888,
331,
744,
29914,
29876,
29918,
1792,
13,
29886,
29918,
19202,
353,
302,
29918,
1792,
29918,
19202,
29914,
29876,
29918,
1792,
13,
2158,
525,
29925,
29898,
29884,
29985,
29961,
29943,
2314,
353,
12365,
7671,
29946,
29888,
29913,
4286,
4830,
29898,
313,
29886,
29918,
29888,
331,
744,
29897,
1723,
13,
2158,
525,
29925,
29898,
29884,
29985,
29961,
29924,
2314,
353,
12365,
7671,
29946,
29888,
29913,
4286,
4830,
29898,
313,
29886,
29918,
19202,
29897,
1723,
13,
2158,
13,
29934,
29934,
9207,
353,
313,
29876,
29918,
1792,
29918,
29888,
331,
744,
29918,
823,
29914,
29876,
29918,
1792,
29918,
29888,
331,
744,
6802,
29898,
29876,
29918,
1792,
29918,
19202,
29918,
823,
29914,
29876,
29918,
1792,
29918,
19202,
29897,
13,
29934,
3960,
29943,
353,
313,
29876,
29918,
29888,
331,
2122,
29918,
17915,
29896,
1639,
29914,
29876,
29918,
1792,
29918,
29888,
331,
744,
6802,
29898,
29876,
29918,
29885,
2122,
29918,
17915,
29896,
1639,
29914,
29876,
29918,
1792,
29918,
19202,
29897,
13,
2158,
525,
29934,
10363,
29985,
29961,
29943,
29962,
353,
313,
891,
29965,
29985,
29961,
29883,
29892,
29943,
29962,
29989,
847,
891,
29965,
29985,
29961,
29943,
29962,
29989,
1723,
847,
313,
891,
29965,
29985,
29961,
29883,
29892,
29924,
29962,
29989,
847,
891,
29965,
29985,
29961,
29924,
29962,
29989,
1723,
29871,
353,
21313,
29901,
29892,
29881,
29913,
847,
12365,
29892,
29881,
1800,
847,
21313,
29901,
29892,
29881,
6822,
25641,
29892,
29881,
1800,
353,
12365,
7671,
29946,
29888,
29913,
4286,
4830,
29898,
302,
29918,
1792,
29918,
29888,
331,
744,
29918,
823,
29892,
29876,
29918,
1792,
29918,
29888,
331,
744,
29892,
29876,
29918,
1792,
29918,
19202,
29918,
823,
29892,
29876,
29918,
1792,
29918,
19202,
29892,
29934,
29934,
9207,
29871,
1723,
13,
2158,
525,
29934,
3960,
29985,
29961,
29943,
29962,
353,
313,
891,
29965,
29985,
29961,
29883,
29892,
29943,
29962,
29989,
847,
891,
29965,
29985,
29961,
29943,
29962,
29989,
1723,
847,
313,
891,
29965,
29985,
29961,
29883,
29892,
29924,
29962,
29989,
847,
891,
29965,
29985,
29961,
29924,
29962,
29989,
1723,
29871,
353,
21313,
29901,
29892,
29881,
29913,
847,
12365,
29892,
29881,
1800,
847,
21313,
29901,
29892,
29881,
6822,
25641,
29892,
29881,
1800,
353,
12365,
7671,
29946,
29888,
29913,
4286,
4830,
29898,
302,
29918,
29888,
331,
2122,
29918,
17915,
29896,
1639,
29892,
29876,
29918,
1792,
29918,
29888,
331,
744,
29892,
29876,
29918,
29885,
2122,
29918,
17915,
29896,
1639,
29892,
29876,
29918,
1792,
29918,
19202,
29892,
29934,
3960,
29943,
1723,
13,
13,
13,
29937,
2158,
525,
29925,
29898,
29884,
998,
29875,
29930,
1800,
353,
1939,
379,
555,
2873,
29915,
13,
29937,
29886,
29918,
29875,
29940,
29950,
29888,
353,
302,
29918,
29888,
331,
2122,
29918,
17915,
29896,
1639,
29918,
29876,
29882,
29914,
29876,
29918,
1792,
13,
29937,
29886,
29918,
29875,
29940,
29950,
29885,
353,
302,
29918,
29885,
2122,
29918,
17915,
29896,
1639,
29918,
29876,
29882,
29914,
29876,
29918,
1792,
13,
29937,
2158,
525,
29925,
29898,
29902,
29930,
29958,
29900,
29989,
29887,
29922,
29943,
29897,
847,
349,
29898,
29902,
29930,
29958,
29900,
29989,
29887,
29922,
29943,
29897,
353,
12365,
7671,
29946,
29888,
29913,
847,
12365,
7671,
29946,
29888,
29913,
353,
12365,
7671,
29946,
29888,
29913,
4286,
4830,
29898,
313,
29886,
29918,
29875,
29940,
29950,
29888,
29914,
29886,
29918,
29888,
29897,
1919,
313,
29886,
29918,
29875,
29940,
29950,
29885,
29914,
29886,
29918,
29885,
29897,
1919,
313,
29886,
29918,
29875,
29940,
29950,
29888,
29914,
29886,
29918,
29888,
6802,
29898,
29886,
29918,
29875,
29940,
29950,
29885,
29914,
29886,
29918,
29885,
29897,
1723,
13,
13,
13,
29937,
16012,
350,
11601,
13,
2176,
29933,
3433,
353,
3667,
29889,
29933,
3433,
1469,
29898,
482,
29918,
546,
29918,
26098,
29922,
8824,
29897,
13,
12690,
29918,
7323,
353,
938,
29898,
2176,
29933,
3433,
1839,
7323,
2785,
13359,
2083,
3101,
13,
12690,
29918,
7323,
29918,
29885,
2122,
353,
938,
29898,
2176,
29933,
3433,
1839,
29885,
2122,
13359,
2083,
3101,
13,
12690,
29918,
7323,
29918,
29888,
331,
2122,
353,
938,
29898,
2176,
29933,
3433,
1839,
29888,
331,
2122,
13359,
2083,
3101,
13,
13,
12690,
29918,
7323,
29918,
328,
499,
29879,
353,
938,
29898,
2176,
29933,
3433,
29889,
309,
542,
7503,
29892,
29946,
29901,
29906,
29896,
1822,
2083,
2141,
2083,
3101,
13,
13,
29937,
16012,
23873,
13,
29937,
2176,
29907,
8013,
353,
3667,
29889,
2176,
29907,
8013,
29898,
482,
29918,
546,
29918,
26098,
29922,
8824,
29897,
13,
13,
29937,
13,
29937,
6811,
497,
27098,
13,
29937,
13,
2158,
525,
5634,
6811,
497,
27098,
11474,
29915,
13,
2158,
376,
10358,
14170,
585,
4665,
29901,
12365,
29892,
29881,
29913,
1642,
4830,
29898,
12690,
29918,
7323,
29897,
13,
2158,
376,
10358,
14170,
585,
341,
2122,
29901,
12365,
29892,
29881,
29913,
1642,
4830,
29898,
12690,
29918,
7323,
29918,
29885,
2122,
29897,
13,
2158,
376,
10358,
14170,
585,
19361,
2122,
29901,
12365,
29892,
29881,
29913,
1642,
4830,
29898,
12690,
29918,
7323,
29918,
29888,
331,
2122,
29897,
13,
2158,
13,
13,
2158,
376,
29925,
1617,
517,
4665,
29901,
12365,
29892,
29881,
29913,
21313,
29901,
29889,
29906,
29995,
29913,
310,
3164,
14170,
585,
29897,
1642,
4830,
29898,
29876,
29918,
1792,
29892,
302,
29918,
1792,
29914,
12690,
29918,
7323,
29897,
13,
2158,
376,
29925,
1617,
517,
25269,
29901,
12365,
29892,
29881,
29913,
21313,
29901,
29889,
29906,
29995,
1800,
1642,
4830,
29898,
29876,
29918,
1792,
29918,
19202,
29892,
302,
29918,
1792,
29918,
19202,
29914,
29876,
29918,
1792,
29897,
13,
2158,
376,
29925,
1617,
517,
24473,
29901,
12365,
29892,
29881,
29913,
21313,
29901,
29889,
29906,
29995,
1800,
1642,
4830,
29898,
29876,
29918,
1792,
29918,
29888,
331,
744,
29892,
302,
29918,
1792,
29918,
29888,
331,
744,
29914,
29876,
29918,
1792,
29897,
13,
2158,
13,
13,
2158,
376,
29925,
1617,
517,
16157,
29879,
313,
18572,
29906,
29900,
29897,
12365,
29892,
29881,
29913,
1642,
4830,
29898,
29876,
29918,
1792,
29918,
328,
499,
29897,
13,
2158,
376,
8110,
802,
5883,
3174,
29901,
12365,
29892,
29881,
29913,
1642,
4830,
29898,
29876,
29918,
29875,
29897,
13,
2158,
376,
8110,
802,
5883,
3174,
9701,
297,
360,
4571,
29901,
12365,
29892,
29881,
29913,
1642,
4830,
29898,
29876,
29918,
29875,
29918,
1639,
29897,
13,
2158,
376,
29928,
582,
3174,
18747,
12272,
21144,
29901,
12365,
29892,
29881,
29913,
1642,
4830,
29898,
29876,
29918,
29874,
29897,
13,
2158,
376,
7967,
29899,
6406,
2132,
800,
29901,
12365,
29892,
29881,
29913,
1642,
4830,
29898,
29876,
29918,
823,
29897,
13,
2158,
376,
4074,
7387,
29901,
12365,
29892,
29881,
29913,
21313,
29901,
29889,
29906,
29995,
1800,
1642,
4830,
29898,
29876,
29918,
823,
29918,
1289,
29875,
29892,
302,
29918,
823,
29918,
1289,
29875,
29914,
29876,
29918,
823,
1723,
13,
2158,
376,
8110,
802,
360,
4571,
11000,
29901,
12365,
29892,
29881,
29913,
1642,
4830,
29898,
29876,
29918,
823,
29918,
1289,
29875,
29918,
13092,
29897,
13,
2158,
376,
8110,
802,
360,
4571,
11000,
313,
1333,
298,
555,
2873,
1125,
12365,
29892,
29881,
29913,
1642,
4830,
29898,
29876,
29918,
823,
29918,
1289,
29875,
29918,
13092,
29918,
29876,
29882,
29897,
13,
2158,
376,
11457,
10070,
411,
29871,
29906,
29974,
5883,
3174,
12272,
21144,
29901,
12365,
29892,
29881,
29913,
21313,
29901,
29889,
29906,
29995,
1800,
1642,
4830,
29898,
29876,
29918,
1792,
29918,
4141,
29906,
26179,
3174,
29892,
302,
29918,
1792,
29918,
4141,
29906,
26179,
3174,
29914,
29876,
29918,
1792,
29897,
13,
2158,
13,
13,
2158,
376,
11457,
10070,
411,
29871,
29896,
29974,
1302,
29899,
6406,
8306,
29901,
12365,
29892,
29881,
29913,
21313,
29901,
29889,
29906,
29995,
1800,
1642,
4830,
29898,
29876,
29918,
1792,
29918,
4141,
29896,
1111,
6406,
29892,
302,
29918,
1792,
29918,
4141,
29896,
1111,
6406,
29914,
29876,
29918,
1792,
29897,
13,
2158,
376,
29924,
744,
22069,
411,
29871,
29896,
29974,
1302,
29899,
6406,
8306,
29901,
12365,
29892,
29881,
1118,
21313,
29901,
29889,
29906,
29995,
1800,
1642,
4830,
29898,
29876,
29918,
1792,
29918,
19202,
29918,
823,
1919,
302,
29918,
1792,
29918,
19202,
29918,
823,
29914,
29876,
29918,
1792,
29918,
4141,
29896,
1111,
6406,
29897,
13,
2158,
376,
29943,
331,
744,
22069,
411,
29871,
29896,
29974,
1302,
29899,
6406,
8306,
29901,
12365,
29892,
29881,
1118,
21313,
29901,
29889,
29906,
29995,
1800,
1642,
4830,
29898,
29876,
29918,
1792,
29918,
29888,
331,
744,
29918,
823,
1919,
302,
29918,
1792,
29918,
29888,
331,
744,
29918,
823,
29914,
29876,
29918,
1792,
29918,
4141,
29896,
1111,
6406,
29897,
13,
2158,
29871,
13,
13,
2158,
376,
11457,
10070,
411,
29871,
29896,
29974,
360,
4571,
29901,
12365,
29892,
29881,
29913,
21313,
29901,
29889,
29906,
29995,
29913,
1588,
10268,
29892,
12365,
29889,
29906,
29995,
29913,
350,
3433,
29897,
1642,
4830,
29898,
29876,
29918,
1792,
29918,
823,
29918,
1289,
29875,
29892,
302,
29918,
1792,
29918,
823,
29918,
1289,
29875,
29914,
29876,
29918,
1792,
29892,
302,
29918,
1792,
29918,
823,
29918,
1289,
29875,
29914,
12690,
29918,
7323,
29897,
13,
2158,
376,
29924,
744,
22069,
411,
29871,
29896,
29974,
360,
4571,
29901,
12365,
29892,
29881,
29913,
21313,
29901,
29889,
29906,
29995,
1800,
1642,
4830,
29898,
29876,
29918,
29885,
2122,
29918,
17915,
29896,
1639,
29892,
302,
29918,
29885,
2122,
29918,
17915,
29896,
1639,
29914,
29876,
29918,
1792,
29918,
823,
29918,
1289,
29875,
29897,
13,
2158,
376,
29943,
331,
744,
22069,
411,
29871,
29896,
29974,
360,
4571,
29901,
12365,
29892,
29881,
29913,
21313,
29901,
29889,
29906,
29995,
1800,
1642,
4830,
29898,
29876,
29918,
29888,
331,
2122,
29918,
17915,
29896,
1639,
29892,
302,
29918,
29888,
331,
2122,
29918,
17915,
29896,
1639,
29914,
29876,
29918,
1792,
29918,
823,
29918,
1289,
29875,
29897,
13,
2158,
13,
13,
2158,
376,
3253,
499,
29879,
22069,
313,
29906,
29900,
28135,
411,
29871,
29896,
29974,
360,
4571,
29901,
12365,
29892,
29881,
29913,
21313,
29901,
29889,
29906,
29995,
29913,
1588,
10268,
2087,
499,
29879,
29892,
12365,
29889,
29906,
29995,
29913,
350,
3433,
2087,
499,
29879,
19248,
29901,
29889,
29906,
29995,
29913,
1588,
10268,
29892,
12365,
29889,
29906,
29995,
29913,
350,
3433,
29897,
1642,
4830,
29898,
29876,
29918,
1792,
29918,
328,
499,
29918,
823,
29918,
1289,
29875,
29892,
302,
29918,
1792,
29918,
328,
499,
29918,
823,
29918,
1289,
29875,
29914,
29876,
29918,
1792,
29918,
328,
499,
29892,
302,
29918,
1792,
29918,
328,
499,
29918,
823,
29918,
1289,
29875,
29914,
12690,
29918,
7323,
29918,
328,
499,
29879,
29892,
302,
29918,
1792,
29918,
328,
499,
29918,
823,
29918,
1289,
29875,
29914,
29876,
29918,
1792,
29892,
302,
29918,
1792,
29918,
328,
499,
29918,
823,
29918,
1289,
29875,
29914,
12690,
29918,
7323,
29897,
13,
2158,
376,
3253,
499,
22069,
313,
29906,
29900,
28135,
411,
29871,
29896,
29974,
14861,
29967,
1955,
360,
4571,
29901,
12365,
29892,
29881,
29913,
21313,
29901,
29889,
29906,
29995,
29913,
1588,
10268,
2087,
499,
29879,
29892,
12365,
29889,
29906,
29995,
29913,
350,
3433,
2087,
499,
29879,
19248,
29901,
29889,
29906,
29995,
29913,
1588,
10268,
29892,
12365,
29889,
29906,
29995,
29913,
350,
3433,
29897,
1642,
4830,
29898,
29876,
29918,
1792,
29918,
328,
499,
29918,
823,
29918,
1289,
29875,
29918,
21355,
29892,
302,
29918,
1792,
29918,
328,
499,
29918,
823,
29918,
1289,
29875,
29918,
21355,
29914,
29876,
29918,
1792,
29918,
328,
499,
29892,
302,
29918,
1792,
29918,
328,
499,
29918,
823,
29918,
1289,
29875,
29918,
21355,
29914,
12690,
29918,
7323,
29918,
328,
499,
29879,
29892,
302,
29918,
1792,
29918,
328,
499,
29918,
823,
29918,
1289,
29875,
29918,
21355,
29914,
29876,
29918,
1792,
29892,
302,
29918,
1792,
29918,
328,
499,
29918,
823,
29918,
1289,
29875,
29918,
21355,
29914,
12690,
29918,
7323,
29897,
13,
2158,
376,
29923,
25943,
368,
22069,
313,
29946,
29900,
28135,
411,
29871,
29896,
29974,
360,
4571,
29901,
12365,
29892,
29881,
29913,
21313,
29901,
29889,
29906,
29995,
29913,
310,
22069,
411,
360,
4571,
29892,
12365,
29889,
29906,
29995,
29913,
310,
29871,
29946,
29900,
29974,
22069,
29897,
1642,
4830,
29898,
29876,
29918,
1792,
29918,
823,
29918,
1289,
29875,
29918,
29946,
29900,
29886,
29892,
302,
29918,
1792,
29918,
823,
29918,
1289,
29875,
29918,
29946,
29900,
29886,
29914,
29876,
29918,
1792,
29918,
823,
29918,
1289,
29875,
29892,
302,
29918,
1792,
29918,
823,
29918,
1289,
29875,
29918,
29946,
29900,
29886,
29914,
29876,
29918,
1792,
29918,
29946,
29900,
29886,
29897,
13,
2158,
376,
29923,
25943,
368,
22069,
313,
29953,
29945,
28135,
411,
29871,
29896,
29974,
14861,
29967,
1955,
360,
4571,
29901,
12365,
29892,
29881,
29913,
21313,
29901,
29889,
29906,
29995,
29913,
310,
29871,
29953,
29945,
29974,
22069,
29897,
1642,
4830,
29898,
29876,
29918,
1792,
29918,
823,
29918,
1289,
29875,
29918,
21355,
29918,
29953,
29945,
29886,
29892,
302,
29918,
1792,
29918,
823,
29918,
1289,
29875,
29918,
21355,
29918,
29953,
29945,
29886,
29914,
29876,
29918,
1792,
29918,
29953,
29945,
29886,
29897,
13,
13,
13,
13,
29937,
13,
29937,
13151,
624,
1446,
313,
17991,
650,
29897,
13,
29937,
13,
13,
2158,
525,
29923,
29392,
313,
17991,
650,
16029,
13,
2176,
29923,
700,
353,
4489,
29884,
1839,
287,
1682,
362,
13359,
1767,
29918,
2798,
29879,
2141,
517,
29918,
2557,
580,
13,
2176,
29923,
700,
29889,
6605,
29918,
2248,
29898,
262,
6689,
29922,
5574,
29897,
13,
2176,
29923,
700,
1839,
22795,
29896,
2033,
353,
4489,
29923,
700,
1839,
287,
1682,
362,
2033,
847,
4489,
29923,
700,
1839,
287,
1682,
362,
13359,
2083,
580,
13,
2176,
29923,
700,
1839,
29883,
398,
2083,
29896,
2033,
353,
4489,
29923,
700,
1839,
22795,
29896,
13359,
29883,
398,
2083,
580,
13,
29937,
2176,
29923,
700,
353,
4489,
29923,
700,
29889,
309,
542,
7503,
29899,
29896,
29892,
17531,
13,
2176,
29923,
700,
1839,
22795,
29906,
2033,
353,
4489,
29923,
700,
1839,
287,
1682,
362,
2033,
847,
4489,
29923,
700,
29889,
309,
542,
7503,
29899,
29896,
29892,
29900,
1822,
2083,
580,
13,
2176,
29923,
700,
1839,
29883,
398,
2083,
29906,
2033,
353,
4489,
29923,
700,
1839,
22795,
29906,
13359,
29883,
398,
2083,
580,
13,
2158,
4489,
29923,
700,
29889,
517,
29918,
25694,
29898,
21587,
29922,
8824,
29897,
13,
2158,
4489,
29923,
700,
29889,
2083,
580,
13,
29937,
13,
29937,
13151,
22663,
313,
27215,
29871,
29906,
29945,
343,
29899,
1025,
29897,
29871,
13,
29937,
13,
13,
2158,
525,
29923,
29392,
313,
29958,
29906,
29945,
343,
430,
16029,
13,
2176,
29923,
700,
353,
4489,
29884,
29889,
2029,
29961,
4489,
29884,
1839,
482,
2033,
18572,
29906,
29945,
1919,
525,
287,
1682,
362,
13359,
1767,
29918,
2798,
29879,
2141,
517,
29918,
2557,
580,
13,
2176,
29923,
700,
29889,
6605,
29918,
2248,
29898,
262,
6689,
29922,
5574,
29897,
13,
2176,
29923,
700,
1839,
22795,
29896,
2033,
353,
4489,
29923,
700,
1839,
287,
1682,
362,
2033,
847,
4489,
29923,
700,
1839,
287,
1682,
362,
13359,
2083,
580,
13,
2176,
29923,
700,
1839,
29883,
398,
2083,
29896,
2033,
353,
4489,
29923,
700,
1839,
22795,
29896,
13359,
29883,
398,
2083,
580,
13,
29937,
2176,
29923,
700,
353,
4489,
29923,
700,
29889,
309,
542,
7503,
29899,
29896,
29892,
17531,
13,
2176,
29923,
700,
1839,
22795,
29906,
2033,
353,
4489,
29923,
700,
1839,
287,
1682,
362,
2033,
847,
4489,
29923,
700,
29889,
309,
542,
7503,
29899,
29896,
29892,
29900,
1822,
2083,
580,
13,
2176,
29923,
700,
1839,
29883,
398,
2083,
29906,
2033,
353,
4489,
29923,
700,
1839,
22795,
29906,
13359,
29883,
398,
2083,
580,
13,
2158,
4489,
29923,
700,
29889,
517,
29918,
25694,
29898,
21587,
29922,
8824,
29897,
13,
2158,
4489,
29923,
700,
29889,
2083,
580,
13,
13,
29937,
13,
29937,
16767,
313,
14084,
4121,
993,
5046,
4978,
29892,
3078,
901,
29897,
13,
29937,
13,
2158,
525,
22406,
313,
27691,
16029,
13,
2176,
22406,
353,
4489,
29884,
1839,
482,
29918,
2972,
13359,
1767,
29918,
2798,
29879,
2141,
517,
29918,
2557,
2141,
6605,
29918,
2248,
580,
13,
2176,
22406,
1839,
22795,
2033,
353,
4489,
22406,
1839,
482,
29918,
2972,
2033,
847,
4489,
22406,
1839,
482,
29918,
2972,
13359,
2083,
580,
13,
2176,
22406,
1839,
29883,
398,
2083,
2033,
353,
4489,
22406,
1839,
22795,
13359,
29883,
398,
2083,
580,
13,
2158,
4489,
22406,
13,
2158,
4489,
22406,
29889,
2083,
580,
13,
13,
29937,
13,
29937,
360,
4571,
639,
14621,
537,
13,
29937,
13,
2158,
525,
5634,
360,
4571,
639,
14621,
537,
11474,
29915,
13,
2176,
29875,
29918,
29879,
353,
4489,
29875,
29889,
27789,
877,
344,
369,
537,
2824,
16170,
3319,
29915,
1639,
22099,
2798,
3788,
333,
29918,
1792,
2396,
10518,
29889,
19204,
29889,
29876,
13092,
1800,
13,
2176,
29875,
29918,
29879,
29889,
1267,
420,
29898,
13099,
3790,
29915,
1639,
22099,
29876,
29918,
823,
29918,
1289,
29875,
3788,
333,
29918,
1792,
22099,
7193,
16675,
297,
6689,
29922,
5574,
29897,
396,
390,
1430,
25797,
1178,
29918,
375,
22223,
304,
4160,
13,
2176,
29875,
29918,
29879,
1839,
29875,
29918,
546,
2033,
353,
4489,
29875,
29918,
29879,
1839,
29876,
29918,
823,
29918,
1289,
29875,
2033,
847,
4489,
29875,
29918,
29879,
1839,
29876,
29918,
823,
29918,
1289,
29875,
13359,
2083,
580,
334,
29871,
29896,
29900,
29900,
13,
2176,
29875,
29918,
29879,
1839,
29884,
29918,
546,
29899,
558,
10268,
2033,
353,
4489,
29875,
29918,
29879,
1839,
7193,
2033,
847,
302,
29918,
1792,
29871,
334,
29871,
29896,
29900,
29900,
13,
2176,
29875,
29918,
29879,
1839,
29884,
29918,
546,
29899,
7323,
2033,
353,
4489,
29875,
29918,
29879,
1839,
7193,
2033,
847,
4272,
29918,
7323,
334,
29871,
29896,
29900,
29900,
13,
29937,
2176,
29875,
29918,
29879,
353,
4489,
29875,
29918,
29879,
29889,
1267,
420,
29898,
2248,
3790,
29915,
29940,
12413,
22099,
8516,
29915,
1800,
13,
13099,
353,
6024,
29876,
29918,
823,
29918,
1289,
29875,
3788,
29875,
29918,
546,
3788,
7193,
3788,
29884,
29918,
546,
29899,
558,
10268,
3788,
29884,
29918,
546,
29899,
7323,
2033,
13,
2158,
4489,
29875,
29918,
29879,
29889,
517,
29918,
25694,
29898,
13099,
29922,
13099,
29897,
13,
2158,
4489,
29875,
29918,
29879,
29889,
2083,
29898,
8990,
29922,
29900,
29897,
13,
2277,
13905,
2533,
4056,
6213,
322,
334,
13,
2176,
29875,
29918,
29879,
29918,
353,
4489,
29875,
29918,
29879,
13,
2176,
29875,
29918,
29879,
29918,
1839,
344,
369,
537,
29918,
29879,
2033,
353,
10518,
29889,
29907,
20440,
936,
18959,
29924,
1175,
272,
3788,
2111,
261,
403,
3788,
8140,
272,
3788,
8516,
3788,
8516,
7464,
10372,
29922,
5574,
29897,
13,
2176,
29875,
29918,
29879,
29918,
353,
4489,
29875,
29918,
29879,
5396,
27789,
877,
344,
369,
537,
29918,
29879,
2824,
16170,
29898,
2083,
29897,
13,
2158,
4489,
29875,
29918,
29879,
5396,
517,
29918,
25694,
29898,
13099,
29922,
13099,
29897,
13,
2277,
13905,
871,
363,
16157,
4665,
13,
2176,
5871,
29918,
29879,
353,
4489,
5871,
29889,
2029,
29961,
313,
2176,
5871,
1839,
482,
2033,
18572,
29906,
29900,
511,
584,
29871,
1822,
27789,
877,
344,
369,
537,
2824,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
1800,
13,
2176,
5871,
29918,
29879,
29889,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
7193,
16675,
297,
6689,
29922,
5574,
29897,
396,
390,
1430,
25797,
1178,
29918,
375,
22223,
304,
4160,
13,
2176,
5871,
29918,
29879,
1839,
29884,
29918,
546,
29899,
558,
10268,
29899,
328,
499,
2033,
353,
4489,
5871,
29918,
29879,
1839,
7193,
2033,
847,
302,
29918,
1792,
29918,
328,
499,
29871,
334,
29871,
29896,
29900,
29900,
13,
2158,
4489,
5871,
29918,
29879,
29889,
517,
29918,
25694,
580,
13,
29937,
2158,
4489,
5871,
29918,
29879,
29889,
2813,
580,
13,
2176,
5871,
29918,
29879,
29918,
353,
4489,
5871,
29918,
29879,
13,
2176,
5871,
29918,
29879,
29918,
1839,
344,
369,
537,
29918,
29879,
2033,
353,
10518,
29889,
29907,
20440,
936,
18959,
29924,
1175,
272,
3788,
2111,
261,
403,
3788,
8140,
272,
3788,
8516,
3788,
8516,
7464,
10372,
29922,
5574,
29897,
13,
2176,
5871,
29918,
29879,
29918,
353,
4489,
5871,
29918,
29879,
5396,
27789,
877,
344,
369,
537,
29918,
29879,
2824,
16170,
29898,
2083,
29897,
13,
2158,
4489,
5871,
29918,
29879,
5396,
517,
29918,
25694,
580,
13,
13,
2277,
13905,
2533,
4056,
11019,
29899,
2111,
261,
403,
322,
3382,
261,
403,
29899,
8140,
272,
13,
2176,
29875,
29918,
353,
4489,
29875,
29961,
1839,
344,
369,
537,
3788,
1639,
3788,
333,
29918,
1792,
2033,
1822,
8552,
580,
13,
2176,
29875,
29918,
1839,
344,
369,
537,
2033,
353,
4489,
29875,
29918,
1839,
344,
369,
537,
13359,
4117,
29889,
1202,
29918,
20683,
18959,
29924,
1175,
272,
2111,
261,
403,
3788,
2111,
261,
403,
8140,
272,
11287,
13,
2176,
29875,
29918,
655,
29926,
1545,
353,
4489,
29875,
5396,
8552,
580,
13,
2176,
29875,
29918,
1545,
1195,
353,
4489,
29875,
5396,
8552,
580,
13,
2176,
29875,
29918,
655,
29926,
1545,
29889,
2029,
29961,
313,
2176,
29875,
29918,
655,
29926,
1545,
1839,
344,
369,
537,
13359,
275,
262,
18959,
29924,
1175,
272,
3788,
2111,
261,
403,
25901,
1919,
525,
344,
369,
537,
2033,
353,
525,
29924,
1175,
272,
2111,
261,
403,
29915,
13,
2176,
29875,
29918,
1545,
1195,
29889,
2029,
29961,
313,
2176,
29875,
29918,
1545,
1195,
1839,
344,
369,
537,
13359,
275,
262,
18959,
2111,
261,
403,
3788,
8140,
272,
25901,
1919,
525,
344,
369,
537,
2033,
353,
525,
2111,
261,
403,
8140,
272,
29915,
13,
2176,
29875,
29918,
655,
29926,
1545,
29918,
29879,
353,
4489,
29875,
29918,
655,
29926,
1545,
29889,
27789,
877,
344,
369,
537,
2824,
16170,
3319,
29915,
1639,
22099,
2798,
3788,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
1800,
13,
2176,
29875,
29918,
1545,
1195,
29918,
29879,
353,
4489,
29875,
29918,
1545,
1195,
29889,
27789,
877,
344,
369,
537,
2824,
16170,
3319,
29915,
1639,
22099,
2798,
3788,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
1800,
13,
2176,
29875,
29918,
655,
29926,
1545,
29918,
29879,
29889,
1267,
420,
29898,
13099,
3790,
29915,
1639,
22099,
29876,
29918,
823,
29918,
1289,
29875,
3788,
333,
29918,
1792,
22099,
7193,
16675,
297,
6689,
29922,
5574,
29897,
396,
390,
1430,
25797,
1178,
29918,
375,
22223,
304,
4160,
13,
2176,
29875,
29918,
1545,
1195,
29918,
29879,
29889,
1267,
420,
29898,
13099,
3790,
29915,
1639,
22099,
29876,
29918,
823,
29918,
1289,
29875,
3788,
333,
29918,
1792,
22099,
7193,
16675,
297,
6689,
29922,
5574,
29897,
396,
390,
1430,
25797,
1178,
29918,
375,
22223,
304,
4160,
13,
2176,
29875,
29918,
655,
29926,
1545,
29918,
29879,
1839,
29875,
29918,
546,
2033,
353,
4489,
29875,
29918,
655,
29926,
1545,
29918,
29879,
1839,
29876,
29918,
823,
29918,
1289,
29875,
2033,
847,
4489,
29875,
29918,
655,
29926,
1545,
29918,
29879,
1839,
29876,
29918,
823,
29918,
1289,
29875,
13359,
2083,
580,
13,
2176,
29875,
29918,
655,
29926,
1545,
29918,
29879,
1839,
29884,
29918,
546,
29899,
558,
10268,
2033,
353,
4489,
29875,
29918,
655,
29926,
1545,
29918,
29879,
1839,
7193,
2033,
847,
302,
29918,
1792,
334,
29871,
29896,
29900,
29900,
13,
2176,
29875,
29918,
655,
29926,
1545,
29918,
29879,
1839,
29884,
29918,
546,
29899,
7323,
2033,
353,
4489,
29875,
29918,
655,
29926,
1545,
29918,
29879,
1839,
7193,
2033,
847,
4272,
29918,
7323,
334,
29871,
29896,
29900,
29900,
13,
2176,
29875,
29918,
1545,
1195,
29918,
29879,
1839,
29875,
29918,
546,
2033,
353,
4489,
29875,
29918,
1545,
1195,
29918,
29879,
1839,
29876,
29918,
823,
29918,
1289,
29875,
2033,
847,
4489,
29875,
29918,
1545,
1195,
29918,
29879,
1839,
29876,
29918,
823,
29918,
1289,
29875,
13359,
2083,
580,
13,
2176,
29875,
29918,
1545,
1195,
29918,
29879,
1839,
29884,
29918,
546,
29899,
558,
10268,
2033,
353,
4489,
29875,
29918,
1545,
1195,
29918,
29879,
1839,
7193,
2033,
847,
302,
29918,
1792,
334,
29871,
29896,
29900,
29900,
13,
2176,
29875,
29918,
1545,
1195,
29918,
29879,
1839,
29884,
29918,
546,
29899,
7323,
2033,
353,
4489,
29875,
29918,
1545,
1195,
29918,
29879,
1839,
7193,
2033,
847,
4272,
29918,
7323,
334,
29871,
29896,
29900,
29900,
13,
2158,
4489,
29875,
29918,
655,
29926,
1545,
29918,
29879,
29889,
517,
29918,
25694,
29898,
13099,
29922,
13099,
29897,
13,
2158,
4489,
29875,
29918,
1545,
1195,
29918,
29879,
29889,
517,
29918,
25694,
29898,
13099,
29922,
13099,
29897,
13,
13,
2277,
13905,
2533,
4056,
11019,
29899,
2111,
261,
403,
322,
3382,
261,
403,
29899,
8140,
272,
871,
363,
11033,
8647,
29879,
13,
2176,
29875,
29918,
353,
4489,
5871,
29889,
2029,
29961,
313,
2176,
5871,
1839,
482,
2033,
18572,
29906,
29900,
29897,
1919,
6024,
344,
369,
537,
3788,
333,
29918,
1792,
2033,
1822,
8552,
580,
13,
2176,
29875,
29918,
1839,
344,
369,
537,
2033,
353,
4489,
29875,
29918,
1839,
344,
369,
537,
13359,
4117,
29889,
1202,
29918,
20683,
18959,
29924,
1175,
272,
2111,
261,
403,
3788,
2111,
261,
403,
8140,
272,
11287,
13,
2176,
29875,
29918,
655,
29926,
1545,
353,
4489,
29875,
5396,
8552,
580,
13,
2176,
29875,
29918,
1545,
1195,
353,
4489,
29875,
5396,
8552,
580,
13,
2176,
29875,
29918,
655,
29926,
1545,
29889,
2029,
29961,
313,
2176,
29875,
29918,
655,
29926,
1545,
1839,
344,
369,
537,
13359,
275,
262,
18959,
29924,
1175,
272,
3788,
2111,
261,
403,
25901,
1919,
525,
344,
369,
537,
2033,
353,
525,
29924,
1175,
272,
2111,
261,
403,
29915,
13,
2176,
29875,
29918,
1545,
1195,
29889,
2029,
29961,
313,
2176,
29875,
29918,
1545,
1195,
1839,
344,
369,
537,
13359,
275,
262,
18959,
2111,
261,
403,
3788,
8140,
272,
25901,
1919,
525,
344,
369,
537,
2033,
353,
525,
2111,
261,
403,
8140,
272,
29915,
13,
2176,
29875,
29918,
655,
29926,
1545,
29918,
29879,
353,
4489,
29875,
29918,
655,
29926,
1545,
29889,
27789,
877,
344,
369,
537,
2824,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
1800,
13,
2176,
29875,
29918,
1545,
1195,
29918,
29879,
353,
4489,
29875,
29918,
1545,
1195,
29889,
27789,
877,
344,
369,
537,
2824,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
1800,
13,
2176,
29875,
29918,
655,
29926,
1545,
29918,
29879,
29889,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
7193,
16675,
297,
6689,
29922,
5574,
29897,
13,
2176,
29875,
29918,
1545,
1195,
29918,
29879,
29889,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
7193,
16675,
297,
6689,
29922,
5574,
29897,
13,
2176,
29875,
29918,
655,
29926,
1545,
29918,
29879,
1839,
29884,
29918,
546,
29899,
558,
10268,
29899,
328,
499,
2033,
353,
4489,
29875,
29918,
655,
29926,
1545,
29918,
29879,
1839,
7193,
2033,
847,
302,
29918,
1792,
29918,
328,
499,
334,
29871,
29896,
29900,
29900,
13,
2176,
29875,
29918,
1545,
1195,
29918,
29879,
1839,
29884,
29918,
546,
29899,
558,
10268,
29899,
328,
499,
2033,
353,
4489,
29875,
29918,
1545,
1195,
29918,
29879,
1839,
7193,
2033,
847,
302,
29918,
1792,
29918,
328,
499,
334,
29871,
29896,
29900,
29900,
13,
2158,
4489,
29875,
29918,
655,
29926,
1545,
29918,
29879,
29889,
517,
29918,
25694,
580,
13,
2158,
4489,
29875,
29918,
1545,
1195,
29918,
29879,
29889,
517,
29918,
25694,
580,
13,
13,
13,
29937,
13,
29937,
360,
4571,
639,
402,
1581,
13,
29937,
13,
2158,
525,
5634,
360,
4571,
639,
402,
1581,
11474,
29915,
13,
2176,
29875,
29918,
29887,
353,
4489,
5871,
29889,
27789,
877,
26098,
2824,
16170,
3319,
29915,
1639,
22099,
2798,
3788,
333,
29918,
1792,
2396,
10518,
29889,
19204,
29889,
29876,
13092,
1800,
13,
2176,
29875,
29918,
29887,
29889,
1267,
420,
29898,
13099,
3790,
29915,
1639,
22099,
29876,
29918,
823,
29918,
1289,
29875,
3788,
333,
29918,
1792,
22099,
7193,
16675,
297,
6689,
29922,
5574,
29897,
396,
390,
1430,
25797,
1178,
29918,
375,
22223,
304,
4160,
13,
2176,
29875,
29918,
29887,
1839,
29875,
29918,
546,
2033,
353,
4489,
29875,
29918,
29887,
1839,
29876,
29918,
823,
29918,
1289,
29875,
2033,
847,
4489,
29875,
29918,
29887,
1839,
29876,
29918,
823,
29918,
1289,
29875,
13359,
2083,
580,
13,
2176,
29875,
29918,
29887,
1839,
29884,
29918,
546,
29899,
558,
10268,
2033,
353,
4489,
29875,
29918,
29887,
1839,
7193,
2033,
847,
302,
29918,
1792,
334,
29871,
29896,
29900,
29900,
13,
2176,
29875,
29918,
29887,
1839,
29884,
29918,
546,
29899,
7323,
2033,
353,
4489,
29875,
29918,
29887,
1839,
7193,
2033,
847,
4272,
29918,
7323,
334,
29871,
29896,
29900,
29900,
13,
13099,
353,
6024,
29876,
29918,
823,
29918,
1289,
29875,
3788,
29875,
29918,
546,
3788,
7193,
3788,
29884,
29918,
546,
29899,
558,
10268,
3788,
29884,
29918,
546,
29899,
7323,
2033,
13,
2158,
4489,
29875,
29918,
29887,
29889,
517,
29918,
25694,
29898,
13099,
29922,
13099,
29897,
13,
2158,
4489,
29875,
29918,
29887,
29889,
2083,
29898,
8990,
29922,
29900,
29897,
13,
13,
29937,
13,
29937,
360,
4571,
639,
16767,
13,
29937,
13,
2158,
525,
5634,
360,
4571,
639,
16767,
11474,
29915,
13,
2176,
29884,
29918,
29891,
353,
4489,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
29876,
29918,
823,
29918,
1289,
29875,
2033,
29958,
29900,
29897,
1919,
584,
29871,
1822,
12071,
29918,
2248,
2141,
27789,
877,
482,
29918,
2972,
2824,
16170,
3319,
29915,
29876,
29918,
823,
29918,
1289,
29875,
22099,
2083,
3788,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
1800,
13,
2176,
29884,
29918,
29891,
29889,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29876,
29918,
29884,
29918,
1289,
29875,
16675,
297,
6689,
29922,
5574,
29897,
396,
390,
1430,
25797,
1178,
29918,
375,
22223,
304,
4160,
13,
13,
2176,
29884,
29918,
29891,
1839,
29875,
29918,
546,
2033,
353,
4489,
29884,
29918,
29891,
1839,
29876,
29918,
823,
29918,
1289,
29875,
2033,
847,
4489,
29884,
29918,
29891,
1839,
29876,
29918,
823,
29918,
1289,
29875,
13359,
2083,
580,
13,
2176,
29884,
29918,
29891,
1839,
29884,
29918,
546,
29899,
558,
10268,
2033,
353,
4489,
29884,
29918,
29891,
1839,
29876,
29918,
29884,
29918,
1289,
29875,
2033,
847,
302,
29918,
1792,
334,
29871,
29896,
29900,
29900,
13,
2176,
29884,
29918,
29891,
1839,
29884,
29918,
546,
29899,
12690,
2033,
353,
4489,
29884,
29918,
29891,
1839,
29876,
29918,
29884,
29918,
1289,
29875,
2033,
847,
4272,
29918,
7323,
334,
29871,
29896,
29900,
29900,
13,
2158,
4489,
29884,
29918,
29891,
29961,
1839,
29876,
29918,
823,
29918,
1289,
29875,
3788,
29875,
29918,
546,
3788,
29876,
29918,
29884,
29918,
1289,
29875,
3788,
29884,
29918,
546,
29899,
558,
10268,
3788,
29884,
29918,
546,
29899,
12690,
2033,
1822,
517,
29918,
25694,
29898,
21587,
29922,
8824,
29897,
13,
2158,
4489,
29884,
29918,
29891,
29889,
2083,
29898,
8990,
29922,
29900,
29897,
13,
29937,
13905,
2533,
4056,
6213,
322,
334,
13,
2176,
29884,
29918,
29891,
353,
4489,
29884,
29918,
29891,
29889,
1267,
420,
29898,
2248,
3790,
29915,
29930,
22099,
29940,
12413,
29915,
7690,
1267,
420,
29898,
2248,
3790,
29915,
29940,
12413,
22099,
29876,
29914,
29874,
29915,
1800,
13,
2158,
4489,
29884,
29918,
29891,
29889,
27789,
29898,
2176,
29884,
29918,
29891,
29889,
2248,
467,
16170,
29898,
2083,
9601,
1839,
29876,
29918,
823,
29918,
1289,
29875,
3788,
29875,
29918,
546,
3788,
29876,
29918,
29884,
29918,
1289,
29875,
3788,
29884,
29918,
546,
29899,
558,
10268,
3788,
29884,
29918,
546,
29899,
12690,
2033,
1822,
517,
29918,
25694,
29898,
21587,
29922,
8824,
29897,
13,
13,
13,
29937,
13,
29937,
390,
10363,
29914,
29934,
3960,
639,
402,
1581,
13,
29937,
13,
15926,
29889,
842,
29918,
3385,
877,
4990,
29889,
17990,
2459,
742,
29871,
29946,
29897,
13,
15926,
29889,
842,
29918,
3385,
877,
4990,
29889,
7411,
29918,
4830,
742,
14013,
921,
29901,
14210,
29889,
29946,
29888,
29915,
1273,
921,
29897,
13,
13,
2158,
525,
5634,
390,
10363,
29914,
29934,
3960,
639,
402,
1581,
11474,
29915,
13,
2176,
29934,
29918,
29887,
353,
10518,
29889,
17685,
4197,
13,
12,
2176,
29884,
29889,
12071,
29918,
2248,
2141,
27789,
877,
26098,
2824,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
7690,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29884,
29915,
9594,
13,
12,
2176,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
29876,
29918,
29875,
2033,
18572,
29906,
29897,
1919,
584,
1822,
12071,
29918,
2248,
2141,
27789,
877,
26098,
742,
2656,
29922,
8824,
467,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
7690,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29884,
998,
29876,
29906,
10162,
9594,
13,
12,
2176,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
29876,
29918,
823,
2033,
29958,
29900,
29897,
1919,
584,
1822,
12071,
29918,
2248,
2141,
27789,
877,
26098,
742,
2656,
29922,
8824,
467,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
7690,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29884,
998,
29883,
10162,
9594,
13,
12,
2176,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
29876,
29918,
823,
29918,
1289,
29875,
2033,
29958,
29900,
29897,
1919,
584,
1822,
12071,
29918,
2248,
2141,
27789,
877,
26098,
742,
2656,
29922,
8824,
467,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
7690,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29884,
998,
29875,
10162,
1800,
13,
12,
1402,
9685,
29922,
29896,
29897,
13,
2176,
29934,
29918,
29887,
29889,
517,
29918,
7638,
877,
7638,
29914,
26098,
29889,
7638,
742,
8025,
2433,
9420,
29899,
29947,
1495,
13,
2176,
29934,
29918,
29887,
1839,
29934,
10363,
998,
29943,
29913,
2033,
353,
313,
2176,
29934,
29918,
29887,
1839,
29884,
998,
29883,
29913,
2033,
847,
4489,
29934,
29918,
29887,
1839,
29884,
11287,
847,
313,
2176,
29934,
29918,
29887,
29889,
2029,
1839,
29924,
744,
3788,
29884,
998,
29883,
29913,
2033,
847,
4489,
29934,
29918,
29887,
29889,
2029,
1839,
29924,
744,
3788,
29884,
11287,
13,
2176,
29934,
29918,
29887,
1839,
29934,
3960,
998,
29943,
29913,
2033,
353,
313,
2176,
29934,
29918,
29887,
1839,
29884,
998,
29875,
29913,
2033,
847,
4489,
29934,
29918,
29887,
1839,
29884,
11287,
847,
313,
2176,
29934,
29918,
29887,
29889,
2029,
1839,
29924,
744,
3788,
29884,
998,
29875,
29913,
2033,
847,
4489,
29934,
29918,
29887,
29889,
2029,
1839,
29924,
744,
3788,
29884,
11287,
13,
2158,
4489,
29934,
29918,
29887,
29889,
517,
29918,
25694,
29898,
21587,
29922,
8824,
29897,
13,
13,
13,
29937,
13,
29937,
390,
10363,
29914,
29934,
3960,
639,
14621,
537,
322,
402,
1581,
13,
29937,
13,
2158,
525,
5634,
390,
10363,
29914,
29934,
3960,
639,
14621,
537,
669,
402,
1581,
11474,
29915,
13,
2176,
29934,
29918,
3174,
353,
4489,
5871,
29889,
27789,
18959,
26098,
3788,
344,
369,
537,
2033,
467,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
7690,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29884,
29915,
1800,
13,
2176,
29934,
29918,
3174,
353,
4489,
29934,
29918,
3174,
29889,
348,
1429,
29898,
5563,
29922,
29900,
29897,
13,
2176,
29934,
29918,
3174,
29889,
13099,
353,
6024,
29995,
29879,
998,
29875,
24163,
29879,
3227,
29879,
10162,
1273,
313,
29875,
29892,
29926,
29961,
29900,
2314,
363,
474,
29892,
29926,
297,
4489,
29934,
29918,
3174,
29889,
13099,
29889,
5975,
29962,
13,
2176,
29934,
29918,
3174,
1839,
29934,
3960,
998,
29943,
3227,
29879,
29913,
2033,
353,
313,
2176,
29934,
29918,
3174,
1839,
29884,
998,
29875,
29892,
29943,
3227,
29879,
29913,
2033,
847,
302,
29918,
1792,
29918,
29888,
331,
744,
29897,
847,
313,
4489,
29934,
29918,
3174,
1839,
29884,
998,
29875,
29892,
29924,
3227,
29879,
29913,
2033,
847,
302,
29918,
1792,
29918,
19202,
29897,
13,
2158,
4489,
29934,
29918,
3174,
29889,
517,
29918,
25694,
29898,
21587,
29922,
8824,
29897,
13,
13,
29937,
13,
29937,
390,
10363,
29914,
29934,
3960,
639,
16767,
13,
29937,
13,
2158,
525,
5634,
390,
10363,
29914,
29934,
3960,
639,
16767,
11474,
29915,
13,
2176,
29934,
29918,
29891,
353,
10518,
29889,
17685,
4197,
13,
12,
2176,
29884,
29889,
12071,
29918,
2248,
2141,
27789,
877,
482,
29918,
2972,
2824,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
7690,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29884,
29915,
9594,
13,
12,
2176,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
29876,
29918,
29875,
2033,
18572,
29906,
29897,
1919,
584,
1822,
12071,
29918,
2248,
2141,
27789,
877,
482,
29918,
2972,
742,
2656,
29922,
8824,
467,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
7690,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29884,
998,
29876,
29906,
10162,
9594,
13,
12,
2176,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
29876,
29918,
823,
2033,
29958,
29900,
29897,
1919,
584,
1822,
12071,
29918,
2248,
2141,
27789,
877,
482,
29918,
2972,
742,
2656,
29922,
8824,
467,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
7690,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29884,
998,
29883,
10162,
9594,
13,
12,
2176,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
29876,
29918,
823,
29918,
1289,
29875,
2033,
29958,
29900,
29897,
1919,
584,
1822,
12071,
29918,
2248,
2141,
27789,
877,
482,
29918,
2972,
742,
2656,
29922,
8824,
467,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
7690,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29884,
998,
29875,
10162,
1800,
13,
12,
1402,
9685,
29922,
29896,
29897,
13,
13,
29937,
8561,
13899,
6137,
313,
1168,
29883,
2579,
1218,
12770,
1819,
29897,
13,
2176,
29900,
29900,
29918,
29947,
29929,
353,
4489,
29934,
29918,
29891,
29889,
309,
542,
29961,
29871,
29900,
29901,
29896,
29947,
29892,
29871,
29900,
29901,
29946,
4514,
13,
2176,
29900,
29900,
29918,
29947,
29929,
29889,
2248,
353,
4489,
29900,
29900,
29918,
29947,
29929,
29889,
2248,
29889,
1202,
29918,
20683,
18959,
29929,
29900,
29974,
11287,
13,
2176,
29929,
29900,
29918,
572,
353,
4489,
29934,
29918,
29891,
29889,
309,
542,
29961,
29871,
29896,
29947,
29901,
1919,
29871,
29900,
29901,
29946,
29871,
1822,
2083,
29898,
8990,
29922,
29900,
467,
517,
29918,
2557,
29898,
978,
2433,
29929,
29900,
29974,
2824,
29911,
13,
2176,
29934,
29879,
29918,
29891,
353,
10518,
29889,
17685,
4197,
2176,
29900,
29900,
29918,
29947,
29929,
29892,
4489,
29929,
29900,
29918,
572,
1402,
9685,
29922,
29900,
29897,
13,
13,
2176,
29934,
29918,
29891,
29889,
517,
29918,
7638,
877,
7638,
29914,
482,
29889,
7638,
742,
8025,
2433,
9420,
29899,
29947,
1495,
13,
2176,
29934,
29879,
29918,
29891,
1839,
10363,
998,
29891,
29913,
2033,
353,
4489,
29934,
29879,
29918,
29891,
1839,
29884,
998,
29883,
29913,
2033,
847,
4489,
29934,
29879,
29918,
29891,
1839,
29884,
998,
29876,
29906,
29913,
2033,
13,
2176,
29934,
29879,
29918,
29891,
1839,
3960,
998,
29891,
29913,
2033,
353,
4489,
29934,
29879,
29918,
29891,
1839,
29884,
998,
29875,
29913,
2033,
847,
4489,
29934,
29879,
29918,
29891,
1839,
29884,
998,
29883,
29913,
2033,
13,
2158,
4489,
29934,
29879,
29918,
29891,
29889,
517,
29918,
25694,
29898,
21587,
29922,
8824,
29897,
13,
13,
29937,
2176,
29934,
29879,
29918,
29891,
29889,
517,
29918,
7638,
877,
7638,
29914,
482,
29918,
12759,
29889,
7638,
742,
8025,
2433,
9420,
29899,
29947,
1495,
13,
13,
13,
29937,
13,
29937,
390,
10363,
29914,
29934,
3960,
639,
16767,
322,
402,
1581,
13,
29937,
13,
2158,
525,
5634,
390,
10363,
29914,
29934,
3960,
639,
16767,
322,
402,
1581,
11474,
29915,
13,
2176,
29934,
29918,
1927,
29918,
29884,
353,
4489,
29884,
29889,
12071,
29918,
2248,
2141,
27789,
18959,
26098,
3788,
482,
29918,
2972,
7464,
2656,
29922,
8824,
467,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
7690,
579,
668,
29898,
9302,
29889,
524,
29953,
29946,
29897,
13,
2176,
29934,
29918,
1927,
29918,
29884,
29889,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29884,
16675,
297,
6689,
29922,
5574,
29897,
13,
2176,
29934,
29918,
1927,
29918,
29876,
353,
4489,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
29876,
29918,
29875,
2033,
18572,
29906,
29897,
1919,
584,
1822,
12071,
29918,
2248,
2141,
27789,
18959,
26098,
3788,
482,
29918,
2972,
7464,
2656,
29922,
8824,
467,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
7690,
579,
668,
29898,
9302,
29889,
524,
29953,
29946,
29897,
13,
2176,
29934,
29918,
1927,
29918,
29876,
29889,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29884,
998,
29876,
29906,
10162,
1118,
297,
6689,
29922,
5574,
29897,
13,
2176,
29934,
29918,
1927,
29918,
29883,
353,
4489,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
29876,
29918,
823,
2033,
29958,
29900,
29897,
1919,
584,
1822,
12071,
29918,
2248,
2141,
27789,
18959,
26098,
3788,
482,
29918,
2972,
7464,
2656,
29922,
8824,
467,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
7690,
579,
668,
29898,
9302,
29889,
524,
29953,
29946,
29897,
13,
2176,
29934,
29918,
1927,
29918,
29883,
29889,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29884,
998,
29883,
10162,
1118,
297,
6689,
29922,
5574,
29897,
13,
2176,
29934,
29918,
1927,
29918,
29875,
353,
4489,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
29876,
29918,
823,
29918,
1289,
29875,
2033,
18572,
29896,
29897,
1919,
584,
1822,
12071,
29918,
2248,
2141,
27789,
18959,
26098,
3788,
482,
29918,
2972,
7464,
2656,
29922,
8824,
467,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
7690,
579,
668,
29898,
9302,
29889,
524,
29953,
29946,
29897,
13,
2176,
29934,
29918,
1927,
29918,
29875,
29889,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29884,
998,
29875,
10162,
1118,
297,
6689,
29922,
5574,
29897,
13,
13,
1454,
313,
26098,
29892,
29881,
615,
1526,
29918,
29884,
511,
313,
3383,
29881,
615,
1526,
29918,
29876,
511,
313,
3383,
270,
615,
1526,
29918,
29883,
511,
313,
3383,
29881,
615,
1526,
29918,
29875,
29897,
297,
14319,
29898,
2176,
29934,
29918,
1927,
29918,
29884,
29889,
27789,
29898,
5563,
29922,
29900,
511,
4489,
29934,
29918,
1927,
29918,
29876,
29889,
27789,
29898,
5563,
29922,
29900,
511,
4489,
29934,
29918,
1927,
29918,
29883,
29889,
27789,
29898,
5563,
29922,
29900,
511,
4489,
29934,
29918,
1927,
29918,
29875,
29889,
27789,
29898,
5563,
29922,
29900,
22164,
13,
12,
2158,
23346,
13,
12,
2176,
29934,
29918,
1927,
353,
10518,
29889,
17685,
4197,
29881,
615,
1526,
29918,
29884,
29892,
29881,
615,
1526,
29918,
29876,
29892,
29881,
615,
1526,
29918,
29883,
29892,
29881,
615,
1526,
29918,
29875,
1402,
9685,
29922,
29896,
29897,
13,
12,
2176,
29934,
29918,
1927,
29889,
2248,
353,
4489,
29934,
29918,
1927,
29889,
2248,
29889,
26419,
552,
955,
29898,
5563,
29922,
29900,
29897,
13,
13,
12,
29937,
8561,
13899,
6137,
313,
1168,
29883,
2579,
1218,
12770,
1819,
29897,
13,
12,
2176,
29900,
29900,
29918,
29947,
29929,
353,
4489,
29934,
29918,
1927,
29889,
309,
542,
29961,
29871,
29900,
29901,
29896,
29947,
29892,
29871,
29900,
29901,
29946,
4514,
13,
12,
2176,
29929,
29900,
29918,
572,
353,
4489,
29934,
29918,
1927,
29889,
309,
542,
29961,
29871,
29896,
29947,
29901,
1919,
29871,
29900,
29901,
29946,
29871,
1822,
2083,
29898,
8990,
29922,
29900,
467,
517,
29918,
2557,
29898,
978,
2433,
29929,
29900,
29974,
2824,
29911,
13,
12,
2176,
29934,
29879,
29918,
1927,
353,
10518,
29889,
17685,
4197,
2176,
29900,
29900,
29918,
29947,
29929,
29892,
4489,
29929,
29900,
29918,
572,
1402,
9685,
29922,
29900,
29897,
13,
12,
13,
12,
2176,
29934,
29918,
1927,
29889,
517,
29918,
7638,
877,
7638,
29914,
482,
29918,
29995,
29879,
29889,
7638,
29915,
1273,
313,
26098,
29889,
13609,
25739,
8025,
2433,
9420,
29899,
29947,
1495,
13,
12,
2176,
29934,
29879,
29918,
1927,
1839,
10363,
998,
29891,
29913,
2033,
353,
4489,
29934,
29879,
29918,
1927,
1839,
29884,
998,
29883,
29913,
2033,
847,
4489,
29934,
29879,
29918,
1927,
1839,
29884,
998,
29876,
29906,
29913,
2033,
13,
12,
2176,
29934,
29879,
29918,
1927,
1839,
3960,
998,
29891,
29913,
2033,
353,
4489,
29934,
29879,
29918,
1927,
1839,
29884,
998,
29875,
29913,
2033,
847,
4489,
29934,
29879,
29918,
1927,
1839,
29884,
998,
29883,
29913,
2033,
13,
12,
2158,
4489,
29934,
29879,
29918,
1927,
29889,
517,
29918,
25694,
29898,
21587,
29922,
8824,
29897,
13,
13,
29937,
13070,
936,
4321,
341,
2122,
322,
19361,
2122,
4978,
639,
5046,
526,
1422,
13,
1481,
29918,
1927,
29918,
29885,
353,
4489,
29934,
29918,
1927,
29918,
29875,
29889,
2029,
29961,
22780,
1839,
29924,
744,
742,
17531,
1919,
525,
29884,
998,
29875,
10162,
1822,
5975,
13,
1481,
29918,
1927,
29918,
29888,
353,
4489,
29934,
29918,
1927,
29918,
29875,
29889,
2029,
29961,
22780,
1839,
29943,
331,
744,
742,
17531,
1919,
525,
29884,
998,
29875,
10162,
1822,
5975,
13,
29873,
6112,
29892,
282,
1767,
353,
22663,
29889,
305,
275,
4718,
29898,
1481,
29918,
1927,
29918,
29888,
29892,
285,
29918,
4548,
29922,
1481,
29918,
1927,
29918,
29885,
29897,
13,
2158,
525,
1451,
29875,
19256,
278,
1023,
11916,
526,
7417,
29915,
13,
2158,
525,
29873,
29899,
6112,
29901,
12365,
29889,
29946,
29888,
1118,
282,
29899,
1767,
29901,
12365,
29889,
29946,
29888,
29913,
4286,
4830,
29898,
29873,
6112,
29892,
282,
1767,
29897,
13,
17557,
29892,
282,
1767,
353,
22663,
29889,
2039,
29918,
29906,
29879,
1160,
29898,
1481,
29918,
1927,
29918,
29885,
29892,
14313,
29918,
1927,
29918,
29888,
29897,
13,
2158,
525,
29968,
324,
29885,
468,
272,
586,
29899,
29903,
1195,
586,
1002,
4695,
1023,
11916,
2996,
515,
278,
1021,
3133,
359,
4978,
29915,
13,
2158,
525,
29873,
29899,
6112,
29901,
12365,
29889,
29946,
29888,
1118,
282,
29899,
1767,
29901,
12365,
29889,
29946,
29888,
29913,
4286,
4830,
29898,
17557,
29892,
282,
1767,
29897,
13,
13,
29937,
13,
29937,
390,
10363,
29914,
29934,
3960,
639,
9681,
310,
853,
1387,
16597,
3174,
13,
29937,
13,
2176,
29934,
353,
10518,
29889,
17685,
4197,
13,
12,
2176,
29884,
29889,
12071,
29918,
2248,
2141,
27789,
877,
29876,
29918,
29875,
742,
2656,
29922,
8824,
467,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
7690,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29884,
29915,
9594,
13,
12,
2176,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
29876,
29918,
29875,
2033,
18572,
29906,
29897,
1919,
584,
1822,
12071,
29918,
2248,
2141,
27789,
877,
29876,
29918,
29875,
742,
2656,
29922,
8824,
467,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
7690,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29884,
998,
29876,
29906,
10162,
9594,
13,
12,
2176,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
29876,
29918,
823,
2033,
29958,
29900,
29897,
1919,
584,
1822,
12071,
29918,
2248,
2141,
27789,
877,
29876,
29918,
29875,
742,
2656,
29922,
8824,
467,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
7690,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29884,
998,
29883,
10162,
9594,
13,
12,
2176,
29884,
29889,
2029,
29961,
313,
2176,
29884,
1839,
29876,
29918,
823,
29918,
1289,
29875,
2033,
18572,
29896,
29897,
1919,
584,
1822,
12071,
29918,
2248,
2141,
27789,
877,
29876,
29918,
29875,
742,
2656,
29922,
8824,
467,
16170,
3319,
29915,
333,
29918,
1792,
2396,
15926,
29889,
19204,
29889,
29876,
13092,
7690,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
29884,
998,
29875,
10162,
1800,
13,
12,
1402,
9685,
29922,
29896,
467,
5589,
1056,
29898,
29900,
467,
579,
668,
29898,
9302,
29889,
524,
29953,
29946,
29897,
13,
13,
29937,
8561,
13899,
6137,
313,
1168,
29883,
2579,
1218,
12770,
1819,
29897,
13,
2176,
29900,
29900,
29918,
29906,
29900,
353,
4489,
29934,
29889,
309,
542,
29961,
29871,
29900,
29901,
29906,
29900,
29892,
29871,
29900,
29901,
29946,
4514,
13,
2176,
29906,
29900,
29918,
572,
353,
4489,
29934,
29889,
309,
542,
29961,
29871,
29906,
29900,
29901,
1919,
29871,
29900,
29901,
29946,
29871,
1822,
2083,
29898,
8990,
29922,
29900,
467,
517,
29918,
2557,
29898,
978,
2433,
29958,
29906,
29900,
2824,
29911,
13,
2176,
29934,
29879,
353,
10518,
29889,
17685,
4197,
2176,
29900,
29900,
29918,
29906,
29900,
29892,
4489,
29906,
29900,
29918,
572,
1402,
9685,
29922,
29900,
29897,
13,
13,
2176,
29934,
29879,
1839,
29934,
10363,
998,
29891,
29913,
2033,
353,
313,
2176,
29934,
29879,
1839,
29884,
998,
29883,
29913,
2033,
847,
4489,
29934,
29879,
1839,
29884,
11287,
847,
313,
2176,
29934,
29879,
29889,
2029,
29961,
29906,
5501,
29884,
998,
29883,
29913,
2033,
847,
4489,
29934,
29879,
29889,
2029,
29961,
29906,
5501,
29884,
11287,
13,
2176,
29934,
29879,
1839,
29934,
3960,
998,
29891,
29913,
2033,
353,
313,
2176,
29934,
29879,
1839,
29884,
998,
29875,
29913,
2033,
847,
4489,
29934,
29879,
1839,
29884,
11287,
847,
313,
2176,
29934,
29879,
29889,
2029,
29961,
29906,
5501,
29884,
998,
29875,
29913,
2033,
847,
4489,
29934,
29879,
29889,
2029,
29961,
29906,
5501,
29884,
11287,
13,
13,
29937,
3872,
29915,
29873,
9566,
304,
3349,
278,
4805,
24786,
7522,
29892,
390,
291,
13,
2158,
4489,
29934,
29879,
29889,
517,
29918,
25694,
29898,
21587,
29922,
8824,
29897,
13,
13,
13,
29937,
13,
29937,
390,
3960,
29985,
29887,
1405,
921,
13,
29937,
13,
2176,
29934,
353,
10518,
29889,
17685,
4197,
13,
12,
2176,
5871,
29889,
2029,
29961,
313,
2176,
5871,
1839,
26098,
2033,
1360,
29915,
29924,
744,
1495,
1919,
584,
29871,
1822,
27789,
18959,
2585,
29918,
823,
2033,
467,
16170,
3319,
29915,
333,
29918,
1792,
2396,
842,
7690,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
842,
29898,
29884,
998,
29924,
1800,
29915,
9594,
13,
12,
2176,
5871,
29889,
2029,
29961,
313,
2176,
5871,
1839,
26098,
2033,
1360,
29915,
29943,
331,
744,
1495,
1919,
584,
29871,
1822,
27789,
18959,
2585,
29918,
823,
2033,
467,
16170,
3319,
29915,
333,
29918,
1792,
2396,
842,
7690,
1267,
420,
29898,
13099,
3790,
29915,
333,
29918,
1792,
22099,
842,
29898,
29884,
998,
29943,
1800,
29915,
9594,
13,
12,
2176,
5871,
29889,
27789,
18959,
2585,
29918,
823,
2033,
467,
16170,
3319,
29915,
344,
369,
537,
22099,
4102,
3788,
2585,
29918,
29875,
22099,
4102,
3788,
2585,
29918,
29926,
22099,
4102,
29915,
1800,
13,
12,
1402,
9685,
29922,
29896,
29892,
2656,
29922,
8824,
29897,
13,
2176,
29934,
29961,
1839,
842,
29898,
29884,
998,
29943,
1800,
3788,
842,
29898,
29884,
998,
29924,
1800,
2033,
29962,
353,
4489,
29934,
29961,
1839,
842,
29898,
29884,
998,
29943,
1800,
3788,
842,
29898,
29884,
998,
29924,
1800,
2033,
1822,
7302,
1958,
29898,
2892,
921,
29901,
842,
4197,
2314,
565,
338,
8758,
29898,
29916,
29892,
7411,
29897,
1683,
921,
29897,
13,
2176,
29934,
1839,
29884,
998,
29875,
29892,
29924,
29913,
2033,
353,
4489,
29934,
1839,
842,
29898,
29884,
998,
29924,
1800,
13359,
7302,
29898,
2435,
29897,
13,
2176,
29934,
1839,
29884,
998,
29875,
29892,
29943,
29913,
2033,
353,
4489,
29934,
1839,
842,
29898,
29884,
998,
29943,
1800,
13359,
7302,
29898,
2435,
29897,
13,
2176,
29934,
1839,
29884,
998,
29875,
29913,
2033,
353,
4489,
29934,
29889,
7302,
29898,
2892,
364,
29901,
2435,
29898,
29878,
1839,
842,
29898,
29884,
998,
29924,
1800,
13359,
13094,
29898,
29878,
1839,
842,
29898,
29884,
998,
29943,
1800,
2033,
8243,
9685,
29922,
29896,
29897,
13,
13,
2176,
29934,
1839,
29934,
3960,
998,
29943,
29913,
2033,
353,
313,
2176,
29934,
1839,
29884,
998,
29875,
29892,
29943,
29913,
2033,
847,
302,
29918,
1792,
29918,
29888,
331,
744,
29897,
847,
313,
2176,
29934,
1839,
29884,
998,
29875,
29892,
29924,
29913,
2033,
847,
302,
29918,
1792,
29918,
29888,
331,
744,
29897,
13,
2176,
29934,
1839,
29934,
3960,
998,
29924,
29913,
2033,
353,
313,
2176,
29934,
1839,
29884,
998,
29875,
29892,
29924,
29913,
2033,
847,
302,
29918,
1792,
29918,
19202,
29897,
847,
313,
2176,
29934,
1839,
29884,
998,
29875,
29892,
29943,
29913,
2033,
847,
302,
29918,
1792,
29918,
29888,
331,
744,
29897,
13,
2158,
4489,
29934,
29889,
2813,
580,
13,
375,
29892,
6289,
353,
19997,
2636,
13,
1454,
390,
3960,
29887,
29916,
297,
518,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
29892,
29945,
29892,
29953,
29892,
29955,
29892,
29947,
29892,
29929,
29892,
29896,
29900,
5387,
13,
12,
29876,
29918,
29875,
29918,
29888,
331,
744,
353,
7431,
29898,
7442,
29889,
13092,
29898,
4489,
29934,
29889,
2029,
29961,
313,
2176,
29934,
1839,
29934,
3960,
998,
29943,
29913,
2033,
18572,
29934,
3960,
29887,
29916,
29897,
1919,
6024,
2585,
29918,
29875,
3788,
2585,
29918,
29926,
2033,
29871,
1822,
5975,
1723,
1723,
13,
12,
29876,
29918,
29875,
29918,
19202,
259,
353,
7431,
29898,
7442,
29889,
13092,
29898,
4489,
29934,
29889,
2029,
29961,
313,
2176,
29934,
1839,
29934,
3960,
998,
29924,
29913,
2033,
18572,
29934,
3960,
29887,
29916,
29897,
1919,
6024,
2585,
29918,
29875,
3788,
2585,
29918,
29926,
2033,
29871,
1822,
5975,
1723,
1723,
13,
12,
29876,
29918,
823,
29918,
29888,
331,
744,
353,
4489,
29934,
29889,
2029,
29961,
313,
2176,
29934,
1839,
29934,
3960,
998,
29943,
29913,
2033,
18572,
29934,
3960,
29887,
29916,
29897,
1919,
584,
29871,
1822,
12181,
29961,
29900,
29962,
13,
12,
29876,
29918,
823,
29918,
19202,
259,
353,
4489,
29934,
29889,
2029,
29961,
313,
2176,
29934,
1839,
29934,
3960,
998,
29924,
29913,
2033,
18572,
29934,
3960,
29887,
29916,
29897,
1919,
584,
29871,
1822,
12181,
29961,
29900,
29962,
13,
12,
29876,
29918,
823,
29918,
21355,
29918,
29888,
331,
744,
353,
4489,
29934,
29889,
2029,
29961,
5135,
2176,
29934,
1839,
344,
369,
537,
2033,
1360,
29915,
29924,
1175,
272,
1495,
669,
313,
2176,
29934,
1839,
29934,
3960,
998,
29943,
29913,
2033,
18572,
29934,
3960,
29887,
29916,
8243,
584,
29871,
1822,
12181,
29961,
29900,
29962,
13,
12,
29876,
29918,
823,
29918,
21355,
29918,
19202,
259,
353,
4489,
29934,
29889,
2029,
29961,
5135,
2176,
29934,
1839,
344,
369,
537,
2033,
1360,
29915,
29924,
1175,
272,
1495,
669,
313,
2176,
29934,
1839,
29934,
3960,
998,
29924,
29913,
2033,
18572,
29934,
3960,
29887,
29916,
8243,
584,
29871,
1822,
12181,
29961,
29900,
29962,
13,
12,
6289,
29889,
4397,
29898,
313,
29934,
3960,
29887,
29916,
29892,
29876,
29918,
29875,
29918,
29888,
331,
744,
29892,
29876,
29918,
29875,
29918,
19202,
29892,
29876,
29918,
823,
29918,
29888,
331,
744,
29892,
29876,
29918,
823,
29918,
19202,
29892,
29876,
29918,
823,
29918,
21355,
29918,
29888,
331,
744,
29892,
29876,
29918,
823,
29918,
21355,
29918,
19202,
29897,
1723,
13,
12,
29876,
29918,
1792,
29918,
1195,
29878,
374,
29918,
29888,
331,
744,
353,
7431,
29898,
731,
29889,
13094,
29898,
334,
2176,
29934,
29889,
2029,
29961,
313,
2176,
29934,
1839,
29934,
3960,
998,
29943,
29913,
2033,
18572,
29934,
3960,
29887,
29916,
29897,
1919,
525,
842,
29898,
29884,
998,
29943,
1800,
13359,
25027,
391,
580,
1723,
1723,
13,
12,
29876,
29918,
1792,
29918,
1195,
29878,
374,
29918,
19202,
259,
353,
7431,
29898,
731,
29889,
13094,
29898,
334,
2176,
29934,
29889,
2029,
29961,
313,
2176,
29934,
1839,
29934,
3960,
998,
29924,
29913,
2033,
18572,
29934,
3960,
29887,
29916,
511,
525,
842,
29898,
29884,
998,
29924,
1800,
13359,
25027,
391,
580,
1723,
1723,
13,
12,
29876,
29918,
1792,
29918,
1195,
29878,
374,
29918,
655,
29926,
29918,
29888,
331,
744,
353,
7431,
29898,
731,
29889,
13094,
29898,
334,
2176,
29934,
29889,
2029,
29961,
5135,
2176,
29934,
1839,
344,
369,
537,
2033,
1360,
29915,
29924,
1175,
272,
1495,
669,
313,
2176,
29934,
1839,
29934,
3960,
998,
29943,
29913,
2033,
18572,
29934,
3960,
29887,
29916,
8243,
525,
842,
29898,
29884,
998,
29943,
1800,
13359,
25027,
391,
580,
1723,
1723,
13,
12,
29876,
29918,
1792,
29918,
1195,
29878,
374,
29918,
655,
29926,
29918,
19202,
259,
353,
7431,
29898,
731,
29889,
13094,
29898,
334,
2176,
29934,
29889,
2029,
29961,
5135,
2176,
29934,
1839,
344,
369,
537,
2033,
1360,
29915,
29924,
1175,
272,
1495,
669,
313,
2176,
29934,
1839,
29934,
3960,
998,
29924,
29913,
2033,
18572,
29934,
3960,
29887,
29916,
8243,
525,
842,
29898,
29884,
998,
29924,
1800,
13359,
25027,
391,
580,
1723,
1723,
13,
13,
12,
375,
29889,
4397,
29898,
313,
29934,
3960,
29887,
29916,
29892,
29876,
29918,
1792,
29918,
1195,
29878,
374,
29918,
29888,
331,
744,
29892,
29876,
29918,
1792,
29918,
1195,
29878,
374,
29918,
19202,
29892,
29876,
29918,
1792,
29918,
1195,
29878,
374,
29918,
655,
29926,
29918,
29888,
331,
744,
29892,
29876,
29918,
1792,
29918,
1195,
29878,
374,
29918,
655,
29926,
29918,
19202,
29897,
1723,
13,
13,
2176,
29934,
7707,
353,
10518,
29889,
17271,
29898,
6289,
29892,
4341,
29922,
1839,
29934,
3960,
29958,
29916,
3788,
29881,
998,
29943,
29913,
3788,
29881,
998,
29924,
29913,
3788,
823,
998,
29943,
29913,
3788,
823,
998,
29924,
29913,
3788,
823,
998,
29943,
3227,
655,
29926,
29913,
3788,
823,
998,
29924,
3227,
655,
29926,
29913,
2033,
467,
842,
29918,
2248,
877,
29934,
3960,
29958,
29916,
1495,
13,
2176,
29934,
332,
353,
10518,
29889,
17271,
29898,
375,
29892,
4341,
29922,
1839,
29934,
3960,
29958,
29916,
3788,
29884,
998,
29943,
29913,
3788,
29884,
998,
29924,
29913,
3788,
29884,
998,
29943,
3227,
655,
29926,
29913,
3788,
29884,
998,
29924,
3227,
655,
29926,
29913,
2033,
467,
842,
29918,
2248,
877,
29934,
3960,
29958,
29916,
1495,
13,
2176,
29934,
332,
1839,
29884,
998,
29943,
7402,
546,
2033,
353,
4489,
29934,
332,
1839,
29884,
998,
29943,
29913,
2033,
847,
302,
29918,
1792,
29918,
29888,
331,
744,
13,
2176,
29934,
332,
1839,
29884,
998,
29924,
7402,
546,
2033,
353,
4489,
29934,
332,
1839,
29884,
998,
29924,
29913,
2033,
847,
302,
29918,
1792,
29918,
19202,
13,
2176,
29934,
332,
1839,
29884,
998,
29943,
3227,
655,
29926,
7402,
546,
2033,
353,
4489,
29934,
332,
1839,
29884,
998,
29943,
3227,
655,
29926,
29913,
2033,
847,
302,
29918,
1792,
29918,
29888,
331,
744,
13,
2176,
29934,
332,
1839,
29884,
998,
29924,
3227,
655,
29926,
7402,
546,
2033,
353,
4489,
29934,
332,
1839,
29884,
998,
29924,
3227,
655,
29926,
29913,
2033,
847,
302,
29918,
1792,
29918,
19202,
13,
2158,
4489,
29934,
7707,
29889,
517,
29918,
25694,
29898,
21587,
29922,
8824,
29897,
13,
2158,
4489,
29934,
332,
29889,
517,
29918,
25694,
29898,
21587,
29922,
8824,
29897,
13,
13,
13,
29937,
13,
29937,
19014,
3382,
1379,
448,
16767,
13,
29937,
390,
29902,
998,
29891,
29913,
13,
29937,
13,
15926,
29889,
842,
29918,
3385,
877,
4990,
29889,
17990,
2459,
742,
29871,
29906,
29897,
13,
15926,
29889,
842,
29918,
3385,
877,
4990,
29889,
7411,
29918,
4830,
742,
14013,
921,
29901,
14210,
29889,
29906,
29888,
29915,
1273,
921,
29897,
13,
13,
2176,
29940,
353,
10518,
29889,
949,
29918,
7638,
877,
7638,
29914,
482,
29918,
26098,
29918,
4304,
29889,
7638,
742,
2380,
29918,
1054,
29922,
29900,
29892,
8025,
2433,
9420,
29899,
29947,
1495,
13,
29876,
29918,
3389,
29879,
353,
4489,
29940,
1839,
3389,
13359,
3317,
580,
13,
2176,
29940,
1839,
29884,
998,
29875,
3227,
29878,
299,
29913,
2033,
353,
4489,
29940,
1839,
29884,
998,
29875,
29892,
29943,
3227,
29878,
299,
29913,
2033,
718,
4489,
29940,
1839,
29884,
998,
29875,
29892,
29924,
3227,
29878,
299,
29913,
2033,
13,
2176,
29940,
353,
4489,
29940,
29889,
27789,
877,
482,
29918,
2972,
2824,
16170,
29898,
7514,
287,
21533,
4197,
13,
12,
877,
29884,
742,
1839,
12676,
2033,
511,
13,
12,
877,
29884,
998,
29875,
3227,
29878,
299,
29913,
742,
1839,
12676,
3788,
4172,
2033,
511,
13,
12622,
13,
2176,
29940,
29889,
13099,
353,
6024,
29899,
4286,
7122,
29898,
1054,
467,
17010,
580,
363,
784,
297,
4489,
29940,
29889,
13099,
29889,
5975,
29962,
13,
2176,
29940,
29900,
29900,
29918,
29947,
29929,
353,
4489,
29940,
29889,
309,
542,
29961,
29871,
29900,
29901,
29896,
29947,
29892,
584,
4514,
13,
2176,
29940,
29929,
29900,
29918,
572,
353,
4489,
29940,
29889,
309,
542,
29961,
29871,
29896,
29947,
29901,
1919,
584,
29871,
1822,
2083,
29898,
8990,
29922,
29900,
467,
517,
29918,
2557,
29898,
978,
2433,
29929,
29900,
29974,
2824,
29911,
13,
2176,
29940,
353,
10518,
29889,
17685,
4197,
2176,
29940,
29900,
29900,
29918,
29947,
29929,
29892,
4489,
29940,
29929,
29900,
29918,
572,
1402,
9685,
29922,
29900,
29897,
13,
2176,
29940,
1839,
3960,
998,
29891,
3227,
29878,
299,
29913,
2033,
353,
4489,
29940,
1839,
29884,
998,
29875,
3227,
29878,
299,
7402,
12676,
2033,
847,
4489,
29934,
29918,
29891,
1839,
29884,
998,
29883,
29913,
2033,
13,
2176,
29940,
29961,
1839,
29884,
998,
29875,
3227,
29878,
299,
7402,
455,
29918,
1195,
3788,
29884,
998,
29875,
3227,
29878,
299,
7402,
455,
29918,
3317,
2033,
29962,
353,
4489,
29940,
29961,
1839,
29884,
998,
29875,
3227,
29878,
299,
7402,
12676,
3788,
29884,
998,
29875,
3227,
29878,
299,
7402,
4172,
2033,
1822,
7302,
29898,
28667,
29918,
5527,
29918,
19207,
29892,
9685,
29922,
29896,
29892,
302,
29918,
3389,
29879,
29922,
29876,
29918,
3389,
29879,
29897,
13,
2176,
29940,
1839,
3960,
998,
29891,
3227,
29878,
299,
7402,
455,
29918,
1195,
2033,
353,
4489,
29940,
1839,
29884,
998,
29875,
3227,
29878,
299,
7402,
455,
29918,
1195,
2033,
847,
4489,
29934,
29918,
29891,
1839,
29884,
998,
29883,
29913,
2033,
13,
2176,
29940,
1839,
3960,
998,
29891,
3227,
29878,
299,
7402,
455,
29918,
3317,
2033,
353,
4489,
29940,
1839,
29884,
998,
29875,
3227,
29878,
299,
7402,
455,
29918,
3317,
2033,
847,
4489,
29934,
29918,
29891,
1839,
29884,
998,
29883,
29913,
2033,
13,
2158,
4489,
29940,
29889,
517,
29918,
25694,
29898,
21587,
29922,
8824,
29897,
13,
13,
13,
29937,
13,
29937,
19014,
3382,
1379,
448,
16767,
669,
402,
1581,
13,
29937,
390,
29902,
998,
29891,
29892,
29887,
29913,
13,
2176,
29940,
353,
10518,
29889,
949,
29918,
7638,
877,
7638,
29914,
482,
29918,
26098,
29918,
4304,
29889,
7638,
742,
2380,
29918,
1054,
29922,
29900,
29892,
8025,
2433,
9420,
29899,
29947,
1495,
13,
2176,
29924,
353,
10518,
29889,
949,
29918,
7638,
877,
7638,
29914,
482,
29918,
19202,
29889,
7638,
742,
2380,
29918,
1054,
29922,
29900,
29892,
8025,
2433,
9420,
29899,
29947,
1495,
13,
2176,
29943,
353,
10518,
29889,
949,
29918,
7638,
877,
7638,
29914,
482,
29918,
29888,
331,
744,
29889,
7638,
742,
2380,
29918,
1054,
29922,
29900,
29892,
8025,
2433,
9420,
29899,
29947,
1495,
13,
29876,
29918,
3389,
29879,
353,
4489,
29940,
1839,
3389,
13359,
3317,
580,
13,
2176,
29940,
1839,
29884,
998,
29875,
3227,
29878,
299,
29913,
2033,
353,
4489,
29940,
1839,
29884,
998,
29875,
29892,
29943,
3227,
29878,
299,
29913,
2033,
718,
4489,
29940,
1839,
29884,
998,
29875,
29892,
29924,
3227,
29878,
299,
29913,
2033,
13,
2176,
29940,
353,
4489,
29940,
29889,
27789,
877,
482,
29918,
2972,
2824,
16170,
29898,
7514,
287,
21533,
4197,
13,
12,
877,
29884,
742,
1839,
12676,
2033,
511,
13,
12,
877,
29884,
998,
29875,
3227,
29878,
299,
29913,
742,
1839,
12676,
3788,
4172,
2033,
511,
13,
12,
877,
29884,
998,
29875,
29892,
29943,
3227,
29878,
299,
29913,
742,
1839,
12676,
3788,
4172,
2033,
511,
13,
12,
877,
29884,
998,
29875,
29892,
29924,
3227,
29878,
299,
29913,
742,
1839,
12676,
3788,
4172,
11287,
13,
12,
12622,
13,
2176,
29940,
29889,
13099,
353,
6024,
29899,
4286,
7122,
29898,
1054,
467,
17010,
580,
363,
784,
297,
4489,
29940,
29889,
13099,
29889,
5975,
29962,
13,
2176,
29940,
1839,
29884,
2033,
353,
4489,
29924,
1839,
29884,
2033,
718,
4489,
29943,
1839,
29884,
2033,
13,
2176,
29940,
1839,
29884,
998,
29943,
29913,
2033,
353,
4489,
29943,
1839,
29884,
2033,
13,
2176,
29940,
1839,
29884,
998,
29924,
29913,
2033,
353,
4489,
29924,
1839,
29884,
2033,
13,
2176,
29940,
1839,
29884,
998,
29883,
29892,
29943,
29913,
2033,
353,
4489,
29943,
1839,
29884,
998,
29883,
29913,
2033,
13,
2176,
29940,
1839,
29884,
998,
29883,
29892,
29924,
29913,
2033,
353,
4489,
29924,
1839,
29884,
998,
29883,
29913,
2033,
13,
2176,
29940,
29900,
29900,
29918,
29947,
29929,
353,
4489,
29940,
29889,
309,
542,
29961,
29871,
29900,
29901,
29896,
29947,
29892,
584,
4514,
13,
2176,
29940,
29929,
29900,
29918,
572,
353,
4489,
29940,
29889,
309,
542,
29961,
29871,
29896,
29947,
29901,
1919,
584,
29871,
1822,
2083,
29898,
8990,
29922,
29900,
467,
517,
29918,
2557,
29898,
978,
2433,
29929,
29900,
29974,
2824,
29911,
13,
2176,
29940,
353,
10518,
29889,
17685,
4197,
2176,
29940,
29900,
29900,
29918,
29947,
29929,
29892,
4489,
29940,
29929,
29900,
29918,
572,
1402,
9685,
29922,
29900,
29897,
13,
2176,
29940,
1839,
3960,
998,
29891,
29892,
29943,
3227,
29878,
299,
29913,
2033,
353,
4489,
29940,
1839,
29884,
998,
29875,
29892,
29943,
3227,
29878,
299,
7402,
12676,
2033,
847,
4489,
29943,
1839,
29884,
998,
29883,
29913,
2033,
13,
2176,
29940,
1839,
3960,
998,
29891,
29892,
29924,
3227,
29878,
299,
29913,
2033,
353,
4489,
29940,
1839,
29884,
998,
29875,
29892,
29924,
3227,
29878,
299,
7402,
12676,
2033,
847,
4489,
29924,
1839,
29884,
998,
29883,
29913,
2033,
13,
29937,
10811,
5084,
4124,
791,
13,
2176,
29940,
29961,
1839,
29884,
998,
29875,
29892,
29943,
3227,
29878,
299,
7402,
455,
29918,
1195,
3788,
29884,
998,
29875,
29892,
29943,
3227,
29878,
299,
7402,
455,
29918,
3317,
2033,
29962,
353,
4489,
29940,
29961,
1839,
29884,
998,
29875,
29892,
29943,
3227,
29878,
299,
7402,
12676,
3788,
29884,
998,
29875,
29892,
29943,
3227,
29878,
299,
7402,
4172,
2033,
1822,
7302,
29898,
28667,
29918,
5527,
29918,
19207,
29892,
9685,
29922,
29896,
29892,
302,
29918,
3389,
29879,
29922,
29876,
29918,
3389,
29879,
29897,
13,
2176,
29940,
29961,
1839,
29884,
998,
29875,
29892,
29924,
3227,
29878,
299,
7402,
455,
29918,
1195,
3788,
29884,
998,
29875,
29892,
29924,
3227,
29878,
299,
7402,
455,
29918,
3317,
2033,
29962,
353,
4489,
29940,
29961,
1839,
29884,
998,
29875,
29892,
29924,
3227,
29878,
299,
7402,
12676,
3788,
29884,
998,
29875,
29892,
29924,
3227,
29878,
299,
7402,
4172,
2033,
1822,
7302,
29898,
28667,
29918,
5527,
29918,
19207,
29892,
9685,
29922,
29896,
29892,
302,
29918,
3389,
29879,
29922,
29876,
29918,
3389,
29879,
29897,
13,
2176,
29940,
1839,
3960,
998,
29891,
29892,
29943,
3227,
29878,
299,
7402,
455,
29918,
1195,
2033,
353,
4489,
29940,
1839,
29884,
998,
29875,
29892,
29943,
3227,
29878,
299,
7402,
455,
29918,
1195,
2033,
847,
4489,
29940,
1839,
29884,
998,
29883,
29892,
29943,
29913,
2033,
13,
2176,
29940,
1839,
3960,
998,
29891,
29892,
29943,
3227,
29878,
299,
7402,
455,
29918,
3317,
2033,
353,
4489,
29940,
1839,
29884,
998,
29875,
29892,
29943,
3227,
29878,
299,
7402,
455,
29918,
3317,
2033,
847,
4489,
29940,
1839,
29884,
998,
29883,
29892,
29943,
29913,
2033,
13,
2176,
29940,
1839,
3960,
998,
29891,
29892,
29924,
3227,
29878,
299,
7402,
455,
29918,
1195,
2033,
353,
4489,
29940,
1839,
29884,
998,
29875,
29892,
29924,
3227,
29878,
299,
7402,
455,
29918,
1195,
2033,
847,
4489,
29940,
1839,
29884,
998,
29883,
29892,
29924,
29913,
2033,
13,
2176,
29940,
1839,
3960,
998,
29891,
29892,
29924,
3227,
29878,
299,
7402,
455,
29918,
3317,
2033,
353,
4489,
29940,
1839,
29884,
998,
29875,
29892,
29924,
3227,
29878,
299,
7402,
455,
29918,
3317,
2033,
847,
4489,
29940,
1839,
29884,
998,
29883,
29892,
29924,
29913,
2033,
13,
2158,
4489,
29940,
29889,
517,
29918,
25694,
29898,
21587,
29922,
8824,
29897,
13,
13,
13,
13,
13,
2
] |
composite/serializers.py | Skydipper/Composite | 0 | 112861 | """Serializers"""
import logging
def serialize_composite_output(analysis, type):
"""."""
return {
'id': None,
'type': type,
'attributes': {
'thumb_url': analysis.get('thumb_url', None),
'tile_url':analysis.get('tile_url', None),
'dem':analysis.get('dem', None),
'zonal_stats':analysis.get('zonal_stats', None)
}
} | [
1,
9995,
9125,
19427,
15945,
29908,
13,
5215,
12183,
13,
13,
13,
1753,
28755,
29918,
22410,
568,
29918,
4905,
29898,
15916,
29892,
1134,
1125,
13,
1678,
9995,
1213,
15945,
13,
1678,
736,
426,
13,
4706,
525,
333,
2396,
6213,
29892,
13,
4706,
525,
1853,
2396,
1134,
29892,
13,
4706,
525,
15697,
2396,
426,
13,
9651,
525,
386,
3774,
29918,
2271,
2396,
7418,
29889,
657,
877,
386,
3774,
29918,
2271,
742,
6213,
511,
13,
9651,
525,
29873,
488,
29918,
2271,
2396,
15916,
29889,
657,
877,
29873,
488,
29918,
2271,
742,
6213,
511,
13,
9651,
525,
2310,
2396,
15916,
29889,
657,
877,
2310,
742,
6213,
511,
13,
9651,
525,
6626,
284,
29918,
16202,
2396,
15916,
29889,
657,
877,
6626,
284,
29918,
16202,
742,
6213,
29897,
13,
4706,
500,
13,
1678,
500,
2
] |
ex088.py | nascimentobrenda24/PythonExercises | 1 | 42031 | <filename>ex088.py
# Faça um programa que ajude um jogador da MEGA SENA a criar palpites. O programa vai perguntar quantos jogos serão
# gerados e vai sortear 6 números entre 1 e 60 para cada jogo, cadastrando tudo em uma lista composta.
from random import randint
games = []
temp = []
print('-'*30)
print(' JOGA NA MEGA SENA ')
print('-'*30)
q = int(input('Quantos jogos você quer que eu sortei? '))
tot = 1
while tot <= q:
cont = 0
while True:
num = randint(1, 60)
if num not in temp:
temp.append(num)
cont += 1
if cont >= 6:
break
temp.sort()
games.append(temp[:])
temp.clear()
tot += 1
print(f'=-'*3, f'SORTEANDO {q} JOGOS', '-='*3)
for i, l in enumerate(games):
print(f'Jogo {i+1}: {l}')
print('-='*5, 'BOA SORTE', '-='*5)
| [
1,
529,
9507,
29958,
735,
29900,
29947,
29947,
29889,
2272,
13,
29937,
7748,
4277,
1922,
16914,
712,
13612,
1151,
1922,
16812,
3136,
1146,
341,
11787,
29909,
317,
1430,
29909,
263,
14783,
279,
5112,
29886,
3246,
29889,
438,
16914,
325,
1794,
639,
29887,
1657,
279,
4323,
359,
16812,
359,
724,
1368,
13,
29937,
9814,
2255,
321,
325,
1794,
29835,
279,
29871,
29953,
12158,
359,
2637,
29871,
29896,
321,
29871,
29953,
29900,
1702,
9747,
432,
10482,
29892,
274,
3922,
509,
1743,
260,
5333,
953,
3672,
15023,
752,
16233,
29889,
13,
3166,
4036,
1053,
20088,
524,
13,
13,
29887,
1280,
353,
5159,
13,
7382,
353,
5159,
13,
13,
2158,
877,
29899,
29915,
29930,
29941,
29900,
29897,
13,
2158,
877,
4706,
435,
29949,
12739,
8598,
341,
11787,
29909,
317,
1430,
29909,
418,
25710,
13,
2158,
877,
29899,
29915,
29930,
29941,
29900,
29897,
13,
13,
29939,
353,
938,
29898,
2080,
877,
22930,
359,
16812,
359,
7931,
30037,
22320,
712,
11878,
7319,
15314,
29973,
525,
876,
13,
4260,
353,
29871,
29896,
13,
13,
8000,
2025,
5277,
3855,
29901,
13,
1678,
640,
353,
29871,
29900,
13,
1678,
1550,
5852,
29901,
13,
4706,
954,
353,
20088,
524,
29898,
29896,
29892,
29871,
29953,
29900,
29897,
13,
13,
4706,
565,
954,
451,
297,
5694,
29901,
13,
9651,
5694,
29889,
4397,
29898,
1949,
29897,
13,
9651,
640,
4619,
29871,
29896,
13,
13,
9651,
565,
640,
6736,
29871,
29953,
29901,
13,
18884,
2867,
13,
13,
1678,
5694,
29889,
6605,
580,
13,
1678,
8090,
29889,
4397,
29898,
7382,
7503,
2314,
13,
1678,
5694,
29889,
8551,
580,
13,
1678,
2025,
4619,
29871,
29896,
13,
13,
2158,
29898,
29888,
29915,
10457,
29915,
29930,
29941,
29892,
285,
29915,
29903,
1955,
4330,
2190,
3970,
426,
29939,
29913,
435,
29949,
29954,
3267,
742,
17411,
2433,
29930,
29941,
29897,
13,
1454,
474,
29892,
301,
297,
26985,
29898,
29887,
1280,
1125,
13,
1678,
1596,
29898,
29888,
29915,
29967,
10482,
426,
29875,
29974,
29896,
6177,
426,
29880,
29913,
1495,
13,
13,
2158,
877,
29899,
2433,
29930,
29945,
29892,
525,
8456,
29909,
317,
1955,
4330,
742,
17411,
2433,
29930,
29945,
29897,
13,
13,
13,
13,
2
] |
signuplogin/views.py | xflows/textflows | 18 | 46284 | <gh_stars>10-100
from django.contrib.auth.models import User
from django.contrib.auth import authenticate, login, logout
from django.shortcuts import render, get_object_or_404, redirect
from django.utils import timezone
def signuplogin(request):
if request.method == 'POST':
if request.POST.get('login'):
uname = request.POST['username']
passw = request.POST['password']
user = authenticate(username=uname, password=passw)
if user is not None:
login(request, user)
if not request.POST.get('remember', None):
request.session.set_expiry(0)
return ajaxresponse(request, 'OK')
else:
return ajaxresponse(request, 'ERR')
elif request.POST.get('register'):
uname = request.POST['rusername']
passw = request.POST['rpassword']
rpass = request.POST['repeat_password']
mail = request.POST['email']
try:
tuser = User.objects.get(username__exact=uname)
except User.DoesNotExist:
tuser = None
if User.objects.filter(email=mail).count()>0:
return ajaxresponse(request, 'MAILTAKEN')
if tuser is not None:
return ajaxresponse(request, 'TAKEN')
else:
new_user = User.objects.create_user(uname, mail, passw, last_login = timezone.now() )
user = authenticate(username=uname, password=passw)
login(request, user)
return ajaxresponse(request, 'OK')
else:
return render(request, 'signuplogin/signuplogin.html')
def ajaxresponse(request, txt):
return render(request, 'signuplogin/ajaxresponse.html', {'response':txt}) | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
3166,
9557,
29889,
21570,
29889,
5150,
29889,
9794,
1053,
4911,
13,
3166,
9557,
29889,
21570,
29889,
5150,
1053,
15585,
403,
29892,
6464,
29892,
1480,
449,
13,
3166,
9557,
29889,
12759,
7582,
29879,
1053,
4050,
29892,
679,
29918,
3318,
29918,
272,
29918,
29946,
29900,
29946,
29892,
6684,
13,
3166,
9557,
29889,
13239,
1053,
29431,
13,
13,
13,
1753,
1804,
786,
7507,
29898,
3827,
1125,
13,
1678,
565,
2009,
29889,
5696,
1275,
525,
5438,
2396,
13,
4706,
565,
2009,
29889,
5438,
29889,
657,
877,
7507,
29374,
13,
9651,
443,
420,
353,
2009,
29889,
5438,
1839,
6786,
2033,
13,
9651,
1209,
29893,
353,
2009,
29889,
5438,
1839,
5630,
2033,
13,
13,
9651,
1404,
353,
15585,
403,
29898,
6786,
29922,
348,
420,
29892,
4800,
29922,
3364,
29893,
29897,
13,
13,
9651,
565,
1404,
338,
451,
6213,
29901,
13,
18884,
6464,
29898,
3827,
29892,
1404,
29897,
13,
13,
18884,
565,
451,
2009,
29889,
5438,
29889,
657,
877,
1745,
1096,
742,
6213,
1125,
13,
462,
1678,
2009,
29889,
7924,
29889,
842,
29918,
4548,
16129,
29898,
29900,
29897,
13,
13,
18884,
736,
9349,
5327,
29898,
3827,
29892,
525,
8949,
1495,
13,
9651,
1683,
29901,
13,
18884,
736,
9349,
5327,
29898,
3827,
29892,
525,
21662,
1495,
13,
13,
4706,
25342,
2009,
29889,
5438,
29889,
657,
877,
9573,
29374,
13,
9651,
443,
420,
353,
2009,
29889,
5438,
1839,
29878,
6786,
2033,
13,
9651,
1209,
29893,
353,
2009,
29889,
5438,
1839,
29878,
5630,
2033,
13,
9651,
364,
3364,
353,
2009,
29889,
5438,
1839,
14358,
29918,
5630,
2033,
13,
9651,
10524,
353,
2009,
29889,
5438,
1839,
5269,
2033,
13,
13,
9651,
1018,
29901,
13,
18884,
260,
1792,
353,
4911,
29889,
12650,
29889,
657,
29898,
6786,
1649,
735,
627,
29922,
348,
420,
29897,
13,
9651,
5174,
4911,
29889,
25125,
3664,
1252,
391,
29901,
13,
18884,
260,
1792,
353,
6213,
13,
632,
13,
9651,
565,
4911,
29889,
12650,
29889,
4572,
29898,
5269,
29922,
2549,
467,
2798,
580,
29958,
29900,
29901,
13,
18884,
736,
9349,
5327,
29898,
3827,
29892,
525,
1529,
29902,
5850,
22311,
1430,
1495,
13,
632,
13,
9651,
565,
260,
1792,
338,
451,
6213,
29901,
13,
18884,
736,
9349,
5327,
29898,
3827,
29892,
525,
6040,
29968,
1430,
1495,
13,
9651,
1683,
29901,
13,
18884,
716,
29918,
1792,
353,
4911,
29889,
12650,
29889,
3258,
29918,
1792,
29898,
348,
420,
29892,
10524,
29892,
1209,
29893,
29892,
1833,
29918,
7507,
353,
29431,
29889,
3707,
580,
1723,
13,
13,
18884,
1404,
353,
15585,
403,
29898,
6786,
29922,
348,
420,
29892,
4800,
29922,
3364,
29893,
29897,
13,
18884,
6464,
29898,
3827,
29892,
1404,
29897,
13,
18884,
736,
9349,
5327,
29898,
3827,
29892,
525,
8949,
1495,
13,
1678,
1683,
29901,
13,
4706,
736,
4050,
29898,
3827,
29892,
525,
4530,
786,
7507,
29914,
4530,
786,
7507,
29889,
1420,
1495,
13,
13,
1753,
9349,
5327,
29898,
3827,
29892,
13872,
1125,
13,
1678,
736,
4050,
29898,
3827,
29892,
525,
4530,
786,
7507,
29914,
6538,
5327,
29889,
1420,
742,
11117,
5327,
2396,
3945,
1800,
2
] |
gridded/tests/test_ugrid/test_find_nodes.py | groutr/gridded | 49 | 51287 | <reponame>groutr/gridded
#!/usr/bin/env python
"""
Testing of code to find nodes.
Currently only nearest neighbor.
"""
from __future__ import (absolute_import, division, print_function)
import numpy as np
from .utilities import twenty_one_triangles
def test_locate_node(twenty_one_triangles):
"""Test finding a single node."""
ugrid = twenty_one_triangles
assert ugrid.locate_nodes((4.58, 5.08)) == 6
def test_locate_nodes(twenty_one_triangles):
"""Test finding multiple nodes at once."""
ugrid = twenty_one_triangles
assert np.array_equal(ugrid.locate_nodes(((4.58, 5.08),
(4.81, 0.89),
(6.43, 12.9),
(8.74, 6.86),
(5.12, 7.31),
)), (6, 0, 17, 10, 8))
def test_locate_exact(twenty_one_triangles):
"""
The nearest neighbor of the exact node locations had better be
the nodes!
"""
ugrid = twenty_one_triangles
assert np.array_equal(ugrid.locate_nodes(ugrid.nodes),
list(range(len(ugrid.nodes))))
def test_locate_middle(twenty_one_triangles):
"""See what happens the point is equidistant to two nodes."""
ugrid = twenty_one_triangles
# (3,5) is equidistant between nodes 2, 6 and 7
# 2 is returned, but might be arbitrary
# assert ugrid.locate_nodes( (3, 5) ) == 2
# Perturb the point a bit, and nearest changes to:
assert ugrid.locate_nodes((3.0000000001, 5)) == 6
assert ugrid.locate_nodes((3, 5.00000000001)) == 7
assert ugrid.locate_nodes((3, 4.99999999999)) == 2
if __name__ == '__main__':
test_locate_nodes()
| [
1,
529,
276,
1112,
420,
29958,
629,
449,
29878,
29914,
629,
2205,
287,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
15945,
29908,
13,
3057,
292,
310,
775,
304,
1284,
7573,
29889,
13,
13,
7583,
368,
871,
20471,
12307,
29889,
13,
13,
15945,
29908,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
313,
23552,
29918,
5215,
29892,
8542,
29892,
1596,
29918,
2220,
29897,
13,
13,
5215,
12655,
408,
7442,
13,
13,
3166,
869,
4422,
1907,
1053,
10081,
29918,
650,
29918,
3626,
19536,
13,
13,
13,
1753,
1243,
29918,
2029,
403,
29918,
3177,
29898,
7516,
6478,
29918,
650,
29918,
3626,
19536,
1125,
13,
1678,
9995,
3057,
9138,
263,
2323,
2943,
1213,
15945,
13,
13,
1678,
318,
7720,
353,
10081,
29918,
650,
29918,
3626,
19536,
13,
1678,
4974,
318,
7720,
29889,
2029,
403,
29918,
18010,
3552,
29946,
29889,
29945,
29947,
29892,
29871,
29945,
29889,
29900,
29947,
876,
1275,
29871,
29953,
13,
13,
13,
1753,
1243,
29918,
2029,
403,
29918,
18010,
29898,
7516,
6478,
29918,
650,
29918,
3626,
19536,
1125,
13,
1678,
9995,
3057,
9138,
2999,
7573,
472,
2748,
1213,
15945,
13,
13,
1678,
318,
7720,
353,
10081,
29918,
650,
29918,
3626,
19536,
13,
1678,
4974,
7442,
29889,
2378,
29918,
11745,
29898,
29884,
7720,
29889,
2029,
403,
29918,
18010,
3552,
29898,
29946,
29889,
29945,
29947,
29892,
29871,
29945,
29889,
29900,
29947,
511,
13,
462,
462,
795,
313,
29946,
29889,
29947,
29896,
29892,
29871,
29900,
29889,
29947,
29929,
511,
13,
462,
462,
795,
313,
29953,
29889,
29946,
29941,
29892,
29871,
29896,
29906,
29889,
29929,
511,
13,
462,
462,
795,
313,
29947,
29889,
29955,
29946,
29892,
29871,
29953,
29889,
29947,
29953,
511,
13,
462,
462,
795,
313,
29945,
29889,
29896,
29906,
29892,
29871,
29955,
29889,
29941,
29896,
511,
13,
462,
462,
795,
1723,
511,
313,
29953,
29892,
29871,
29900,
29892,
29871,
29896,
29955,
29892,
29871,
29896,
29900,
29892,
29871,
29947,
876,
13,
13,
13,
1753,
1243,
29918,
2029,
403,
29918,
735,
627,
29898,
7516,
6478,
29918,
650,
29918,
3626,
19536,
1125,
13,
1678,
9995,
13,
1678,
450,
20471,
12307,
310,
278,
2684,
2943,
14354,
750,
2253,
367,
13,
1678,
278,
7573,
29991,
13,
13,
1678,
9995,
13,
1678,
318,
7720,
353,
10081,
29918,
650,
29918,
3626,
19536,
13,
1678,
4974,
7442,
29889,
2378,
29918,
11745,
29898,
29884,
7720,
29889,
2029,
403,
29918,
18010,
29898,
29884,
7720,
29889,
18010,
511,
13,
462,
3986,
1051,
29898,
3881,
29898,
2435,
29898,
29884,
7720,
29889,
18010,
13697,
13,
13,
13,
1753,
1243,
29918,
2029,
403,
29918,
17662,
29898,
7516,
6478,
29918,
650,
29918,
3626,
19536,
1125,
13,
1678,
9995,
13393,
825,
5930,
278,
1298,
338,
1592,
333,
22137,
304,
1023,
7573,
1213,
15945,
13,
1678,
318,
7720,
353,
10081,
29918,
650,
29918,
3626,
19536,
13,
13,
1678,
396,
313,
29941,
29892,
29945,
29897,
338,
1592,
333,
22137,
1546,
7573,
29871,
29906,
29892,
29871,
29953,
322,
29871,
29955,
13,
1678,
396,
29871,
29906,
338,
4133,
29892,
541,
1795,
367,
11472,
13,
1678,
396,
4974,
318,
7720,
29889,
2029,
403,
29918,
18010,
29898,
313,
29941,
29892,
29871,
29945,
29897,
1723,
1275,
29871,
29906,
13,
13,
1678,
396,
349,
814,
9265,
278,
1298,
263,
2586,
29892,
322,
20471,
3620,
304,
29901,
13,
1678,
4974,
318,
7720,
29889,
2029,
403,
29918,
18010,
3552,
29941,
29889,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29896,
29892,
29871,
29945,
876,
1275,
29871,
29953,
13,
1678,
4974,
318,
7720,
29889,
2029,
403,
29918,
18010,
3552,
29941,
29892,
29871,
29945,
29889,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29896,
876,
1275,
29871,
29955,
13,
1678,
4974,
318,
7720,
29889,
2029,
403,
29918,
18010,
3552,
29941,
29892,
29871,
29946,
29889,
29929,
29929,
29929,
29929,
29929,
29929,
29929,
29929,
29929,
29929,
29929,
876,
1275,
29871,
29906,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1243,
29918,
2029,
403,
29918,
18010,
580,
13,
2
] |
remoto/lib/__init__.py | ktdreyer/remoto | 0 | 90567 | """
This module is meant for vendorizing Python libraries. Most libraries will need
to have some ``sys.path`` alterations done unless they are doing relative
imports.
Do **not** add anything to this module that does not represent a vendorized
library.
Vendored libraries should go into the ``vendor`` directory and imported from
there. This is so we allow libraries that are installed normally to be imported
if the vendored module is not available.
The import dance here is done so that all other imports throught ceph-deploy
are kept the same regardless of where the module comes from.
The expected way to import execnet would look like this::
from remoto.lib import execnet
"""
import sys
import os
this_dir = os.path.abspath(os.path.dirname(__file__))
vendor_dir = os.path.join(this_dir, 'vendor')
try:
# vendored
if vendor_dir not in sys.path:
sys.path.insert(0, vendor_dir)
import execnet
except ImportError as err:
# normally installed
import execnet # noqa
| [
1,
9995,
13,
4013,
3883,
338,
6839,
363,
27042,
5281,
5132,
9562,
29889,
7849,
9562,
674,
817,
13,
517,
505,
777,
4954,
9675,
29889,
2084,
16159,
10551,
800,
2309,
6521,
896,
526,
2599,
6198,
13,
326,
4011,
29889,
13,
13,
6132,
3579,
1333,
1068,
788,
3099,
304,
445,
3883,
393,
947,
451,
2755,
263,
27042,
1891,
13,
5258,
29889,
13,
13,
29963,
355,
4395,
9562,
881,
748,
964,
278,
4954,
19167,
16159,
3884,
322,
19673,
515,
13,
12711,
29889,
910,
338,
577,
591,
2758,
9562,
393,
526,
5130,
12891,
304,
367,
19673,
13,
361,
278,
9691,
4395,
3883,
338,
451,
3625,
29889,
13,
13,
1576,
1053,
17948,
1244,
338,
2309,
577,
393,
599,
916,
24802,
1468,
1774,
2257,
561,
29899,
16519,
13,
598,
8126,
278,
1021,
17126,
310,
988,
278,
3883,
5304,
515,
29889,
13,
13,
1576,
3806,
982,
304,
1053,
2279,
1212,
723,
1106,
763,
445,
1057,
13,
13,
1678,
515,
1083,
3747,
29889,
1982,
1053,
2279,
1212,
13,
13,
15945,
29908,
13,
5215,
10876,
13,
5215,
2897,
13,
1366,
29918,
3972,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
876,
13,
19167,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1366,
29918,
3972,
29892,
525,
19167,
1495,
13,
13,
2202,
29901,
13,
1678,
396,
9691,
4395,
13,
1678,
565,
27042,
29918,
3972,
451,
297,
10876,
29889,
2084,
29901,
13,
4706,
10876,
29889,
2084,
29889,
7851,
29898,
29900,
29892,
27042,
29918,
3972,
29897,
13,
1678,
1053,
2279,
1212,
13,
19499,
16032,
2392,
408,
4589,
29901,
13,
1678,
396,
12891,
5130,
13,
1678,
1053,
2279,
1212,
29871,
396,
694,
25621,
13,
13,
2
] |
trlib/environments/wrappers/persistent_action_wrapper.py | albertometelli/pfqi | 2 | 111329 | <gh_stars>1-10
from gym.wrappers import TimeLimit
class PersistentActionWrapper(TimeLimit):
def __init__(self, env, persistence=1, gamma=1, max_episode_steps=None):
super(PersistentActionWrapper, self).__init__(env, max_episode_steps)
self.persistence = max(1, persistence)
self.gamma = gamma ** persistence
self.gamma_single_step = gamma
self._max_episode_single_steps = max_episode_steps
self.env._max_episode_steps = max_episode_steps
self._max_episode_steps = max_episode_steps // self.persistence + (max_episode_steps % self.persistence > 0)
def step(self, action):
cum_rew = 0.
remaining_single_steps = self._max_episode_single_steps - self._elapsed_single_steps
for i in range(min(self.persistence, remaining_single_steps)):
state, reward, done, info = self.env.step(action)
cum_rew += reward * self.gamma_single_step ** i
self._elapsed_single_steps += 1
if done:
break
# done is set to True by TimeLimit when the episode terminate due to the end of the horizon.
# We want done being set to True only when the environment set done to True.
if done and self._elapsed_single_steps == self._max_episode_single_steps:
done = False
self._elapsed_steps += 1
if self._elapsed_steps >= self._max_episode_steps:
info['PersistentActionWrapper.truncated'] = not done
return state, cum_rew, done, info
def reset(self, **kwargs):
self._elapsed_steps = 0
self._elapsed_single_steps = 0
return self.env.reset(**kwargs)
def render(self, mode='human'):
remaining_single_steps = self._max_episode_single_steps - self._elapsed_single_steps
for i in range(min(self.persistence, remaining_single_steps)):
super(PersistentActionWrapper, self).render(mode)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
330,
962,
29889,
29893,
336,
22437,
1053,
5974,
24445,
13,
13,
1990,
9034,
9696,
4276,
15646,
29898,
2481,
24445,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
8829,
29892,
3736,
11416,
29922,
29896,
29892,
330,
2735,
29922,
29896,
29892,
4236,
29918,
1022,
275,
356,
29918,
24530,
29922,
8516,
1125,
13,
13,
4706,
2428,
29898,
15136,
9696,
4276,
15646,
29892,
1583,
467,
1649,
2344,
12035,
6272,
29892,
4236,
29918,
1022,
275,
356,
29918,
24530,
29897,
13,
4706,
1583,
29889,
28249,
353,
4236,
29898,
29896,
29892,
3736,
11416,
29897,
13,
4706,
1583,
29889,
4283,
353,
330,
2735,
3579,
3736,
11416,
13,
4706,
1583,
29889,
4283,
29918,
14369,
29918,
10568,
353,
330,
2735,
13,
4706,
1583,
3032,
3317,
29918,
1022,
275,
356,
29918,
14369,
29918,
24530,
353,
4236,
29918,
1022,
275,
356,
29918,
24530,
13,
4706,
1583,
29889,
6272,
3032,
3317,
29918,
1022,
275,
356,
29918,
24530,
353,
4236,
29918,
1022,
275,
356,
29918,
24530,
13,
4706,
1583,
3032,
3317,
29918,
1022,
275,
356,
29918,
24530,
353,
4236,
29918,
1022,
275,
356,
29918,
24530,
849,
1583,
29889,
28249,
718,
313,
3317,
29918,
1022,
275,
356,
29918,
24530,
1273,
1583,
29889,
28249,
1405,
29871,
29900,
29897,
13,
13,
1678,
822,
4331,
29898,
1311,
29892,
3158,
1125,
13,
4706,
13299,
29918,
3973,
353,
29871,
29900,
29889,
13,
13,
4706,
9886,
29918,
14369,
29918,
24530,
353,
1583,
3032,
3317,
29918,
1022,
275,
356,
29918,
14369,
29918,
24530,
448,
1583,
3032,
295,
28170,
29918,
14369,
29918,
24530,
13,
4706,
363,
474,
297,
3464,
29898,
1195,
29898,
1311,
29889,
28249,
29892,
9886,
29918,
14369,
29918,
24530,
22164,
13,
9651,
2106,
29892,
20751,
29892,
2309,
29892,
5235,
353,
1583,
29889,
6272,
29889,
10568,
29898,
2467,
29897,
13,
9651,
13299,
29918,
3973,
4619,
20751,
334,
1583,
29889,
4283,
29918,
14369,
29918,
10568,
3579,
474,
13,
9651,
1583,
3032,
295,
28170,
29918,
14369,
29918,
24530,
4619,
29871,
29896,
13,
13,
9651,
565,
2309,
29901,
13,
18884,
2867,
13,
13,
4706,
396,
2309,
338,
731,
304,
5852,
491,
5974,
24445,
746,
278,
12720,
29504,
2861,
304,
278,
1095,
310,
278,
28205,
29889,
13,
4706,
396,
1334,
864,
2309,
1641,
731,
304,
5852,
871,
746,
278,
5177,
731,
2309,
304,
5852,
29889,
13,
4706,
565,
2309,
322,
1583,
3032,
295,
28170,
29918,
14369,
29918,
24530,
1275,
1583,
3032,
3317,
29918,
1022,
275,
356,
29918,
14369,
29918,
24530,
29901,
13,
9651,
2309,
353,
7700,
13,
13,
4706,
1583,
3032,
295,
28170,
29918,
24530,
4619,
29871,
29896,
13,
4706,
565,
1583,
3032,
295,
28170,
29918,
24530,
6736,
1583,
3032,
3317,
29918,
1022,
275,
356,
29918,
24530,
29901,
13,
9651,
5235,
1839,
15136,
9696,
4276,
15646,
29889,
509,
4661,
630,
2033,
353,
451,
2309,
13,
13,
4706,
736,
2106,
29892,
13299,
29918,
3973,
29892,
2309,
29892,
5235,
13,
13,
1678,
822,
10092,
29898,
1311,
29892,
3579,
19290,
1125,
13,
4706,
1583,
3032,
295,
28170,
29918,
24530,
353,
29871,
29900,
13,
4706,
1583,
3032,
295,
28170,
29918,
14369,
29918,
24530,
353,
29871,
29900,
13,
4706,
736,
1583,
29889,
6272,
29889,
12071,
29898,
1068,
19290,
29897,
13,
13,
1678,
822,
4050,
29898,
1311,
29892,
4464,
2433,
26029,
29374,
13,
4706,
9886,
29918,
14369,
29918,
24530,
353,
1583,
3032,
3317,
29918,
1022,
275,
356,
29918,
14369,
29918,
24530,
448,
1583,
3032,
295,
28170,
29918,
14369,
29918,
24530,
13,
4706,
363,
474,
297,
3464,
29898,
1195,
29898,
1311,
29889,
28249,
29892,
9886,
29918,
14369,
29918,
24530,
22164,
13,
9651,
2428,
29898,
15136,
9696,
4276,
15646,
29892,
1583,
467,
9482,
29898,
8513,
29897,
13,
2
] |
post.py | strickyak/gforth-transpiler | 2 | 122326 | # Filter to normalize how floating point numbers are printed
# to clean up diffs between gforth and transpiler output.
#
# python post.py < output > normalized_output
import re, sys
SEARCH_FLOAT = re.compile(r'([-]?([0-9]+[.][0-9]*|[0-9]*[.][0-9]+)([eE][-]?[0-9]+)?)(.*)$').search
for line in sys.stdin:
done, rest = '', line.rstrip()
while rest:
m = SEARCH_FLOAT(rest)
if not m:
done += rest
break
start, end = m.start(1), m.end(1)
front, middle, back = rest[:start], rest[start:end], rest[end:]
done += front + ('%.15g' % float(m.group(1)))
rest = back
# print 'TRANFORM', m.group(1), ('%.15g' % float(m.group(1)))
print done
| [
1,
396,
19916,
304,
4226,
675,
920,
16526,
1298,
3694,
526,
13350,
13,
29937,
304,
5941,
701,
2923,
29879,
1546,
330,
1454,
386,
322,
1301,
29886,
3955,
1962,
29889,
13,
29937,
13,
29937,
259,
3017,
1400,
29889,
2272,
529,
1962,
1405,
4226,
1891,
29918,
4905,
13,
13,
5215,
337,
29892,
10876,
13,
13,
1660,
1718,
3210,
29918,
29943,
3927,
1299,
353,
337,
29889,
12198,
29898,
29878,
29915,
4197,
29899,
29962,
29973,
4197,
29900,
29899,
29929,
10062,
29961,
29889,
3816,
29900,
29899,
29929,
14178,
29989,
29961,
29900,
29899,
29929,
14178,
29961,
29889,
3816,
29900,
29899,
29929,
10062,
29897,
4197,
29872,
29923,
3816,
29899,
29962,
29973,
29961,
29900,
29899,
29929,
10062,
6877,
5033,
5575,
1262,
2824,
4478,
13,
13,
1454,
1196,
297,
10876,
29889,
4172,
262,
29901,
13,
12,
15091,
29892,
1791,
353,
15516,
1196,
29889,
29878,
17010,
580,
13,
12,
8000,
1791,
29901,
13,
12,
12,
29885,
353,
3725,
1718,
3210,
29918,
29943,
3927,
1299,
29898,
5060,
29897,
13,
12,
12,
361,
451,
286,
29901,
13,
12,
12,
12,
15091,
4619,
1791,
13,
12,
12,
12,
8690,
13,
308,
12,
2962,
29892,
1095,
353,
286,
29889,
2962,
29898,
29896,
511,
286,
29889,
355,
29898,
29896,
29897,
13,
13,
308,
12,
8862,
29892,
7256,
29892,
1250,
353,
1791,
7503,
2962,
1402,
1791,
29961,
2962,
29901,
355,
1402,
1791,
29961,
355,
17531,
13,
13,
308,
12,
15091,
4619,
4565,
718,
6702,
15543,
29896,
29945,
29887,
29915,
1273,
5785,
29898,
29885,
29889,
2972,
29898,
29896,
4961,
13,
12,
12,
5060,
353,
1250,
13,
12,
12,
29937,
1596,
525,
26813,
19094,
742,
286,
29889,
2972,
29898,
29896,
511,
6702,
15543,
29896,
29945,
29887,
29915,
1273,
5785,
29898,
29885,
29889,
2972,
29898,
29896,
4961,
13,
12,
2158,
2309,
13,
2
] |
koocook_core/tests/test_support/test_quantity.py | KooCook/koocook-dj | 1 | 188579 | <filename>koocook_core/tests/test_support/test_quantity.py
import unittest
from koocook_core.support import quantity, unit
class TestQuantity(unittest.TestCase):
int_amounts = tuple(range(20))
float_amounts = tuple(x / 8 for x in range(20))
amounts = int_amounts + float_amounts
def setUp(self) -> None:
self.quantity1 = quantity.parse_quantity('1/3 g')
self.quantity2 = quantity.parse_quantity('2/3 g')
self.quantity3 = quantity.parse_quantity('3 g')
self.quantity4 = quantity.parse_quantity('1 g')
self.quantity5 = quantity.parse_quantity('4 g')
self.quantity6 = quantity.parse_quantity('4/3 g')
def test_quantity_amount_can_be_int(self):
for amount in TestQuantity.int_amounts:
with self.subTest(amount=amount):
try:
quantity.Quantity(amount, unit.MassUnit.GRAM)
except ValueError as e:
raise self.failureException(f'test raised {e.__class__.__name__} unexpectedly') from e
def test_quantity_amount_can_be_float(self):
for amount in TestQuantity.float_amounts:
with self.subTest(amount=amount):
try:
quantity.Quantity(amount, unit.MassUnit.GRAM)
except ValueError as e:
raise self.failureException(f'test raised {e.__class__.__name__} unexpectedly') from e
def test_quantity_unit_can_be_Unit(self):
for U in unit.units:
for u in U:
with self.subTest(unit=u):
try:
quantity.Quantity(1, u)
quantity.Quantity(2., u)
except ValueError as e:
raise self.failureException(f'test raised {e.__class__.__name__} unexpectedly') from e
def test_quantity_unit_can_be_str_symbol(self):
for U in unit.units:
for u in U:
with self.subTest(unit=u):
try:
quantity.Quantity(1, u.symbol)
quantity.Quantity(1.5, u.symbol)
except ValueError as e:
raise self.failureException(f'test raised {e.__class__.__name__} unexpectedly') from e
def test_quantity_unit_can_be_str_plural(self):
for U in unit.units:
for u in U:
with self.subTest(unit=u):
try:
quantity.Quantity(0.5, u.plural)
quantity.Quantity(1.5, u.plural)
except ValueError as e:
raise self.failureException(f'test raised {e.__class__.__name__} unexpectedly') from e
def test_quantity_unit_can_be_str_singular(self):
for U in unit.units:
for u in U:
with self.subTest(unit=u):
try:
quantity.Quantity(1, u.singular)
quantity.Quantity(1., u.singular)
except ValueError as e:
raise self.failureException(f'test raised {e.__class__.__name__} unexpectedly') from e
def test_parse_quantity_is_inverse_of_get_db_str(self):
for U in unit.units:
for u in U:
for amount in TestQuantity.amounts:
with self.subTest(amount=amount, unit=u):
try:
quantity.parse_quantity(quantity.Quantity(amount, u).get_db_str())
except ValueError as e:
raise self.failureException(f'test raised {e.__class__.__name__} unexpectedly') from e
def test_add_with_both_amount_are_fraction(self):
summation1 = self.quantity1 + self.quantity1
with self.subTest():
self.assertEqual(summation1, self.quantity2)
summation2 = self.quantity1 + self.quantity2
with self.subTest():
self.assertEqual(summation2, self.quantity4)
def test_add_with_both_amount_are_int(self):
summation = self.quantity3 + self.quantity4
self.assertEqual(summation, self.quantity5)
def test_add_fraction_with_int(self):
summation = self.quantity1 + self.quantity4
self.assertEqual(summation, self.quantity6)
def test_add_with_different_unit(self):
summation = quantity.parse_quantity('0.002 kg') + self.quantity4
self.assertEqual(summation, quantity.parse_quantity('0.003 kg'))
def test_with_same_quantity_many_times(self):
result = quantity.Quantity.mul_quantity(self.quantity1, self.quantity3)
self.assertEqual(result, self.quantity4)
def test_with_mul_same_unit(self):
result = self.quantity1 * self.quantity3
self.assertEqual(result, self.quantity4)
def test_with_mul_different_unit(self):
result = self.quantity4 * quantity.parse_quantity('3000 mg')
self.assertEqual(result, self.quantity3)
def test_with_div_same_unit(self):
result = self.quantity6 / self.quantity3
self.assertEqual(result, quantity.parse_quantity('4/9 g'))
def test_with_div_different_unit(self):
result = self.quantity5 / quantity.parse_quantity('2000 mg')
self.assertEqual(result, quantity.parse_quantity('2 g'))
def test_change_quantity_to_decimal(self):
with self.subTest():
self.assertEqual(self.quantity4.decimal, '1.0 gram')
self.assertEqual(self.quantity3.decimal, '3.0 grams')
| [
1,
529,
9507,
29958,
2901,
542,
2550,
29918,
3221,
29914,
21150,
29914,
1688,
29918,
5924,
29914,
1688,
29918,
22640,
29889,
2272,
13,
5215,
443,
27958,
13,
13,
3166,
5812,
542,
2550,
29918,
3221,
29889,
5924,
1053,
14728,
29892,
5190,
13,
13,
13,
1990,
4321,
22930,
537,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
938,
29918,
14506,
29879,
353,
18761,
29898,
3881,
29898,
29906,
29900,
876,
13,
1678,
5785,
29918,
14506,
29879,
353,
18761,
29898,
29916,
847,
29871,
29947,
363,
921,
297,
3464,
29898,
29906,
29900,
876,
13,
1678,
26999,
353,
938,
29918,
14506,
29879,
718,
5785,
29918,
14506,
29879,
13,
13,
1678,
822,
731,
3373,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
1583,
29889,
22640,
29896,
353,
14728,
29889,
5510,
29918,
22640,
877,
29896,
29914,
29941,
330,
1495,
13,
4706,
1583,
29889,
22640,
29906,
353,
14728,
29889,
5510,
29918,
22640,
877,
29906,
29914,
29941,
330,
1495,
13,
4706,
1583,
29889,
22640,
29941,
353,
14728,
29889,
5510,
29918,
22640,
877,
29941,
330,
1495,
13,
4706,
1583,
29889,
22640,
29946,
353,
14728,
29889,
5510,
29918,
22640,
877,
29896,
330,
1495,
13,
4706,
1583,
29889,
22640,
29945,
353,
14728,
29889,
5510,
29918,
22640,
877,
29946,
330,
1495,
13,
4706,
1583,
29889,
22640,
29953,
353,
14728,
29889,
5510,
29918,
22640,
877,
29946,
29914,
29941,
330,
1495,
13,
13,
1678,
822,
1243,
29918,
22640,
29918,
14506,
29918,
3068,
29918,
915,
29918,
524,
29898,
1311,
1125,
13,
4706,
363,
5253,
297,
4321,
22930,
537,
29889,
524,
29918,
14506,
29879,
29901,
13,
9651,
411,
1583,
29889,
1491,
3057,
29898,
14506,
29922,
14506,
1125,
13,
18884,
1018,
29901,
13,
462,
1678,
14728,
29889,
22930,
537,
29898,
14506,
29892,
5190,
29889,
29924,
465,
8325,
29889,
29954,
25058,
29897,
13,
18884,
5174,
7865,
2392,
408,
321,
29901,
13,
462,
1678,
12020,
1583,
29889,
14057,
545,
2451,
29898,
29888,
29915,
1688,
10425,
426,
29872,
17255,
1990,
1649,
17255,
978,
1649,
29913,
15668,
368,
1495,
515,
321,
13,
13,
1678,
822,
1243,
29918,
22640,
29918,
14506,
29918,
3068,
29918,
915,
29918,
7411,
29898,
1311,
1125,
13,
4706,
363,
5253,
297,
4321,
22930,
537,
29889,
7411,
29918,
14506,
29879,
29901,
13,
9651,
411,
1583,
29889,
1491,
3057,
29898,
14506,
29922,
14506,
1125,
13,
18884,
1018,
29901,
13,
462,
1678,
14728,
29889,
22930,
537,
29898,
14506,
29892,
5190,
29889,
29924,
465,
8325,
29889,
29954,
25058,
29897,
13,
18884,
5174,
7865,
2392,
408,
321,
29901,
13,
462,
1678,
12020,
1583,
29889,
14057,
545,
2451,
29898,
29888,
29915,
1688,
10425,
426,
29872,
17255,
1990,
1649,
17255,
978,
1649,
29913,
15668,
368,
1495,
515,
321,
13,
13,
1678,
822,
1243,
29918,
22640,
29918,
5441,
29918,
3068,
29918,
915,
29918,
8325,
29898,
1311,
1125,
13,
4706,
363,
501,
297,
5190,
29889,
348,
1169,
29901,
13,
9651,
363,
318,
297,
501,
29901,
13,
18884,
411,
1583,
29889,
1491,
3057,
29898,
5441,
29922,
29884,
1125,
13,
462,
1678,
1018,
29901,
13,
462,
4706,
14728,
29889,
22930,
537,
29898,
29896,
29892,
318,
29897,
13,
462,
4706,
14728,
29889,
22930,
537,
29898,
29906,
1696,
318,
29897,
13,
462,
1678,
5174,
7865,
2392,
408,
321,
29901,
13,
462,
4706,
12020,
1583,
29889,
14057,
545,
2451,
29898,
29888,
29915,
1688,
10425,
426,
29872,
17255,
1990,
1649,
17255,
978,
1649,
29913,
15668,
368,
1495,
515,
321,
13,
13,
1678,
822,
1243,
29918,
22640,
29918,
5441,
29918,
3068,
29918,
915,
29918,
710,
29918,
18098,
29898,
1311,
1125,
13,
4706,
363,
501,
297,
5190,
29889,
348,
1169,
29901,
13,
9651,
363,
318,
297,
501,
29901,
13,
18884,
411,
1583,
29889,
1491,
3057,
29898,
5441,
29922,
29884,
1125,
13,
462,
1678,
1018,
29901,
13,
462,
4706,
14728,
29889,
22930,
537,
29898,
29896,
29892,
318,
29889,
18098,
29897,
13,
462,
4706,
14728,
29889,
22930,
537,
29898,
29896,
29889,
29945,
29892,
318,
29889,
18098,
29897,
13,
462,
1678,
5174,
7865,
2392,
408,
321,
29901,
13,
462,
4706,
12020,
1583,
29889,
14057,
545,
2451,
29898,
29888,
29915,
1688,
10425,
426,
29872,
17255,
1990,
1649,
17255,
978,
1649,
29913,
15668,
368,
1495,
515,
321,
13,
13,
1678,
822,
1243,
29918,
22640,
29918,
5441,
29918,
3068,
29918,
915,
29918,
710,
29918,
572,
3631,
29898,
1311,
1125,
13,
4706,
363,
501,
297,
5190,
29889,
348,
1169,
29901,
13,
9651,
363,
318,
297,
501,
29901,
13,
18884,
411,
1583,
29889,
1491,
3057,
29898,
5441,
29922,
29884,
1125,
13,
462,
1678,
1018,
29901,
13,
462,
4706,
14728,
29889,
22930,
537,
29898,
29900,
29889,
29945,
29892,
318,
29889,
572,
3631,
29897,
13,
462,
4706,
14728,
29889,
22930,
537,
29898,
29896,
29889,
29945,
29892,
318,
29889,
572,
3631,
29897,
13,
462,
1678,
5174,
7865,
2392,
408,
321,
29901,
13,
462,
4706,
12020,
1583,
29889,
14057,
545,
2451,
29898,
29888,
29915,
1688,
10425,
426,
29872,
17255,
1990,
1649,
17255,
978,
1649,
29913,
15668,
368,
1495,
515,
321,
13,
13,
1678,
822,
1243,
29918,
22640,
29918,
5441,
29918,
3068,
29918,
915,
29918,
710,
29918,
2976,
1070,
29898,
1311,
1125,
13,
4706,
363,
501,
297,
5190,
29889,
348,
1169,
29901,
13,
9651,
363,
318,
297,
501,
29901,
13,
18884,
411,
1583,
29889,
1491,
3057,
29898,
5441,
29922,
29884,
1125,
13,
462,
1678,
1018,
29901,
13,
462,
4706,
14728,
29889,
22930,
537,
29898,
29896,
29892,
318,
29889,
2976,
1070,
29897,
13,
462,
4706,
14728,
29889,
22930,
537,
29898,
29896,
1696,
318,
29889,
2976,
1070,
29897,
13,
462,
1678,
5174,
7865,
2392,
408,
321,
29901,
13,
462,
4706,
12020,
1583,
29889,
14057,
545,
2451,
29898,
29888,
29915,
1688,
10425,
426,
29872,
17255,
1990,
1649,
17255,
978,
1649,
29913,
15668,
368,
1495,
515,
321,
13,
13,
1678,
822,
1243,
29918,
5510,
29918,
22640,
29918,
275,
29918,
262,
3901,
29918,
974,
29918,
657,
29918,
2585,
29918,
710,
29898,
1311,
1125,
13,
4706,
363,
501,
297,
5190,
29889,
348,
1169,
29901,
13,
9651,
363,
318,
297,
501,
29901,
13,
18884,
363,
5253,
297,
4321,
22930,
537,
29889,
14506,
29879,
29901,
13,
462,
1678,
411,
1583,
29889,
1491,
3057,
29898,
14506,
29922,
14506,
29892,
5190,
29922,
29884,
1125,
13,
462,
4706,
1018,
29901,
13,
462,
9651,
14728,
29889,
5510,
29918,
22640,
29898,
22640,
29889,
22930,
537,
29898,
14506,
29892,
318,
467,
657,
29918,
2585,
29918,
710,
3101,
13,
462,
4706,
5174,
7865,
2392,
408,
321,
29901,
13,
462,
9651,
12020,
1583,
29889,
14057,
545,
2451,
29898,
29888,
29915,
1688,
10425,
426,
29872,
17255,
1990,
1649,
17255,
978,
1649,
29913,
15668,
368,
1495,
515,
321,
13,
13,
1678,
822,
1243,
29918,
1202,
29918,
2541,
29918,
20313,
29918,
14506,
29918,
598,
29918,
29888,
13857,
29898,
1311,
1125,
13,
4706,
22792,
362,
29896,
353,
1583,
29889,
22640,
29896,
718,
1583,
29889,
22640,
29896,
13,
4706,
411,
1583,
29889,
1491,
3057,
7295,
13,
9651,
1583,
29889,
9294,
9843,
29898,
2083,
29885,
362,
29896,
29892,
1583,
29889,
22640,
29906,
29897,
13,
4706,
22792,
362,
29906,
353,
1583,
29889,
22640,
29896,
718,
1583,
29889,
22640,
29906,
13,
4706,
411,
1583,
29889,
1491,
3057,
7295,
13,
9651,
1583,
29889,
9294,
9843,
29898,
2083,
29885,
362,
29906,
29892,
1583,
29889,
22640,
29946,
29897,
13,
13,
1678,
822,
1243,
29918,
1202,
29918,
2541,
29918,
20313,
29918,
14506,
29918,
598,
29918,
524,
29898,
1311,
1125,
13,
4706,
22792,
362,
353,
1583,
29889,
22640,
29941,
718,
1583,
29889,
22640,
29946,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2083,
29885,
362,
29892,
1583,
29889,
22640,
29945,
29897,
13,
13,
1678,
822,
1243,
29918,
1202,
29918,
29888,
13857,
29918,
2541,
29918,
524,
29898,
1311,
1125,
13,
4706,
22792,
362,
353,
1583,
29889,
22640,
29896,
718,
1583,
29889,
22640,
29946,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2083,
29885,
362,
29892,
1583,
29889,
22640,
29953,
29897,
13,
13,
1678,
822,
1243,
29918,
1202,
29918,
2541,
29918,
29881,
15622,
29918,
5441,
29898,
1311,
1125,
13,
4706,
22792,
362,
353,
14728,
29889,
5510,
29918,
22640,
877,
29900,
29889,
29900,
29900,
29906,
12118,
1495,
718,
1583,
29889,
22640,
29946,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2083,
29885,
362,
29892,
14728,
29889,
5510,
29918,
22640,
877,
29900,
29889,
29900,
29900,
29941,
12118,
8785,
13,
13,
1678,
822,
1243,
29918,
2541,
29918,
17642,
29918,
22640,
29918,
13011,
29918,
3706,
29898,
1311,
1125,
13,
4706,
1121,
353,
14728,
29889,
22930,
537,
29889,
16109,
29918,
22640,
29898,
1311,
29889,
22640,
29896,
29892,
1583,
29889,
22640,
29941,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2914,
29892,
1583,
29889,
22640,
29946,
29897,
13,
13,
1678,
822,
1243,
29918,
2541,
29918,
16109,
29918,
17642,
29918,
5441,
29898,
1311,
1125,
13,
4706,
1121,
353,
1583,
29889,
22640,
29896,
334,
1583,
29889,
22640,
29941,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2914,
29892,
1583,
29889,
22640,
29946,
29897,
13,
13,
1678,
822,
1243,
29918,
2541,
29918,
16109,
29918,
29881,
15622,
29918,
5441,
29898,
1311,
1125,
13,
4706,
1121,
353,
1583,
29889,
22640,
29946,
334,
14728,
29889,
5510,
29918,
22640,
877,
29941,
29900,
29900,
29900,
286,
29887,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2914,
29892,
1583,
29889,
22640,
29941,
29897,
13,
13,
1678,
822,
1243,
29918,
2541,
29918,
4563,
29918,
17642,
29918,
5441,
29898,
1311,
1125,
13,
4706,
1121,
353,
1583,
29889,
22640,
29953,
847,
1583,
29889,
22640,
29941,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2914,
29892,
14728,
29889,
5510,
29918,
22640,
877,
29946,
29914,
29929,
330,
8785,
13,
13,
1678,
822,
1243,
29918,
2541,
29918,
4563,
29918,
29881,
15622,
29918,
5441,
29898,
1311,
1125,
13,
4706,
1121,
353,
1583,
29889,
22640,
29945,
847,
14728,
29889,
5510,
29918,
22640,
877,
29906,
29900,
29900,
29900,
286,
29887,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2914,
29892,
14728,
29889,
5510,
29918,
22640,
877,
29906,
330,
8785,
13,
13,
1678,
822,
1243,
29918,
3167,
29918,
22640,
29918,
517,
29918,
7099,
3039,
29898,
1311,
1125,
13,
4706,
411,
1583,
29889,
1491,
3057,
7295,
13,
9651,
1583,
29889,
9294,
9843,
29898,
1311,
29889,
22640,
29946,
29889,
7099,
3039,
29892,
525,
29896,
29889,
29900,
14961,
1495,
13,
9651,
1583,
29889,
9294,
9843,
29898,
1311,
29889,
22640,
29941,
29889,
7099,
3039,
29892,
525,
29941,
29889,
29900,
867,
2232,
1495,
13,
2
] |
PyFlow/ConfigManager.py | luzpaz/PyFlow | 1,463 | 1612332 | ## Copyright 2015-2019 <NAME>, <NAME>
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
## http://www.apache.org/licenses/LICENSE-2.0
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
import os
import json
from Qt import QtCore, QtGui
from PyFlow.Core.Common import *
from PyFlow.Input import InputAction, InputManager, InputActionType
@SingletonDecorator
class ConfigManager(object):
"""Responsible for registering configuration files, reading/writing values to registered config files by aliases, providing QSettings from registered aliases."""
CONFIGS_STORAGE = {}
CONFIGS_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), "Configs")
INPUT_CONFIG_PATH = os.path.join(CONFIGS_DIR, "input.json")
def __init__(self, *args, **kwargs):
self.registerConfigFile("PREFS", os.path.join(self.CONFIGS_DIR, "prefs.ini"))
self.registerConfigFile("APP_STATE", os.path.join(self.CONFIGS_DIR, "config.ini"))
if not os.path.exists(self.INPUT_CONFIG_PATH):
self.createDefaultInput()
data = InputManager().serialize()
if not os.path.exists(os.path.dirname(self.INPUT_CONFIG_PATH)):
os.makedirs(os.path.dirname(self.INPUT_CONFIG_PATH))
with open(self.INPUT_CONFIG_PATH, "w") as f:
json.dump(data, f)
else:
with open(self.INPUT_CONFIG_PATH, "r") as f:
data = json.load(f)
InputManager().loadFromData(data)
@staticmethod
def shouldRedirectOutput():
return ConfigManager().getPrefsValue("PREFS", "General/RedirectOutput") == "true"
def registerConfigFile(self, alias, absPath):
if alias not in self.CONFIGS_STORAGE:
self.CONFIGS_STORAGE[alias] = absPath
return True
return False
def getSettings(self, alias):
if alias in self.CONFIGS_STORAGE:
settings = QtCore.QSettings(self.CONFIGS_STORAGE[alias], QtCore.QSettings.IniFormat)
return settings
def getPrefsValue(self, configAlias, valueKey):
settings = self.getSettings(configAlias)
if settings:
if settings.contains(valueKey):
return settings.value(valueKey)
def createDefaultInput(self):
InputManager().registerAction(InputAction(name="Canvas.Pan", actionType=InputActionType.Mouse, group="Navigation", mouse=QtCore.Qt.MouseButton.MiddleButton))
InputManager().registerAction(InputAction(name="Canvas.Pan", actionType=InputActionType.Mouse, group="Navigation", mouse=QtCore.Qt.MouseButton.LeftButton, modifiers=QtCore.Qt.AltModifier))
InputManager().registerAction(InputAction(name="Canvas.Zoom", actionType=InputActionType.Mouse, group="Navigation", mouse=QtCore.Qt.MouseButton.RightButton))
InputManager().registerAction(InputAction(name="Canvas.FrameSelected", actionType=InputActionType.Keyboard, group="Navigation", key=QtCore.Qt.Key_F))
InputManager().registerAction(InputAction(name="Canvas.FrameAll", actionType=InputActionType.Keyboard, group="Navigation", key=QtCore.Qt.Key_H))
InputManager().registerAction(InputAction(name="Canvas.ZoomIn", actionType=InputActionType.Keyboard, group="Navigation", key=QtCore.Qt.Key_Equal, modifiers=QtCore.Qt.ControlModifier))
InputManager().registerAction(InputAction(name="Canvas.ZoomOut", actionType=InputActionType.Keyboard, group="Navigation", key=QtCore.Qt.Key_Minus, modifiers=QtCore.Qt.ControlModifier))
InputManager().registerAction(InputAction(name="Canvas.ResetScale", actionType=InputActionType.Keyboard, group="Navigation", key=QtCore.Qt.Key_R, modifiers=QtCore.Qt.ControlModifier))
InputManager().registerAction(InputAction(name="Canvas.AlignLeft", actionType=InputActionType.Keyboard, group="Refactoring", modifiers=QtCore.Qt.ControlModifier | QtCore.Qt.ShiftModifier, key=QtCore.Qt.Key_Left))
InputManager().registerAction(InputAction(name="Canvas.AlignTop", actionType=InputActionType.Keyboard, group="Refactoring", modifiers=QtCore.Qt.ControlModifier | QtCore.Qt.ShiftModifier, key=QtCore.Qt.Key_Up))
InputManager().registerAction(InputAction(name="Canvas.AlignRight", actionType=InputActionType.Keyboard, group="Refactoring", modifiers=QtCore.Qt.ControlModifier | QtCore.Qt.ShiftModifier, key=QtCore.Qt.Key_Right))
InputManager().registerAction(InputAction(name="Canvas.AlignBottom", actionType=InputActionType.Keyboard, group="Refactoring", modifiers=QtCore.Qt.ControlModifier | QtCore.Qt.ShiftModifier, key=QtCore.Qt.Key_Down))
InputManager().registerAction(InputAction(name="Canvas.Undo", actionType=InputActionType.Keyboard, group="Editing", modifiers=QtCore.Qt.ControlModifier, key=QtCore.Qt.Key_Z))
InputManager().registerAction(InputAction(name="Canvas.Redo", actionType=InputActionType.Keyboard, group="Editing", modifiers=QtCore.Qt.ControlModifier, key=QtCore.Qt.Key_Y))
InputManager().registerAction(InputAction(name="Canvas.KillSelected", actionType=InputActionType.Keyboard, group="Editing", key=QtCore.Qt.Key_Delete))
InputManager().registerAction(InputAction(name="Canvas.CopyNodes", actionType=InputActionType.Keyboard, group="Editing", key=QtCore.Qt.Key_C, modifiers=QtCore.Qt.ControlModifier))
InputManager().registerAction(InputAction(name="Canvas.CutNodes", actionType=InputActionType.Keyboard, group="Editing", key=QtCore.Qt.Key_X, modifiers=QtCore.Qt.ControlModifier))
InputManager().registerAction(InputAction(name="Canvas.DragCopyNodes", actionType=InputActionType.Mouse, group="Editing", mouse=QtCore.Qt.MouseButton.LeftButton, modifiers=QtCore.Qt.AltModifier))
InputManager().registerAction(InputAction(name="Canvas.DragCopyNodes", actionType=InputActionType.Mouse, group="Editing", mouse=QtCore.Qt.MouseButton.MiddleButton, modifiers=QtCore.Qt.AltModifier))
InputManager().registerAction(InputAction(name="Canvas.DragNodes", actionType=InputActionType.Mouse, group="Editing", mouse=QtCore.Qt.MouseButton.MiddleButton))
InputManager().registerAction(InputAction(name="Canvas.DragNodes", actionType=InputActionType.Mouse, group="Editing", mouse=QtCore.Qt.MouseButton.LeftButton))
InputManager().registerAction(InputAction(name="Canvas.DragChainedNodes", actionType=InputActionType.Mouse, group="Editing", mouse=QtCore.Qt.MouseButton.MiddleButton))
InputManager().registerAction(InputAction(name="Canvas.PasteNodes", actionType=InputActionType.Keyboard, group="Editing", key=QtCore.Qt.Key_V, modifiers=QtCore.Qt.ControlModifier))
InputManager().registerAction(InputAction(name="Canvas.DuplicateNodes", actionType=InputActionType.Keyboard, group="Editing", key=QtCore.Qt.Key_D, modifiers=QtCore.Qt.ControlModifier))
InputManager().registerAction(InputAction(name="Canvas.DisconnectPin", actionType=InputActionType.Mouse, group="Editing", mouse=QtCore.Qt.MouseButton.LeftButton, modifiers=QtCore.Qt.AltModifier))
InputManager().registerAction(InputAction(name="App.NewFile", actionType=InputActionType.Keyboard, group="IO", key=QtCore.Qt.Key_N, modifiers=QtCore.Qt.ControlModifier))
InputManager().registerAction(InputAction(name="App.Save", actionType=InputActionType.Keyboard, group="IO", key=QtCore.Qt.Key_S, modifiers=QtCore.Qt.ControlModifier))
InputManager().registerAction(InputAction(name="App.SaveAs", actionType=InputActionType.Keyboard, group="IO", key=QtCore.Qt.Key_S, modifiers=QtCore.Qt.ControlModifier | QtCore.Qt.ShiftModifier))
InputManager().registerAction(InputAction(name="App.Load", actionType=InputActionType.Keyboard, group="IO", key=QtCore.Qt.Key_O, modifiers=QtCore.Qt.ControlModifier))
| [
1,
444,
14187,
1266,
29871,
29906,
29900,
29896,
29945,
29899,
29906,
29900,
29896,
29929,
529,
5813,
10202,
529,
5813,
29958,
13,
13,
2277,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
2277,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
2277,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
13,
2277,
268,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
13,
2277,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
2277,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
2277,
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,
2277,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
2277,
27028,
1090,
278,
19245,
29889,
13,
13,
13,
5215,
2897,
13,
5215,
4390,
13,
13,
3166,
14705,
1053,
14705,
9203,
29892,
14705,
28707,
13,
13,
3166,
10772,
17907,
29889,
9203,
29889,
18877,
1053,
334,
13,
3166,
10772,
17907,
29889,
4290,
1053,
10567,
4276,
29892,
10567,
3260,
29892,
10567,
4276,
1542,
13,
13,
13,
29992,
10873,
11285,
6185,
272,
1061,
13,
1990,
12782,
3260,
29898,
3318,
1125,
13,
1678,
9995,
1666,
29886,
787,
1821,
363,
6036,
292,
5285,
2066,
29892,
5183,
29914,
16554,
1819,
304,
15443,
2295,
2066,
491,
14430,
2129,
29892,
13138,
660,
9585,
515,
15443,
14430,
2129,
1213,
15945,
13,
13,
1678,
8707,
3738,
10749,
29918,
1254,
1955,
10461,
353,
6571,
13,
13,
1678,
8707,
3738,
10749,
29918,
9464,
353,
2897,
29889,
2084,
29889,
7122,
29898,
359,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
8243,
376,
3991,
29879,
1159,
13,
1678,
2672,
12336,
29918,
25903,
29918,
10145,
353,
2897,
29889,
2084,
29889,
7122,
29898,
6007,
3738,
10749,
29918,
9464,
29892,
376,
2080,
29889,
3126,
1159,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
1583,
29889,
9573,
3991,
2283,
703,
15094,
9998,
613,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
6007,
3738,
10749,
29918,
9464,
29892,
376,
29886,
24539,
29889,
2172,
5783,
13,
4706,
1583,
29889,
9573,
3991,
2283,
703,
20576,
29918,
19713,
613,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
6007,
3738,
10749,
29918,
9464,
29892,
376,
2917,
29889,
2172,
5783,
13,
13,
4706,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
1311,
29889,
1177,
12336,
29918,
25903,
29918,
10145,
1125,
13,
9651,
1583,
29889,
3258,
4592,
4290,
580,
13,
9651,
848,
353,
10567,
3260,
2141,
643,
6646,
580,
13,
9651,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
359,
29889,
2084,
29889,
25721,
29898,
1311,
29889,
1177,
12336,
29918,
25903,
29918,
10145,
22164,
13,
18884,
2897,
29889,
29885,
12535,
12935,
29898,
359,
29889,
2084,
29889,
25721,
29898,
1311,
29889,
1177,
12336,
29918,
25903,
29918,
10145,
876,
13,
9651,
411,
1722,
29898,
1311,
29889,
1177,
12336,
29918,
25903,
29918,
10145,
29892,
376,
29893,
1159,
408,
285,
29901,
13,
18884,
4390,
29889,
15070,
29898,
1272,
29892,
285,
29897,
13,
4706,
1683,
29901,
13,
9651,
411,
1722,
29898,
1311,
29889,
1177,
12336,
29918,
25903,
29918,
10145,
29892,
376,
29878,
1159,
408,
285,
29901,
13,
18884,
848,
353,
4390,
29889,
1359,
29898,
29888,
29897,
13,
18884,
10567,
3260,
2141,
1359,
4591,
1469,
29898,
1272,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
881,
24735,
6466,
7295,
13,
4706,
736,
12782,
3260,
2141,
657,
29925,
24539,
1917,
703,
15094,
9998,
613,
376,
15263,
29914,
24735,
6466,
1159,
1275,
376,
3009,
29908,
13,
13,
1678,
822,
6036,
3991,
2283,
29898,
1311,
29892,
13995,
29892,
6425,
2605,
1125,
13,
4706,
565,
13995,
451,
297,
1583,
29889,
6007,
3738,
10749,
29918,
1254,
1955,
10461,
29901,
13,
9651,
1583,
29889,
6007,
3738,
10749,
29918,
1254,
1955,
10461,
29961,
19973,
29962,
353,
6425,
2605,
13,
9651,
736,
5852,
13,
4706,
736,
7700,
13,
13,
1678,
822,
679,
9585,
29898,
1311,
29892,
13995,
1125,
13,
4706,
565,
13995,
297,
1583,
29889,
6007,
3738,
10749,
29918,
1254,
1955,
10461,
29901,
13,
9651,
6055,
353,
14705,
9203,
29889,
29984,
9585,
29898,
1311,
29889,
6007,
3738,
10749,
29918,
1254,
1955,
10461,
29961,
19973,
1402,
14705,
9203,
29889,
29984,
9585,
29889,
797,
29875,
5809,
29897,
13,
9651,
736,
6055,
13,
13,
1678,
822,
679,
29925,
24539,
1917,
29898,
1311,
29892,
2295,
29909,
18849,
29892,
995,
2558,
1125,
13,
4706,
6055,
353,
1583,
29889,
657,
9585,
29898,
2917,
29909,
18849,
29897,
13,
4706,
565,
6055,
29901,
13,
9651,
565,
6055,
29889,
11516,
29898,
1767,
2558,
1125,
13,
18884,
736,
6055,
29889,
1767,
29898,
1767,
2558,
29897,
13,
13,
1678,
822,
1653,
4592,
4290,
29898,
1311,
1125,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
23684,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
14346,
29892,
2318,
543,
20245,
613,
9495,
29922,
17303,
9203,
29889,
17303,
29889,
14346,
3125,
29889,
25411,
3125,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
23684,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
14346,
29892,
2318,
543,
20245,
613,
9495,
29922,
17303,
9203,
29889,
17303,
29889,
14346,
3125,
29889,
8091,
3125,
29892,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
24528,
2111,
3709,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
29999,
29667,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
14346,
29892,
2318,
543,
20245,
613,
9495,
29922,
17303,
9203,
29889,
17303,
29889,
14346,
3125,
29889,
7341,
3125,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
4308,
8592,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
20245,
613,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
29943,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
4308,
3596,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
20245,
613,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
29950,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
29999,
29667,
797,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
20245,
613,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
9843,
29892,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
4809,
2111,
3709,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
29999,
29667,
3744,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
20245,
613,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
8140,
375,
29892,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
4809,
2111,
3709,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
27175,
17185,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
20245,
613,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
29934,
29892,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
4809,
2111,
3709,
876,
13,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
2499,
647,
8091,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
5620,
7168,
292,
613,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
4809,
2111,
3709,
891,
14705,
9203,
29889,
17303,
29889,
29657,
2111,
3709,
29892,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
8091,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
2499,
647,
7031,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
5620,
7168,
292,
613,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
4809,
2111,
3709,
891,
14705,
9203,
29889,
17303,
29889,
29657,
2111,
3709,
29892,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
3373,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
2499,
647,
7341,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
5620,
7168,
292,
613,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
4809,
2111,
3709,
891,
14705,
9203,
29889,
17303,
29889,
29657,
2111,
3709,
29892,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
7341,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
2499,
647,
15342,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
5620,
7168,
292,
613,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
4809,
2111,
3709,
891,
14705,
9203,
29889,
17303,
29889,
29657,
2111,
3709,
29892,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
6767,
876,
13,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
25263,
29877,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
6103,
292,
613,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
4809,
2111,
3709,
29892,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
29999,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
9039,
29877,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
6103,
292,
613,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
4809,
2111,
3709,
29892,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
29979,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
29968,
453,
8592,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
6103,
292,
613,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
12498,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
11882,
20284,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
6103,
292,
613,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
29907,
29892,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
4809,
2111,
3709,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
29907,
329,
20284,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
6103,
292,
613,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
29990,
29892,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
4809,
2111,
3709,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
23978,
11882,
20284,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
14346,
29892,
2318,
543,
6103,
292,
613,
9495,
29922,
17303,
9203,
29889,
17303,
29889,
14346,
3125,
29889,
8091,
3125,
29892,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
24528,
2111,
3709,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
23978,
11882,
20284,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
14346,
29892,
2318,
543,
6103,
292,
613,
9495,
29922,
17303,
9203,
29889,
17303,
29889,
14346,
3125,
29889,
25411,
3125,
29892,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
24528,
2111,
3709,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
23978,
20284,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
14346,
29892,
2318,
543,
6103,
292,
613,
9495,
29922,
17303,
9203,
29889,
17303,
29889,
14346,
3125,
29889,
25411,
3125,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
23978,
20284,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
14346,
29892,
2318,
543,
6103,
292,
613,
9495,
29922,
17303,
9203,
29889,
17303,
29889,
14346,
3125,
29889,
8091,
3125,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
23978,
1451,
7114,
20284,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
14346,
29892,
2318,
543,
6103,
292,
613,
9495,
29922,
17303,
9203,
29889,
17303,
29889,
14346,
3125,
29889,
25411,
3125,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
29925,
4350,
20284,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
6103,
292,
613,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
29963,
29892,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
4809,
2111,
3709,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
29928,
786,
5926,
20284,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
6103,
292,
613,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
29928,
29892,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
4809,
2111,
3709,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
21960,
29889,
4205,
6915,
29925,
262,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
14346,
29892,
2318,
543,
6103,
292,
613,
9495,
29922,
17303,
9203,
29889,
17303,
29889,
14346,
3125,
29889,
8091,
3125,
29892,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
24528,
2111,
3709,
876,
13,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
2052,
29889,
4373,
2283,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
5971,
613,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
29940,
29892,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
4809,
2111,
3709,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
2052,
29889,
11371,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
5971,
613,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
29903,
29892,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
4809,
2111,
3709,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
2052,
29889,
11371,
2887,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
5971,
613,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
29903,
29892,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
4809,
2111,
3709,
891,
14705,
9203,
29889,
17303,
29889,
29657,
2111,
3709,
876,
13,
4706,
10567,
3260,
2141,
9573,
4276,
29898,
4290,
4276,
29898,
978,
543,
2052,
29889,
5896,
613,
3158,
1542,
29922,
4290,
4276,
1542,
29889,
2558,
3377,
29892,
2318,
543,
5971,
613,
1820,
29922,
17303,
9203,
29889,
17303,
29889,
2558,
29918,
29949,
29892,
878,
14903,
29922,
17303,
9203,
29889,
17303,
29889,
4809,
2111,
3709,
876,
13,
2
] |
extraResources/electron-backend/routes/delete_toa_entry.py | vilaj46/ad1-ad2-briefs | 0 | 55884 | <reponame>vilaj46/ad1-ad2-briefs
from classes.Table_Of_Authorities import get_my_toa
def delete_toa_entry(IDNumber):
TABLE_OF_AUTHORITIES = get_my_toa()
old_entries = TABLE_OF_AUTHORITIES.data['entries']
index = TABLE_OF_AUTHORITIES.find_index_with_IDNumber(IDNumber)
if str(index) != 'False':
new_entries = old_entries[0:index] + \
old_entries[index + 1:len(old_entries)]
TABLE_OF_AUTHORITIES.set_entries(new_entries)
TABLE_OF_AUTHORITIES.set_entries_to_one()
TABLE_OF_AUTHORITIES.check_entries_for_errors()
return {
'entries': new_entries,
'toaEntriesError': TABLE_OF_AUTHORITIES.data['toaEntriesError'],
'toaNumbersError': TABLE_OF_AUTHORITIES.data['toaNumbersError']
}
else:
TABLE_OF_AUTHORITIES.set_entries_to_one()
return 'Something went wrong.', 404
| [
1,
529,
276,
1112,
420,
29958,
17191,
1175,
29946,
29953,
29914,
328,
29896,
29899,
328,
29906,
29899,
1182,
2575,
29879,
13,
3166,
4413,
29889,
3562,
29918,
2776,
29918,
13720,
1907,
1053,
679,
29918,
1357,
29918,
517,
29874,
13,
13,
13,
1753,
5217,
29918,
517,
29874,
29918,
8269,
29898,
1367,
4557,
1125,
13,
1678,
10911,
29918,
9800,
29918,
20656,
29950,
1955,
1806,
29059,
353,
679,
29918,
1357,
29918,
517,
29874,
580,
13,
1678,
2030,
29918,
26586,
353,
10911,
29918,
9800,
29918,
20656,
29950,
1955,
1806,
29059,
29889,
1272,
1839,
26586,
2033,
13,
1678,
2380,
353,
10911,
29918,
9800,
29918,
20656,
29950,
1955,
1806,
29059,
29889,
2886,
29918,
2248,
29918,
2541,
29918,
1367,
4557,
29898,
1367,
4557,
29897,
13,
13,
1678,
565,
851,
29898,
2248,
29897,
2804,
525,
8824,
2396,
13,
4706,
716,
29918,
26586,
353,
2030,
29918,
26586,
29961,
29900,
29901,
2248,
29962,
718,
320,
13,
9651,
2030,
29918,
26586,
29961,
2248,
718,
29871,
29896,
29901,
2435,
29898,
1025,
29918,
26586,
4638,
13,
13,
4706,
10911,
29918,
9800,
29918,
20656,
29950,
1955,
1806,
29059,
29889,
842,
29918,
26586,
29898,
1482,
29918,
26586,
29897,
13,
4706,
10911,
29918,
9800,
29918,
20656,
29950,
1955,
1806,
29059,
29889,
842,
29918,
26586,
29918,
517,
29918,
650,
580,
13,
4706,
10911,
29918,
9800,
29918,
20656,
29950,
1955,
1806,
29059,
29889,
3198,
29918,
26586,
29918,
1454,
29918,
12523,
580,
13,
4706,
736,
426,
13,
9651,
525,
26586,
2396,
716,
29918,
26586,
29892,
13,
9651,
525,
517,
29874,
5292,
2722,
2392,
2396,
10911,
29918,
9800,
29918,
20656,
29950,
1955,
1806,
29059,
29889,
1272,
1839,
517,
29874,
5292,
2722,
2392,
7464,
13,
9651,
525,
517,
29874,
29478,
2392,
2396,
10911,
29918,
9800,
29918,
20656,
29950,
1955,
1806,
29059,
29889,
1272,
1839,
517,
29874,
29478,
2392,
2033,
13,
4706,
500,
13,
1678,
1683,
29901,
13,
4706,
10911,
29918,
9800,
29918,
20656,
29950,
1955,
1806,
29059,
29889,
842,
29918,
26586,
29918,
517,
29918,
650,
580,
13,
4706,
736,
525,
16804,
3512,
2743,
29889,
742,
29871,
29946,
29900,
29946,
13,
2
] |
Class10_Test.py | Kiran1178/Python201901 | 0 | 164058 | # # ###
# #
# letter = input ("Please enter a letter:\n")
# if (letter == 'i'):
# print ("am lettera vowela")
# elif (letter== 'a'):
# print("am lettera vowela")
# if (letter == 'u'):
# print ("am lettera vowela")
# elif (letter== 'e'):
# print("am lettera vowela")
# if (letter == 'o'):
# print('am lettera vowela')
# else:
# print("am lettera vowela nye")
#
# if (letter=='i') | (letter=='a')|(letter=='u')|(letter=='e'):
# print('am lettera vowela')
# else:
# print('am lettera vowela')
# txt="Hello i have a Aieroplane"
# x=txt.split("hello", "i have a Aieroplane")
# print(x)
# #
# for i in v:
# if(i=='a' or i=='e' or i=='i' or i=='o' or i=='u'):
#
# print('i')
# print('e')
# print('a')
#
#
# n=int(input("enter the number:"))
# temp=n
# rev=0
# while(n>0):
# dig=n%10
# rev=rev*10+dig
# n=n//10
# if(temp==rev):
# print("The number is a palindrome!")
# else:
# print("The number is not a palindrome!")
#
# NUMBERS = ["zero", "one", "two","three","four","five","six","seven","eight","nine",
# "ten"]
# TENS = ["", "", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty",
# "ninety"]
# HUNNITS = ["","hundred","thousand","million","billion","trillion"]
#
# n = eval(input("What is the number the you want to convert? "))
# def convert():
# if n >= 20:
# tens = n // 10
# units = n % 10
#
# if units != 0:
# result = TENS[tens] + "-" + NUMBERS[units]
# else:
# result = TENS[tens]
# else:
# result = NUMBERS[n]
#
# print (result)
#
# def convert2():
# if n >=100:
# tens2 = n//100
# units2 = n%100
#
# if units2 != 0:
# result2 = HUNNITS[tens2] + "-" + TENS[tens2] + "and" + NUMBERS[units2]
# else:
# result2 = HUNNITS[tens2]
# else:
# result2 = HUNNITS[n]
#
# print(result2)
# def main():
# if n >=20 and n< 100:
# x = convert()
# if n >=100:
# y = convert2()
#
# main()
def check_vowels():
input_str = input("Enter string: ")
str_without_space = input_str.replace(' ', '')
if len([char for char in str_without_space if char in ['a', 'e', 'i', 'o', 'u']]) == len(input_str):
print("input contains all the vowels")
else:
print("string does not have all the vowels")
#
def check_palindrom():
num = input("Enter number")
if num == num[::-1]:
print("input is palindrome")
else:
print("input is not a palindrome")
check_palindrom()
#
def convert_Number_to_words():
dicto = {'0': 'zero', '1': 'one', '2': 'two', '3': 'three', '4': 'four', '5': 'five', '6': 'six', '7': 'seven', '8': 'eight', '9':'nine'}
num = input("Enter number: ")
try:
for item in list(str(num)):
print(dicto[item], end=' ')
except KeyError:
raise ("Invalid input")
| [
1,
396,
396,
835,
13,
29937,
396,
13,
29937,
5497,
353,
1881,
4852,
12148,
3896,
263,
5497,
3583,
29876,
1159,
13,
29937,
565,
313,
15670,
1275,
525,
29875,
29374,
13,
29937,
268,
1596,
4852,
314,
5497,
29874,
325,
340,
3100,
1159,
13,
29937,
25342,
313,
15670,
1360,
525,
29874,
29374,
13,
29937,
268,
1596,
703,
314,
5497,
29874,
325,
340,
3100,
1159,
13,
29937,
565,
313,
15670,
1275,
525,
29884,
29374,
13,
29937,
268,
1596,
4852,
314,
5497,
29874,
325,
340,
3100,
1159,
13,
29937,
25342,
313,
15670,
1360,
525,
29872,
29374,
13,
29937,
268,
1596,
703,
314,
5497,
29874,
325,
340,
3100,
1159,
13,
29937,
565,
313,
15670,
1275,
525,
29877,
29374,
13,
29937,
268,
1596,
877,
314,
5497,
29874,
325,
340,
3100,
1495,
13,
29937,
1683,
29901,
13,
29937,
268,
1596,
703,
314,
5497,
29874,
325,
340,
3100,
302,
4099,
1159,
13,
29937,
13,
29937,
565,
313,
15670,
1360,
29915,
29875,
1495,
891,
313,
15670,
1360,
29915,
29874,
1495,
29989,
29898,
15670,
1360,
29915,
29884,
1495,
29989,
29898,
15670,
1360,
29915,
29872,
29374,
13,
29937,
268,
1596,
877,
314,
5497,
29874,
325,
340,
3100,
1495,
13,
29937,
1683,
29901,
13,
29937,
308,
1596,
877,
314,
5497,
29874,
325,
340,
3100,
1495,
13,
29937,
13872,
543,
10994,
474,
505,
263,
319,
631,
459,
25821,
29908,
13,
29937,
921,
29922,
3945,
29889,
5451,
703,
12199,
613,
376,
29875,
505,
263,
319,
631,
459,
25821,
1159,
13,
29937,
1596,
29898,
29916,
29897,
13,
29937,
396,
13,
29937,
363,
474,
297,
325,
29901,
13,
29937,
268,
565,
29898,
29875,
1360,
29915,
29874,
29915,
470,
474,
1360,
29915,
29872,
29915,
470,
474,
1360,
29915,
29875,
29915,
470,
474,
1360,
29915,
29877,
29915,
470,
474,
1360,
29915,
29884,
29374,
13,
29937,
13,
29937,
308,
1596,
877,
29875,
1495,
13,
29937,
308,
1596,
877,
29872,
1495,
13,
29937,
308,
1596,
877,
29874,
1495,
13,
29937,
13,
29937,
13,
29937,
302,
29922,
524,
29898,
2080,
703,
5893,
278,
1353,
29901,
5783,
13,
29937,
5694,
29922,
29876,
13,
29937,
6664,
29922,
29900,
13,
29937,
1550,
29898,
29876,
29958,
29900,
1125,
13,
29937,
268,
4697,
29922,
29876,
29995,
29896,
29900,
13,
29937,
268,
6664,
29922,
13478,
29930,
29896,
29900,
29974,
7501,
13,
29937,
268,
302,
29922,
29876,
458,
29896,
29900,
13,
29937,
565,
29898,
7382,
1360,
13478,
1125,
13,
29937,
268,
1596,
703,
1576,
1353,
338,
263,
5112,
513,
4871,
29991,
1159,
13,
29937,
1683,
29901,
13,
29937,
268,
1596,
703,
1576,
1353,
338,
451,
263,
5112,
513,
4871,
29991,
1159,
13,
13,
29937,
13,
13,
29937,
28019,
13635,
29903,
353,
6796,
9171,
613,
376,
650,
613,
376,
10184,
3284,
17536,
3284,
17823,
3284,
20818,
3284,
28319,
3284,
344,
854,
3284,
29872,
523,
3284,
29876,
457,
613,
13,
29937,
18884,
376,
841,
3108,
13,
29937,
323,
1430,
29903,
353,
6796,
613,
12633,
376,
7516,
6478,
613,
376,
386,
13163,
613,
376,
3921,
29891,
613,
376,
28491,
1017,
613,
376,
1039,
29312,
613,
376,
344,
794,
29891,
613,
376,
29872,
523,
29891,
613,
13,
29937,
632,
376,
29876,
262,
3305,
3108,
13,
29937,
379,
3904,
29940,
1806,
29903,
353,
6796,
3284,
29882,
6453,
3284,
386,
681,
392,
3284,
19958,
291,
3284,
29890,
453,
291,
3284,
509,
453,
291,
3108,
13,
29937,
13,
29937,
302,
353,
19745,
29898,
2080,
703,
5618,
338,
278,
1353,
278,
366,
864,
304,
3588,
29973,
376,
876,
13,
29937,
822,
3588,
7295,
13,
29937,
268,
565,
302,
6736,
29871,
29906,
29900,
29901,
13,
29937,
308,
25187,
353,
302,
849,
29871,
29896,
29900,
13,
29937,
308,
10340,
353,
302,
1273,
29871,
29896,
29900,
13,
29937,
13,
29937,
308,
565,
10340,
2804,
29871,
29900,
29901,
13,
29937,
632,
1121,
353,
323,
1430,
29903,
29961,
29873,
575,
29962,
718,
11663,
29908,
718,
28019,
13635,
29903,
29961,
348,
1169,
29962,
13,
29937,
308,
1683,
29901,
13,
29937,
632,
1121,
353,
323,
1430,
29903,
29961,
29873,
575,
29962,
13,
29937,
268,
1683,
29901,
13,
29937,
308,
1121,
353,
28019,
13635,
29903,
29961,
29876,
29962,
13,
29937,
13,
29937,
268,
1596,
313,
2914,
29897,
13,
29937,
13,
29937,
822,
3588,
29906,
7295,
13,
29937,
268,
565,
302,
6736,
29896,
29900,
29900,
29901,
13,
29937,
308,
25187,
29906,
353,
302,
458,
29896,
29900,
29900,
13,
29937,
308,
10340,
29906,
353,
302,
29995,
29896,
29900,
29900,
13,
29937,
13,
29937,
308,
565,
10340,
29906,
2804,
29871,
29900,
29901,
13,
29937,
632,
1121,
29906,
353,
379,
3904,
29940,
1806,
29903,
29961,
29873,
575,
29906,
29962,
718,
11663,
29908,
718,
323,
1430,
29903,
29961,
29873,
575,
29906,
29962,
718,
376,
392,
29908,
718,
28019,
13635,
29903,
29961,
348,
1169,
29906,
29962,
13,
29937,
308,
1683,
29901,
13,
29937,
632,
1121,
29906,
353,
379,
3904,
29940,
1806,
29903,
29961,
29873,
575,
29906,
29962,
13,
29937,
268,
1683,
29901,
13,
29937,
308,
1121,
29906,
353,
379,
3904,
29940,
1806,
29903,
29961,
29876,
29962,
13,
29937,
13,
29937,
268,
1596,
29898,
2914,
29906,
29897,
13,
29937,
822,
1667,
7295,
13,
29937,
268,
565,
302,
6736,
29906,
29900,
322,
302,
29966,
29871,
29896,
29900,
29900,
29901,
13,
29937,
308,
921,
353,
3588,
580,
13,
29937,
268,
565,
302,
6736,
29896,
29900,
29900,
29901,
13,
29937,
308,
343,
353,
3588,
29906,
580,
13,
29937,
13,
29937,
1667,
580,
13,
13,
13,
1753,
1423,
29918,
29894,
340,
1379,
7295,
13,
1678,
1881,
29918,
710,
353,
1881,
703,
10399,
1347,
29901,
16521,
13,
1678,
851,
29918,
14037,
29918,
3493,
353,
1881,
29918,
710,
29889,
6506,
877,
13420,
27255,
13,
1678,
565,
7431,
4197,
3090,
363,
1373,
297,
851,
29918,
14037,
29918,
3493,
565,
1373,
297,
6024,
29874,
742,
525,
29872,
742,
525,
29875,
742,
525,
29877,
742,
525,
29884,
2033,
2314,
1275,
7431,
29898,
2080,
29918,
710,
1125,
13,
4706,
1596,
703,
2080,
3743,
599,
278,
325,
340,
1379,
1159,
13,
1678,
1683,
29901,
13,
4706,
1596,
703,
1807,
947,
451,
505,
599,
278,
325,
340,
1379,
1159,
13,
29937,
13,
1753,
1423,
29918,
7830,
513,
456,
7295,
13,
1678,
954,
353,
1881,
703,
10399,
1353,
1159,
13,
1678,
565,
954,
1275,
954,
29961,
1057,
29899,
29896,
5387,
13,
4706,
1596,
703,
2080,
338,
5112,
513,
4871,
1159,
13,
1678,
1683,
29901,
13,
4706,
1596,
703,
2080,
338,
451,
263,
5112,
513,
4871,
1159,
13,
3198,
29918,
7830,
513,
456,
580,
13,
29937,
13,
13,
1753,
3588,
29918,
4557,
29918,
517,
29918,
9303,
7295,
13,
1678,
12124,
517,
353,
11117,
29900,
2396,
525,
9171,
742,
525,
29896,
2396,
525,
650,
742,
525,
29906,
2396,
525,
10184,
742,
525,
29941,
2396,
525,
17536,
742,
525,
29946,
2396,
525,
17823,
742,
525,
29945,
2396,
525,
20818,
742,
525,
29953,
2396,
525,
28319,
742,
525,
29955,
2396,
525,
344,
854,
742,
525,
29947,
2396,
525,
29872,
523,
742,
525,
29929,
22099,
29876,
457,
10827,
13,
1678,
954,
353,
1881,
703,
10399,
1353,
29901,
16521,
13,
1678,
1018,
29901,
13,
4706,
363,
2944,
297,
1051,
29898,
710,
29898,
1949,
22164,
13,
9651,
1596,
29898,
27774,
517,
29961,
667,
1402,
1095,
2433,
25710,
13,
1678,
5174,
7670,
2392,
29901,
13,
4706,
12020,
4852,
13919,
1881,
1159,
13,
13,
2
] |
linter.py | Adarma/SublimeLinter-contrib-dxl | 1 | 87650 | <reponame>Adarma/SublimeLinter-contrib-dxl
#
# linter.py
# Linter for SublimeLinter, a code checking framework for Sublime Text 3
#
# Written by <NAME>
# Copyright (c) 2014 <NAME>
#
# License: MIT
#
"""This module exports the Dxl plugin class."""
from SublimeLinter.lint import Linter, util
from os.path import abspath, dirname, join, isfile
def LinterPath():
"""Ascertain the dxl.exe path from this .py files path because sublime.packages_path is unavailable at startup."""
ThisPath = abspath(dirname(__file__))
if isfile(ThisPath):
# We are in a .sublime-package file in the 'Installed Package' folder
return abspath(join(ThisPath, '..', '..', 'Packages', 'DXL', 'Lint', 'dxl.exe'))
else:
# We are in a subfolder of the 'Packages' folder
return abspath(join(ThisPath, '..', 'DXL', 'Lint', 'dxl.exe'))
LINTER_PATH = LinterPath()
class Dxl(Linter):
"""Provides an interface to dxl."""
defaults = {
'selector': 'source.dxl'
}
cmd = [LINTER_PATH]
regex = (
r'^-(?:(?P<error>E)|(?P<warning>W))- DXL:'
r' <(?P<path>.*?):(?P<line>[0-9]+)> '
r'''(?P<message>(?:undeclared variable|badly formed token|incorrect arguments? for(?: function)|Invalid '//<Requires>' syntax: Expected '#include '|could not (?:open|run) include file) \((?P<near>.*?)\).*|.*)'''
)
tempfile_suffix = 'dxl'
error_stream = util.STREAM_STDOUT
| [
1,
529,
276,
1112,
420,
29958,
3253,
22824,
29914,
4035,
28046,
29931,
1639,
29899,
21570,
29899,
8235,
29880,
13,
29937,
13,
29937,
301,
1639,
29889,
2272,
13,
29937,
365,
1639,
363,
3323,
28046,
29931,
1639,
29892,
263,
775,
8454,
6890,
363,
3323,
28046,
3992,
29871,
29941,
13,
29937,
13,
29937,
16849,
841,
491,
529,
5813,
29958,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29946,
529,
5813,
29958,
13,
29937,
13,
29937,
19245,
29901,
341,
1806,
13,
29937,
13,
13,
15945,
29908,
4013,
3883,
29586,
278,
360,
15524,
7079,
770,
1213,
15945,
13,
13,
3166,
3323,
28046,
29931,
1639,
29889,
27854,
1053,
365,
1639,
29892,
3667,
13,
3166,
2897,
29889,
2084,
1053,
633,
1028,
493,
29892,
4516,
978,
29892,
5988,
29892,
338,
1445,
13,
13,
1753,
365,
1639,
2605,
7295,
13,
1678,
9995,
29909,
1557,
13946,
278,
15414,
29880,
29889,
8097,
2224,
515,
445,
869,
2272,
2066,
2224,
1363,
1014,
28046,
29889,
8318,
29918,
2084,
338,
443,
16515,
472,
20234,
1213,
15945,
13,
1678,
910,
2605,
353,
633,
1028,
493,
29898,
25721,
22168,
1445,
1649,
876,
13,
1678,
565,
338,
1445,
29898,
4013,
2605,
1125,
13,
4706,
396,
1334,
526,
297,
263,
869,
1491,
28046,
29899,
5113,
934,
297,
278,
525,
3379,
4212,
22029,
29915,
4138,
13,
4706,
736,
633,
1028,
493,
29898,
7122,
29898,
4013,
2605,
29892,
525,
636,
742,
525,
636,
742,
525,
16638,
1179,
742,
525,
29928,
29990,
29931,
742,
525,
29931,
524,
742,
525,
8235,
29880,
29889,
8097,
8785,
13,
1678,
1683,
29901,
13,
4706,
396,
1334,
526,
297,
263,
1014,
12083,
310,
278,
525,
16638,
1179,
29915,
4138,
13,
4706,
736,
633,
1028,
493,
29898,
7122,
29898,
4013,
2605,
29892,
525,
636,
742,
525,
29928,
29990,
29931,
742,
525,
29931,
524,
742,
525,
8235,
29880,
29889,
8097,
8785,
13,
13,
23714,
4945,
29918,
10145,
353,
365,
1639,
2605,
580,
13,
13,
1990,
360,
15524,
29898,
29931,
1639,
1125,
13,
13,
1678,
9995,
1184,
29894,
2247,
385,
5067,
304,
15414,
29880,
1213,
15945,
13,
13,
1678,
21274,
353,
426,
13,
4706,
525,
14357,
2396,
525,
4993,
29889,
8235,
29880,
29915,
13,
1678,
500,
13,
13,
1678,
9920,
353,
518,
23714,
4945,
29918,
10145,
29962,
13,
13,
1678,
6528,
353,
313,
13,
4706,
364,
29915,
21583,
10780,
5919,
29973,
29925,
29966,
2704,
29958,
29923,
10531,
10780,
29925,
29966,
27392,
29958,
29956,
876,
29899,
360,
29990,
29931,
11283,
13,
4706,
364,
29915,
529,
10780,
29925,
29966,
2084,
29958,
5575,
29973,
1125,
10780,
29925,
29966,
1220,
24566,
29900,
29899,
29929,
10062,
15410,
525,
13,
4706,
364,
12008,
10780,
29925,
29966,
4906,
5961,
25825,
870,
687,
433,
1127,
2286,
29989,
12313,
368,
8429,
5993,
29989,
262,
15728,
6273,
29973,
363,
10780,
29901,
740,
10531,
13919,
525,
458,
29966,
1123,
339,
2658,
16299,
5877,
29901,
1222,
6021,
16321,
2856,
525,
29989,
26680,
451,
22308,
29901,
3150,
29989,
3389,
29897,
3160,
934,
29897,
320,
3552,
29973,
29925,
29966,
28502,
29958,
5575,
29973,
2144,
467,
29930,
29989,
5575,
29897,
12008,
13,
1678,
1723,
13,
13,
1678,
5694,
1445,
29918,
2146,
600,
861,
353,
525,
8235,
29880,
29915,
13,
1678,
1059,
29918,
5461,
353,
3667,
29889,
1254,
1525,
5194,
29918,
1254,
3970,
2692,
13,
2
] |
metameasure/test_metameasure.py | analyticsdept/py-metameasure | 0 | 198545 | <gh_stars>0
from metameasure import MetaMeasure
import unittest
class TestMetaMeasure(unittest.TestCase):
def setUp(self):
self.m = MetaMeasure(max_size_bytes=10000, reset_when_threshold_exceeded=True)
def test_byte_measure(self):
d = {}
self.assertEqual(self.m.measure(d), 64)
def test_max_bytes(self):
self.assertEqual(self.m.max_size_bytes, 10000)
def test_reset_when_threshold_exceeded(self):
self.assertEqual(self.m.reset_when_threshold_exceeded, True)
def test_kb_to_bytes(self):
expected = 1000
self.assertEqual(expected, self.m.bytes(kb=1))
def test_mb_to_bytes(self):
expected = 1000000
self.assertEqual(expected, self.m.bytes(mb=1))
def test_gb_to_bytes(self):
expected = 1000000000
self.assertEqual(expected, self.m.bytes(gb=1))
def test_tb_to_bytes(self):
expected = 1000000000000
self.assertEqual(expected, self.m.bytes(tb=1))
if __name__ == "__main__":
unittest.main() | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
1539,
420,
3745,
1053,
20553,
6816,
3745,
13,
5215,
443,
27958,
13,
13,
1990,
4321,
19346,
6816,
3745,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
1583,
29889,
29885,
353,
20553,
6816,
3745,
29898,
3317,
29918,
2311,
29918,
13193,
29922,
29896,
29900,
29900,
29900,
29900,
29892,
10092,
29918,
8256,
29918,
386,
12268,
29918,
735,
3947,
287,
29922,
5574,
29897,
13,
13,
1678,
822,
1243,
29918,
10389,
29918,
26658,
29898,
1311,
1125,
13,
4706,
270,
353,
6571,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1311,
29889,
29885,
29889,
26658,
29898,
29881,
511,
29871,
29953,
29946,
29897,
13,
13,
1678,
822,
1243,
29918,
3317,
29918,
13193,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1311,
29889,
29885,
29889,
3317,
29918,
2311,
29918,
13193,
29892,
29871,
29896,
29900,
29900,
29900,
29900,
29897,
13,
268,
13,
1678,
822,
1243,
29918,
12071,
29918,
8256,
29918,
386,
12268,
29918,
735,
3947,
287,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1311,
29889,
29885,
29889,
12071,
29918,
8256,
29918,
386,
12268,
29918,
735,
3947,
287,
29892,
5852,
29897,
13,
13,
1678,
822,
1243,
29918,
21066,
29918,
517,
29918,
13193,
29898,
1311,
1125,
13,
4706,
3806,
353,
29871,
29896,
29900,
29900,
29900,
13,
4706,
1583,
29889,
9294,
9843,
29898,
9684,
29892,
1583,
29889,
29885,
29889,
13193,
29898,
21066,
29922,
29896,
876,
13,
13,
1678,
822,
1243,
29918,
8337,
29918,
517,
29918,
13193,
29898,
1311,
1125,
13,
4706,
3806,
353,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
13,
4706,
1583,
29889,
9294,
9843,
29898,
9684,
29892,
1583,
29889,
29885,
29889,
13193,
29898,
8337,
29922,
29896,
876,
13,
13,
1678,
822,
1243,
29918,
26300,
29918,
517,
29918,
13193,
29898,
1311,
1125,
13,
4706,
3806,
353,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
13,
4706,
1583,
29889,
9294,
9843,
29898,
9684,
29892,
1583,
29889,
29885,
29889,
13193,
29898,
26300,
29922,
29896,
876,
13,
13,
1678,
822,
1243,
29918,
22625,
29918,
517,
29918,
13193,
29898,
1311,
1125,
13,
4706,
3806,
353,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
13,
4706,
1583,
29889,
9294,
9843,
29898,
9684,
29892,
1583,
29889,
29885,
29889,
13193,
29898,
22625,
29922,
29896,
876,
13,
13,
268,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
443,
27958,
29889,
3396,
580,
2
] |
tests/io/test_hdf.py | lepy/sdata | 1 | 111542 | <filename>tests/io/test_hdf.py
import sys
import os
import pandas as pd
modulepath = os.path.dirname(__file__)
sys.path.insert(0, os.path.join(modulepath, "..", "..", "..", "src"))
import sdata
import uuid
from sdata.io.hdf import FlatHDFDataStore
def test_flathdfstore():
store = FlatHDFDataStore("/tmp/flatstore1.h5", mode="w")
print(store)
assert len(store.keys())==0
data = sdata.Data(name="otto",
uuid=sdata.uuid_from_str("otto"),
table=pd.DataFrame({"a": [1, 2, 3]}),
description="Hallo\nSpencer")
store.put(data)
print(store.keys())
datac = data.copy()
datac.name = "otto2"
datac.uuid = 'b8315be85d9945579cf8dc6a80a62524'
datac.df["b"] = datac.df["a"] ** 2
datac.df
datac.metadata.add("force", 1.23, dtype="float", description="a force", label="F")
datac.metadata.add("runid", 123, dtype="int", description="a int", label="r")
print(datac)
store.put(datac)
store.keys()
ldata = store.get_data_by_uuid(data.uuid)
assert data.sha3_256 == ldata.sha3_256
ldatac = store.get_data_by_uuid('b8315be85d9945579cf8dc6a80a62524')
print(datac)
ldatac.metadata.df
print([ldatac.description])
print(ldatac.describe())
assert datac.sha3_256 == ldatac.sha3_256
store.close()
def test_flatstoreexample():
store = FlatHDFDataStore(filepath="/tmp/mystoreexample.h5")
data = sdata.Data(name="otto",
uuid="d4e97cedca6238bea16732ce88c1922f",
table=pd.DataFrame({"a": [1, 2, 3]}),
description="Hallo\nSpencer")
store.put(data)
loaded_data = store.get_data_by_uuid("d4e97cedca6238bea16732ce88c1922f")
assert data.sha3_256 == loaded_data.sha3_256
store.close() | [
1,
529,
9507,
29958,
21150,
29914,
601,
29914,
1688,
29918,
29882,
2176,
29889,
2272,
13,
5215,
10876,
13,
5215,
2897,
13,
5215,
11701,
408,
10518,
13,
13,
5453,
2084,
353,
2897,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
29897,
13,
13,
9675,
29889,
2084,
29889,
7851,
29898,
29900,
29892,
2897,
29889,
2084,
29889,
7122,
29898,
5453,
2084,
29892,
376,
636,
613,
376,
636,
613,
376,
636,
613,
376,
4351,
5783,
13,
13,
5215,
269,
1272,
13,
5215,
318,
5416,
13,
3166,
269,
1272,
29889,
601,
29889,
29882,
2176,
1053,
2379,
271,
29950,
4037,
1469,
9044,
13,
13,
1753,
1243,
29918,
1579,
493,
2176,
8899,
7295,
13,
1678,
3787,
353,
2379,
271,
29950,
4037,
1469,
9044,
11974,
7050,
29914,
20620,
8899,
29896,
29889,
29882,
29945,
613,
4464,
543,
29893,
1159,
13,
1678,
1596,
29898,
8899,
29897,
13,
1678,
4974,
7431,
29898,
8899,
29889,
8149,
3101,
1360,
29900,
13,
1678,
848,
353,
269,
1272,
29889,
1469,
29898,
978,
543,
9693,
613,
13,
462,
418,
318,
5416,
29922,
29879,
1272,
29889,
25118,
29918,
3166,
29918,
710,
703,
9693,
4968,
13,
462,
418,
1591,
29922,
15926,
29889,
17271,
3319,
29908,
29874,
1115,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29962,
9594,
13,
462,
418,
6139,
543,
29950,
26177,
29905,
29876,
29903,
2238,
2265,
1159,
13,
1678,
3787,
29889,
649,
29898,
1272,
29897,
13,
1678,
1596,
29898,
8899,
29889,
8149,
3101,
13,
13,
1678,
848,
29883,
353,
848,
29889,
8552,
580,
13,
1678,
848,
29883,
29889,
978,
353,
376,
9693,
29906,
29908,
13,
1678,
848,
29883,
29889,
25118,
353,
525,
29890,
29947,
29941,
29896,
29945,
915,
29947,
29945,
29881,
29929,
29929,
29946,
29945,
29945,
29955,
29929,
6854,
29947,
13891,
29953,
29874,
29947,
29900,
29874,
29953,
29906,
29945,
29906,
29946,
29915,
13,
1678,
848,
29883,
29889,
2176,
3366,
29890,
3108,
353,
848,
29883,
29889,
2176,
3366,
29874,
3108,
3579,
29871,
29906,
13,
1678,
848,
29883,
29889,
2176,
13,
1678,
848,
29883,
29889,
19635,
29889,
1202,
703,
10118,
613,
29871,
29896,
29889,
29906,
29941,
29892,
26688,
543,
7411,
613,
6139,
543,
29874,
4889,
613,
3858,
543,
29943,
1159,
13,
1678,
848,
29883,
29889,
19635,
29889,
1202,
703,
3389,
333,
613,
29871,
29896,
29906,
29941,
29892,
26688,
543,
524,
613,
6139,
543,
29874,
938,
613,
3858,
543,
29878,
1159,
13,
1678,
1596,
29898,
1272,
29883,
29897,
13,
1678,
3787,
29889,
649,
29898,
1272,
29883,
29897,
13,
1678,
3787,
29889,
8149,
580,
13,
13,
1678,
301,
1272,
353,
3787,
29889,
657,
29918,
1272,
29918,
1609,
29918,
25118,
29898,
1272,
29889,
25118,
29897,
13,
1678,
4974,
848,
29889,
17051,
29941,
29918,
29906,
29945,
29953,
1275,
301,
1272,
29889,
17051,
29941,
29918,
29906,
29945,
29953,
13,
13,
1678,
301,
1272,
29883,
353,
3787,
29889,
657,
29918,
1272,
29918,
1609,
29918,
25118,
877,
29890,
29947,
29941,
29896,
29945,
915,
29947,
29945,
29881,
29929,
29929,
29946,
29945,
29945,
29955,
29929,
6854,
29947,
13891,
29953,
29874,
29947,
29900,
29874,
29953,
29906,
29945,
29906,
29946,
1495,
13,
1678,
1596,
29898,
1272,
29883,
29897,
13,
1678,
301,
1272,
29883,
29889,
19635,
29889,
2176,
13,
1678,
1596,
4197,
430,
532,
29883,
29889,
8216,
2314,
13,
1678,
1596,
29898,
430,
532,
29883,
29889,
2783,
29581,
3101,
13,
13,
1678,
4974,
848,
29883,
29889,
17051,
29941,
29918,
29906,
29945,
29953,
1275,
301,
1272,
29883,
29889,
17051,
29941,
29918,
29906,
29945,
29953,
13,
13,
1678,
3787,
29889,
5358,
580,
13,
13,
1753,
1243,
29918,
20620,
8899,
4773,
7295,
13,
1678,
3787,
353,
2379,
271,
29950,
4037,
1469,
9044,
29898,
1445,
2084,
13802,
7050,
29914,
29885,
858,
487,
4773,
29889,
29882,
29945,
1159,
13,
13,
1678,
848,
353,
269,
1272,
29889,
1469,
29898,
978,
543,
9693,
613,
13,
462,
418,
318,
5416,
543,
29881,
29946,
29872,
29929,
29955,
1133,
1113,
29953,
29906,
29941,
29947,
915,
29874,
29896,
29953,
29955,
29941,
29906,
346,
29947,
29947,
29883,
29896,
29929,
29906,
29906,
29888,
613,
13,
462,
418,
1591,
29922,
15926,
29889,
17271,
3319,
29908,
29874,
1115,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29962,
9594,
13,
462,
418,
6139,
543,
29950,
26177,
29905,
29876,
29903,
2238,
2265,
1159,
13,
1678,
3787,
29889,
649,
29898,
1272,
29897,
13,
13,
1678,
7500,
29918,
1272,
353,
3787,
29889,
657,
29918,
1272,
29918,
1609,
29918,
25118,
703,
29881,
29946,
29872,
29929,
29955,
1133,
1113,
29953,
29906,
29941,
29947,
915,
29874,
29896,
29953,
29955,
29941,
29906,
346,
29947,
29947,
29883,
29896,
29929,
29906,
29906,
29888,
1159,
13,
1678,
4974,
848,
29889,
17051,
29941,
29918,
29906,
29945,
29953,
1275,
7500,
29918,
1272,
29889,
17051,
29941,
29918,
29906,
29945,
29953,
13,
1678,
3787,
29889,
5358,
580,
2
] |
linearmodels/tests/panel/results/parse_stata_results.py | clarityai-eng/linearmodels | 0 | 65337 | <filename>linearmodels/tests/panel/results/parse_stata_results.py
from io import StringIO
import os
from typing import List
import pandas as pd
from linearmodels.shared.utility import AttrDict
filename = "stata-panel-simulated-results.txt"
cwd = os.path.split(os.path.abspath(__file__))[0]
blocks = {}
block: List[str] = []
key = ""
with open(os.path.join(cwd, filename)) as results:
for line in results.readlines():
line = line.strip()
if not line:
continue
if "###!" in line:
if key:
blocks[key] = block
block = []
key = line.split("!")[1]
block.append(line)
if block:
blocks[key] = block
def parse_block(block):
params = {}
stats = {}
for i, line in enumerate(block):
if "b/t" in line:
params_start = i + 1
if "rss" in line:
stats_start = i
if "** Variance **" in line:
variance_start = i + 1
for i in range(params_start, stats_start, 3):
name, value = block[i].split("\t")
value = float(value)
tstat = float(block[i + 1])
pvalue = float(block[i + 1])
params[name] = pd.Series({"param": value, "tstat": tstat, "pvalue": pvalue})
params = pd.DataFrame(params).sort_index()
for i in range(stats_start, variance_start - 1):
if "\t" in block[i]:
name, value = block[i].split("\t")
stats[name] = float(value)
else:
stats[block[i]] = None
stats = pd.Series(stats)
var = "\n".join(block[variance_start + 1 :])
variance = pd.read_csv(StringIO("," + var.replace("\t", ",")))
index = variance.pop(variance.columns[0])
index.name = None
variance.index = index
out = AttrDict(variance=variance, params=params.T)
for key in stats.index:
out[key] = stats.loc[key]
return out
def data():
data_blocks = {}
for key in blocks:
data_blocks[key] = parse_block(blocks[key])
return data_blocks
if __name__ == "__main__":
print(data())
| [
1,
529,
9507,
29958,
10660,
9794,
29914,
21150,
29914,
15119,
29914,
9902,
29914,
5510,
29918,
303,
532,
29918,
9902,
29889,
2272,
13,
3166,
12013,
1053,
1714,
5971,
13,
5215,
2897,
13,
3166,
19229,
1053,
2391,
13,
13,
5215,
11701,
408,
10518,
13,
13,
3166,
5608,
9794,
29889,
12366,
29889,
329,
1793,
1053,
2180,
509,
21533,
13,
13,
9507,
353,
376,
303,
532,
29899,
15119,
29899,
3601,
7964,
29899,
9902,
29889,
3945,
29908,
13,
13,
29883,
9970,
353,
2897,
29889,
2084,
29889,
5451,
29898,
359,
29889,
2084,
29889,
370,
1028,
493,
22168,
1445,
1649,
876,
29961,
29900,
29962,
13,
1271,
29879,
353,
6571,
13,
1271,
29901,
2391,
29961,
710,
29962,
353,
5159,
13,
1989,
353,
5124,
13,
2541,
1722,
29898,
359,
29889,
2084,
29889,
7122,
29898,
29883,
9970,
29892,
10422,
876,
408,
2582,
29901,
13,
1678,
363,
1196,
297,
2582,
29889,
949,
9012,
7295,
13,
4706,
1196,
353,
1196,
29889,
17010,
580,
13,
4706,
565,
451,
1196,
29901,
13,
9651,
6773,
13,
4706,
565,
376,
2277,
29937,
3850,
297,
1196,
29901,
13,
9651,
565,
1820,
29901,
13,
18884,
10930,
29961,
1989,
29962,
353,
2908,
13,
9651,
2908,
353,
5159,
13,
9651,
1820,
353,
1196,
29889,
5451,
703,
29991,
1159,
29961,
29896,
29962,
13,
4706,
2908,
29889,
4397,
29898,
1220,
29897,
13,
1678,
565,
2908,
29901,
13,
4706,
10930,
29961,
1989,
29962,
353,
2908,
13,
13,
13,
1753,
6088,
29918,
1271,
29898,
1271,
1125,
13,
1678,
8636,
353,
6571,
13,
1678,
22663,
353,
6571,
13,
1678,
363,
474,
29892,
1196,
297,
26985,
29898,
1271,
1125,
13,
4706,
565,
376,
29890,
29914,
29873,
29908,
297,
1196,
29901,
13,
9651,
8636,
29918,
2962,
353,
474,
718,
29871,
29896,
13,
4706,
565,
376,
29878,
893,
29908,
297,
1196,
29901,
13,
9651,
22663,
29918,
2962,
353,
474,
13,
4706,
565,
376,
1068,
11681,
8837,
3579,
29908,
297,
1196,
29901,
13,
9651,
20162,
29918,
2962,
353,
474,
718,
29871,
29896,
13,
13,
1678,
363,
474,
297,
3464,
29898,
7529,
29918,
2962,
29892,
22663,
29918,
2962,
29892,
29871,
29941,
1125,
13,
4706,
1024,
29892,
995,
353,
2908,
29961,
29875,
1822,
5451,
14182,
29873,
1159,
13,
4706,
995,
353,
5785,
29898,
1767,
29897,
13,
4706,
260,
6112,
353,
5785,
29898,
1271,
29961,
29875,
718,
29871,
29896,
2314,
13,
4706,
282,
1767,
353,
5785,
29898,
1271,
29961,
29875,
718,
29871,
29896,
2314,
13,
4706,
8636,
29961,
978,
29962,
353,
10518,
29889,
19204,
3319,
29908,
3207,
1115,
995,
29892,
376,
29873,
6112,
1115,
260,
6112,
29892,
376,
29886,
1767,
1115,
282,
1767,
1800,
13,
1678,
8636,
353,
10518,
29889,
17271,
29898,
7529,
467,
6605,
29918,
2248,
580,
13,
1678,
363,
474,
297,
3464,
29898,
16202,
29918,
2962,
29892,
20162,
29918,
2962,
448,
29871,
29896,
1125,
13,
4706,
565,
6634,
29873,
29908,
297,
2908,
29961,
29875,
5387,
13,
9651,
1024,
29892,
995,
353,
2908,
29961,
29875,
1822,
5451,
14182,
29873,
1159,
13,
9651,
22663,
29961,
978,
29962,
353,
5785,
29898,
1767,
29897,
13,
4706,
1683,
29901,
13,
9651,
22663,
29961,
1271,
29961,
29875,
5262,
353,
6213,
13,
1678,
22663,
353,
10518,
29889,
19204,
29898,
16202,
29897,
13,
1678,
722,
353,
6634,
29876,
1642,
7122,
29898,
1271,
29961,
1707,
8837,
29918,
2962,
718,
29871,
29896,
584,
2314,
13,
1678,
20162,
353,
10518,
29889,
949,
29918,
7638,
29898,
1231,
5971,
29898,
3284,
718,
722,
29889,
6506,
14182,
29873,
613,
28796,
4961,
13,
1678,
2380,
353,
20162,
29889,
7323,
29898,
1707,
8837,
29889,
13099,
29961,
29900,
2314,
13,
1678,
2380,
29889,
978,
353,
6213,
13,
1678,
20162,
29889,
2248,
353,
2380,
13,
1678,
714,
353,
2180,
509,
21533,
29898,
1707,
8837,
29922,
1707,
8837,
29892,
8636,
29922,
7529,
29889,
29911,
29897,
13,
1678,
363,
1820,
297,
22663,
29889,
2248,
29901,
13,
4706,
714,
29961,
1989,
29962,
353,
22663,
29889,
2029,
29961,
1989,
29962,
13,
13,
1678,
736,
714,
13,
13,
13,
1753,
848,
7295,
13,
1678,
848,
29918,
1271,
29879,
353,
6571,
13,
1678,
363,
1820,
297,
10930,
29901,
13,
4706,
848,
29918,
1271,
29879,
29961,
1989,
29962,
353,
6088,
29918,
1271,
29898,
1271,
29879,
29961,
1989,
2314,
13,
1678,
736,
848,
29918,
1271,
29879,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1596,
29898,
1272,
3101,
13,
2
] |
Controller/controleTelas.py | IuriBritoDev/TKINO | 0 | 34715 | from View import telaRelatorio, telaNovoProjeto, telaAbrirProjeto, telaCadastro, telaConfigura, telaConexao, telaEditarControle, telaPopUp
from View.Painel import painelSensores, painelControladores, painelConexao
from View.Conexao import telaConAnalogAnalog, telaConAnalogDigit, telaConDigitAnalog, telaConDigitDigit
# Abre as telas da aba de seleção
def AbreTelaNovoProjeto(tela):
telaNovoProjeto.TelaNovoProjeto(tela)
def AbreTelaAbrirProjeto(tela):
telaAbrirProjeto.TelaAbrirProjeto(tela)
def AbreTelaRelatorio(tela):
telaRelatorio.TelaRelatorio(tela)
def AbreTelaCadastro(tela):
telaCadastro.TelaCadastro(tela)
def AbreTelaConfigura(tela):
telaConfigura.TelaConfigura(tela)
def AbreTelaConexao(tela):
telaConexao.TelaConexao(tela)
# Abre telas de conexões de atuadores
def AbreTelaConAnAn(tela):
telaConAnalogAnalog.TelaConAnalogAnalog(tela)
def AbreTelaConAnDig(tela):
telaConAnalogDigit.TelaConAnalogDig(tela)
def AbreTelaConDigAn(tela):
telaConDigitAnalog.TelaConDigAnalog(tela)
def AbreTelaConDigDig(tela):
telaConDigitDigit.TelaConDigDig(tela)
# Abre os frames das abas
def AbreFrameSensores(frame):
painelSensores.PainelSensores(frame)
def AbreFrameControladores(frame, tela):
painelControladores.PainelControladores(frame, tela)
def AbreFrameConexao(frame, tela):
painelConexao.PainelConexao(frame, tela)
# Abre telas de edição da conexão e controladores
def AbreEditorControlador(tela, controle):
telaEditarControle.TelaEditarControle(tela, controle)
# Abre telas de PopUP
def AbrePopUp(tela, mensagem):
telaPopUp.TelaPopUp(tela, mensagem) | [
1,
515,
4533,
1053,
260,
3100,
9662,
21392,
29892,
260,
3100,
29940,
6962,
1184,
4026,
29877,
29892,
260,
3100,
4920,
12416,
1184,
4026,
29877,
29892,
260,
3100,
29907,
328,
23364,
29892,
260,
3100,
3991,
2002,
29892,
260,
3100,
29907,
650,
29916,
6241,
29892,
260,
3100,
3853,
3673,
1323,
12154,
29892,
260,
3100,
12310,
3373,
13,
3166,
4533,
29889,
29925,
475,
295,
1053,
6788,
295,
29903,
575,
2361,
29892,
6788,
295,
4809,
7447,
29892,
6788,
295,
29907,
650,
29916,
6241,
13,
3166,
4533,
29889,
29907,
650,
29916,
6241,
1053,
260,
3100,
1168,
21067,
468,
21067,
468,
29892,
260,
3100,
1168,
21067,
468,
14991,
277,
29892,
260,
3100,
1168,
14991,
277,
21067,
468,
29892,
260,
3100,
1168,
14991,
277,
14991,
277,
29871,
13,
13,
13,
29937,
319,
1030,
408,
13547,
294,
1146,
633,
29874,
316,
16954,
2340,
13,
1753,
319,
1030,
29911,
3100,
29940,
6962,
1184,
4026,
29877,
29898,
29873,
3100,
1125,
13,
13,
1678,
260,
3100,
29940,
6962,
1184,
4026,
29877,
29889,
29911,
3100,
29940,
6962,
1184,
4026,
29877,
29898,
29873,
3100,
29897,
539,
13,
13,
1753,
319,
1030,
29911,
3100,
4920,
12416,
1184,
4026,
29877,
29898,
29873,
3100,
1125,
13,
13,
1678,
260,
3100,
4920,
12416,
1184,
4026,
29877,
29889,
29911,
3100,
4920,
12416,
1184,
4026,
29877,
29898,
29873,
3100,
29897,
29871,
13,
13,
1753,
319,
1030,
29911,
3100,
9662,
21392,
29898,
29873,
3100,
1125,
13,
13,
1678,
260,
3100,
9662,
21392,
29889,
29911,
3100,
9662,
21392,
29898,
29873,
3100,
29897,
13,
13,
1753,
319,
1030,
29911,
3100,
29907,
328,
23364,
29898,
29873,
3100,
1125,
13,
13,
1678,
260,
3100,
29907,
328,
23364,
29889,
29911,
3100,
29907,
328,
23364,
29898,
29873,
3100,
29897,
29871,
13,
13,
1753,
319,
1030,
29911,
3100,
3991,
2002,
29898,
29873,
3100,
1125,
13,
13,
1678,
260,
3100,
3991,
2002,
29889,
29911,
3100,
3991,
2002,
29898,
29873,
3100,
29897,
29871,
13,
13,
1753,
319,
1030,
29911,
3100,
29907,
650,
29916,
6241,
29898,
29873,
3100,
1125,
13,
13,
1678,
260,
3100,
29907,
650,
29916,
6241,
29889,
29911,
3100,
29907,
650,
29916,
6241,
29898,
29873,
3100,
29897,
29871,
13,
13,
29937,
319,
1030,
13547,
294,
316,
378,
735,
4420,
316,
472,
29884,
7447,
13,
1753,
319,
1030,
29911,
3100,
1168,
2744,
2744,
29898,
29873,
3100,
1125,
13,
13,
1678,
260,
3100,
1168,
21067,
468,
21067,
468,
29889,
29911,
3100,
1168,
21067,
468,
21067,
468,
29898,
29873,
3100,
29897,
29871,
13,
13,
1753,
319,
1030,
29911,
3100,
1168,
2744,
14991,
29898,
29873,
3100,
1125,
13,
13,
1678,
260,
3100,
1168,
21067,
468,
14991,
277,
29889,
29911,
3100,
1168,
21067,
468,
14991,
29898,
29873,
3100,
29897,
13,
13,
1753,
319,
1030,
29911,
3100,
1168,
14991,
2744,
29898,
29873,
3100,
1125,
13,
13,
1678,
260,
3100,
1168,
14991,
277,
21067,
468,
29889,
29911,
3100,
1168,
14991,
21067,
468,
29898,
29873,
3100,
29897,
13,
13,
1753,
319,
1030,
29911,
3100,
1168,
14991,
14991,
29898,
29873,
3100,
1125,
13,
13,
1678,
260,
3100,
1168,
14991,
277,
14991,
277,
29889,
29911,
3100,
1168,
14991,
14991,
29898,
29873,
3100,
29897,
13,
13,
29937,
319,
1030,
2897,
16608,
1697,
633,
294,
13,
1753,
319,
1030,
4308,
29903,
575,
2361,
29898,
2557,
1125,
13,
268,
13,
1678,
6788,
295,
29903,
575,
2361,
29889,
29925,
475,
295,
29903,
575,
2361,
29898,
2557,
29897,
29871,
13,
13,
1753,
319,
1030,
4308,
4809,
7447,
29898,
2557,
29892,
260,
3100,
1125,
13,
13,
1678,
6788,
295,
4809,
7447,
29889,
29925,
475,
295,
4809,
7447,
29898,
2557,
29892,
260,
3100,
29897,
29871,
13,
13,
1753,
319,
1030,
4308,
29907,
650,
29916,
6241,
29898,
2557,
29892,
260,
3100,
1125,
13,
13,
1678,
6788,
295,
29907,
650,
29916,
6241,
29889,
29925,
475,
295,
29907,
650,
29916,
6241,
29898,
2557,
29892,
260,
3100,
29897,
29871,
13,
13,
29937,
319,
1030,
13547,
294,
316,
1226,
12556,
1146,
378,
735,
1368,
321,
2761,
7447,
29871,
13,
1753,
319,
1030,
15280,
4809,
3136,
29898,
29873,
3100,
29892,
8239,
280,
1125,
13,
268,
13,
1678,
260,
3100,
3853,
3673,
1323,
12154,
29889,
29911,
3100,
3853,
3673,
1323,
12154,
29898,
29873,
3100,
29892,
8239,
280,
29897,
13,
13,
29937,
319,
1030,
13547,
294,
316,
6977,
4897,
13,
1753,
319,
1030,
12310,
3373,
29898,
29873,
3100,
29892,
18664,
13904,
1125,
13,
268,
13,
1678,
260,
3100,
12310,
3373,
29889,
29911,
3100,
12310,
3373,
29898,
29873,
3100,
29892,
18664,
13904,
29897,
2
] |
exercises/part2/common-architectures/attention_setup.py | jacobdanovitch/allennlp-guide | 0 | 101328 | import torch
from allennlp.modules.attention import (
DotProductAttention,
BilinearAttention,
LinearAttention,
)
from allennlp.modules.matrix_attention import (
DotProductMatrixAttention,
BilinearMatrixAttention,
LinearMatrixAttention,
)
from allennlp.nn import Activation
| [
1,
1053,
4842,
305,
13,
3166,
599,
2108,
22833,
29889,
7576,
29889,
1131,
2509,
1053,
313,
13,
1678,
360,
327,
7566,
4165,
2509,
29892,
13,
1678,
20347,
457,
279,
4165,
2509,
29892,
13,
1678,
22985,
4165,
2509,
29892,
13,
29897,
13,
3166,
599,
2108,
22833,
29889,
7576,
29889,
5344,
29918,
1131,
2509,
1053,
313,
13,
1678,
360,
327,
7566,
14609,
4165,
2509,
29892,
13,
1678,
20347,
457,
279,
14609,
4165,
2509,
29892,
13,
1678,
22985,
14609,
4165,
2509,
29892,
13,
29897,
13,
3166,
599,
2108,
22833,
29889,
15755,
1053,
21775,
362,
13,
2
] |
Subsets and Splits