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
|
---|---|---|---|---|---|
apps/server/tpr_server.py | SDRAST/Instruments_Radipower | 0 | 111397 | """
Dare! Total Power Radiometer server
Instead of superceding the inherited loggers it may be possible simply to
rename them.
"""
import logging
import signal
import sys
import time
from os.path import dirname
from support import NamedClass, check_permission, sync_second
from support.logs import get_loglevel, initiate_option_parser, init_logging
from support.logs import set_module_loggers
from support.pyro import PyroServerLauncher, PyroServer
from Electronics.Instruments.radiometer import Radiometer
from Electronics.Instruments.Radipower import find_radipowers
module_logger = logging.getLogger(__name__)
class RadiometerServer(PyroServer, Radiometer):
"""
Pyro server for the Radipower radiometer
Public Attributes::
datafile - file object to which the data are written
logger - logging.Logger object
run - True when server is running
Inherited from Radiometer::
integration - 2*update_interval for Nyquist sampling
last_reading - results of the last power meter reading
logger - logging.Logger object but superceded
pm_reader - DeviceReadThread object
reader_done - threading.Event object, set when reading has been taken
reader_started - threading.Event object, set when a reading is started
take_data - threading.Event object to signal readers to take reading
update_interval - inverse of reading rate
Inherited from Pyroserver::
logger - logging.Logger object but superceded
run - True if server is running
"""
help_text = """
change_rate(rate) - change sampling rate to 'rate' samples per second
get_readings() - return the most recent set of readings
stop - stop the radiometer server
"""
def __init__(self, name, logpath="/var/tmp/", rate=1./60):
"""
Initialize a Radipower radiometer server
At present with a Raspberry Pi controller the maximum rate is about 1/s.
@param name : name for the Pyro nameserver
@type name : str
@param logpath : directory for the radiometer datafiles
@type logpath : str
@param rate : number of readings per second
@type rate : float
"""
super(RadiometerServer,self).__init__()
# Replaces inherited logger
self.logger = logging.getLogger(module_logger.name+".RadiometerServer")
self.logger.debug(" superclass initialized")
if check_permission('ops') == False:
raise RuntimeError("Insufficient permission to access USB")
pm = find_radipowers()
self.logger.debug(" initializing")
Radiometer.__init__(self, pm, rate=rate)
# Open power logging file:
self.open_datafile(logpath)
self.run = True
self.start()
def stop(self):
"""
Stops the radiometer and closes the datafile
"""
self.close() # for the Radiometer
self.datafile.close()
self.logger.info("close: finished.")
def open_datafile(self, logpath):
"""
Opens the datafile
The filename is RMYYY-DDD-HHMM.csv
@param logpath : directory for the radiometer datafiles
@type logpath : str
"""
filename = time.strftime("RM%Y-%j-%H%M.csv", time.gmtime(time.time()))
self.datafile = open(logpath+filename,"w")
def change_rate(self, rate):
"""
Change the reading rate
Closes the datafile, sets the new rate and open a new datafile.
"""
# ? suspend the read threads
# pause the timer
signal.setitimer(signal.ITIMER_REAL, 0)
# close the data file
logpath = dirname(self.datafile.name)
self.datafile.close()
# set the new rate
self.set_rate(rate)
# open a new data file
self.open_datafile(logpath+"/")
# ? resume the read threads
# resume the timer
sync_second()
signal.setitimer(signal.ITIMER_REAL, self.update_interval, self.update_interval)
def help(self):
return RadiometerServer.help_text
if __name__ == "__main__":
def main(name):
"""
Starts a Pyro server launcher which launches the radiometer server
Provides command line options for logging and starts the top-level logger.
"""
p = initiate_option_parser("Dare! Total Power Radiometer server",
"""Generic Pyro server which servers as a template for actual servers.""")
# Add other options here
opts, args = p.parse_args(sys.argv[1:])
# This cannot be delegated to another module or class
mylogger = init_logging(logging.getLogger(),
loglevel = get_loglevel(opts.file_loglevel),
consolevel = get_loglevel(opts.stderr_loglevel),
logname = opts.logpath+name+".log")
mylogger.debug(" Handlers: %s", mylogger.handlers)
loggers = set_module_loggers(eval(opts.modloglevels))
# specify the name by which the Pyro task is known
psl = PyroServerLauncher(name+"Server", nameserver_host="crux")
m = RadiometerServer(name, logpath=opts.logpath+name+"/") # identifier for the hardware
psl.start(m)
# clean up after the server stops
psl.finish()
main("Radiometer")
| [
1,
9995,
13,
29928,
598,
29991,
14990,
9206,
4957,
29875,
8328,
1923,
13,
13,
3379,
1479,
310,
2428,
1133,
292,
278,
23878,
1480,
5743,
372,
1122,
367,
1950,
3763,
304,
29871,
13,
1267,
420,
963,
29889,
13,
15945,
29908,
13,
5215,
12183,
13,
5215,
7182,
13,
5215,
10876,
13,
5215,
931,
13,
3166,
2897,
29889,
2084,
1053,
4516,
978,
13,
13,
3166,
2304,
1053,
405,
2795,
2385,
29892,
1423,
29918,
16074,
29892,
16523,
29918,
7496,
13,
3166,
2304,
29889,
20756,
1053,
679,
29918,
1188,
5563,
29892,
14511,
403,
29918,
3385,
29918,
16680,
29892,
2069,
29918,
21027,
13,
3166,
2304,
29889,
20756,
1053,
731,
29918,
5453,
29918,
1188,
5743,
13,
3166,
2304,
29889,
2272,
307,
1053,
10772,
307,
6004,
17641,
261,
29892,
10772,
307,
6004,
13,
3166,
28251,
1199,
29889,
3379,
582,
1860,
29889,
3665,
29875,
8328,
1053,
4957,
29875,
8328,
13,
3166,
28251,
1199,
29889,
3379,
582,
1860,
29889,
9908,
666,
1680,
1053,
1284,
29918,
3665,
666,
340,
414,
13,
13,
5453,
29918,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
268,
13,
1990,
4957,
29875,
8328,
6004,
29898,
19737,
307,
6004,
29892,
4957,
29875,
8328,
1125,
13,
29871,
9995,
13,
29871,
10772,
307,
1923,
363,
278,
4957,
666,
1680,
17937,
8328,
13,
259,
13,
29871,
5236,
6212,
5026,
1057,
13,
1678,
848,
1445,
448,
934,
1203,
304,
607,
278,
848,
526,
3971,
13,
1678,
17927,
259,
448,
12183,
29889,
16363,
1203,
13,
1678,
1065,
418,
448,
5852,
746,
1923,
338,
2734,
13,
29871,
512,
2276,
1573,
515,
4957,
29875,
8328,
1057,
13,
1678,
13465,
268,
448,
29871,
29906,
29930,
5504,
29918,
19207,
363,
16693,
339,
391,
23460,
13,
1678,
1833,
29918,
19715,
1678,
448,
2582,
310,
278,
1833,
3081,
11134,
5183,
13,
1678,
17927,
3986,
448,
12183,
29889,
16363,
1203,
541,
2428,
1133,
287,
13,
1678,
26354,
29918,
16950,
539,
448,
21830,
6359,
4899,
1203,
13,
1678,
9591,
29918,
15091,
268,
448,
3244,
292,
29889,
2624,
1203,
29892,
731,
746,
5183,
756,
1063,
4586,
13,
1678,
9591,
29918,
2962,
287,
29871,
448,
3244,
292,
29889,
2624,
1203,
29892,
731,
746,
263,
5183,
338,
4687,
13,
1678,
2125,
29918,
1272,
539,
448,
3244,
292,
29889,
2624,
1203,
304,
7182,
22176,
304,
2125,
5183,
13,
1678,
2767,
29918,
19207,
448,
16402,
310,
5183,
6554,
13,
29871,
512,
2276,
1573,
515,
10772,
307,
2974,
1057,
13,
1678,
17927,
448,
12183,
29889,
16363,
1203,
541,
2428,
1133,
287,
13,
1678,
1065,
1678,
448,
5852,
565,
1923,
338,
2734,
13,
29871,
9995,
13,
29871,
1371,
29918,
726,
353,
9995,
13,
29871,
1735,
29918,
10492,
29898,
10492,
29897,
448,
1735,
23460,
6554,
304,
525,
10492,
29915,
11916,
639,
1473,
13,
29871,
679,
29918,
949,
886,
580,
1678,
448,
736,
278,
1556,
7786,
731,
310,
1303,
886,
13,
29871,
5040,
795,
448,
5040,
278,
17937,
8328,
1923,
13,
29871,
9995,
13,
13,
29871,
822,
4770,
2344,
12035,
1311,
29892,
1024,
29892,
1480,
2084,
13802,
1707,
29914,
7050,
29914,
613,
6554,
29922,
29896,
6904,
29953,
29900,
1125,
13,
1678,
9995,
13,
1678,
25455,
263,
4957,
666,
1680,
17937,
8328,
1923,
13,
268,
13,
1678,
2180,
2198,
411,
263,
390,
4692,
16344,
7362,
4701,
278,
7472,
6554,
338,
1048,
29871,
29896,
29914,
29879,
29889,
13,
268,
13,
1678,
732,
3207,
1024,
584,
1024,
363,
278,
10772,
307,
2983,
261,
369,
13,
1678,
732,
1853,
29871,
1024,
584,
851,
13,
268,
13,
1678,
732,
3207,
1480,
2084,
584,
3884,
363,
278,
17937,
8328,
848,
5325,
13,
1678,
732,
1853,
29871,
1480,
2084,
584,
851,
13,
268,
13,
1678,
732,
3207,
6554,
584,
1353,
310,
1303,
886,
639,
1473,
13,
1678,
732,
1853,
29871,
6554,
584,
5785,
13,
1678,
9995,
13,
1678,
2428,
29898,
9908,
29875,
8328,
6004,
29892,
1311,
467,
1649,
2344,
1649,
580,
13,
1678,
396,
10088,
6048,
23878,
17927,
13,
1678,
1583,
29889,
21707,
353,
12183,
29889,
657,
16363,
29898,
5453,
29918,
21707,
29889,
978,
29974,
1642,
9908,
29875,
8328,
6004,
1159,
13,
1678,
1583,
29889,
21707,
29889,
8382,
703,
2428,
1990,
16601,
1159,
13,
1678,
565,
1423,
29918,
16074,
877,
3554,
1495,
1275,
7700,
29901,
13,
418,
12020,
24875,
2392,
703,
797,
2146,
4543,
10751,
304,
2130,
12951,
1159,
13,
1678,
26354,
353,
1284,
29918,
3665,
666,
340,
414,
580,
13,
1678,
1583,
29889,
21707,
29889,
8382,
703,
2847,
5281,
1159,
13,
1678,
4957,
29875,
8328,
17255,
2344,
12035,
1311,
29892,
26354,
29892,
6554,
29922,
10492,
29897,
13,
1678,
396,
4673,
3081,
12183,
934,
29901,
13,
1678,
1583,
29889,
3150,
29918,
1272,
1445,
29898,
1188,
2084,
29897,
13,
1678,
1583,
29889,
3389,
353,
5852,
13,
1678,
1583,
29889,
2962,
580,
13,
259,
13,
29871,
822,
5040,
29898,
1311,
1125,
13,
1678,
9995,
13,
1678,
624,
3554,
278,
17937,
8328,
322,
4694,
267,
278,
848,
1445,
13,
1678,
9995,
13,
1678,
1583,
29889,
5358,
580,
396,
363,
278,
4957,
29875,
8328,
13,
1678,
1583,
29889,
1272,
1445,
29889,
5358,
580,
13,
1678,
1583,
29889,
21707,
29889,
3888,
703,
5358,
29901,
7743,
23157,
13,
13,
29871,
822,
1722,
29918,
1272,
1445,
29898,
1311,
29892,
1480,
2084,
1125,
13,
1678,
9995,
13,
1678,
6461,
575,
278,
848,
1445,
13,
268,
13,
1678,
450,
10422,
338,
390,
29924,
14995,
29979,
29899,
7858,
29928,
29899,
27590,
7428,
29889,
7638,
13,
268,
13,
1678,
732,
3207,
1480,
2084,
584,
3884,
363,
278,
17937,
8328,
848,
5325,
13,
1678,
732,
1853,
29871,
1480,
2084,
584,
851,
13,
1678,
9995,
13,
1678,
10422,
353,
931,
29889,
710,
615,
603,
703,
29934,
29924,
29995,
29979,
19222,
29926,
19222,
29950,
29995,
29924,
29889,
7638,
613,
931,
29889,
29887,
29885,
2230,
29898,
2230,
29889,
2230,
22130,
13,
1678,
1583,
29889,
1272,
1445,
353,
1722,
29898,
1188,
2084,
29974,
9507,
1699,
29893,
1159,
13,
539,
13,
29871,
822,
1735,
29918,
10492,
29898,
1311,
29892,
6554,
1125,
13,
1678,
9995,
13,
1678,
10726,
278,
5183,
6554,
13,
268,
13,
1678,
2233,
15806,
278,
848,
1445,
29892,
6166,
278,
716,
6554,
322,
1722,
263,
716,
848,
1445,
29889,
13,
1678,
9995,
13,
1678,
396,
1577,
8872,
355,
278,
1303,
9717,
13,
1678,
396,
19957,
278,
12237,
13,
1678,
7182,
29889,
842,
277,
4193,
29898,
25436,
29889,
1806,
7833,
1001,
29918,
1525,
1964,
29892,
29871,
29900,
29897,
13,
1678,
396,
3802,
278,
848,
934,
13,
1678,
1480,
2084,
353,
4516,
978,
29898,
1311,
29889,
1272,
1445,
29889,
978,
29897,
13,
1678,
1583,
29889,
1272,
1445,
29889,
5358,
580,
13,
1678,
396,
731,
278,
716,
6554,
13,
1678,
1583,
29889,
842,
29918,
10492,
29898,
10492,
29897,
13,
1678,
396,
1722,
263,
716,
848,
934,
13,
1678,
1583,
29889,
3150,
29918,
1272,
1445,
29898,
1188,
2084,
13578,
29914,
1159,
13,
1678,
396,
1577,
620,
2017,
278,
1303,
9717,
13,
1678,
396,
620,
2017,
278,
12237,
13,
1678,
16523,
29918,
7496,
580,
13,
1678,
7182,
29889,
842,
277,
4193,
29898,
25436,
29889,
1806,
7833,
1001,
29918,
1525,
1964,
29892,
1583,
29889,
5504,
29918,
19207,
29892,
1583,
29889,
5504,
29918,
19207,
29897,
13,
13,
29871,
822,
1371,
29898,
1311,
1125,
13,
1678,
736,
4957,
29875,
8328,
6004,
29889,
8477,
29918,
726,
13,
268,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
13,
29871,
822,
1667,
29898,
978,
1125,
13,
1678,
9995,
13,
1678,
624,
5708,
263,
10772,
307,
1923,
6826,
261,
607,
6826,
267,
278,
17937,
8328,
1923,
13,
268,
13,
1678,
9133,
2247,
1899,
1196,
3987,
363,
12183,
322,
8665,
278,
2246,
29899,
5563,
17927,
29889,
13,
1678,
9995,
13,
1678,
282,
353,
14511,
403,
29918,
3385,
29918,
16680,
703,
29928,
598,
29991,
14990,
9206,
4957,
29875,
8328,
1923,
613,
13,
268,
9995,
15809,
10772,
307,
1923,
607,
12424,
408,
263,
4472,
363,
3935,
12424,
1213,
29908,
1159,
13,
1678,
396,
3462,
916,
3987,
1244,
13,
259,
13,
1678,
29111,
29892,
6389,
353,
282,
29889,
5510,
29918,
5085,
29898,
9675,
29889,
19218,
29961,
29896,
29901,
2314,
13,
259,
13,
1678,
396,
910,
2609,
367,
16000,
630,
304,
1790,
3883,
470,
770,
13,
1678,
590,
21707,
353,
2069,
29918,
21027,
29898,
21027,
29889,
657,
16363,
3285,
13,
462,
9651,
1480,
5563,
259,
353,
679,
29918,
1188,
5563,
29898,
25707,
29889,
1445,
29918,
1188,
5563,
511,
13,
462,
9651,
2991,
955,
353,
679,
29918,
1188,
5563,
29898,
25707,
29889,
303,
20405,
29918,
1188,
5563,
511,
13,
462,
9651,
1480,
978,
1678,
353,
29111,
29889,
1188,
2084,
29974,
978,
29974,
1642,
1188,
1159,
13,
1678,
590,
21707,
29889,
8382,
703,
5166,
9306,
29901,
1273,
29879,
613,
590,
21707,
29889,
3179,
9306,
29897,
13,
1678,
1480,
5743,
353,
731,
29918,
5453,
29918,
1188,
5743,
29898,
14513,
29898,
25707,
29889,
1545,
1188,
5563,
29879,
876,
13,
13,
1678,
396,
6084,
278,
1024,
491,
607,
278,
10772,
307,
3414,
338,
2998,
13,
1678,
282,
2536,
353,
10772,
307,
6004,
17641,
261,
29898,
978,
13578,
6004,
613,
2983,
261,
369,
29918,
3069,
543,
29883,
582,
29916,
1159,
13,
1678,
286,
353,
4957,
29875,
8328,
6004,
29898,
978,
29892,
1480,
2084,
29922,
25707,
29889,
1188,
2084,
29974,
978,
13578,
29914,
1159,
396,
15882,
363,
278,
12837,
13,
1678,
282,
2536,
29889,
2962,
29898,
29885,
29897,
13,
1678,
396,
5941,
701,
1156,
278,
1923,
17726,
13,
1678,
282,
2536,
29889,
4951,
728,
580,
13,
259,
13,
29871,
1667,
703,
9908,
29875,
8328,
1159,
13,
2
] |
python/orca/example/torchmodel/train/resnet_finetune/resnet_finetune.py | DirkFi/BigDL | 3 | 145196 | #
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from optparse import OptionParser
import torchvision
import torch.nn as nn
import torch.nn.functional as F
from pyspark.sql.types import StringType, DoubleType
from pyspark.sql.functions import col, udf
from bigdl.dllib.optim.optimizer import *
from bigdl.dllib.nncontext import *
from bigdl.dllib.feature.image import *
from bigdl.orca import init_orca_context, stop_orca_context
from bigdl.orca.torch import TorchModel, TorchLoss
from bigdl.dllib.nnframes import *
from bigdl.dllib.keras.metrics import Accuracy
from bigdl.dllib.utils.utils import detect_conda_env_name
# Define model with Pytorch
class CatDogModel(nn.Module):
def __init__(self):
super(CatDogModel, self).__init__()
self.features = torchvision.models.resnet18(pretrained=True)
# freeze weight update
for parameter in self.features.parameters():
parameter.requires_grad_(False)
self.dense1 = nn.Linear(1000, 2)
def forward(self, x):
# freeze BatchNorm
self.features.eval()
x = self.features(x)
x = F.log_softmax(self.dense1(x), dim=1)
return x
if __name__ == '__main__':
parser = OptionParser()
parser.add_option("--executor-cores", type=int, dest="cores", default=4, help="number of executor cores")
parser.add_option("--num-executors", type=int, dest="executors", default=16, help="number of executors")
parser.add_option("--executor-memory", type=str, dest="executorMemory", default="30g", help="executor memory")
parser.add_option("--driver-memory", type=str, dest="driverMemory", default="30g", help="driver memory")
parser.add_option("--deploy-mode", type=str, dest="deployMode", default="local", help="deploy mode, local, yarn-client or yarn-cluster")
(options, args) = parser.parse_args(sys.argv)
hadoop_conf = os.environ.get('HADOOP_CONF_DIR')
sc = init_orca_context(cluster_mode=options.deployMode, hadoop_conf=hadoop_conf)
model = CatDogModel()
zoo_model = TorchModel.from_pytorch(model)
def lossFunc(input, target):
return nn.NLLLoss().forward(input, target.flatten().long())
zoo_loss = TorchLoss.from_pytorch(lossFunc)
# prepare training data as Spark DataFrame
image_path = sys.argv[1]
imageDF = NNImageReader.readImages(image_path, sc, resizeH=256, resizeW=256, image_codec=1)
getName = udf(lambda row: os.path.basename(row[0]), StringType())
getLabel = udf(lambda name: 1.0 if name.startswith('cat') else 0.0, DoubleType())
labelDF = imageDF.withColumn("name", getName(col("image"))) \
.withColumn("label", getLabel(col('name'))).cache()
(trainingDF, validationDF) = labelDF.randomSplit([0.9, 0.1])
# run training and evaluation
featureTransformer = ChainedPreprocessing(
[RowToImageFeature(), ImageCenterCrop(224, 224),
ImageChannelNormalize(123.0, 117.0, 104.0, 255.0, 255.0, 255.0),
ImageMatToTensor(), ImageFeatureToTensor()])
classifier = NNClassifier(zoo_model, zoo_loss, featureTransformer) \
.setLearningRate(0.001) \
.setBatchSize(16) \
.setMaxEpoch(1) \
.setFeaturesCol("image") \
.setCachingSample(False) \
.setValidation(EveryEpoch(), validationDF, [Accuracy()], 16)
catdogModel = classifier.fit(trainingDF)
shift = udf(lambda p: p - 1, DoubleType())
predictionDF = catdogModel.transform(validationDF) \
.withColumn("prediction", shift(col('prediction'))).cache()
correct = predictionDF.filter("label=prediction").count()
overall = predictionDF.count()
accuracy = correct * 1.0 / overall
predictionDF.sample(False, 0.1).show()
# expecting: accuracy around 95%
print("Validation accuracy = {}, correct {}, total {}".format(accuracy, correct, overall))
| [
1,
396,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29953,
450,
7997,
19558,
13189,
943,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
29937,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
268,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
29937,
13,
29937,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
29937,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
13,
29937,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
27028,
1090,
278,
19245,
29889,
13,
29937,
13,
3166,
3523,
5510,
1053,
10831,
11726,
13,
5215,
4842,
305,
4924,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
5215,
4842,
305,
29889,
15755,
29889,
2220,
284,
408,
383,
13,
3166,
282,
952,
6378,
29889,
2850,
29889,
8768,
1053,
1714,
1542,
29892,
11599,
1542,
13,
3166,
282,
952,
6378,
29889,
2850,
29889,
12171,
1053,
784,
29892,
318,
2176,
13,
3166,
4802,
11671,
29889,
11671,
1982,
29889,
20640,
29889,
20640,
3950,
1053,
334,
13,
3166,
4802,
11671,
29889,
11671,
1982,
29889,
15755,
4703,
1053,
334,
13,
3166,
4802,
11671,
29889,
11671,
1982,
29889,
14394,
29889,
3027,
1053,
334,
13,
3166,
4802,
11671,
29889,
272,
1113,
1053,
2069,
29918,
272,
1113,
29918,
4703,
29892,
5040,
29918,
272,
1113,
29918,
4703,
13,
3166,
4802,
11671,
29889,
272,
1113,
29889,
7345,
305,
1053,
4794,
305,
3195,
29892,
4794,
305,
29931,
2209,
13,
3166,
4802,
11671,
29889,
11671,
1982,
29889,
15755,
19935,
1053,
334,
13,
3166,
4802,
11671,
29889,
11671,
1982,
29889,
3946,
294,
29889,
2527,
10817,
1053,
4831,
332,
4135,
13,
3166,
4802,
11671,
29889,
11671,
1982,
29889,
13239,
29889,
13239,
1053,
6459,
29918,
18050,
29918,
6272,
29918,
978,
13,
13,
13,
29937,
22402,
1904,
411,
349,
3637,
25350,
13,
1990,
10459,
29928,
468,
3195,
29898,
15755,
29889,
7355,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
2428,
29898,
9694,
29928,
468,
3195,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
22100,
353,
4842,
305,
4924,
29889,
9794,
29889,
690,
1212,
29896,
29947,
29898,
1457,
3018,
1312,
29922,
5574,
29897,
13,
4706,
396,
3889,
911,
7688,
2767,
13,
4706,
363,
3443,
297,
1583,
29889,
22100,
29889,
16744,
7295,
13,
9651,
3443,
29889,
276,
339,
2658,
29918,
5105,
23538,
8824,
29897,
13,
4706,
1583,
29889,
1145,
344,
29896,
353,
302,
29876,
29889,
12697,
29898,
29896,
29900,
29900,
29900,
29892,
29871,
29906,
29897,
13,
13,
1678,
822,
6375,
29898,
1311,
29892,
921,
1125,
13,
4706,
396,
3889,
911,
350,
905,
29940,
555,
13,
4706,
1583,
29889,
22100,
29889,
14513,
580,
13,
4706,
921,
353,
1583,
29889,
22100,
29898,
29916,
29897,
13,
4706,
921,
353,
383,
29889,
1188,
29918,
2695,
3317,
29898,
1311,
29889,
1145,
344,
29896,
29898,
29916,
511,
3964,
29922,
29896,
29897,
13,
4706,
736,
921,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
13,
1678,
13812,
353,
10831,
11726,
580,
13,
1678,
13812,
29889,
1202,
29918,
3385,
703,
489,
4258,
3406,
29899,
29883,
2361,
613,
1134,
29922,
524,
29892,
2731,
543,
29883,
2361,
613,
2322,
29922,
29946,
29892,
1371,
543,
4537,
310,
2279,
3406,
28337,
1159,
13,
1678,
13812,
29889,
1202,
29918,
3385,
703,
489,
1949,
29899,
4258,
29560,
613,
1134,
29922,
524,
29892,
2731,
543,
4258,
29560,
613,
2322,
29922,
29896,
29953,
29892,
1371,
543,
4537,
310,
6704,
943,
1159,
13,
1678,
13812,
29889,
1202,
29918,
3385,
703,
489,
4258,
3406,
29899,
14834,
613,
1134,
29922,
710,
29892,
2731,
543,
4258,
3406,
16015,
613,
2322,
543,
29941,
29900,
29887,
613,
1371,
543,
4258,
3406,
3370,
1159,
13,
1678,
13812,
29889,
1202,
29918,
3385,
703,
489,
9465,
29899,
14834,
613,
1134,
29922,
710,
29892,
2731,
543,
9465,
16015,
613,
2322,
543,
29941,
29900,
29887,
613,
1371,
543,
9465,
3370,
1159,
13,
1678,
13812,
29889,
1202,
29918,
3385,
703,
489,
16519,
29899,
8513,
613,
1134,
29922,
710,
29892,
2731,
543,
16519,
6818,
613,
2322,
543,
2997,
613,
1371,
543,
16519,
4464,
29892,
1887,
29892,
343,
2753,
29899,
4645,
470,
343,
2753,
29899,
19594,
1159,
13,
1678,
313,
6768,
29892,
6389,
29897,
353,
13812,
29889,
5510,
29918,
5085,
29898,
9675,
29889,
19218,
29897,
13,
13,
1678,
750,
26793,
29918,
5527,
353,
2897,
29889,
21813,
29889,
657,
877,
29950,
3035,
29949,
4590,
29918,
6007,
29943,
29918,
9464,
1495,
13,
13,
1678,
885,
353,
2069,
29918,
272,
1113,
29918,
4703,
29898,
19594,
29918,
8513,
29922,
6768,
29889,
16519,
6818,
29892,
750,
26793,
29918,
5527,
29922,
22075,
29918,
5527,
29897,
13,
1678,
1904,
353,
10459,
29928,
468,
3195,
580,
13,
1678,
22424,
29918,
4299,
353,
4794,
305,
3195,
29889,
3166,
29918,
2272,
7345,
305,
29898,
4299,
29897,
13,
13,
1678,
822,
6410,
14400,
29898,
2080,
29892,
3646,
1125,
13,
4706,
736,
302,
29876,
29889,
29940,
2208,
29931,
2209,
2141,
11333,
29898,
2080,
29892,
3646,
29889,
1579,
8606,
2141,
5426,
3101,
13,
13,
1678,
22424,
29918,
6758,
353,
4794,
305,
29931,
2209,
29889,
3166,
29918,
2272,
7345,
305,
29898,
6758,
14400,
29897,
13,
13,
1678,
396,
19012,
6694,
848,
408,
20814,
3630,
4308,
13,
1678,
1967,
29918,
2084,
353,
10876,
29889,
19218,
29961,
29896,
29962,
13,
1678,
1967,
4037,
353,
405,
29940,
2940,
6982,
29889,
949,
20163,
29898,
3027,
29918,
2084,
29892,
885,
29892,
19490,
29950,
29922,
29906,
29945,
29953,
29892,
19490,
29956,
29922,
29906,
29945,
29953,
29892,
1967,
29918,
401,
29883,
29922,
29896,
29897,
13,
1678,
679,
1170,
353,
318,
2176,
29898,
2892,
1948,
29901,
2897,
29889,
2084,
29889,
6500,
3871,
29898,
798,
29961,
29900,
11724,
1714,
1542,
3101,
13,
1678,
679,
4775,
353,
318,
2176,
29898,
2892,
1024,
29901,
29871,
29896,
29889,
29900,
565,
1024,
29889,
27382,
2541,
877,
4117,
1495,
1683,
29871,
29900,
29889,
29900,
29892,
11599,
1542,
3101,
13,
1678,
3858,
4037,
353,
1967,
4037,
29889,
2541,
4409,
703,
978,
613,
679,
1170,
29898,
1054,
703,
3027,
29908,
4961,
320,
13,
4706,
869,
2541,
4409,
703,
1643,
613,
679,
4775,
29898,
1054,
877,
978,
8785,
467,
8173,
580,
13,
1678,
313,
26495,
4037,
29892,
8845,
4037,
29897,
353,
3858,
4037,
29889,
8172,
18772,
4197,
29900,
29889,
29929,
29892,
29871,
29900,
29889,
29896,
2314,
13,
13,
1678,
396,
1065,
6694,
322,
17983,
13,
1678,
4682,
13372,
261,
353,
678,
7114,
6572,
19170,
29898,
13,
4706,
518,
4301,
1762,
2940,
19132,
3285,
7084,
13409,
29907,
1336,
29898,
29906,
29906,
29946,
29892,
29871,
29906,
29906,
29946,
511,
13,
308,
7084,
13599,
19077,
675,
29898,
29896,
29906,
29941,
29889,
29900,
29892,
29871,
29896,
29896,
29955,
29889,
29900,
29892,
29871,
29896,
29900,
29946,
29889,
29900,
29892,
29871,
29906,
29945,
29945,
29889,
29900,
29892,
29871,
29906,
29945,
29945,
29889,
29900,
29892,
29871,
29906,
29945,
29945,
29889,
29900,
511,
13,
308,
7084,
9782,
1762,
29911,
6073,
3285,
7084,
19132,
1762,
29911,
6073,
580,
2314,
13,
13,
1678,
770,
3709,
353,
405,
29940,
2385,
3709,
29898,
2502,
29877,
29918,
4299,
29892,
22424,
29918,
6758,
29892,
4682,
13372,
261,
29897,
320,
13,
4706,
869,
842,
29931,
799,
1076,
19907,
29898,
29900,
29889,
29900,
29900,
29896,
29897,
320,
13,
4706,
869,
842,
23145,
3505,
29898,
29896,
29953,
29897,
320,
13,
4706,
869,
842,
7976,
29923,
1129,
305,
29898,
29896,
29897,
320,
13,
4706,
869,
842,
8263,
3698,
1625,
703,
3027,
1159,
320,
13,
4706,
869,
842,
29907,
9733,
17708,
29898,
8824,
29897,
320,
13,
4706,
869,
842,
19448,
29898,
26526,
29923,
1129,
305,
3285,
8845,
4037,
29892,
518,
7504,
332,
4135,
580,
1402,
29871,
29896,
29953,
29897,
13,
13,
1678,
6635,
26169,
3195,
353,
770,
3709,
29889,
9202,
29898,
26495,
4037,
29897,
13,
13,
1678,
9500,
353,
318,
2176,
29898,
2892,
282,
29901,
282,
448,
29871,
29896,
29892,
11599,
1542,
3101,
13,
1678,
18988,
4037,
353,
6635,
26169,
3195,
29889,
9067,
29898,
18157,
4037,
29897,
320,
13,
4706,
869,
2541,
4409,
703,
11965,
2463,
613,
9500,
29898,
1054,
877,
11965,
2463,
8785,
467,
8173,
580,
13,
13,
1678,
1959,
353,
18988,
4037,
29889,
4572,
703,
1643,
29922,
11965,
2463,
2564,
2798,
580,
13,
1678,
12463,
353,
18988,
4037,
29889,
2798,
580,
13,
1678,
13600,
353,
1959,
334,
29871,
29896,
29889,
29900,
847,
12463,
13,
13,
1678,
18988,
4037,
29889,
11249,
29898,
8824,
29892,
29871,
29900,
29889,
29896,
467,
4294,
580,
13,
13,
1678,
396,
16120,
29901,
13600,
2820,
29871,
29929,
29945,
29995,
13,
1678,
1596,
703,
19448,
13600,
353,
24335,
1959,
24335,
29871,
3001,
6571,
1642,
4830,
29898,
562,
2764,
4135,
29892,
1959,
29892,
12463,
876,
13,
2
] |
interceptor/migrations/0006_auto_20200514_0637.py | minrock/thaad | 0 | 43626 | # Generated by Django 3.0.5 on 2020-05-14 06:37
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('interceptor', '0005_auto_20200514_0617'),
]
operations = [
migrations.AddField(
model_name='interceptedrequest',
name='path',
field=models.CharField(default='/', max_length=255),
),
migrations.AddField(
model_name='interceptedrequest',
name='session',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='interceptor.InterceptorSession'),
),
]
| [
1,
396,
3251,
630,
491,
15337,
29871,
29941,
29889,
29900,
29889,
29945,
373,
29871,
29906,
29900,
29906,
29900,
29899,
29900,
29945,
29899,
29896,
29946,
29871,
29900,
29953,
29901,
29941,
29955,
13,
13,
3166,
9557,
29889,
2585,
1053,
9725,
800,
29892,
4733,
13,
5215,
9557,
29889,
2585,
29889,
9794,
29889,
311,
1026,
291,
13,
13,
13,
1990,
341,
16783,
29898,
26983,
800,
29889,
29924,
16783,
1125,
13,
13,
1678,
9962,
353,
518,
13,
4706,
6702,
1639,
14268,
742,
525,
29900,
29900,
29900,
29945,
29918,
6921,
29918,
29906,
29900,
29906,
29900,
29900,
29945,
29896,
29946,
29918,
29900,
29953,
29896,
29955,
5477,
13,
1678,
4514,
13,
13,
1678,
6931,
353,
518,
13,
4706,
9725,
800,
29889,
2528,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
1639,
1547,
287,
3827,
742,
13,
9651,
1024,
2433,
2084,
742,
13,
9651,
1746,
29922,
9794,
29889,
27890,
29898,
4381,
2433,
29914,
742,
4236,
29918,
2848,
29922,
29906,
29945,
29945,
511,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
2528,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
1639,
1547,
287,
3827,
742,
13,
9651,
1024,
2433,
7924,
742,
13,
9651,
1746,
29922,
9794,
29889,
27755,
2558,
29898,
19465,
29922,
5574,
29892,
1870,
29922,
5574,
29892,
373,
29918,
8143,
29922,
14095,
29889,
2585,
29889,
9794,
29889,
311,
1026,
291,
29889,
29907,
3289,
5454,
2287,
29892,
304,
2433,
1639,
14268,
29889,
24923,
7317,
5477,
13,
4706,
10353,
13,
1678,
4514,
13,
2
] |
cla_frontend/apps/status/urls.py | ministryofjustice/cla_frontend | 3 | 45460 | <gh_stars>1-10
from django.conf.urls import patterns, url
from moj_irat.views import HealthcheckView
from . import views
urlpatterns = patterns(
"",
url(r"^live/$", views.status, {"probe_type": "live"}, name="live_probe"),
url(r"^ready/$", views.status, {"probe_type": "ready"}, name="ready_probe"),
url(r"^status.json$", views.smoketests_json),
url(r"^ping.json$", views.PingJsonView.as_view(), name="ping_json"),
url(r"^healthcheck.json$", HealthcheckView.as_view(), name="healthcheck_json"),
)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
9557,
29889,
5527,
29889,
26045,
1053,
15038,
29892,
3142,
13,
3166,
2730,
29926,
29918,
13481,
29889,
7406,
1053,
15202,
3198,
1043,
13,
3166,
869,
1053,
8386,
13,
13,
13,
2271,
11037,
29879,
353,
15038,
29898,
13,
1678,
12633,
13,
1678,
3142,
29898,
29878,
29908,
29985,
9258,
13346,
613,
8386,
29889,
4882,
29892,
8853,
771,
915,
29918,
1853,
1115,
376,
9258,
10758,
1024,
543,
9258,
29918,
771,
915,
4968,
13,
1678,
3142,
29898,
29878,
29908,
29985,
2040,
13346,
613,
8386,
29889,
4882,
29892,
8853,
771,
915,
29918,
1853,
1115,
376,
2040,
10758,
1024,
543,
2040,
29918,
771,
915,
4968,
13,
1678,
3142,
29898,
29878,
29908,
29985,
4882,
29889,
3126,
29938,
613,
8386,
29889,
3844,
554,
300,
9197,
29918,
3126,
511,
13,
1678,
3142,
29898,
29878,
29908,
29985,
15702,
29889,
3126,
29938,
613,
8386,
29889,
29925,
292,
8148,
1043,
29889,
294,
29918,
1493,
3285,
1024,
543,
15702,
29918,
3126,
4968,
13,
1678,
3142,
29898,
29878,
29908,
29985,
354,
4298,
3198,
29889,
3126,
29938,
613,
15202,
3198,
1043,
29889,
294,
29918,
1493,
3285,
1024,
543,
354,
4298,
3198,
29918,
3126,
4968,
13,
29897,
13,
2
] |
amazon/scraper/run_scraper.py | Distributed-Deep-Image-Search-Engine/DIC | 2 | 180585 | <gh_stars>1-10
from scraper import ProductData
import pandas as pd
from collections import OrderedDict
df = pd.DataFrame()
file_name = 'Mens-fashion-product-links'
try:
count = 0
for line in open(file_name):
url = line.strip()
# Making the class object
prod = ProductData(url)
my_dict = OrderedDict()
my_dict['Asin'] = prod.get_asin()
my_dict['Title'] = prod.get_title()
my_dict['Categories'] = prod.get_category()
my_dict['Images_Links'] = prod.get_images()
my_dict['MetaData'] = prod.meta_data()
df = df.append(my_dict, ignore_index = True)
count = count + 1
print(count)
except KeyboardInterrupt:
df.to_pickle('dataframe_data')
dfs = pd.read_pickle('dataframe_data')
print(dfs)
# #TO load the dataframe from the given file in the exact right format
# dfs = pd.read_pickle('dataframe_data')
# print(dfs.iloc[0][2]) | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
24559,
546,
1053,
10969,
1469,
13,
5215,
11701,
408,
10518,
13,
3166,
16250,
1053,
8170,
287,
21533,
13,
13,
2176,
353,
10518,
29889,
17271,
580,
13,
13,
1445,
29918,
978,
353,
525,
29924,
575,
29899,
29888,
10904,
29899,
4704,
29899,
4965,
29915,
13,
13,
13,
2202,
29901,
13,
12,
2798,
353,
29871,
29900,
29871,
13,
12,
1454,
1196,
297,
1722,
29898,
1445,
29918,
978,
1125,
13,
12,
12,
2271,
353,
1196,
29889,
17010,
580,
13,
12,
12,
13,
12,
12,
29937,
341,
5086,
278,
770,
1203,
13,
12,
12,
10633,
353,
10969,
1469,
29898,
2271,
29897,
13,
13,
12,
12,
1357,
29918,
8977,
353,
8170,
287,
21533,
580,
13,
12,
12,
1357,
29918,
8977,
1839,
2887,
262,
2033,
353,
11859,
29889,
657,
29918,
294,
262,
580,
13,
12,
12,
1357,
29918,
8977,
1839,
7030,
2033,
353,
11859,
29889,
657,
29918,
3257,
580,
13,
12,
12,
1357,
29918,
8977,
1839,
29907,
14404,
2033,
353,
11859,
29889,
657,
29918,
7320,
580,
13,
12,
12,
1357,
29918,
8977,
1839,
20163,
29918,
6595,
29879,
2033,
353,
11859,
29889,
657,
29918,
8346,
580,
13,
12,
12,
1357,
29918,
8977,
1839,
19346,
1469,
2033,
353,
11859,
29889,
7299,
29918,
1272,
580,
13,
13,
12,
12,
2176,
353,
4489,
29889,
4397,
29898,
1357,
29918,
8977,
29892,
11455,
29918,
2248,
353,
5852,
29897,
13,
12,
12,
2798,
353,
2302,
718,
29871,
29896,
13,
12,
12,
2158,
29898,
2798,
29897,
29871,
13,
13,
19499,
7670,
3377,
4074,
6685,
29901,
13,
12,
2176,
29889,
517,
29918,
23945,
280,
877,
1272,
2557,
29918,
1272,
1495,
13,
12,
29069,
353,
10518,
29889,
949,
29918,
23945,
280,
877,
1272,
2557,
29918,
1272,
1495,
13,
12,
2158,
29898,
29069,
29897,
13,
13,
29937,
396,
4986,
2254,
278,
12205,
515,
278,
2183,
934,
297,
278,
2684,
1492,
3402,
13,
29937,
4489,
29879,
353,
10518,
29889,
949,
29918,
23945,
280,
877,
1272,
2557,
29918,
1272,
1495,
13,
29937,
1596,
29898,
29069,
29889,
309,
542,
29961,
29900,
3816,
29906,
2314,
2
] |
yuio/parse.py | taminomara/yuio | 1 | 1615968 | <filename>yuio/parse.py
# Yuio project, MIT licence.
#
# https://github.com/taminomara/yuio/
#
# You're free to copy this file to your project and edit it for your needs,
# just keep this copyright line please :3
"""
This module provides several parsers that convert (usually user-provided)
strings to python objects, or check user input, and throw
:class:`ValueError` in case of any issue.
All parsers are descendants of the :class:`Parser` class.
On the surface, they are just callables that take a string and return a python
object. That is, you can use them in any place that expects such callable,
for example in flags in argparse, or in :func:`~yuio.io.ask` method
from :mod:`yuio.io`.
When parsing fails, we raise :class:`ParsingError`.
Base parser
-----------
.. autoclass:: Parser
:members:
.. autoclass:: ParsingError
Value parsers
-------------
.. autoclass:: Str
.. autoclass:: StrLower
.. autoclass:: StrUpper
.. autoclass:: Int
.. autoclass:: Float
.. autoclass:: Bool
.. autoclass:: Enum
File system path parsers
------------------------
.. autoclass:: Path
.. autoclass:: NonExistentPath
.. autoclass:: ExistingPath
.. autoclass:: File
.. autoclass:: Dir
.. autoclass:: GitRepo
Validators
----------
.. autoclass:: Bound
.. automethod:: lower_bound
.. automethod:: lower_bound_inclusive
.. automethod:: upper_bound
.. automethod:: upper_bound_inclusive
.. autoclass:: OneOf
.. autoclass:: Regex
"""
import abc
import argparse
import enum
import pathlib
import re
import typing as _t
class _Comparable(_t.Protocol):
@abc.abstractmethod
def __lt__(self, other) -> bool: ...
@abc.abstractmethod
def __gt__(self, other) -> bool: ...
@abc.abstractmethod
def __le__(self, other) -> bool: ...
@abc.abstractmethod
def __ge__(self, other) -> bool: ...
@abc.abstractmethod
def __eq__(self, other) -> bool: ...
T = _t.TypeVar('T')
C = _t.TypeVar('C', bound=_Comparable)
E = _t.TypeVar('E', bound=enum.Enum)
class ParsingError(ValueError, argparse.ArgumentTypeError):
"""Raised when parsing or validation fails.
This exception is derived from both :class:`ValueError`
and :class:`argparse.ArgumentTypeError` to ensure that error messages
are displayed nicely with argparse, and handled correctly in other places.
"""
class Parser(_t.Generic[T], abc.ABC):
"""Base class for parsers.
"""
def __init__(self):
# For some reason PyCharm incorrectly derives some types without
# this `__init__`. You can check with the following code:
#
# ```
# def interact(msg: str, p: Parser[T]) -> T:
# return p(msg)
#
# val = interact('10', Int()) # type for `val` is not derived
# ```
pass
def __call__(self, value: str) -> T:
"""Parse and verify user input, raise :class:`ParsingError` on failure.
"""
parsed = self.parse(value)
self.validate(parsed)
return parsed
@abc.abstractmethod
def parse(self, value: str) -> T:
"""Parse user input, raise :class:`ParsingError` on failure.
Don't forget to call :meth:`Parser.validate` after parsing a value.
"""
@abc.abstractmethod
def parse_config(self, value: _t.Any) -> T:
"""Parse value from a config, raise :class:`ParsingError` on failure.
This method accepts python values, i.e. when parsing a json config.
Don't forget to call :meth:`Parser.validate` after parsing a value.
"""
@abc.abstractmethod
def validate(self, value: T):
"""Verify parsed value, raise :class:`ParsingError` on failure.
"""
def describe(self) -> _t.Optional[str]:
"""Return a human-readable description of an expected input.
"""
return None
def describe_value(self, value: T) -> _t.Optional[str]:
"""Return a human-readable description of a given value.
"""
return None
@classmethod
@_t.no_type_check
def from_type_hint(cls, ty: _t.Any) -> 'Parser[_t.Any]':
"""Create parser from a type hint.
"""
origin = _t.get_origin(ty)
args = _t.get_args(ty)
if origin is _t.Optional:
return cls.from_type_hint(args[0])
elif origin is _t.Union and len(args) == 2 and args[1] is type(None):
return cls.from_type_hint(args[0])
elif origin is _t.Union and len(args) == 2 and args[0] is type(None):
return cls.from_type_hint(args[1])
elif ty is str:
return Str()
elif ty is int:
return Int()
elif ty is float:
return Float()
elif ty is bool:
return Bool()
elif isinstance(ty, type) and issubclass(ty, enum.Enum):
return Enum(ty)
else:
raise TypeError(f'unsupported type {ty}')
class Str(Parser[str]):
"""Parser for str values.
Applies a `modifier` to the value, if one is given.
"""
def __init__(self, modifier: _t.Optional[_t.Callable[[str], str]] = None):
super().__init__()
self._modifier = modifier
def parse(self, value: str) -> str:
if self._modifier is not None:
return self._modifier(value)
else:
return value
def parse_config(self, value: _t.Any) -> str:
if not isinstance(value, str):
raise ParsingError('expected a string')
if self._modifier is not None:
return self._modifier(value)
else:
return value
def validate(self, value: str):
pass
class StrLower(Str):
"""Parser for str values that converts them to lowercase.
"""
def __init__(self):
super().__init__(str.lower)
class StrUpper(Str):
"""Parser for str values that converts them to uppercase.
"""
def __init__(self):
super().__init__(str.upper)
class Int(Parser[int]):
"""Parser for int values.
"""
def parse(self, value: str) -> int:
try:
return int(value)
except ValueError:
raise ParsingError(f'could not parse value {value!r} as an int')
def parse_config(self, value: _t.Any) -> int:
if isinstance(value, float):
if value != int(value):
raise ParsingError('expected an int, got a float instead')
value = int(value)
if not isinstance(value, int):
raise ParsingError('expected an int')
return value
def validate(self, value: int):
pass
class Float(Parser[float]):
"""Parser for float values.
"""
def parse(self, value: str) -> float:
try:
return float(value)
except ValueError:
raise ParsingError(f'could not parse value {value!r} as a float')
def parse_config(self, value: _t.Any) -> float:
if not isinstance(value, (float, int)):
raise ParsingError('expected a float')
return value
def validate(self, value: float):
pass
class Bool(Parser[bool]):
"""Parser for bool values, such as `'yes'` or `'no'`.
"""
def parse(self, value: str) -> bool:
value = value.lower()
if value in ('y', 'yes', 'true', '1'):
return True
elif value in ('n', 'no', 'false', '0'):
return False
else:
raise ParsingError(f'could not parse value {value!r},'
f' enter either \'yes\' or \'no\'')
def parse_config(self, value: _t.Any) -> bool:
if not isinstance(value, bool):
raise ParsingError('expected a bool')
return value
def validate(self, value: bool):
pass
def describe(self) -> _t.Optional[str]:
return 'yes|no'
def describe_value(self, value: bool) -> _t.Optional[str]:
return 'yes' if value else 'no'
class Enum(Parser[E]):
"""Parser for enums, as defined in the standard :mod:`enum` module.
"""
def __init__(self, enum_type: _t.Type[E]):
super().__init__()
self._enum_type: _t.Type[E] = enum_type
def parse(self, value: str) -> E:
try:
return self._enum_type[value.upper()]
except KeyError:
enum_values = ', '.join(e.name for e in self._enum_type)
raise ParsingError(
f'could not parse value {value!r}'
f' as {self._enum_type.__name__},'
f' should be one of {enum_values}')
def parse_config(self, value: _t.Any) -> E:
if not isinstance(value, str):
raise ParsingError('expected a string')
return self.parse(value)
def validate(self, value: E):
pass
def describe(self) -> _t.Optional[str]:
desc = '|'.join(e.name for e in self._enum_type)
return desc
def describe_value(self, value: E) -> _t.Optional[str]:
return value.name
class Path(Parser[pathlib.Path]):
"""Parse a file system path, return a :class:`pathlib.Path`.
"""
def __init__(self, extensions: _t.Optional[_t.Collection[str]] = None):
"""Init the class.
:param extensions: list of allowed file extensions.
"""
super().__init__()
self._extensions = extensions
def parse(self, value: str) -> pathlib.Path:
return pathlib.Path(value).expanduser().resolve()
def parse_config(self, value: _t.Any) -> pathlib.Path:
if not isinstance(value, str):
raise ParsingError('expected a string')
return self.parse(value)
def validate(self, value: pathlib.Path):
if self._extensions is not None:
if not any(value.name.endswith(ext) for ext in self._extensions):
exts = ', '.join(self._extensions)
raise ParsingError(f'{value} should have extension {exts}')
def describe(self) -> _t.Optional[str]:
if self._extensions is not None:
return '|'.join('*' + e for e in self._extensions)
else:
return None
class NonExistentPath(Path):
"""Parse a file system path and verify that it doesn't exist.
"""
def validate(self, value: pathlib.Path):
super().validate(value)
if value.exists():
raise ParsingError(f'{value} already exist')
class ExistingPath(Path):
"""Parse a file system path and verify that it exists.
"""
def validate(self, value: pathlib.Path):
super().validate(value)
if not value.exists():
raise ParsingError(f'{value} doesn\'t exist')
class File(ExistingPath):
"""Parse path to a file.
"""
def validate(self, value: pathlib.Path):
super().validate(value)
if not value.is_file():
raise ParsingError(f'{value} is not a file')
class Dir(ExistingPath):
"""Parse path to a directory.
"""
def __init__(self):
# Disallow passing `extensions`.
super().__init__()
def validate(self, value: pathlib.Path):
super().validate(value)
if not value.is_dir():
raise ParsingError(f'{value} is not a directory')
class GitRepo(Dir):
"""Parse path to a git repository.
This parser just checks that the given directory has
a subdirectory named ``.git``.
"""
def validate(self, value: pathlib.Path):
super().validate(value)
if not value.joinpath('.git').is_dir():
raise ParsingError(f'{value} is not a git repository')
return value
class Bound(Parser[C]):
"""Check that value is upper- or lower-bound by some constraints.
:param inner:
inner parser that will be used to actually parse a value before
checking its bounds.
:param lower:
set lower bound for value, so we require that ``value > lower``.
Can't be given if `lower_inclusive` is also given.
:param lower_inclusive:
set lower bound for value, so we require that ``value >= lower``.
Can't be given if `lower` is also given.
:param upper:
set upper bound for value, so we require that ``value < upper``.
Can't be given if `upper_inclusive` is also given.
:param upper_inclusive:
set upper bound for value, so we require that ``value <= upper``.
Can't be given if `upper` is also given.
"""
_Self = _t.TypeVar('_Self', bound='Bound')
_lower: _t.Optional[C] = None
"""Lower bound."""
_lower_inclusive: bool = True
"""True if lower bound is inclusive."""
_upper: _t.Optional[C] = None
"""Upper bound."""
_upper_inclusive: bool = True
"""True if upper bound is inclusive."""
def __init__(
self,
inner: Parser[C],
*,
lower: _t.Optional[C] = None,
lower_inclusive: _t.Optional[C] = None,
upper: _t.Optional[C] = None,
upper_inclusive: _t.Optional[C] = None
):
super().__init__()
self._inner: Parser[C] = inner
if lower is not None and lower_inclusive is not None:
raise TypeError(
'lower and lower_inclusive cannot be given at the same time')
elif lower is not None:
self.lower_bound(lower)
elif lower_inclusive is not None:
self.lower_bound_inclusive(lower_inclusive)
if upper is not None and upper_inclusive is not None:
raise TypeError(
'upper and upper_inclusive cannot be given at the same time')
elif upper is not None:
self.upper_bound(upper)
elif upper_inclusive is not None:
self.upper_bound_inclusive(upper_inclusive)
def lower_bound(self: _Self, lower: C) -> _Self:
"""Set lower bound so we require that `value > lower`.
"""
self._lower = lower
self._lower_inclusive = False
return self
def lower_bound_inclusive(self: _Self, lower: C) -> _Self:
"""Set lower bound so we require that `value >= lower`.
"""
self._lower = lower
self._lower_inclusive = True
return self
def upper_bound(self: _Self, upper: C) -> _Self:
"""Set upper bound so we require that `value < upper`.
"""
self._upper = upper
self._upper_inclusive = False
return self
def upper_bound_inclusive(self: _Self, upper: C) -> _Self:
"""Set upper bound so we require that `value <= upper`.
"""
self._upper = upper
self._upper_inclusive = True
return self
def parse(self, value: str) -> C:
return self._inner.parse(value)
def parse_config(self, value: _t.Any) -> C:
return self._inner.parse_config(value)
def validate(self, value: C):
self._inner.validate(value)
if self._lower is not None:
if self._lower_inclusive and value < self._lower:
raise ParsingError(
f'value should be greater or equal to {self._lower},'
f' got {value} instead')
elif not self._lower_inclusive and value <= self._lower:
raise ParsingError(
f'value should be greater than {self._lower},'
f' got {value} instead')
if self._upper is not None:
if self._upper_inclusive and value > self._upper:
raise ParsingError(
f'value should be lesser or equal to {self._upper},'
f' got {value} instead')
elif not self._upper_inclusive and value >= self._upper:
raise ParsingError(
f'value should be lesser than {self._upper},'
f' got {value} instead')
class OneOf(Parser[T]):
"""Check if the parsed value is one of the given set of values.
"""
def __init__(self, inner: Parser[T], values: _t.Collection[T]):
super().__init__()
self._inner = inner
self._allowed_values = values
def parse(self, value: str) -> T:
return self._inner.parse(value)
def parse_config(self, value: _t.Any) -> T:
return self._inner.parse_config(value)
def validate(self, value: T):
self._inner.validate(value)
if value not in self._allowed_values:
values = ', '.join(map(str, self._allowed_values))
raise ParsingError(
f'could not parse value {value!r},'
f' should be one of {values}')
def describe(self) -> _t.Optional[str]:
desc = '|'.join(str(e) for e in self._allowed_values)
if len(desc) < 80:
return desc
else:
return super().describe()
class Regex(Parser[str]):
"""Check if the parsed value is one of the given set of values.
"""
def __init__(self, inner: Parser[str], regex: _t.Union[str, re.Pattern]):
super().__init__()
if isinstance(regex, str):
regex = re.compile(regex)
self._inner = inner
self._regex = regex
def parse(self, value: str) -> str:
return self._inner.parse(value)
def parse_config(self, value: _t.Any) -> str:
return self._inner.parse_config(value)
def validate(self, value: str):
self._inner.validate(value)
if self._regex.match(value) is None:
raise ParsingError(
f'value should match regex \'{self._regex.pattern}\'')
| [
1,
529,
9507,
29958,
29891,
29884,
601,
29914,
5510,
29889,
2272,
13,
29937,
27669,
601,
2060,
29892,
341,
1806,
7794,
663,
29889,
13,
29937,
13,
29937,
2045,
597,
3292,
29889,
510,
29914,
29873,
9103,
290,
2518,
29914,
29891,
29884,
601,
29914,
13,
29937,
13,
29937,
887,
29915,
276,
3889,
304,
3509,
445,
934,
304,
596,
2060,
322,
3863,
372,
363,
596,
4225,
29892,
13,
29937,
925,
3013,
445,
3509,
1266,
1196,
3113,
584,
29941,
13,
13,
15945,
29908,
13,
4013,
3883,
8128,
3196,
610,
4253,
393,
3588,
313,
375,
1474,
1404,
29899,
16123,
2618,
29897,
13,
19651,
304,
3017,
3618,
29892,
470,
1423,
1404,
1881,
29892,
322,
3183,
13,
29901,
1990,
18078,
1917,
2392,
29952,
297,
1206,
310,
738,
2228,
29889,
13,
13,
3596,
610,
4253,
526,
17086,
1934,
310,
278,
584,
1990,
18078,
11726,
29952,
770,
29889,
13,
2951,
278,
7101,
29892,
896,
526,
925,
1246,
1849,
393,
2125,
263,
1347,
322,
736,
263,
3017,
13,
3318,
29889,
2193,
338,
29892,
366,
508,
671,
963,
297,
738,
2058,
393,
23347,
1316,
1246,
519,
29892,
13,
1454,
1342,
297,
13449,
297,
1852,
5510,
29892,
470,
297,
584,
9891,
18078,
30022,
29891,
29884,
601,
29889,
601,
29889,
1278,
29952,
1158,
13,
3166,
584,
1545,
18078,
29891,
29884,
601,
29889,
601,
1412,
13,
13,
10401,
13755,
8465,
29892,
591,
12020,
584,
1990,
18078,
29925,
1503,
292,
2392,
1412,
13,
13,
13,
5160,
13812,
13,
1378,
5634,
13,
13,
636,
1120,
542,
605,
1057,
1459,
643,
13,
259,
584,
28109,
29901,
13,
13,
636,
1120,
542,
605,
1057,
1459,
2976,
2392,
13,
13,
13,
1917,
610,
4253,
13,
9072,
29899,
13,
13,
636,
1120,
542,
605,
1057,
3767,
13,
13,
636,
1120,
542,
605,
1057,
3767,
19357,
13,
13,
636,
1120,
542,
605,
1057,
3767,
26214,
13,
13,
636,
1120,
542,
605,
1057,
3159,
13,
13,
636,
1120,
542,
605,
1057,
27842,
13,
13,
636,
1120,
542,
605,
1057,
18912,
13,
13,
636,
1120,
542,
605,
1057,
1174,
398,
13,
13,
13,
2283,
1788,
2224,
610,
4253,
13,
2683,
1378,
13,
13,
636,
1120,
542,
605,
1057,
10802,
13,
13,
636,
1120,
542,
605,
1057,
10050,
1252,
9696,
2605,
13,
13,
636,
1120,
542,
605,
1057,
1222,
15423,
2605,
13,
13,
636,
1120,
542,
605,
1057,
3497,
13,
13,
636,
1120,
542,
605,
1057,
19378,
13,
13,
636,
1120,
542,
605,
1057,
11786,
5612,
29877,
13,
13,
13,
7211,
4097,
13,
28400,
13,
13,
636,
1120,
542,
605,
1057,
350,
618,
13,
13,
259,
6317,
3345,
959,
1057,
5224,
29918,
9917,
13,
13,
259,
6317,
3345,
959,
1057,
5224,
29918,
9917,
29918,
262,
7009,
573,
13,
13,
259,
6317,
3345,
959,
1057,
7568,
29918,
9917,
13,
13,
259,
6317,
3345,
959,
1057,
7568,
29918,
9917,
29918,
262,
7009,
573,
13,
13,
636,
1120,
542,
605,
1057,
3118,
2776,
13,
13,
636,
1120,
542,
605,
1057,
25326,
13,
13,
15945,
29908,
13,
13,
5215,
25638,
13,
5215,
1852,
5510,
13,
5215,
14115,
13,
5215,
2224,
1982,
13,
5215,
337,
13,
5215,
19229,
408,
903,
29873,
13,
13,
13,
1990,
903,
1523,
862,
519,
7373,
29873,
29889,
17830,
1125,
13,
1678,
732,
10736,
29889,
16595,
5696,
13,
1678,
822,
4770,
1896,
12035,
1311,
29892,
916,
29897,
1599,
6120,
29901,
2023,
13,
13,
1678,
732,
10736,
29889,
16595,
5696,
13,
1678,
822,
4770,
4141,
12035,
1311,
29892,
916,
29897,
1599,
6120,
29901,
2023,
13,
13,
1678,
732,
10736,
29889,
16595,
5696,
13,
1678,
822,
4770,
280,
12035,
1311,
29892,
916,
29897,
1599,
6120,
29901,
2023,
13,
13,
1678,
732,
10736,
29889,
16595,
5696,
13,
1678,
822,
4770,
479,
12035,
1311,
29892,
916,
29897,
1599,
6120,
29901,
2023,
13,
13,
1678,
732,
10736,
29889,
16595,
5696,
13,
1678,
822,
4770,
1837,
12035,
1311,
29892,
916,
29897,
1599,
6120,
29901,
2023,
13,
13,
13,
29911,
353,
903,
29873,
29889,
1542,
9037,
877,
29911,
1495,
13,
29907,
353,
903,
29873,
29889,
1542,
9037,
877,
29907,
742,
3216,
29922,
29918,
1523,
862,
519,
29897,
13,
29923,
353,
903,
29873,
29889,
1542,
9037,
877,
29923,
742,
3216,
29922,
18605,
29889,
16854,
29897,
13,
13,
13,
1990,
1459,
2976,
2392,
29898,
1917,
2392,
29892,
1852,
5510,
29889,
15730,
1542,
2392,
1125,
13,
1678,
9995,
29934,
1759,
287,
746,
13755,
470,
8845,
8465,
29889,
13,
13,
1678,
910,
3682,
338,
10723,
515,
1716,
584,
1990,
18078,
1917,
2392,
29952,
13,
1678,
322,
584,
1990,
18078,
1191,
5510,
29889,
15730,
1542,
2392,
29952,
304,
9801,
393,
1059,
7191,
13,
1678,
526,
8833,
28138,
411,
1852,
5510,
29892,
322,
16459,
5149,
297,
916,
7600,
29889,
13,
13,
1678,
9995,
13,
13,
13,
1990,
1459,
643,
7373,
29873,
29889,
15809,
29961,
29911,
1402,
25638,
29889,
19658,
1125,
13,
1678,
9995,
5160,
770,
363,
610,
4253,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
396,
1152,
777,
2769,
10772,
1451,
2817,
29676,
589,
3145,
777,
4072,
1728,
13,
4706,
396,
445,
21326,
2344,
1649,
1412,
887,
508,
1423,
411,
278,
1494,
775,
29901,
13,
4706,
396,
13,
4706,
396,
7521,
13,
4706,
396,
822,
16254,
29898,
7645,
29901,
851,
29892,
282,
29901,
1459,
643,
29961,
29911,
2314,
1599,
323,
29901,
13,
4706,
396,
268,
736,
282,
29898,
7645,
29897,
13,
4706,
396,
13,
4706,
396,
659,
353,
16254,
877,
29896,
29900,
742,
3159,
3101,
29871,
396,
1134,
363,
421,
791,
29952,
338,
451,
10723,
13,
4706,
396,
7521,
13,
4706,
1209,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
995,
29901,
851,
29897,
1599,
323,
29901,
13,
4706,
9995,
12914,
322,
11539,
1404,
1881,
29892,
12020,
584,
1990,
18078,
29925,
1503,
292,
2392,
29952,
373,
10672,
29889,
13,
13,
4706,
9995,
13,
13,
4706,
21213,
353,
1583,
29889,
5510,
29898,
1767,
29897,
13,
4706,
1583,
29889,
15480,
29898,
862,
8485,
29897,
13,
4706,
736,
21213,
13,
13,
1678,
732,
10736,
29889,
16595,
5696,
13,
1678,
822,
6088,
29898,
1311,
29892,
995,
29901,
851,
29897,
1599,
323,
29901,
13,
4706,
9995,
12914,
1404,
1881,
29892,
12020,
584,
1990,
18078,
29925,
1503,
292,
2392,
29952,
373,
10672,
29889,
13,
13,
4706,
3872,
29915,
29873,
9566,
304,
1246,
584,
29885,
621,
18078,
11726,
29889,
15480,
29952,
1156,
13755,
263,
995,
29889,
13,
13,
4706,
9995,
13,
13,
1678,
732,
10736,
29889,
16595,
5696,
13,
1678,
822,
6088,
29918,
2917,
29898,
1311,
29892,
995,
29901,
903,
29873,
29889,
10773,
29897,
1599,
323,
29901,
13,
4706,
9995,
12914,
995,
515,
263,
2295,
29892,
12020,
584,
1990,
18078,
29925,
1503,
292,
2392,
29952,
373,
10672,
29889,
13,
13,
4706,
910,
1158,
21486,
3017,
1819,
29892,
474,
29889,
29872,
29889,
746,
13755,
263,
4390,
2295,
29889,
13,
13,
4706,
3872,
29915,
29873,
9566,
304,
1246,
584,
29885,
621,
18078,
11726,
29889,
15480,
29952,
1156,
13755,
263,
995,
29889,
13,
13,
4706,
9995,
13,
13,
1678,
732,
10736,
29889,
16595,
5696,
13,
1678,
822,
12725,
29898,
1311,
29892,
995,
29901,
323,
1125,
13,
4706,
9995,
6565,
1598,
21213,
995,
29892,
12020,
584,
1990,
18078,
29925,
1503,
292,
2392,
29952,
373,
10672,
29889,
13,
13,
4706,
9995,
13,
13,
1678,
822,
8453,
29898,
1311,
29897,
1599,
903,
29873,
29889,
27636,
29961,
710,
5387,
13,
4706,
9995,
11609,
263,
5199,
29899,
949,
519,
6139,
310,
385,
3806,
1881,
29889,
13,
13,
4706,
9995,
13,
13,
4706,
736,
6213,
13,
13,
1678,
822,
8453,
29918,
1767,
29898,
1311,
29892,
995,
29901,
323,
29897,
1599,
903,
29873,
29889,
27636,
29961,
710,
5387,
13,
4706,
9995,
11609,
263,
5199,
29899,
949,
519,
6139,
310,
263,
2183,
995,
29889,
13,
13,
4706,
9995,
13,
13,
4706,
736,
6213,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
732,
29918,
29873,
29889,
1217,
29918,
1853,
29918,
3198,
13,
1678,
822,
515,
29918,
1853,
29918,
29882,
524,
29898,
25932,
29892,
7911,
29901,
903,
29873,
29889,
10773,
29897,
1599,
525,
11726,
28513,
29873,
29889,
10773,
29962,
2396,
13,
4706,
9995,
4391,
13812,
515,
263,
1134,
13182,
29889,
13,
13,
4706,
9995,
13,
13,
4706,
3978,
353,
903,
29873,
29889,
657,
29918,
12574,
29898,
1017,
29897,
13,
4706,
6389,
353,
903,
29873,
29889,
657,
29918,
5085,
29898,
1017,
29897,
13,
13,
4706,
565,
3978,
338,
903,
29873,
29889,
27636,
29901,
13,
9651,
736,
1067,
29879,
29889,
3166,
29918,
1853,
29918,
29882,
524,
29898,
5085,
29961,
29900,
2314,
13,
4706,
25342,
3978,
338,
903,
29873,
29889,
19986,
322,
7431,
29898,
5085,
29897,
1275,
29871,
29906,
322,
6389,
29961,
29896,
29962,
338,
1134,
29898,
8516,
1125,
13,
9651,
736,
1067,
29879,
29889,
3166,
29918,
1853,
29918,
29882,
524,
29898,
5085,
29961,
29900,
2314,
13,
4706,
25342,
3978,
338,
903,
29873,
29889,
19986,
322,
7431,
29898,
5085,
29897,
1275,
29871,
29906,
322,
6389,
29961,
29900,
29962,
338,
1134,
29898,
8516,
1125,
13,
9651,
736,
1067,
29879,
29889,
3166,
29918,
1853,
29918,
29882,
524,
29898,
5085,
29961,
29896,
2314,
13,
4706,
25342,
7911,
338,
851,
29901,
13,
9651,
736,
3767,
580,
13,
4706,
25342,
7911,
338,
938,
29901,
13,
9651,
736,
3159,
580,
13,
4706,
25342,
7911,
338,
5785,
29901,
13,
9651,
736,
27842,
580,
13,
4706,
25342,
7911,
338,
6120,
29901,
13,
9651,
736,
18912,
580,
13,
4706,
25342,
338,
8758,
29898,
1017,
29892,
1134,
29897,
322,
338,
1491,
1990,
29898,
1017,
29892,
14115,
29889,
16854,
1125,
13,
9651,
736,
1174,
398,
29898,
1017,
29897,
13,
4706,
1683,
29901,
13,
9651,
12020,
20948,
29898,
29888,
29915,
348,
23765,
1134,
426,
1017,
29913,
1495,
13,
13,
13,
1990,
3767,
29898,
11726,
29961,
710,
29962,
1125,
13,
1678,
9995,
11726,
363,
851,
1819,
29889,
13,
13,
1678,
2401,
3687,
263,
421,
26625,
29952,
304,
278,
995,
29892,
565,
697,
338,
2183,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
878,
3709,
29901,
903,
29873,
29889,
27636,
28513,
29873,
29889,
5594,
519,
8999,
710,
1402,
851,
5262,
353,
6213,
1125,
13,
4706,
2428,
2141,
1649,
2344,
1649,
580,
13,
13,
4706,
1583,
3032,
26625,
353,
878,
3709,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
995,
29901,
851,
29897,
1599,
851,
29901,
13,
4706,
565,
1583,
3032,
26625,
338,
451,
6213,
29901,
13,
9651,
736,
1583,
3032,
26625,
29898,
1767,
29897,
13,
4706,
1683,
29901,
13,
9651,
736,
995,
13,
13,
1678,
822,
6088,
29918,
2917,
29898,
1311,
29892,
995,
29901,
903,
29873,
29889,
10773,
29897,
1599,
851,
29901,
13,
4706,
565,
451,
338,
8758,
29898,
1767,
29892,
851,
1125,
13,
9651,
12020,
1459,
2976,
2392,
877,
9684,
263,
1347,
1495,
13,
4706,
565,
1583,
3032,
26625,
338,
451,
6213,
29901,
13,
9651,
736,
1583,
3032,
26625,
29898,
1767,
29897,
13,
4706,
1683,
29901,
13,
9651,
736,
995,
13,
13,
1678,
822,
12725,
29898,
1311,
29892,
995,
29901,
851,
1125,
13,
4706,
1209,
13,
13,
13,
1990,
3767,
19357,
29898,
5015,
1125,
13,
1678,
9995,
11726,
363,
851,
1819,
393,
29436,
963,
304,
5224,
4878,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
710,
29889,
13609,
29897,
13,
13,
13,
1990,
3767,
26214,
29898,
5015,
1125,
13,
1678,
9995,
11726,
363,
851,
1819,
393,
29436,
963,
304,
7568,
4878,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
710,
29889,
21064,
29897,
13,
13,
13,
1990,
3159,
29898,
11726,
29961,
524,
29962,
1125,
13,
1678,
9995,
11726,
363,
938,
1819,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
995,
29901,
851,
29897,
1599,
938,
29901,
13,
4706,
1018,
29901,
13,
9651,
736,
938,
29898,
1767,
29897,
13,
4706,
5174,
7865,
2392,
29901,
13,
9651,
12020,
1459,
2976,
2392,
29898,
29888,
29915,
26680,
451,
6088,
995,
426,
1767,
29991,
29878,
29913,
408,
385,
938,
1495,
13,
13,
1678,
822,
6088,
29918,
2917,
29898,
1311,
29892,
995,
29901,
903,
29873,
29889,
10773,
29897,
1599,
938,
29901,
13,
4706,
565,
338,
8758,
29898,
1767,
29892,
5785,
1125,
13,
9651,
565,
995,
2804,
938,
29898,
1767,
1125,
13,
18884,
12020,
1459,
2976,
2392,
877,
9684,
385,
938,
29892,
2355,
263,
5785,
2012,
1495,
13,
9651,
995,
353,
938,
29898,
1767,
29897,
13,
4706,
565,
451,
338,
8758,
29898,
1767,
29892,
938,
1125,
13,
9651,
12020,
1459,
2976,
2392,
877,
9684,
385,
938,
1495,
13,
4706,
736,
995,
13,
13,
1678,
822,
12725,
29898,
1311,
29892,
995,
29901,
938,
1125,
13,
4706,
1209,
13,
13,
13,
1990,
27842,
29898,
11726,
29961,
7411,
29962,
1125,
13,
1678,
9995,
11726,
363,
5785,
1819,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
995,
29901,
851,
29897,
1599,
5785,
29901,
13,
4706,
1018,
29901,
13,
9651,
736,
5785,
29898,
1767,
29897,
13,
4706,
5174,
7865,
2392,
29901,
13,
9651,
12020,
1459,
2976,
2392,
29898,
29888,
29915,
26680,
451,
6088,
995,
426,
1767,
29991,
29878,
29913,
408,
263,
5785,
1495,
13,
13,
1678,
822,
6088,
29918,
2917,
29898,
1311,
29892,
995,
29901,
903,
29873,
29889,
10773,
29897,
1599,
5785,
29901,
13,
4706,
565,
451,
338,
8758,
29898,
1767,
29892,
313,
7411,
29892,
938,
22164,
13,
9651,
12020,
1459,
2976,
2392,
877,
9684,
263,
5785,
1495,
13,
4706,
736,
995,
13,
13,
1678,
822,
12725,
29898,
1311,
29892,
995,
29901,
5785,
1125,
13,
4706,
1209,
13,
13,
13,
1990,
18912,
29898,
11726,
29961,
11227,
29962,
1125,
13,
1678,
9995,
11726,
363,
6120,
1819,
29892,
1316,
408,
16218,
3582,
11120,
470,
16218,
1217,
29915,
1412,
13,
13,
1678,
9995,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
995,
29901,
851,
29897,
1599,
6120,
29901,
13,
4706,
995,
353,
995,
29889,
13609,
580,
13,
13,
4706,
565,
995,
297,
6702,
29891,
742,
525,
3582,
742,
525,
3009,
742,
525,
29896,
29374,
13,
9651,
736,
5852,
13,
4706,
25342,
995,
297,
6702,
29876,
742,
525,
1217,
742,
525,
4541,
742,
525,
29900,
29374,
13,
9651,
736,
7700,
13,
4706,
1683,
29901,
13,
9651,
12020,
1459,
2976,
2392,
29898,
29888,
29915,
26680,
451,
6088,
995,
426,
1767,
29991,
29878,
1118,
29915,
13,
462,
632,
285,
29915,
3896,
2845,
320,
29915,
3582,
20333,
470,
320,
29915,
1217,
20333,
1495,
13,
13,
1678,
822,
6088,
29918,
2917,
29898,
1311,
29892,
995,
29901,
903,
29873,
29889,
10773,
29897,
1599,
6120,
29901,
13,
4706,
565,
451,
338,
8758,
29898,
1767,
29892,
6120,
1125,
13,
9651,
12020,
1459,
2976,
2392,
877,
9684,
263,
6120,
1495,
13,
4706,
736,
995,
13,
13,
1678,
822,
12725,
29898,
1311,
29892,
995,
29901,
6120,
1125,
13,
4706,
1209,
13,
13,
1678,
822,
8453,
29898,
1311,
29897,
1599,
903,
29873,
29889,
27636,
29961,
710,
5387,
13,
4706,
736,
525,
3582,
29989,
1217,
29915,
13,
13,
1678,
822,
8453,
29918,
1767,
29898,
1311,
29892,
995,
29901,
6120,
29897,
1599,
903,
29873,
29889,
27636,
29961,
710,
5387,
13,
4706,
736,
525,
3582,
29915,
565,
995,
1683,
525,
1217,
29915,
13,
13,
13,
1990,
1174,
398,
29898,
11726,
29961,
29923,
29962,
1125,
13,
1678,
9995,
11726,
363,
427,
6762,
29892,
408,
3342,
297,
278,
3918,
584,
1545,
18078,
18605,
29952,
3883,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
14115,
29918,
1853,
29901,
903,
29873,
29889,
1542,
29961,
29923,
29962,
1125,
13,
4706,
2428,
2141,
1649,
2344,
1649,
580,
13,
13,
4706,
1583,
3032,
18605,
29918,
1853,
29901,
903,
29873,
29889,
1542,
29961,
29923,
29962,
353,
14115,
29918,
1853,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
995,
29901,
851,
29897,
1599,
382,
29901,
13,
4706,
1018,
29901,
13,
9651,
736,
1583,
3032,
18605,
29918,
1853,
29961,
1767,
29889,
21064,
580,
29962,
13,
4706,
5174,
7670,
2392,
29901,
13,
9651,
14115,
29918,
5975,
353,
13420,
15300,
7122,
29898,
29872,
29889,
978,
363,
321,
297,
1583,
3032,
18605,
29918,
1853,
29897,
13,
9651,
12020,
1459,
2976,
2392,
29898,
13,
18884,
285,
29915,
26680,
451,
6088,
995,
426,
1767,
29991,
29878,
10162,
13,
18884,
285,
29915,
408,
426,
1311,
3032,
18605,
29918,
1853,
17255,
978,
1649,
1118,
29915,
13,
18884,
285,
29915,
881,
367,
697,
310,
426,
18605,
29918,
5975,
29913,
1495,
13,
13,
1678,
822,
6088,
29918,
2917,
29898,
1311,
29892,
995,
29901,
903,
29873,
29889,
10773,
29897,
1599,
382,
29901,
13,
4706,
565,
451,
338,
8758,
29898,
1767,
29892,
851,
1125,
13,
9651,
12020,
1459,
2976,
2392,
877,
9684,
263,
1347,
1495,
13,
4706,
736,
1583,
29889,
5510,
29898,
1767,
29897,
13,
13,
1678,
822,
12725,
29898,
1311,
29892,
995,
29901,
382,
1125,
13,
4706,
1209,
13,
13,
1678,
822,
8453,
29898,
1311,
29897,
1599,
903,
29873,
29889,
27636,
29961,
710,
5387,
13,
4706,
5153,
353,
525,
29989,
4286,
7122,
29898,
29872,
29889,
978,
363,
321,
297,
1583,
3032,
18605,
29918,
1853,
29897,
13,
4706,
736,
5153,
13,
13,
1678,
822,
8453,
29918,
1767,
29898,
1311,
29892,
995,
29901,
382,
29897,
1599,
903,
29873,
29889,
27636,
29961,
710,
5387,
13,
4706,
736,
995,
29889,
978,
13,
13,
13,
1990,
10802,
29898,
11726,
29961,
2084,
1982,
29889,
2605,
29962,
1125,
13,
1678,
9995,
12914,
263,
934,
1788,
2224,
29892,
736,
263,
584,
1990,
18078,
2084,
1982,
29889,
2605,
1412,
13,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
17752,
29901,
903,
29873,
29889,
27636,
28513,
29873,
29889,
7196,
29961,
710,
5262,
353,
6213,
1125,
13,
4706,
9995,
6644,
278,
770,
29889,
13,
13,
4706,
584,
3207,
17752,
29901,
1051,
310,
6068,
934,
17752,
29889,
13,
13,
4706,
9995,
13,
13,
4706,
2428,
2141,
1649,
2344,
1649,
580,
13,
13,
4706,
1583,
3032,
24299,
353,
17752,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
995,
29901,
851,
29897,
1599,
2224,
1982,
29889,
2605,
29901,
13,
4706,
736,
2224,
1982,
29889,
2605,
29898,
1767,
467,
18837,
1792,
2141,
17863,
580,
13,
13,
1678,
822,
6088,
29918,
2917,
29898,
1311,
29892,
995,
29901,
903,
29873,
29889,
10773,
29897,
1599,
2224,
1982,
29889,
2605,
29901,
13,
4706,
565,
451,
338,
8758,
29898,
1767,
29892,
851,
1125,
13,
9651,
12020,
1459,
2976,
2392,
877,
9684,
263,
1347,
1495,
13,
4706,
736,
1583,
29889,
5510,
29898,
1767,
29897,
13,
13,
1678,
822,
12725,
29898,
1311,
29892,
995,
29901,
2224,
1982,
29889,
2605,
1125,
13,
4706,
565,
1583,
3032,
24299,
338,
451,
6213,
29901,
13,
9651,
565,
451,
738,
29898,
1767,
29889,
978,
29889,
1975,
2541,
29898,
1062,
29897,
363,
1294,
297,
1583,
3032,
24299,
1125,
13,
18884,
1294,
29879,
353,
13420,
15300,
7122,
29898,
1311,
3032,
24299,
29897,
13,
18884,
12020,
1459,
2976,
2392,
29898,
29888,
29915,
29912,
1767,
29913,
881,
505,
6081,
426,
1062,
29879,
29913,
1495,
13,
13,
1678,
822,
8453,
29898,
1311,
29897,
1599,
903,
29873,
29889,
27636,
29961,
710,
5387,
13,
4706,
565,
1583,
3032,
24299,
338,
451,
6213,
29901,
13,
9651,
736,
525,
29989,
4286,
7122,
877,
29930,
29915,
718,
321,
363,
321,
297,
1583,
3032,
24299,
29897,
13,
4706,
1683,
29901,
13,
9651,
736,
6213,
13,
13,
13,
1990,
10050,
1252,
9696,
2605,
29898,
2605,
1125,
13,
1678,
9995,
12914,
263,
934,
1788,
2224,
322,
11539,
393,
372,
1838,
29915,
29873,
1863,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
822,
12725,
29898,
1311,
29892,
995,
29901,
2224,
1982,
29889,
2605,
1125,
13,
4706,
2428,
2141,
15480,
29898,
1767,
29897,
13,
13,
4706,
565,
995,
29889,
9933,
7295,
13,
9651,
12020,
1459,
2976,
2392,
29898,
29888,
29915,
29912,
1767,
29913,
2307,
1863,
1495,
13,
13,
13,
1990,
1222,
15423,
2605,
29898,
2605,
1125,
13,
1678,
9995,
12914,
263,
934,
1788,
2224,
322,
11539,
393,
372,
4864,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
822,
12725,
29898,
1311,
29892,
995,
29901,
2224,
1982,
29889,
2605,
1125,
13,
4706,
2428,
2141,
15480,
29898,
1767,
29897,
13,
13,
4706,
565,
451,
995,
29889,
9933,
7295,
13,
9651,
12020,
1459,
2976,
2392,
29898,
29888,
29915,
29912,
1767,
29913,
1838,
20333,
29873,
1863,
1495,
13,
13,
13,
1990,
3497,
29898,
1252,
15423,
2605,
1125,
13,
1678,
9995,
12914,
2224,
304,
263,
934,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
822,
12725,
29898,
1311,
29892,
995,
29901,
2224,
1982,
29889,
2605,
1125,
13,
4706,
2428,
2141,
15480,
29898,
1767,
29897,
13,
13,
4706,
565,
451,
995,
29889,
275,
29918,
1445,
7295,
13,
9651,
12020,
1459,
2976,
2392,
29898,
29888,
29915,
29912,
1767,
29913,
338,
451,
263,
934,
1495,
13,
13,
13,
1990,
19378,
29898,
1252,
15423,
2605,
1125,
13,
1678,
9995,
12914,
2224,
304,
263,
3884,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
396,
3295,
9536,
6819,
421,
24299,
1412,
13,
4706,
2428,
2141,
1649,
2344,
1649,
580,
13,
13,
1678,
822,
12725,
29898,
1311,
29892,
995,
29901,
2224,
1982,
29889,
2605,
1125,
13,
4706,
2428,
2141,
15480,
29898,
1767,
29897,
13,
13,
4706,
565,
451,
995,
29889,
275,
29918,
3972,
7295,
13,
9651,
12020,
1459,
2976,
2392,
29898,
29888,
29915,
29912,
1767,
29913,
338,
451,
263,
3884,
1495,
13,
13,
13,
1990,
11786,
5612,
29877,
29898,
9170,
1125,
13,
1678,
9995,
12914,
2224,
304,
263,
6315,
9810,
29889,
13,
13,
1678,
910,
13812,
925,
12747,
393,
278,
2183,
3884,
756,
13,
1678,
263,
1014,
12322,
4257,
421,
1412,
5559,
29952,
1412,
13,
13,
1678,
9995,
13,
13,
1678,
822,
12725,
29898,
1311,
29892,
995,
29901,
2224,
1982,
29889,
2605,
1125,
13,
4706,
2428,
2141,
15480,
29898,
1767,
29897,
13,
13,
4706,
565,
451,
995,
29889,
7122,
2084,
12839,
5559,
2824,
275,
29918,
3972,
7295,
13,
9651,
12020,
1459,
2976,
2392,
29898,
29888,
29915,
29912,
1767,
29913,
338,
451,
263,
6315,
9810,
1495,
13,
13,
4706,
736,
995,
13,
13,
13,
1990,
350,
618,
29898,
11726,
29961,
29907,
29962,
1125,
13,
1678,
9995,
5596,
393,
995,
338,
7568,
29899,
470,
5224,
29899,
9917,
491,
777,
11938,
29889,
13,
13,
1678,
584,
3207,
6426,
29901,
13,
4706,
6426,
13812,
393,
674,
367,
1304,
304,
2869,
6088,
263,
995,
1434,
13,
4706,
8454,
967,
13451,
29889,
13,
1678,
584,
3207,
5224,
29901,
13,
4706,
731,
5224,
3216,
363,
995,
29892,
577,
591,
1996,
393,
4954,
1767,
1405,
5224,
29952,
1412,
13,
4706,
1815,
29915,
29873,
367,
2183,
565,
421,
13609,
29918,
262,
7009,
573,
29952,
338,
884,
2183,
29889,
13,
1678,
584,
3207,
5224,
29918,
262,
7009,
573,
29901,
13,
4706,
731,
5224,
3216,
363,
995,
29892,
577,
591,
1996,
393,
4954,
1767,
6736,
5224,
29952,
1412,
13,
4706,
1815,
29915,
29873,
367,
2183,
565,
421,
13609,
29952,
338,
884,
2183,
29889,
13,
1678,
584,
3207,
7568,
29901,
13,
4706,
731,
7568,
3216,
363,
995,
29892,
577,
591,
1996,
393,
4954,
1767,
529,
7568,
29952,
1412,
13,
4706,
1815,
29915,
29873,
367,
2183,
565,
421,
21064,
29918,
262,
7009,
573,
29952,
338,
884,
2183,
29889,
13,
1678,
584,
3207,
7568,
29918,
262,
7009,
573,
29901,
13,
4706,
731,
7568,
3216,
363,
995,
29892,
577,
591,
1996,
393,
4954,
1767,
5277,
7568,
29952,
1412,
13,
4706,
1815,
29915,
29873,
367,
2183,
565,
421,
21064,
29952,
338,
884,
2183,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
903,
24313,
353,
903,
29873,
29889,
1542,
9037,
877,
29918,
24313,
742,
3216,
2433,
17109,
1495,
13,
13,
1678,
903,
13609,
29901,
903,
29873,
29889,
27636,
29961,
29907,
29962,
353,
6213,
13,
1678,
9995,
19357,
3216,
1213,
15945,
13,
13,
1678,
903,
13609,
29918,
262,
7009,
573,
29901,
6120,
353,
5852,
13,
1678,
9995,
5574,
565,
5224,
3216,
338,
20978,
573,
1213,
15945,
13,
13,
1678,
903,
21064,
29901,
903,
29873,
29889,
27636,
29961,
29907,
29962,
353,
6213,
13,
1678,
9995,
26214,
3216,
1213,
15945,
13,
13,
1678,
903,
21064,
29918,
262,
7009,
573,
29901,
6120,
353,
5852,
13,
1678,
9995,
5574,
565,
7568,
3216,
338,
20978,
573,
1213,
15945,
13,
13,
1678,
822,
4770,
2344,
12035,
13,
4706,
1583,
29892,
13,
4706,
6426,
29901,
1459,
643,
29961,
29907,
1402,
13,
4706,
334,
29892,
13,
4706,
5224,
29901,
903,
29873,
29889,
27636,
29961,
29907,
29962,
353,
6213,
29892,
13,
4706,
5224,
29918,
262,
7009,
573,
29901,
903,
29873,
29889,
27636,
29961,
29907,
29962,
353,
6213,
29892,
13,
4706,
7568,
29901,
903,
29873,
29889,
27636,
29961,
29907,
29962,
353,
6213,
29892,
13,
4706,
7568,
29918,
262,
7009,
573,
29901,
903,
29873,
29889,
27636,
29961,
29907,
29962,
353,
6213,
13,
268,
1125,
13,
4706,
2428,
2141,
1649,
2344,
1649,
580,
13,
13,
4706,
1583,
3032,
3993,
29901,
1459,
643,
29961,
29907,
29962,
353,
6426,
13,
13,
4706,
565,
5224,
338,
451,
6213,
322,
5224,
29918,
262,
7009,
573,
338,
451,
6213,
29901,
13,
9651,
12020,
20948,
29898,
13,
18884,
525,
13609,
322,
5224,
29918,
262,
7009,
573,
2609,
367,
2183,
472,
278,
1021,
931,
1495,
13,
4706,
25342,
5224,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
13609,
29918,
9917,
29898,
13609,
29897,
13,
4706,
25342,
5224,
29918,
262,
7009,
573,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
13609,
29918,
9917,
29918,
262,
7009,
573,
29898,
13609,
29918,
262,
7009,
573,
29897,
13,
13,
4706,
565,
7568,
338,
451,
6213,
322,
7568,
29918,
262,
7009,
573,
338,
451,
6213,
29901,
13,
9651,
12020,
20948,
29898,
13,
18884,
525,
21064,
322,
7568,
29918,
262,
7009,
573,
2609,
367,
2183,
472,
278,
1021,
931,
1495,
13,
4706,
25342,
7568,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
21064,
29918,
9917,
29898,
21064,
29897,
13,
4706,
25342,
7568,
29918,
262,
7009,
573,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
21064,
29918,
9917,
29918,
262,
7009,
573,
29898,
21064,
29918,
262,
7009,
573,
29897,
13,
13,
1678,
822,
5224,
29918,
9917,
29898,
1311,
29901,
903,
24313,
29892,
5224,
29901,
315,
29897,
1599,
903,
24313,
29901,
13,
4706,
9995,
2697,
5224,
3216,
577,
591,
1996,
393,
421,
1767,
1405,
5224,
1412,
13,
13,
4706,
9995,
13,
13,
4706,
1583,
3032,
13609,
353,
5224,
13,
4706,
1583,
3032,
13609,
29918,
262,
7009,
573,
353,
7700,
13,
4706,
736,
1583,
13,
13,
1678,
822,
5224,
29918,
9917,
29918,
262,
7009,
573,
29898,
1311,
29901,
903,
24313,
29892,
5224,
29901,
315,
29897,
1599,
903,
24313,
29901,
13,
4706,
9995,
2697,
5224,
3216,
577,
591,
1996,
393,
421,
1767,
6736,
5224,
1412,
13,
13,
4706,
9995,
13,
13,
4706,
1583,
3032,
13609,
353,
5224,
13,
4706,
1583,
3032,
13609,
29918,
262,
7009,
573,
353,
5852,
13,
4706,
736,
1583,
13,
13,
1678,
822,
7568,
29918,
9917,
29898,
1311,
29901,
903,
24313,
29892,
7568,
29901,
315,
29897,
1599,
903,
24313,
29901,
13,
4706,
9995,
2697,
7568,
3216,
577,
591,
1996,
393,
421,
1767,
529,
7568,
1412,
13,
13,
4706,
9995,
13,
13,
4706,
1583,
3032,
21064,
353,
7568,
13,
4706,
1583,
3032,
21064,
29918,
262,
7009,
573,
353,
7700,
13,
4706,
736,
1583,
13,
13,
1678,
822,
7568,
29918,
9917,
29918,
262,
7009,
573,
29898,
1311,
29901,
903,
24313,
29892,
7568,
29901,
315,
29897,
1599,
903,
24313,
29901,
13,
4706,
9995,
2697,
7568,
3216,
577,
591,
1996,
393,
421,
1767,
5277,
7568,
1412,
13,
13,
4706,
9995,
13,
13,
4706,
1583,
3032,
21064,
353,
7568,
13,
4706,
1583,
3032,
21064,
29918,
262,
7009,
573,
353,
5852,
13,
4706,
736,
1583,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
995,
29901,
851,
29897,
1599,
315,
29901,
13,
4706,
736,
1583,
3032,
3993,
29889,
5510,
29898,
1767,
29897,
13,
13,
1678,
822,
6088,
29918,
2917,
29898,
1311,
29892,
995,
29901,
903,
29873,
29889,
10773,
29897,
1599,
315,
29901,
13,
4706,
736,
1583,
3032,
3993,
29889,
5510,
29918,
2917,
29898,
1767,
29897,
13,
13,
1678,
822,
12725,
29898,
1311,
29892,
995,
29901,
315,
1125,
13,
4706,
1583,
3032,
3993,
29889,
15480,
29898,
1767,
29897,
13,
13,
4706,
565,
1583,
3032,
13609,
338,
451,
6213,
29901,
13,
9651,
565,
1583,
3032,
13609,
29918,
262,
7009,
573,
322,
995,
529,
1583,
3032,
13609,
29901,
13,
18884,
12020,
1459,
2976,
2392,
29898,
13,
462,
1678,
285,
29915,
1767,
881,
367,
7621,
470,
5186,
304,
426,
1311,
3032,
13609,
1118,
29915,
13,
462,
1678,
285,
29915,
2355,
426,
1767,
29913,
2012,
1495,
13,
9651,
25342,
451,
1583,
3032,
13609,
29918,
262,
7009,
573,
322,
995,
5277,
1583,
3032,
13609,
29901,
13,
18884,
12020,
1459,
2976,
2392,
29898,
13,
462,
1678,
285,
29915,
1767,
881,
367,
7621,
1135,
426,
1311,
3032,
13609,
1118,
29915,
13,
462,
1678,
285,
29915,
2355,
426,
1767,
29913,
2012,
1495,
13,
13,
4706,
565,
1583,
3032,
21064,
338,
451,
6213,
29901,
13,
9651,
565,
1583,
3032,
21064,
29918,
262,
7009,
573,
322,
995,
1405,
1583,
3032,
21064,
29901,
13,
18884,
12020,
1459,
2976,
2392,
29898,
13,
462,
1678,
285,
29915,
1767,
881,
367,
3109,
261,
470,
5186,
304,
426,
1311,
3032,
21064,
1118,
29915,
13,
462,
1678,
285,
29915,
2355,
426,
1767,
29913,
2012,
1495,
13,
9651,
25342,
451,
1583,
3032,
21064,
29918,
262,
7009,
573,
322,
995,
6736,
1583,
3032,
21064,
29901,
13,
18884,
12020,
1459,
2976,
2392,
29898,
13,
462,
1678,
285,
29915,
1767,
881,
367,
3109,
261,
1135,
426,
1311,
3032,
21064,
1118,
29915,
13,
462,
1678,
285,
29915,
2355,
426,
1767,
29913,
2012,
1495,
13,
13,
13,
1990,
3118,
2776,
29898,
11726,
29961,
29911,
29962,
1125,
13,
1678,
9995,
5596,
565,
278,
21213,
995,
338,
697,
310,
278,
2183,
731,
310,
1819,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
6426,
29901,
1459,
643,
29961,
29911,
1402,
1819,
29901,
903,
29873,
29889,
7196,
29961,
29911,
29962,
1125,
13,
4706,
2428,
2141,
1649,
2344,
1649,
580,
13,
13,
4706,
1583,
3032,
3993,
353,
6426,
13,
4706,
1583,
3032,
24622,
29918,
5975,
353,
1819,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
995,
29901,
851,
29897,
1599,
323,
29901,
13,
4706,
736,
1583,
3032,
3993,
29889,
5510,
29898,
1767,
29897,
13,
13,
1678,
822,
6088,
29918,
2917,
29898,
1311,
29892,
995,
29901,
903,
29873,
29889,
10773,
29897,
1599,
323,
29901,
13,
4706,
736,
1583,
3032,
3993,
29889,
5510,
29918,
2917,
29898,
1767,
29897,
13,
13,
1678,
822,
12725,
29898,
1311,
29892,
995,
29901,
323,
1125,
13,
4706,
1583,
3032,
3993,
29889,
15480,
29898,
1767,
29897,
13,
13,
4706,
565,
995,
451,
297,
1583,
3032,
24622,
29918,
5975,
29901,
13,
9651,
1819,
353,
13420,
15300,
7122,
29898,
1958,
29898,
710,
29892,
1583,
3032,
24622,
29918,
5975,
876,
13,
9651,
12020,
1459,
2976,
2392,
29898,
13,
18884,
285,
29915,
26680,
451,
6088,
995,
426,
1767,
29991,
29878,
1118,
29915,
13,
18884,
285,
29915,
881,
367,
697,
310,
426,
5975,
29913,
1495,
13,
13,
1678,
822,
8453,
29898,
1311,
29897,
1599,
903,
29873,
29889,
27636,
29961,
710,
5387,
13,
4706,
5153,
353,
525,
29989,
4286,
7122,
29898,
710,
29898,
29872,
29897,
363,
321,
297,
1583,
3032,
24622,
29918,
5975,
29897,
13,
4706,
565,
7431,
29898,
14273,
29897,
529,
29871,
29947,
29900,
29901,
13,
9651,
736,
5153,
13,
4706,
1683,
29901,
13,
9651,
736,
2428,
2141,
2783,
29581,
580,
13,
13,
13,
1990,
25326,
29898,
11726,
29961,
710,
29962,
1125,
13,
1678,
9995,
5596,
565,
278,
21213,
995,
338,
697,
310,
278,
2183,
731,
310,
1819,
29889,
13,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
6426,
29901,
1459,
643,
29961,
710,
1402,
6528,
29901,
903,
29873,
29889,
19986,
29961,
710,
29892,
337,
29889,
17144,
29962,
1125,
13,
4706,
2428,
2141,
1649,
2344,
1649,
580,
13,
13,
4706,
565,
338,
8758,
29898,
13087,
29892,
851,
1125,
13,
9651,
6528,
353,
337,
29889,
12198,
29898,
13087,
29897,
13,
13,
4706,
1583,
3032,
3993,
353,
6426,
13,
4706,
1583,
3032,
13087,
353,
6528,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
995,
29901,
851,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
3032,
3993,
29889,
5510,
29898,
1767,
29897,
13,
13,
1678,
822,
6088,
29918,
2917,
29898,
1311,
29892,
995,
29901,
903,
29873,
29889,
10773,
29897,
1599,
851,
29901,
13,
4706,
736,
1583,
3032,
3993,
29889,
5510,
29918,
2917,
29898,
1767,
29897,
13,
13,
1678,
822,
12725,
29898,
1311,
29892,
995,
29901,
851,
1125,
13,
4706,
1583,
3032,
3993,
29889,
15480,
29898,
1767,
29897,
13,
13,
4706,
565,
1583,
3032,
13087,
29889,
4352,
29898,
1767,
29897,
338,
6213,
29901,
13,
9651,
12020,
1459,
2976,
2392,
29898,
13,
18884,
285,
29915,
1767,
881,
1993,
6528,
320,
29915,
29912,
1311,
3032,
13087,
29889,
11037,
1012,
29915,
1495,
13,
2
] |
gdrivefs-0.14.9-py3.6.egg/gdrivefs/utility.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 0 | 23943 | import logging
import json
import re
import sys
import gdrivefs.conf
_logger = logging.getLogger(__name__)
# TODO(dustin): Make these individual functions.
class _DriveUtility(object):
"""General utility functions loosely related to GD."""
# # Mime-types to translate to, if they appear within the "exportLinks" list.
# gd_to_normal_mime_mappings = {
# 'application/vnd.google-apps.document':
# 'text/plain',
# 'application/vnd.google-apps.spreadsheet':
# 'application/vnd.ms-excel',
# 'application/vnd.google-apps.presentation':
#/gd_to_normal_mime_mappings
# 'application/vnd.ms-powerpoint',
# 'application/vnd.google-apps.drawing':
# 'application/pdf',
# 'application/vnd.google-apps.audio':
# 'audio/mpeg',
# 'application/vnd.google-apps.photo':
# 'image/png',
# 'application/vnd.google-apps.video':
# 'video/x-flv'
# }
# Default extensions for mime-types.
# TODO(dustin): !! Move this to the config directory.
default_extensions = {
'text/plain': 'txt',
'application/vnd.ms-excel': 'xls',
'application/vnd.ms-powerpoint': 'ppt',
'application/pdf': 'pdf',
'audio/mpeg': 'mp3',
'image/png': 'png',
'video/x-flv': 'flv'
}
local_character_set = sys.getfilesystemencoding()
def __init__(self):
self.__load_mappings()
def __load_mappings(self):
# Allow someone to override our default mappings of the GD types.
# TODO(dustin): Isn't actually used, so commenting.
# gd_to_normal_mapping_filepath = \
# gdrivefs.conf.Conf.get('gd_to_normal_mapping_filepath')
#
# try:
# with open(gd_to_normal_mapping_filepath, 'r') as f:
# self.gd_to_normal_mime_mappings.extend(json.load(f))
# except IOError:
# _logger.info("No mime-mapping was found.")
# Allow someone to set file-extensions for mime-types, and not rely on
# Python's educated guesses.
extension_mapping_filepath = \
gdrivefs.conf.Conf.get('extension_mapping_filepath')
try:
with open(extension_mapping_filepath, 'r') as f:
self.default_extensions.extend(json.load(f))
except IOError:
_logger.info("No extension-mapping was found.")
def get_first_mime_type_by_extension(self, extension):
found = [
mime_type
for mime_type, temp_extension
in self.default_extensions.items()
if temp_extension == extension
]
if not found:
return None
return found[0]
def translate_filename_charset(self, original_filename):
"""Convert the given filename to the correct character set."""
# fusepy doesn't support the Python 2.x Unicode type. Expect a native
# string (anything but a byte string).
return original_filename
# # If we're in an older version of Python that still defines the Unicode
# # class and the filename isn't unicode, translate it.
#
# try:
# sys.modules['__builtin__'].unicode
# except AttributeError:
# pass
# else:
# if issubclass(original_filename.__class__, unicode) is False:
# return unicode(original_filename)#original_filename.decode(self.local_character_set)
#
# # It's already unicode. Don't do anything.
# return original_filename
def make_safe_for_filename(self, text):
"""Remove any filename-invalid characters."""
return re.sub('[^a-z0-9\-_\.]+', '', text)
utility = _DriveUtility()
| [
1,
1053,
12183,
13,
5215,
4390,
13,
5215,
337,
13,
5215,
10876,
13,
13,
5215,
330,
21594,
5847,
29889,
5527,
13,
13,
29918,
21707,
353,
12183,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
29937,
14402,
29898,
29881,
504,
262,
1125,
8561,
1438,
5375,
3168,
29889,
13,
13,
13,
1990,
903,
29928,
4401,
7270,
537,
29898,
3318,
1125,
13,
1678,
9995,
15263,
19725,
3168,
658,
359,
873,
4475,
304,
402,
29928,
1213,
15945,
13,
13,
29937,
1678,
396,
341,
603,
29899,
8768,
304,
14240,
304,
29892,
565,
896,
2615,
2629,
278,
376,
15843,
6595,
29879,
29908,
1051,
29889,
13,
29937,
1678,
330,
29881,
29918,
517,
29918,
8945,
29918,
29885,
603,
29918,
655,
27775,
353,
426,
13,
29937,
9651,
525,
6214,
29914,
29894,
299,
29889,
3608,
29899,
13371,
29889,
3225,
2396,
308,
13,
29937,
18884,
525,
726,
29914,
24595,
742,
13,
29937,
9651,
525,
6214,
29914,
29894,
299,
29889,
3608,
29899,
13371,
29889,
1028,
27844,
2396,
418,
13,
29937,
18884,
525,
6214,
29914,
29894,
299,
29889,
1516,
29899,
24633,
742,
13,
29937,
9651,
525,
6214,
29914,
29894,
299,
29889,
3608,
29899,
13371,
29889,
26081,
2396,
268,
13,
29937,
29914,
29887,
29881,
29918,
517,
29918,
8945,
29918,
29885,
603,
29918,
655,
27775,
13,
29937,
18884,
525,
6214,
29914,
29894,
299,
29889,
1516,
29899,
13519,
3149,
742,
13,
29937,
9651,
525,
6214,
29914,
29894,
299,
29889,
3608,
29899,
13371,
29889,
4012,
292,
2396,
3986,
13,
29937,
18884,
525,
6214,
29914,
5140,
742,
13,
29937,
9651,
525,
6214,
29914,
29894,
299,
29889,
3608,
29899,
13371,
29889,
18494,
2396,
9651,
13,
29937,
18884,
525,
18494,
29914,
20856,
742,
13,
29937,
9651,
525,
6214,
29914,
29894,
299,
29889,
3608,
29899,
13371,
29889,
21596,
2396,
9651,
13,
29937,
18884,
525,
3027,
29914,
2732,
742,
13,
29937,
9651,
525,
6214,
29914,
29894,
299,
29889,
3608,
29899,
13371,
29889,
9641,
2396,
9651,
13,
29937,
18884,
525,
9641,
29914,
29916,
29899,
1579,
29894,
29915,
13,
29937,
4706,
500,
13,
13,
1678,
396,
13109,
17752,
363,
286,
603,
29899,
8768,
29889,
13,
29937,
14402,
29898,
29881,
504,
262,
1125,
21443,
25249,
445,
304,
278,
2295,
3884,
29889,
13,
1678,
2322,
29918,
24299,
353,
426,
29871,
13,
9651,
525,
726,
29914,
24595,
2396,
462,
539,
525,
3945,
742,
13,
9651,
525,
6214,
29914,
29894,
299,
29889,
1516,
29899,
24633,
2396,
308,
525,
20267,
742,
13,
9651,
525,
6214,
29914,
29894,
299,
29889,
1516,
29899,
13519,
3149,
2396,
1678,
525,
407,
29873,
742,
13,
9651,
525,
6214,
29914,
5140,
2396,
462,
29871,
525,
5140,
742,
13,
9651,
525,
18494,
29914,
20856,
2396,
462,
539,
525,
1526,
29941,
742,
13,
9651,
525,
3027,
29914,
2732,
2396,
462,
4706,
525,
2732,
742,
13,
9651,
525,
9641,
29914,
29916,
29899,
1579,
29894,
2396,
462,
418,
525,
1579,
29894,
29915,
13,
4706,
500,
13,
13,
1678,
1887,
29918,
18609,
29918,
842,
353,
10876,
29889,
657,
5325,
973,
22331,
580,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
17255,
1359,
29918,
655,
27775,
580,
13,
13,
1678,
822,
4770,
1359,
29918,
655,
27775,
29898,
1311,
1125,
13,
4706,
396,
29408,
4856,
304,
5712,
1749,
2322,
611,
27775,
310,
278,
402,
29928,
4072,
29889,
13,
13,
29937,
14402,
29898,
29881,
504,
262,
1125,
29489,
29915,
29873,
2869,
1304,
29892,
577,
3440,
292,
29889,
13,
29937,
4706,
330,
29881,
29918,
517,
29918,
8945,
29918,
20698,
29918,
1445,
2084,
353,
320,
13,
29937,
9651,
330,
21594,
5847,
29889,
5527,
29889,
16376,
29889,
657,
877,
29887,
29881,
29918,
517,
29918,
8945,
29918,
20698,
29918,
1445,
2084,
1495,
13,
29937,
13,
29937,
4706,
1018,
29901,
13,
29937,
9651,
411,
1722,
29898,
29887,
29881,
29918,
517,
29918,
8945,
29918,
20698,
29918,
1445,
2084,
29892,
525,
29878,
1495,
408,
285,
29901,
13,
29937,
18884,
1583,
29889,
29887,
29881,
29918,
517,
29918,
8945,
29918,
29885,
603,
29918,
655,
27775,
29889,
21843,
29898,
3126,
29889,
1359,
29898,
29888,
876,
13,
29937,
4706,
5174,
10663,
2392,
29901,
13,
29937,
9651,
903,
21707,
29889,
3888,
703,
3782,
286,
603,
29899,
20698,
471,
1476,
23157,
13,
13,
4706,
396,
29408,
4856,
304,
731,
934,
29899,
24299,
363,
286,
603,
29899,
8768,
29892,
322,
451,
19104,
373,
29871,
13,
4706,
396,
5132,
29915,
29879,
27729,
4140,
267,
29889,
13,
13,
4706,
6081,
29918,
20698,
29918,
1445,
2084,
353,
320,
13,
9651,
330,
21594,
5847,
29889,
5527,
29889,
16376,
29889,
657,
877,
17588,
29918,
20698,
29918,
1445,
2084,
1495,
13,
13,
4706,
1018,
29901,
13,
9651,
411,
1722,
29898,
17588,
29918,
20698,
29918,
1445,
2084,
29892,
525,
29878,
1495,
408,
285,
29901,
13,
18884,
1583,
29889,
4381,
29918,
24299,
29889,
21843,
29898,
3126,
29889,
1359,
29898,
29888,
876,
13,
4706,
5174,
10663,
2392,
29901,
13,
9651,
903,
21707,
29889,
3888,
703,
3782,
6081,
29899,
20698,
471,
1476,
23157,
13,
13,
1678,
822,
679,
29918,
4102,
29918,
29885,
603,
29918,
1853,
29918,
1609,
29918,
17588,
29898,
1311,
29892,
6081,
1125,
13,
13,
4706,
1476,
353,
518,
29871,
13,
9651,
286,
603,
29918,
1853,
29871,
13,
9651,
363,
286,
603,
29918,
1853,
29892,
5694,
29918,
17588,
29871,
13,
9651,
297,
1583,
29889,
4381,
29918,
24299,
29889,
7076,
580,
13,
9651,
565,
5694,
29918,
17588,
1275,
6081,
13,
4706,
4514,
13,
13,
4706,
565,
451,
1476,
29901,
13,
9651,
736,
6213,
13,
13,
4706,
736,
1476,
29961,
29900,
29962,
13,
13,
1678,
822,
14240,
29918,
9507,
29918,
3090,
842,
29898,
1311,
29892,
2441,
29918,
9507,
1125,
13,
4706,
9995,
18455,
278,
2183,
10422,
304,
278,
1959,
2931,
731,
1213,
15945,
13,
13,
4706,
396,
285,
1509,
2272,
1838,
29915,
29873,
2304,
278,
5132,
29871,
29906,
29889,
29916,
23862,
1134,
29889,
1222,
1103,
263,
7531,
13,
4706,
396,
1347,
313,
1384,
1918,
541,
263,
7023,
1347,
467,
13,
4706,
736,
2441,
29918,
9507,
13,
4706,
13,
29937,
4706,
396,
960,
591,
29915,
276,
297,
385,
9642,
1873,
310,
5132,
393,
1603,
17645,
278,
23862,
13,
29937,
4706,
396,
770,
322,
278,
10422,
3508,
29915,
29873,
29104,
29892,
14240,
372,
29889,
13,
29937,
13,
29937,
4706,
1018,
29901,
13,
29937,
9651,
10876,
29889,
7576,
1839,
1649,
16145,
262,
1649,
13359,
2523,
356,
13,
29937,
4706,
5174,
23833,
2392,
29901,
13,
29937,
9651,
1209,
13,
29937,
4706,
1683,
29901,
13,
29937,
9651,
565,
338,
1491,
1990,
29898,
13492,
29918,
9507,
17255,
1990,
1649,
29892,
29104,
29897,
338,
7700,
29901,
13,
29937,
18884,
736,
29104,
29898,
13492,
29918,
9507,
29897,
29937,
13492,
29918,
9507,
29889,
13808,
29898,
1311,
29889,
2997,
29918,
18609,
29918,
842,
29897,
13,
29937,
13,
29937,
4706,
396,
739,
29915,
29879,
2307,
29104,
29889,
3872,
29915,
29873,
437,
3099,
29889,
13,
29937,
4706,
736,
2441,
29918,
9507,
13,
13,
1678,
822,
1207,
29918,
11177,
29918,
1454,
29918,
9507,
29898,
1311,
29892,
1426,
1125,
13,
4706,
9995,
15941,
738,
10422,
29899,
20965,
4890,
1213,
15945,
13,
268,
13,
4706,
736,
337,
29889,
1491,
877,
22896,
29874,
29899,
29920,
29900,
29899,
29929,
29905,
29899,
3187,
5586,
29974,
742,
15516,
1426,
29897,
13,
13,
329,
1793,
353,
903,
29928,
4401,
7270,
537,
580,
13,
2
] |
flask_dance/contrib/okta.py | wsheppard/flask-dance | 1 | 133989 | <reponame>wsheppard/flask-dance
from __future__ import unicode_literals
from flask_dance.consumer import OAuth2ConsumerBlueprint
from functools import partial
from flask.globals import LocalProxy, _lookup_app_object
try:
from flask import _app_ctx_stack as stack
except ImportError:
from flask import _request_ctx_stack as stack
__maintainer__ = "<NAME> <<EMAIL>>"
def make_okta_blueprint(
client_id=None, client_secret=None, base_url=None, scope=None, redirect_url=None,
token_url=None, redirect_to=None, login_url=None, authorization_url=None,
session_class=None, backend=None):
"""
Make a blueprint for authenticating with Okta using OAuth 2. This requires
a client ID and client secret from OKta. You should either pass them to
this constructor, or make sure that your Flask application config defines
them, using the variables OKTA_OAUTH_CLIENT_ID and OKTA_OAUTH_CLIENT_SECRET.
Args:
client_id (str): The client ID for your application on Okta.
client_secret (str): The client secret for your application on Okta
scope (list, optional): list of scopes (str) for the OAuth token
redirect_url (str): the URL to redirect to after the authentication
dance is complete
redirect_to (str): if ``redirect_url`` is not defined, the name of the
view to redirect to after the authentication dance is complete.
The actual URL will be determined by :func:`flask.url_for`
login_url (str, optional): the URL path for the ``login`` view.
Defaults to ``/okta``
authorized_url (str, optional): the URL path for the ``authorized`` view.
Defaults to ``/okta/authorized``.
session_class (class, optional): The class to use for creating a
Requests session. Defaults to
:class:`~flask_dance.consumer.requests.OAuth2Session`.
backend: A storage backend class, or an instance of a storage
backend class, to use for this blueprint. Defaults to
:class:`~flask_dance.consumer.backend.session.SessionBackend`.
:rtype: :class:`~flask_dance.consumer.OAuth2ConsumerBlueprint`
:returns: A :ref:`blueprint <flask:blueprints>` to attach to your Flask app.
"""
scope = scope or ["openid", "email", "profile"]
okta_bp = OAuth2ConsumerBlueprint("okta", __name__,
client_id=client_id,
client_secret=client_secret,
scope=scope,
base_url=base_url,
token_url=token_url,
authorization_url=authorization_url,
redirect_url=redirect_url,
redirect_to=redirect_to,
login_url=login_url,
session_class=session_class,
backend=backend,
)
okta_bp.from_config["client_id"] = "OKTA_OAUTH_CLIENT_ID"
okta_bp.from_config["client_secret"] = "OKTA_OAUTH_CLIENT_SECRET"
@okta_bp.before_app_request
def set_applocal_session():
ctx = stack.top
ctx.okta_oauth = okta_bp.session
return okta_bp
okta = LocalProxy(partial(_lookup_app_object, "okta_oauth"))
| [
1,
529,
276,
1112,
420,
29958,
5652,
354,
407,
538,
29914,
1579,
1278,
29899,
29881,
749,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
13,
3166,
29784,
29918,
29881,
749,
29889,
25978,
261,
1053,
438,
6444,
29906,
13696,
4680,
21319,
2158,
13,
3166,
2090,
312,
8789,
1053,
7687,
13,
3166,
29784,
29889,
23705,
1338,
1053,
9959,
14048,
29892,
903,
20401,
29918,
932,
29918,
3318,
13,
2202,
29901,
13,
1678,
515,
29784,
1053,
903,
932,
29918,
13073,
29918,
1429,
408,
5096,
13,
19499,
16032,
2392,
29901,
13,
1678,
515,
29784,
1053,
903,
3827,
29918,
13073,
29918,
1429,
408,
5096,
13,
13,
13,
1649,
29885,
2365,
4008,
1649,
353,
9872,
5813,
29958,
3532,
26862,
6227,
6778,
29908,
13,
13,
13,
1753,
1207,
29918,
554,
941,
29918,
9539,
2158,
29898,
13,
4706,
3132,
29918,
333,
29922,
8516,
29892,
3132,
29918,
19024,
29922,
8516,
29892,
2967,
29918,
2271,
29922,
8516,
29892,
6874,
29922,
8516,
29892,
6684,
29918,
2271,
29922,
8516,
29892,
13,
4706,
5993,
29918,
2271,
29922,
8516,
29892,
6684,
29918,
517,
29922,
8516,
29892,
6464,
29918,
2271,
29922,
8516,
29892,
28733,
29918,
2271,
29922,
8516,
29892,
13,
4706,
4867,
29918,
1990,
29922,
8516,
29892,
14998,
29922,
8516,
1125,
13,
1678,
9995,
13,
1678,
8561,
263,
7254,
2158,
363,
15585,
1218,
411,
3674,
941,
773,
438,
6444,
29871,
29906,
29889,
910,
6858,
13,
1678,
263,
3132,
3553,
322,
3132,
7035,
515,
9280,
941,
29889,
887,
881,
2845,
1209,
963,
304,
13,
1678,
445,
5823,
29892,
470,
1207,
1854,
393,
596,
2379,
1278,
2280,
2295,
17645,
13,
1678,
963,
29892,
773,
278,
3651,
9280,
6040,
29918,
29949,
20656,
29950,
29918,
27205,
3919,
29918,
1367,
322,
9280,
6040,
29918,
29949,
20656,
29950,
29918,
27205,
3919,
29918,
1660,
22245,
29911,
29889,
13,
13,
1678,
826,
3174,
29901,
13,
4706,
3132,
29918,
333,
313,
710,
1125,
450,
3132,
3553,
363,
596,
2280,
373,
3674,
941,
29889,
13,
4706,
3132,
29918,
19024,
313,
710,
1125,
450,
3132,
7035,
363,
596,
2280,
373,
3674,
941,
13,
4706,
6874,
313,
1761,
29892,
13136,
1125,
1051,
310,
16505,
267,
313,
710,
29897,
363,
278,
438,
6444,
5993,
13,
4706,
6684,
29918,
2271,
313,
710,
1125,
278,
3988,
304,
6684,
304,
1156,
278,
10760,
13,
9651,
17948,
338,
4866,
13,
4706,
6684,
29918,
517,
313,
710,
1125,
565,
4954,
17886,
29918,
2271,
16159,
338,
451,
3342,
29892,
278,
1024,
310,
278,
13,
9651,
1776,
304,
6684,
304,
1156,
278,
10760,
17948,
338,
4866,
29889,
13,
9651,
450,
3935,
3988,
674,
367,
10087,
491,
584,
9891,
18078,
1579,
1278,
29889,
2271,
29918,
1454,
29952,
13,
4706,
6464,
29918,
2271,
313,
710,
29892,
13136,
1125,
278,
3988,
2224,
363,
278,
4954,
7507,
16159,
1776,
29889,
13,
9651,
13109,
29879,
304,
4954,
29914,
554,
941,
16159,
13,
4706,
4148,
1891,
29918,
2271,
313,
710,
29892,
13136,
1125,
278,
3988,
2224,
363,
278,
4954,
8921,
1891,
16159,
1776,
29889,
13,
9651,
13109,
29879,
304,
4954,
29914,
554,
941,
29914,
8921,
1891,
29952,
1412,
13,
4706,
4867,
29918,
1990,
313,
1990,
29892,
13136,
1125,
450,
770,
304,
671,
363,
4969,
263,
13,
9651,
10729,
29879,
4867,
29889,
13109,
29879,
304,
13,
9651,
584,
1990,
18078,
30022,
1579,
1278,
29918,
29881,
749,
29889,
25978,
261,
29889,
24830,
29889,
29949,
6444,
29906,
7317,
1412,
13,
4706,
14998,
29901,
319,
8635,
14998,
770,
29892,
470,
385,
2777,
310,
263,
8635,
13,
18884,
14998,
770,
29892,
304,
671,
363,
445,
7254,
2158,
29889,
13109,
29879,
304,
13,
18884,
584,
1990,
18078,
30022,
1579,
1278,
29918,
29881,
749,
29889,
25978,
261,
29889,
27852,
29889,
7924,
29889,
7317,
5841,
355,
1412,
13,
13,
1678,
584,
29878,
1853,
29901,
584,
1990,
18078,
30022,
1579,
1278,
29918,
29881,
749,
29889,
25978,
261,
29889,
29949,
6444,
29906,
13696,
4680,
21319,
2158,
29952,
13,
1678,
584,
18280,
29901,
319,
584,
999,
18078,
9539,
2158,
529,
1579,
1278,
29901,
9539,
2158,
29879,
13885,
304,
10641,
304,
596,
2379,
1278,
623,
29889,
13,
1678,
9995,
13,
1678,
6874,
353,
6874,
470,
6796,
3150,
333,
613,
376,
5269,
613,
376,
10185,
3108,
13,
1678,
3431,
941,
29918,
25288,
353,
438,
6444,
29906,
13696,
4680,
21319,
2158,
703,
554,
941,
613,
4770,
978,
1649,
29892,
13,
4706,
3132,
29918,
333,
29922,
4645,
29918,
333,
29892,
13,
4706,
3132,
29918,
19024,
29922,
4645,
29918,
19024,
29892,
13,
4706,
6874,
29922,
6078,
29892,
13,
4706,
2967,
29918,
2271,
29922,
3188,
29918,
2271,
29892,
13,
4706,
5993,
29918,
2271,
29922,
6979,
29918,
2271,
29892,
13,
4706,
28733,
29918,
2271,
29922,
8921,
2133,
29918,
2271,
29892,
13,
4706,
6684,
29918,
2271,
29922,
17886,
29918,
2271,
29892,
13,
4706,
6684,
29918,
517,
29922,
17886,
29918,
517,
29892,
13,
4706,
6464,
29918,
2271,
29922,
7507,
29918,
2271,
29892,
13,
4706,
4867,
29918,
1990,
29922,
7924,
29918,
1990,
29892,
13,
4706,
14998,
29922,
27852,
29892,
13,
1678,
1723,
13,
1678,
3431,
941,
29918,
25288,
29889,
3166,
29918,
2917,
3366,
4645,
29918,
333,
3108,
353,
376,
8949,
6040,
29918,
29949,
20656,
29950,
29918,
27205,
3919,
29918,
1367,
29908,
13,
1678,
3431,
941,
29918,
25288,
29889,
3166,
29918,
2917,
3366,
4645,
29918,
19024,
3108,
353,
376,
8949,
6040,
29918,
29949,
20656,
29950,
29918,
27205,
3919,
29918,
1660,
22245,
29911,
29908,
13,
13,
1678,
732,
554,
941,
29918,
25288,
29889,
11083,
29918,
932,
29918,
3827,
13,
1678,
822,
731,
29918,
932,
2997,
29918,
7924,
7295,
13,
4706,
12893,
353,
5096,
29889,
3332,
13,
4706,
12893,
29889,
554,
941,
29918,
23106,
353,
3431,
941,
29918,
25288,
29889,
7924,
13,
13,
1678,
736,
3431,
941,
29918,
25288,
13,
13,
554,
941,
353,
9959,
14048,
29898,
3846,
7373,
20401,
29918,
932,
29918,
3318,
29892,
376,
554,
941,
29918,
23106,
5783,
13,
2
] |
tpp_twitter/twitter.py | SuperSonicHub1/twitter_plays_pyboy | 0 | 25676 | from dotenv import load_dotenv
import tweepy
from os import getenv
from typing import BinaryIO
BASE_BIO = "Inspired by @screenshakes. Powered by PyBoy: http://github.com/Baekalfen/PyBoy\n"
load_dotenv()
auth = tweepy.OAuthHandler(getenv('TWITTER_KEY'), getenv('TWITTER_SECRET'))
auth.set_access_token(getenv('TWITTER_ACCESS'), getenv('TWITTER_ACCESS_TOKEN'))
api = tweepy.API(auth)
def get_replies_from_latest():
"""Gathers replies from latest Tweet in order of popularity."""
latest_status = api.user_timeline(count=1, exclude_replies=True)[0]
return tweepy.Cursor(api.search, q="to:TextOnlyGameBoy", since_id=latest_status.id, result_type="recent").items()
def update(tweet_image: BinaryIO, profile_image: BinaryIO, text: str = "Image", bio: str = ""):
"""Send a Tweet with an image and optionally update the bio."""
screenshot = api.media_upload("screenshot.jpg", file=tweet_image)
api.update_profile_image("screenshot.jpg", file_=profile_image)
api.update_status(text, media_ids=[screenshot.media_id])
if bio:
api.update_profile(description=BASE_BIO + bio)
| [
1,
515,
8329,
6272,
1053,
2254,
29918,
6333,
6272,
13,
5215,
7780,
1022,
29891,
13,
3166,
2897,
1053,
679,
6272,
13,
3166,
19229,
1053,
29479,
5971,
13,
13,
25416,
29918,
29933,
5971,
353,
376,
797,
1028,
2859,
491,
732,
29879,
24546,
29882,
6926,
29889,
9206,
287,
491,
10772,
8431,
29891,
29901,
1732,
597,
3292,
29889,
510,
29914,
29933,
29874,
1416,
3131,
264,
29914,
19737,
8431,
29891,
29905,
29876,
29908,
13,
13,
1359,
29918,
6333,
6272,
580,
13,
13,
5150,
353,
7780,
1022,
29891,
29889,
29949,
6444,
4598,
29898,
657,
6272,
877,
16240,
1806,
4945,
29918,
10818,
5477,
679,
6272,
877,
16240,
1806,
4945,
29918,
1660,
22245,
29911,
8785,
13,
5150,
29889,
842,
29918,
5943,
29918,
6979,
29898,
657,
6272,
877,
16240,
1806,
4945,
29918,
2477,
23524,
5477,
679,
6272,
877,
16240,
1806,
4945,
29918,
2477,
23524,
29918,
4986,
29968,
1430,
8785,
13,
13,
2754,
353,
7780,
1022,
29891,
29889,
8787,
29898,
5150,
29897,
13,
13,
1753,
679,
29918,
3445,
3687,
29918,
3166,
29918,
12333,
7295,
13,
1678,
9995,
29954,
19467,
1634,
3687,
515,
9281,
323,
16668,
297,
1797,
310,
5972,
537,
1213,
15945,
13,
1678,
9281,
29918,
4882,
353,
7882,
29889,
1792,
29918,
9346,
5570,
29898,
2798,
29922,
29896,
29892,
19060,
29918,
3445,
3687,
29922,
5574,
9601,
29900,
29962,
13,
1678,
736,
7780,
1022,
29891,
29889,
19890,
29898,
2754,
29889,
4478,
29892,
3855,
543,
517,
29901,
1626,
11730,
14199,
8431,
29891,
613,
1951,
29918,
333,
29922,
12333,
29918,
4882,
29889,
333,
29892,
1121,
29918,
1853,
543,
276,
1760,
2564,
7076,
580,
13,
13,
1753,
2767,
29898,
29873,
16668,
29918,
3027,
29901,
29479,
5971,
29892,
8722,
29918,
3027,
29901,
29479,
5971,
29892,
1426,
29901,
851,
353,
376,
2940,
613,
17799,
29901,
851,
353,
5124,
1125,
13,
1678,
9995,
12600,
263,
323,
16668,
411,
385,
1967,
322,
2984,
635,
2767,
278,
17799,
1213,
15945,
13,
1678,
17286,
353,
7882,
29889,
9799,
29918,
9009,
703,
29879,
24546,
8711,
29889,
6173,
613,
934,
29922,
29873,
16668,
29918,
3027,
29897,
13,
1678,
7882,
29889,
5504,
29918,
10185,
29918,
3027,
703,
29879,
24546,
8711,
29889,
6173,
613,
934,
29918,
29922,
10185,
29918,
3027,
29897,
13,
1678,
7882,
29889,
5504,
29918,
4882,
29898,
726,
29892,
5745,
29918,
4841,
11759,
29879,
24546,
8711,
29889,
9799,
29918,
333,
2314,
13,
1678,
565,
17799,
29901,
13,
4706,
7882,
29889,
5504,
29918,
10185,
29898,
8216,
29922,
25416,
29918,
29933,
5971,
718,
17799,
29897,
13,
2
] |
health.py | adil-zhang/healthy_auto | 4 | 29217 | <reponame>adil-zhang/healthy_auto
# -*- coding: utf-8 -*-
# coding=utf-8
import json
import random
import requests
import argparse
import time
# 请求内容转json
def getval():
values = {"province": "北京", "city": "北京市", "addressType": "整租房", "temperature": "36.7", "dayNum": "", "contactHbPerplr": "无接触", "toWh": "未去过/路过武汉", "familySymptom": "无症状", "remarks": "", "otherDesc": "", "backDate": "2020-02-12",
"jtgj": "自驾/步行", "bc": "", "addressOther": "", "hbOther": "", "familyOther": None, "lj": "是", "ljOther": "", "workStatus": "到岗上班", "workOther": "", "returnCountry": "未出国", "returnCountryRemarks": "", "provinceId": "110000", "symptom": "无症状"}
values_json = json.dumps(values)
return values_json
# 请求头
def gethead():
headers = {'content-type': 'application/json'}
return headers
# 获取GitHub中Securts中的用户名
def getarg():
parser = argparse.ArgumentParser()
parser.add_argument("-s",
dest="PEOPLE",
nargs='*',
help="people name of the NAME list")
args = parser.parse_args()
people = args.PEOPLE
return people
if __name__ == '__main__':
people = getarg()
value = getval()
head = gethead()
# 防止每天时间固定,增加休眠时间(虽然actions的时间本来就不是很准确)
sl_s = random.randint(1, 2)
time.sleep(sl_s)
sl_m = int(sl_s/60)
print('本次休眠时间为'+str(sl_m)+'分钟')
print('**************耐心等待中*************')
if people:
for people in people:
url = 'https://health.foton.com.cn/health-attendance/health/save/'+people+'@foton'
req = requests.post(url, data=value, headers=head)
print('今日打卡成功!')
| [
1,
529,
276,
1112,
420,
29958,
328,
309,
29899,
29920,
11895,
29914,
354,
4298,
29891,
29918,
6921,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
14137,
29922,
9420,
29899,
29947,
13,
13,
13,
5215,
4390,
13,
5215,
4036,
13,
5215,
7274,
13,
5215,
1852,
5510,
13,
5215,
931,
13,
13,
29937,
29871,
31088,
31376,
30728,
31294,
31415,
3126,
13,
13,
13,
1753,
679,
791,
7295,
13,
1678,
1819,
353,
8853,
16123,
1239,
1115,
376,
30662,
30675,
613,
376,
12690,
1115,
376,
30662,
30675,
30461,
613,
376,
7328,
1542,
1115,
376,
233,
152,
183,
234,
170,
162,
31975,
613,
376,
12863,
1535,
1115,
376,
29941,
29953,
29889,
29955,
613,
376,
3250,
8009,
1115,
12633,
376,
12346,
29950,
29890,
5894,
572,
29878,
1115,
376,
31352,
31092,
235,
170,
169,
613,
376,
517,
8809,
1115,
376,
31295,
31475,
31138,
29914,
30874,
31138,
30819,
31593,
613,
376,
11922,
25548,
415,
290,
1115,
376,
31352,
234,
154,
138,
31531,
613,
376,
1745,
17862,
1115,
12633,
376,
1228,
19617,
1115,
12633,
376,
1627,
2539,
1115,
376,
29906,
29900,
29906,
29900,
29899,
29900,
29906,
29899,
29896,
29906,
613,
13,
795,
376,
22779,
29887,
29926,
1115,
376,
30688,
236,
172,
193,
29914,
233,
176,
168,
30448,
613,
376,
12328,
1115,
12633,
376,
7328,
16107,
1115,
12633,
376,
29882,
29890,
16107,
1115,
12633,
376,
11922,
16107,
1115,
6213,
29892,
376,
14042,
1115,
376,
30392,
613,
376,
14042,
16107,
1115,
12633,
376,
1287,
5709,
1115,
376,
30780,
232,
181,
154,
30429,
234,
146,
176,
613,
376,
1287,
16107,
1115,
12633,
376,
2457,
20779,
1115,
376,
31295,
30544,
30356,
613,
376,
2457,
20779,
7301,
17862,
1115,
12633,
376,
16123,
1239,
1204,
1115,
376,
29896,
29896,
29900,
29900,
29900,
29900,
613,
376,
11967,
415,
290,
1115,
376,
31352,
234,
154,
138,
31531,
9092,
13,
1678,
1819,
29918,
3126,
353,
4390,
29889,
29881,
17204,
29898,
5975,
29897,
13,
1678,
736,
1819,
29918,
3126,
13,
29937,
29871,
31088,
31376,
31584,
13,
13,
13,
1753,
679,
2813,
7295,
13,
1678,
9066,
353,
11117,
3051,
29899,
1853,
2396,
525,
6214,
29914,
3126,
10827,
13,
1678,
736,
9066,
13,
29937,
29871,
31024,
30683,
28712,
16046,
30275,
7898,
332,
1372,
30275,
30210,
30406,
31229,
30548,
13,
13,
13,
1753,
679,
1191,
7295,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
580,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
29899,
29879,
613,
13,
462,
4706,
2731,
543,
4162,
4590,
1307,
613,
13,
462,
4706,
302,
5085,
2433,
29930,
742,
13,
462,
4706,
1371,
543,
25719,
1024,
310,
278,
27085,
1051,
1159,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
1678,
2305,
353,
6389,
29889,
4162,
4590,
1307,
13,
1678,
736,
2305,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
13,
1678,
2305,
353,
679,
1191,
580,
13,
1678,
995,
353,
679,
791,
580,
13,
1678,
2343,
353,
679,
2813,
580,
13,
1678,
396,
29871,
236,
155,
181,
31981,
31951,
30408,
30594,
31016,
232,
158,
189,
30495,
30214,
232,
165,
161,
30666,
231,
191,
148,
234,
159,
163,
30594,
31016,
29898,
235,
156,
192,
31516,
7387,
30210,
30594,
31016,
30346,
30805,
31238,
30413,
30392,
232,
193,
139,
232,
138,
137,
31835,
29897,
13,
1678,
2243,
29918,
29879,
353,
4036,
29889,
9502,
524,
29898,
29896,
29892,
29871,
29906,
29897,
13,
1678,
931,
29889,
17059,
29898,
2536,
29918,
29879,
29897,
13,
1678,
2243,
29918,
29885,
353,
938,
29898,
2536,
29918,
29879,
29914,
29953,
29900,
29897,
13,
1678,
1596,
877,
30346,
30936,
231,
191,
148,
234,
159,
163,
30594,
31016,
30573,
18717,
710,
29898,
2536,
29918,
29885,
7240,
29915,
30748,
236,
149,
162,
1495,
13,
1678,
1596,
877,
4189,
2328,
1068,
235,
131,
147,
30869,
31184,
232,
193,
136,
30275,
4189,
2328,
29930,
1495,
13,
13,
1678,
565,
2305,
29901,
13,
4706,
363,
29871,
2305,
297,
2305,
29901,
13,
9651,
3142,
353,
525,
991,
597,
354,
4298,
29889,
29888,
327,
265,
29889,
510,
29889,
18038,
29914,
354,
4298,
29899,
1131,
21642,
29914,
354,
4298,
29914,
7620,
29914,
18717,
25719,
23097,
29992,
29888,
327,
265,
29915,
13,
9651,
12428,
353,
7274,
29889,
2490,
29898,
2271,
29892,
848,
29922,
1767,
29892,
9066,
29922,
2813,
29897,
13,
9651,
1596,
877,
31482,
30325,
31656,
232,
144,
164,
30494,
31134,
30584,
1495,
13,
29871,
13,
2
] |
tests/test_app1/securities/test_sec_register.py | loitd/myflask | 0 | 198819 | <filename>tests/test_app1/securities/test_sec_register.py
# https://viblo.asia/p/tim-hieu-ve-sql-injection-testing-RQqKLv90l7z
import pytest
from bs4 import BeautifulSoup as bs
from flask import url_for
def test_register_sqlinjection(app, client):
theurlstr = 'register_blp.reg'
with app.test_request_context():
# Test render without errors
assert client.get(url_for(theurlstr)).status_code == 200
# Test inject 1
data = dict(
inputName='2018 OR ""="',
inputEmail='<EMAIL> OR ""="',
inputPassword="<PASSWORD>"
)
reg = client.post(url_for(theurlstr), data=data, follow_redirects=True)
assert reg.status_code == 200 # has feedback
assert reg.headers.get("Location") == None
assert "Validation failed! Contact <EMAIL> for help" in reg.data.decode('utf-8')
assert '<script src="/static/js/login.js"></script>' not in reg.data.decode('utf-8') #not redirected to login
data = dict(
inputName='2018 OR ""="',
inputEmail='<EMAIL>',
inputPassword="<PASSWORD>"
)
reg = client.post(url_for(theurlstr), data=data, follow_redirects=True)
assert reg.status_code == 200 # has feedback
assert reg.headers.get("Location") == None
assert "Validation failed! Contact <EMAIL> for help" in reg.data.decode('utf-8')
assert '<script src="/static/js/login.js"></script>' not in reg.data.decode('utf-8') #not redirected to login
data = dict(
inputName='A test',
inputEmail='<EMAIL> OR ""="',
inputPassword="<PASSWORD>"
)
reg = client.post(url_for(theurlstr), data=data, follow_redirects=True)
assert reg.status_code == 200 # has feedback
assert reg.headers.get("Location") == None
assert "Validation failed! Contact <EMAIL> for help" in reg.data.decode('utf-8')
assert '<script src="/static/js/login.js"></script>' not in reg.data.decode('utf-8') #not redirected to login
data = dict(
inputName='<NAME>',
inputEmail="' OR 1=1",
inputPassword="<PASSWORD>"
)
reg = client.post(url_for(theurlstr), data=data, follow_redirects=True)
assert reg.status_code == 200 # has feedback
assert reg.headers.get("Location") == None
assert "Validation failed! Contact <EMAIL> for help" in reg.data.decode('utf-8')
assert '<script src="/static/js/login.js"></script>' not in reg.data.decode('utf-8') #not redirected to login
data = dict(
inputName='<NAME>',
inputEmail='<EMAIL>; DROP TABLE tbl_users; --',
inputPassword="<PASSWORD>"
)
reg = client.post(url_for(theurlstr), data=data, follow_redirects=True)
assert reg.status_code == 200 # has feedback
assert reg.headers.get("Location") == None
assert "Validation failed! Contact <EMAIL> for help" in reg.data.decode('utf-8')
assert '<script src="/static/js/login.js"></script>' not in reg.data.decode('utf-8') #not redirected to login
# Test length of inputName (must be from 6-20)
data = dict(
inputName='<NAME> i am the one who pass it alllllllllllllllllllllllllllll',
inputEmail='<EMAIL>',
inputPassword="<PASSWORD>"
)
reg = client.post(url_for(theurlstr), data=data, follow_redirects=True)
assert reg.status_code == 200 # has feedback
assert reg.headers.get("Location") == None
assert "Validation failed! Contact <EMAIL> for help" in reg.data.decode('utf-8')
assert '<script src="/static/js/login.js"></script>' not in reg.data.decode('utf-8') #not redirected to login
data = dict(
inputName='A',
inputEmail='<EMAIL>',
inputPassword="<PASSWORD>"
)
reg = client.post(url_for(theurlstr), data=data, follow_redirects=True)
assert reg.status_code == 200 # has feedback
assert reg.headers.get("Location") == None
assert "Validation failed! Contact <EMAIL> for help" in reg.data.decode('utf-8')
assert '<script src="/static/js/login.js"></script>' not in reg.data.decode('utf-8') #not redirected to login
data = dict(
inputName="'; select true; --",
inputEmail='<EMAIL>',
inputPassword="<PASSWORD>"
)
reg = client.post(url_for(theurlstr), data=data, follow_redirects=True)
assert reg.status_code == 200 # has feedback
assert reg.headers.get("Location") == None
assert "Validation failed! Contact <EMAIL> for help" in reg.data.decode('utf-8')
assert '<script src="/static/js/login.js"></script>' not in reg.data.decode('utf-8') #not redirected to login | [
1,
529,
9507,
29958,
21150,
29914,
1688,
29918,
932,
29896,
29914,
344,
2764,
1907,
29914,
1688,
29918,
3471,
29918,
9573,
29889,
2272,
13,
29937,
2045,
597,
29894,
747,
417,
29889,
26252,
29914,
29886,
29914,
9346,
29899,
29882,
9532,
29899,
345,
29899,
2850,
29899,
262,
6929,
29899,
13424,
29899,
29934,
29984,
29939,
29968,
29931,
29894,
29929,
29900,
29880,
29955,
29920,
13,
5215,
11451,
1688,
13,
3166,
24512,
29946,
1053,
25685,
29903,
1132,
408,
24512,
13,
3166,
29784,
1053,
3142,
29918,
1454,
13,
13,
1753,
1243,
29918,
9573,
29918,
2850,
262,
6929,
29898,
932,
29892,
3132,
1125,
13,
1678,
278,
2271,
710,
353,
525,
9573,
29918,
2204,
29886,
29889,
1727,
29915,
13,
1678,
411,
623,
29889,
1688,
29918,
3827,
29918,
4703,
7295,
13,
4706,
396,
4321,
4050,
1728,
4436,
13,
4706,
4974,
3132,
29889,
657,
29898,
2271,
29918,
1454,
29898,
1552,
2271,
710,
8106,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
13,
4706,
396,
4321,
11658,
29871,
29896,
13,
4706,
848,
353,
9657,
29898,
13,
9651,
1881,
1170,
2433,
29906,
29900,
29896,
29947,
6323,
5124,
543,
742,
13,
9651,
1881,
9823,
2433,
29966,
26862,
6227,
29958,
6323,
5124,
543,
742,
13,
9651,
1881,
10048,
543,
29966,
25711,
17013,
11903,
13,
4706,
1723,
13,
4706,
1072,
353,
3132,
29889,
2490,
29898,
2271,
29918,
1454,
29898,
1552,
2271,
710,
511,
848,
29922,
1272,
29892,
1101,
29918,
17886,
29879,
29922,
5574,
29897,
13,
4706,
4974,
1072,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
396,
756,
16705,
13,
4706,
4974,
1072,
29889,
13662,
29889,
657,
703,
6508,
1159,
1275,
6213,
13,
4706,
4974,
376,
19448,
5229,
29991,
22387,
529,
26862,
6227,
29958,
363,
1371,
29908,
297,
1072,
29889,
1272,
29889,
13808,
877,
9420,
29899,
29947,
1495,
13,
4706,
4974,
12801,
2154,
4765,
13802,
7959,
29914,
1315,
29914,
7507,
29889,
1315,
5319,
2154,
16299,
451,
297,
1072,
29889,
1272,
29889,
13808,
877,
9420,
29899,
29947,
1495,
396,
1333,
6684,
287,
304,
6464,
13,
308,
13,
4706,
848,
353,
9657,
29898,
13,
9651,
1881,
1170,
2433,
29906,
29900,
29896,
29947,
6323,
5124,
543,
742,
13,
9651,
1881,
9823,
2433,
29966,
26862,
6227,
29958,
742,
13,
9651,
1881,
10048,
543,
29966,
25711,
17013,
11903,
13,
4706,
1723,
13,
4706,
1072,
353,
3132,
29889,
2490,
29898,
2271,
29918,
1454,
29898,
1552,
2271,
710,
511,
848,
29922,
1272,
29892,
1101,
29918,
17886,
29879,
29922,
5574,
29897,
13,
4706,
4974,
1072,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
396,
756,
16705,
13,
4706,
4974,
1072,
29889,
13662,
29889,
657,
703,
6508,
1159,
1275,
6213,
13,
4706,
4974,
376,
19448,
5229,
29991,
22387,
529,
26862,
6227,
29958,
363,
1371,
29908,
297,
1072,
29889,
1272,
29889,
13808,
877,
9420,
29899,
29947,
1495,
13,
4706,
4974,
12801,
2154,
4765,
13802,
7959,
29914,
1315,
29914,
7507,
29889,
1315,
5319,
2154,
16299,
451,
297,
1072,
29889,
1272,
29889,
13808,
877,
9420,
29899,
29947,
1495,
396,
1333,
6684,
287,
304,
6464,
13,
308,
13,
4706,
848,
353,
9657,
29898,
13,
9651,
1881,
1170,
2433,
29909,
1243,
742,
13,
9651,
1881,
9823,
2433,
29966,
26862,
6227,
29958,
6323,
5124,
543,
742,
13,
9651,
1881,
10048,
543,
29966,
25711,
17013,
11903,
13,
4706,
1723,
13,
4706,
1072,
353,
3132,
29889,
2490,
29898,
2271,
29918,
1454,
29898,
1552,
2271,
710,
511,
848,
29922,
1272,
29892,
1101,
29918,
17886,
29879,
29922,
5574,
29897,
13,
4706,
4974,
1072,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
396,
756,
16705,
13,
4706,
4974,
1072,
29889,
13662,
29889,
657,
703,
6508,
1159,
1275,
6213,
13,
4706,
4974,
376,
19448,
5229,
29991,
22387,
529,
26862,
6227,
29958,
363,
1371,
29908,
297,
1072,
29889,
1272,
29889,
13808,
877,
9420,
29899,
29947,
1495,
13,
4706,
4974,
12801,
2154,
4765,
13802,
7959,
29914,
1315,
29914,
7507,
29889,
1315,
5319,
2154,
16299,
451,
297,
1072,
29889,
1272,
29889,
13808,
877,
9420,
29899,
29947,
1495,
396,
1333,
6684,
287,
304,
6464,
13,
308,
13,
4706,
848,
353,
9657,
29898,
13,
9651,
1881,
1170,
2433,
29966,
5813,
29958,
742,
13,
9651,
1881,
9823,
543,
29915,
6323,
29871,
29896,
29922,
29896,
613,
13,
9651,
1881,
10048,
543,
29966,
25711,
17013,
11903,
13,
4706,
1723,
13,
4706,
1072,
353,
3132,
29889,
2490,
29898,
2271,
29918,
1454,
29898,
1552,
2271,
710,
511,
848,
29922,
1272,
29892,
1101,
29918,
17886,
29879,
29922,
5574,
29897,
13,
4706,
4974,
1072,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
396,
756,
16705,
13,
4706,
4974,
1072,
29889,
13662,
29889,
657,
703,
6508,
1159,
1275,
6213,
13,
4706,
4974,
376,
19448,
5229,
29991,
22387,
529,
26862,
6227,
29958,
363,
1371,
29908,
297,
1072,
29889,
1272,
29889,
13808,
877,
9420,
29899,
29947,
1495,
13,
4706,
4974,
12801,
2154,
4765,
13802,
7959,
29914,
1315,
29914,
7507,
29889,
1315,
5319,
2154,
16299,
451,
297,
1072,
29889,
1272,
29889,
13808,
877,
9420,
29899,
29947,
1495,
396,
1333,
6684,
287,
304,
6464,
13,
13,
4706,
848,
353,
9657,
29898,
13,
9651,
1881,
1170,
2433,
29966,
5813,
29958,
742,
13,
9651,
1881,
9823,
2433,
29966,
26862,
6227,
25867,
360,
29366,
10911,
19018,
29918,
7193,
29936,
1192,
742,
13,
9651,
1881,
10048,
543,
29966,
25711,
17013,
11903,
13,
4706,
1723,
13,
4706,
1072,
353,
3132,
29889,
2490,
29898,
2271,
29918,
1454,
29898,
1552,
2271,
710,
511,
848,
29922,
1272,
29892,
1101,
29918,
17886,
29879,
29922,
5574,
29897,
13,
4706,
4974,
1072,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
396,
756,
16705,
13,
4706,
4974,
1072,
29889,
13662,
29889,
657,
703,
6508,
1159,
1275,
6213,
13,
4706,
4974,
376,
19448,
5229,
29991,
22387,
529,
26862,
6227,
29958,
363,
1371,
29908,
297,
1072,
29889,
1272,
29889,
13808,
877,
9420,
29899,
29947,
1495,
13,
4706,
4974,
12801,
2154,
4765,
13802,
7959,
29914,
1315,
29914,
7507,
29889,
1315,
5319,
2154,
16299,
451,
297,
1072,
29889,
1272,
29889,
13808,
877,
9420,
29899,
29947,
1495,
396,
1333,
6684,
287,
304,
6464,
13,
13,
4706,
396,
4321,
3309,
310,
1881,
1170,
313,
21969,
367,
515,
29871,
29953,
29899,
29906,
29900,
29897,
13,
4706,
848,
353,
9657,
29898,
13,
9651,
1881,
1170,
2433,
29966,
5813,
29958,
474,
626,
278,
697,
1058,
1209,
372,
599,
645,
645,
645,
645,
645,
645,
645,
645,
645,
645,
645,
645,
645,
29880,
742,
13,
9651,
1881,
9823,
2433,
29966,
26862,
6227,
29958,
742,
13,
9651,
1881,
10048,
543,
29966,
25711,
17013,
11903,
13,
4706,
1723,
13,
4706,
1072,
353,
3132,
29889,
2490,
29898,
2271,
29918,
1454,
29898,
1552,
2271,
710,
511,
848,
29922,
1272,
29892,
1101,
29918,
17886,
29879,
29922,
5574,
29897,
13,
4706,
4974,
1072,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
396,
756,
16705,
13,
4706,
4974,
1072,
29889,
13662,
29889,
657,
703,
6508,
1159,
1275,
6213,
13,
4706,
4974,
376,
19448,
5229,
29991,
22387,
529,
26862,
6227,
29958,
363,
1371,
29908,
297,
1072,
29889,
1272,
29889,
13808,
877,
9420,
29899,
29947,
1495,
13,
4706,
4974,
12801,
2154,
4765,
13802,
7959,
29914,
1315,
29914,
7507,
29889,
1315,
5319,
2154,
16299,
451,
297,
1072,
29889,
1272,
29889,
13808,
877,
9420,
29899,
29947,
1495,
396,
1333,
6684,
287,
304,
6464,
13,
308,
13,
4706,
848,
353,
9657,
29898,
13,
9651,
1881,
1170,
2433,
29909,
742,
13,
9651,
1881,
9823,
2433,
29966,
26862,
6227,
29958,
742,
13,
9651,
1881,
10048,
543,
29966,
25711,
17013,
11903,
13,
4706,
1723,
13,
4706,
1072,
353,
3132,
29889,
2490,
29898,
2271,
29918,
1454,
29898,
1552,
2271,
710,
511,
848,
29922,
1272,
29892,
1101,
29918,
17886,
29879,
29922,
5574,
29897,
13,
4706,
4974,
1072,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
396,
756,
16705,
13,
4706,
4974,
1072,
29889,
13662,
29889,
657,
703,
6508,
1159,
1275,
6213,
13,
4706,
4974,
376,
19448,
5229,
29991,
22387,
529,
26862,
6227,
29958,
363,
1371,
29908,
297,
1072,
29889,
1272,
29889,
13808,
877,
9420,
29899,
29947,
1495,
13,
4706,
4974,
12801,
2154,
4765,
13802,
7959,
29914,
1315,
29914,
7507,
29889,
1315,
5319,
2154,
16299,
451,
297,
1072,
29889,
1272,
29889,
13808,
877,
9420,
29899,
29947,
1495,
396,
1333,
6684,
287,
304,
6464,
13,
308,
13,
4706,
848,
353,
9657,
29898,
13,
9651,
1881,
1170,
543,
2670,
1831,
1565,
29936,
1192,
613,
13,
9651,
1881,
9823,
2433,
29966,
26862,
6227,
29958,
742,
13,
9651,
1881,
10048,
543,
29966,
25711,
17013,
11903,
13,
4706,
1723,
13,
4706,
1072,
353,
3132,
29889,
2490,
29898,
2271,
29918,
1454,
29898,
1552,
2271,
710,
511,
848,
29922,
1272,
29892,
1101,
29918,
17886,
29879,
29922,
5574,
29897,
13,
4706,
4974,
1072,
29889,
4882,
29918,
401,
1275,
29871,
29906,
29900,
29900,
396,
756,
16705,
13,
4706,
4974,
1072,
29889,
13662,
29889,
657,
703,
6508,
1159,
1275,
6213,
13,
4706,
4974,
376,
19448,
5229,
29991,
22387,
529,
26862,
6227,
29958,
363,
1371,
29908,
297,
1072,
29889,
1272,
29889,
13808,
877,
9420,
29899,
29947,
1495,
13,
4706,
4974,
12801,
2154,
4765,
13802,
7959,
29914,
1315,
29914,
7507,
29889,
1315,
5319,
2154,
16299,
451,
297,
1072,
29889,
1272,
29889,
13808,
877,
9420,
29899,
29947,
1495,
396,
1333,
6684,
287,
304,
6464,
2
] |
tensorflow_probability/python/distributions/laplace_test.py | wataruhashimoto52/probability | 1 | 2296 | <reponame>wataruhashimoto52/probability
# Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# Dependency imports
import numpy as np
from scipy import stats as sp_stats
import tensorflow.compat.v2 as tf
import tensorflow_probability as tfp
from tensorflow_probability.python.internal import samplers
from tensorflow_probability.python.internal import test_util
tfd = tfp.distributions
@test_util.test_all_tf_execution_regimes
class LaplaceTest(test_util.TestCase):
def testLaplaceShape(self):
loc = tf.constant([3.0] * 5)
scale = tf.constant(11.0)
laplace = tfd.Laplace(loc=loc, scale=scale, validate_args=True)
self.assertEqual(self.evaluate(laplace.batch_shape_tensor()), (5,))
self.assertEqual(laplace.batch_shape, tf.TensorShape([5]))
self.assertAllEqual(self.evaluate(laplace.event_shape_tensor()), [])
self.assertEqual(laplace.event_shape, tf.TensorShape([]))
def testLaplaceLogPDF(self):
batch_size = 6
loc = tf.constant([2.0] * batch_size)
scale = tf.constant([3.0] * batch_size)
loc_v = 2.0
scale_v = 3.0
x = np.array([2.5, 2.5, 4.0, 0.1, 1.0, 2.0], dtype=np.float32)
laplace = tfd.Laplace(loc=loc, scale=scale, validate_args=True)
log_pdf = laplace.log_prob(x)
self.assertEqual(log_pdf.shape, (6,))
expected_log_pdf = sp_stats.laplace.logpdf(x, loc_v, scale=scale_v)
self.assertAllClose(self.evaluate(log_pdf), expected_log_pdf)
pdf = laplace.prob(x)
self.assertEqual(pdf.shape, (6,))
self.assertAllClose(self.evaluate(pdf), np.exp(expected_log_pdf))
def testLaplaceLogPDFMultidimensional(self):
batch_size = 6
loc = tf.constant([[2.0, 4.0]] * batch_size)
scale = tf.constant([[3.0, 4.0]] * batch_size)
loc_v = np.array([2.0, 4.0])
scale_v = np.array([3.0, 4.0])
x = np.array([[2.5, 2.5, 4.0, 0.1, 1.0, 2.0]], dtype=np.float32).T
laplace = tfd.Laplace(loc=loc, scale=scale, validate_args=True)
log_pdf = laplace.log_prob(x)
log_pdf_values = self.evaluate(log_pdf)
self.assertEqual(log_pdf.shape, (6, 2))
pdf = laplace.prob(x)
pdf_values = self.evaluate(pdf)
self.assertEqual(pdf.shape, (6, 2))
expected_log_pdf = sp_stats.laplace.logpdf(x, loc_v, scale=scale_v)
self.assertAllClose(log_pdf_values, expected_log_pdf)
self.assertAllClose(pdf_values, np.exp(expected_log_pdf))
def testLaplaceLogPDFMultidimensionalBroadcasting(self):
batch_size = 6
loc = tf.constant([[2.0, 4.0]] * batch_size)
scale = tf.constant(3.0)
loc_v = np.array([2.0, 4.0])
scale_v = 3.0
x = np.array([[2.5, 2.5, 4.0, 0.1, 1.0, 2.0]], dtype=np.float32).T
laplace = tfd.Laplace(loc=loc, scale=scale, validate_args=True)
log_pdf = laplace.log_prob(x)
log_pdf_values = self.evaluate(log_pdf)
self.assertEqual(log_pdf.shape, (6, 2))
pdf = laplace.prob(x)
pdf_values = self.evaluate(pdf)
self.assertEqual(pdf.shape, (6, 2))
expected_log_pdf = sp_stats.laplace.logpdf(x, loc_v, scale=scale_v)
self.assertAllClose(log_pdf_values, expected_log_pdf)
self.assertAllClose(pdf_values, np.exp(expected_log_pdf))
def testLaplaceCDF(self):
batch_size = 6
loc = tf.constant([2.0] * batch_size)
scale = tf.constant([3.0] * batch_size)
loc_v = 2.0
scale_v = 3.0
x = np.array([2.5, 2.5, 4.0, 0.1, 1.0, 2.0], dtype=np.float32)
laplace = tfd.Laplace(loc=loc, scale=scale, validate_args=True)
cdf = laplace.cdf(x)
self.assertEqual(cdf.shape, (6,))
expected_cdf = sp_stats.laplace.cdf(x, loc_v, scale=scale_v)
self.assertAllClose(self.evaluate(cdf), expected_cdf)
def testLaplaceLogCDF(self):
batch_size = 6
loc = tf.constant([2.0] * batch_size)
scale = tf.constant([3.0] * batch_size)
loc_v = 2.0
scale_v = 3.0
x = np.array([-2.5, 2.5, -4.0, 0.1, 1.0, 2.0], dtype=np.float32)
laplace = tfd.Laplace(loc=loc, scale=scale, validate_args=True)
cdf = laplace.log_cdf(x)
self.assertEqual(cdf.shape, (6,))
expected_cdf = sp_stats.laplace.logcdf(x, loc_v, scale=scale_v)
self.assertAllClose(self.evaluate(cdf), expected_cdf)
def testLaplaceQuantile(self):
qs = self.evaluate(
tf.concat(
[[0., 1],
samplers.uniform([10], minval=.1, maxval=.9,
seed=test_util.test_seed())],
axis=0))
d = tfd.Laplace(loc=1., scale=1.3, validate_args=True)
vals = d.quantile(qs)
self.assertAllClose([-np.inf, np.inf], vals[:2])
self.assertAllClose(qs[2:], d.cdf(vals[2:]))
def testLaplaceLogSurvivalFunction(self):
batch_size = 6
loc = tf.constant([2.0] * batch_size)
scale = tf.constant([3.0] * batch_size)
loc_v = 2.0
scale_v = 3.0
x = np.array([-2.5, 2.5, -4.0, 0.1, 1.0, 2.0], dtype=np.float32)
laplace = tfd.Laplace(loc=loc, scale=scale, validate_args=True)
sf = laplace.log_survival_function(x)
self.assertEqual(sf.shape, (6,))
expected_sf = sp_stats.laplace.logsf(x, loc_v, scale=scale_v)
self.assertAllClose(self.evaluate(sf), expected_sf)
def testLaplaceMean(self):
loc_v = np.array([1.0, 3.0, 2.5])
scale_v = np.array([1.0, 4.0, 5.0])
laplace = tfd.Laplace(loc=loc_v, scale=scale_v, validate_args=True)
self.assertEqual(laplace.mean().shape, (3,))
expected_means = sp_stats.laplace.mean(loc_v, scale=scale_v)
self.assertAllClose(self.evaluate(laplace.mean()), expected_means)
def testLaplaceMode(self):
loc_v = np.array([0.5, 3.0, 2.5])
scale_v = np.array([1.0, 4.0, 5.0])
laplace = tfd.Laplace(loc=loc_v, scale=scale_v, validate_args=True)
self.assertEqual(laplace.mode().shape, (3,))
self.assertAllClose(self.evaluate(laplace.mode()), loc_v)
def testLaplaceVariance(self):
loc_v = np.array([1.0, 3.0, 2.5])
scale_v = np.array([1.0, 4.0, 5.0])
laplace = tfd.Laplace(loc=loc_v, scale=scale_v, validate_args=True)
self.assertEqual(laplace.variance().shape, (3,))
expected_variances = sp_stats.laplace.var(loc_v, scale=scale_v)
self.assertAllClose(self.evaluate(laplace.variance()), expected_variances)
def testLaplaceStd(self):
loc_v = np.array([1.0, 3.0, 2.5])
scale_v = np.array([1.0, 4.0, 5.0])
laplace = tfd.Laplace(loc=loc_v, scale=scale_v, validate_args=True)
self.assertEqual(laplace.stddev().shape, (3,))
expected_stddev = sp_stats.laplace.std(loc_v, scale=scale_v)
self.assertAllClose(self.evaluate(laplace.stddev()), expected_stddev)
def testLaplaceEntropy(self):
loc_v = np.array([1.0, 3.0, 2.5])
scale_v = np.array([1.0, 4.0, 5.0])
laplace = tfd.Laplace(loc=loc_v, scale=scale_v, validate_args=True)
self.assertEqual(laplace.entropy().shape, (3,))
expected_entropy = sp_stats.laplace.entropy(loc_v, scale=scale_v)
self.assertAllClose(self.evaluate(laplace.entropy()), expected_entropy)
def testLaplaceSample(self):
loc_v = 4.0
scale_v = 3.0
loc = tf.constant(loc_v)
scale = tf.constant(scale_v)
n = 100000
laplace = tfd.Laplace(loc=loc, scale=scale, validate_args=True)
samples = laplace.sample(n, seed=test_util.test_seed())
sample_values = self.evaluate(samples)
self.assertEqual(samples.shape, (n,))
self.assertEqual(sample_values.shape, (n,))
self.assertAllClose(
sample_values.mean(),
sp_stats.laplace.mean(loc_v, scale=scale_v),
rtol=0.05,
atol=0.)
self.assertAllClose(
sample_values.var(),
sp_stats.laplace.var(loc_v, scale=scale_v),
rtol=0.05,
atol=0.)
self.assertTrue(self._kstest(loc_v, scale_v, sample_values))
def testLaplaceFullyReparameterized(self):
loc = tf.constant(4.0)
scale = tf.constant(3.0)
_, [grad_loc, grad_scale] = tfp.math.value_and_gradient(
lambda l, s: tfd.Laplace(loc=l, scale=s, validate_args=True).sample( # pylint: disable=g-long-lambda
100, seed=test_util.test_seed()), [loc, scale])
self.assertIsNotNone(grad_loc)
self.assertIsNotNone(grad_scale)
def testLaplaceSampleMultiDimensional(self):
loc_v = np.array([np.arange(1, 101, dtype=np.float32)]) # 1 x 100
scale_v = np.array([np.arange(1, 11, dtype=np.float32)]).T # 10 x 1
laplace = tfd.Laplace(loc=loc_v, scale=scale_v, validate_args=True)
n = 10000
samples = laplace.sample(n, seed=test_util.test_seed())
sample_values = self.evaluate(samples)
self.assertEqual(samples.shape, (n, 10, 100))
self.assertEqual(sample_values.shape, (n, 10, 100))
zeros = np.zeros_like(loc_v + scale_v) # 10 x 100
loc_bc = loc_v + zeros
scale_bc = scale_v + zeros
self.assertAllClose(
sample_values.mean(axis=0),
sp_stats.laplace.mean(loc_bc, scale=scale_bc),
rtol=0.35,
atol=0.)
self.assertAllClose(
sample_values.var(axis=0),
sp_stats.laplace.var(loc_bc, scale=scale_bc),
rtol=0.10,
atol=0.)
fails = 0
trials = 0
for ai, a in enumerate(np.reshape(loc_v, [-1])):
for bi, b in enumerate(np.reshape(scale_v, [-1])):
s = sample_values[:, bi, ai]
trials += 1
fails += 0 if self._kstest(a, b, s) else 1
self.assertLess(fails, trials * 0.03)
def _kstest(self, loc, scale, samples):
# Uses the Kolmogorov-Smirnov test for goodness of fit.
ks, _ = sp_stats.kstest(samples, sp_stats.laplace(loc, scale=scale).cdf)
# Return True when the test passes.
return ks < 0.02
def testLaplacePdfOfSampleMultiDims(self):
laplace = tfd.Laplace(loc=[7., 11.], scale=[[5.], [6.]], validate_args=True)
num = 50000
samples = laplace.sample(num, seed=test_util.test_seed())
pdfs = laplace.prob(samples)
sample_vals, pdf_vals = self.evaluate([samples, pdfs])
self.assertEqual(samples.shape, (num, 2, 2))
self.assertEqual(pdfs.shape, (num, 2, 2))
self._assertIntegral(sample_vals[:, 0, 0], pdf_vals[:, 0, 0], err=0.02)
self._assertIntegral(sample_vals[:, 0, 1], pdf_vals[:, 0, 1], err=0.02)
self._assertIntegral(sample_vals[:, 1, 0], pdf_vals[:, 1, 0], err=0.02)
self._assertIntegral(sample_vals[:, 1, 1], pdf_vals[:, 1, 1], err=0.02)
self.assertAllClose(
sp_stats.laplace.mean(
[[7., 11.], [7., 11.]], scale=np.array([[5., 5.], [6., 6.]])),
sample_vals.mean(axis=0),
rtol=0.05,
atol=0.)
self.assertAllClose(
sp_stats.laplace.var([[7., 11.], [7., 11.]],
scale=np.array([[5., 5.], [6., 6.]])),
sample_vals.var(axis=0),
rtol=0.05,
atol=0.)
def _assertIntegral(self, sample_vals, pdf_vals, err=1e-3):
s_p = zip(sample_vals, pdf_vals)
prev = (0, 0)
total = 0
for k in sorted(s_p, key=lambda x: x[0]):
pair_pdf = (k[1] + prev[1]) / 2
total += (k[0] - prev[0]) * pair_pdf
prev = k
self.assertNear(1., total, err=err)
def testLaplaceNonPositiveInitializationParamsRaises(self):
loc_v = tf.constant(0.0, name='loc')
scale_v = tf.constant(-1.0, name='scale')
with self.assertRaisesOpError('Argument `scale` must be positive.'):
laplace = tfd.Laplace(
loc=loc_v, scale=scale_v, validate_args=True)
self.evaluate(laplace.mean())
loc_v = tf.constant(1.0, name='loc')
scale_v = tf.constant(0.0, name='scale')
with self.assertRaisesOpError('Argument `scale` must be positive.'):
laplace = tfd.Laplace(
loc=loc_v, scale=scale_v, validate_args=True)
self.evaluate(laplace.mean())
scale = tf.Variable([1., 2., -3.])
self.evaluate(scale.initializer)
with self.assertRaisesOpError('Argument `scale` must be positive.'):
d = tfd.Laplace(loc=0, scale=scale, validate_args=True)
self.evaluate(d.sample(seed=test_util.test_seed()))
def testLaplaceLaplaceKL(self):
batch_size = 6
event_size = 3
a_loc = np.array([[0.5] * event_size] * batch_size, dtype=np.float32)
a_scale = np.array([[0.1] * event_size] * batch_size, dtype=np.float32)
b_loc = np.array([[0.4] * event_size] * batch_size, dtype=np.float32)
b_scale = np.array([[0.2] * event_size] * batch_size, dtype=np.float32)
a = tfd.Laplace(loc=a_loc, scale=a_scale, validate_args=True)
b = tfd.Laplace(loc=b_loc, scale=b_scale, validate_args=True)
distance = tf.abs(a_loc - b_loc)
ratio = a_scale / b_scale
true_kl = (-tf.math.log(ratio) - 1 + distance / b_scale +
ratio * tf.exp(-distance / a_scale))
kl = tfd.kl_divergence(a, b)
x = a.sample(int(1e4), seed=test_util.test_seed())
kl_sample = tf.reduce_mean(a.log_prob(x) - b.log_prob(x), axis=0)
true_kl_, kl_, kl_sample_ = self.evaluate([true_kl, kl, kl_sample])
self.assertAllClose(true_kl_, kl_, atol=1e-5, rtol=1e-5)
self.assertAllClose(true_kl_, kl_sample_, atol=0., rtol=1e-1)
zero_kl = tfd.kl_divergence(a, a)
true_zero_kl_, zero_kl_ = self.evaluate([tf.zeros_like(true_kl), zero_kl])
self.assertAllEqual(true_zero_kl_, zero_kl_)
@test_util.tf_tape_safety_test
def testGradientThroughParams(self):
loc = tf.Variable([-5., 0., 5.])
scale = tf.Variable(2.)
d = tfd.Laplace(loc=loc, scale=scale, validate_args=True)
with tf.GradientTape() as tape:
loss = -d.log_prob([1., 2., 3.])
grad = tape.gradient(loss, d.trainable_variables)
self.assertLen(grad, 2)
self.assertAllNotNone(grad)
def testAssertsPositiveScaleAfterMutation(self):
scale = tf.Variable([1., 2., 3.])
d = tfd.Laplace(loc=0., scale=scale, validate_args=True)
self.evaluate([v.initializer for v in d.variables])
with self.assertRaisesOpError('Argument `scale` must be positive.'):
with tf.control_dependencies([scale.assign([1., 2., -3.])]):
self.evaluate(tfd.Laplace(loc=0., scale=1.).kl_divergence(d))
def testAssertParamsAreFloats(self):
loc = tf.convert_to_tensor(0, dtype=tf.int32)
scale = tf.convert_to_tensor(1, dtype=tf.int32)
with self.assertRaisesRegexp(ValueError, 'Expected floating point'):
tfd.Laplace(loc=loc, scale=scale)
if __name__ == '__main__':
tf.test.main()
| [
1,
529,
276,
1112,
420,
29958,
29893,
14873,
29884,
8568,
326,
3747,
29945,
29906,
29914,
22795,
3097,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29947,
450,
323,
6073,
17907,
1019,
29890,
3097,
13189,
943,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
29937,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
268,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
29937,
13,
29937,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
29937,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
13,
29937,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
27028,
1090,
278,
19245,
29889,
13,
29937,
1275,
9166,
9166,
9166,
9166,
4936,
1360,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
13,
13,
29937,
10034,
5197,
24802,
13,
5215,
12655,
408,
7442,
13,
3166,
4560,
2272,
1053,
22663,
408,
805,
29918,
16202,
13,
13,
5215,
26110,
29889,
12667,
29889,
29894,
29906,
408,
15886,
13,
5215,
26110,
29918,
22795,
3097,
408,
15886,
29886,
13,
13,
3166,
26110,
29918,
22795,
3097,
29889,
4691,
29889,
7564,
1053,
3514,
572,
414,
13,
3166,
26110,
29918,
22795,
3097,
29889,
4691,
29889,
7564,
1053,
1243,
29918,
4422,
13,
13,
13,
29873,
11512,
353,
15886,
29886,
29889,
27691,
29879,
13,
13,
13,
29992,
1688,
29918,
4422,
29889,
1688,
29918,
497,
29918,
13264,
29918,
22256,
29918,
1727,
1355,
13,
1990,
20298,
1265,
3057,
29898,
1688,
29918,
4422,
29889,
3057,
8259,
1125,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
24111,
29898,
1311,
1125,
13,
1678,
1180,
353,
15886,
29889,
23362,
4197,
29941,
29889,
29900,
29962,
334,
29871,
29945,
29897,
13,
1678,
6287,
353,
15886,
29889,
23362,
29898,
29896,
29896,
29889,
29900,
29897,
13,
1678,
425,
6689,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
2029,
29892,
6287,
29922,
7052,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
13,
1678,
1583,
29889,
9294,
9843,
29898,
1311,
29889,
24219,
403,
29898,
433,
6689,
29889,
16175,
29918,
12181,
29918,
20158,
25739,
313,
29945,
29892,
876,
13,
1678,
1583,
29889,
9294,
9843,
29898,
433,
6689,
29889,
16175,
29918,
12181,
29892,
15886,
29889,
29911,
6073,
24111,
4197,
29945,
12622,
13,
1678,
1583,
29889,
9294,
3596,
9843,
29898,
1311,
29889,
24219,
403,
29898,
433,
6689,
29889,
3696,
29918,
12181,
29918,
20158,
25739,
518,
2314,
13,
1678,
1583,
29889,
9294,
9843,
29898,
433,
6689,
29889,
3696,
29918,
12181,
29892,
15886,
29889,
29911,
6073,
24111,
29898,
2636,
876,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
3403,
8493,
29898,
1311,
1125,
13,
1678,
9853,
29918,
2311,
353,
29871,
29953,
13,
1678,
1180,
353,
15886,
29889,
23362,
4197,
29906,
29889,
29900,
29962,
334,
9853,
29918,
2311,
29897,
13,
1678,
6287,
353,
15886,
29889,
23362,
4197,
29941,
29889,
29900,
29962,
334,
9853,
29918,
2311,
29897,
13,
1678,
1180,
29918,
29894,
353,
29871,
29906,
29889,
29900,
13,
1678,
6287,
29918,
29894,
353,
29871,
29941,
29889,
29900,
13,
1678,
921,
353,
7442,
29889,
2378,
4197,
29906,
29889,
29945,
29892,
29871,
29906,
29889,
29945,
29892,
29871,
29946,
29889,
29900,
29892,
29871,
29900,
29889,
29896,
29892,
29871,
29896,
29889,
29900,
29892,
29871,
29906,
29889,
29900,
1402,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
29897,
13,
1678,
425,
6689,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
2029,
29892,
6287,
29922,
7052,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
1678,
1480,
29918,
5140,
353,
425,
6689,
29889,
1188,
29918,
22795,
29898,
29916,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
1188,
29918,
5140,
29889,
12181,
29892,
313,
29953,
29892,
876,
13,
1678,
3806,
29918,
1188,
29918,
5140,
353,
805,
29918,
16202,
29889,
433,
6689,
29889,
1188,
5140,
29898,
29916,
29892,
1180,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29897,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
1311,
29889,
24219,
403,
29898,
1188,
29918,
5140,
511,
3806,
29918,
1188,
29918,
5140,
29897,
13,
13,
1678,
13552,
353,
425,
6689,
29889,
22795,
29898,
29916,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
5140,
29889,
12181,
29892,
313,
29953,
29892,
876,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
1311,
29889,
24219,
403,
29898,
5140,
511,
7442,
29889,
4548,
29898,
9684,
29918,
1188,
29918,
5140,
876,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
3403,
8493,
6857,
333,
326,
8180,
29898,
1311,
1125,
13,
1678,
9853,
29918,
2311,
353,
29871,
29953,
13,
1678,
1180,
353,
15886,
29889,
23362,
4197,
29961,
29906,
29889,
29900,
29892,
29871,
29946,
29889,
29900,
5262,
334,
9853,
29918,
2311,
29897,
13,
1678,
6287,
353,
15886,
29889,
23362,
4197,
29961,
29941,
29889,
29900,
29892,
29871,
29946,
29889,
29900,
5262,
334,
9853,
29918,
2311,
29897,
13,
1678,
1180,
29918,
29894,
353,
7442,
29889,
2378,
4197,
29906,
29889,
29900,
29892,
29871,
29946,
29889,
29900,
2314,
13,
1678,
6287,
29918,
29894,
353,
7442,
29889,
2378,
4197,
29941,
29889,
29900,
29892,
29871,
29946,
29889,
29900,
2314,
13,
1678,
921,
353,
7442,
29889,
2378,
4197,
29961,
29906,
29889,
29945,
29892,
29871,
29906,
29889,
29945,
29892,
29871,
29946,
29889,
29900,
29892,
29871,
29900,
29889,
29896,
29892,
29871,
29896,
29889,
29900,
29892,
29871,
29906,
29889,
29900,
20526,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
467,
29911,
13,
1678,
425,
6689,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
2029,
29892,
6287,
29922,
7052,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
1678,
1480,
29918,
5140,
353,
425,
6689,
29889,
1188,
29918,
22795,
29898,
29916,
29897,
13,
1678,
1480,
29918,
5140,
29918,
5975,
353,
1583,
29889,
24219,
403,
29898,
1188,
29918,
5140,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
1188,
29918,
5140,
29889,
12181,
29892,
313,
29953,
29892,
29871,
29906,
876,
13,
13,
1678,
13552,
353,
425,
6689,
29889,
22795,
29898,
29916,
29897,
13,
1678,
13552,
29918,
5975,
353,
1583,
29889,
24219,
403,
29898,
5140,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
5140,
29889,
12181,
29892,
313,
29953,
29892,
29871,
29906,
876,
13,
1678,
3806,
29918,
1188,
29918,
5140,
353,
805,
29918,
16202,
29889,
433,
6689,
29889,
1188,
5140,
29898,
29916,
29892,
1180,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29897,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
1188,
29918,
5140,
29918,
5975,
29892,
3806,
29918,
1188,
29918,
5140,
29897,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
5140,
29918,
5975,
29892,
7442,
29889,
4548,
29898,
9684,
29918,
1188,
29918,
5140,
876,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
3403,
8493,
6857,
333,
326,
8180,
29933,
9972,
4384,
292,
29898,
1311,
1125,
13,
1678,
9853,
29918,
2311,
353,
29871,
29953,
13,
1678,
1180,
353,
15886,
29889,
23362,
4197,
29961,
29906,
29889,
29900,
29892,
29871,
29946,
29889,
29900,
5262,
334,
9853,
29918,
2311,
29897,
13,
1678,
6287,
353,
15886,
29889,
23362,
29898,
29941,
29889,
29900,
29897,
13,
1678,
1180,
29918,
29894,
353,
7442,
29889,
2378,
4197,
29906,
29889,
29900,
29892,
29871,
29946,
29889,
29900,
2314,
13,
1678,
6287,
29918,
29894,
353,
29871,
29941,
29889,
29900,
13,
1678,
921,
353,
7442,
29889,
2378,
4197,
29961,
29906,
29889,
29945,
29892,
29871,
29906,
29889,
29945,
29892,
29871,
29946,
29889,
29900,
29892,
29871,
29900,
29889,
29896,
29892,
29871,
29896,
29889,
29900,
29892,
29871,
29906,
29889,
29900,
20526,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
467,
29911,
13,
1678,
425,
6689,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
2029,
29892,
6287,
29922,
7052,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
1678,
1480,
29918,
5140,
353,
425,
6689,
29889,
1188,
29918,
22795,
29898,
29916,
29897,
13,
1678,
1480,
29918,
5140,
29918,
5975,
353,
1583,
29889,
24219,
403,
29898,
1188,
29918,
5140,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
1188,
29918,
5140,
29889,
12181,
29892,
313,
29953,
29892,
29871,
29906,
876,
13,
13,
1678,
13552,
353,
425,
6689,
29889,
22795,
29898,
29916,
29897,
13,
1678,
13552,
29918,
5975,
353,
1583,
29889,
24219,
403,
29898,
5140,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
5140,
29889,
12181,
29892,
313,
29953,
29892,
29871,
29906,
876,
13,
1678,
3806,
29918,
1188,
29918,
5140,
353,
805,
29918,
16202,
29889,
433,
6689,
29889,
1188,
5140,
29898,
29916,
29892,
1180,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29897,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
1188,
29918,
5140,
29918,
5975,
29892,
3806,
29918,
1188,
29918,
5140,
29897,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
5140,
29918,
5975,
29892,
7442,
29889,
4548,
29898,
9684,
29918,
1188,
29918,
5140,
876,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
29907,
4037,
29898,
1311,
1125,
13,
1678,
9853,
29918,
2311,
353,
29871,
29953,
13,
1678,
1180,
353,
15886,
29889,
23362,
4197,
29906,
29889,
29900,
29962,
334,
9853,
29918,
2311,
29897,
13,
1678,
6287,
353,
15886,
29889,
23362,
4197,
29941,
29889,
29900,
29962,
334,
9853,
29918,
2311,
29897,
13,
1678,
1180,
29918,
29894,
353,
29871,
29906,
29889,
29900,
13,
1678,
6287,
29918,
29894,
353,
29871,
29941,
29889,
29900,
13,
1678,
921,
353,
7442,
29889,
2378,
4197,
29906,
29889,
29945,
29892,
29871,
29906,
29889,
29945,
29892,
29871,
29946,
29889,
29900,
29892,
29871,
29900,
29889,
29896,
29892,
29871,
29896,
29889,
29900,
29892,
29871,
29906,
29889,
29900,
1402,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
29897,
13,
13,
1678,
425,
6689,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
2029,
29892,
6287,
29922,
7052,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
13,
1678,
274,
2176,
353,
425,
6689,
29889,
29883,
2176,
29898,
29916,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
29883,
2176,
29889,
12181,
29892,
313,
29953,
29892,
876,
13,
1678,
3806,
29918,
29883,
2176,
353,
805,
29918,
16202,
29889,
433,
6689,
29889,
29883,
2176,
29898,
29916,
29892,
1180,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29897,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
1311,
29889,
24219,
403,
29898,
29883,
2176,
511,
3806,
29918,
29883,
2176,
29897,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
3403,
29907,
4037,
29898,
1311,
1125,
13,
1678,
9853,
29918,
2311,
353,
29871,
29953,
13,
1678,
1180,
353,
15886,
29889,
23362,
4197,
29906,
29889,
29900,
29962,
334,
9853,
29918,
2311,
29897,
13,
1678,
6287,
353,
15886,
29889,
23362,
4197,
29941,
29889,
29900,
29962,
334,
9853,
29918,
2311,
29897,
13,
1678,
1180,
29918,
29894,
353,
29871,
29906,
29889,
29900,
13,
1678,
6287,
29918,
29894,
353,
29871,
29941,
29889,
29900,
13,
1678,
921,
353,
7442,
29889,
2378,
4197,
29899,
29906,
29889,
29945,
29892,
29871,
29906,
29889,
29945,
29892,
448,
29946,
29889,
29900,
29892,
29871,
29900,
29889,
29896,
29892,
29871,
29896,
29889,
29900,
29892,
29871,
29906,
29889,
29900,
1402,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
29897,
13,
13,
1678,
425,
6689,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
2029,
29892,
6287,
29922,
7052,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
13,
1678,
274,
2176,
353,
425,
6689,
29889,
1188,
29918,
29883,
2176,
29898,
29916,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
29883,
2176,
29889,
12181,
29892,
313,
29953,
29892,
876,
13,
1678,
3806,
29918,
29883,
2176,
353,
805,
29918,
16202,
29889,
433,
6689,
29889,
1188,
29883,
2176,
29898,
29916,
29892,
1180,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29897,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
1311,
29889,
24219,
403,
29898,
29883,
2176,
511,
3806,
29918,
29883,
2176,
29897,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
22930,
488,
29898,
1311,
1125,
13,
1678,
3855,
29879,
353,
1583,
29889,
24219,
403,
29898,
13,
4706,
15886,
29889,
17685,
29898,
13,
9651,
5519,
29900,
1696,
29871,
29896,
1402,
13,
632,
3514,
572,
414,
29889,
29590,
4197,
29896,
29900,
1402,
1375,
791,
21098,
29896,
29892,
4236,
791,
21098,
29929,
29892,
13,
462,
795,
16717,
29922,
1688,
29918,
4422,
29889,
1688,
29918,
26776,
3101,
1402,
13,
9651,
9685,
29922,
29900,
876,
13,
1678,
270,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
29896,
1696,
6287,
29922,
29896,
29889,
29941,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
1678,
659,
29879,
353,
270,
29889,
12150,
488,
29898,
29939,
29879,
29897,
13,
1678,
1583,
29889,
9294,
3596,
11123,
4197,
29899,
9302,
29889,
7192,
29892,
7442,
29889,
7192,
1402,
659,
29879,
7503,
29906,
2314,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
29939,
29879,
29961,
29906,
29901,
1402,
270,
29889,
29883,
2176,
29898,
791,
29879,
29961,
29906,
29901,
12622,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
3403,
18498,
29894,
2561,
6678,
29898,
1311,
1125,
13,
1678,
9853,
29918,
2311,
353,
29871,
29953,
13,
1678,
1180,
353,
15886,
29889,
23362,
4197,
29906,
29889,
29900,
29962,
334,
9853,
29918,
2311,
29897,
13,
1678,
6287,
353,
15886,
29889,
23362,
4197,
29941,
29889,
29900,
29962,
334,
9853,
29918,
2311,
29897,
13,
1678,
1180,
29918,
29894,
353,
29871,
29906,
29889,
29900,
13,
1678,
6287,
29918,
29894,
353,
29871,
29941,
29889,
29900,
13,
1678,
921,
353,
7442,
29889,
2378,
4197,
29899,
29906,
29889,
29945,
29892,
29871,
29906,
29889,
29945,
29892,
448,
29946,
29889,
29900,
29892,
29871,
29900,
29889,
29896,
29892,
29871,
29896,
29889,
29900,
29892,
29871,
29906,
29889,
29900,
1402,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
29897,
13,
13,
1678,
425,
6689,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
2029,
29892,
6287,
29922,
7052,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
13,
1678,
18668,
353,
425,
6689,
29889,
1188,
29918,
7610,
29894,
2561,
29918,
2220,
29898,
29916,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
4668,
29889,
12181,
29892,
313,
29953,
29892,
876,
13,
1678,
3806,
29918,
4668,
353,
805,
29918,
16202,
29889,
433,
6689,
29889,
1188,
4668,
29898,
29916,
29892,
1180,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29897,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
1311,
29889,
24219,
403,
29898,
4668,
511,
3806,
29918,
4668,
29897,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
6816,
273,
29898,
1311,
1125,
13,
1678,
1180,
29918,
29894,
353,
7442,
29889,
2378,
4197,
29896,
29889,
29900,
29892,
29871,
29941,
29889,
29900,
29892,
29871,
29906,
29889,
29945,
2314,
13,
1678,
6287,
29918,
29894,
353,
7442,
29889,
2378,
4197,
29896,
29889,
29900,
29892,
29871,
29946,
29889,
29900,
29892,
29871,
29945,
29889,
29900,
2314,
13,
1678,
425,
6689,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
2029,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
433,
6689,
29889,
12676,
2141,
12181,
29892,
313,
29941,
29892,
876,
13,
1678,
3806,
29918,
1004,
550,
353,
805,
29918,
16202,
29889,
433,
6689,
29889,
12676,
29898,
2029,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29897,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
1311,
29889,
24219,
403,
29898,
433,
6689,
29889,
12676,
25739,
3806,
29918,
1004,
550,
29897,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
6818,
29898,
1311,
1125,
13,
1678,
1180,
29918,
29894,
353,
7442,
29889,
2378,
4197,
29900,
29889,
29945,
29892,
29871,
29941,
29889,
29900,
29892,
29871,
29906,
29889,
29945,
2314,
13,
1678,
6287,
29918,
29894,
353,
7442,
29889,
2378,
4197,
29896,
29889,
29900,
29892,
29871,
29946,
29889,
29900,
29892,
29871,
29945,
29889,
29900,
2314,
13,
1678,
425,
6689,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
2029,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
433,
6689,
29889,
8513,
2141,
12181,
29892,
313,
29941,
29892,
876,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
1311,
29889,
24219,
403,
29898,
433,
6689,
29889,
8513,
25739,
1180,
29918,
29894,
29897,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
9037,
8837,
29898,
1311,
1125,
13,
1678,
1180,
29918,
29894,
353,
7442,
29889,
2378,
4197,
29896,
29889,
29900,
29892,
29871,
29941,
29889,
29900,
29892,
29871,
29906,
29889,
29945,
2314,
13,
1678,
6287,
29918,
29894,
353,
7442,
29889,
2378,
4197,
29896,
29889,
29900,
29892,
29871,
29946,
29889,
29900,
29892,
29871,
29945,
29889,
29900,
2314,
13,
1678,
425,
6689,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
2029,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
433,
6689,
29889,
1707,
8837,
2141,
12181,
29892,
313,
29941,
29892,
876,
13,
1678,
3806,
29918,
1707,
713,
778,
353,
805,
29918,
16202,
29889,
433,
6689,
29889,
1707,
29898,
2029,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29897,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
1311,
29889,
24219,
403,
29898,
433,
6689,
29889,
1707,
8837,
25739,
3806,
29918,
1707,
713,
778,
29897,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
855,
29881,
29898,
1311,
1125,
13,
1678,
1180,
29918,
29894,
353,
7442,
29889,
2378,
4197,
29896,
29889,
29900,
29892,
29871,
29941,
29889,
29900,
29892,
29871,
29906,
29889,
29945,
2314,
13,
1678,
6287,
29918,
29894,
353,
7442,
29889,
2378,
4197,
29896,
29889,
29900,
29892,
29871,
29946,
29889,
29900,
29892,
29871,
29945,
29889,
29900,
2314,
13,
1678,
425,
6689,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
2029,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
433,
6689,
29889,
4172,
3359,
2141,
12181,
29892,
313,
29941,
29892,
876,
13,
1678,
3806,
29918,
4172,
3359,
353,
805,
29918,
16202,
29889,
433,
6689,
29889,
4172,
29898,
2029,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29897,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
1311,
29889,
24219,
403,
29898,
433,
6689,
29889,
4172,
3359,
25739,
3806,
29918,
4172,
3359,
29897,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
5292,
14441,
29898,
1311,
1125,
13,
1678,
1180,
29918,
29894,
353,
7442,
29889,
2378,
4197,
29896,
29889,
29900,
29892,
29871,
29941,
29889,
29900,
29892,
29871,
29906,
29889,
29945,
2314,
13,
1678,
6287,
29918,
29894,
353,
7442,
29889,
2378,
4197,
29896,
29889,
29900,
29892,
29871,
29946,
29889,
29900,
29892,
29871,
29945,
29889,
29900,
2314,
13,
1678,
425,
6689,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
2029,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
433,
6689,
29889,
296,
14441,
2141,
12181,
29892,
313,
29941,
29892,
876,
13,
1678,
3806,
29918,
296,
14441,
353,
805,
29918,
16202,
29889,
433,
6689,
29889,
296,
14441,
29898,
2029,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29897,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
1311,
29889,
24219,
403,
29898,
433,
6689,
29889,
296,
14441,
25739,
3806,
29918,
296,
14441,
29897,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
17708,
29898,
1311,
1125,
13,
1678,
1180,
29918,
29894,
353,
29871,
29946,
29889,
29900,
13,
1678,
6287,
29918,
29894,
353,
29871,
29941,
29889,
29900,
13,
1678,
1180,
353,
15886,
29889,
23362,
29898,
2029,
29918,
29894,
29897,
13,
1678,
6287,
353,
15886,
29889,
23362,
29898,
7052,
29918,
29894,
29897,
13,
1678,
302,
353,
29871,
29896,
29900,
29900,
29900,
29900,
29900,
13,
1678,
425,
6689,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
2029,
29892,
6287,
29922,
7052,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
1678,
11916,
353,
425,
6689,
29889,
11249,
29898,
29876,
29892,
16717,
29922,
1688,
29918,
4422,
29889,
1688,
29918,
26776,
3101,
13,
1678,
4559,
29918,
5975,
353,
1583,
29889,
24219,
403,
29898,
27736,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
27736,
29889,
12181,
29892,
313,
29876,
29892,
876,
13,
1678,
1583,
29889,
9294,
9843,
29898,
11249,
29918,
5975,
29889,
12181,
29892,
313,
29876,
29892,
876,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
13,
4706,
4559,
29918,
5975,
29889,
12676,
3285,
13,
4706,
805,
29918,
16202,
29889,
433,
6689,
29889,
12676,
29898,
2029,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
511,
13,
4706,
364,
25027,
29922,
29900,
29889,
29900,
29945,
29892,
13,
4706,
472,
324,
29922,
29900,
1846,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
13,
4706,
4559,
29918,
5975,
29889,
1707,
3285,
13,
4706,
805,
29918,
16202,
29889,
433,
6689,
29889,
1707,
29898,
2029,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
511,
13,
4706,
364,
25027,
29922,
29900,
29889,
29900,
29945,
29892,
13,
4706,
472,
324,
29922,
29900,
1846,
13,
1678,
1583,
29889,
9294,
5574,
29898,
1311,
3032,
29895,
303,
342,
29898,
2029,
29918,
29894,
29892,
6287,
29918,
29894,
29892,
4559,
29918,
5975,
876,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
29943,
352,
368,
1123,
15501,
1891,
29898,
1311,
1125,
13,
1678,
1180,
353,
15886,
29889,
23362,
29898,
29946,
29889,
29900,
29897,
13,
1678,
6287,
353,
15886,
29889,
23362,
29898,
29941,
29889,
29900,
29897,
13,
1678,
17117,
518,
5105,
29918,
2029,
29892,
4656,
29918,
7052,
29962,
353,
15886,
29886,
29889,
755,
29889,
1767,
29918,
392,
29918,
24970,
29898,
13,
4706,
14013,
301,
29892,
269,
29901,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
29880,
29892,
6287,
29922,
29879,
29892,
12725,
29918,
5085,
29922,
5574,
467,
11249,
29898,
29871,
396,
282,
2904,
524,
29901,
11262,
29922,
29887,
29899,
5426,
29899,
2892,
13,
632,
29896,
29900,
29900,
29892,
16717,
29922,
1688,
29918,
4422,
29889,
1688,
29918,
26776,
25739,
518,
2029,
29892,
6287,
2314,
13,
1678,
1583,
29889,
9294,
3624,
3664,
8516,
29898,
5105,
29918,
2029,
29897,
13,
1678,
1583,
29889,
9294,
3624,
3664,
8516,
29898,
5105,
29918,
7052,
29897,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
17708,
15329,
16142,
8180,
29898,
1311,
1125,
13,
1678,
1180,
29918,
29894,
353,
7442,
29889,
2378,
4197,
9302,
29889,
279,
927,
29898,
29896,
29892,
29871,
29896,
29900,
29896,
29892,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
29897,
2314,
29871,
396,
29871,
29896,
921,
29871,
29896,
29900,
29900,
13,
1678,
6287,
29918,
29894,
353,
7442,
29889,
2378,
4197,
9302,
29889,
279,
927,
29898,
29896,
29892,
29871,
29896,
29896,
29892,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
4638,
467,
29911,
29871,
396,
29871,
29896,
29900,
921,
29871,
29896,
13,
1678,
425,
6689,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
2029,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
1678,
302,
353,
29871,
29896,
29900,
29900,
29900,
29900,
13,
1678,
11916,
353,
425,
6689,
29889,
11249,
29898,
29876,
29892,
16717,
29922,
1688,
29918,
4422,
29889,
1688,
29918,
26776,
3101,
13,
1678,
4559,
29918,
5975,
353,
1583,
29889,
24219,
403,
29898,
27736,
29897,
13,
1678,
1583,
29889,
9294,
9843,
29898,
27736,
29889,
12181,
29892,
313,
29876,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29900,
29900,
876,
13,
1678,
1583,
29889,
9294,
9843,
29898,
11249,
29918,
5975,
29889,
12181,
29892,
313,
29876,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29900,
29900,
876,
13,
1678,
24786,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
2029,
29918,
29894,
718,
6287,
29918,
29894,
29897,
29871,
396,
29871,
29896,
29900,
921,
29871,
29896,
29900,
29900,
13,
1678,
1180,
29918,
12328,
353,
1180,
29918,
29894,
718,
24786,
13,
1678,
6287,
29918,
12328,
353,
6287,
29918,
29894,
718,
24786,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
13,
4706,
4559,
29918,
5975,
29889,
12676,
29898,
8990,
29922,
29900,
511,
13,
4706,
805,
29918,
16202,
29889,
433,
6689,
29889,
12676,
29898,
2029,
29918,
12328,
29892,
6287,
29922,
7052,
29918,
12328,
511,
13,
4706,
364,
25027,
29922,
29900,
29889,
29941,
29945,
29892,
13,
4706,
472,
324,
29922,
29900,
1846,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
13,
4706,
4559,
29918,
5975,
29889,
1707,
29898,
8990,
29922,
29900,
511,
13,
4706,
805,
29918,
16202,
29889,
433,
6689,
29889,
1707,
29898,
2029,
29918,
12328,
29892,
6287,
29922,
7052,
29918,
12328,
511,
13,
4706,
364,
25027,
29922,
29900,
29889,
29896,
29900,
29892,
13,
4706,
472,
324,
29922,
29900,
1846,
13,
1678,
8465,
353,
29871,
29900,
13,
1678,
3367,
1338,
353,
29871,
29900,
13,
1678,
363,
7468,
29892,
263,
297,
26985,
29898,
9302,
29889,
690,
14443,
29898,
2029,
29918,
29894,
29892,
21069,
29896,
12622,
29901,
13,
418,
363,
4768,
29892,
289,
297,
26985,
29898,
9302,
29889,
690,
14443,
29898,
7052,
29918,
29894,
29892,
21069,
29896,
12622,
29901,
13,
4706,
269,
353,
4559,
29918,
5975,
7503,
29892,
4768,
29892,
7468,
29962,
13,
4706,
3367,
1338,
4619,
29871,
29896,
13,
4706,
8465,
4619,
29871,
29900,
565,
1583,
3032,
29895,
303,
342,
29898,
29874,
29892,
289,
29892,
269,
29897,
1683,
29871,
29896,
13,
1678,
1583,
29889,
9294,
29931,
404,
29898,
29888,
2234,
29892,
3367,
1338,
334,
29871,
29900,
29889,
29900,
29941,
29897,
13,
13,
29871,
822,
903,
29895,
303,
342,
29898,
1311,
29892,
1180,
29892,
6287,
29892,
11916,
1125,
13,
1678,
396,
10783,
267,
278,
10451,
29885,
468,
272,
586,
29899,
29903,
11038,
13715,
1243,
363,
1781,
2264,
310,
6216,
29889,
13,
1678,
413,
29879,
29892,
903,
353,
805,
29918,
16202,
29889,
29895,
303,
342,
29898,
27736,
29892,
805,
29918,
16202,
29889,
433,
6689,
29898,
2029,
29892,
6287,
29922,
7052,
467,
29883,
2176,
29897,
13,
1678,
396,
7106,
5852,
746,
278,
1243,
14517,
29889,
13,
1678,
736,
413,
29879,
529,
29871,
29900,
29889,
29900,
29906,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
29925,
2176,
2776,
17708,
15329,
29928,
9893,
29898,
1311,
1125,
13,
1678,
425,
6689,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
11759,
29955,
1696,
29871,
29896,
29896,
29889,
1402,
6287,
29922,
8999,
29945,
29889,
1402,
518,
29953,
5586,
1402,
12725,
29918,
5085,
29922,
5574,
29897,
13,
1678,
954,
353,
29871,
29945,
29900,
29900,
29900,
29900,
13,
1678,
11916,
353,
425,
6689,
29889,
11249,
29898,
1949,
29892,
16717,
29922,
1688,
29918,
4422,
29889,
1688,
29918,
26776,
3101,
13,
1678,
13552,
29879,
353,
425,
6689,
29889,
22795,
29898,
27736,
29897,
13,
1678,
4559,
29918,
791,
29879,
29892,
13552,
29918,
791,
29879,
353,
1583,
29889,
24219,
403,
4197,
27736,
29892,
13552,
29879,
2314,
13,
1678,
1583,
29889,
9294,
9843,
29898,
27736,
29889,
12181,
29892,
313,
1949,
29892,
29871,
29906,
29892,
29871,
29906,
876,
13,
1678,
1583,
29889,
9294,
9843,
29898,
5140,
29879,
29889,
12181,
29892,
313,
1949,
29892,
29871,
29906,
29892,
29871,
29906,
876,
13,
1678,
1583,
3032,
9294,
23573,
284,
29898,
11249,
29918,
791,
29879,
7503,
29892,
29871,
29900,
29892,
29871,
29900,
1402,
13552,
29918,
791,
29879,
7503,
29892,
29871,
29900,
29892,
29871,
29900,
1402,
4589,
29922,
29900,
29889,
29900,
29906,
29897,
13,
1678,
1583,
3032,
9294,
23573,
284,
29898,
11249,
29918,
791,
29879,
7503,
29892,
29871,
29900,
29892,
29871,
29896,
1402,
13552,
29918,
791,
29879,
7503,
29892,
29871,
29900,
29892,
29871,
29896,
1402,
4589,
29922,
29900,
29889,
29900,
29906,
29897,
13,
1678,
1583,
3032,
9294,
23573,
284,
29898,
11249,
29918,
791,
29879,
7503,
29892,
29871,
29896,
29892,
29871,
29900,
1402,
13552,
29918,
791,
29879,
7503,
29892,
29871,
29896,
29892,
29871,
29900,
1402,
4589,
29922,
29900,
29889,
29900,
29906,
29897,
13,
1678,
1583,
3032,
9294,
23573,
284,
29898,
11249,
29918,
791,
29879,
7503,
29892,
29871,
29896,
29892,
29871,
29896,
1402,
13552,
29918,
791,
29879,
7503,
29892,
29871,
29896,
29892,
29871,
29896,
1402,
4589,
29922,
29900,
29889,
29900,
29906,
29897,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
13,
4706,
805,
29918,
16202,
29889,
433,
6689,
29889,
12676,
29898,
13,
9651,
5519,
29955,
1696,
29871,
29896,
29896,
29889,
1402,
518,
29955,
1696,
29871,
29896,
29896,
5586,
1402,
6287,
29922,
9302,
29889,
2378,
4197,
29961,
29945,
1696,
29871,
29945,
29889,
1402,
518,
29953,
1696,
29871,
29953,
5586,
2314,
511,
13,
4706,
4559,
29918,
791,
29879,
29889,
12676,
29898,
8990,
29922,
29900,
511,
13,
4706,
364,
25027,
29922,
29900,
29889,
29900,
29945,
29892,
13,
4706,
472,
324,
29922,
29900,
1846,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
13,
4706,
805,
29918,
16202,
29889,
433,
6689,
29889,
1707,
4197,
29961,
29955,
1696,
29871,
29896,
29896,
29889,
1402,
518,
29955,
1696,
29871,
29896,
29896,
5586,
1402,
13,
462,
632,
6287,
29922,
9302,
29889,
2378,
4197,
29961,
29945,
1696,
29871,
29945,
29889,
1402,
518,
29953,
1696,
29871,
29953,
5586,
2314,
511,
13,
4706,
4559,
29918,
791,
29879,
29889,
1707,
29898,
8990,
29922,
29900,
511,
13,
4706,
364,
25027,
29922,
29900,
29889,
29900,
29945,
29892,
13,
4706,
472,
324,
29922,
29900,
1846,
13,
13,
29871,
822,
903,
9294,
23573,
284,
29898,
1311,
29892,
4559,
29918,
791,
29879,
29892,
13552,
29918,
791,
29879,
29892,
4589,
29922,
29896,
29872,
29899,
29941,
1125,
13,
1678,
269,
29918,
29886,
353,
14319,
29898,
11249,
29918,
791,
29879,
29892,
13552,
29918,
791,
29879,
29897,
13,
1678,
12379,
353,
313,
29900,
29892,
29871,
29900,
29897,
13,
1678,
3001,
353,
29871,
29900,
13,
1678,
363,
413,
297,
12705,
29898,
29879,
29918,
29886,
29892,
1820,
29922,
2892,
921,
29901,
921,
29961,
29900,
29962,
1125,
13,
418,
5101,
29918,
5140,
353,
313,
29895,
29961,
29896,
29962,
718,
12379,
29961,
29896,
2314,
847,
29871,
29906,
13,
418,
3001,
4619,
313,
29895,
29961,
29900,
29962,
448,
12379,
29961,
29900,
2314,
334,
5101,
29918,
5140,
13,
418,
12379,
353,
413,
13,
1678,
1583,
29889,
9294,
29940,
799,
29898,
29896,
1696,
3001,
29892,
4589,
29922,
3127,
29897,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
12283,
9135,
3321,
15514,
2133,
9629,
29934,
1759,
267,
29898,
1311,
1125,
13,
1678,
1180,
29918,
29894,
353,
15886,
29889,
23362,
29898,
29900,
29889,
29900,
29892,
1024,
2433,
2029,
1495,
13,
1678,
6287,
29918,
29894,
353,
15886,
29889,
23362,
6278,
29896,
29889,
29900,
29892,
1024,
2433,
7052,
1495,
13,
1678,
411,
1583,
29889,
9294,
29934,
1759,
267,
11746,
2392,
877,
15730,
421,
7052,
29952,
1818,
367,
6374,
6169,
1125,
13,
418,
425,
6689,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
13,
3986,
1180,
29922,
2029,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
418,
1583,
29889,
24219,
403,
29898,
433,
6689,
29889,
12676,
3101,
13,
13,
1678,
1180,
29918,
29894,
353,
15886,
29889,
23362,
29898,
29896,
29889,
29900,
29892,
1024,
2433,
2029,
1495,
13,
1678,
6287,
29918,
29894,
353,
15886,
29889,
23362,
29898,
29900,
29889,
29900,
29892,
1024,
2433,
7052,
1495,
13,
1678,
411,
1583,
29889,
9294,
29934,
1759,
267,
11746,
2392,
877,
15730,
421,
7052,
29952,
1818,
367,
6374,
6169,
1125,
13,
418,
425,
6689,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
13,
3986,
1180,
29922,
2029,
29918,
29894,
29892,
6287,
29922,
7052,
29918,
29894,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
418,
1583,
29889,
24219,
403,
29898,
433,
6689,
29889,
12676,
3101,
13,
13,
1678,
6287,
353,
15886,
29889,
16174,
4197,
29896,
1696,
29871,
29906,
1696,
448,
29941,
29889,
2314,
13,
1678,
1583,
29889,
24219,
403,
29898,
7052,
29889,
11228,
3950,
29897,
13,
1678,
411,
1583,
29889,
9294,
29934,
1759,
267,
11746,
2392,
877,
15730,
421,
7052,
29952,
1818,
367,
6374,
6169,
1125,
13,
418,
270,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
29900,
29892,
6287,
29922,
7052,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
418,
1583,
29889,
24219,
403,
29898,
29881,
29889,
11249,
29898,
26776,
29922,
1688,
29918,
4422,
29889,
1688,
29918,
26776,
22130,
13,
13,
29871,
822,
1243,
29931,
481,
1265,
29931,
481,
1265,
29968,
29931,
29898,
1311,
1125,
13,
1678,
9853,
29918,
2311,
353,
29871,
29953,
13,
1678,
1741,
29918,
2311,
353,
29871,
29941,
13,
13,
1678,
263,
29918,
2029,
353,
7442,
29889,
2378,
4197,
29961,
29900,
29889,
29945,
29962,
334,
1741,
29918,
2311,
29962,
334,
9853,
29918,
2311,
29892,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
29897,
13,
1678,
263,
29918,
7052,
353,
7442,
29889,
2378,
4197,
29961,
29900,
29889,
29896,
29962,
334,
1741,
29918,
2311,
29962,
334,
9853,
29918,
2311,
29892,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
29897,
13,
1678,
289,
29918,
2029,
353,
7442,
29889,
2378,
4197,
29961,
29900,
29889,
29946,
29962,
334,
1741,
29918,
2311,
29962,
334,
9853,
29918,
2311,
29892,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
29897,
13,
1678,
289,
29918,
7052,
353,
7442,
29889,
2378,
4197,
29961,
29900,
29889,
29906,
29962,
334,
1741,
29918,
2311,
29962,
334,
9853,
29918,
2311,
29892,
26688,
29922,
9302,
29889,
7411,
29941,
29906,
29897,
13,
13,
1678,
263,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
29874,
29918,
2029,
29892,
6287,
29922,
29874,
29918,
7052,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
1678,
289,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
29890,
29918,
2029,
29892,
6287,
29922,
29890,
29918,
7052,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
13,
1678,
5418,
353,
15886,
29889,
6897,
29898,
29874,
29918,
2029,
448,
289,
29918,
2029,
29897,
13,
1678,
11959,
353,
263,
29918,
7052,
847,
289,
29918,
7052,
13,
1678,
1565,
29918,
6321,
353,
8521,
13264,
29889,
755,
29889,
1188,
29898,
3605,
601,
29897,
448,
29871,
29896,
718,
5418,
847,
289,
29918,
7052,
718,
13,
1669,
11959,
334,
15886,
29889,
4548,
6278,
19244,
847,
263,
29918,
7052,
876,
13,
13,
1678,
9489,
353,
260,
11512,
29889,
6321,
29918,
29881,
2147,
10238,
29898,
29874,
29892,
289,
29897,
13,
13,
1678,
921,
353,
263,
29889,
11249,
29898,
524,
29898,
29896,
29872,
29946,
511,
16717,
29922,
1688,
29918,
4422,
29889,
1688,
29918,
26776,
3101,
13,
1678,
9489,
29918,
11249,
353,
15886,
29889,
17469,
29918,
12676,
29898,
29874,
29889,
1188,
29918,
22795,
29898,
29916,
29897,
448,
289,
29889,
1188,
29918,
22795,
29898,
29916,
511,
9685,
29922,
29900,
29897,
13,
13,
1678,
1565,
29918,
6321,
3383,
9489,
3383,
9489,
29918,
11249,
29918,
353,
1583,
29889,
24219,
403,
4197,
3009,
29918,
6321,
29892,
9489,
29892,
9489,
29918,
11249,
2314,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
3009,
29918,
6321,
3383,
9489,
3383,
472,
324,
29922,
29896,
29872,
29899,
29945,
29892,
364,
25027,
29922,
29896,
29872,
29899,
29945,
29897,
13,
1678,
1583,
29889,
9294,
3596,
11123,
29898,
3009,
29918,
6321,
3383,
9489,
29918,
11249,
3383,
472,
324,
29922,
29900,
1696,
364,
25027,
29922,
29896,
29872,
29899,
29896,
29897,
13,
13,
1678,
5225,
29918,
6321,
353,
260,
11512,
29889,
6321,
29918,
29881,
2147,
10238,
29898,
29874,
29892,
263,
29897,
13,
1678,
1565,
29918,
9171,
29918,
6321,
3383,
5225,
29918,
6321,
29918,
353,
1583,
29889,
24219,
403,
4197,
13264,
29889,
3298,
359,
29918,
4561,
29898,
3009,
29918,
6321,
511,
5225,
29918,
6321,
2314,
13,
1678,
1583,
29889,
9294,
3596,
9843,
29898,
3009,
29918,
9171,
29918,
6321,
3383,
5225,
29918,
6321,
19925,
13,
13,
29871,
732,
1688,
29918,
4422,
29889,
13264,
29918,
941,
412,
29918,
29879,
2142,
3305,
29918,
1688,
13,
29871,
822,
1243,
25584,
993,
29911,
1092,
820,
9629,
29898,
1311,
1125,
13,
1678,
1180,
353,
15886,
29889,
16174,
4197,
29899,
29945,
1696,
29871,
29900,
1696,
29871,
29945,
29889,
2314,
13,
1678,
6287,
353,
15886,
29889,
16174,
29898,
29906,
1846,
13,
1678,
270,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
2029,
29892,
6287,
29922,
7052,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
1678,
411,
15886,
29889,
25584,
993,
29911,
4085,
580,
408,
260,
4085,
29901,
13,
418,
6410,
353,
448,
29881,
29889,
1188,
29918,
22795,
4197,
29896,
1696,
29871,
29906,
1696,
29871,
29941,
29889,
2314,
13,
1678,
4656,
353,
260,
4085,
29889,
24970,
29898,
6758,
29892,
270,
29889,
14968,
519,
29918,
20897,
29897,
13,
1678,
1583,
29889,
9294,
21515,
29898,
5105,
29892,
29871,
29906,
29897,
13,
1678,
1583,
29889,
9294,
3596,
3664,
8516,
29898,
5105,
29897,
13,
13,
29871,
822,
1243,
2887,
643,
1372,
9135,
3321,
17185,
13555,
29924,
329,
362,
29898,
1311,
1125,
13,
1678,
6287,
353,
15886,
29889,
16174,
4197,
29896,
1696,
29871,
29906,
1696,
29871,
29941,
29889,
2314,
13,
1678,
270,
353,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
29900,
1696,
6287,
29922,
7052,
29892,
12725,
29918,
5085,
29922,
5574,
29897,
13,
1678,
1583,
29889,
24219,
403,
4197,
29894,
29889,
11228,
3950,
363,
325,
297,
270,
29889,
20897,
2314,
13,
1678,
411,
1583,
29889,
9294,
29934,
1759,
267,
11746,
2392,
877,
15730,
421,
7052,
29952,
1818,
367,
6374,
6169,
1125,
13,
418,
411,
15886,
29889,
6451,
29918,
22594,
4197,
7052,
29889,
16645,
4197,
29896,
1696,
29871,
29906,
1696,
448,
29941,
29889,
2314,
29962,
1125,
13,
4706,
1583,
29889,
24219,
403,
29898,
29873,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
29900,
1696,
6287,
29922,
29896,
6250,
6321,
29918,
29881,
2147,
10238,
29898,
29881,
876,
13,
13,
29871,
822,
1243,
14697,
9629,
17506,
29943,
417,
1446,
29898,
1311,
1125,
13,
1678,
1180,
353,
15886,
29889,
13441,
29918,
517,
29918,
20158,
29898,
29900,
29892,
26688,
29922,
13264,
29889,
524,
29941,
29906,
29897,
13,
1678,
6287,
353,
15886,
29889,
13441,
29918,
517,
29918,
20158,
29898,
29896,
29892,
26688,
29922,
13264,
29889,
524,
29941,
29906,
29897,
13,
1678,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
4548,
29898,
1917,
2392,
29892,
525,
1252,
6021,
16526,
1298,
29374,
13,
418,
260,
11512,
29889,
29931,
481,
1265,
29898,
2029,
29922,
2029,
29892,
6287,
29922,
7052,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
29871,
15886,
29889,
1688,
29889,
3396,
580,
13,
2
] |
model-test.py | shikew/Handwriting-calculator | 0 | 8598 | import numpy as np
from PIL import Image
from keras.models import load_model
img_gray = Image.open('1002.png')
number = np.array(img_gray)
print(number.shape)
print('准备的图片的shape:',number.flatten().shape)
print('原number:',number)
number = number.astype('float32')
number = number/255 #归一化
number = number.flatten()
print('处理过后的number.shape:',number.shape)
model = load_model('mnist-dnn.h5')
# model.load_weights('mnist.model.best.hdf5')
# def recognize(photo_data):
# return clf.predict(photo_data)
print(model.predict_classes(np.array([number])))
#print('测试标签为:',test_target[8000]) | [
1,
1053,
12655,
408,
7442,
13,
3166,
349,
6227,
1053,
7084,
13,
3166,
13023,
294,
29889,
9794,
1053,
2254,
29918,
4299,
13,
13,
2492,
29918,
21012,
353,
7084,
29889,
3150,
877,
29896,
29900,
29900,
29906,
29889,
2732,
1495,
13,
4537,
353,
7442,
29889,
2378,
29898,
2492,
29918,
21012,
29897,
13,
2158,
29898,
4537,
29889,
12181,
29897,
13,
2158,
877,
232,
138,
137,
232,
167,
138,
30210,
30861,
31122,
30210,
12181,
30383,
742,
4537,
29889,
1579,
8606,
2141,
12181,
29897,
13,
2158,
877,
30667,
4537,
29901,
742,
4537,
29897,
13,
4537,
353,
1353,
29889,
579,
668,
877,
7411,
29941,
29906,
1495,
13,
4537,
353,
1353,
29914,
29906,
29945,
29945,
259,
396,
232,
192,
149,
30287,
30705,
13,
4537,
353,
1353,
29889,
1579,
8606,
580,
13,
2158,
877,
31548,
30687,
31138,
30822,
30210,
4537,
29889,
12181,
29901,
742,
4537,
29889,
12181,
29897,
13,
13,
4299,
353,
2254,
29918,
4299,
877,
23521,
391,
29899,
5200,
29876,
29889,
29882,
29945,
1495,
13,
29937,
1904,
29889,
1359,
29918,
705,
5861,
877,
23521,
391,
29889,
4299,
29889,
13318,
29889,
29882,
2176,
29945,
1495,
13,
29937,
822,
18720,
29898,
21596,
29918,
1272,
1125,
13,
29937,
268,
736,
1067,
29888,
29889,
27711,
29898,
21596,
29918,
1272,
29897,
13,
13,
2158,
29898,
4299,
29889,
27711,
29918,
13203,
29898,
9302,
29889,
2378,
4197,
4537,
29962,
4961,
13,
29937,
2158,
877,
31851,
31787,
31062,
234,
176,
193,
30573,
30383,
742,
1688,
29918,
5182,
29961,
29947,
29900,
29900,
29900,
2314,
2
] |
src/query_datastream.py | DominiqueMercier/TSViz-Core | 0 | 102401 | <filename>src/query_datastream.py
import pickle
import matplotlib.pyplot as plt
import numpy as np
from scipy.stats import zscore
from tqdm import tqdm
def sampleTimeSeriesStream(strides, length, numTimeSteps, numChannels, numAnomalies, minDist, plotData=False):
x = smoothSampling(strides * length + numTimeSteps, numChannels)
# sc = StandardScaler()
# x = sc.fit_transform(x)
# print ("X:", x.shape)
# introduce anomalies
anomaly_list = []
possible_anomalies = np.arange(x.shape[0])
for i in range(numAnomalies):
# Anomaly - can be both positive or negative
scalingFactor = (np.sign(np.random.normal()) *
np.random.normal(loc=3.0, scale=0.75))
anomalyIdx = np.random.permutation(possible_anomalies)[0]
# Never introduce anomalies in the first channel
anomalyChannel = np.random.randint(1, numChannels)
fails = 0
while x[anomalyIdx, anomalyChannel] < 1.0: # Only take significant values
pa = set(possible_anomalies)
pa.remove(anomalyIdx)
possible_anomalies = np.array(list(pa))
anomalyIdx = np.random.permutation(possible_anomalies)[0]
fails += 1
if fails > 10:
break
if fails <= 10:
pa = set(possible_anomalies)
pa.difference_update(set(np.arange(anomalyIdx - minDist, anomalyIdx + minDist)))
possible_anomalies = np.array(list(pa))
x[anomalyIdx, anomalyChannel] *= scalingFactor
anomaly_list.append(anomalyIdx)
x_data, y_data = [], []
for i in range(length):
offset = strides * i
x_tmp = x[offset:offset+numTimeSteps]
window = np.arange(offset, offset+numTimeSteps)
y = 0 # Normal
true_a = -1
for a in anomaly_list:
if a in window:
y = 1
true_a = int(np.argwhere(window==a))
break
x_data.append(x_tmp)
y_data.append(y)
if plotData:
plot_sample(x_tmp, y, true_a)
return np.array(x_data), np.array(y_data)
def plot_sample(x, y, a):
fig, ax = plt.subplots()
if y == 1:
ax.set_title('Label: ' + str(y) + ' | Anomly: ' + str(a))
else:
ax.set_title('Label: ' + str(y))
plt.plot(x)
plt.show()
def smoothSampling(numVals, numChannels, mean=0.0, std=0.05):
finalSeries = []
for channel in range(numChannels):
stdDev = np.max([np.finfo(float).eps, 0.05 + np.random.normal(scale=std)]) # [0, 1)
result = []
y = np.random.normal(loc=mean, scale=stdDev)
for _ in range(numVals):
result.append(y)
y += np.random.normal(loc=mean, scale=stdDev)
result = np.array(result)
# Normalize
result = zscore(result) # @UndefinedVariable
finalSeries.append(result)
return np.stack(finalSeries, axis=1)
def create_dataset(dataPath, strides, length, numTimeSteps, numChannels, numAnomalies, minDist, plotData=False):
trainX, trainY = sampleTimeSeriesStream(strides, length, numTimeSteps, numChannels, numAnomalies, minDist, plotData)
testX, testY = sampleTimeSeriesStream(strides, length, numTimeSteps, numChannels, numAnomalies, minDist, plotData)
# Normalize the data
# sc = StandardScaler()
# trainX = sc.fit_transform(trainX)
# testX = sc.transform(testX)
# Dump data to pickle file
print("Saving data to file: %s" % (dataPath))
with open(dataPath, "wb") as pickleFile:
pickle.dump([trainX, trainY, testX, testY], pickleFile,
protocol=pickle.HIGHEST_PROTOCOL)
print("Data saved successfully!")
if __name__ == "__main__":
np.random.seed(1)
sampleTimeSeriesStream(strides=1, length=10, numTimeSteps=50, numChannels=3, numAnomalies=3, minDist=10, plotData=True) | [
1,
529,
9507,
29958,
4351,
29914,
1972,
29918,
4130,
579,
1633,
29889,
2272,
13,
5215,
5839,
280,
13,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
3166,
4560,
2272,
29889,
16202,
1053,
503,
13628,
13,
3166,
260,
29939,
18933,
1053,
260,
29939,
18933,
13,
13,
1753,
4559,
2481,
19204,
3835,
29898,
710,
2247,
29892,
3309,
29892,
954,
2481,
7789,
567,
29892,
954,
1451,
12629,
29892,
954,
2744,
290,
284,
583,
29892,
1375,
13398,
29892,
6492,
1469,
29922,
8824,
1125,
13,
1678,
921,
353,
10597,
22966,
10335,
29898,
710,
2247,
334,
3309,
718,
954,
2481,
7789,
567,
29892,
954,
1451,
12629,
29897,
13,
1678,
396,
885,
353,
10117,
29636,
261,
580,
13,
1678,
396,
921,
353,
885,
29889,
9202,
29918,
9067,
29898,
29916,
29897,
13,
1678,
396,
1596,
4852,
29990,
29901,
613,
921,
29889,
12181,
29897,
13,
13,
1678,
396,
14944,
29342,
284,
583,
13,
1678,
29342,
14997,
29918,
1761,
353,
5159,
13,
268,
13,
1678,
1950,
29918,
273,
290,
284,
583,
353,
7442,
29889,
279,
927,
29898,
29916,
29889,
12181,
29961,
29900,
2314,
13,
1678,
363,
474,
297,
3464,
29898,
1949,
2744,
290,
284,
583,
1125,
13,
4706,
396,
530,
290,
14997,
448,
508,
367,
1716,
6374,
470,
8178,
13,
4706,
21640,
29943,
7168,
353,
313,
9302,
29889,
4530,
29898,
9302,
29889,
8172,
29889,
8945,
3101,
334,
13,
462,
4706,
7442,
29889,
8172,
29889,
8945,
29898,
2029,
29922,
29941,
29889,
29900,
29892,
6287,
29922,
29900,
29889,
29955,
29945,
876,
13,
308,
13,
4706,
29342,
14997,
1204,
29916,
353,
7442,
29889,
8172,
29889,
546,
6149,
362,
29898,
27338,
29918,
273,
290,
284,
583,
9601,
29900,
29962,
13,
13,
4706,
396,
12391,
14944,
29342,
284,
583,
297,
278,
937,
8242,
13,
4706,
29342,
14997,
13599,
353,
7442,
29889,
8172,
29889,
9502,
524,
29898,
29896,
29892,
954,
1451,
12629,
29897,
13,
308,
13,
4706,
8465,
353,
29871,
29900,
13,
4706,
1550,
921,
29961,
273,
290,
14997,
1204,
29916,
29892,
29342,
14997,
13599,
29962,
529,
29871,
29896,
29889,
29900,
29901,
29871,
396,
9333,
2125,
7282,
1819,
13,
9651,
3300,
353,
731,
29898,
27338,
29918,
273,
290,
284,
583,
29897,
13,
9651,
3300,
29889,
5992,
29898,
273,
290,
14997,
1204,
29916,
29897,
13,
9651,
1950,
29918,
273,
290,
284,
583,
353,
7442,
29889,
2378,
29898,
1761,
29898,
3274,
876,
13,
9651,
29342,
14997,
1204,
29916,
353,
7442,
29889,
8172,
29889,
546,
6149,
362,
29898,
27338,
29918,
273,
290,
284,
583,
9601,
29900,
29962,
13,
9651,
8465,
4619,
29871,
29896,
13,
9651,
565,
8465,
1405,
29871,
29896,
29900,
29901,
13,
18884,
2867,
13,
308,
13,
4706,
565,
8465,
5277,
29871,
29896,
29900,
29901,
13,
9651,
3300,
353,
731,
29898,
27338,
29918,
273,
290,
284,
583,
29897,
13,
9651,
3300,
29889,
29881,
17678,
29918,
5504,
29898,
842,
29898,
9302,
29889,
279,
927,
29898,
273,
290,
14997,
1204,
29916,
448,
1375,
13398,
29892,
29342,
14997,
1204,
29916,
718,
1375,
13398,
4961,
13,
9651,
1950,
29918,
273,
290,
284,
583,
353,
7442,
29889,
2378,
29898,
1761,
29898,
3274,
876,
13,
9651,
921,
29961,
273,
290,
14997,
1204,
29916,
29892,
29342,
14997,
13599,
29962,
334,
29922,
21640,
29943,
7168,
13,
9651,
29342,
14997,
29918,
1761,
29889,
4397,
29898,
273,
290,
14997,
1204,
29916,
29897,
13,
308,
13,
1678,
921,
29918,
1272,
29892,
343,
29918,
1272,
353,
19997,
5159,
13,
1678,
363,
474,
297,
3464,
29898,
2848,
1125,
13,
4706,
9210,
353,
851,
2247,
334,
474,
13,
4706,
921,
29918,
7050,
353,
921,
29961,
10289,
29901,
10289,
29974,
1949,
2481,
7789,
567,
29962,
13,
13,
4706,
3474,
353,
7442,
29889,
279,
927,
29898,
10289,
29892,
9210,
29974,
1949,
2481,
7789,
567,
29897,
13,
4706,
343,
353,
29871,
29900,
29871,
396,
21981,
13,
4706,
1565,
29918,
29874,
353,
448,
29896,
13,
4706,
363,
263,
297,
29342,
14997,
29918,
1761,
29901,
13,
9651,
565,
263,
297,
3474,
29901,
13,
18884,
343,
353,
29871,
29896,
13,
18884,
1565,
29918,
29874,
353,
938,
29898,
9302,
29889,
1191,
3062,
29898,
7165,
1360,
29874,
876,
13,
18884,
2867,
13,
308,
13,
4706,
921,
29918,
1272,
29889,
4397,
29898,
29916,
29918,
7050,
29897,
13,
4706,
343,
29918,
1272,
29889,
4397,
29898,
29891,
29897,
13,
13,
4706,
565,
6492,
1469,
29901,
13,
9651,
6492,
29918,
11249,
29898,
29916,
29918,
7050,
29892,
343,
29892,
1565,
29918,
29874,
29897,
13,
1678,
736,
7442,
29889,
2378,
29898,
29916,
29918,
1272,
511,
7442,
29889,
2378,
29898,
29891,
29918,
1272,
29897,
13,
13,
1753,
6492,
29918,
11249,
29898,
29916,
29892,
343,
29892,
263,
1125,
13,
1678,
2537,
29892,
4853,
353,
14770,
29889,
1491,
26762,
580,
13,
1678,
565,
343,
1275,
29871,
29896,
29901,
13,
4706,
4853,
29889,
842,
29918,
3257,
877,
4775,
29901,
525,
718,
851,
29898,
29891,
29897,
718,
525,
891,
530,
290,
368,
29901,
525,
718,
851,
29898,
29874,
876,
13,
1678,
1683,
29901,
13,
4706,
4853,
29889,
842,
29918,
3257,
877,
4775,
29901,
525,
718,
851,
29898,
29891,
876,
13,
1678,
14770,
29889,
5317,
29898,
29916,
29897,
13,
1678,
14770,
29889,
4294,
580,
13,
13,
1753,
10597,
22966,
10335,
29898,
1949,
29963,
1338,
29892,
954,
1451,
12629,
29892,
2099,
29922,
29900,
29889,
29900,
29892,
3659,
29922,
29900,
29889,
29900,
29945,
1125,
13,
1678,
2186,
19204,
353,
5159,
13,
1678,
363,
8242,
297,
3464,
29898,
1949,
1451,
12629,
1125,
13,
4706,
3659,
16618,
353,
7442,
29889,
3317,
4197,
9302,
29889,
29888,
3888,
29898,
7411,
467,
8961,
29892,
29871,
29900,
29889,
29900,
29945,
718,
7442,
29889,
8172,
29889,
8945,
29898,
7052,
29922,
4172,
29897,
2314,
29871,
396,
518,
29900,
29892,
29871,
29896,
29897,
13,
4706,
1121,
353,
5159,
13,
4706,
343,
353,
7442,
29889,
8172,
29889,
8945,
29898,
2029,
29922,
12676,
29892,
6287,
29922,
4172,
16618,
29897,
13,
4706,
363,
903,
297,
3464,
29898,
1949,
29963,
1338,
1125,
13,
9651,
1121,
29889,
4397,
29898,
29891,
29897,
13,
9651,
343,
4619,
7442,
29889,
8172,
29889,
8945,
29898,
2029,
29922,
12676,
29892,
6287,
29922,
4172,
16618,
29897,
13,
4706,
1121,
353,
7442,
29889,
2378,
29898,
2914,
29897,
13,
13,
4706,
396,
21981,
675,
13,
4706,
1121,
353,
503,
13628,
29898,
2914,
29897,
29871,
396,
732,
25263,
5598,
16174,
13,
13,
4706,
2186,
19204,
29889,
4397,
29898,
2914,
29897,
13,
13,
1678,
736,
7442,
29889,
1429,
29898,
8394,
19204,
29892,
9685,
29922,
29896,
29897,
13,
13,
13,
1753,
1653,
29918,
24713,
29898,
1272,
2605,
29892,
851,
2247,
29892,
3309,
29892,
954,
2481,
7789,
567,
29892,
954,
1451,
12629,
29892,
954,
2744,
290,
284,
583,
29892,
1375,
13398,
29892,
6492,
1469,
29922,
8824,
1125,
13,
1678,
7945,
29990,
29892,
7945,
29979,
353,
4559,
2481,
19204,
3835,
29898,
710,
2247,
29892,
3309,
29892,
954,
2481,
7789,
567,
29892,
954,
1451,
12629,
29892,
954,
2744,
290,
284,
583,
29892,
1375,
13398,
29892,
6492,
1469,
29897,
13,
1678,
1243,
29990,
29892,
1243,
29979,
353,
4559,
2481,
19204,
3835,
29898,
710,
2247,
29892,
3309,
29892,
954,
2481,
7789,
567,
29892,
954,
1451,
12629,
29892,
954,
2744,
290,
284,
583,
29892,
1375,
13398,
29892,
6492,
1469,
29897,
13,
268,
13,
1678,
396,
21981,
675,
278,
848,
13,
1678,
396,
885,
353,
10117,
29636,
261,
580,
13,
1678,
396,
7945,
29990,
353,
885,
29889,
9202,
29918,
9067,
29898,
14968,
29990,
29897,
13,
1678,
396,
1243,
29990,
353,
885,
29889,
9067,
29898,
1688,
29990,
29897,
13,
13,
1678,
396,
360,
3427,
848,
304,
5839,
280,
934,
13,
1678,
1596,
703,
29903,
5555,
848,
304,
934,
29901,
1273,
29879,
29908,
1273,
313,
1272,
2605,
876,
13,
1678,
411,
1722,
29898,
1272,
2605,
29892,
376,
29893,
29890,
1159,
408,
5839,
280,
2283,
29901,
13,
4706,
5839,
280,
29889,
15070,
4197,
14968,
29990,
29892,
7945,
29979,
29892,
1243,
29990,
29892,
1243,
29979,
1402,
5839,
280,
2283,
29892,
13,
462,
1678,
9608,
29922,
23945,
280,
29889,
29950,
6259,
9606,
1254,
29918,
8618,
4986,
15032,
29897,
13,
1678,
1596,
703,
1469,
7160,
8472,
29991,
1159,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
7442,
29889,
8172,
29889,
26776,
29898,
29896,
29897,
13,
1678,
4559,
2481,
19204,
3835,
29898,
710,
2247,
29922,
29896,
29892,
3309,
29922,
29896,
29900,
29892,
954,
2481,
7789,
567,
29922,
29945,
29900,
29892,
954,
1451,
12629,
29922,
29941,
29892,
954,
2744,
290,
284,
583,
29922,
29941,
29892,
1375,
13398,
29922,
29896,
29900,
29892,
6492,
1469,
29922,
5574,
29897,
2
] |
orcinus/workspace/workspace.py | orcinus-lang/orcinus-bootstrap | 0 | 194482 | <reponame>orcinus-lang/orcinus-bootstrap
# Copyright (C) 2019 <NAME>
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
from __future__ import annotations
import logging
import os
import urllib.parse
from typing import Sequence, Optional
from orcinus.exceptions import OrcinusError
from orcinus.signals import Signal
from orcinus.workspace.document import Document
from orcinus.workspace.package import Package
from orcinus.workspace.utils import convert_filename
logger = logging.getLogger('orcinus.workspace')
class Workspace:
"""
Active representation of collection of projects
"""
packages: Sequence[Package]
on_document_create: Signal # (document: Document) -> void
on_document_remove: Signal # (document: Document) -> void
on_document_analyze: Signal # (document: Document) -> void
def __init__(self, paths: Sequence[str] = None):
paths = list(() or paths)
# Standard library path
stdlib_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../stdlib'))
if stdlib_path not in paths:
paths.insert(0, stdlib_path)
self.packages = [
Package(self, os.path.abspath(urllib.parse.urlparse(path).path)) for path in paths
]
# signals
self.on_document_create = Signal()
self.on_document_remove = Signal()
self.on_document_analyze = Signal()
def get_package_for_document(self, doc_uri: str):
url = urllib.parse.urlparse(doc_uri)
fullname = os.path.abspath(url.path)
for package in self.packages:
if fullname.startswith(package.path):
return package
raise OrcinusError(f"Not found file `{url.path}` in packages")
def get_or_create_document(self, doc_uri: str) -> Document:
"""
Return a managed document if-present, else create one pointing at disk.
"""
package = self.get_package_for_document(doc_uri)
return package.get_or_create_document(doc_uri)
def get_document(self, doc_uri: str) -> Optional[Document]:
""" Returns a managed document if-present, otherwise None """
package = self.get_package_for_document(doc_uri)
return package.get_document(doc_uri)
def create_document(self, doc_uri, source=None, version=None) -> Document:
""" Create new document """
package = self.get_package_for_document(doc_uri)
return package.create_document(doc_uri, source, version)
def update_document(self, doc_uri: str, source=None, version=None) -> Document:
""" Update source of document """
package = self.get_package_for_document(doc_uri)
return package.update_document(doc_uri, source, version)
def unload_document(self, doc_uri: str):
""" Unload document from package """
package = self.get_package_for_document(doc_uri)
return package.unload_document(doc_uri)
def load_document(self, module_name: str) -> Document:
"""
Load document for module
:param module_name: Module name
:return: Document
"""
for package in self.packages:
doc_uri = convert_filename(module_name, package.path)
try:
return package.get_or_create_document(doc_uri)
except IOError:
logger.debug(f"Not found module `{module_name}` in file `{doc_uri}`")
pass # Continue
raise OrcinusError(f'Not found module {module_name}')
| [
1,
529,
276,
1112,
420,
29958,
272,
29883,
13419,
29899,
3893,
29914,
272,
29883,
13419,
29899,
8704,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29896,
29929,
529,
5813,
29958,
13,
29937,
13,
29937,
910,
7047,
1122,
367,
9120,
322,
13235,
1090,
278,
4958,
13,
29937,
310,
278,
341,
1806,
19405,
29889,
29871,
2823,
278,
365,
2965,
1430,
1660,
934,
363,
4902,
29889,
13,
3166,
4770,
29888,
9130,
1649,
1053,
25495,
13,
13,
5215,
12183,
13,
5215,
2897,
13,
5215,
3142,
1982,
29889,
5510,
13,
3166,
19229,
1053,
922,
3910,
29892,
28379,
13,
13,
3166,
470,
29883,
13419,
29889,
11739,
29879,
1053,
1394,
29883,
13419,
2392,
13,
3166,
470,
29883,
13419,
29889,
4530,
1338,
1053,
9954,
284,
13,
3166,
470,
29883,
13419,
29889,
1287,
3493,
29889,
3225,
1053,
10854,
13,
3166,
470,
29883,
13419,
29889,
1287,
3493,
29889,
5113,
1053,
22029,
13,
3166,
470,
29883,
13419,
29889,
1287,
3493,
29889,
13239,
1053,
3588,
29918,
9507,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
877,
272,
29883,
13419,
29889,
1287,
3493,
1495,
13,
13,
13,
1990,
5244,
3493,
29901,
13,
1678,
9995,
13,
1678,
10731,
8954,
310,
4333,
310,
9279,
13,
1678,
9995,
13,
1678,
9741,
29901,
922,
3910,
29961,
14459,
29962,
13,
13,
1678,
373,
29918,
3225,
29918,
3258,
29901,
9954,
284,
29871,
396,
313,
3225,
29901,
10854,
29897,
1599,
1780,
13,
1678,
373,
29918,
3225,
29918,
5992,
29901,
9954,
284,
29871,
396,
313,
3225,
29901,
10854,
29897,
1599,
1780,
13,
1678,
373,
29918,
3225,
29918,
24209,
911,
29901,
9954,
284,
29871,
396,
313,
3225,
29901,
10854,
29897,
1599,
1780,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
10898,
29901,
922,
3910,
29961,
710,
29962,
353,
6213,
1125,
13,
4706,
10898,
353,
1051,
14885,
470,
10898,
29897,
13,
13,
4706,
396,
10117,
3489,
2224,
13,
4706,
3659,
1982,
29918,
2084,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
7122,
29898,
359,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
511,
525,
21546,
4172,
1982,
8785,
13,
4706,
565,
3659,
1982,
29918,
2084,
451,
297,
10898,
29901,
13,
9651,
10898,
29889,
7851,
29898,
29900,
29892,
3659,
1982,
29918,
2084,
29897,
13,
13,
4706,
1583,
29889,
8318,
353,
518,
13,
9651,
22029,
29898,
1311,
29892,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
2271,
1982,
29889,
5510,
29889,
2271,
5510,
29898,
2084,
467,
2084,
876,
363,
2224,
297,
10898,
13,
4706,
4514,
13,
13,
4706,
396,
18470,
13,
4706,
1583,
29889,
265,
29918,
3225,
29918,
3258,
353,
9954,
284,
580,
13,
4706,
1583,
29889,
265,
29918,
3225,
29918,
5992,
353,
9954,
284,
580,
13,
4706,
1583,
29889,
265,
29918,
3225,
29918,
24209,
911,
353,
9954,
284,
580,
13,
13,
1678,
822,
679,
29918,
5113,
29918,
1454,
29918,
3225,
29898,
1311,
29892,
1574,
29918,
5338,
29901,
851,
1125,
13,
4706,
3142,
353,
3142,
1982,
29889,
5510,
29889,
2271,
5510,
29898,
1514,
29918,
5338,
29897,
13,
4706,
2989,
978,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
2271,
29889,
2084,
29897,
13,
4706,
363,
3577,
297,
1583,
29889,
8318,
29901,
13,
9651,
565,
2989,
978,
29889,
27382,
2541,
29898,
5113,
29889,
2084,
1125,
13,
18884,
736,
3577,
13,
13,
4706,
12020,
1394,
29883,
13419,
2392,
29898,
29888,
29908,
3664,
1476,
934,
23230,
2271,
29889,
2084,
10114,
297,
9741,
1159,
13,
13,
1678,
822,
679,
29918,
272,
29918,
3258,
29918,
3225,
29898,
1311,
29892,
1574,
29918,
5338,
29901,
851,
29897,
1599,
10854,
29901,
13,
4706,
9995,
13,
4706,
7106,
263,
8745,
1842,
565,
29899,
6338,
29892,
1683,
1653,
697,
13330,
472,
8086,
29889,
13,
4706,
9995,
13,
4706,
3577,
353,
1583,
29889,
657,
29918,
5113,
29918,
1454,
29918,
3225,
29898,
1514,
29918,
5338,
29897,
13,
4706,
736,
3577,
29889,
657,
29918,
272,
29918,
3258,
29918,
3225,
29898,
1514,
29918,
5338,
29897,
13,
13,
1678,
822,
679,
29918,
3225,
29898,
1311,
29892,
1574,
29918,
5338,
29901,
851,
29897,
1599,
28379,
29961,
6268,
5387,
13,
4706,
9995,
16969,
263,
8745,
1842,
565,
29899,
6338,
29892,
6467,
6213,
9995,
13,
4706,
3577,
353,
1583,
29889,
657,
29918,
5113,
29918,
1454,
29918,
3225,
29898,
1514,
29918,
5338,
29897,
13,
4706,
736,
3577,
29889,
657,
29918,
3225,
29898,
1514,
29918,
5338,
29897,
13,
13,
1678,
822,
1653,
29918,
3225,
29898,
1311,
29892,
1574,
29918,
5338,
29892,
2752,
29922,
8516,
29892,
1873,
29922,
8516,
29897,
1599,
10854,
29901,
13,
4706,
9995,
6204,
716,
1842,
9995,
13,
4706,
3577,
353,
1583,
29889,
657,
29918,
5113,
29918,
1454,
29918,
3225,
29898,
1514,
29918,
5338,
29897,
13,
4706,
736,
3577,
29889,
3258,
29918,
3225,
29898,
1514,
29918,
5338,
29892,
2752,
29892,
1873,
29897,
13,
13,
1678,
822,
2767,
29918,
3225,
29898,
1311,
29892,
1574,
29918,
5338,
29901,
851,
29892,
2752,
29922,
8516,
29892,
1873,
29922,
8516,
29897,
1599,
10854,
29901,
13,
4706,
9995,
10318,
2752,
310,
1842,
9995,
13,
4706,
3577,
353,
1583,
29889,
657,
29918,
5113,
29918,
1454,
29918,
3225,
29898,
1514,
29918,
5338,
29897,
13,
4706,
736,
3577,
29889,
5504,
29918,
3225,
29898,
1514,
29918,
5338,
29892,
2752,
29892,
1873,
29897,
13,
13,
1678,
822,
443,
1359,
29918,
3225,
29898,
1311,
29892,
1574,
29918,
5338,
29901,
851,
1125,
13,
4706,
9995,
853,
1359,
1842,
515,
3577,
9995,
13,
4706,
3577,
353,
1583,
29889,
657,
29918,
5113,
29918,
1454,
29918,
3225,
29898,
1514,
29918,
5338,
29897,
13,
4706,
736,
3577,
29889,
348,
1359,
29918,
3225,
29898,
1514,
29918,
5338,
29897,
13,
13,
1678,
822,
2254,
29918,
3225,
29898,
1311,
29892,
3883,
29918,
978,
29901,
851,
29897,
1599,
10854,
29901,
13,
4706,
9995,
13,
4706,
16012,
1842,
363,
3883,
13,
13,
4706,
584,
3207,
3883,
29918,
978,
29901,
15591,
1024,
13,
4706,
584,
2457,
29901,
10854,
13,
4706,
9995,
13,
4706,
363,
3577,
297,
1583,
29889,
8318,
29901,
13,
9651,
1574,
29918,
5338,
353,
3588,
29918,
9507,
29898,
5453,
29918,
978,
29892,
3577,
29889,
2084,
29897,
13,
9651,
1018,
29901,
13,
18884,
736,
3577,
29889,
657,
29918,
272,
29918,
3258,
29918,
3225,
29898,
1514,
29918,
5338,
29897,
13,
9651,
5174,
10663,
2392,
29901,
13,
18884,
17927,
29889,
8382,
29898,
29888,
29908,
3664,
1476,
3883,
23230,
5453,
29918,
978,
10114,
297,
934,
23230,
1514,
29918,
5338,
10114,
1159,
13,
18884,
1209,
29871,
396,
2866,
14150,
13,
13,
4706,
12020,
1394,
29883,
13419,
2392,
29898,
29888,
29915,
3664,
1476,
3883,
426,
5453,
29918,
978,
29913,
1495,
13,
2
] |
setup.py | iamsrp/pyfestival | 8 | 26753 | <reponame>iamsrp/pyfestival
#!/usr/bin/env python
from distutils.core import setup, Extension
from distutils.util import get_platform
import os
festival_include = os.environ.get("FESTIVAL_INCLUDE", '/usr/include/festival')
speech_tools_include = os.environ.get("SPECCH_INCLUDE", '/usr/include/speech_tools')
festival_lib = os.environ.get("FESTIVAL_LIB", '/usr/lib')
festival_classifiers = [
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
"Topic :: Multimedia :: Sound/Audio :: Sound Synthesis",
"Topic :: Multimedia :: Sound/Audio :: Speech"
]
long_description = """A Python wrapper around the Festival Speech Synthesis System:
http://www.cstr.ed.ac.uk/projects/festival/
pyfestival creates a C module built on top of the festival source code, making it a self-contained Python library
(there is no need to run festival-server alongside).
pyfestival supports (and is tested on) Python 2.7+ including Python 3
"""
libraries = ['Festival', 'estools', 'estbase', 'eststring']
if get_platform().startswith('macosx-'):
macos_frameworks = ['CoreAudio', 'AudioToolbox', 'Carbon']
libraries.append('ncurses')
else:
macos_frameworks = []
setup(
name='pyfestival',
description='Python Festival module',
long_description=long_description,
url="https://github.com/techiaith/pyfestival",
author="<NAME>",
author_email="<EMAIL>",
license="BSD",
py_modules=['festival'],
ext_modules=[
Extension(
'_festival',
['_festival.cpp'],
include_dirs=[festival_include, speech_tools_include],
library_dirs=[festival_lib],
libraries=libraries,
extra_link_args=[x for name in macos_frameworks for x in ('-framework', name)],
),
],
platforms=["*nix"],
bugtrack_url="https://github.com/techiaith/pyfestival/issues",
version="0.5",
)
| [
1,
529,
276,
1112,
420,
29958,
10909,
19080,
29914,
2272,
29888,
6074,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
3166,
1320,
13239,
29889,
3221,
1053,
6230,
29892,
7338,
2673,
13,
3166,
1320,
13239,
29889,
4422,
1053,
679,
29918,
12120,
13,
5215,
2897,
13,
13,
29888,
6074,
29918,
2856,
353,
2897,
29889,
21813,
29889,
657,
703,
16359,
1254,
5667,
1964,
29918,
1177,
6154,
29965,
2287,
613,
8207,
4855,
29914,
2856,
29914,
29888,
6074,
1495,
13,
5965,
5309,
29918,
8504,
29918,
2856,
353,
2897,
29889,
21813,
29889,
657,
703,
29903,
4162,
29907,
3210,
29918,
1177,
6154,
29965,
2287,
613,
8207,
4855,
29914,
2856,
29914,
5965,
5309,
29918,
8504,
1495,
13,
29888,
6074,
29918,
1982,
353,
2897,
29889,
21813,
29889,
657,
703,
16359,
1254,
5667,
1964,
29918,
5265,
29933,
613,
8207,
4855,
29914,
1982,
1495,
13,
13,
29888,
6074,
29918,
1990,
14903,
353,
518,
13,
29908,
9283,
4056,
17088,
4761,
5132,
4761,
29871,
29906,
613,
13,
29908,
9283,
4056,
17088,
4761,
5132,
4761,
29871,
29941,
613,
13,
29908,
2928,
2760,
319,
4749,
663,
4761,
10682,
414,
613,
13,
29908,
29931,
293,
1947,
4761,
438,
5425,
28268,
1490,
4761,
350,
7230,
19245,
613,
13,
29908,
7031,
293,
4761,
18540,
14650,
4761,
365,
4626,
4314,
613,
13,
29908,
7031,
293,
4761,
22310,
1907,
613,
13,
29908,
7031,
293,
4761,
9683,
3393,
4761,
14976,
29914,
17111,
4761,
14976,
10829,
26533,
613,
13,
29908,
7031,
293,
4761,
9683,
3393,
4761,
14976,
29914,
17111,
4761,
5013,
5309,
29908,
13,
29962,
13,
13,
5426,
29918,
8216,
353,
9995,
29909,
5132,
14476,
2820,
278,
8518,
5013,
5309,
10829,
26533,
2184,
29901,
13,
1124,
597,
1636,
29889,
29883,
710,
29889,
287,
29889,
562,
29889,
2679,
29914,
16418,
29914,
29888,
6074,
29914,
13,
13,
2272,
29888,
6074,
10017,
263,
315,
3883,
4240,
373,
2246,
310,
278,
16005,
2752,
775,
29892,
3907,
372,
263,
1583,
29899,
1285,
7114,
5132,
3489,
13,
29898,
12711,
338,
694,
817,
304,
1065,
16005,
29899,
2974,
19963,
467,
13,
13,
2272,
29888,
6074,
11286,
313,
392,
338,
9528,
373,
29897,
5132,
29871,
29906,
29889,
29955,
29974,
3704,
5132,
29871,
29941,
13,
15945,
29908,
13,
13,
492,
8464,
353,
6024,
29943,
6074,
742,
525,
342,
8789,
742,
525,
342,
3188,
742,
525,
342,
1807,
2033,
13,
13,
361,
679,
29918,
12120,
2141,
27382,
2541,
877,
8628,
359,
29916,
29899,
29374,
13,
1678,
5825,
359,
29918,
4468,
29879,
353,
6024,
9203,
17111,
742,
525,
17111,
12229,
1884,
742,
525,
8179,
6718,
2033,
13,
1678,
9562,
29889,
4397,
877,
17608,
1295,
267,
1495,
13,
2870,
29901,
13,
1678,
5825,
359,
29918,
4468,
29879,
353,
5159,
13,
13,
14669,
29898,
13,
1678,
1024,
2433,
2272,
29888,
6074,
742,
13,
1678,
6139,
2433,
11980,
8518,
3883,
742,
13,
1678,
1472,
29918,
8216,
29922,
5426,
29918,
8216,
29892,
13,
1678,
3142,
543,
991,
597,
3292,
29889,
510,
29914,
11345,
423,
389,
29914,
2272,
29888,
6074,
613,
13,
1678,
4148,
543,
29966,
5813,
28341,
13,
1678,
4148,
29918,
5269,
543,
29966,
26862,
6227,
28341,
13,
1678,
19405,
543,
29933,
7230,
613,
13,
1678,
11451,
29918,
7576,
29922,
1839,
29888,
6074,
7464,
13,
1678,
1294,
29918,
7576,
11759,
13,
4706,
7338,
2673,
29898,
13,
9651,
22868,
29888,
6074,
742,
13,
9651,
6024,
29918,
29888,
6074,
29889,
8223,
7464,
13,
9651,
3160,
29918,
3972,
29879,
11759,
29888,
6074,
29918,
2856,
29892,
12032,
29918,
8504,
29918,
2856,
1402,
13,
9651,
3489,
29918,
3972,
29879,
11759,
29888,
6074,
29918,
1982,
1402,
13,
9651,
9562,
29922,
492,
8464,
29892,
13,
9651,
4805,
29918,
2324,
29918,
5085,
11759,
29916,
363,
1024,
297,
5825,
359,
29918,
4468,
29879,
363,
921,
297,
6702,
29899,
4468,
742,
1024,
29897,
1402,
13,
4706,
10353,
13,
1678,
21251,
13,
1678,
21796,
29922,
3366,
29930,
29876,
861,
12436,
13,
1678,
6494,
11294,
29918,
2271,
543,
991,
597,
3292,
29889,
510,
29914,
11345,
423,
389,
29914,
2272,
29888,
6074,
29914,
12175,
613,
13,
1678,
1873,
543,
29900,
29889,
29945,
613,
13,
29897,
13,
2
] |
MyExtenstion.extension/Gaochao.tab/Gaochao.panel/Annotation_Modify.pulldown/Grid_3DTo2D.pushbutton/script.py | gaochaowyq/MyPyRevitExtentision | 0 | 58875 | # -*- coding: utf-8 -*-
__doc__="返回选择物体的类型"
import rpw
from rpw import revit, DB, UI,db,doc
#from System.Collections.Generic import List
#import json
#from scriptutils import this_script
#from scriptutils.userinput import CommandSwitchWindow
#import subprocess as sp
#Change Selected Grid From 3D to 2D
#selection = rpw.ui.Selection().elements
#Grid=selection[0]
#Grid= rpw.db.Element(Grid).parameters.all
#print(Grid)
#Change Grid buble visibility
selection = rpw.ui.Selection()
Grid=selection
endpoint=DB.DatumEnds.End0
startpoint=DB.DatumEnds.End1
CurrentView=doc.ActiveView
DatumExtentType2D=DB.DatumExtentType.ViewSpecific
@rpw.db.Transaction.ensure('Hide_Grid_Bubble')
def DatumExtentType3DTo2D(_Grid,points,CurrentView):
for i in points:
_Grid.SetDatumExtentType(i,CurrentView,DatumExtentType2D)
for i in Grid:
DatumExtentType3DTo2D(i,[endpoint,startpoint],CurrentView)
print("Good")
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
1649,
1514,
1649,
543,
31086,
30742,
31333,
233,
142,
172,
30834,
30988,
30210,
30832,
30883,
29908,
13,
5215,
364,
29886,
29893,
13,
3166,
364,
29886,
29893,
1053,
6664,
277,
29892,
6535,
29892,
3740,
29892,
2585,
29892,
1514,
13,
29937,
3166,
2184,
29889,
19466,
29889,
15809,
1053,
2391,
13,
29937,
5215,
4390,
13,
29937,
3166,
2471,
13239,
1053,
445,
29918,
2154,
13,
29937,
3166,
2471,
13239,
29889,
1792,
2080,
1053,
10516,
24995,
5907,
13,
29937,
5215,
1014,
5014,
408,
805,
13,
29937,
7277,
22012,
11657,
3645,
29871,
29941,
29928,
304,
29871,
29906,
29928,
13,
13,
29937,
21731,
353,
364,
29886,
29893,
29889,
1481,
29889,
15097,
2141,
17664,
13,
13,
29937,
5756,
29922,
21731,
29961,
29900,
29962,
13,
29937,
5756,
29922,
364,
29886,
29893,
29889,
2585,
29889,
2642,
29898,
5756,
467,
16744,
29889,
497,
13,
13,
29937,
2158,
29898,
5756,
29897,
13,
13,
29937,
7277,
11657,
289,
431,
280,
26401,
13,
21731,
353,
364,
29886,
29893,
29889,
1481,
29889,
15097,
580,
13,
13,
5756,
29922,
21731,
13,
29734,
29922,
4051,
29889,
16390,
398,
5044,
29879,
29889,
5044,
29900,
13,
2962,
3149,
29922,
4051,
29889,
16390,
398,
5044,
29879,
29889,
5044,
29896,
13,
7583,
1043,
29922,
1514,
29889,
9966,
1043,
13,
16390,
398,
5647,
296,
1542,
29906,
29928,
29922,
4051,
29889,
16390,
398,
5647,
296,
1542,
29889,
1043,
10299,
928,
29871,
13,
29992,
19080,
29893,
29889,
2585,
29889,
12460,
29889,
7469,
877,
29950,
680,
29918,
5756,
29918,
29933,
23232,
1495,
13,
1753,
13373,
398,
5647,
296,
1542,
29941,
29928,
1762,
29906,
29928,
7373,
5756,
29892,
9748,
29892,
7583,
1043,
1125,
13,
12,
1454,
474,
297,
3291,
29901,
12,
12,
13,
12,
12,
29918,
5756,
29889,
2697,
16390,
398,
5647,
296,
1542,
29898,
29875,
29892,
7583,
1043,
29892,
16390,
398,
5647,
296,
1542,
29906,
29928,
29897,
13,
13,
13,
13,
13,
1454,
474,
297,
11657,
29901,
13,
12,
16390,
398,
5647,
296,
1542,
29941,
29928,
1762,
29906,
29928,
29898,
29875,
17094,
29734,
29892,
2962,
3149,
1402,
7583,
1043,
29897,
13,
12,
2158,
703,
18420,
1159,
13,
13,
13,
13,
2
] |
my_notes/ex127/sieve_module.py | ivalderrama/packt_python_workshop | 0 | 133674 | class PrimesBelow:
def __init__(self, bound):
self.candidate_numbers = list(range(2,bound))
def __iter__(self):
return self
def __next__(self):
if len(self.candidate_numbers) == 0:
raise StopIteration
next_prime = self.candidate_numbers[0]
self.candidate_numbers = [x for x in self.candidate_numbers if x % next_prime != 0]
return next_prime | [
1,
770,
1588,
1355,
21140,
340,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3216,
1125,
13,
4706,
1583,
29889,
29883,
5380,
403,
29918,
20326,
353,
1051,
29898,
3881,
29898,
29906,
29892,
9917,
876,
13,
308,
13,
1678,
822,
4770,
1524,
12035,
1311,
1125,
13,
4706,
736,
1583,
13,
268,
13,
1678,
822,
4770,
4622,
12035,
1311,
1125,
13,
4706,
565,
7431,
29898,
1311,
29889,
29883,
5380,
403,
29918,
20326,
29897,
1275,
29871,
29900,
29901,
13,
9651,
12020,
22303,
13463,
362,
13,
632,
13,
4706,
2446,
29918,
10080,
353,
1583,
29889,
29883,
5380,
403,
29918,
20326,
29961,
29900,
29962,
13,
308,
13,
4706,
1583,
29889,
29883,
5380,
403,
29918,
20326,
353,
518,
29916,
363,
921,
297,
1583,
29889,
29883,
5380,
403,
29918,
20326,
565,
921,
1273,
2446,
29918,
10080,
2804,
29871,
29900,
29962,
13,
308,
13,
4706,
736,
2446,
29918,
10080,
29871,
2
] |
learning-python-master/learning-python-master/python_gyakorlas3.py | Hanna998/functional_tests | 0 | 176644 | <filename>learning-python-master/learning-python-master/python_gyakorlas3.py<gh_stars>0
# -*- coding:Utf-8 -*-
'''
Gyakorlatok :
5.11. x
Legyenek adottak a következő listák:
t1 = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
t2 = ['Január', 'Február', 'Március', 'Április', 'Május', 'Június', '<NAME>', 'Augusztus', 'Szeptember', 'Október', 'November', 'December']
Írjon egy kis programot, ami egy új t3 listáthoz létre. Ennek felváltva kell tartalmazni a két lista minden elemét úgy, hogy minden hónap nevét követnie kell a
megfelelő napok számának: ['Január',31,'Február',28,'Március',31, stb...].
5.12. x
Írjon egy programot, ami kiíratja egy lista összes elemét. Ha például a fenti gyakorlat
t2 listájára alkalmaznánk, akkor a következőt kellene kapnunk:
Január Február Március Április Május Június Július Augusztus Szeptember Október November December
5.13. x
Írjon egy programot, ami megkeresi egy adott lista legnagyobb elemét. Például, ha a
[32,5, 12, 8, 3, 75, 2, 15], listára alkalmaznánk, akkor a következőt kellene kiírnia :
a lista legnagyobb elemének az értéke 75.
5.14. x
Írjon egy programot, ami megvizsgálja egy számlista minden elemét
(például az előzőpélda listáját) azért, hogy két új listát hozzon
létre. Az egyik csak az eredeti lista páros számait tartalmazza, a másik
a páratlanokat. Például, ha a kiindulási lista az előző gyakorlatlistája, akkor a
programnak egy páros listát kell létrehoznia, ami a [32, 12, 8, 2]-t tartalmazza
és egy páratlan listát ami [5, 3, 75, 15]-t tartalmazza.
Trükk: Gondoljon az előzőekben említett modulo (%) operátor használatára!
5.15. x
Írjon egy programot, ami egy szavakból álló lista elemeit egyenként megvizsgálja azért,
hogy két új listát hozzon létre. (például: ['Jean', 'Maximilien', 'Brigitte', 'Sonia', 'JeanPierre','Sandra']
Az egyikben 6 karakternél rövidebb szavakat legyenek, a másikban 6, vagy annáltöbb karaktert tartalmazzonó szavak legyenek.
'''
print ("5.11.")
t1 = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
t2 = ['Januar', 'Februar', 'Marcius', 'Aprilis', 'Majus', 'Junius', 'Julius', 'Augusztus', 'Szeptember', 'Oktober', 'November', 'December']
t3=[]
for i in range(len(t1)): #ilyet lehet!!
t3.append(t1[i]) #hozzáadok egy elemet a listához
t3.append(t2[i])
print t3
print '\n'
print ("5.12.")
for i in range(len(t2)):
print t2[i],
print '\n'
print ("5.13.")
max=t1[0]
for i in range(len(t1)):
if (t1[i]>max):
max=t1[i]
print max
print '\n'
print ("5.14.")
t1=[1,2,3,4,4,5,6,7,7,8,9]
t2=[]
t3=[]
for i in range(len(t1)): #ilyet lehet!!
if (t1[i]%2==0): #ha ps
t2.append(t1[i]) #hozzáadom az elemet a ps listához
else:
t3.append(t1[i]) #hozzáadom az elemet a pt listához
print t2
print t3
print '\n'
print ("5.15.")
t1=['Jean', 'Maximilien', 'Brigitte', 'Sonia', 'JeanPierre','Sandra'] #lista
t2=[] #6 karakternel rovidebb szavak listaja
t3=[] #6 karakternel hoszabb szavak listaja
for i in range(len(t1)): #vegigmegyek a lista elemein
if (len(t1[i])<6): #ha az i. elem hossza ps
t2.append(t1[i])
else:
t3.append(t1[i])
print t2
print t3 | [
1,
529,
9507,
29958,
21891,
29899,
4691,
29899,
6207,
29914,
21891,
29899,
4691,
29899,
6207,
29914,
4691,
29918,
1927,
557,
272,
3333,
29941,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
29965,
13264,
29899,
29947,
448,
29930,
29899,
13,
12008,
13,
29954,
29891,
557,
272,
5066,
554,
584,
13,
29945,
29889,
29896,
29896,
29889,
462,
259,
921,
13,
29931,
11125,
264,
1416,
594,
1501,
557,
263,
24100,
446,
9357,
1051,
4985,
29901,
13,
29873,
29896,
353,
518,
29941,
29896,
29892,
29871,
29906,
29947,
29892,
29871,
29941,
29896,
29892,
29871,
29941,
29900,
29892,
29871,
29941,
29896,
29892,
29871,
29941,
29900,
29892,
29871,
29941,
29896,
29892,
29871,
29941,
29896,
29892,
29871,
29941,
29900,
29892,
29871,
29941,
29896,
29892,
29871,
29941,
29900,
29892,
29871,
29941,
29896,
29962,
13,
29873,
29906,
353,
6024,
29967,
15623,
3054,
742,
525,
29943,
3205,
3054,
742,
525,
29924,
3054,
16102,
742,
525,
30102,
27600,
742,
525,
29924,
15005,
375,
742,
525,
29967,
30030,
21613,
742,
12801,
5813,
29958,
742,
525,
29909,
688,
28294,
742,
525,
29903,
911,
3266,
742,
525,
29949,
23441,
742,
525,
25363,
1096,
742,
525,
6185,
1096,
2033,
13,
30175,
29878,
13022,
5524,
26187,
1824,
327,
29892,
18926,
5524,
20786,
260,
29941,
1051,
29976,
386,
2112,
301,
1893,
276,
29889,
1174,
6750,
7995,
8274,
1896,
1564,
413,
514,
13914,
284,
16986,
1240,
263,
23751,
15023,
3458,
264,
21268,
1893,
3720,
1927,
29892,
10227,
3458,
264,
298,
888,
481,
29865,
1893,
24100,
2786,
413,
514,
263,
1678,
13,
29885,
387,
1725,
280,
29880,
30048,
9709,
554,
18216,
14901,
29901,
6024,
29967,
15623,
3054,
742,
29941,
29896,
5501,
29943,
3205,
3054,
742,
29906,
29947,
5501,
29924,
3054,
16102,
742,
29941,
29896,
29892,
380,
29890,
856,
1822,
13,
13,
29945,
29889,
29896,
29906,
29889,
462,
259,
921,
13,
30175,
29878,
13022,
5524,
1824,
327,
29892,
18926,
8506,
29983,
3605,
1764,
5524,
15023,
21623,
10947,
21268,
1893,
29889,
5952,
26535,
430,
29976,
352,
263,
285,
7268,
10966,
557,
272,
5066,
29871,
13,
29873,
29906,
1051,
15005,
14684,
394,
11311,
655,
3749,
1715,
29895,
29892,
263,
6859,
272,
263,
24100,
446,
9357,
29873,
413,
514,
1600,
10494,
29876,
2960,
29901,
29871,
13,
29967,
15623,
3054,
4232,
3054,
341,
3054,
16102,
7260,
27600,
341,
15005,
375,
435,
30030,
21613,
435,
30030,
19646,
22333,
28294,
317,
911,
3266,
438,
23441,
3979,
5846,
13,
13,
29945,
29889,
29896,
29941,
29889,
462,
259,
921,
13,
30175,
29878,
13022,
5524,
1824,
327,
29892,
18926,
4508,
3946,
10100,
5524,
594,
1501,
15023,
2814,
29876,
6485,
20838,
21268,
1893,
29889,
349,
29948,
430,
29976,
352,
29892,
447,
263,
29871,
13,
29961,
29941,
29906,
29892,
29945,
29892,
29871,
29896,
29906,
29892,
29871,
29947,
29892,
29871,
29941,
29892,
29871,
29955,
29945,
29892,
29871,
29906,
29892,
29871,
29896,
29945,
1402,
1051,
14684,
394,
11311,
655,
3749,
1715,
29895,
29892,
263,
6859,
272,
263,
24100,
446,
9357,
29873,
413,
514,
1600,
8506,
10687,
3915,
584,
13,
29874,
15023,
2814,
29876,
6485,
20838,
21268,
20242,
2698,
904,
2273,
29948,
446,
29871,
29955,
29945,
29889,
13,
13,
29945,
29889,
29896,
29946,
29889,
462,
259,
921,
13,
30175,
29878,
13022,
259,
5524,
259,
1824,
327,
29892,
259,
18926,
259,
4508,
29894,
466,
5311,
2464,
1764,
259,
5524,
259,
2268,
29976,
828,
2079,
259,
3458,
264,
259,
21268,
1893,
1678,
13,
29898,
29886,
29948,
430,
29976,
352,
259,
2698,
259,
14427,
9357,
29886,
29948,
430,
29874,
259,
1051,
15005,
2682,
29897,
259,
2698,
15491,
29892,
259,
10227,
259,
23751,
1678,
20786,
29871,
1051,
2682,
259,
298,
2112,
6626,
1678,
13,
29880,
1893,
276,
29889,
259,
4709,
29871,
5524,
638,
259,
24519,
259,
2698,
259,
13265,
16577,
259,
15023,
259,
282,
29976,
1883,
2268,
29976,
655,
277,
13914,
284,
655,
10177,
29892,
263,
3627,
638,
29871,
13,
29874,
282,
3054,
271,
6468,
18489,
29889,
349,
29948,
430,
29976,
352,
29892,
447,
263,
8506,
513,
352,
23884,
15023,
2698,
14427,
9357,
10966,
557,
272,
5066,
1761,
22748,
29892,
29871,
263,
6859,
272,
263,
29871,
13,
8860,
8546,
29871,
5524,
29871,
282,
29976,
1883,
1051,
2682,
29871,
413,
514,
301,
1893,
276,
1251,
3749,
423,
29892,
29871,
18926,
263,
518,
29941,
29906,
29892,
29871,
29896,
29906,
29892,
29871,
29947,
29892,
29871,
29906,
29962,
29899,
30191,
29873,
13914,
284,
655,
10177,
29871,
13,
743,
5524,
282,
3054,
271,
6468,
1051,
2682,
18926,
518,
29945,
29892,
29871,
29941,
29892,
29871,
29955,
29945,
29892,
29871,
29896,
29945,
29962,
29899,
30191,
29873,
13914,
284,
655,
10177,
29889,
29871,
13,
2308,
29993,
6859,
29901,
402,
898,
324,
13022,
2698,
14427,
9357,
1416,
1785,
321,
828,
28242,
878,
7207,
313,
10997,
1751,
2682,
272,
756,
3749,
2464,
271,
14684,
29991,
13,
13,
29945,
29889,
29896,
29945,
29889,
462,
259,
921,
13,
30175,
29878,
13022,
5524,
1824,
327,
29892,
18926,
5524,
2268,
485,
557,
26976,
13575,
29980,
15023,
4552,
1004,
277,
5524,
5842,
29463,
4508,
29894,
466,
5311,
2464,
1764,
2698,
15491,
29892,
13,
29882,
6933,
23751,
29871,
20786,
1051,
2682,
298,
2112,
6626,
301,
1893,
276,
29889,
313,
29886,
29948,
430,
29976,
352,
29901,
6024,
22438,
742,
525,
7976,
326,
309,
819,
742,
525,
29933,
8966,
5388,
742,
525,
29903,
6405,
742,
525,
22438,
30191,
19621,
3788,
29903,
10738,
2033,
29871,
13,
16748,
5524,
638,
1785,
29871,
29953,
10856,
557,
725,
3610,
364,
14532,
680,
1327,
2268,
485,
557,
271,
454,
1927,
264,
1416,
29892,
263,
3627,
638,
2571,
29871,
29953,
29892,
17023,
2889,
18507,
29997,
1327,
10856,
14266,
29873,
13914,
284,
655,
5617,
265,
29980,
2268,
485,
557,
454,
1927,
264,
1416,
29889,
13,
12008,
13,
13,
13,
13,
2158,
4852,
29945,
29889,
29896,
29896,
23157,
13,
29873,
29896,
353,
518,
29941,
29896,
29892,
29871,
29906,
29947,
29892,
29871,
29941,
29896,
29892,
29871,
29941,
29900,
29892,
29871,
29941,
29896,
29892,
29871,
29941,
29900,
29892,
29871,
29941,
29896,
29892,
29871,
29941,
29896,
29892,
29871,
29941,
29900,
29892,
29871,
29941,
29896,
29892,
29871,
29941,
29900,
29892,
29871,
29941,
29896,
29962,
13,
29873,
29906,
353,
6024,
29967,
15623,
279,
742,
525,
29943,
3205,
279,
742,
525,
7083,
16102,
742,
525,
29909,
27600,
742,
525,
29924,
1175,
375,
742,
525,
29967,
348,
2482,
742,
525,
27501,
2482,
742,
525,
29909,
688,
28294,
742,
525,
29903,
911,
3266,
742,
525,
20434,
6264,
742,
525,
25363,
1096,
742,
525,
6185,
1096,
2033,
13,
29873,
29941,
29922,
2636,
13,
1454,
474,
297,
3464,
29898,
2435,
29898,
29873,
29896,
22164,
4706,
396,
2354,
300,
454,
9188,
6824,
13,
1678,
260,
29941,
29889,
4397,
29898,
29873,
29896,
29961,
29875,
2314,
9651,
396,
1251,
5617,
29976,
328,
554,
5524,
21268,
300,
263,
1051,
29976,
19362,
13,
1678,
260,
29941,
29889,
4397,
29898,
29873,
29906,
29961,
29875,
2314,
13,
2158,
260,
29941,
13,
2158,
11297,
29876,
29915,
13,
13,
13,
13,
2158,
4852,
29945,
29889,
29896,
29906,
23157,
13,
1454,
474,
297,
3464,
29898,
2435,
29898,
29873,
29906,
22164,
13,
1678,
1596,
260,
29906,
29961,
29875,
1402,
13,
2158,
11297,
29876,
29915,
13,
13,
13,
13,
2158,
4852,
29945,
29889,
29896,
29941,
23157,
13,
3317,
29922,
29873,
29896,
29961,
29900,
29962,
13,
1454,
474,
297,
3464,
29898,
2435,
29898,
29873,
29896,
22164,
13,
1678,
565,
313,
29873,
29896,
29961,
29875,
29962,
29958,
3317,
1125,
13,
4706,
4236,
29922,
29873,
29896,
29961,
29875,
29962,
13,
2158,
4236,
13,
2158,
11297,
29876,
29915,
13,
13,
13,
13,
2158,
4852,
29945,
29889,
29896,
29946,
23157,
13,
29873,
29896,
11759,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
29892,
29946,
29892,
29945,
29892,
29953,
29892,
29955,
29892,
29955,
29892,
29947,
29892,
29929,
29962,
13,
29873,
29906,
29922,
2636,
13,
29873,
29941,
29922,
2636,
13,
1454,
474,
297,
3464,
29898,
2435,
29898,
29873,
29896,
22164,
4706,
396,
2354,
300,
454,
9188,
6824,
13,
1678,
565,
313,
29873,
29896,
29961,
29875,
29962,
29995,
29906,
1360,
29900,
1125,
18884,
396,
2350,
6529,
13,
4706,
260,
29906,
29889,
4397,
29898,
29873,
29896,
29961,
29875,
2314,
9651,
396,
1251,
5617,
29976,
328,
290,
2698,
21268,
300,
263,
6529,
1051,
29976,
19362,
13,
1678,
1683,
29901,
13,
4706,
260,
29941,
29889,
4397,
29898,
29873,
29896,
29961,
29875,
2314,
9651,
396,
1251,
5617,
29976,
328,
290,
2698,
21268,
300,
263,
19592,
1051,
29976,
19362,
13,
2158,
260,
29906,
13,
2158,
260,
29941,
13,
2158,
11297,
29876,
29915,
13,
13,
13,
13,
2158,
4852,
29945,
29889,
29896,
29945,
23157,
13,
29873,
29896,
29922,
1839,
22438,
742,
525,
7976,
326,
309,
819,
742,
525,
29933,
8966,
5388,
742,
525,
29903,
6405,
742,
525,
22438,
30191,
19621,
3788,
29903,
10738,
2033,
418,
396,
19641,
13,
29873,
29906,
29922,
2636,
539,
396,
29953,
10856,
557,
725,
295,
696,
29894,
680,
1327,
2268,
485,
557,
1051,
9919,
13,
29873,
29941,
29922,
2636,
539,
396,
29953,
10856,
557,
725,
295,
298,
13165,
8846,
2268,
485,
557,
1051,
9919,
13,
1454,
474,
297,
3464,
29898,
2435,
29898,
29873,
29896,
22164,
4706,
396,
29122,
335,
29885,
11125,
1416,
263,
15023,
4552,
1004,
262,
13,
268,
13,
1678,
565,
313,
2435,
29898,
29873,
29896,
29961,
29875,
2314,
29966,
29953,
1125,
539,
396,
2350,
2698,
474,
29889,
21268,
298,
2209,
1362,
6529,
13,
4706,
260,
29906,
29889,
4397,
29898,
29873,
29896,
29961,
29875,
2314,
13,
1678,
1683,
29901,
13,
4706,
260,
29941,
29889,
4397,
29898,
29873,
29896,
29961,
29875,
2314,
13,
13,
2158,
260,
29906,
13,
2158,
260,
29941,
2
] |
lumos/models/__init__.py | numagic/lumos | 1 | 1604281 | from lumos.models.composition import ModelMaker
from lumos.models.simple_vehicle_on_track import SimpleVehicleOnTrack
from lumos.models.tires.pacejka import MF52
from lumos.models.tires.perantoni import PerantoniTire
from lumos.models.vehicles.simple_vehicle import SimpleVehicle
from lumos.models.kinematics import TrackPosition2D
from lumos.models.aero.aero import ConstAero, GPAero, MLPAero
ModelMaker.add_to_registry(MF52)
ModelMaker.add_to_registry(PerantoniTire)
ModelMaker.add_to_registry(SimpleVehicle)
ModelMaker.add_to_registry(TrackPosition2D)
ModelMaker.add_to_registry(SimpleVehicleOnTrack)
ModelMaker.add_to_registry(ConstAero)
ModelMaker.add_to_registry(GPAero)
ModelMaker.add_to_registry(MLPAero)
| [
1,
515,
19703,
359,
29889,
9794,
29889,
510,
3283,
1053,
8125,
29924,
5790,
13,
3166,
19703,
359,
29889,
9794,
29889,
12857,
29918,
345,
29882,
2512,
29918,
265,
29918,
11294,
1053,
12545,
29963,
14797,
2512,
2951,
17936,
13,
3166,
19703,
359,
29889,
9794,
29889,
29873,
2658,
29889,
3535,
29926,
1335,
1053,
341,
29943,
29945,
29906,
13,
3166,
19703,
359,
29889,
9794,
29889,
29873,
2658,
29889,
546,
424,
5271,
1053,
2431,
424,
5271,
29911,
533,
13,
3166,
19703,
359,
29889,
9794,
29889,
345,
29882,
4027,
29889,
12857,
29918,
345,
29882,
2512,
1053,
12545,
29963,
14797,
2512,
13,
3166,
19703,
359,
29889,
9794,
29889,
9089,
4579,
1199,
1053,
17026,
8003,
29906,
29928,
13,
3166,
19703,
359,
29889,
9794,
29889,
29874,
1489,
29889,
29874,
1489,
1053,
5798,
29909,
1489,
29892,
402,
7228,
1489,
29892,
23158,
7228,
1489,
13,
13,
3195,
29924,
5790,
29889,
1202,
29918,
517,
29918,
1727,
6020,
29898,
29924,
29943,
29945,
29906,
29897,
13,
3195,
29924,
5790,
29889,
1202,
29918,
517,
29918,
1727,
6020,
29898,
5894,
424,
5271,
29911,
533,
29897,
13,
13,
3195,
29924,
5790,
29889,
1202,
29918,
517,
29918,
1727,
6020,
29898,
15427,
29963,
14797,
2512,
29897,
13,
3195,
29924,
5790,
29889,
1202,
29918,
517,
29918,
1727,
6020,
29898,
17936,
8003,
29906,
29928,
29897,
13,
3195,
29924,
5790,
29889,
1202,
29918,
517,
29918,
1727,
6020,
29898,
15427,
29963,
14797,
2512,
2951,
17936,
29897,
13,
13,
3195,
29924,
5790,
29889,
1202,
29918,
517,
29918,
1727,
6020,
29898,
12075,
29909,
1489,
29897,
13,
3195,
29924,
5790,
29889,
1202,
29918,
517,
29918,
1727,
6020,
29898,
29954,
7228,
1489,
29897,
13,
3195,
29924,
5790,
29889,
1202,
29918,
517,
29918,
1727,
6020,
29898,
1988,
7228,
1489,
29897,
13,
2
] |
django_comments_xtd/apps.py | dlrsp-dev/django-comments-xtd | 0 | 93025 | from django.apps import AppConfig
from django.db.models.signals import pre_save
class CommentsXtdConfig(AppConfig):
default_auto_field = 'django.db.models.AutoField'
name = 'django_comments_xtd'
verbose_name = 'Comments Xtd'
def ready(self):
from django_comments_xtd import get_model
from django_comments_xtd.models import publish_or_unpublish_on_pre_save
model_app_label = get_model()._meta.label
pre_save.connect(publish_or_unpublish_on_pre_save,
sender=model_app_label)
| [
1,
515,
9557,
29889,
13371,
1053,
2401,
3991,
13,
3166,
9557,
29889,
2585,
29889,
9794,
29889,
4530,
1338,
1053,
758,
29918,
7620,
13,
13,
13,
1990,
461,
29879,
29990,
1594,
3991,
29898,
2052,
3991,
1125,
13,
1678,
2322,
29918,
6921,
29918,
2671,
353,
525,
14095,
29889,
2585,
29889,
9794,
29889,
12300,
3073,
29915,
13,
1678,
1024,
353,
525,
14095,
29918,
21032,
29918,
486,
29881,
29915,
13,
1678,
26952,
29918,
978,
353,
525,
1523,
1860,
1060,
1594,
29915,
13,
13,
1678,
822,
7960,
29898,
1311,
1125,
13,
4706,
515,
9557,
29918,
21032,
29918,
486,
29881,
1053,
679,
29918,
4299,
13,
4706,
515,
9557,
29918,
21032,
29918,
486,
29881,
29889,
9794,
1053,
9805,
29918,
272,
29918,
348,
23679,
29918,
265,
29918,
1457,
29918,
7620,
13,
13,
4706,
1904,
29918,
932,
29918,
1643,
353,
679,
29918,
4299,
2141,
29918,
7299,
29889,
1643,
13,
4706,
758,
29918,
7620,
29889,
6915,
29898,
23679,
29918,
272,
29918,
348,
23679,
29918,
265,
29918,
1457,
29918,
7620,
29892,
13,
462,
308,
10004,
29922,
4299,
29918,
932,
29918,
1643,
29897,
13,
2
] |
FaceLandmarking.LearningProcess/readers/regressor_example_reader.py | TomaszRewak/FaceLandmarking | 78 | 26174 | import csv
def read_regressor_examples(num_of_features, num_of_decisions, file_path):
xs = []
ys = []
with open(file_path, mode='r', encoding='utf-8') as file:
reader = csv.reader(file, delimiter=' ')
for row in reader:
x = [float(value) for value in row[0 : num_of_features]]
y = [float(value) for value in row[num_of_features : num_of_features + num_of_decisions]]
xs.append(x)
ys.append(y)
return {
'x': xs,
'y': ys
}
| [
1,
1053,
11799,
13,
13,
13,
1753,
1303,
29918,
276,
3663,
272,
29918,
19057,
29898,
1949,
29918,
974,
29918,
22100,
29892,
954,
29918,
974,
29918,
311,
3476,
1080,
29892,
934,
29918,
2084,
1125,
13,
1678,
14492,
353,
5159,
13,
1678,
343,
29879,
353,
5159,
13,
13,
1678,
411,
1722,
29898,
1445,
29918,
2084,
29892,
4464,
2433,
29878,
742,
8025,
2433,
9420,
29899,
29947,
1495,
408,
934,
29901,
13,
4706,
9591,
353,
11799,
29889,
16950,
29898,
1445,
29892,
28552,
2433,
25710,
13,
13,
4706,
363,
1948,
297,
9591,
29901,
13,
9651,
921,
353,
518,
7411,
29898,
1767,
29897,
363,
995,
297,
1948,
29961,
29900,
584,
954,
29918,
974,
29918,
22100,
5262,
13,
9651,
343,
353,
518,
7411,
29898,
1767,
29897,
363,
995,
297,
1948,
29961,
1949,
29918,
974,
29918,
22100,
584,
954,
29918,
974,
29918,
22100,
718,
954,
29918,
974,
29918,
311,
3476,
1080,
5262,
13,
13,
9651,
14492,
29889,
4397,
29898,
29916,
29897,
13,
9651,
343,
29879,
29889,
4397,
29898,
29891,
29897,
13,
13,
1678,
736,
426,
13,
4706,
525,
29916,
2396,
14492,
29892,
13,
4706,
525,
29891,
2396,
343,
29879,
13,
1678,
500,
13,
2
] |
tests/unit_tests/test_tethys_services/test_models/test_SpatialDatasetService.py | ezrajrice/tethys | 79 | 76434 | from tethys_sdk.testing import TethysTestCase
import tethys_services.models as service_model
from unittest import mock
class SpatialDatasetServiceTests(TethysTestCase):
def set_up(self):
pass
def tear_down(self):
pass
def test__str__(self):
sds = service_model.SpatialDatasetService(
name='test_sds',
)
self.assertEqual('test_sds', sds.__str__())
@mock.patch('tethys_services.models.GeoServerSpatialDatasetEngine')
def test_get_engine_geo_server(self, mock_sds):
sds = service_model.SpatialDatasetService(
name='test_sds',
engine=service_model.SpatialDatasetService.GEOSERVER,
endpoint='http://localhost/geoserver/rest/',
public_endpoint='http://publichost/geoserver/rest/',
username='foo',
password='password'
)
sds.save()
ret = sds.get_engine()
# Check result
mock_sds.assert_called_with(endpoint='http://localhost/geoserver/rest/', password='password', username='foo')
self.assertEqual('http://publichost/geoserver/rest/', ret.public_endpoint)
@mock.patch('tethys_services.models.TDSCatalog')
@mock.patch('tethys_services.models.session_manager')
def test_get_engine_thredds(self, mock_session_manager, mock_TDSCatalog):
sds = service_model.SpatialDatasetService(
name='test_sds',
engine=service_model.SpatialDatasetService.THREDDS,
endpoint='http://localhost/thredds/',
public_endpoint='http://publichost/thredds/',
username='foo',
password='password'
)
sds.save()
ret = sds.get_engine()
mock_session_manager.set_session_options.assert_called_with(auth=('foo', 'password'))
mock_TDSCatalog.assert_called_with('http://localhost/thredds/catalog.xml')
# Check result
self.assertEqual(mock_TDSCatalog(), ret)
@mock.patch('tethys_services.models.TDSCatalog')
@mock.patch('tethys_services.models.session_manager')
def test_get_engine_thredds_no_trailing_slashes(self, mock_session_manager, mock_TDSCatalog):
sds = service_model.SpatialDatasetService(
name='test_sds',
engine=service_model.SpatialDatasetService.THREDDS,
endpoint='http://localhost/thredds',
public_endpoint='http://publichost/thredds',
username='foo',
password='password'
)
sds.save()
ret = sds.get_engine()
mock_session_manager.set_session_options.assert_called_with(auth=('foo', 'password'))
mock_TDSCatalog.assert_called_with('http://localhost/thredds/catalog.xml')
# Check result
self.assertEqual(mock_TDSCatalog(), ret)
@mock.patch('tethys_services.models.TDSCatalog')
@mock.patch('tethys_services.models.session_manager')
def test_get_engine_thredds_no_username_password(self, mock_session_manager, mock_TDSCatalog):
sds = service_model.SpatialDatasetService(
name='test_sds',
engine=service_model.SpatialDatasetService.THREDDS,
endpoint='http://localhost/thredds',
public_endpoint='http://publichost/thredds',
)
sds.save()
ret = sds.get_engine()
mock_session_manager.set_session_options.assert_not_called()
mock_TDSCatalog.assert_called_with('http://localhost/thredds/catalog.xml')
# Check result
self.assertEqual(mock_TDSCatalog(), ret)
| [
1,
515,
260,
621,
952,
29918,
15348,
29889,
13424,
1053,
323,
621,
952,
3057,
8259,
13,
5215,
260,
621,
952,
29918,
9916,
29889,
9794,
408,
2669,
29918,
4299,
13,
3166,
443,
27958,
1053,
11187,
13,
13,
13,
1990,
1706,
15238,
16390,
24541,
3170,
24376,
29898,
29911,
621,
952,
3057,
8259,
1125,
13,
1678,
822,
731,
29918,
786,
29898,
1311,
1125,
13,
4706,
1209,
13,
13,
1678,
822,
734,
279,
29918,
3204,
29898,
1311,
1125,
13,
4706,
1209,
13,
13,
1678,
822,
1243,
1649,
710,
12035,
1311,
1125,
13,
4706,
269,
6289,
353,
2669,
29918,
4299,
29889,
29903,
5031,
616,
16390,
24541,
3170,
29898,
13,
9651,
1024,
2433,
1688,
29918,
4928,
29879,
742,
13,
4706,
1723,
13,
4706,
1583,
29889,
9294,
9843,
877,
1688,
29918,
4928,
29879,
742,
269,
6289,
17255,
710,
1649,
3101,
13,
13,
1678,
732,
17640,
29889,
5041,
877,
29873,
621,
952,
29918,
9916,
29889,
9794,
29889,
7999,
29877,
6004,
29903,
5031,
616,
16390,
24541,
12412,
1495,
13,
1678,
822,
1243,
29918,
657,
29918,
10599,
29918,
24756,
29918,
2974,
29898,
1311,
29892,
11187,
29918,
4928,
29879,
1125,
13,
4706,
269,
6289,
353,
2669,
29918,
4299,
29889,
29903,
5031,
616,
16390,
24541,
3170,
29898,
13,
9651,
1024,
2433,
1688,
29918,
4928,
29879,
742,
13,
9651,
6012,
29922,
5509,
29918,
4299,
29889,
29903,
5031,
616,
16390,
24541,
3170,
29889,
1692,
3267,
1001,
5348,
29892,
13,
9651,
16248,
2433,
1124,
597,
7640,
29914,
479,
22969,
369,
29914,
5060,
29914,
742,
13,
9651,
970,
29918,
29734,
2433,
1124,
597,
5467,
1470,
520,
29914,
479,
22969,
369,
29914,
5060,
29914,
742,
13,
9651,
8952,
2433,
5431,
742,
13,
9651,
4800,
2433,
5630,
29915,
13,
4706,
1723,
13,
4706,
269,
6289,
29889,
7620,
580,
13,
4706,
3240,
353,
269,
6289,
29889,
657,
29918,
10599,
580,
13,
13,
4706,
396,
5399,
1121,
13,
4706,
11187,
29918,
4928,
29879,
29889,
9294,
29918,
13998,
29918,
2541,
29898,
29734,
2433,
1124,
597,
7640,
29914,
479,
22969,
369,
29914,
5060,
29914,
742,
4800,
2433,
5630,
742,
8952,
2433,
5431,
1495,
13,
4706,
1583,
29889,
9294,
9843,
877,
1124,
597,
5467,
1470,
520,
29914,
479,
22969,
369,
29914,
5060,
29914,
742,
3240,
29889,
3597,
29918,
29734,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
877,
29873,
621,
952,
29918,
9916,
29889,
9794,
29889,
24495,
7187,
3968,
1495,
13,
1678,
732,
17640,
29889,
5041,
877,
29873,
621,
952,
29918,
9916,
29889,
9794,
29889,
7924,
29918,
12847,
1495,
13,
1678,
822,
1243,
29918,
657,
29918,
10599,
29918,
386,
1127,
6289,
29898,
1311,
29892,
11187,
29918,
7924,
29918,
12847,
29892,
11187,
29918,
24495,
7187,
3968,
1125,
13,
4706,
269,
6289,
353,
2669,
29918,
4299,
29889,
29903,
5031,
616,
16390,
24541,
3170,
29898,
13,
9651,
1024,
2433,
1688,
29918,
4928,
29879,
742,
13,
9651,
6012,
29922,
5509,
29918,
4299,
29889,
29903,
5031,
616,
16390,
24541,
3170,
29889,
4690,
1525,
7858,
29903,
29892,
13,
9651,
16248,
2433,
1124,
597,
7640,
29914,
386,
1127,
6289,
29914,
742,
13,
9651,
970,
29918,
29734,
2433,
1124,
597,
5467,
1470,
520,
29914,
386,
1127,
6289,
29914,
742,
13,
9651,
8952,
2433,
5431,
742,
13,
9651,
4800,
2433,
5630,
29915,
13,
4706,
1723,
13,
4706,
269,
6289,
29889,
7620,
580,
13,
4706,
3240,
353,
269,
6289,
29889,
657,
29918,
10599,
580,
13,
13,
4706,
11187,
29918,
7924,
29918,
12847,
29889,
842,
29918,
7924,
29918,
6768,
29889,
9294,
29918,
13998,
29918,
2541,
29898,
5150,
29922,
877,
5431,
742,
525,
5630,
8785,
13,
4706,
11187,
29918,
24495,
7187,
3968,
29889,
9294,
29918,
13998,
29918,
2541,
877,
1124,
597,
7640,
29914,
386,
1127,
6289,
29914,
28045,
29889,
3134,
1495,
13,
13,
4706,
396,
5399,
1121,
13,
4706,
1583,
29889,
9294,
9843,
29898,
17640,
29918,
24495,
7187,
3968,
3285,
3240,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
877,
29873,
621,
952,
29918,
9916,
29889,
9794,
29889,
24495,
7187,
3968,
1495,
13,
1678,
732,
17640,
29889,
5041,
877,
29873,
621,
952,
29918,
9916,
29889,
9794,
29889,
7924,
29918,
12847,
1495,
13,
1678,
822,
1243,
29918,
657,
29918,
10599,
29918,
386,
1127,
6289,
29918,
1217,
29918,
3018,
6504,
29918,
17057,
267,
29898,
1311,
29892,
11187,
29918,
7924,
29918,
12847,
29892,
11187,
29918,
24495,
7187,
3968,
1125,
13,
4706,
269,
6289,
353,
2669,
29918,
4299,
29889,
29903,
5031,
616,
16390,
24541,
3170,
29898,
13,
9651,
1024,
2433,
1688,
29918,
4928,
29879,
742,
13,
9651,
6012,
29922,
5509,
29918,
4299,
29889,
29903,
5031,
616,
16390,
24541,
3170,
29889,
4690,
1525,
7858,
29903,
29892,
13,
9651,
16248,
2433,
1124,
597,
7640,
29914,
386,
1127,
6289,
742,
13,
9651,
970,
29918,
29734,
2433,
1124,
597,
5467,
1470,
520,
29914,
386,
1127,
6289,
742,
13,
9651,
8952,
2433,
5431,
742,
13,
9651,
4800,
2433,
5630,
29915,
13,
4706,
1723,
13,
4706,
269,
6289,
29889,
7620,
580,
13,
4706,
3240,
353,
269,
6289,
29889,
657,
29918,
10599,
580,
13,
13,
4706,
11187,
29918,
7924,
29918,
12847,
29889,
842,
29918,
7924,
29918,
6768,
29889,
9294,
29918,
13998,
29918,
2541,
29898,
5150,
29922,
877,
5431,
742,
525,
5630,
8785,
13,
4706,
11187,
29918,
24495,
7187,
3968,
29889,
9294,
29918,
13998,
29918,
2541,
877,
1124,
597,
7640,
29914,
386,
1127,
6289,
29914,
28045,
29889,
3134,
1495,
13,
13,
4706,
396,
5399,
1121,
13,
4706,
1583,
29889,
9294,
9843,
29898,
17640,
29918,
24495,
7187,
3968,
3285,
3240,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
877,
29873,
621,
952,
29918,
9916,
29889,
9794,
29889,
24495,
7187,
3968,
1495,
13,
1678,
732,
17640,
29889,
5041,
877,
29873,
621,
952,
29918,
9916,
29889,
9794,
29889,
7924,
29918,
12847,
1495,
13,
1678,
822,
1243,
29918,
657,
29918,
10599,
29918,
386,
1127,
6289,
29918,
1217,
29918,
6786,
29918,
5630,
29898,
1311,
29892,
11187,
29918,
7924,
29918,
12847,
29892,
11187,
29918,
24495,
7187,
3968,
1125,
13,
4706,
269,
6289,
353,
2669,
29918,
4299,
29889,
29903,
5031,
616,
16390,
24541,
3170,
29898,
13,
9651,
1024,
2433,
1688,
29918,
4928,
29879,
742,
13,
9651,
6012,
29922,
5509,
29918,
4299,
29889,
29903,
5031,
616,
16390,
24541,
3170,
29889,
4690,
1525,
7858,
29903,
29892,
13,
9651,
16248,
2433,
1124,
597,
7640,
29914,
386,
1127,
6289,
742,
13,
9651,
970,
29918,
29734,
2433,
1124,
597,
5467,
1470,
520,
29914,
386,
1127,
6289,
742,
13,
4706,
1723,
13,
4706,
269,
6289,
29889,
7620,
580,
13,
4706,
3240,
353,
269,
6289,
29889,
657,
29918,
10599,
580,
13,
13,
4706,
11187,
29918,
7924,
29918,
12847,
29889,
842,
29918,
7924,
29918,
6768,
29889,
9294,
29918,
1333,
29918,
13998,
580,
13,
4706,
11187,
29918,
24495,
7187,
3968,
29889,
9294,
29918,
13998,
29918,
2541,
877,
1124,
597,
7640,
29914,
386,
1127,
6289,
29914,
28045,
29889,
3134,
1495,
13,
13,
4706,
396,
5399,
1121,
13,
4706,
1583,
29889,
9294,
9843,
29898,
17640,
29918,
24495,
7187,
3968,
3285,
3240,
29897,
13,
2
] |
abc191/C.py | Vermee81/practice-coding-contests | 0 | 91183 | H, W = map(int, input().split())
field = [[str(i) for i in input()] for _ in range(H)]
count = 0
for x in range(W-1):
for y in range(H-1):
black_num = 0
for x1, y1 in [(x, y), (x+1, y), (x, y+1), (x+1, y+1)]:
if field[y1][x1] == '#':
black_num += 1
if black_num % 2 == 1:
count += 1
print(count)
| [
1,
379,
29892,
399,
353,
2910,
29898,
524,
29892,
1881,
2141,
5451,
3101,
13,
2671,
353,
5519,
710,
29898,
29875,
29897,
363,
474,
297,
1881,
580,
29962,
363,
903,
297,
3464,
29898,
29950,
4638,
13,
2798,
353,
29871,
29900,
13,
1454,
921,
297,
3464,
29898,
29956,
29899,
29896,
1125,
13,
1678,
363,
343,
297,
3464,
29898,
29950,
29899,
29896,
1125,
13,
4706,
4628,
29918,
1949,
353,
29871,
29900,
13,
4706,
363,
921,
29896,
29892,
343,
29896,
297,
17288,
29916,
29892,
343,
511,
313,
29916,
29974,
29896,
29892,
343,
511,
313,
29916,
29892,
343,
29974,
29896,
511,
313,
29916,
29974,
29896,
29892,
343,
29974,
29896,
4638,
29901,
13,
9651,
565,
1746,
29961,
29891,
29896,
3816,
29916,
29896,
29962,
1275,
16321,
2396,
13,
18884,
4628,
29918,
1949,
4619,
29871,
29896,
13,
4706,
565,
4628,
29918,
1949,
1273,
29871,
29906,
1275,
29871,
29896,
29901,
13,
9651,
2302,
4619,
29871,
29896,
13,
2158,
29898,
2798,
29897,
13,
2
] |
auto_test_web/backend/utils/my_logger.py | AI-change-the-world/ai-apps | 2 | 79136 | <reponame>AI-change-the-world/ai-apps
import logging
from logging import INFO, getLogger
import os
from concurrent_log_handler import ConcurrentRotatingFileHandler
current_dir = os.getcwd()
log_file = current_dir + os.sep + "logs" + os.sep + 'log.txt'
logger = getLogger(__name__)
formatter_log = logging.Formatter(
'%(asctime)s - %(filename)s [line: %(lineno)d] [%(levelname)s] ----- %(message)s'
)
rotateHandler = ConcurrentRotatingFileHandler(log_file, "a", 512 * 1024, 5)
rotateHandler.setFormatter(formatter_log)
logger.addHandler(rotateHandler)
logger.setLevel(INFO) | [
1,
529,
276,
1112,
420,
29958,
23869,
29899,
3167,
29899,
1552,
29899,
11526,
29914,
1794,
29899,
13371,
13,
5215,
12183,
13,
3166,
12183,
1053,
15233,
29892,
679,
16363,
13,
5215,
2897,
13,
13,
3166,
21984,
29918,
1188,
29918,
13789,
1053,
1281,
3784,
21281,
1218,
2283,
4598,
13,
13,
3784,
29918,
3972,
353,
2897,
29889,
657,
29883,
9970,
580,
13,
1188,
29918,
1445,
353,
1857,
29918,
3972,
718,
2897,
29889,
19570,
718,
376,
20756,
29908,
718,
2897,
29889,
19570,
718,
525,
1188,
29889,
3945,
29915,
13,
13,
21707,
353,
679,
16363,
22168,
978,
1649,
29897,
13,
689,
2620,
29918,
1188,
353,
12183,
29889,
18522,
29898,
13,
1678,
14210,
29898,
294,
312,
603,
29897,
29879,
448,
1273,
29898,
9507,
29897,
29879,
518,
1220,
29901,
1273,
29898,
1915,
8154,
29897,
29881,
29962,
518,
29995,
29898,
5563,
978,
29897,
29879,
29962,
448,
807,
1273,
29898,
4906,
29897,
29879,
29915,
13,
29897,
13,
23361,
4598,
353,
1281,
3784,
21281,
1218,
2283,
4598,
29898,
1188,
29918,
1445,
29892,
376,
29874,
613,
29871,
29945,
29896,
29906,
334,
29871,
29896,
29900,
29906,
29946,
29892,
29871,
29945,
29897,
13,
23361,
4598,
29889,
842,
18522,
29898,
689,
2620,
29918,
1188,
29897,
13,
21707,
29889,
1202,
4598,
29898,
23361,
4598,
29897,
13,
21707,
29889,
842,
10108,
29898,
11690,
29897,
2
] |
services/perso/persotool.py | mkuyper/basicmac | 11 | 79695 | #!/usr/bin/env python3
# Copyright (C) 2020-2020 <NAME>. All rights reserved.
#
# This file is subject to the terms and conditions defined in file 'LICENSE',
# which is part of this source code package.
from typing import Optional
import aioserial
import asyncio
import click
import functools
from perso import PTE, PTESerialPort, PersoData, PersoDataV1
from rtlib import Eui
class PhysicalPTESerialPort(PTESerialPort):
def __init__(self, port:str, baudrate:int) -> None:
self.serial = aioserial.AioSerial(port=port, baudrate=baudrate)
def send(self, data:bytes) -> None:
self.serial.write(data)
async def recv(self) -> bytes:
return await self.serial.read_until_async(b'\0')
class BasedIntParamType(click.ParamType):
name = "integer"
def convert(self, value, param, ctx):
if isinstance(value, int):
return value
try:
return int(value, 0)
except ValueError:
self.fail(f"{value!r} is not a valid integer", param, ctx)
class EuiParamType(click.ParamType):
name = "eui"
def convert(self, value, param, ctx):
try:
return Eui(value)
except ValueError:
self.fail(f"{value!r} is not a valid EUI", param, ctx)
class AESKeyType(click.ParamType):
name = "aeskey"
def convert(self, value, param, ctx):
try:
key = bytes.fromhex(value)
except ValueError:
self.fail(f"{value!r} is not a valid AES key", param, ctx)
if len(key) != 16:
self.fail(f"AES key must have a length of 16 bytes", param, ctx)
return key
BASED_INT = BasedIntParamType()
EUI = EuiParamType()
AESKEY = AESKeyType()
def coro(f):
@functools.wraps(f)
def wrapper(*args, **kwargs):
return asyncio.run(f(*args, **kwargs))
return wrapper
@click.group()
@click.option('-p', '--port', default='/dev/ttyACM0',
help='serial port')
@click.option('-b', '--baud', type=int, default=115200,
help='baud rate')
@click.pass_context
def cli(ctx:click.Context, port:str, baud:int) -> None:
ctx.obj['pte'] = PTE(PhysicalPTESerialPort(port, baud))
@cli.command(help='Read personalization data from EEPROM')
@click.option('-o', '--offset', type=BASED_INT, default=0x0060,
help='Offset of personalization data structure in EEPROM')
@click.option('-k', '--show-keys', is_flag=True,
help='Show network and application keys')
@click.pass_context
@coro
async def pdread(ctx:click.Context, offset:int, show_keys:bool):
pte = ctx.obj['pte']
pd = PersoData.unpack(await pte.ee_read(offset, PersoData.V1_SIZE))
print(f'Hardware ID: 0x{pd.hwid:08x}')
print(f'Region ID: 0x{pd.region:08x} ({pd.region})')
print(f'Serial No: {pd.serial}')
print(f'Device EUI: {pd.deveui}')
print(f'Join EUI: {pd.joineui}')
if show_keys:
print(f'Network key: {pd.nwkkey.hex()}')
print(f'App key: {pd.appkey.hex()}')
@cli.command(help='Clear personalization data in EEPROM')
@click.option('-o', '--offset', type=BASED_INT, default=0x0060,
help='Offset of personalization data structure in EEPROM')
@click.pass_context
@coro
async def pdclear(ctx:click.Context, offset:int):
pte = ctx.obj['pte']
pd = PersoData.unpack(await pte.ee_read(offset, PersoData.V1_SIZE))
await pte.ee_write(offset, bytes(PersoData.V1_SIZE))
@cli.command(help='Write personalization data to EEPROM')
@click.option('-o', '--offset', type=BASED_INT, default=0x0060,
help='Offset of personalization data structure in EEPROM')
@click.option('--hwid', type=BASED_INT, default=0,
help='Hardware ID')
@click.option('--region', type=BASED_INT, default=0,
help='Region ID')
@click.argument('serialno', type=str)
@click.argument('deveui', type=EUI)
@click.argument('joineui', type=EUI)
@click.argument('nwkkey', type=AESKEY)
@click.argument('appkey', type=AESKEY, required=False)
@click.pass_context
@coro
async def pdwrite(ctx:click.Context, offset:int, hwid:int, region:int, serialno:str, deveui:Eui, joineui:Eui, nwkkey:bytes, appkey:Optional[bytes]):
pte = ctx.obj['pte']
if appkey is None:
appkey = nwkkey
await pte.ee_write(offset, PersoDataV1(hwid, region, serialno, deveui, joineui, nwkkey, appkey).pack())
if __name__ == '__main__':
cli(obj={})
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29906,
29900,
29899,
29906,
29900,
29906,
29900,
529,
5813,
15513,
2178,
10462,
21676,
29889,
13,
29937,
13,
29937,
910,
934,
338,
4967,
304,
278,
4958,
322,
5855,
3342,
297,
934,
525,
27888,
1430,
1660,
742,
13,
29937,
607,
338,
760,
310,
445,
2752,
775,
3577,
29889,
13,
13,
3166,
19229,
1053,
28379,
13,
13,
5215,
263,
2363,
261,
616,
13,
5215,
408,
948,
3934,
13,
5215,
2828,
13,
5215,
2090,
312,
8789,
13,
13,
3166,
3736,
29877,
1053,
349,
4330,
29892,
349,
4330,
9125,
2290,
29892,
9034,
29877,
1469,
29892,
9034,
29877,
1469,
29963,
29896,
13,
3166,
364,
29873,
1982,
1053,
382,
1481,
13,
13,
1990,
11661,
936,
29925,
4330,
9125,
2290,
29898,
29925,
4330,
9125,
2290,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2011,
29901,
710,
29892,
9922,
566,
10492,
29901,
524,
29897,
1599,
6213,
29901,
13,
4706,
1583,
29889,
15550,
353,
263,
2363,
261,
616,
29889,
29909,
601,
9125,
29898,
637,
29922,
637,
29892,
9922,
566,
10492,
29922,
2291,
566,
10492,
29897,
13,
13,
1678,
822,
3638,
29898,
1311,
29892,
848,
29901,
13193,
29897,
1599,
6213,
29901,
13,
4706,
1583,
29889,
15550,
29889,
3539,
29898,
1272,
29897,
13,
13,
1678,
7465,
822,
1162,
29894,
29898,
1311,
29897,
1599,
6262,
29901,
13,
4706,
736,
7272,
1583,
29889,
15550,
29889,
949,
29918,
29305,
29918,
12674,
29898,
29890,
12764,
29900,
1495,
13,
13,
13,
1990,
16564,
2928,
4736,
1542,
29898,
3808,
29889,
4736,
1542,
1125,
13,
1678,
1024,
353,
376,
16031,
29908,
13,
13,
1678,
822,
3588,
29898,
1311,
29892,
995,
29892,
1828,
29892,
12893,
1125,
13,
4706,
565,
338,
8758,
29898,
1767,
29892,
938,
1125,
13,
9651,
736,
995,
13,
4706,
1018,
29901,
13,
9651,
736,
938,
29898,
1767,
29892,
29871,
29900,
29897,
13,
4706,
5174,
7865,
2392,
29901,
13,
9651,
1583,
29889,
14057,
29898,
29888,
29908,
29912,
1767,
29991,
29878,
29913,
338,
451,
263,
2854,
6043,
613,
1828,
29892,
12893,
29897,
13,
13,
1990,
382,
1481,
4736,
1542,
29898,
3808,
29889,
4736,
1542,
1125,
13,
1678,
1024,
353,
376,
29872,
1481,
29908,
13,
13,
1678,
822,
3588,
29898,
1311,
29892,
995,
29892,
1828,
29892,
12893,
1125,
13,
4706,
1018,
29901,
13,
9651,
736,
382,
1481,
29898,
1767,
29897,
13,
4706,
5174,
7865,
2392,
29901,
13,
9651,
1583,
29889,
14057,
29898,
29888,
29908,
29912,
1767,
29991,
29878,
29913,
338,
451,
263,
2854,
382,
3120,
613,
1828,
29892,
12893,
29897,
13,
13,
1990,
319,
2890,
2558,
1542,
29898,
3808,
29889,
4736,
1542,
1125,
13,
1678,
1024,
353,
376,
28628,
1989,
29908,
13,
13,
1678,
822,
3588,
29898,
1311,
29892,
995,
29892,
1828,
29892,
12893,
1125,
13,
4706,
1018,
29901,
13,
9651,
1820,
353,
6262,
29889,
3166,
20970,
29898,
1767,
29897,
13,
4706,
5174,
7865,
2392,
29901,
13,
9651,
1583,
29889,
14057,
29898,
29888,
29908,
29912,
1767,
29991,
29878,
29913,
338,
451,
263,
2854,
319,
2890,
1820,
613,
1828,
29892,
12893,
29897,
13,
4706,
565,
7431,
29898,
1989,
29897,
2804,
29871,
29896,
29953,
29901,
13,
9651,
1583,
29889,
14057,
29898,
29888,
29908,
29909,
2890,
1820,
1818,
505,
263,
3309,
310,
29871,
29896,
29953,
6262,
613,
1828,
29892,
12893,
29897,
13,
4706,
736,
1820,
13,
13,
25416,
29928,
29918,
10192,
353,
16564,
2928,
4736,
1542,
580,
13,
29923,
3120,
353,
382,
1481,
4736,
1542,
580,
13,
29909,
2890,
10818,
353,
319,
2890,
2558,
1542,
580,
13,
13,
1753,
1034,
29877,
29898,
29888,
1125,
13,
1678,
732,
7692,
312,
8789,
29889,
29893,
336,
567,
29898,
29888,
29897,
13,
1678,
822,
14476,
10456,
5085,
29892,
3579,
19290,
1125,
13,
4706,
736,
408,
948,
3934,
29889,
3389,
29898,
29888,
10456,
5085,
29892,
3579,
19290,
876,
13,
1678,
736,
14476,
13,
13,
13,
29992,
3808,
29889,
2972,
580,
13,
29992,
3808,
29889,
3385,
877,
29899,
29886,
742,
525,
489,
637,
742,
2322,
2433,
29914,
3359,
29914,
4349,
2477,
29924,
29900,
742,
13,
4706,
1371,
2433,
15550,
2011,
1495,
13,
29992,
3808,
29889,
3385,
877,
29899,
29890,
742,
525,
489,
2291,
566,
742,
1134,
29922,
524,
29892,
2322,
29922,
29896,
29896,
29945,
29906,
29900,
29900,
29892,
13,
4706,
1371,
2433,
2291,
566,
6554,
1495,
13,
29992,
3808,
29889,
3364,
29918,
4703,
13,
1753,
9335,
29898,
13073,
29901,
3808,
29889,
2677,
29892,
2011,
29901,
710,
29892,
9922,
566,
29901,
524,
29897,
1599,
6213,
29901,
13,
1678,
12893,
29889,
5415,
1839,
29886,
371,
2033,
353,
349,
4330,
29898,
25847,
936,
29925,
4330,
9125,
2290,
29898,
637,
29892,
9922,
566,
876,
13,
13,
13,
29992,
11303,
29889,
6519,
29898,
8477,
2433,
6359,
7333,
2133,
848,
515,
382,
15488,
3491,
1495,
13,
29992,
3808,
29889,
3385,
877,
29899,
29877,
742,
525,
489,
10289,
742,
1134,
29922,
25416,
29928,
29918,
10192,
29892,
2322,
29922,
29900,
29916,
29900,
29900,
29953,
29900,
29892,
13,
4706,
1371,
2433,
10302,
310,
7333,
2133,
848,
3829,
297,
382,
15488,
3491,
1495,
13,
29992,
3808,
29889,
3385,
877,
29899,
29895,
742,
525,
489,
4294,
29899,
8149,
742,
338,
29918,
15581,
29922,
5574,
29892,
13,
4706,
1371,
2433,
8964,
3564,
322,
2280,
6611,
1495,
13,
29992,
3808,
29889,
3364,
29918,
4703,
13,
29992,
2616,
29877,
13,
12674,
822,
10518,
949,
29898,
13073,
29901,
3808,
29889,
2677,
29892,
9210,
29901,
524,
29892,
1510,
29918,
8149,
29901,
11227,
1125,
13,
1678,
282,
371,
353,
12893,
29889,
5415,
1839,
29886,
371,
2033,
13,
1678,
10518,
353,
9034,
29877,
1469,
29889,
348,
4058,
29898,
20675,
282,
371,
29889,
3905,
29918,
949,
29898,
10289,
29892,
9034,
29877,
1469,
29889,
29963,
29896,
29918,
14226,
876,
13,
1678,
1596,
29898,
29888,
29915,
29950,
538,
2519,
3553,
29901,
29871,
29900,
29916,
29912,
15926,
29889,
29882,
9163,
29901,
29900,
29947,
29916,
29913,
1495,
13,
1678,
1596,
29898,
29888,
29915,
18457,
3553,
29901,
1678,
29900,
29916,
29912,
15926,
29889,
12803,
29901,
29900,
29947,
29916,
29913,
21313,
15926,
29889,
12803,
1800,
1495,
13,
1678,
1596,
29898,
29888,
29915,
9125,
1939,
29901,
259,
426,
15926,
29889,
15550,
29913,
1495,
13,
1678,
1596,
29898,
29888,
29915,
11501,
382,
3120,
29901,
29871,
426,
15926,
29889,
311,
345,
1481,
29913,
1495,
13,
1678,
1596,
29898,
29888,
29915,
17242,
382,
3120,
29901,
1678,
426,
15926,
29889,
2212,
457,
1481,
29913,
1495,
13,
1678,
565,
1510,
29918,
8149,
29901,
13,
4706,
1596,
29898,
29888,
29915,
13724,
1820,
29901,
426,
15926,
29889,
29876,
29893,
29895,
1989,
29889,
20970,
28296,
1495,
13,
4706,
1596,
29898,
29888,
29915,
2052,
1820,
29901,
268,
426,
15926,
29889,
932,
1989,
29889,
20970,
28296,
1495,
13,
13,
13,
29992,
11303,
29889,
6519,
29898,
8477,
2433,
18759,
7333,
2133,
848,
297,
382,
15488,
3491,
1495,
13,
29992,
3808,
29889,
3385,
877,
29899,
29877,
742,
525,
489,
10289,
742,
1134,
29922,
25416,
29928,
29918,
10192,
29892,
2322,
29922,
29900,
29916,
29900,
29900,
29953,
29900,
29892,
13,
4706,
1371,
2433,
10302,
310,
7333,
2133,
848,
3829,
297,
382,
15488,
3491,
1495,
13,
29992,
3808,
29889,
3364,
29918,
4703,
13,
29992,
2616,
29877,
13,
12674,
822,
10518,
8551,
29898,
13073,
29901,
3808,
29889,
2677,
29892,
9210,
29901,
524,
1125,
13,
1678,
282,
371,
353,
12893,
29889,
5415,
1839,
29886,
371,
2033,
13,
1678,
10518,
353,
9034,
29877,
1469,
29889,
348,
4058,
29898,
20675,
282,
371,
29889,
3905,
29918,
949,
29898,
10289,
29892,
9034,
29877,
1469,
29889,
29963,
29896,
29918,
14226,
876,
13,
1678,
7272,
282,
371,
29889,
3905,
29918,
3539,
29898,
10289,
29892,
6262,
29898,
15136,
29877,
1469,
29889,
29963,
29896,
29918,
14226,
876,
13,
13,
13,
29992,
11303,
29889,
6519,
29898,
8477,
2433,
6113,
7333,
2133,
848,
304,
382,
15488,
3491,
1495,
13,
29992,
3808,
29889,
3385,
877,
29899,
29877,
742,
525,
489,
10289,
742,
1134,
29922,
25416,
29928,
29918,
10192,
29892,
2322,
29922,
29900,
29916,
29900,
29900,
29953,
29900,
29892,
13,
4706,
1371,
2433,
10302,
310,
7333,
2133,
848,
3829,
297,
382,
15488,
3491,
1495,
13,
29992,
3808,
29889,
3385,
877,
489,
29882,
9163,
742,
1134,
29922,
25416,
29928,
29918,
10192,
29892,
2322,
29922,
29900,
29892,
13,
4706,
1371,
2433,
29950,
538,
2519,
3553,
1495,
13,
29992,
3808,
29889,
3385,
877,
489,
12803,
742,
1134,
29922,
25416,
29928,
29918,
10192,
29892,
2322,
29922,
29900,
29892,
13,
4706,
1371,
2433,
18457,
3553,
1495,
13,
29992,
3808,
29889,
23516,
877,
15550,
1217,
742,
1134,
29922,
710,
29897,
13,
29992,
3808,
29889,
23516,
877,
311,
345,
1481,
742,
1134,
29922,
29923,
3120,
29897,
13,
29992,
3808,
29889,
23516,
877,
2212,
457,
1481,
742,
1134,
29922,
29923,
3120,
29897,
13,
29992,
3808,
29889,
23516,
877,
29876,
29893,
29895,
1989,
742,
1134,
29922,
29909,
2890,
10818,
29897,
13,
29992,
3808,
29889,
23516,
877,
932,
1989,
742,
1134,
29922,
29909,
2890,
10818,
29892,
3734,
29922,
8824,
29897,
13,
29992,
3808,
29889,
3364,
29918,
4703,
13,
29992,
2616,
29877,
13,
12674,
822,
10518,
3539,
29898,
13073,
29901,
3808,
29889,
2677,
29892,
9210,
29901,
524,
29892,
298,
9163,
29901,
524,
29892,
5120,
29901,
524,
29892,
7797,
1217,
29901,
710,
29892,
28542,
1481,
29901,
29923,
1481,
29892,
2958,
457,
1481,
29901,
29923,
1481,
29892,
302,
29893,
29895,
1989,
29901,
13193,
29892,
623,
1989,
29901,
27636,
29961,
13193,
29962,
1125,
13,
1678,
282,
371,
353,
12893,
29889,
5415,
1839,
29886,
371,
2033,
13,
1678,
565,
623,
1989,
338,
6213,
29901,
13,
4706,
623,
1989,
353,
302,
29893,
29895,
1989,
13,
1678,
7272,
282,
371,
29889,
3905,
29918,
3539,
29898,
10289,
29892,
9034,
29877,
1469,
29963,
29896,
29898,
29882,
9163,
29892,
5120,
29892,
7797,
1217,
29892,
28542,
1481,
29892,
2958,
457,
1481,
29892,
302,
29893,
29895,
1989,
29892,
623,
1989,
467,
4058,
3101,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
9335,
29898,
5415,
3790,
1800,
13,
2
] |
build/lib/AESEncryptor_heureka_code/Exceptions/TextExceptions.py | heureka-code/AESEncryptor-heureka-code | 0 | 1607950 | __date__ = "11.03.2021"
__status__ = "Development"
__annotations__ = "Enthält die Exceptions für das Verschlüsseln und Entschlüsseln von Texten"
__doc__ = """
Text Exceptions:
TextError:
ist die Klasse, von der die anderen Text Exceptions erben.
TextIsEncrypted:
wird ausgelöst, wenn der Text nicht verschlüsselt werden kann, weil er das bereits wurde.
TextIsNotEncrypted:
wird ausgelöst, wenn Text entschlüsselt werden soll, der gar nicht verschlüsselt worden ist.
"""
class TextError(Exception):
CODE = "TextError"
def __init__(self, msg):
self.__message = "Es gab einen Fehler beim verwendeten Text"
super(TextError, self).__init__(self.__message)
pass
def __str__(self):
return self.__message
pass
class TextIsEncrypted(TextError):
CODE = "TextIsEncrypted"
def __init__(self):
self.__message = "Der verwendete Text kann nicht verschlüsselt werden, da er bereits verschlüsselt wurde."
super(TextIsEncrypted, self).__init__(self.__message)
pass
def __str__(self):
return self.__message
pass
class TextIsNotEncrypted(TextError):
CODE = "TextIsNotEncrypted"
def __init__(self):
self.__message = "Der Text kann nich entschlüsselt werden, da er nicht verschlüsselt wurde."
super(TextIsNotEncrypted, self).__init__(self.__message)
pass
def __str__(self):
return self.__message
pass
| [
1,
4770,
1256,
1649,
353,
376,
29896,
29896,
29889,
29900,
29941,
29889,
29906,
29900,
29906,
29896,
29908,
13,
1649,
4882,
1649,
353,
376,
21956,
358,
29908,
13,
1649,
6735,
800,
1649,
353,
376,
2369,
386,
10905,
762,
8960,
29879,
1865,
1697,
478,
7092,
29880,
10673,
3478,
563,
4284,
816,
29880,
10673,
3478,
1005,
3992,
264,
29908,
13,
1649,
1514,
1649,
353,
9995,
13,
13,
1626,
8960,
29879,
29901,
13,
13,
1626,
2392,
29901,
13,
1678,
1752,
762,
476,
14537,
29892,
1005,
589,
762,
11756,
3992,
8960,
29879,
604,
1785,
29889,
13,
13,
1626,
3624,
8566,
14740,
29901,
13,
1678,
4296,
1770,
7467,
15095,
29892,
13588,
589,
3992,
3072,
8038,
29880,
10673,
2152,
3678,
9083,
29892,
24107,
604,
1697,
13101,
1931,
29889,
13,
13,
1626,
3624,
3664,
8566,
14740,
29901,
13,
1678,
4296,
1770,
7467,
15095,
29892,
13588,
3992,
875,
816,
29880,
10673,
2152,
3678,
10297,
29892,
589,
7171,
3072,
8038,
29880,
10673,
2152,
7758,
1752,
29889,
259,
13,
13,
15945,
29908,
13,
13,
13,
1990,
3992,
2392,
29898,
2451,
1125,
13,
1678,
4810,
2287,
353,
376,
1626,
2392,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
10191,
1125,
13,
4706,
1583,
17255,
4906,
353,
376,
14190,
11880,
4596,
5169,
29882,
1358,
10005,
9540,
355,
6302,
3992,
29908,
13,
4706,
2428,
29898,
1626,
2392,
29892,
1583,
467,
1649,
2344,
12035,
1311,
17255,
4906,
29897,
13,
4706,
1209,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
1583,
17255,
4906,
13,
1678,
1209,
13,
13,
13,
1990,
3992,
3624,
8566,
14740,
29898,
1626,
2392,
1125,
13,
1678,
4810,
2287,
353,
376,
1626,
3624,
8566,
14740,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
17255,
4906,
353,
376,
15383,
9540,
355,
2650,
3992,
9083,
3072,
8038,
29880,
10673,
2152,
3678,
29892,
1146,
604,
13101,
8038,
29880,
10673,
2152,
1931,
1213,
13,
4706,
2428,
29898,
1626,
3624,
8566,
14740,
29892,
1583,
467,
1649,
2344,
12035,
1311,
17255,
4906,
29897,
13,
4706,
1209,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
1583,
17255,
4906,
13,
1678,
1209,
13,
13,
13,
1990,
3992,
3624,
3664,
8566,
14740,
29898,
1626,
2392,
1125,
13,
1678,
4810,
2287,
353,
376,
1626,
3624,
3664,
8566,
14740,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
1583,
17255,
4906,
353,
376,
15383,
3992,
9083,
25090,
875,
816,
29880,
10673,
2152,
3678,
29892,
1146,
604,
3072,
8038,
29880,
10673,
2152,
1931,
1213,
13,
4706,
2428,
29898,
1626,
3624,
3664,
8566,
14740,
29892,
1583,
467,
1649,
2344,
12035,
1311,
17255,
4906,
29897,
13,
4706,
1209,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
1583,
17255,
4906,
13,
1678,
1209,
13,
2
] |
apps/notifiers/notification_action_processor.py | constructorfleet/AutomationApps | 0 | 176639 | <filename>apps/notifiers/notification_action_processor.py
from appdaemon import utils
from common.base_app import BaseApp
from notifiers.notification_action import NotificationAction
ACTION = "action"
ACTION_NAME = "actionName"
ACTION_DATA = "action_data"
CATEGORY = "category"
ENTITY_ID = "entity_id"
ACKNOWLEDGE_ID = "acknowledge_id"
class NotificationActionProcessor(BaseApp):
async def initialize_app(self):
self.acknowledge_listeners = []
self.debug("Starting listener for iOS")
await self.listen_event(self.handle_event,
event="ios.notification_action_fired")
self.debug("Starting listener for mobile app")
await self.listen_event(self.handle_event,
event="mobile_app_notification_action")
self.debug("Starting listener for FCM")
await self.listen_event(self.handle_event,
event="html5_notification.clicked")
def add_acknowledge_listener(self, listener):
self.acknowledge_listeners.append(listener)
async def handle_event(self, event_name, data, kwargs):
self.debug("Event Data {} and kwargs {}".format(str(data), str(kwargs)))
self.debug("ACTION NAME {} ".format(data.get(ACTION_NAME, data.get(ACTION, "")).lower()))
for name, member in NotificationAction.__members__.items():
self.debug("NAME {} VALUE {}".format(name, member))
found_action = [member for name, member in NotificationAction.__members__.items() if
name.lower().replace('_', '') == data.get(ACTION_NAME,
data.get(ACTION, "")).lower()]
if not found_action:
self.warning("No action found for {}".format(str(data)))
return
action = found_action[0]
if not action.service:
acknowledge_id = data["data"].get(ACTION_DATA, {}).get(ACKNOWLEDGE_ID, None) \
if event_name == "html5_notification.clicked" \
else data.get(ACTION_DATA, {}).get(ACKNOWLEDGE_ID, None)
acknowledge_id = acknowledge_id or action.acknowledge_id
if not acknowledge_id:
return
self.info("Firing event {}".format("notification_action.{}".format(acknowledge_id)))
self.fire_event("notification_action.{}".format(acknowledge_id))
for listener in self.acknowledge_listeners:
await listener(acknowledge_id, action)
return
entity_id = data["data"][ACTION_DATA][ENTITY_ID] \
if event_name == "html5_notification.clicked" \
else data[ACTION_DATA][ENTITY_ID]
if not action or not entity_id:
self.warning("Not enough data")
return
self.publish_service_call(
action.service.split('/')[0],
action.service.split('/')[1],
{
ENTITY_ID: entity_id
}
)
| [
1,
529,
9507,
29958,
13371,
29914,
1333,
14903,
29914,
24671,
29918,
2467,
29918,
26482,
29889,
2272,
13,
3166,
623,
1388,
9857,
1053,
3667,
29879,
13,
13,
3166,
3619,
29889,
3188,
29918,
932,
1053,
7399,
2052,
13,
3166,
451,
14903,
29889,
24671,
29918,
2467,
1053,
28578,
4276,
13,
13,
24705,
353,
376,
2467,
29908,
13,
24705,
29918,
5813,
353,
376,
2467,
1170,
29908,
13,
24705,
29918,
14573,
353,
376,
2467,
29918,
1272,
29908,
13,
29907,
3040,
29954,
18929,
353,
376,
7320,
29908,
13,
3919,
11937,
29918,
1367,
353,
376,
10041,
29918,
333,
29908,
13,
11375,
6632,
29956,
20566,
1692,
29918,
1367,
353,
376,
547,
3707,
5485,
29918,
333,
29908,
13,
13,
13,
1990,
28578,
4276,
18689,
29898,
5160,
2052,
1125,
13,
1678,
7465,
822,
11905,
29918,
932,
29898,
1311,
1125,
13,
4706,
1583,
29889,
547,
3707,
5485,
29918,
20631,
414,
353,
5159,
13,
4706,
1583,
29889,
8382,
703,
4763,
292,
13254,
363,
10012,
1159,
13,
4706,
7272,
1583,
29889,
20631,
29918,
3696,
29898,
1311,
29889,
8411,
29918,
3696,
29892,
13,
462,
18884,
1741,
543,
2363,
29889,
24671,
29918,
2467,
29918,
29888,
2859,
1159,
13,
4706,
1583,
29889,
8382,
703,
4763,
292,
13254,
363,
10426,
623,
1159,
13,
4706,
7272,
1583,
29889,
20631,
29918,
3696,
29898,
1311,
29889,
8411,
29918,
3696,
29892,
13,
462,
18884,
1741,
543,
16769,
29918,
932,
29918,
24671,
29918,
2467,
1159,
13,
13,
4706,
1583,
29889,
8382,
703,
4763,
292,
13254,
363,
7992,
29924,
1159,
13,
4706,
7272,
1583,
29889,
20631,
29918,
3696,
29898,
1311,
29889,
8411,
29918,
3696,
29892,
13,
462,
18884,
1741,
543,
1420,
29945,
29918,
24671,
29889,
3808,
287,
1159,
13,
13,
1678,
822,
788,
29918,
547,
3707,
5485,
29918,
25894,
29898,
1311,
29892,
13254,
1125,
13,
4706,
1583,
29889,
547,
3707,
5485,
29918,
20631,
414,
29889,
4397,
29898,
25894,
29897,
13,
13,
1678,
7465,
822,
4386,
29918,
3696,
29898,
1311,
29892,
1741,
29918,
978,
29892,
848,
29892,
9049,
5085,
1125,
13,
4706,
1583,
29889,
8382,
703,
2624,
3630,
6571,
322,
9049,
5085,
6571,
1642,
4830,
29898,
710,
29898,
1272,
511,
851,
29898,
19290,
4961,
13,
4706,
1583,
29889,
8382,
703,
24705,
27085,
6571,
11393,
4830,
29898,
1272,
29889,
657,
29898,
24705,
29918,
5813,
29892,
848,
29889,
657,
29898,
24705,
29892,
20569,
467,
13609,
22130,
13,
4706,
363,
1024,
29892,
4509,
297,
28578,
4276,
17255,
28109,
26914,
7076,
7295,
13,
9651,
1583,
29889,
8382,
703,
5813,
6571,
12599,
4462,
6571,
1642,
4830,
29898,
978,
29892,
4509,
876,
13,
4706,
1476,
29918,
2467,
353,
518,
14242,
363,
1024,
29892,
4509,
297,
28578,
4276,
17255,
28109,
26914,
7076,
580,
565,
13,
462,
4706,
1024,
29889,
13609,
2141,
6506,
877,
29918,
742,
27255,
1275,
848,
29889,
657,
29898,
24705,
29918,
5813,
29892,
13,
462,
462,
462,
462,
29871,
848,
29889,
657,
29898,
24705,
29892,
20569,
467,
13609,
580,
29962,
13,
4706,
565,
451,
1476,
29918,
2467,
29901,
13,
9651,
1583,
29889,
27392,
703,
3782,
3158,
1476,
363,
6571,
1642,
4830,
29898,
710,
29898,
1272,
4961,
13,
9651,
736,
13,
13,
4706,
3158,
353,
1476,
29918,
2467,
29961,
29900,
29962,
13,
4706,
565,
451,
3158,
29889,
5509,
29901,
13,
9651,
18145,
5485,
29918,
333,
353,
848,
3366,
1272,
16862,
657,
29898,
24705,
29918,
14573,
29892,
6571,
467,
657,
29898,
11375,
6632,
29956,
20566,
1692,
29918,
1367,
29892,
6213,
29897,
320,
13,
18884,
565,
1741,
29918,
978,
1275,
376,
1420,
29945,
29918,
24671,
29889,
3808,
287,
29908,
320,
13,
18884,
1683,
848,
29889,
657,
29898,
24705,
29918,
14573,
29892,
6571,
467,
657,
29898,
11375,
6632,
29956,
20566,
1692,
29918,
1367,
29892,
6213,
29897,
13,
9651,
18145,
5485,
29918,
333,
353,
18145,
5485,
29918,
333,
470,
3158,
29889,
547,
3707,
5485,
29918,
333,
13,
9651,
565,
451,
18145,
5485,
29918,
333,
29901,
13,
18884,
736,
13,
9651,
1583,
29889,
3888,
703,
29943,
8491,
1741,
6571,
1642,
4830,
703,
24671,
29918,
2467,
29889,
8875,
1642,
4830,
29898,
547,
3707,
5485,
29918,
333,
4961,
13,
9651,
1583,
29889,
8696,
29918,
3696,
703,
24671,
29918,
2467,
29889,
8875,
1642,
4830,
29898,
547,
3707,
5485,
29918,
333,
876,
13,
9651,
363,
13254,
297,
1583,
29889,
547,
3707,
5485,
29918,
20631,
414,
29901,
13,
18884,
7272,
13254,
29898,
547,
3707,
5485,
29918,
333,
29892,
3158,
29897,
13,
9651,
736,
13,
13,
4706,
7855,
29918,
333,
353,
848,
3366,
1272,
3108,
29961,
24705,
29918,
14573,
3816,
3919,
11937,
29918,
1367,
29962,
320,
13,
9651,
565,
1741,
29918,
978,
1275,
376,
1420,
29945,
29918,
24671,
29889,
3808,
287,
29908,
320,
13,
9651,
1683,
848,
29961,
24705,
29918,
14573,
3816,
3919,
11937,
29918,
1367,
29962,
13,
13,
4706,
565,
451,
3158,
470,
451,
7855,
29918,
333,
29901,
13,
9651,
1583,
29889,
27392,
703,
3664,
3307,
848,
1159,
13,
9651,
736,
13,
13,
4706,
1583,
29889,
23679,
29918,
5509,
29918,
4804,
29898,
13,
9651,
3158,
29889,
5509,
29889,
5451,
11219,
29861,
29900,
1402,
13,
9651,
3158,
29889,
5509,
29889,
5451,
11219,
29861,
29896,
1402,
13,
9651,
426,
13,
18884,
12524,
29911,
11937,
29918,
1367,
29901,
7855,
29918,
333,
13,
9651,
500,
13,
4706,
1723,
13,
2
] |
tests/api_interface/test_runbooks/test_files/parallel_task.py | tuxtof/calm-dsl | 37 | 53401 | """
Calm DSL Sample Runbook for parallel task
"""
from calm.dsl.runbooks import runbook, parallel, branch
from calm.dsl.runbooks import RunbookTask as Task
@runbook
def ParallelTask():
"Runbook Service example"
with parallel() as p:
with branch(p):
Task.Delay(60, name="Delay1")
with branch(p):
Task.Delay(60, name="Delay2")
with branch(p):
Task.Delay(60, name="Delay3")
| [
1,
9995,
13,
7856,
29885,
360,
12750,
21029,
7525,
2909,
363,
8943,
3414,
13,
13,
15945,
29908,
13,
13,
3166,
21732,
29889,
29881,
2536,
29889,
3389,
12733,
1053,
1065,
2909,
29892,
8943,
29892,
5443,
13,
3166,
21732,
29889,
29881,
2536,
29889,
3389,
12733,
1053,
7525,
2909,
5398,
408,
9330,
13,
13,
13,
29992,
3389,
2909,
13,
1753,
1459,
6553,
5398,
7295,
13,
1678,
376,
6558,
2909,
6692,
1342,
29908,
13,
1678,
411,
8943,
580,
408,
282,
29901,
13,
4706,
411,
5443,
29898,
29886,
1125,
13,
9651,
9330,
29889,
24996,
29898,
29953,
29900,
29892,
1024,
543,
24996,
29896,
1159,
13,
4706,
411,
5443,
29898,
29886,
1125,
13,
9651,
9330,
29889,
24996,
29898,
29953,
29900,
29892,
1024,
543,
24996,
29906,
1159,
13,
4706,
411,
5443,
29898,
29886,
1125,
13,
9651,
9330,
29889,
24996,
29898,
29953,
29900,
29892,
1024,
543,
24996,
29941,
1159,
13,
2
] |
2021/Python/6/lanternfish_2_from_Jonathan_Paulson.py | ames0k0/AdventOfCode | 0 | 64780 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
No need to create a list of fishes and add new one to the end of the list
"""
from collections import defaultdict
def main():
# XXX: COPY/PASTED
input_file = './input.txt'
X = defaultdict(int)
with open(input_file, 'r') as ftr:
for n in map(int, ftr.read().strip().split(',')):
if (n not in X.keys()):
X[n] = 0
X[n] += 1
for _ in range(256):
Y = defaultdict(int)
for x, cnt in X.items():
# add new fish
if (x == 0):
Y[6] += cnt
Y[8] += cnt
else:
Y[x-1] += cnt
X = Y
print(sum(X.values()))
if __name__ == '__main__':
main()
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
15945,
29908,
13,
3782,
817,
304,
1653,
263,
1051,
310,
9427,
267,
322,
788,
716,
697,
304,
278,
1095,
310,
278,
1051,
13,
15945,
29908,
13,
13,
3166,
16250,
1053,
2322,
8977,
13,
13,
1753,
1667,
7295,
13,
29871,
396,
22615,
29901,
315,
4590,
29979,
29914,
7228,
1254,
3352,
13,
29871,
1881,
29918,
1445,
353,
19283,
2080,
29889,
3945,
29915,
13,
29871,
1060,
353,
2322,
8977,
29898,
524,
29897,
13,
29871,
411,
1722,
29898,
2080,
29918,
1445,
29892,
525,
29878,
1495,
408,
285,
509,
29901,
13,
1678,
363,
302,
297,
2910,
29898,
524,
29892,
285,
509,
29889,
949,
2141,
17010,
2141,
5451,
29898,
3788,
22164,
13,
418,
565,
313,
29876,
451,
297,
1060,
29889,
8149,
580,
1125,
13,
4706,
1060,
29961,
29876,
29962,
353,
29871,
29900,
13,
418,
1060,
29961,
29876,
29962,
4619,
29871,
29896,
13,
1678,
363,
903,
297,
3464,
29898,
29906,
29945,
29953,
1125,
13,
418,
612,
353,
2322,
8977,
29898,
524,
29897,
13,
418,
363,
921,
29892,
274,
593,
297,
1060,
29889,
7076,
7295,
13,
4706,
396,
788,
716,
9427,
13,
4706,
565,
313,
29916,
1275,
29871,
29900,
1125,
13,
3986,
612,
29961,
29953,
29962,
4619,
274,
593,
13,
3986,
612,
29961,
29947,
29962,
4619,
274,
593,
13,
4706,
1683,
29901,
13,
3986,
612,
29961,
29916,
29899,
29896,
29962,
4619,
274,
593,
13,
418,
1060,
353,
612,
13,
1678,
1596,
29898,
2083,
29898,
29990,
29889,
5975,
22130,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
29871,
1667,
580,
13,
2
] |
tsaotun/lib/Addon/loader.py | qazbnm456/tsaotun | 47 | 68398 | """Addon Loader module"""
import os
import pkgutil
import imp
from ast import literal_eval
from ConfigParser import RawConfigParser
from git import RemoteProgress
from ..Utils.deepgetattr import deepgetattr
from ..Utils.hightlight import hightlight_python
from ..Utils.urlutil import is_git_url
class Progress(RemoteProgress):
"""Git Progree Handler"""
def line_dropped(self, line):
print line
def update(self, op_code, cur_count, max_count=None, message=''):
print "{}/{}".format(cur_count, max_count)
class Loader(object):
"""Addon Loader"""
inspects = {}
def __init__(self, argparser=None, tsaotun_global_config="{}/Tsaotun/config.ini".format(os.path.expanduser("~")), addon_path="{}/Tsaotun/addons/".format(os.path.expanduser("~"))):
self.argparser = argparser
self.__locate(addon_path)
try:
if not os.path.exists(tsaotun_global_config):
open(tsaotun_global_config, 'a').close()
self.tsaotun_global_config = tsaotun_global_config
except OSError as e:
raise RuntimeError(
"{}".format(str(e)))
def __locate(self, addon_path):
"""Locate addon path"""
try:
if not os.path.exists(addon_path):
os.makedirs(addon_path)
self.addon_path = addon_path
except OSError as e:
raise RuntimeError(
"{}".format(str(e)))
def __parse_args(self, configs):
"""Parsing __argparse__ and assign to argparser"""
if self.argparser:
for config in configs:
if config["position"] == 'Self':
parser = self.argparser[
config["namespace"]][config["position"]]
for action in config["actions"]:
exec("import textwrap; parser.{}".format(action), {'parser': parser})
self.argparser[config["namespace"]][
config["position"]] = parser
else:
if config["subcommand"]:
parser = self.argparser[config["namespace"]][
config["position"]].choices.get(config["subcommand"])
for action in config["actions"]:
exec("import textwrap; parser.{}".format(action), {'parser': parser})
self.argparser[config["namespace"]][
config["position"]].choices.update({config["subcommand"]: parser})
else:
parser = self.argparser[
config["namespace"]][config["position"]]
subparser = None
for i, action in enumerate(config["actions"]):
if i == 0:
exec(
"import textwrap; import argparse; global subparser; subparser = parser.{}".format(action))
else:
exec("import textwrap; global subparser; subparser.{}".format(action))
self.argparser[config["namespace"]][
config["position"]] = parser
else:
raise RuntimeError("argparser is not specified.")
def __parse_config(self, section, options=None):
"""Parsing global config file"""
cfg = RawConfigParser()
with open(self.tsaotun_global_config) as f:
cfg.readfp(f, self.tsaotun_global_config)
if cfg.has_section(section) is False:
cfg.add_section(section)
if options:
stored = [cfg.get(section, option) if cfg.has_option(section, option) else cfg.set(
section, option, 'False') is True for option in options]
else:
stored = cfg.items(section)
with open(self.tsaotun_global_config, 'wb') as f:
cfg.write(f)
return stored
def __active(self, addon_names):
"""Check if the given addon is active"""
return self.__parse_config('addon', addon_names)
def load(self):
"""Load addons"""
addon_names = [n for _, n, _ in pkgutil.iter_modules(
["{}".format(self.addon_path)])]
addons = {}
for addon_name, active in zip(addon_names, self.__active(addon_names)):
try:
f, filename, description = imp.find_module(
addon_name, [self.addon_path])
mod = imp.load_module(
addon_name, f, filename, description)
self.inspects[addon_name] = ''.join(
[mod.__file__.split('.')[0], '.py'])
if literal_eval(active):
for k, v in mod.__override__.iteritems():
addons["{}|{}".format(k, v)] = deepgetattr(
mod, "{}.{}".format(k, v))
self.__parse_args(mod.__argparse__)
except ImportError as e:
raise RuntimeError(str(e))
return addons, self.argparser
def enable(self, addon):
"""Enable an addon"""
try:
if self.inspects[addon]:
cfg = RawConfigParser()
with open(self.tsaotun_global_config) as f:
cfg.readfp(f, self.tsaotun_global_config)
cfg.set('addon', addon, 'True')
with open(self.tsaotun_global_config, 'wb') as f:
cfg.write(f)
return "Done!"
except KeyError as e:
raise RuntimeError("No such addon: {}".format(str(e)))
def disable(self, addon):
"""Disable an addon"""
try:
if self.inspects[addon]:
cfg = RawConfigParser()
with open(self.tsaotun_global_config) as f:
cfg.readfp(f, self.tsaotun_global_config)
cfg.set('addon', addon, 'False')
with open(self.tsaotun_global_config, 'wb') as f:
cfg.write(f)
return "Done!"
except KeyError as e:
raise RuntimeError("No such addon: {}".format(str(e)))
def inspect(self, addon):
"""Inspect an addon"""
try:
args = {'sourcefile': self.inspects[addon]}
return hightlight_python(args)
except KeyError as e:
raise RuntimeError("No such addon: {}".format(str(e)))
def install(self, url, addon):
"""Install an addon from a given url"""
if is_git_url(url):
from git import (Repo, GitCommandError)
if addon is None:
addon = url.split('/')[-1].split('.')[0]
dest = os.path.join(self.addon_path, addon)
try:
Repo.clone_from(url, dest, progress=Progress())
if 'requirements.txt' in os.listdir(dest):
os.system("pip install -r {}".format(os.path.join(dest, 'requirements.txt')))
return "'{}' successfully installed!".format(addon)
except GitCommandError as e:
raise RuntimeError("{}".format(str(e)))
except IOError:
print "Please run 'pip install -r {}' to install the needed requirements, and then the installation of {} is done.".format(os.path.join(dest, 'requirements.txt'), addon)
else:
raise RuntimeError("Invalid URL: {}".format(url))
def rm(self, addon):
"""Remove an addon"""
import shutil
try:
shutil.rmtree(os.path.join(self.addon_path, addon))
return "'{}' successfully removed!".format(addon)
except OSError as e:
raise RuntimeError("{}".format(str(e)))
def addons(self):
"""List addons"""
addon_names = [n for _, n, _ in pkgutil.iter_modules(
["{}".format(self.addon_path)])]
return [{'Addon': n, 'Enabled': a} for n, a in zip(addon_names, self.__active(addon_names))]
| [
1,
9995,
2528,
265,
4309,
1664,
3883,
15945,
29908,
13,
13,
5215,
2897,
13,
5215,
282,
9415,
4422,
13,
5215,
2411,
13,
3166,
8717,
1053,
16333,
29918,
14513,
13,
3166,
12782,
11726,
1053,
22038,
3991,
11726,
13,
3166,
6315,
1053,
5240,
866,
14470,
13,
13,
3166,
6317,
12177,
29889,
24535,
657,
5552,
1053,
6483,
657,
5552,
13,
3166,
6317,
12177,
29889,
29882,
523,
4366,
1053,
298,
523,
4366,
29918,
4691,
13,
3166,
6317,
12177,
29889,
2271,
4422,
1053,
338,
29918,
5559,
29918,
2271,
13,
13,
13,
1990,
20018,
29898,
20224,
14470,
1125,
13,
1678,
9995,
28712,
1019,
29887,
929,
5166,
1358,
15945,
29908,
13,
13,
1678,
822,
1196,
29918,
26419,
2986,
29898,
1311,
29892,
1196,
1125,
13,
4706,
1596,
1196,
13,
13,
1678,
822,
2767,
29898,
1311,
29892,
1015,
29918,
401,
29892,
3151,
29918,
2798,
29892,
4236,
29918,
2798,
29922,
8516,
29892,
2643,
2433,
29374,
13,
4706,
1596,
29850,
6822,
8875,
1642,
4830,
29898,
2764,
29918,
2798,
29892,
4236,
29918,
2798,
29897,
13,
13,
13,
1990,
4309,
1664,
29898,
3318,
1125,
13,
1678,
9995,
2528,
265,
4309,
1664,
15945,
29908,
13,
1678,
16096,
29879,
353,
6571,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1852,
16680,
29922,
8516,
29892,
260,
4977,
327,
348,
29918,
10945,
29918,
2917,
10724,
6822,
29911,
4977,
327,
348,
29914,
2917,
29889,
2172,
1642,
4830,
29898,
359,
29889,
2084,
29889,
18837,
1792,
703,
30022,
1159,
511,
788,
265,
29918,
2084,
10724,
6822,
29911,
4977,
327,
348,
29914,
1202,
787,
29914,
1642,
4830,
29898,
359,
29889,
2084,
29889,
18837,
1792,
703,
30022,
5783,
1125,
13,
4706,
1583,
29889,
1191,
16680,
353,
1852,
16680,
13,
4706,
1583,
17255,
2029,
403,
29898,
1202,
265,
29918,
2084,
29897,
13,
4706,
1018,
29901,
13,
9651,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
1372,
29874,
327,
348,
29918,
10945,
29918,
2917,
1125,
13,
18884,
1722,
29898,
1372,
29874,
327,
348,
29918,
10945,
29918,
2917,
29892,
525,
29874,
2824,
5358,
580,
13,
9651,
1583,
29889,
1372,
29874,
327,
348,
29918,
10945,
29918,
2917,
353,
260,
4977,
327,
348,
29918,
10945,
29918,
2917,
13,
4706,
5174,
438,
29173,
408,
321,
29901,
13,
9651,
12020,
24875,
2392,
29898,
13,
18884,
376,
8875,
1642,
4830,
29898,
710,
29898,
29872,
4961,
13,
13,
1678,
822,
4770,
2029,
403,
29898,
1311,
29892,
788,
265,
29918,
2084,
1125,
13,
4706,
9995,
3524,
403,
788,
265,
2224,
15945,
29908,
13,
4706,
1018,
29901,
13,
9651,
565,
451,
2897,
29889,
2084,
29889,
9933,
29898,
1202,
265,
29918,
2084,
1125,
13,
18884,
2897,
29889,
29885,
12535,
12935,
29898,
1202,
265,
29918,
2084,
29897,
13,
9651,
1583,
29889,
1202,
265,
29918,
2084,
353,
788,
265,
29918,
2084,
13,
4706,
5174,
438,
29173,
408,
321,
29901,
13,
9651,
12020,
24875,
2392,
29898,
13,
18884,
376,
8875,
1642,
4830,
29898,
710,
29898,
29872,
4961,
13,
13,
1678,
822,
4770,
5510,
29918,
5085,
29898,
1311,
29892,
2295,
29879,
1125,
13,
4706,
9995,
29925,
1503,
292,
4770,
1191,
5510,
1649,
322,
3566,
304,
1852,
16680,
15945,
29908,
13,
4706,
565,
1583,
29889,
1191,
16680,
29901,
13,
9651,
363,
2295,
297,
2295,
29879,
29901,
13,
18884,
565,
2295,
3366,
3283,
3108,
1275,
525,
24313,
2396,
13,
462,
1678,
13812,
353,
1583,
29889,
1191,
16680,
29961,
13,
462,
4706,
2295,
3366,
22377,
3108,
3816,
2917,
3366,
3283,
3108,
29962,
13,
462,
1678,
363,
3158,
297,
2295,
3366,
7387,
3108,
29901,
13,
462,
4706,
2279,
703,
5215,
1426,
6312,
29936,
13812,
29889,
8875,
1642,
4830,
29898,
2467,
511,
11117,
16680,
2396,
13812,
1800,
13,
462,
1678,
1583,
29889,
1191,
16680,
29961,
2917,
3366,
22377,
3108,
3816,
13,
462,
4706,
2295,
3366,
3283,
3108,
29962,
353,
13812,
13,
18884,
1683,
29901,
13,
462,
1678,
565,
2295,
3366,
1491,
6519,
3108,
29901,
13,
462,
4706,
13812,
353,
1583,
29889,
1191,
16680,
29961,
2917,
3366,
22377,
3108,
3816,
13,
462,
9651,
2295,
3366,
3283,
3108,
1822,
1859,
1575,
29889,
657,
29898,
2917,
3366,
1491,
6519,
20068,
13,
462,
4706,
363,
3158,
297,
2295,
3366,
7387,
3108,
29901,
13,
462,
9651,
2279,
703,
5215,
1426,
6312,
29936,
13812,
29889,
8875,
1642,
4830,
29898,
2467,
511,
11117,
16680,
2396,
13812,
1800,
13,
462,
4706,
1583,
29889,
1191,
16680,
29961,
2917,
3366,
22377,
3108,
3816,
13,
462,
9651,
2295,
3366,
3283,
3108,
1822,
1859,
1575,
29889,
5504,
3319,
2917,
3366,
1491,
6519,
3108,
29901,
13812,
1800,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
13812,
353,
1583,
29889,
1191,
16680,
29961,
13,
462,
9651,
2295,
3366,
22377,
3108,
3816,
2917,
3366,
3283,
3108,
29962,
13,
462,
4706,
1014,
16680,
353,
6213,
13,
462,
4706,
363,
474,
29892,
3158,
297,
26985,
29898,
2917,
3366,
7387,
3108,
1125,
13,
462,
9651,
565,
474,
1275,
29871,
29900,
29901,
13,
462,
18884,
2279,
29898,
13,
462,
462,
1678,
376,
5215,
1426,
6312,
29936,
1053,
1852,
5510,
29936,
5534,
1014,
16680,
29936,
1014,
16680,
353,
13812,
29889,
8875,
1642,
4830,
29898,
2467,
876,
13,
462,
9651,
1683,
29901,
13,
462,
18884,
2279,
703,
5215,
1426,
6312,
29936,
5534,
1014,
16680,
29936,
1014,
16680,
29889,
8875,
1642,
4830,
29898,
2467,
876,
13,
462,
4706,
1583,
29889,
1191,
16680,
29961,
2917,
3366,
22377,
3108,
3816,
13,
462,
9651,
2295,
3366,
3283,
3108,
29962,
353,
13812,
13,
4706,
1683,
29901,
13,
9651,
12020,
24875,
2392,
703,
1191,
16680,
338,
451,
6790,
23157,
13,
13,
1678,
822,
4770,
5510,
29918,
2917,
29898,
1311,
29892,
4004,
29892,
3987,
29922,
8516,
1125,
13,
4706,
9995,
29925,
1503,
292,
5534,
2295,
934,
15945,
29908,
13,
4706,
274,
16434,
353,
22038,
3991,
11726,
580,
13,
4706,
411,
1722,
29898,
1311,
29889,
1372,
29874,
327,
348,
29918,
10945,
29918,
2917,
29897,
408,
285,
29901,
13,
9651,
274,
16434,
29889,
949,
18091,
29898,
29888,
29892,
1583,
29889,
1372,
29874,
327,
348,
29918,
10945,
29918,
2917,
29897,
13,
4706,
565,
274,
16434,
29889,
5349,
29918,
2042,
29898,
2042,
29897,
338,
7700,
29901,
13,
9651,
274,
16434,
29889,
1202,
29918,
2042,
29898,
2042,
29897,
13,
4706,
565,
3987,
29901,
13,
9651,
6087,
353,
518,
16859,
29889,
657,
29898,
2042,
29892,
2984,
29897,
565,
274,
16434,
29889,
5349,
29918,
3385,
29898,
2042,
29892,
2984,
29897,
1683,
274,
16434,
29889,
842,
29898,
13,
18884,
4004,
29892,
2984,
29892,
525,
8824,
1495,
338,
5852,
363,
2984,
297,
3987,
29962,
13,
4706,
1683,
29901,
13,
9651,
6087,
353,
274,
16434,
29889,
7076,
29898,
2042,
29897,
13,
4706,
411,
1722,
29898,
1311,
29889,
1372,
29874,
327,
348,
29918,
10945,
29918,
2917,
29892,
525,
29893,
29890,
1495,
408,
285,
29901,
13,
9651,
274,
16434,
29889,
3539,
29898,
29888,
29897,
13,
4706,
736,
6087,
13,
13,
1678,
822,
4770,
4925,
29898,
1311,
29892,
788,
265,
29918,
7039,
1125,
13,
4706,
9995,
5596,
565,
278,
2183,
788,
265,
338,
6136,
15945,
29908,
13,
4706,
736,
1583,
17255,
5510,
29918,
2917,
877,
1202,
265,
742,
788,
265,
29918,
7039,
29897,
13,
13,
1678,
822,
2254,
29898,
1311,
1125,
13,
4706,
9995,
5896,
788,
787,
15945,
29908,
13,
4706,
788,
265,
29918,
7039,
353,
518,
29876,
363,
17117,
302,
29892,
903,
297,
282,
9415,
4422,
29889,
1524,
29918,
7576,
29898,
13,
9651,
6796,
8875,
1642,
4830,
29898,
1311,
29889,
1202,
265,
29918,
2084,
29897,
2314,
29962,
13,
4706,
788,
787,
353,
6571,
13,
4706,
363,
788,
265,
29918,
978,
29892,
6136,
297,
14319,
29898,
1202,
265,
29918,
7039,
29892,
1583,
17255,
4925,
29898,
1202,
265,
29918,
7039,
22164,
13,
9651,
1018,
29901,
13,
18884,
285,
29892,
10422,
29892,
6139,
353,
2411,
29889,
2886,
29918,
5453,
29898,
13,
462,
1678,
788,
265,
29918,
978,
29892,
518,
1311,
29889,
1202,
265,
29918,
2084,
2314,
13,
18884,
878,
353,
2411,
29889,
1359,
29918,
5453,
29898,
13,
462,
1678,
788,
265,
29918,
978,
29892,
285,
29892,
10422,
29892,
6139,
29897,
13,
18884,
1583,
29889,
1144,
1103,
29879,
29961,
1202,
265,
29918,
978,
29962,
353,
525,
4286,
7122,
29898,
13,
462,
1678,
518,
1545,
17255,
1445,
26914,
5451,
12839,
29861,
29900,
1402,
15300,
2272,
11287,
13,
18884,
565,
16333,
29918,
14513,
29898,
4925,
1125,
13,
462,
1678,
363,
413,
29892,
325,
297,
878,
17255,
15752,
26914,
1524,
7076,
7295,
13,
462,
4706,
788,
787,
3366,
8875,
29989,
8875,
1642,
4830,
29898,
29895,
29892,
325,
4638,
353,
6483,
657,
5552,
29898,
13,
462,
9651,
878,
29892,
29850,
1836,
8875,
1642,
4830,
29898,
29895,
29892,
325,
876,
13,
462,
1678,
1583,
17255,
5510,
29918,
5085,
29898,
1545,
17255,
1191,
5510,
1649,
29897,
13,
9651,
5174,
16032,
2392,
408,
321,
29901,
13,
18884,
12020,
24875,
2392,
29898,
710,
29898,
29872,
876,
13,
13,
4706,
736,
788,
787,
29892,
1583,
29889,
1191,
16680,
13,
13,
1678,
822,
9025,
29898,
1311,
29892,
788,
265,
1125,
13,
4706,
9995,
20701,
385,
788,
265,
15945,
29908,
13,
4706,
1018,
29901,
13,
9651,
565,
1583,
29889,
1144,
1103,
29879,
29961,
1202,
265,
5387,
13,
18884,
274,
16434,
353,
22038,
3991,
11726,
580,
13,
18884,
411,
1722,
29898,
1311,
29889,
1372,
29874,
327,
348,
29918,
10945,
29918,
2917,
29897,
408,
285,
29901,
13,
462,
1678,
274,
16434,
29889,
949,
18091,
29898,
29888,
29892,
1583,
29889,
1372,
29874,
327,
348,
29918,
10945,
29918,
2917,
29897,
13,
18884,
274,
16434,
29889,
842,
877,
1202,
265,
742,
788,
265,
29892,
525,
5574,
1495,
13,
18884,
411,
1722,
29898,
1311,
29889,
1372,
29874,
327,
348,
29918,
10945,
29918,
2917,
29892,
525,
29893,
29890,
1495,
408,
285,
29901,
13,
462,
1678,
274,
16434,
29889,
3539,
29898,
29888,
29897,
13,
18884,
736,
376,
25632,
3850,
13,
4706,
5174,
7670,
2392,
408,
321,
29901,
13,
9651,
12020,
24875,
2392,
703,
3782,
1316,
788,
265,
29901,
6571,
1642,
4830,
29898,
710,
29898,
29872,
4961,
13,
13,
1678,
822,
11262,
29898,
1311,
29892,
788,
265,
1125,
13,
4706,
9995,
4205,
519,
385,
788,
265,
15945,
29908,
13,
4706,
1018,
29901,
13,
9651,
565,
1583,
29889,
1144,
1103,
29879,
29961,
1202,
265,
5387,
13,
18884,
274,
16434,
353,
22038,
3991,
11726,
580,
13,
18884,
411,
1722,
29898,
1311,
29889,
1372,
29874,
327,
348,
29918,
10945,
29918,
2917,
29897,
408,
285,
29901,
13,
462,
1678,
274,
16434,
29889,
949,
18091,
29898,
29888,
29892,
1583,
29889,
1372,
29874,
327,
348,
29918,
10945,
29918,
2917,
29897,
13,
18884,
274,
16434,
29889,
842,
877,
1202,
265,
742,
788,
265,
29892,
525,
8824,
1495,
13,
18884,
411,
1722,
29898,
1311,
29889,
1372,
29874,
327,
348,
29918,
10945,
29918,
2917,
29892,
525,
29893,
29890,
1495,
408,
285,
29901,
13,
462,
1678,
274,
16434,
29889,
3539,
29898,
29888,
29897,
13,
18884,
736,
376,
25632,
3850,
13,
4706,
5174,
7670,
2392,
408,
321,
29901,
13,
9651,
12020,
24875,
2392,
703,
3782,
1316,
788,
265,
29901,
6571,
1642,
4830,
29898,
710,
29898,
29872,
4961,
13,
13,
1678,
822,
16096,
29898,
1311,
29892,
788,
265,
1125,
13,
4706,
9995,
797,
21494,
385,
788,
265,
15945,
29908,
13,
4706,
1018,
29901,
13,
9651,
6389,
353,
11117,
4993,
1445,
2396,
1583,
29889,
1144,
1103,
29879,
29961,
1202,
265,
12258,
13,
9651,
736,
298,
523,
4366,
29918,
4691,
29898,
5085,
29897,
13,
4706,
5174,
7670,
2392,
408,
321,
29901,
13,
9651,
12020,
24875,
2392,
703,
3782,
1316,
788,
265,
29901,
6571,
1642,
4830,
29898,
710,
29898,
29872,
4961,
13,
13,
1678,
822,
2601,
29898,
1311,
29892,
3142,
29892,
788,
265,
1125,
13,
4706,
9995,
23271,
385,
788,
265,
515,
263,
2183,
3142,
15945,
29908,
13,
4706,
565,
338,
29918,
5559,
29918,
2271,
29898,
2271,
1125,
13,
9651,
515,
6315,
1053,
313,
5612,
29877,
29892,
11786,
6255,
2392,
29897,
13,
9651,
565,
788,
265,
338,
6213,
29901,
13,
18884,
788,
265,
353,
3142,
29889,
5451,
11219,
1495,
14352,
29896,
1822,
5451,
12839,
29861,
29900,
29962,
13,
9651,
2731,
353,
2897,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
1202,
265,
29918,
2084,
29892,
788,
265,
29897,
13,
9651,
1018,
29901,
13,
18884,
830,
1129,
29889,
16513,
29918,
3166,
29898,
2271,
29892,
2731,
29892,
6728,
29922,
14470,
3101,
13,
18884,
565,
525,
12277,
1860,
29889,
3945,
29915,
297,
2897,
29889,
1761,
3972,
29898,
7854,
1125,
13,
462,
1678,
2897,
29889,
5205,
703,
13096,
2601,
448,
29878,
6571,
1642,
4830,
29898,
359,
29889,
2084,
29889,
7122,
29898,
7854,
29892,
525,
12277,
1860,
29889,
3945,
29915,
4961,
13,
18884,
736,
13577,
8875,
29915,
8472,
5130,
29991,
1642,
4830,
29898,
1202,
265,
29897,
13,
9651,
5174,
11786,
6255,
2392,
408,
321,
29901,
13,
18884,
12020,
24875,
2392,
703,
8875,
1642,
4830,
29898,
710,
29898,
29872,
4961,
13,
9651,
5174,
10663,
2392,
29901,
13,
18884,
1596,
376,
12148,
1065,
525,
13096,
2601,
448,
29878,
6571,
29915,
304,
2601,
278,
4312,
11780,
29892,
322,
769,
278,
11161,
310,
6571,
338,
2309,
1213,
29889,
4830,
29898,
359,
29889,
2084,
29889,
7122,
29898,
7854,
29892,
525,
12277,
1860,
29889,
3945,
5477,
788,
265,
29897,
13,
4706,
1683,
29901,
13,
9651,
12020,
24875,
2392,
703,
13919,
3988,
29901,
6571,
1642,
4830,
29898,
2271,
876,
13,
13,
1678,
822,
20241,
29898,
1311,
29892,
788,
265,
1125,
13,
4706,
9995,
15941,
385,
788,
265,
15945,
29908,
13,
4706,
1053,
528,
4422,
13,
4706,
1018,
29901,
13,
9651,
528,
4422,
29889,
1758,
8336,
29898,
359,
29889,
2084,
29889,
7122,
29898,
1311,
29889,
1202,
265,
29918,
2084,
29892,
788,
265,
876,
13,
9651,
736,
13577,
8875,
29915,
8472,
6206,
29991,
1642,
4830,
29898,
1202,
265,
29897,
13,
4706,
5174,
438,
29173,
408,
321,
29901,
13,
9651,
12020,
24875,
2392,
703,
8875,
1642,
4830,
29898,
710,
29898,
29872,
4961,
13,
13,
1678,
822,
788,
787,
29898,
1311,
1125,
13,
4706,
9995,
1293,
788,
787,
15945,
29908,
13,
4706,
788,
265,
29918,
7039,
353,
518,
29876,
363,
17117,
302,
29892,
903,
297,
282,
9415,
4422,
29889,
1524,
29918,
7576,
29898,
13,
9651,
6796,
8875,
1642,
4830,
29898,
1311,
29889,
1202,
265,
29918,
2084,
29897,
2314,
29962,
13,
4706,
736,
518,
10998,
2528,
265,
2396,
302,
29892,
525,
10861,
2396,
263,
29913,
363,
302,
29892,
263,
297,
14319,
29898,
1202,
265,
29918,
7039,
29892,
1583,
17255,
4925,
29898,
1202,
265,
29918,
7039,
28166,
13,
2
] |
pyconcz_2016/sponsors/migrations/0007_auto_20161019_1700.py | pyvec/cz.pycon.org-2016 | 10 | 88891 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-19 15:00
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sponsors', '0006_auto_20160929_1218'),
]
operations = [
migrations.AlterField(
model_name='sponsor',
name='level',
field=models.PositiveSmallIntegerField(choices=[(1, 'Platinum'), (2, 'Gold'), (3, 'Silver'), (4, 'Bronze'), (5, 'Diversity'), (6, 'Media'), (7, 'Coffee')], default=3),
),
]
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
3251,
630,
491,
15337,
29871,
29896,
29889,
29896,
29900,
29889,
29906,
373,
29871,
29906,
29900,
29896,
29953,
29899,
29896,
29900,
29899,
29896,
29929,
29871,
29896,
29945,
29901,
29900,
29900,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
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,
1028,
787,
943,
742,
525,
29900,
29900,
29900,
29953,
29918,
6921,
29918,
29906,
29900,
29896,
29953,
29900,
29929,
29906,
29929,
29918,
29896,
29906,
29896,
29947,
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,
1028,
787,
272,
742,
13,
9651,
1024,
2433,
5563,
742,
13,
9651,
1746,
29922,
9794,
29889,
9135,
3321,
12636,
497,
7798,
3073,
29898,
1859,
1575,
11759,
29898,
29896,
29892,
525,
3247,
21203,
398,
5477,
313,
29906,
29892,
525,
29954,
1025,
5477,
313,
29941,
29892,
525,
26729,
369,
5477,
313,
29946,
29892,
525,
29933,
1617,
911,
5477,
313,
29945,
29892,
525,
29928,
24974,
5477,
313,
29953,
29892,
525,
10572,
5477,
313,
29955,
29892,
525,
29907,
2696,
3905,
1495,
1402,
2322,
29922,
29941,
511,
13,
4706,
10353,
13,
1678,
4514,
13,
2
] |
python/qitoolchain/test/test_qitoolchain_remove.py | vbarbaresi/qibuild | 0 | 185267 | # Copyright (c) 2012-2018 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the COPYING file.
import pytest
import qibuild.config
from qibuild.test.conftest import TestBuildWorkTree
import qitoolchain.toolchain
def test_simple(qitoolchain_action):
qitoolchain.toolchain.Toolchain("foo")
qitoolchain_action("remove", "-f", "foo")
# pylint: disable-msg=E1101
with pytest.raises(Exception):
qitoolchain.get_toolchain("foo")
def test_when_not_exists(qitoolchain_action):
# pylint: disable-msg=E1101
with pytest.raises(Exception) as e:
qitoolchain_action("remove", "foo")
assert "No such toolchain" in str(e.value)
def test_when_is_default(qitoolchain_action):
qitoolchain_action("create", "foo")
qibuild.config.add_build_config("foo", toolchain="foo")
test_build_worktre1 = TestBuildWorkTree()
test_build_worktre1.set_default_config("foo")
qitoolchain_action("remove", "foo", "--force")
test_build_worktre2 = TestBuildWorkTree()
# pylint:disable-msg=E1101
with pytest.raises(Exception) as e:
test_build_worktre2.toolchain # pylint: disable=pointless-statement
assert "No such toolchain" in e.value.message
| [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29906,
29899,
29906,
29900,
29896,
29947,
1105,
615,
29933,
804,
6417,
327,
1199,
29889,
2178,
10462,
21676,
29889,
13,
29937,
4803,
310,
445,
2752,
775,
338,
4095,
287,
491,
263,
350,
7230,
29899,
3293,
19405,
393,
508,
367,
13,
29937,
1476,
297,
278,
315,
4590,
29979,
4214,
934,
29889,
13,
5215,
11451,
1688,
13,
13,
5215,
3855,
747,
29884,
789,
29889,
2917,
13,
3166,
3855,
747,
29884,
789,
29889,
1688,
29889,
535,
615,
342,
1053,
4321,
8893,
5531,
9643,
13,
13,
5215,
3855,
277,
1507,
14153,
29889,
10154,
14153,
13,
13,
13,
1753,
1243,
29918,
12857,
29898,
29939,
277,
1507,
14153,
29918,
2467,
1125,
13,
1678,
3855,
277,
1507,
14153,
29889,
10154,
14153,
29889,
12229,
14153,
703,
5431,
1159,
13,
1678,
3855,
277,
1507,
14153,
29918,
2467,
703,
5992,
613,
11663,
29888,
613,
376,
5431,
1159,
13,
1678,
396,
282,
2904,
524,
29901,
11262,
29899,
7645,
29922,
29923,
29896,
29896,
29900,
29896,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
2451,
1125,
13,
4706,
3855,
277,
1507,
14153,
29889,
657,
29918,
10154,
14153,
703,
5431,
1159,
13,
13,
13,
1753,
1243,
29918,
8256,
29918,
1333,
29918,
9933,
29898,
29939,
277,
1507,
14153,
29918,
2467,
1125,
13,
1678,
396,
282,
2904,
524,
29901,
11262,
29899,
7645,
29922,
29923,
29896,
29896,
29900,
29896,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
2451,
29897,
408,
321,
29901,
13,
4706,
3855,
277,
1507,
14153,
29918,
2467,
703,
5992,
613,
376,
5431,
1159,
13,
1678,
4974,
376,
3782,
1316,
5780,
14153,
29908,
297,
851,
29898,
29872,
29889,
1767,
29897,
13,
13,
13,
1753,
1243,
29918,
8256,
29918,
275,
29918,
4381,
29898,
29939,
277,
1507,
14153,
29918,
2467,
1125,
13,
1678,
3855,
277,
1507,
14153,
29918,
2467,
703,
3258,
613,
376,
5431,
1159,
13,
1678,
3855,
747,
29884,
789,
29889,
2917,
29889,
1202,
29918,
4282,
29918,
2917,
703,
5431,
613,
5780,
14153,
543,
5431,
1159,
13,
1678,
1243,
29918,
4282,
29918,
1287,
2484,
29896,
353,
4321,
8893,
5531,
9643,
580,
13,
1678,
1243,
29918,
4282,
29918,
1287,
2484,
29896,
29889,
842,
29918,
4381,
29918,
2917,
703,
5431,
1159,
13,
1678,
3855,
277,
1507,
14153,
29918,
2467,
703,
5992,
613,
376,
5431,
613,
376,
489,
10118,
1159,
13,
1678,
1243,
29918,
4282,
29918,
1287,
2484,
29906,
353,
4321,
8893,
5531,
9643,
580,
13,
1678,
396,
282,
2904,
524,
29901,
20472,
29899,
7645,
29922,
29923,
29896,
29896,
29900,
29896,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
2451,
29897,
408,
321,
29901,
13,
4706,
1243,
29918,
4282,
29918,
1287,
2484,
29906,
29889,
10154,
14153,
29871,
396,
282,
2904,
524,
29901,
11262,
29922,
3149,
2222,
29899,
20788,
13,
1678,
4974,
376,
3782,
1316,
5780,
14153,
29908,
297,
321,
29889,
1767,
29889,
4906,
13,
2
] |
gen-post.py | younghk/younghk.netlify.com | 0 | 964 | <gh_stars>0
import os
import errno
from datetime import datetime
print("Generating A New Post\n")
post_name = input('Input Post Name: ')
date_time = datetime.now()
date_time_dir = date_time.strftime("%Y-%m-%d")
date_time_post = date_time.strftime("%Y-%m-%d %H:%M:%S")
p_name = post_name.replace(" ","-")
p_name = p_name.replace("[","")
p_name = p_name.replace("]","")
p_name = p_name.lower()
f_name = date_time_dir+"---"+p_name
dir = "./src/pages/articles/"+f_name+"/"
f_dir = dir+f_name+".md"
try:
if not(os.path.isdir(dir)):
os.makedirs(os.path.join(dir))
except OSError as e:
if e.errno != errno.EEXIST:
print("Failed to create directory!!!!!")
raise
print("Generating post : ",f_dir)
with open(f_dir, 'w') as f:
f.write('---')
f.write('\n')
f.write('draft: true')
f.write('\n')
f.write('title: \"'+post_name+'\"')
f.write('\n')
f.write('date: \"'+date_time_post+'\"')
f.write('\n')
f.write('layout: post')
f.write('\n')
f.write('path: \"/posts/'+p_name+'/\"')
f.write('\n')
f.write('category: \"\"')
f.write('\n')
f.write('tags: ')
f.write('\n')
f.write('description: ""')
f.write('\n')
f.write('---')
f.write('\n')
print("Done :)") | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
2897,
13,
5215,
4589,
1217,
13,
3166,
12865,
1053,
12865,
13,
13,
2158,
703,
5631,
1218,
319,
1570,
4918,
29905,
29876,
1159,
13,
13,
2490,
29918,
978,
353,
1881,
877,
4290,
4918,
4408,
29901,
25710,
13,
13,
1256,
29918,
2230,
353,
12865,
29889,
3707,
580,
13,
1256,
29918,
2230,
29918,
3972,
353,
2635,
29918,
2230,
29889,
710,
615,
603,
11702,
29979,
19222,
29885,
19222,
29881,
1159,
13,
1256,
29918,
2230,
29918,
2490,
353,
2635,
29918,
2230,
29889,
710,
615,
603,
11702,
29979,
19222,
29885,
19222,
29881,
1273,
29950,
16664,
29924,
16664,
29903,
1159,
13,
13,
29886,
29918,
978,
353,
1400,
29918,
978,
29889,
6506,
703,
28796,
29899,
1159,
13,
29886,
29918,
978,
353,
282,
29918,
978,
29889,
6506,
703,
29961,
3284,
1159,
13,
29886,
29918,
978,
353,
282,
29918,
978,
29889,
6506,
703,
29962,
3284,
1159,
13,
29886,
29918,
978,
353,
282,
29918,
978,
29889,
13609,
580,
13,
13,
29888,
29918,
978,
353,
2635,
29918,
2230,
29918,
3972,
13578,
5634,
17969,
29886,
29918,
978,
13,
3972,
353,
376,
6904,
4351,
29914,
12292,
29914,
18569,
12975,
29974,
29888,
29918,
978,
13578,
12975,
13,
29888,
29918,
3972,
353,
4516,
29974,
29888,
29918,
978,
29974,
1642,
3487,
29908,
13,
13,
2202,
29901,
13,
1678,
565,
451,
29898,
359,
29889,
2084,
29889,
275,
3972,
29898,
3972,
22164,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
359,
29889,
2084,
29889,
7122,
29898,
3972,
876,
13,
19499,
438,
29173,
408,
321,
29901,
13,
1678,
565,
321,
29889,
3127,
1217,
2804,
4589,
1217,
29889,
29923,
5746,
9047,
29901,
13,
4706,
1596,
703,
17776,
304,
1653,
3884,
6824,
21004,
1159,
13,
4706,
12020,
13,
13,
2158,
703,
5631,
1218,
1400,
584,
9162,
29888,
29918,
3972,
29897,
13,
13,
2541,
1722,
29898,
29888,
29918,
3972,
29892,
525,
29893,
1495,
408,
285,
29901,
13,
1678,
285,
29889,
3539,
877,
5634,
1495,
13,
1678,
285,
29889,
3539,
28909,
29876,
1495,
13,
1678,
285,
29889,
3539,
877,
29881,
4154,
29901,
268,
1565,
1495,
13,
1678,
285,
29889,
3539,
28909,
29876,
1495,
13,
1678,
285,
29889,
3539,
877,
3257,
29901,
268,
13218,
18717,
2490,
29918,
978,
23097,
5931,
1495,
13,
1678,
285,
29889,
3539,
28909,
29876,
1495,
13,
1678,
285,
29889,
3539,
877,
1256,
29901,
418,
13218,
18717,
1256,
29918,
2230,
29918,
2490,
23097,
5931,
1495,
13,
1678,
285,
29889,
3539,
28909,
29876,
1495,
13,
1678,
285,
29889,
3539,
877,
2680,
29901,
1678,
1400,
1495,
13,
1678,
285,
29889,
3539,
28909,
29876,
1495,
13,
1678,
285,
29889,
3539,
877,
2084,
29901,
418,
13218,
29914,
14080,
29914,
18717,
29886,
29918,
978,
23097,
29914,
5931,
1495,
13,
1678,
285,
29889,
3539,
28909,
29876,
1495,
13,
1678,
285,
29889,
3539,
877,
7320,
29901,
29871,
13218,
5931,
1495,
13,
1678,
285,
29889,
3539,
28909,
29876,
1495,
13,
1678,
285,
29889,
3539,
877,
11338,
29901,
25710,
13,
1678,
285,
29889,
3539,
28909,
29876,
1495,
13,
1678,
285,
29889,
3539,
877,
8216,
29901,
5124,
1495,
13,
1678,
285,
29889,
3539,
28909,
29876,
1495,
13,
1678,
285,
29889,
3539,
877,
5634,
1495,
13,
1678,
285,
29889,
3539,
28909,
29876,
1495,
13,
13,
2158,
703,
25632,
4248,
1159,
2
] |
python/createTestVector.py | marbleton/FPGA_MNIST | 7 | 80072 | import numpy as np
from numpy.random import rand
from numpy import *
from pathlib import Path
import csv
# activation function? if we'd use ReLU with grayscale images the value stays
# the same
# This script creates a .csv file in the work directory
# containing integer numbers in the following form
# Input X : x1, x2, x3, ... xN_inputlayer
# Weight W1: w11, w12, w13, ... w1N_inputlayer
# Weight W1: w21, w22, w23, ... w2N_inputlayer
# ...
# Weight W1: wN_hiddenlayer1, wN_hiddenlayer2 ... wN_hiddenlayerN_inputlayer
# Weight W2: w11, w12, ... w1hiddenlayer;
# Weight W2: ...
# Weight W2: wN_inputlayer1, ... wN_inputlayerN_hiddenlayer
# Output Y : y1, y2, y3, ... yN_outputlayer;
## Parameters
N_inputlayer = 28*28; # Nodes Input Layer
N_outputlayer = N_inputlayer; # Nodes Output Layer
N_hiddenlayer = 200; # Nodes Hidden Layer
file_name = "test_vectors" # name of .csv file
# Neural Network consits of Input Layer, Hidden Layer, Output Layer
# Input Layer has 28 * 28 = 784 nodes
# Hidden Layer has a abitrary number of nodes, we choose 200
# Output Layer has 784 nodes
## Input Layer
X = floor(rand(1,N_inputlayer)*256); #create 784 random Pixels range 0:255
W1 = floor(rand(N_inputlayer,N_hiddenlayer)*256); #create 784 randoms weights 200 times
## Hidden Layer
H1 = X.dot(W1); #multiply Pixels with s_weights
H1 = floor(H1 / 255);
W2 = floor(rand(N_hiddenlayer,N_inputlayer)*256); # create 200 random weights 784 times
## Output layer
Y = floor(H1.dot(W2) / 255); # multiplay hidden layer with weights to
#write Data to .csv file
#path = str(Path().absolute()) + "\\" + file_name + ".csv";
with open(file_name + ".csv", 'w', newline = '') as csvFile:
writer = csv.writer(csvFile)
for x in X:
writer.writerow(x.astype(integer))
for w1 in W1.transpose():
writer.writerow(w1.astype(integer))
for w2 in W2.transpose():
writer.writerow(w2.astype(integer))
for y in Y:
writer.writerow(y.astype(integer))
| [
1,
1053,
12655,
408,
7442,
13,
3166,
12655,
29889,
8172,
1053,
20088,
13,
3166,
12655,
1053,
334,
13,
3166,
2224,
1982,
1053,
10802,
13,
5215,
11799,
13,
13,
29937,
26229,
740,
29973,
565,
591,
29915,
29881,
671,
830,
29931,
29965,
411,
16749,
7052,
4558,
278,
995,
27111,
13,
29937,
278,
1021,
13,
13,
29937,
910,
2471,
10017,
263,
869,
7638,
934,
297,
278,
664,
3884,
13,
29937,
6943,
6043,
3694,
297,
278,
1494,
883,
13,
29937,
10567,
1060,
29871,
584,
921,
29896,
29892,
921,
29906,
29892,
921,
29941,
29892,
2023,
921,
29940,
29918,
2080,
13148,
13,
29937,
1334,
523,
399,
29896,
29901,
281,
29896,
29896,
29892,
281,
29896,
29906,
29892,
281,
29896,
29941,
29892,
2023,
281,
29896,
29940,
29918,
2080,
13148,
13,
29937,
1334,
523,
399,
29896,
29901,
281,
29906,
29896,
29892,
281,
29906,
29906,
29892,
281,
29906,
29941,
29892,
2023,
281,
29906,
29940,
29918,
2080,
13148,
13,
29937,
2023,
13,
29937,
1334,
523,
399,
29896,
29901,
281,
29940,
29918,
10892,
13148,
29896,
29892,
281,
29940,
29918,
10892,
13148,
29906,
2023,
281,
29940,
29918,
10892,
13148,
29940,
29918,
2080,
13148,
13,
29937,
1334,
523,
399,
29906,
29901,
281,
29896,
29896,
29892,
281,
29896,
29906,
29892,
2023,
281,
29896,
10892,
13148,
29936,
13,
29937,
1334,
523,
399,
29906,
29901,
2023,
13,
29937,
1334,
523,
399,
29906,
29901,
281,
29940,
29918,
2080,
13148,
29896,
29892,
2023,
281,
29940,
29918,
2080,
13148,
29940,
29918,
10892,
13148,
13,
29937,
10604,
612,
584,
343,
29896,
29892,
343,
29906,
29892,
343,
29941,
29892,
2023,
343,
29940,
29918,
4905,
13148,
29936,
13,
13,
2277,
12662,
2699,
13,
29940,
29918,
2080,
13148,
353,
29871,
29906,
29947,
29930,
29906,
29947,
29936,
259,
396,
405,
2631,
10567,
365,
2747,
13,
29940,
29918,
4905,
13148,
353,
405,
29918,
2080,
13148,
29936,
396,
405,
2631,
10604,
365,
2747,
13,
29940,
29918,
10892,
13148,
353,
29871,
29906,
29900,
29900,
29936,
396,
405,
2631,
379,
4215,
365,
2747,
13,
1445,
29918,
978,
353,
376,
1688,
29918,
345,
14359,
29908,
396,
1024,
310,
869,
7638,
934,
13,
13,
29937,
2448,
3631,
8527,
1136,
1169,
310,
10567,
365,
2747,
29892,
379,
4215,
365,
2747,
29892,
10604,
365,
2747,
13,
29937,
10567,
365,
2747,
756,
29871,
29906,
29947,
334,
29871,
29906,
29947,
353,
29871,
29955,
29947,
29946,
7573,
13,
29937,
379,
4215,
365,
2747,
756,
263,
19709,
29878,
653,
1353,
310,
7573,
29892,
591,
6755,
29871,
29906,
29900,
29900,
13,
29937,
10604,
365,
2747,
756,
29871,
29955,
29947,
29946,
7573,
13,
13,
2277,
10567,
365,
2747,
13,
29990,
353,
11904,
29898,
9502,
29898,
29896,
29892,
29940,
29918,
2080,
13148,
11877,
29906,
29945,
29953,
416,
1678,
396,
3258,
29871,
29955,
29947,
29946,
4036,
349,
861,
1379,
3464,
29871,
29900,
29901,
29906,
29945,
29945,
13,
29956,
29896,
353,
11904,
29898,
9502,
29898,
29940,
29918,
2080,
13148,
29892,
29940,
29918,
10892,
13148,
11877,
29906,
29945,
29953,
416,
29871,
396,
3258,
29871,
29955,
29947,
29946,
4036,
29879,
18177,
29871,
29906,
29900,
29900,
3064,
13,
13,
2277,
379,
4215,
365,
2747,
13,
29950,
29896,
353,
1060,
29889,
6333,
29898,
29956,
29896,
416,
396,
18056,
368,
349,
861,
1379,
411,
269,
29918,
705,
5861,
13,
29950,
29896,
353,
29871,
11904,
29898,
29950,
29896,
847,
29871,
29906,
29945,
29945,
416,
13,
13,
29956,
29906,
353,
11904,
29898,
9502,
29898,
29940,
29918,
10892,
13148,
29892,
29940,
29918,
2080,
13148,
11877,
29906,
29945,
29953,
416,
396,
1653,
29871,
29906,
29900,
29900,
4036,
18177,
29871,
29955,
29947,
29946,
3064,
13,
13,
2277,
10604,
7546,
13,
29979,
353,
11904,
29898,
29950,
29896,
29889,
6333,
29898,
29956,
29906,
29897,
847,
29871,
29906,
29945,
29945,
416,
396,
2473,
1456,
7934,
7546,
411,
18177,
304,
13,
13,
29937,
3539,
3630,
304,
869,
7638,
934,
13,
29937,
2084,
353,
851,
29898,
2605,
2141,
23552,
3101,
718,
376,
1966,
29908,
718,
934,
29918,
978,
718,
11393,
7638,
1769,
13,
13,
2541,
1722,
29898,
1445,
29918,
978,
718,
11393,
7638,
613,
525,
29893,
742,
25899,
353,
27255,
408,
11799,
2283,
29901,
13,
1678,
9227,
353,
11799,
29889,
13236,
29898,
7638,
2283,
29897,
13,
1678,
363,
921,
297,
1060,
29901,
13,
4706,
9227,
29889,
13236,
340,
29898,
29916,
29889,
579,
668,
29898,
16031,
876,
13,
13,
1678,
363,
281,
29896,
297,
399,
29896,
29889,
3286,
4220,
7295,
13,
4706,
9227,
29889,
13236,
340,
29898,
29893,
29896,
29889,
579,
668,
29898,
16031,
876,
13,
13,
1678,
363,
281,
29906,
297,
399,
29906,
29889,
3286,
4220,
7295,
13,
4706,
9227,
29889,
13236,
340,
29898,
29893,
29906,
29889,
579,
668,
29898,
16031,
876,
13,
13,
1678,
363,
343,
297,
612,
29901,
13,
4706,
9227,
29889,
13236,
340,
29898,
29891,
29889,
579,
668,
29898,
16031,
876,
13,
2
] |
custom_components/hacs/frontend/views/static.py | adr29truck/hacs | 0 | 132386 | """Serve static files used by HACS."""
# pylint: disable=broad-except
import logging
import os
from aiohttp import web
from aiohttp.web import HTTPNotFound
from ...blueprints import HacsViewBase
_LOGGER = logging.getLogger('custom_components.hacs.frontend')
class HacsStaticView(HacsViewBase):
"""Serve static files."""
name = "community_static"
def __init__(self):
"""Initilize."""
self.url = self.url_path["static"] + r"/{requested_file:.+}"
async def get(self, request, requested_file): # pylint: disable=unused-argument
"""Serve static files."""
servefile = "{}/custom_components/hacs/frontend/elements/{}".format(
self.config_dir, requested_file)
if os.path.exists(servefile):
return web.FileResponse(servefile)
else:
servefile += '.gz'
if os.path.exists(servefile):
return web.FileResponse(servefile)
else:
raise HTTPNotFound
| [
1,
9995,
1748,
345,
2294,
2066,
1304,
491,
379,
2477,
29903,
1213,
15945,
13,
29937,
282,
2904,
524,
29901,
11262,
29922,
6729,
328,
29899,
19499,
13,
5215,
12183,
13,
5215,
2897,
13,
3166,
263,
601,
1124,
1053,
1856,
13,
3166,
263,
601,
1124,
29889,
2676,
1053,
7331,
17413,
13,
3166,
2023,
9539,
2158,
29879,
1053,
379,
16815,
1043,
5160,
13,
13,
29918,
14480,
17070,
353,
12183,
29889,
657,
16363,
877,
6341,
29918,
14036,
29889,
29882,
16815,
29889,
8862,
355,
1495,
13,
13,
13,
1990,
379,
16815,
17046,
1043,
29898,
29950,
16815,
1043,
5160,
1125,
13,
1678,
9995,
1748,
345,
2294,
2066,
1213,
15945,
13,
13,
1678,
1024,
353,
376,
23834,
29918,
7959,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
9995,
6644,
309,
675,
1213,
15945,
13,
4706,
1583,
29889,
2271,
353,
1583,
29889,
2271,
29918,
2084,
3366,
7959,
3108,
718,
364,
29908,
19248,
3827,
287,
29918,
1445,
29901,
29889,
29974,
5038,
13,
13,
1678,
7465,
822,
679,
29898,
1311,
29892,
2009,
29892,
13877,
29918,
1445,
1125,
29871,
396,
282,
2904,
524,
29901,
11262,
29922,
348,
3880,
29899,
23516,
13,
4706,
9995,
1748,
345,
2294,
2066,
1213,
15945,
13,
4706,
9080,
1445,
353,
29850,
6822,
6341,
29918,
14036,
29914,
29882,
16815,
29914,
8862,
355,
29914,
17664,
29914,
8875,
1642,
4830,
29898,
13,
9651,
1583,
29889,
2917,
29918,
3972,
29892,
13877,
29918,
1445,
29897,
13,
13,
4706,
565,
2897,
29889,
2084,
29889,
9933,
29898,
16349,
1445,
1125,
13,
9651,
736,
1856,
29889,
2283,
5103,
29898,
16349,
1445,
29897,
13,
4706,
1683,
29901,
13,
9651,
9080,
1445,
4619,
15300,
18828,
29915,
13,
9651,
565,
2897,
29889,
2084,
29889,
9933,
29898,
16349,
1445,
1125,
13,
18884,
736,
1856,
29889,
2283,
5103,
29898,
16349,
1445,
29897,
13,
9651,
1683,
29901,
13,
18884,
12020,
7331,
17413,
13,
2
] |
wbb/utils/read_lines.py | Imran95942/userbotisl | 1 | 50858 | <filename>wbb/utils/read_lines.py
from random import choice
async def random_line(fname):
with open(fname) as f:
data = f.read().splitlines()
return choice(data)
| [
1,
529,
9507,
29958,
29893,
1327,
29914,
13239,
29914,
949,
29918,
9012,
29889,
2272,
13,
3166,
4036,
1053,
7348,
13,
13,
13,
12674,
822,
4036,
29918,
1220,
29898,
29888,
978,
1125,
13,
1678,
411,
1722,
29898,
29888,
978,
29897,
408,
285,
29901,
13,
4706,
848,
353,
285,
29889,
949,
2141,
5451,
9012,
580,
13,
1678,
736,
7348,
29898,
1272,
29897,
13,
2
] |
Introduction-to-data-visualization-with-matplotlib/2. Plotting time-series/script_2.py | nhutnamhcmus/datacamp-playground | 1 | 189560 | import matplotlib.pyplot as plt
# Import pandas as pd
import pandas as pd
# Read the data from file using read_csv
climate_change = pd.read_csv('climate_change.csv', parse_dates=['date'], index_col='date')
print(climate_change.head())
fig, ax = plt.subplots()
# Add the time-series for "relative_temp" to the plot
ax.plot(climate_change.index,climate_change['relative_temp'])
# Set the x-axis label
ax.set_xlabel('Time')
# Set the y-axis label
ax.set_ylabel('Relative temperature (Celsius)')
# Show the figure
plt.show() | [
1,
1053,
22889,
29889,
2272,
5317,
408,
14770,
30004,
13,
29937,
16032,
11701,
408,
10518,
30004,
13,
5215,
11701,
408,
10518,
30004,
13,
30004,
13,
29937,
7523,
278,
848,
515,
934,
773,
1303,
29918,
7638,
30004,
13,
30004,
13,
695,
6490,
29918,
3167,
353,
10518,
29889,
949,
29918,
7638,
877,
695,
6490,
29918,
3167,
29889,
7638,
742,
6088,
29918,
15190,
29922,
1839,
1256,
7464,
2380,
29918,
1054,
2433,
1256,
1495,
30004,
13,
30004,
13,
2158,
29898,
695,
6490,
29918,
3167,
29889,
2813,
3101,
30004,
13,
30004,
13,
1003,
29892,
4853,
353,
14770,
29889,
1491,
26762,
26471,
13,
30004,
13,
29937,
3462,
278,
931,
29899,
13757,
363,
376,
22925,
29918,
7382,
29908,
304,
278,
6492,
30004,
13,
1165,
29889,
5317,
29898,
695,
6490,
29918,
3167,
29889,
2248,
29892,
695,
6490,
29918,
3167,
1839,
22925,
29918,
7382,
2033,
8443,
13,
30004,
13,
29937,
3789,
278,
921,
29899,
8990,
3858,
30004,
13,
1165,
29889,
842,
29918,
29916,
1643,
877,
2481,
1495,
30004,
13,
30004,
13,
29937,
3789,
278,
343,
29899,
8990,
3858,
30004,
13,
1165,
29889,
842,
29918,
29891,
1643,
877,
18278,
10430,
313,
29907,
295,
1039,
375,
29897,
1495,
30004,
13,
30004,
13,
29937,
7704,
278,
4377,
30004,
13,
572,
29873,
29889,
4294,
580,
2
] |
ch01/c118.py | claudiordgz/GoodrichTamassiaGoldwasser | 2 | 123921 | __author__ = 'Claudio'
"""Demonstrate how to use Python’s list comprehension syntax to produce
the list [0, 2, 6, 12, 20, 30, 42, 56, 72, 90].
"""
def demonstration_list_comprehension():
return [idx*x for idx, x in enumerate(range(1,11))]
| [
1,
4770,
8921,
1649,
353,
525,
20216,
2881,
29915,
13,
13,
13,
15945,
29908,
29928,
9857,
710,
403,
920,
304,
671,
5132,
30010,
29879,
1051,
15171,
2673,
5877,
304,
7738,
13,
1552,
1051,
518,
29900,
29892,
29871,
29906,
29892,
29871,
29953,
29892,
29871,
29896,
29906,
29892,
29871,
29906,
29900,
29892,
29871,
29941,
29900,
29892,
29871,
29946,
29906,
29892,
29871,
29945,
29953,
29892,
29871,
29955,
29906,
29892,
29871,
29929,
29900,
1822,
13,
15945,
29908,
13,
1753,
9004,
362,
29918,
1761,
29918,
510,
1457,
29882,
2673,
7295,
13,
1678,
736,
518,
13140,
29930,
29916,
363,
22645,
29892,
921,
297,
26985,
29898,
3881,
29898,
29896,
29892,
29896,
29896,
28166,
13,
2
] |
x11_hash_py/bmw.py | zebra-lucky/x11-hash-py | 0 | 152381 | <gh_stars>0
# -*- coding: utf-8 -*-
from struct import pack
from . import op
from .op import u64
V_INIT = [
u64(0x80818283, 0x84858687), u64(0x88898A8B, 0x8C8D8E8F),
u64(0x90919293, 0x94959697), u64(0x98999A9B, 0x9C9D9E9F),
u64(0xA0A1A2A3, 0xA4A5A6A7), u64(0xA8A9AAAB, 0xACADAEAF),
u64(0xB0B1B2B3, 0xB4B5B6B7), u64(0xB8B9BABB, 0xBCBDBEBF),
u64(0xC0C1C2C3, 0xC4C5C6C7), u64(0xC8C9CACB, 0xCCCDCECF),
u64(0xD0D1D2D3, 0xD4D5D6D7), u64(0xD8D9DADB, 0xDCDDDEDF),
u64(0xE0E1E2E3, 0xE4E5E6E7), u64(0xE8E9EAEB, 0xECEDEEEF),
u64(0xF0F1F2F3, 0xF4F5F6F7), u64(0xF8F9FAFB, 0xFCFDFEFF),
]
final = [
u64(0xaaaaaaaa, 0xaaaaaaa0), u64(0xaaaaaaaa, 0xaaaaaaa1),
u64(0xaaaaaaaa, 0xaaaaaaa2), u64(0xaaaaaaaa, 0xaaaaaaa3),
u64(0xaaaaaaaa, 0xaaaaaaa4), u64(0xaaaaaaaa, 0xaaaaaaa5),
u64(0xaaaaaaaa, 0xaaaaaaa6), u64(0xaaaaaaaa, 0xaaaaaaa7),
u64(0xaaaaaaaa, 0xaaaaaaa8), u64(0xaaaaaaaa, 0xaaaaaaa9),
u64(0xaaaaaaaa, 0xaaaaaaaa), u64(0xaaaaaaaa, 0xaaaaaaab),
u64(0xaaaaaaaa, 0xaaaaaaac), u64(0xaaaaaaaa, 0xaaaaaaad),
u64(0xaaaaaaaa, 0xaaaaaaae), u64(0xaaaaaaaa, 0xaaaaaaaf),
]
sb_a = [1, 1, 2, 2, 1, 2]
sb_b = [3, 2, 1, 2]
sb_c = [4, 13, 19, 28]
sb_d = [37, 43, 53, 59]
I16 = [None] * 16
I16.append([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
I16.append([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])
I16.append([2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17])
I16.append([3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18])
I16.append([4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19])
I16.append([5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])
I16.append([6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21])
I16.append([7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22])
I16.append([8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23])
I16.append([9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24])
I16.append([10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25])
I16.append([11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26])
I16.append([12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27])
I16.append([13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28])
I16.append([14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29])
I16.append([15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])
M16 = [None] * 16
M16.append([0, 1, 3, 4, 7, 10, 11])
M16.append([1, 2, 4, 5, 8, 11, 12])
M16.append([2, 3, 5, 6, 9, 12, 13])
M16.append([3, 4, 6, 7, 10, 13, 14])
M16.append([4, 5, 7, 8, 11, 14, 15])
M16.append([5, 6, 8, 9, 12, 15, 16])
M16.append([6, 7, 9, 10, 13, 0, 1])
M16.append([7, 8, 10, 11, 14, 1, 2])
M16.append([8, 9, 11, 12, 15, 2, 3])
M16.append([9, 10, 12, 13, 0, 3, 4])
M16.append([10, 11, 13, 14, 1, 4, 5])
M16.append([11, 12, 14, 15, 2, 5, 6])
M16.append([12, 13, 15, 16, 3, 6, 7])
M16.append([13, 14, 0, 1, 4, 7, 8])
M16.append([14, 15, 1, 2, 5, 8, 9])
M16.append([15, 16, 2, 3, 6, 9, 10])
def sb(n, x):
if n >= 4:
return x.shift_right(sb_a[n]).xor(x)
return u64.xor64(
x.shift_right(sb_a[n]),
x.shift_left(sb_b[n]),
x.rotate_left(sb_c[n]),
x.rotate_left(sb_d[n])
)
rbn = [0, 5, 11, 27, 32, 37, 43, 53]
def rb(n, x):
return x.rotate_left(rbn[n])
def makeW(M,H,i, op):
a = M[i[0]].xor(H[i[0]])
b = M[i[1]].xor(H[i[1]])
c = M[i[2]].xor(H[i[2]])
d = M[i[3]].xor(H[i[3]])
e = M[i[4]].xor(H[i[4]])
w = op[3](op[2](op[1](op[0](a,b),c),d),e)
return w
wbn = [
[5, 7, 10, 13, 14],
[6, 8, 11, 14, 15],
[0, 7, 9, 12, 15],
[0, 1, 8, 10, 13],
[1, 2, 9, 11, 14],
[3, 2, 10, 12, 15],
[4, 0, 3, 11, 13],
[1, 4, 5, 12, 14],
[2, 5, 6, 13, 15],
[0, 3, 6, 7, 14],
[8, 1, 4, 7, 15],
[8, 0, 2, 5, 9],
[1, 3, 6, 9, 10],
[2, 4, 7, 10, 11],
[3, 5, 8, 11, 12],
[12, 4, 6, 9, 13],
]
def plus(a,b):
return a.plus(b)
def minus(a,b):
return a.minus(b)
wboperators = [
[minus, plus, plus, plus],
[minus, plus, plus, minus],
[plus, plus, minus, plus],
[minus, plus, minus, plus],
[plus, plus, minus, minus],
[minus, plus, minus, plus],
[minus, minus, minus, plus],
[minus, minus, minus, minus],
[minus, minus, plus, minus],
[minus, plus, minus, plus],
[minus, minus, minus, plus],
[minus, minus, minus, plus],
[plus, minus, minus, plus],
[plus, plus, plus, plus],
[minus, plus, minus, minus],
[minus, minus, minus, plus],
]
def wb(M,H,i):
return makeW(M,H,wbn[i],wboperators[i])
def kb(j):
fives = u64(0x05555555, 0x55555555)
return fives.multiply(u64(0, j))
def addElt(buffer64, state, mVars, i):
k = kb(i)
elt = (buffer64[mVars[0]].rotate_left(mVars[1])
.add(buffer64[mVars[2]].rotate_left(mVars[3]))
.minus(buffer64[mVars[5]].rotate_left(mVars[6]))
.add(k)
.xor(state[mVars[4]]))
return elt
def expand2Inner(qt, mf, state, i, iVars, mVars):
return (qt[iVars[0]]
.plus(rb(1, qt[iVars[1]]))
.add(qt[iVars[2]])
.add(rb(2, qt[iVars[3]]))
.add(qt[iVars[4]])
.add(rb(3, qt[iVars[5]]))
.add(qt[iVars[6]])
.add(rb(4, qt[iVars[7]]))
.add(qt[iVars[8]])
.add(rb(5, qt[iVars[9]]))
.add(qt[iVars[10]])
.add(rb(6, qt[iVars[11]]))
.add(qt[iVars[12]])
.add(rb(7, qt[iVars[13]]))
.add(sb(4, qt[iVars[14]]))
.add(sb(5, qt[iVars[15]]))
.add(addElt(mf, state, mVars, i)))
def expand1Inner(qt, mf, state, i, iVars, mVars):
return (sb(1, qt[iVars[0]])
.add(sb(2, qt[iVars[1]]))
.add(sb(3, qt[iVars[2]]))
.add(sb(0, qt[iVars[3]]))
.add(sb(1, qt[iVars[4]]))
.add(sb(2, qt[iVars[5]]))
.add(sb(3, qt[iVars[6]]))
.add(sb(0, qt[iVars[7]]))
.add(sb(1, qt[iVars[8]]))
.add(sb(2, qt[iVars[9]]))
.add(sb(3, qt[iVars[10]]))
.add(sb(0, qt[iVars[11]]))
.add(sb(1, qt[iVars[12]]))
.add(sb(2, qt[iVars[13]]))
.add(sb(3, qt[iVars[14]]))
.add(sb(0, qt[iVars[15]]))
.add(addElt(mf, state, mVars, i)))
def expand1b(qt, mf, state, i):
iVars = I16[i]
mVars = M16[i]
return expand1Inner(qt, mf, state, i, iVars, mVars)
def expand2b(qt, mf, state, i):
iVars = I16[i]
mVars = M16[i]
return expand2Inner(qt, mf, state, i, iVars, mVars)
def makeQ(mf, state):
qt = [None] * 32
for i in range(16):
w = wb(mf,state,i)
s = sb(i % 5, w)
qt[i] = s.plus(state[(i + 1) % 16])
qt[16] = expand1b(qt, mf, state, 16)
qt[17] = expand1b(qt, mf, state, 17)
for i in range(18, 32):
qt[i] = expand2b(qt, mf, state, i)
return qt
def fold(int64Buffer, state):
out = [None] * 16
qt = makeQ(int64Buffer, state)
xl = u64.xor64(qt[16], qt[17], qt[18], qt[19], qt[20], qt[21], qt[22], qt[23])
xh = u64.xor64(xl, qt[24], qt[25], qt[26], qt[27], qt[28], qt[29], qt[30], qt[31])
out[0] = u64.xor64(xh.shift_left(5), qt[16].shift_right(5), int64Buffer[0]).add(u64.xor64(xl, qt[24], qt[0]))
out[1] = u64.xor64(xh.shift_right(7), qt[17].shift_left(8), int64Buffer[1]).add(u64.xor64(xl, qt[25], qt[1]))
out[2] = u64.xor64(xh.shift_right(5), qt[18].shift_left(5), int64Buffer[2]).add(u64.xor64(xl, qt[26], qt[2]))
out[3] = u64.xor64(xh.shift_right(1), qt[19].shift_left(5), int64Buffer[3]).add(u64.xor64(xl, qt[27], qt[3]))
out[4] = u64.xor64(xh.shift_right(3), qt[20], int64Buffer[4]).add(u64.xor64(xl, qt[28], qt[4]))
out[5] = u64.xor64(xh.shift_left(6), qt[21].shift_right(6), int64Buffer[5]).add(u64.xor64(xl, qt[29], qt[5]))
out[6] = u64.xor64(xh.shift_right(4), qt[22].shift_left(6), int64Buffer[6]).add(u64.xor64(xl, qt[30], qt[6]))
out[7] = u64.xor64(xh.shift_right(11), qt[23].shift_left(2), int64Buffer[7]).add(u64.xor64(xl, qt[31], qt[7]))
out[8] = (out[4].rotate_left(9).add(u64.xor64(xh, qt[24], int64Buffer[8]))
.add(u64.xor64(xl.shift_left(8), qt[23], qt[8])))
out[9] = (out[5].rotate_left(10).add(u64.xor64(xh, qt[25], int64Buffer[9]))
.add(u64.xor64(xl.shift_right(6), qt[16], qt[9])))
out[10] = (out[6].rotate_left(11).add(u64.xor64(xh, qt[26], int64Buffer[10]))
.add(u64.xor64(xl.shift_left(6), qt[17], qt[10])))
out[11] = (out[7].rotate_left(12).add(u64.xor64(xh, qt[27], int64Buffer[11]))
.add(u64.xor64(xl.shift_left(4), qt[18], qt[11])))
out[12] = (out[0].rotate_left(13).add(u64.xor64(xh, qt[28], int64Buffer[12]))
.add(u64.xor64(xl.shift_right(3), qt[19], qt[12])))
out[13] = (out[1].rotate_left(14).add(u64.xor64(xh, qt[29], int64Buffer[13]))
.add(u64.xor64(xl.shift_right(4), qt[20], qt[13])))
out[14] = (out[2].rotate_left(15).add(u64.xor64(xh, qt[30], int64Buffer[14]))
.add(u64.xor64(xl.shift_right(7), qt[21], qt[14])))
out[15] = (out[3].rotate_left(16).add(u64.xor64(xh, qt[31], int64Buffer[15]))
.add(u64.xor64(xl.shift_right(2), qt[22], qt[15])))
return out
def compress(buf, state):
buf64 = op.bytes_to_u64_list_le(buf, len(buf))
return fold(buf64, state)
def bmw_update(ctx, msg):
htmp = [None] * 16
msg_len = len(msg)
lenL3 = u64(0, msg_len)
lenL3 = lenL3.shift_left(3)
ctx['bitCount'].add(lenL3)
buf = ctx['buffer']
buf_len = len(buf)
ptr = ctx['ptr']
h1 = ctx['state']
h2 = htmp
while msg_len > 0:
clen = buf_len - ptr
if clen > msg_len:
clen = msg_len
op.buffer_insert(buf, ptr, msg, clen)
msg = msg[clen:]
msg_len -= clen
ptr += clen
if ptr is buf_len:
h2 = compress(buf, h1)
ht = h1
h1 = h2
h2 = ht
ptr = 0
ctx['ptr'] = ptr
state = ctx['state']
if h1 is not state:
state_len = len(state)
op.buffer_insert(state, 0, h1, state_len)
def bmw_close(ctx):
h2 = [None] * 16
buf = ctx['buffer']
ptr = ctx['ptr']
buf_len = len(buf)
buf[ptr] = 0x80
ptr += 1
hState = ctx['state']
if ptr > buf_len - 8:
set_len = buf_len - ptr
buf[ptr:ptr+set_len] = [0] * set_len
hState = compress(buf, hState)
ptr = 0
set_len = buf_len - 8 - ptr
buf[ptr:ptr+set_len] = [0] * set_len
enc_pos = buf_len - 8
enc_data = ctx['bitCount']
buf[enc_pos+0:enc_pos+4] = pack('<I', enc_data.lo)
buf[enc_pos+4:enc_pos+8] = pack('<I', enc_data.hi)
h2 = compress(buf, hState)
for u in range(16):
enc_pos = 8 * u
enc_data = h2[u]
buf[enc_pos+0:enc_pos+4] = pack('<I', enc_data.lo)
buf[enc_pos+4:enc_pos+8] = pack('<I', enc_data.hi)
h1 = compress(buf, final)
out = [None] * 16
for u in range(8):
v = u + 8
out[2 * u] = op.swap32(h1[v].lo)
out[2 * u + 1] = op.swap32(h1[v].hi)
return out
def bmw(msg, out_array=False, in_array=False):
ctx = {}
ctx['state'] = V_INIT[:]
ctx['ptr'] = 0
ctx['bitCount'] = u64(0, 0)
ctx['buffer'] = bytearray(128)
if in_array:
msg = op.bytes_from_i32_list(msg)
bmw_update(ctx, msg)
res = bmw_close(ctx)
if not out_array:
res = op.bytes_from_i32_list(res)
return res
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
3166,
2281,
1053,
4870,
13,
13,
3166,
869,
1053,
1015,
13,
3166,
869,
459,
1053,
318,
29953,
29946,
13,
13,
13,
29963,
29918,
26019,
353,
518,
13,
1678,
318,
29953,
29946,
29898,
29900,
29916,
29947,
29900,
29947,
29896,
29947,
29906,
29947,
29941,
29892,
29871,
29900,
29916,
29947,
29946,
29947,
29945,
29947,
29953,
29947,
29955,
511,
318,
29953,
29946,
29898,
29900,
29916,
29947,
29947,
29947,
29929,
29947,
29909,
29947,
29933,
29892,
29871,
29900,
29916,
29947,
29907,
29947,
29928,
29947,
29923,
29947,
29943,
511,
13,
1678,
318,
29953,
29946,
29898,
29900,
29916,
29929,
29900,
29929,
29896,
29929,
29906,
29929,
29941,
29892,
29871,
29900,
29916,
29929,
29946,
29929,
29945,
29929,
29953,
29929,
29955,
511,
318,
29953,
29946,
29898,
29900,
29916,
29929,
29947,
29929,
29929,
29929,
29909,
29929,
29933,
29892,
29871,
29900,
29916,
29929,
29907,
29929,
29928,
29929,
29923,
29929,
29943,
511,
13,
1678,
318,
29953,
29946,
29898,
29900,
29916,
29909,
29900,
29909,
29896,
29909,
29906,
29909,
29941,
29892,
29871,
29900,
29916,
29909,
29946,
29909,
29945,
29909,
29953,
29909,
29955,
511,
318,
29953,
29946,
29898,
29900,
29916,
29909,
29947,
29909,
29929,
6344,
2882,
29892,
29871,
29900,
29916,
2477,
3035,
16036,
5098,
511,
13,
1678,
318,
29953,
29946,
29898,
29900,
29916,
29933,
29900,
29933,
29896,
29933,
29906,
29933,
29941,
29892,
29871,
29900,
29916,
29933,
29946,
29933,
29945,
29933,
29953,
29933,
29955,
511,
318,
29953,
29946,
29898,
29900,
29916,
29933,
29947,
29933,
29929,
29933,
2882,
29933,
29892,
29871,
29900,
29916,
5371,
29933,
4051,
25752,
29943,
511,
13,
1678,
318,
29953,
29946,
29898,
29900,
29916,
29907,
29900,
29907,
29896,
29907,
29906,
29907,
29941,
29892,
29871,
29900,
29916,
29907,
29946,
29907,
29945,
29907,
29953,
29907,
29955,
511,
318,
29953,
29946,
29898,
29900,
29916,
29907,
29947,
29907,
29929,
29907,
2477,
29933,
29892,
29871,
29900,
29916,
4174,
6530,
4741,
9207,
511,
13,
1678,
318,
29953,
29946,
29898,
29900,
29916,
29928,
29900,
29928,
29896,
29928,
29906,
29928,
29941,
29892,
29871,
29900,
29916,
29928,
29946,
29928,
29945,
29928,
29953,
29928,
29955,
511,
318,
29953,
29946,
29898,
29900,
29916,
29928,
29947,
29928,
29929,
29928,
3035,
29933,
29892,
29871,
29900,
29916,
29928,
6530,
29928,
2287,
4037,
511,
13,
1678,
318,
29953,
29946,
29898,
29900,
29916,
29923,
29900,
29923,
29896,
29923,
29906,
29923,
29941,
29892,
29871,
29900,
29916,
29923,
29946,
29923,
29945,
29923,
29953,
29923,
29955,
511,
318,
29953,
29946,
29898,
29900,
29916,
29923,
29947,
29923,
29929,
29923,
16036,
29933,
29892,
29871,
29900,
29916,
29923,
4741,
2287,
17896,
29943,
511,
13,
1678,
318,
29953,
29946,
29898,
29900,
29916,
29943,
29900,
29943,
29896,
29943,
29906,
29943,
29941,
29892,
29871,
29900,
29916,
29943,
29946,
29943,
29945,
29943,
29953,
29943,
29955,
511,
318,
29953,
29946,
29898,
29900,
29916,
29943,
29947,
29943,
29929,
4519,
18426,
29892,
29871,
29900,
29916,
8610,
29943,
4037,
29923,
4198,
511,
13,
29962,
13,
13,
13,
8394,
353,
518,
13,
1678,
318,
29953,
29946,
29898,
29900,
29916,
27137,
27137,
29892,
29871,
29900,
29916,
27137,
7340,
29874,
29900,
511,
318,
29953,
29946,
29898,
29900,
29916,
27137,
27137,
29892,
29871,
29900,
29916,
27137,
7340,
29874,
29896,
511,
13,
1678,
318,
29953,
29946,
29898,
29900,
29916,
27137,
27137,
29892,
29871,
29900,
29916,
27137,
7340,
29874,
29906,
511,
318,
29953,
29946,
29898,
29900,
29916,
27137,
27137,
29892,
29871,
29900,
29916,
27137,
7340,
29874,
29941,
511,
13,
1678,
318,
29953,
29946,
29898,
29900,
29916,
27137,
27137,
29892,
29871,
29900,
29916,
27137,
7340,
29874,
29946,
511,
318,
29953,
29946,
29898,
29900,
29916,
27137,
27137,
29892,
29871,
29900,
29916,
27137,
7340,
29874,
29945,
511,
13,
1678,
318,
29953,
29946,
29898,
29900,
29916,
27137,
27137,
29892,
29871,
29900,
29916,
27137,
7340,
29874,
29953,
511,
318,
29953,
29946,
29898,
29900,
29916,
27137,
27137,
29892,
29871,
29900,
29916,
27137,
7340,
29874,
29955,
511,
13,
1678,
318,
29953,
29946,
29898,
29900,
29916,
27137,
27137,
29892,
29871,
29900,
29916,
27137,
7340,
29874,
29947,
511,
318,
29953,
29946,
29898,
29900,
29916,
27137,
27137,
29892,
29871,
29900,
29916,
27137,
7340,
29874,
29929,
511,
13,
1678,
318,
29953,
29946,
29898,
29900,
29916,
27137,
27137,
29892,
29871,
29900,
29916,
27137,
27137,
511,
318,
29953,
29946,
29898,
29900,
29916,
27137,
27137,
29892,
29871,
29900,
29916,
27137,
7340,
370,
511,
13,
1678,
318,
29953,
29946,
29898,
29900,
29916,
27137,
27137,
29892,
29871,
29900,
29916,
27137,
7340,
562,
511,
318,
29953,
29946,
29898,
29900,
29916,
27137,
27137,
29892,
29871,
29900,
29916,
27137,
7340,
328,
511,
13,
1678,
318,
29953,
29946,
29898,
29900,
29916,
27137,
27137,
29892,
29871,
29900,
29916,
27137,
7340,
3660,
511,
318,
29953,
29946,
29898,
29900,
29916,
27137,
27137,
29892,
29871,
29900,
29916,
27137,
7340,
2142,
511,
13,
29962,
13,
13,
13,
20778,
29918,
29874,
353,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29906,
29892,
29871,
29896,
29892,
29871,
29906,
29962,
13,
20778,
29918,
29890,
353,
518,
29941,
29892,
29871,
29906,
29892,
29871,
29896,
29892,
29871,
29906,
29962,
13,
20778,
29918,
29883,
353,
518,
29946,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29929,
29892,
29871,
29906,
29947,
29962,
13,
20778,
29918,
29881,
353,
518,
29941,
29955,
29892,
29871,
29946,
29941,
29892,
29871,
29945,
29941,
29892,
29871,
29945,
29929,
29962,
13,
13,
13,
29902,
29896,
29953,
353,
518,
8516,
29962,
334,
29871,
29896,
29953,
13,
29902,
29896,
29953,
29889,
4397,
4197,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
29892,
29871,
29953,
29892,
29871,
29955,
29892,
29871,
29947,
29892,
29871,
29929,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29945,
2314,
13,
29902,
29896,
29953,
29889,
4397,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
29892,
29871,
29953,
29892,
29871,
29955,
29892,
29871,
29947,
29892,
29871,
29929,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29945,
29892,
29871,
29896,
29953,
2314,
13,
29902,
29896,
29953,
29889,
4397,
4197,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
29892,
29871,
29953,
29892,
29871,
29955,
29892,
29871,
29947,
29892,
29871,
29929,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29955,
2314,
13,
29902,
29896,
29953,
29889,
4397,
4197,
29941,
29892,
29871,
29946,
29892,
29871,
29945,
29892,
29871,
29953,
29892,
29871,
29955,
29892,
29871,
29947,
29892,
29871,
29929,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29955,
29892,
29871,
29896,
29947,
2314,
13,
29902,
29896,
29953,
29889,
4397,
4197,
29946,
29892,
29871,
29945,
29892,
29871,
29953,
29892,
29871,
29955,
29892,
29871,
29947,
29892,
29871,
29929,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29955,
29892,
29871,
29896,
29947,
29892,
29871,
29896,
29929,
2314,
13,
29902,
29896,
29953,
29889,
4397,
4197,
29945,
29892,
29871,
29953,
29892,
29871,
29955,
29892,
29871,
29947,
29892,
29871,
29929,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29955,
29892,
29871,
29896,
29947,
29892,
29871,
29896,
29929,
29892,
29871,
29906,
29900,
2314,
13,
29902,
29896,
29953,
29889,
4397,
4197,
29953,
29892,
29871,
29955,
29892,
29871,
29947,
29892,
29871,
29929,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29955,
29892,
29871,
29896,
29947,
29892,
29871,
29896,
29929,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29896,
2314,
13,
29902,
29896,
29953,
29889,
4397,
4197,
29955,
29892,
29871,
29947,
29892,
29871,
29929,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29955,
29892,
29871,
29896,
29947,
29892,
29871,
29896,
29929,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29896,
29892,
29871,
29906,
29906,
2314,
13,
29902,
29896,
29953,
29889,
4397,
4197,
29947,
29892,
29871,
29929,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29955,
29892,
29871,
29896,
29947,
29892,
29871,
29896,
29929,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29896,
29892,
29871,
29906,
29906,
29892,
29871,
29906,
29941,
2314,
13,
29902,
29896,
29953,
29889,
4397,
4197,
29929,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29955,
29892,
29871,
29896,
29947,
29892,
29871,
29896,
29929,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29896,
29892,
29871,
29906,
29906,
29892,
29871,
29906,
29941,
29892,
29871,
29906,
29946,
2314,
13,
29902,
29896,
29953,
29889,
4397,
4197,
29896,
29900,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29955,
29892,
29871,
29896,
29947,
29892,
29871,
29896,
29929,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29896,
29892,
29871,
29906,
29906,
29892,
29871,
29906,
29941,
29892,
29871,
29906,
29946,
29892,
29871,
29906,
29945,
2314,
13,
29902,
29896,
29953,
29889,
4397,
4197,
29896,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29955,
29892,
29871,
29896,
29947,
29892,
29871,
29896,
29929,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29896,
29892,
29871,
29906,
29906,
29892,
29871,
29906,
29941,
29892,
29871,
29906,
29946,
29892,
29871,
29906,
29945,
29892,
29871,
29906,
29953,
2314,
13,
29902,
29896,
29953,
29889,
4397,
4197,
29896,
29906,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29955,
29892,
29871,
29896,
29947,
29892,
29871,
29896,
29929,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29896,
29892,
29871,
29906,
29906,
29892,
29871,
29906,
29941,
29892,
29871,
29906,
29946,
29892,
29871,
29906,
29945,
29892,
29871,
29906,
29953,
29892,
29871,
29906,
29955,
2314,
13,
29902,
29896,
29953,
29889,
4397,
4197,
29896,
29941,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29955,
29892,
29871,
29896,
29947,
29892,
29871,
29896,
29929,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29896,
29892,
29871,
29906,
29906,
29892,
29871,
29906,
29941,
29892,
29871,
29906,
29946,
29892,
29871,
29906,
29945,
29892,
29871,
29906,
29953,
29892,
29871,
29906,
29955,
29892,
29871,
29906,
29947,
2314,
13,
29902,
29896,
29953,
29889,
4397,
4197,
29896,
29946,
29892,
29871,
29896,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29955,
29892,
29871,
29896,
29947,
29892,
29871,
29896,
29929,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29896,
29892,
29871,
29906,
29906,
29892,
29871,
29906,
29941,
29892,
29871,
29906,
29946,
29892,
29871,
29906,
29945,
29892,
29871,
29906,
29953,
29892,
29871,
29906,
29955,
29892,
29871,
29906,
29947,
29892,
29871,
29906,
29929,
2314,
13,
29902,
29896,
29953,
29889,
4397,
4197,
29896,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29896,
29955,
29892,
29871,
29896,
29947,
29892,
29871,
29896,
29929,
29892,
29871,
29906,
29900,
29892,
29871,
29906,
29896,
29892,
29871,
29906,
29906,
29892,
29871,
29906,
29941,
29892,
29871,
29906,
29946,
29892,
29871,
29906,
29945,
29892,
29871,
29906,
29953,
29892,
29871,
29906,
29955,
29892,
29871,
29906,
29947,
29892,
29871,
29906,
29929,
29892,
29871,
29941,
29900,
2314,
13,
13,
13,
29924,
29896,
29953,
353,
518,
8516,
29962,
334,
29871,
29896,
29953,
13,
29924,
29896,
29953,
29889,
4397,
4197,
29900,
29892,
29871,
29896,
29892,
29871,
29941,
29892,
29871,
29946,
29892,
29871,
29955,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29896,
2314,
13,
29924,
29896,
29953,
29889,
4397,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29946,
29892,
29871,
29945,
29892,
29871,
29947,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29906,
2314,
13,
29924,
29896,
29953,
29889,
4397,
4197,
29906,
29892,
29871,
29941,
29892,
29871,
29945,
29892,
29871,
29953,
29892,
29871,
29929,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29941,
2314,
13,
29924,
29896,
29953,
29889,
4397,
4197,
29941,
29892,
29871,
29946,
29892,
29871,
29953,
29892,
29871,
29955,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29946,
2314,
13,
29924,
29896,
29953,
29889,
4397,
4197,
29946,
29892,
29871,
29945,
29892,
29871,
29955,
29892,
29871,
29947,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29945,
2314,
13,
29924,
29896,
29953,
29889,
4397,
4197,
29945,
29892,
29871,
29953,
29892,
29871,
29947,
29892,
29871,
29929,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29945,
29892,
29871,
29896,
29953,
2314,
13,
29924,
29896,
29953,
29889,
4397,
4197,
29953,
29892,
29871,
29955,
29892,
29871,
29929,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29941,
29892,
29871,
29900,
29892,
29871,
29896,
2314,
13,
29924,
29896,
29953,
29889,
4397,
4197,
29955,
29892,
29871,
29947,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29892,
29871,
29906,
2314,
13,
29924,
29896,
29953,
29889,
4397,
4197,
29947,
29892,
29871,
29929,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29945,
29892,
29871,
29906,
29892,
29871,
29941,
2314,
13,
29924,
29896,
29953,
29889,
4397,
4197,
29929,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29941,
29892,
29871,
29900,
29892,
29871,
29941,
29892,
29871,
29946,
2314,
13,
29924,
29896,
29953,
29889,
4397,
4197,
29896,
29900,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29892,
29871,
29946,
29892,
29871,
29945,
2314,
13,
29924,
29896,
29953,
29889,
4397,
4197,
29896,
29896,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29945,
29892,
29871,
29906,
29892,
29871,
29945,
29892,
29871,
29953,
2314,
13,
29924,
29896,
29953,
29889,
4397,
4197,
29896,
29906,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29941,
29892,
29871,
29953,
29892,
29871,
29955,
2314,
13,
29924,
29896,
29953,
29889,
4397,
4197,
29896,
29941,
29892,
29871,
29896,
29946,
29892,
29871,
29900,
29892,
29871,
29896,
29892,
29871,
29946,
29892,
29871,
29955,
29892,
29871,
29947,
2314,
13,
29924,
29896,
29953,
29889,
4397,
4197,
29896,
29946,
29892,
29871,
29896,
29945,
29892,
29871,
29896,
29892,
29871,
29906,
29892,
29871,
29945,
29892,
29871,
29947,
29892,
29871,
29929,
2314,
13,
29924,
29896,
29953,
29889,
4397,
4197,
29896,
29945,
29892,
29871,
29896,
29953,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29953,
29892,
29871,
29929,
29892,
29871,
29896,
29900,
2314,
13,
13,
13,
1753,
17444,
29898,
29876,
29892,
921,
1125,
13,
1678,
565,
302,
6736,
29871,
29946,
29901,
13,
4706,
736,
921,
29889,
10889,
29918,
1266,
29898,
20778,
29918,
29874,
29961,
29876,
14664,
29916,
272,
29898,
29916,
29897,
13,
13,
1678,
736,
318,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
13,
4706,
921,
29889,
10889,
29918,
1266,
29898,
20778,
29918,
29874,
29961,
29876,
11724,
13,
4706,
921,
29889,
10889,
29918,
1563,
29898,
20778,
29918,
29890,
29961,
29876,
11724,
13,
4706,
921,
29889,
23361,
29918,
1563,
29898,
20778,
29918,
29883,
29961,
29876,
11724,
13,
4706,
921,
29889,
23361,
29918,
1563,
29898,
20778,
29918,
29881,
29961,
29876,
2314,
13,
1678,
1723,
13,
13,
13,
6050,
29876,
353,
518,
29900,
29892,
29871,
29945,
29892,
29871,
29896,
29896,
29892,
29871,
29906,
29955,
29892,
29871,
29941,
29906,
29892,
29871,
29941,
29955,
29892,
29871,
29946,
29941,
29892,
29871,
29945,
29941,
29962,
13,
13,
13,
1753,
364,
29890,
29898,
29876,
29892,
921,
1125,
13,
1678,
736,
921,
29889,
23361,
29918,
1563,
29898,
6050,
29876,
29961,
29876,
2314,
13,
13,
13,
1753,
1207,
29956,
29898,
29924,
29892,
29950,
29892,
29875,
29892,
1015,
1125,
13,
1678,
263,
353,
341,
29961,
29875,
29961,
29900,
29962,
1822,
29916,
272,
29898,
29950,
29961,
29875,
29961,
29900,
24960,
13,
1678,
289,
353,
341,
29961,
29875,
29961,
29896,
29962,
1822,
29916,
272,
29898,
29950,
29961,
29875,
29961,
29896,
24960,
13,
1678,
274,
353,
341,
29961,
29875,
29961,
29906,
29962,
1822,
29916,
272,
29898,
29950,
29961,
29875,
29961,
29906,
24960,
13,
1678,
270,
353,
341,
29961,
29875,
29961,
29941,
29962,
1822,
29916,
272,
29898,
29950,
29961,
29875,
29961,
29941,
24960,
13,
1678,
321,
353,
341,
29961,
29875,
29961,
29946,
29962,
1822,
29916,
272,
29898,
29950,
29961,
29875,
29961,
29946,
24960,
13,
1678,
281,
353,
1015,
29961,
29941,
850,
459,
29961,
29906,
850,
459,
29961,
29896,
850,
459,
29961,
29900,
850,
29874,
29892,
29890,
511,
29883,
511,
29881,
511,
29872,
29897,
13,
1678,
736,
281,
13,
13,
13,
29893,
11197,
353,
518,
13,
1678,
518,
29945,
29892,
29871,
29955,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29946,
1402,
13,
1678,
518,
29953,
29892,
29871,
29947,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29946,
29892,
29871,
29896,
29945,
1402,
13,
1678,
518,
29900,
29892,
29871,
29955,
29892,
29871,
29929,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29945,
1402,
13,
1678,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29947,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29941,
1402,
13,
1678,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29929,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29946,
1402,
13,
1678,
518,
29941,
29892,
29871,
29906,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29945,
1402,
13,
1678,
518,
29946,
29892,
29871,
29900,
29892,
29871,
29941,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29941,
1402,
13,
1678,
518,
29896,
29892,
29871,
29946,
29892,
29871,
29945,
29892,
29871,
29896,
29906,
29892,
29871,
29896,
29946,
1402,
13,
1678,
518,
29906,
29892,
29871,
29945,
29892,
29871,
29953,
29892,
29871,
29896,
29941,
29892,
29871,
29896,
29945,
1402,
13,
1678,
518,
29900,
29892,
29871,
29941,
29892,
29871,
29953,
29892,
29871,
29955,
29892,
29871,
29896,
29946,
1402,
13,
1678,
518,
29947,
29892,
29871,
29896,
29892,
29871,
29946,
29892,
29871,
29955,
29892,
29871,
29896,
29945,
1402,
13,
1678,
518,
29947,
29892,
29871,
29900,
29892,
29871,
29906,
29892,
29871,
29945,
29892,
29871,
29929,
1402,
13,
1678,
518,
29896,
29892,
29871,
29941,
29892,
29871,
29953,
29892,
29871,
29929,
29892,
29871,
29896,
29900,
1402,
13,
1678,
518,
29906,
29892,
29871,
29946,
29892,
29871,
29955,
29892,
29871,
29896,
29900,
29892,
29871,
29896,
29896,
1402,
13,
1678,
518,
29941,
29892,
29871,
29945,
29892,
29871,
29947,
29892,
29871,
29896,
29896,
29892,
29871,
29896,
29906,
1402,
13,
1678,
518,
29896,
29906,
29892,
29871,
29946,
29892,
29871,
29953,
29892,
29871,
29929,
29892,
29871,
29896,
29941,
1402,
13,
29962,
13,
13,
1753,
2298,
29898,
29874,
29892,
29890,
1125,
13,
1678,
736,
263,
29889,
11242,
29898,
29890,
29897,
13,
13,
13,
1753,
26134,
29898,
29874,
29892,
29890,
1125,
13,
1678,
736,
263,
29889,
12254,
29898,
29890,
29897,
13,
13,
13,
29893,
29890,
3372,
4097,
353,
518,
13,
1678,
518,
12254,
29892,
2298,
29892,
2298,
29892,
2298,
1402,
13,
1678,
518,
12254,
29892,
2298,
29892,
2298,
29892,
26134,
1402,
13,
1678,
518,
11242,
29892,
2298,
29892,
26134,
29892,
2298,
1402,
13,
1678,
518,
12254,
29892,
2298,
29892,
26134,
29892,
2298,
1402,
13,
1678,
518,
11242,
29892,
2298,
29892,
26134,
29892,
26134,
1402,
13,
1678,
518,
12254,
29892,
2298,
29892,
26134,
29892,
2298,
1402,
13,
1678,
518,
12254,
29892,
26134,
29892,
26134,
29892,
2298,
1402,
13,
1678,
518,
12254,
29892,
26134,
29892,
26134,
29892,
26134,
1402,
13,
1678,
518,
12254,
29892,
26134,
29892,
2298,
29892,
26134,
1402,
13,
1678,
518,
12254,
29892,
2298,
29892,
26134,
29892,
2298,
1402,
13,
1678,
518,
12254,
29892,
26134,
29892,
26134,
29892,
2298,
1402,
13,
1678,
518,
12254,
29892,
26134,
29892,
26134,
29892,
2298,
1402,
13,
1678,
518,
11242,
29892,
26134,
29892,
26134,
29892,
2298,
1402,
13,
1678,
518,
11242,
29892,
2298,
29892,
2298,
29892,
2298,
1402,
13,
1678,
518,
12254,
29892,
2298,
29892,
26134,
29892,
26134,
1402,
13,
1678,
518,
12254,
29892,
26134,
29892,
26134,
29892,
2298,
1402,
13,
29962,
13,
13,
13,
1753,
281,
29890,
29898,
29924,
29892,
29950,
29892,
29875,
1125,
13,
1678,
736,
1207,
29956,
29898,
29924,
29892,
29950,
29892,
29893,
11197,
29961,
29875,
1402,
29893,
29890,
3372,
4097,
29961,
29875,
2314,
13,
13,
13,
1753,
413,
29890,
29898,
29926,
1125,
13,
1678,
285,
3145,
353,
318,
29953,
29946,
29898,
29900,
29916,
29900,
29945,
29945,
29945,
29945,
29945,
29945,
29945,
29892,
29871,
29900,
29916,
29945,
29945,
29945,
29945,
29945,
29945,
29945,
29945,
29897,
13,
1678,
736,
285,
3145,
29889,
18056,
368,
29898,
29884,
29953,
29946,
29898,
29900,
29892,
432,
876,
13,
13,
13,
1753,
788,
29923,
1896,
29898,
9040,
29953,
29946,
29892,
2106,
29892,
286,
29963,
1503,
29892,
474,
1125,
13,
1678,
413,
353,
413,
29890,
29898,
29875,
29897,
13,
1678,
560,
29873,
353,
313,
9040,
29953,
29946,
29961,
29885,
29963,
1503,
29961,
29900,
29962,
1822,
23361,
29918,
1563,
29898,
29885,
29963,
1503,
29961,
29896,
2314,
13,
4706,
869,
1202,
29898,
9040,
29953,
29946,
29961,
29885,
29963,
1503,
29961,
29906,
29962,
1822,
23361,
29918,
1563,
29898,
29885,
29963,
1503,
29961,
29941,
12622,
13,
4706,
869,
12254,
29898,
9040,
29953,
29946,
29961,
29885,
29963,
1503,
29961,
29945,
29962,
1822,
23361,
29918,
1563,
29898,
29885,
29963,
1503,
29961,
29953,
12622,
13,
4706,
869,
1202,
29898,
29895,
29897,
13,
4706,
869,
29916,
272,
29898,
3859,
29961,
29885,
29963,
1503,
29961,
29946,
5262,
876,
13,
1678,
736,
560,
29873,
13,
13,
13,
1753,
7985,
29906,
27748,
29898,
17915,
29892,
286,
29888,
29892,
2106,
29892,
474,
29892,
474,
29963,
1503,
29892,
286,
29963,
1503,
1125,
13,
1678,
736,
313,
17915,
29961,
29875,
29963,
1503,
29961,
29900,
5262,
13,
4706,
869,
11242,
29898,
6050,
29898,
29896,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29896,
5262,
876,
13,
4706,
869,
1202,
29898,
17915,
29961,
29875,
29963,
1503,
29961,
29906,
24960,
13,
4706,
869,
1202,
29898,
6050,
29898,
29906,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29941,
5262,
876,
13,
4706,
869,
1202,
29898,
17915,
29961,
29875,
29963,
1503,
29961,
29946,
24960,
13,
4706,
869,
1202,
29898,
6050,
29898,
29941,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29945,
5262,
876,
13,
4706,
869,
1202,
29898,
17915,
29961,
29875,
29963,
1503,
29961,
29953,
24960,
13,
4706,
869,
1202,
29898,
6050,
29898,
29946,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29955,
5262,
876,
13,
4706,
869,
1202,
29898,
17915,
29961,
29875,
29963,
1503,
29961,
29947,
24960,
13,
4706,
869,
1202,
29898,
6050,
29898,
29945,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29929,
5262,
876,
13,
4706,
869,
1202,
29898,
17915,
29961,
29875,
29963,
1503,
29961,
29896,
29900,
24960,
13,
4706,
869,
1202,
29898,
6050,
29898,
29953,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29896,
29896,
5262,
876,
13,
4706,
869,
1202,
29898,
17915,
29961,
29875,
29963,
1503,
29961,
29896,
29906,
24960,
13,
4706,
869,
1202,
29898,
6050,
29898,
29955,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29896,
29941,
5262,
876,
13,
4706,
869,
1202,
29898,
20778,
29898,
29946,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29896,
29946,
5262,
876,
13,
4706,
869,
1202,
29898,
20778,
29898,
29945,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29896,
29945,
5262,
876,
13,
4706,
869,
1202,
29898,
1202,
29923,
1896,
29898,
29885,
29888,
29892,
2106,
29892,
286,
29963,
1503,
29892,
474,
4961,
13,
13,
13,
1753,
7985,
29896,
27748,
29898,
17915,
29892,
286,
29888,
29892,
2106,
29892,
474,
29892,
474,
29963,
1503,
29892,
286,
29963,
1503,
1125,
13,
1678,
736,
313,
20778,
29898,
29896,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29900,
24960,
13,
4706,
869,
1202,
29898,
20778,
29898,
29906,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29896,
5262,
876,
13,
4706,
869,
1202,
29898,
20778,
29898,
29941,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29906,
5262,
876,
13,
4706,
869,
1202,
29898,
20778,
29898,
29900,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29941,
5262,
876,
13,
4706,
869,
1202,
29898,
20778,
29898,
29896,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29946,
5262,
876,
13,
4706,
869,
1202,
29898,
20778,
29898,
29906,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29945,
5262,
876,
13,
4706,
869,
1202,
29898,
20778,
29898,
29941,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29953,
5262,
876,
13,
4706,
869,
1202,
29898,
20778,
29898,
29900,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29955,
5262,
876,
13,
4706,
869,
1202,
29898,
20778,
29898,
29896,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29947,
5262,
876,
13,
4706,
869,
1202,
29898,
20778,
29898,
29906,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29929,
5262,
876,
13,
4706,
869,
1202,
29898,
20778,
29898,
29941,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29896,
29900,
5262,
876,
13,
4706,
869,
1202,
29898,
20778,
29898,
29900,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29896,
29896,
5262,
876,
13,
4706,
869,
1202,
29898,
20778,
29898,
29896,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29896,
29906,
5262,
876,
13,
4706,
869,
1202,
29898,
20778,
29898,
29906,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29896,
29941,
5262,
876,
13,
4706,
869,
1202,
29898,
20778,
29898,
29941,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29896,
29946,
5262,
876,
13,
4706,
869,
1202,
29898,
20778,
29898,
29900,
29892,
3855,
29873,
29961,
29875,
29963,
1503,
29961,
29896,
29945,
5262,
876,
13,
4706,
869,
1202,
29898,
1202,
29923,
1896,
29898,
29885,
29888,
29892,
2106,
29892,
286,
29963,
1503,
29892,
474,
4961,
13,
13,
13,
1753,
7985,
29896,
29890,
29898,
17915,
29892,
286,
29888,
29892,
2106,
29892,
474,
1125,
13,
1678,
474,
29963,
1503,
353,
306,
29896,
29953,
29961,
29875,
29962,
13,
1678,
286,
29963,
1503,
353,
341,
29896,
29953,
29961,
29875,
29962,
13,
1678,
736,
7985,
29896,
27748,
29898,
17915,
29892,
286,
29888,
29892,
2106,
29892,
474,
29892,
474,
29963,
1503,
29892,
286,
29963,
1503,
29897,
13,
13,
13,
1753,
7985,
29906,
29890,
29898,
17915,
29892,
286,
29888,
29892,
2106,
29892,
474,
1125,
13,
1678,
474,
29963,
1503,
353,
306,
29896,
29953,
29961,
29875,
29962,
13,
1678,
286,
29963,
1503,
353,
341,
29896,
29953,
29961,
29875,
29962,
13,
1678,
736,
7985,
29906,
27748,
29898,
17915,
29892,
286,
29888,
29892,
2106,
29892,
474,
29892,
474,
29963,
1503,
29892,
286,
29963,
1503,
29897,
13,
13,
13,
1753,
1207,
29984,
29898,
29885,
29888,
29892,
2106,
1125,
13,
1678,
3855,
29873,
353,
518,
8516,
29962,
334,
29871,
29941,
29906,
13,
1678,
363,
474,
297,
3464,
29898,
29896,
29953,
1125,
13,
4706,
281,
353,
281,
29890,
29898,
29885,
29888,
29892,
3859,
29892,
29875,
29897,
13,
4706,
269,
353,
17444,
29898,
29875,
1273,
29871,
29945,
29892,
281,
29897,
13,
4706,
3855,
29873,
29961,
29875,
29962,
353,
269,
29889,
11242,
29898,
3859,
15625,
29875,
718,
29871,
29896,
29897,
1273,
29871,
29896,
29953,
2314,
13,
1678,
3855,
29873,
29961,
29896,
29953,
29962,
353,
7985,
29896,
29890,
29898,
17915,
29892,
286,
29888,
29892,
2106,
29892,
29871,
29896,
29953,
29897,
13,
1678,
3855,
29873,
29961,
29896,
29955,
29962,
353,
7985,
29896,
29890,
29898,
17915,
29892,
286,
29888,
29892,
2106,
29892,
29871,
29896,
29955,
29897,
13,
1678,
363,
474,
297,
3464,
29898,
29896,
29947,
29892,
29871,
29941,
29906,
1125,
13,
4706,
3855,
29873,
29961,
29875,
29962,
353,
7985,
29906,
29890,
29898,
17915,
29892,
286,
29888,
29892,
2106,
29892,
474,
29897,
13,
13,
1678,
736,
3855,
29873,
13,
13,
13,
1753,
900,
29881,
29898,
524,
29953,
29946,
7701,
29892,
2106,
1125,
13,
1678,
714,
353,
518,
8516,
29962,
334,
29871,
29896,
29953,
13,
1678,
3855,
29873,
353,
1207,
29984,
29898,
524,
29953,
29946,
7701,
29892,
2106,
29897,
13,
1678,
921,
29880,
353,
318,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
17915,
29961,
29896,
29953,
1402,
3855,
29873,
29961,
29896,
29955,
1402,
3855,
29873,
29961,
29896,
29947,
1402,
3855,
29873,
29961,
29896,
29929,
1402,
3855,
29873,
29961,
29906,
29900,
1402,
3855,
29873,
29961,
29906,
29896,
1402,
3855,
29873,
29961,
29906,
29906,
1402,
3855,
29873,
29961,
29906,
29941,
2314,
13,
1678,
921,
29882,
353,
318,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
15524,
29892,
3855,
29873,
29961,
29906,
29946,
1402,
3855,
29873,
29961,
29906,
29945,
1402,
3855,
29873,
29961,
29906,
29953,
1402,
3855,
29873,
29961,
29906,
29955,
1402,
3855,
29873,
29961,
29906,
29947,
1402,
3855,
29873,
29961,
29906,
29929,
1402,
3855,
29873,
29961,
29941,
29900,
1402,
3855,
29873,
29961,
29941,
29896,
2314,
13,
1678,
714,
29961,
29900,
29962,
353,
318,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
29916,
29882,
29889,
10889,
29918,
1563,
29898,
29945,
511,
3855,
29873,
29961,
29896,
29953,
1822,
10889,
29918,
1266,
29898,
29945,
511,
938,
29953,
29946,
7701,
29961,
29900,
14664,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
15524,
29892,
3855,
29873,
29961,
29906,
29946,
1402,
3855,
29873,
29961,
29900,
12622,
13,
1678,
714,
29961,
29896,
29962,
353,
318,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
29916,
29882,
29889,
10889,
29918,
1266,
29898,
29955,
511,
3855,
29873,
29961,
29896,
29955,
1822,
10889,
29918,
1563,
29898,
29947,
511,
938,
29953,
29946,
7701,
29961,
29896,
14664,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
15524,
29892,
3855,
29873,
29961,
29906,
29945,
1402,
3855,
29873,
29961,
29896,
12622,
13,
1678,
714,
29961,
29906,
29962,
353,
318,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
29916,
29882,
29889,
10889,
29918,
1266,
29898,
29945,
511,
3855,
29873,
29961,
29896,
29947,
1822,
10889,
29918,
1563,
29898,
29945,
511,
938,
29953,
29946,
7701,
29961,
29906,
14664,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
15524,
29892,
3855,
29873,
29961,
29906,
29953,
1402,
3855,
29873,
29961,
29906,
12622,
13,
1678,
714,
29961,
29941,
29962,
353,
318,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
29916,
29882,
29889,
10889,
29918,
1266,
29898,
29896,
511,
3855,
29873,
29961,
29896,
29929,
1822,
10889,
29918,
1563,
29898,
29945,
511,
938,
29953,
29946,
7701,
29961,
29941,
14664,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
15524,
29892,
3855,
29873,
29961,
29906,
29955,
1402,
3855,
29873,
29961,
29941,
12622,
13,
1678,
714,
29961,
29946,
29962,
353,
318,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
29916,
29882,
29889,
10889,
29918,
1266,
29898,
29941,
511,
3855,
29873,
29961,
29906,
29900,
1402,
938,
29953,
29946,
7701,
29961,
29946,
14664,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
15524,
29892,
3855,
29873,
29961,
29906,
29947,
1402,
3855,
29873,
29961,
29946,
12622,
13,
1678,
714,
29961,
29945,
29962,
353,
318,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
29916,
29882,
29889,
10889,
29918,
1563,
29898,
29953,
511,
3855,
29873,
29961,
29906,
29896,
1822,
10889,
29918,
1266,
29898,
29953,
511,
938,
29953,
29946,
7701,
29961,
29945,
14664,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
15524,
29892,
3855,
29873,
29961,
29906,
29929,
1402,
3855,
29873,
29961,
29945,
12622,
13,
1678,
714,
29961,
29953,
29962,
353,
318,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
29916,
29882,
29889,
10889,
29918,
1266,
29898,
29946,
511,
3855,
29873,
29961,
29906,
29906,
1822,
10889,
29918,
1563,
29898,
29953,
511,
938,
29953,
29946,
7701,
29961,
29953,
14664,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
15524,
29892,
3855,
29873,
29961,
29941,
29900,
1402,
3855,
29873,
29961,
29953,
12622,
13,
1678,
714,
29961,
29955,
29962,
353,
318,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
29916,
29882,
29889,
10889,
29918,
1266,
29898,
29896,
29896,
511,
3855,
29873,
29961,
29906,
29941,
1822,
10889,
29918,
1563,
29898,
29906,
511,
938,
29953,
29946,
7701,
29961,
29955,
14664,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
15524,
29892,
3855,
29873,
29961,
29941,
29896,
1402,
3855,
29873,
29961,
29955,
12622,
13,
1678,
714,
29961,
29947,
29962,
353,
313,
449,
29961,
29946,
1822,
23361,
29918,
1563,
29898,
29929,
467,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
29916,
29882,
29892,
3855,
29873,
29961,
29906,
29946,
1402,
938,
29953,
29946,
7701,
29961,
29947,
12622,
13,
4706,
869,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
15524,
29889,
10889,
29918,
1563,
29898,
29947,
511,
3855,
29873,
29961,
29906,
29941,
1402,
3855,
29873,
29961,
29947,
29962,
4961,
13,
1678,
714,
29961,
29929,
29962,
353,
313,
449,
29961,
29945,
1822,
23361,
29918,
1563,
29898,
29896,
29900,
467,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
29916,
29882,
29892,
3855,
29873,
29961,
29906,
29945,
1402,
938,
29953,
29946,
7701,
29961,
29929,
12622,
13,
4706,
869,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
15524,
29889,
10889,
29918,
1266,
29898,
29953,
511,
3855,
29873,
29961,
29896,
29953,
1402,
3855,
29873,
29961,
29929,
29962,
4961,
13,
1678,
714,
29961,
29896,
29900,
29962,
353,
313,
449,
29961,
29953,
1822,
23361,
29918,
1563,
29898,
29896,
29896,
467,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
29916,
29882,
29892,
3855,
29873,
29961,
29906,
29953,
1402,
938,
29953,
29946,
7701,
29961,
29896,
29900,
12622,
13,
4706,
869,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
15524,
29889,
10889,
29918,
1563,
29898,
29953,
511,
3855,
29873,
29961,
29896,
29955,
1402,
3855,
29873,
29961,
29896,
29900,
29962,
4961,
13,
1678,
714,
29961,
29896,
29896,
29962,
353,
313,
449,
29961,
29955,
1822,
23361,
29918,
1563,
29898,
29896,
29906,
467,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
29916,
29882,
29892,
3855,
29873,
29961,
29906,
29955,
1402,
938,
29953,
29946,
7701,
29961,
29896,
29896,
12622,
13,
4706,
869,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
15524,
29889,
10889,
29918,
1563,
29898,
29946,
511,
3855,
29873,
29961,
29896,
29947,
1402,
3855,
29873,
29961,
29896,
29896,
29962,
4961,
13,
1678,
714,
29961,
29896,
29906,
29962,
353,
313,
449,
29961,
29900,
1822,
23361,
29918,
1563,
29898,
29896,
29941,
467,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
29916,
29882,
29892,
3855,
29873,
29961,
29906,
29947,
1402,
938,
29953,
29946,
7701,
29961,
29896,
29906,
12622,
13,
4706,
869,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
15524,
29889,
10889,
29918,
1266,
29898,
29941,
511,
3855,
29873,
29961,
29896,
29929,
1402,
3855,
29873,
29961,
29896,
29906,
29962,
4961,
13,
1678,
714,
29961,
29896,
29941,
29962,
353,
313,
449,
29961,
29896,
1822,
23361,
29918,
1563,
29898,
29896,
29946,
467,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
29916,
29882,
29892,
3855,
29873,
29961,
29906,
29929,
1402,
938,
29953,
29946,
7701,
29961,
29896,
29941,
12622,
13,
4706,
869,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
15524,
29889,
10889,
29918,
1266,
29898,
29946,
511,
3855,
29873,
29961,
29906,
29900,
1402,
3855,
29873,
29961,
29896,
29941,
29962,
4961,
13,
1678,
714,
29961,
29896,
29946,
29962,
353,
313,
449,
29961,
29906,
1822,
23361,
29918,
1563,
29898,
29896,
29945,
467,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
29916,
29882,
29892,
3855,
29873,
29961,
29941,
29900,
1402,
938,
29953,
29946,
7701,
29961,
29896,
29946,
12622,
13,
4706,
869,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
15524,
29889,
10889,
29918,
1266,
29898,
29955,
511,
3855,
29873,
29961,
29906,
29896,
1402,
3855,
29873,
29961,
29896,
29946,
29962,
4961,
13,
1678,
714,
29961,
29896,
29945,
29962,
353,
313,
449,
29961,
29941,
1822,
23361,
29918,
1563,
29898,
29896,
29953,
467,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
29916,
29882,
29892,
3855,
29873,
29961,
29941,
29896,
1402,
938,
29953,
29946,
7701,
29961,
29896,
29945,
12622,
13,
4706,
869,
1202,
29898,
29884,
29953,
29946,
29889,
29916,
272,
29953,
29946,
29898,
15524,
29889,
10889,
29918,
1266,
29898,
29906,
511,
3855,
29873,
29961,
29906,
29906,
1402,
3855,
29873,
29961,
29896,
29945,
29962,
4961,
13,
1678,
736,
714,
13,
13,
13,
1753,
27122,
29898,
9721,
29892,
2106,
1125,
13,
1678,
18392,
29953,
29946,
353,
1015,
29889,
13193,
29918,
517,
29918,
29884,
29953,
29946,
29918,
1761,
29918,
280,
29898,
9721,
29892,
7431,
29898,
9721,
876,
13,
1678,
736,
900,
29881,
29898,
9721,
29953,
29946,
29892,
2106,
29897,
13,
13,
13,
1753,
289,
29885,
29893,
29918,
5504,
29898,
13073,
29892,
10191,
1125,
13,
1678,
298,
7050,
353,
518,
8516,
29962,
334,
29871,
29896,
29953,
13,
1678,
10191,
29918,
2435,
353,
7431,
29898,
7645,
29897,
13,
1678,
7431,
29931,
29941,
353,
318,
29953,
29946,
29898,
29900,
29892,
10191,
29918,
2435,
29897,
13,
1678,
7431,
29931,
29941,
353,
7431,
29931,
29941,
29889,
10889,
29918,
1563,
29898,
29941,
29897,
13,
1678,
12893,
1839,
2966,
3981,
13359,
1202,
29898,
2435,
29931,
29941,
29897,
13,
1678,
18392,
353,
12893,
1839,
9040,
2033,
13,
1678,
18392,
29918,
2435,
353,
7431,
29898,
9721,
29897,
13,
1678,
23246,
353,
12893,
1839,
7414,
2033,
13,
1678,
298,
29896,
353,
12893,
1839,
3859,
2033,
13,
1678,
298,
29906,
353,
298,
7050,
13,
1678,
1550,
10191,
29918,
2435,
1405,
29871,
29900,
29901,
13,
4706,
1067,
264,
353,
18392,
29918,
2435,
448,
23246,
13,
4706,
565,
1067,
264,
1405,
10191,
29918,
2435,
29901,
13,
9651,
1067,
264,
353,
10191,
29918,
2435,
13,
4706,
1015,
29889,
9040,
29918,
7851,
29898,
9721,
29892,
23246,
29892,
10191,
29892,
1067,
264,
29897,
13,
4706,
10191,
353,
10191,
29961,
695,
264,
17531,
13,
4706,
10191,
29918,
2435,
22361,
1067,
264,
13,
4706,
23246,
4619,
1067,
264,
13,
4706,
565,
23246,
338,
18392,
29918,
2435,
29901,
13,
9651,
298,
29906,
353,
27122,
29898,
9721,
29892,
298,
29896,
29897,
13,
9651,
298,
29873,
353,
298,
29896,
13,
9651,
298,
29896,
353,
298,
29906,
13,
9651,
298,
29906,
353,
298,
29873,
13,
9651,
23246,
353,
29871,
29900,
13,
13,
13,
1678,
12893,
1839,
7414,
2033,
353,
23246,
13,
1678,
2106,
353,
12893,
1839,
3859,
2033,
13,
1678,
565,
298,
29896,
338,
451,
2106,
29901,
13,
4706,
2106,
29918,
2435,
353,
7431,
29898,
3859,
29897,
13,
4706,
1015,
29889,
9040,
29918,
7851,
29898,
3859,
29892,
29871,
29900,
29892,
298,
29896,
29892,
2106,
29918,
2435,
29897,
13,
13,
1753,
289,
29885,
29893,
29918,
5358,
29898,
13073,
1125,
13,
1678,
298,
29906,
353,
518,
8516,
29962,
334,
29871,
29896,
29953,
13,
13,
1678,
18392,
353,
12893,
1839,
9040,
2033,
13,
1678,
23246,
353,
12893,
1839,
7414,
2033,
13,
1678,
18392,
29918,
2435,
353,
7431,
29898,
9721,
29897,
13,
1678,
18392,
29961,
7414,
29962,
353,
29871,
29900,
29916,
29947,
29900,
13,
1678,
23246,
4619,
29871,
29896,
13,
1678,
298,
2792,
353,
12893,
1839,
3859,
2033,
13,
1678,
565,
23246,
1405,
18392,
29918,
2435,
448,
29871,
29947,
29901,
13,
4706,
731,
29918,
2435,
353,
18392,
29918,
2435,
448,
23246,
13,
4706,
18392,
29961,
7414,
29901,
7414,
29974,
842,
29918,
2435,
29962,
353,
518,
29900,
29962,
334,
731,
29918,
2435,
13,
4706,
298,
2792,
353,
27122,
29898,
9721,
29892,
298,
2792,
29897,
13,
4706,
23246,
353,
29871,
29900,
13,
13,
1678,
731,
29918,
2435,
353,
18392,
29918,
2435,
448,
29871,
29947,
448,
23246,
13,
1678,
18392,
29961,
7414,
29901,
7414,
29974,
842,
29918,
2435,
29962,
353,
518,
29900,
29962,
334,
731,
29918,
2435,
13,
1678,
2094,
29918,
1066,
353,
18392,
29918,
2435,
448,
29871,
29947,
13,
1678,
2094,
29918,
1272,
353,
12893,
1839,
2966,
3981,
2033,
13,
1678,
18392,
29961,
3977,
29918,
1066,
29974,
29900,
29901,
3977,
29918,
1066,
29974,
29946,
29962,
353,
4870,
877,
29966,
29902,
742,
2094,
29918,
1272,
29889,
417,
29897,
13,
1678,
18392,
29961,
3977,
29918,
1066,
29974,
29946,
29901,
3977,
29918,
1066,
29974,
29947,
29962,
353,
4870,
877,
29966,
29902,
742,
2094,
29918,
1272,
29889,
2918,
29897,
13,
1678,
298,
29906,
353,
27122,
29898,
9721,
29892,
298,
2792,
29897,
13,
1678,
363,
318,
297,
3464,
29898,
29896,
29953,
1125,
13,
4706,
2094,
29918,
1066,
353,
29871,
29947,
334,
318,
13,
4706,
2094,
29918,
1272,
353,
298,
29906,
29961,
29884,
29962,
13,
4706,
18392,
29961,
3977,
29918,
1066,
29974,
29900,
29901,
3977,
29918,
1066,
29974,
29946,
29962,
353,
4870,
877,
29966,
29902,
742,
2094,
29918,
1272,
29889,
417,
29897,
13,
4706,
18392,
29961,
3977,
29918,
1066,
29974,
29946,
29901,
3977,
29918,
1066,
29974,
29947,
29962,
353,
4870,
877,
29966,
29902,
742,
2094,
29918,
1272,
29889,
2918,
29897,
13,
1678,
298,
29896,
353,
27122,
29898,
9721,
29892,
2186,
29897,
13,
1678,
714,
353,
518,
8516,
29962,
334,
29871,
29896,
29953,
13,
1678,
363,
318,
297,
3464,
29898,
29947,
1125,
13,
4706,
325,
353,
318,
718,
29871,
29947,
13,
4706,
714,
29961,
29906,
334,
318,
29962,
353,
1015,
29889,
26276,
29941,
29906,
29898,
29882,
29896,
29961,
29894,
1822,
417,
29897,
13,
4706,
714,
29961,
29906,
334,
318,
718,
29871,
29896,
29962,
353,
1015,
29889,
26276,
29941,
29906,
29898,
29882,
29896,
29961,
29894,
1822,
2918,
29897,
13,
1678,
736,
714,
13,
13,
13,
1753,
289,
29885,
29893,
29898,
7645,
29892,
714,
29918,
2378,
29922,
8824,
29892,
297,
29918,
2378,
29922,
8824,
1125,
13,
1678,
12893,
353,
6571,
13,
1678,
12893,
1839,
3859,
2033,
353,
478,
29918,
26019,
7503,
29962,
13,
1678,
12893,
1839,
7414,
2033,
353,
29871,
29900,
13,
1678,
12893,
1839,
2966,
3981,
2033,
353,
318,
29953,
29946,
29898,
29900,
29892,
29871,
29900,
29897,
13,
1678,
12893,
1839,
9040,
2033,
353,
7023,
2378,
29898,
29896,
29906,
29947,
29897,
13,
1678,
565,
297,
29918,
2378,
29901,
13,
4706,
10191,
353,
1015,
29889,
13193,
29918,
3166,
29918,
29875,
29941,
29906,
29918,
1761,
29898,
7645,
29897,
13,
1678,
289,
29885,
29893,
29918,
5504,
29898,
13073,
29892,
10191,
29897,
13,
1678,
620,
353,
289,
29885,
29893,
29918,
5358,
29898,
13073,
29897,
13,
1678,
565,
451,
714,
29918,
2378,
29901,
13,
4706,
620,
353,
1015,
29889,
13193,
29918,
3166,
29918,
29875,
29941,
29906,
29918,
1761,
29898,
690,
29897,
13,
1678,
736,
620,
13,
2
] |
PyMOTW/source/sysconfig/sysconfig_get_path_names.py | axetang/AxePython | 1 | 81430 | <reponame>axetang/AxePython
#!/usr/bin/env python3
# encoding: utf-8
#
# Copyright (c) 2010 <NAME>. All rights reserved.
#
"""The names of the paths in a scheme.
"""
#end_pymotw_header
import sysconfig
for name in sysconfig.get_path_names():
print(name)
| [
1,
529,
276,
1112,
420,
29958,
1165,
300,
574,
29914,
29909,
17115,
11980,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
8025,
29901,
23616,
29899,
29947,
13,
29937,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29900,
529,
5813,
15513,
29871,
2178,
10462,
21676,
29889,
13,
29937,
13,
15945,
29908,
1576,
2983,
310,
278,
10898,
297,
263,
11380,
29889,
13,
15945,
29908,
13,
13,
29937,
355,
29918,
29886,
962,
327,
29893,
29918,
6672,
13,
5215,
10876,
2917,
13,
13,
1454,
1024,
297,
10876,
2917,
29889,
657,
29918,
2084,
29918,
7039,
7295,
13,
1678,
1596,
29898,
978,
29897,
13,
2
] |
diceThing.py | HappyNapalm/dungeon_crawl_python | 0 | 92109 | from random import randint
while(True):
stats=[0,1,2,3,4,5]
i=0
while(i<6):
a=1
j=0
while(j<4):
a = a+randint(1,6)
if(a>8&a<18):
j=j+1
a = a-3
stats[i] = a
i=i+1
print("\nWhat is your race Adventurer?\n")
race = input()
race_parse = race.lowercase()
if (race_parse == "human"):
print("Str :",stats[0])
print("Dex :",stats[1])
print("Con :",stats[2])
print("Int :",stats[3])
print("Wis :",stats[4])
print("Cha :",stats[5])
elif (race_parse == "dwarf"):
print("Str :",stats[0])
print("Dex :",stats[1])
print("Con :",stats[2]+2)
print("Int :",stats[3])
print("Wis :",stats[4])
print("Cha :",stats[5]-2)
elif (race_parse == "elf"):
print("Str :",stats[0])
print("Dex :",stats[1]+2)
print("Con :",stats[2]-2)
print("Int :",stats[3])
print("Wis :",stats[4])
print("Cha :",stats[5])
elif (race_parse == "half-elf"):
print("Str :",stats[0])
print("Dex :",stats[1])
print("Con :",stats[2])
print("Int :",stats[3])
print("Wis :",stats[4])
print("Cha :",stats[5])
elif (race_parse == "half-orc"):
print("Str :",stats[0]+2)
print("Dex :",stats[1])
print("Con :",stats[2])
print("Int :",stats[3]-2)
print("Wis :",stats[4])
print("Cha :",stats[5]-2)
elif (race_parse == "halfling"):
print("Str :",stats[0]-2)
print("Dex :",stats[1]+2)
print("Con :",stats[2])
print("Int :",stats[3])
print("Wis :",stats[4])
print("Cha :",stats[5])
elif (race == "gnome"):
print("Str :",stats[0]-2)
print("Dex :",stats[1]+2)
print("Con :",stats[2])
print("Int :",stats[3])
print("Wis :",stats[4])
print("Cha :",stats[5])
else:
print("Speak up Champion!")
| [
1,
515,
4036,
1053,
20088,
524,
30004,
13,
8000,
29898,
5574,
1125,
30004,
13,
30004,
13,
1678,
22663,
11759,
29900,
29892,
29896,
29892,
29906,
29892,
29941,
29892,
29946,
29892,
29945,
29962,
30004,
13,
30004,
13,
1678,
474,
29922,
29900,
30004,
13,
30004,
13,
1678,
1550,
29898,
29875,
29966,
29953,
1125,
30004,
13,
4706,
263,
29922,
29896,
30004,
13,
4706,
432,
29922,
29900,
30004,
13,
4706,
1550,
29898,
29926,
29966,
29946,
1125,
30004,
13,
9651,
263,
353,
263,
29974,
9502,
524,
29898,
29896,
29892,
29953,
8443,
13,
9651,
565,
29898,
29874,
29958,
29947,
29987,
29874,
29966,
29896,
29947,
1125,
30004,
13,
18884,
432,
29922,
29926,
29974,
29896,
30004,
13,
4706,
263,
353,
263,
29899,
29941,
1678,
6756,
13,
4706,
22663,
29961,
29875,
29962,
353,
263,
30004,
13,
4706,
474,
29922,
29875,
29974,
29896,
30004,
13,
30004,
13,
1678,
1596,
14182,
29876,
5618,
338,
596,
8175,
21255,
9945,
29973,
29905,
29876,
1159,
30004,
13,
1678,
8175,
353,
1881,
26471,
13,
1678,
8175,
29918,
5510,
353,
8175,
29889,
13609,
4878,
26471,
13,
1678,
565,
313,
25525,
29918,
5510,
1275,
376,
26029,
29908,
1125,
30004,
13,
4706,
1596,
703,
5015,
584,
613,
16202,
29961,
29900,
2314,
30004,
13,
4706,
1596,
703,
29928,
735,
584,
613,
16202,
29961,
29896,
2314,
30004,
13,
4706,
1596,
703,
1168,
584,
613,
16202,
29961,
29906,
2314,
30004,
13,
4706,
1596,
703,
2928,
584,
613,
16202,
29961,
29941,
2314,
30004,
13,
4706,
1596,
703,
29956,
275,
584,
613,
16202,
29961,
29946,
2314,
30004,
13,
4706,
1596,
703,
1451,
29874,
584,
613,
16202,
29961,
29945,
2314,
30004,
13,
1678,
25342,
313,
25525,
29918,
5510,
1275,
376,
29881,
4495,
29888,
29908,
1125,
30004,
13,
4706,
1596,
703,
5015,
584,
613,
16202,
29961,
29900,
2314,
30004,
13,
4706,
1596,
703,
29928,
735,
584,
613,
16202,
29961,
29896,
2314,
30004,
13,
4706,
1596,
703,
1168,
584,
613,
16202,
29961,
29906,
10062,
29906,
8443,
13,
4706,
1596,
703,
2928,
584,
613,
16202,
29961,
29941,
2314,
30004,
13,
4706,
1596,
703,
29956,
275,
584,
613,
16202,
29961,
29946,
2314,
30004,
13,
4706,
1596,
703,
1451,
29874,
584,
613,
16202,
29961,
29945,
29962,
29899,
29906,
8443,
13,
1678,
25342,
313,
25525,
29918,
5510,
1275,
376,
761,
29908,
1125,
30004,
13,
4706,
1596,
703,
5015,
584,
613,
16202,
29961,
29900,
2314,
30004,
13,
4706,
1596,
703,
29928,
735,
584,
613,
16202,
29961,
29896,
10062,
29906,
8443,
13,
4706,
1596,
703,
1168,
584,
613,
16202,
29961,
29906,
29962,
29899,
29906,
8443,
13,
4706,
1596,
703,
2928,
584,
613,
16202,
29961,
29941,
2314,
30004,
13,
4706,
1596,
703,
29956,
275,
584,
613,
16202,
29961,
29946,
2314,
30004,
13,
4706,
1596,
703,
1451,
29874,
584,
613,
16202,
29961,
29945,
2314,
30004,
13,
1678,
25342,
313,
25525,
29918,
5510,
1275,
376,
24498,
29899,
761,
29908,
1125,
30004,
13,
4706,
1596,
703,
5015,
584,
613,
16202,
29961,
29900,
2314,
30004,
13,
4706,
1596,
703,
29928,
735,
584,
613,
16202,
29961,
29896,
2314,
30004,
13,
4706,
1596,
703,
1168,
584,
613,
16202,
29961,
29906,
2314,
30004,
13,
4706,
1596,
703,
2928,
584,
613,
16202,
29961,
29941,
2314,
30004,
13,
4706,
1596,
703,
29956,
275,
584,
613,
16202,
29961,
29946,
2314,
30004,
13,
4706,
1596,
703,
1451,
29874,
584,
613,
16202,
29961,
29945,
2314,
30004,
13,
1678,
25342,
313,
25525,
29918,
5510,
1275,
376,
24498,
29899,
272,
29883,
29908,
1125,
30004,
13,
4706,
1596,
703,
5015,
584,
613,
16202,
29961,
29900,
10062,
29906,
8443,
13,
4706,
1596,
703,
29928,
735,
584,
613,
16202,
29961,
29896,
2314,
30004,
13,
4706,
1596,
703,
1168,
584,
613,
16202,
29961,
29906,
2314,
30004,
13,
4706,
1596,
703,
2928,
584,
613,
16202,
29961,
29941,
29962,
29899,
29906,
8443,
13,
4706,
1596,
703,
29956,
275,
584,
613,
16202,
29961,
29946,
2314,
30004,
13,
4706,
1596,
703,
1451,
29874,
584,
613,
16202,
29961,
29945,
29962,
29899,
29906,
8443,
13,
1678,
25342,
313,
25525,
29918,
5510,
1275,
376,
4077,
1579,
292,
29908,
1125,
30004,
13,
4706,
1596,
703,
5015,
584,
613,
16202,
29961,
29900,
29962,
29899,
29906,
8443,
13,
4706,
1596,
703,
29928,
735,
584,
613,
16202,
29961,
29896,
10062,
29906,
8443,
13,
4706,
1596,
703,
1168,
584,
613,
16202,
29961,
29906,
2314,
30004,
13,
4706,
1596,
703,
2928,
584,
613,
16202,
29961,
29941,
2314,
30004,
13,
4706,
1596,
703,
29956,
275,
584,
613,
16202,
29961,
29946,
2314,
30004,
13,
4706,
1596,
703,
1451,
29874,
584,
613,
16202,
29961,
29945,
2314,
30004,
13,
1678,
25342,
313,
25525,
1275,
376,
5138,
608,
29908,
1125,
30004,
13,
4706,
1596,
703,
5015,
584,
613,
16202,
29961,
29900,
29962,
29899,
29906,
8443,
13,
4706,
1596,
703,
29928,
735,
584,
613,
16202,
29961,
29896,
10062,
29906,
8443,
13,
4706,
1596,
703,
1168,
584,
613,
16202,
29961,
29906,
2314,
30004,
13,
4706,
1596,
703,
2928,
584,
613,
16202,
29961,
29941,
2314,
30004,
13,
4706,
1596,
703,
29956,
275,
584,
613,
16202,
29961,
29946,
2314,
30004,
13,
4706,
1596,
703,
1451,
29874,
584,
613,
16202,
29961,
29945,
2314,
30004,
13,
1678,
1683,
29901,
30004,
13,
4706,
1596,
703,
10649,
557,
701,
5257,
29991,
1159,
30004,
13,
2
] |
setup.py | finsberg/scholar_bot | 0 | 20466 | <reponame>finsberg/scholar_bot
# -*- coding: utf-8 -*-
import os
import sys
import platform
import glob
from setuptools import setup, find_packages, Command
if sys.version_info < (3, 6):
print("Python 3.6 or higher required, please upgrade.")
sys.exit(1)
version = "0.1"
name = "scholar_bot"
description = ("Post updates on Slack about citations "
"for the Computational Phyisoligy department at Simula")
scripts = glob.glob("bin/*")
requirements = ['slackclient', 'scholarly', 'pyyaml']
if platform.system() == "Windows" or "bdist_wininst" in sys.argv:
# In the Windows command prompt we can't execute Python scripts
# without a .py extension. A solution is to create batch files
# that runs the different scripts.
batch_files = []
for script in scripts:
batch_file = script + ".bat"
f = open(batch_file, "w")
f.write(r'python "%%~dp0\%s" %%*\n' % os.path.split(script)[1])
f.close()
batch_files.append(batch_file)
scripts.extend(batch_files)
def run_install():
"Run installation"
# Call distutils to perform installation
setup(
name=name,
description=description,
version=version,
author='<NAME>',
license="MIT",
author_email="<EMAIL>",
platforms=["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],
packages=["scholar_bot"],
package_dir={"scholar_bot": "scholar_bot"},
# install_requires=requirements,
scripts=scripts,
zip_safe=False,
)
if __name__ == "__main__":
run_install()
| [
1,
529,
276,
1112,
420,
29958,
29888,
1144,
2552,
29914,
816,
10170,
29918,
7451,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
5215,
2897,
13,
5215,
10876,
13,
5215,
7481,
13,
5215,
13149,
13,
13,
3166,
731,
21245,
8789,
1053,
6230,
29892,
1284,
29918,
8318,
29892,
10516,
13,
13,
13,
361,
10876,
29889,
3259,
29918,
3888,
529,
313,
29941,
29892,
29871,
29953,
1125,
13,
1678,
1596,
703,
11980,
29871,
29941,
29889,
29953,
470,
6133,
3734,
29892,
3113,
14955,
23157,
13,
1678,
10876,
29889,
13322,
29898,
29896,
29897,
13,
13,
3259,
353,
376,
29900,
29889,
29896,
29908,
13,
978,
353,
376,
816,
10170,
29918,
7451,
29908,
13,
8216,
353,
4852,
6747,
11217,
373,
317,
2364,
1048,
7537,
800,
376,
13,
1669,
376,
1454,
278,
11796,
1288,
1963,
29891,
275,
324,
335,
29891,
14311,
472,
3439,
2497,
1159,
13,
16713,
353,
13149,
29889,
23705,
703,
2109,
5515,
1159,
13,
12277,
1860,
353,
6024,
29879,
2364,
4645,
742,
525,
816,
10170,
368,
742,
525,
2272,
25162,
2033,
13,
13,
361,
7481,
29889,
5205,
580,
1275,
376,
7685,
29908,
470,
376,
29890,
5721,
29918,
5080,
2611,
29908,
297,
10876,
29889,
19218,
29901,
13,
1678,
396,
512,
278,
3852,
1899,
9508,
591,
508,
29915,
29873,
6222,
5132,
12078,
13,
1678,
396,
1728,
263,
869,
2272,
6081,
29889,
319,
1650,
338,
304,
1653,
9853,
2066,
13,
1678,
396,
393,
6057,
278,
1422,
12078,
29889,
13,
1678,
9853,
29918,
5325,
353,
5159,
13,
1678,
363,
2471,
297,
12078,
29901,
13,
4706,
9853,
29918,
1445,
353,
2471,
718,
11393,
10222,
29908,
13,
4706,
285,
353,
1722,
29898,
16175,
29918,
1445,
29892,
376,
29893,
1159,
13,
4706,
285,
29889,
3539,
29898,
29878,
29915,
4691,
376,
7686,
30022,
6099,
29900,
8958,
29879,
29908,
17806,
17710,
29876,
29915,
1273,
2897,
29889,
2084,
29889,
5451,
29898,
2154,
9601,
29896,
2314,
13,
4706,
285,
29889,
5358,
580,
13,
4706,
9853,
29918,
5325,
29889,
4397,
29898,
16175,
29918,
1445,
29897,
13,
1678,
12078,
29889,
21843,
29898,
16175,
29918,
5325,
29897,
13,
13,
13,
13,
1753,
1065,
29918,
6252,
7295,
13,
1678,
376,
6558,
11161,
29908,
13,
13,
1678,
396,
8251,
1320,
13239,
304,
2189,
11161,
13,
1678,
6230,
29898,
13,
4706,
1024,
29922,
978,
29892,
13,
4706,
6139,
29922,
8216,
29892,
13,
4706,
1873,
29922,
3259,
29892,
13,
4706,
4148,
2433,
29966,
5813,
29958,
742,
13,
4706,
19405,
543,
26349,
613,
13,
4706,
4148,
29918,
5269,
543,
29966,
26862,
6227,
28341,
13,
4706,
21796,
29922,
3366,
7685,
613,
376,
24085,
613,
376,
29903,
10170,
275,
613,
376,
15735,
6570,
29899,
29990,
613,
376,
2525,
861,
12436,
13,
4706,
9741,
29922,
3366,
816,
10170,
29918,
7451,
12436,
13,
4706,
3577,
29918,
3972,
3790,
29908,
816,
10170,
29918,
7451,
1115,
376,
816,
10170,
29918,
7451,
10758,
13,
4706,
396,
2601,
29918,
276,
339,
2658,
29922,
12277,
1860,
29892,
13,
4706,
12078,
29922,
16713,
29892,
13,
4706,
14319,
29918,
11177,
29922,
8824,
29892,
13,
1678,
1723,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1065,
29918,
6252,
580,
13,
2
] |
Assignment1/old - hpc tested/hw1/Task2-c/src/mapper.py | HyperTars/NYC-Taxi-Analysis | 0 | 194352 | #!/usr/bin/env python
import sys
for line in sys.stdin:
# extract data
key, val = line.strip().split('\t', 1)
# passenger_count
try:
key = int(val.split(',')[3])
except ValueError:
continue
# print
print '%s\t%s' % (key, 1)
'''
cd ~/hw1/Task2-c/
rm -rf NumberPassengersSamp.out
hfs -rm -r NumberPassengersSamp.out
hjs -D mapreduce.job.reduces=0 \
-file ~/hw1/Task2-c/src/ \
-mapper src/mapper.sh \
-input /user/wl2154/TripFareJoinSamp.txt \
-output /user/wl2154/NumberPassengersSamp.out
hfs -get NumberPassengersSamp.out
hfs -getmerge NumberPassengersSamp.out NumberPassengersSamp.txt
cat NumberPassengersSamp.txt
'''
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
5215,
10876,
13,
13,
1454,
1196,
297,
10876,
29889,
4172,
262,
29901,
13,
1678,
396,
6597,
848,
13,
1678,
1820,
29892,
659,
353,
1196,
29889,
17010,
2141,
5451,
28909,
29873,
742,
29871,
29896,
29897,
13,
13,
1678,
396,
28507,
29918,
2798,
13,
1678,
1018,
29901,
13,
4706,
1820,
353,
938,
29898,
791,
29889,
5451,
29317,
29861,
29941,
2314,
13,
1678,
5174,
7865,
2392,
29901,
13,
4706,
6773,
13,
13,
1678,
396,
1596,
13,
1678,
1596,
14210,
29879,
29905,
29873,
29995,
29879,
29915,
1273,
313,
1989,
29892,
29871,
29896,
29897,
13,
13,
12008,
13,
2252,
3695,
29914,
26828,
29896,
29914,
5398,
29906,
29899,
29883,
29914,
13,
1758,
448,
9600,
9681,
7129,
21709,
29903,
1160,
29889,
449,
13,
29882,
5847,
448,
1758,
448,
29878,
9681,
7129,
21709,
29903,
1160,
29889,
449,
13,
29882,
1315,
448,
29928,
2910,
17469,
29889,
9057,
29889,
9313,
778,
29922,
29900,
320,
13,
29899,
1445,
3695,
29914,
26828,
29896,
29914,
5398,
29906,
29899,
29883,
29914,
4351,
29914,
320,
13,
29899,
655,
2496,
4765,
29914,
655,
2496,
29889,
845,
320,
13,
29899,
2080,
847,
1792,
29914,
29893,
29880,
29906,
29896,
29945,
29946,
29914,
29911,
6472,
29943,
598,
17242,
29903,
1160,
29889,
3945,
320,
13,
29899,
4905,
847,
1792,
29914,
29893,
29880,
29906,
29896,
29945,
29946,
29914,
4557,
7129,
21709,
29903,
1160,
29889,
449,
13,
29882,
5847,
448,
657,
9681,
7129,
21709,
29903,
1160,
29889,
449,
13,
29882,
5847,
448,
657,
14634,
9681,
7129,
21709,
29903,
1160,
29889,
449,
9681,
7129,
21709,
29903,
1160,
29889,
3945,
13,
4117,
9681,
7129,
21709,
29903,
1160,
29889,
3945,
13,
12008,
13,
2
] |
db/models/example.py | thesnapdragon/python-cli | 0 | 149032 | <reponame>thesnapdragon/python-cli
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, String
Base = declarative_base()
class Example(Base):
__tablename__ = 'examples'
id = Column(Integer, primary_key=True)
name = Column(String)
def __init__(self, id_, name):
self.id = id_
self.name = name
def __repr__(self):
return "<Example(%s, %s)>" % (self.id, self.name)
| [
1,
529,
276,
1112,
420,
29958,
26041,
8971,
20515,
265,
29914,
4691,
29899,
11303,
13,
3166,
4576,
284,
305,
6764,
29889,
1062,
29889,
311,
16544,
1230,
1053,
7669,
1230,
29918,
3188,
13,
3166,
4576,
284,
305,
6764,
1053,
12481,
29892,
8102,
29892,
1714,
13,
13,
5160,
353,
7669,
1230,
29918,
3188,
580,
13,
13,
13,
1990,
8741,
29898,
5160,
1125,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
19057,
29915,
13,
13,
1678,
1178,
353,
12481,
29898,
7798,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
1024,
353,
12481,
29898,
1231,
29897,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1178,
3383,
1024,
1125,
13,
4706,
1583,
29889,
333,
353,
1178,
29918,
13,
4706,
1583,
29889,
978,
353,
1024,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
736,
9872,
14023,
29414,
29879,
29892,
1273,
29879,
29897,
11903,
1273,
313,
1311,
29889,
333,
29892,
1583,
29889,
978,
29897,
13,
2
] |
deepvariant/runtime_by_region_vis.py | tahashmi/deepvariant | 4 | 6049 | <filename>deepvariant/runtime_by_region_vis.py
# Copyright 2020 Google LLC.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from this
# software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
r"""Create a visual report of make_examples runtime by region.
Use this script to visualize the runtime-by-region data generated by running
make_examples with --runtime_by_region.
"""
from typing import Dict, Sequence, List, Tuple, Text, Any, Union
from absl import app
from absl import flags
import altair as alt
import pandas as pd
import tensorflow as tf
from third_party.nucleus.io import sharded_file_utils
# Altair uses a lot of method chaining, such as
# chart.mark_bar().encode(...).properties(...), so using backslash
# continuation to break this into separate lines makes the code more readable.
# pylint: disable=g-backslash-continuation
VEGA_URL = 'https://storage.googleapis.com/deepvariant/lib/vega'
FLAGS = flags.FLAGS
flags.DEFINE_string(
'input', None, 'TSV file that was produced when running make_examples '
'with --runtime_by_region. Can be sharded, e.g. /path/[email protected].')
flags.DEFINE_string(
'title', None, 'Title will be shown at the top of the report and will '
'be used as a prefix for downloaded image files.')
flags.DEFINE_string('output', 'runtime_by_region_report.html',
'Path for the output report, which will be an html file.')
RUNTIME_COLUMNS = [
'get reads', 'find candidates', 'make pileup images', 'write outputs'
]
COUNT_COLUMNS = ['num reads', 'num candidates', 'num examples']
CSS_STYLES = """
<style>
body {
font-family: sans-serif;
}
.chart-container {
padding: 30px;
}
</style>
"""
def read_sharded_runtime_tsvs(path_string: str) -> pd.DataFrame:
"""Imports data from a single or sharded path into a pandas dataframe.
Args:
path_string: The path to the input file, which may be sharded.
Returns:
A dataframe matching the TSV file(s) but with added Task column.
"""
if sharded_file_utils.is_sharded_file_spec(path_string):
paths = sharded_file_utils.generate_sharded_filenames(path_string)
else:
paths = [path_string]
list_of_dataframes = []
for i, path in enumerate(paths):
if path.startswith('gs://'):
# Once pandas is updated to 0.24+, pd.read_csv will work for gs://
# without this workaround.
with tf.io.gfile.GFile(path) as f:
d = pd.read_csv(f, sep='\t')
else:
d = pd.read_csv(path, sep='\t')
d['Task'] = i
list_of_dataframes.append(d)
return pd.concat(list_of_dataframes, axis=0, ignore_index=True)
def format_runtime_string(raw_seconds: float) -> str:
"""Creates a nice format string from a potentially large number of seconds.
Args:
raw_seconds: A number of seconds.
Returns:
The seconds divided into hours, minutes, and remaining seconds, formatted
nicely. For example, 2h3m5.012s.
"""
minutes, seconds = divmod(raw_seconds, 60)
hours, minutes = divmod(minutes, 60)
seconds = round(seconds, 3)
output = ''
if hours > 0:
output += f'{int(hours)}h'
if minutes > 0:
output += f'{int(minutes)}m'
if seconds > 0 or not output:
output += f'{seconds}s'
return output
def calculate_totals(df: pd.DataFrame) -> pd.DataFrame:
"""Calculates total runtime, formats it nicely, and sorts by it.
Args:
df: A dataframe of runtime profiling numbers.
Returns:
The same dataframe with some additional summary columns.
"""
# 'total runtime' is a simple sum of the runtime columns.
df['total runtime'] = df[RUNTIME_COLUMNS].sum(axis=1)
# Create a formatted runtime string for tooltips.
df['Runtime'] = df['total runtime'].apply(format_runtime_string)
# Sort by descending total region runtime.
df.sort_values(by='total runtime', inplace=True, ascending=False)
return df
def summarize_by_task(df: pd.DataFrame) -> pd.DataFrame:
"""Groups regions to get the total runtime for each task.
Args:
df: A dataframe of runtime profiling numbers.
Returns:
The dataframe grouped by task.
"""
by_task = df.groupby(by=['Task']).sum()
return by_task.reset_index()
def stage_histogram(d: pd.DataFrame, title: str = '') -> alt.Chart:
"""Plots a histogram of runtimes stacked by stage.
Args:
d: A dataframe of runtimes, either by region or by task.
title: A title for the plot.
Returns:
An altair chart.
"""
columns_used = RUNTIME_COLUMNS
d = d[columns_used]
return alt.Chart(d).transform_fold(
RUNTIME_COLUMNS, as_=['Stage', 'runtime_by_stage']) \
.mark_bar(opacity=0.3) \
.encode(
x=alt.X('runtime_by_stage:Q', bin=alt.Bin(maxbins=100),
title='Runtime (seconds)'),
y=alt.Y('count()', title='Count of regions', stack=None),
color=alt.Color('Stage:N', sort=None)
).properties(title=title)
def correlation_scatter_charts(d: pd.DataFrame, title: str = '') -> alt.Chart:
"""Produces a grid of scatter plots of runtimes of stages versus covariates.
Args:
d: A pandas dataframe of runtime by regions.
title: A title for the plot.
Returns:
An altair chart
"""
columns_used = ['region', 'total runtime'] + RUNTIME_COLUMNS + COUNT_COLUMNS
d = d[columns_used]
return alt.Chart(d).mark_circle(opacity=0.1).encode(
x=alt.X(alt.repeat('column'), type='quantitative',
axis=alt.Axis(labelExpr="datum.value + 's'")),
y=alt.Y(alt.repeat('row'), type='quantitative'),
tooltip='region'
).properties(width=100, height=100) \
.repeat(
column=['total runtime'] + RUNTIME_COLUMNS,
row=COUNT_COLUMNS,
).properties(title=title)
def totals_by_stage(d: pd.DataFrame) -> alt.Chart:
"""Plots total runtimes for each stage.
Args:
d: A dataframe of runtimes.
Returns:
An altair chart.
"""
stage_totals_series = d.sum()[RUNTIME_COLUMNS]
stage_totals = pd.DataFrame(
stage_totals_series, columns=['Runtime (seconds)'])
stage_totals.reset_index(inplace=True)
stage_totals = stage_totals.rename(columns={'index': 'Stage'})
stage_totals['Runtime'] = stage_totals['Runtime (seconds)'].apply(
format_runtime_string)
return alt.Chart(stage_totals).mark_bar().encode(
x='Runtime (seconds)',
y=alt.Y('Stage', sort=None),
tooltip=['Runtime'],
fill=alt.Fill('Stage',
sort=None)).properties(title='Overall runtime by stage')
def pareto_by_task_tooltip(row: pd.Series) -> str:
"""For one row of a dataframe, computes a tooltip description.
Args:
row: A Pandas Series, one row of a dataframe containing some specific
cumulative sum columns.
Returns:
A string to show as the tooltip for a pareto curve.
"""
return (f"{row['task cumsum order'] * 100:.2f}% of regions "
f"account for {row['task cumsum fraction'] * 100:.2f}% of "
f"the runtime in task {row['Task']}")
def calculate_pareto_metrics(df_subset: pd.DataFrame) -> pd.DataFrame:
"""Calculates cumulative sums for a subset of a dataframe.
Args:
df_subset: A dataframe subset of one task.
Returns:
The same dataframe subset with some additional columns.
"""
# These are the same for all regions in the same task, for the scatter plot:
df_subset['task total runtime'] = df_subset['total runtime'].sum()
df_subset['Runtime for task'] = df_subset['task total runtime'].apply(
format_runtime_string)
df_subset['task num examples'] = df_subset['num examples'].sum()
# These are cumulative sums for the pareto curves:
df_subset['task cumsum fraction'] = df_subset['total runtime'].cumsum(
) / df_subset['total runtime'].sum()
n = len(df_subset)
df_subset['task cumsum order'] = list(map(lambda x: x / n, range(0, n)))
df_subset['tooltip'] = df_subset.apply(pareto_by_task_tooltip, axis=1)
return df_subset
def pareto_and_runtimes_by_task(df: pd.DataFrame) -> alt.Chart:
"""Creates an interactive Pareto curve and scatter plot of task runtimes.
Tracing each curve shows to what extent a small proportion of long-running
regions contribute disproportionately to the overall runtime. That is,
"The longest-running X% of regions account for Y% of the total runtime."
There is a curve for each task.
Args:
df: A dataframe of all regions.
Returns:
An altair chart.
"""
grouped = df.groupby(df['Task'], sort=False)
df = grouped.apply(calculate_pareto_metrics)
# Sample along the Pareto curve, ensuring the longest regions are shown.
if len(df) > 5000:
x = 1000
df = pd.concat([df.nlargest(x, 'total runtime'), df.sample(5000 - x)])
# Limit columns to greatly reduce the size of the html report.
columns_used = [
'task cumsum order', 'task cumsum fraction', 'tooltip', 'Task',
'task total runtime', 'task num examples', 'Runtime for task'
]
df = df[columns_used]
# Brushing on the task_scatter plot highlights the same tasks in the Pareto
# curve.
brush = alt.selection_interval()
pareto_by_task = alt.Chart(df).mark_line(size=2).encode(
x=alt.X(
'task cumsum order',
title='The longest-runtime X% of regions',
axis=alt.Axis(format='%')),
y=alt.Y(
'task cumsum fraction',
title='Account for Y% of the total runtime',
axis=alt.Axis(format='%')),
tooltip='tooltip',
color=alt.condition(brush, 'Task:N', alt.value('lightgray'))).properties(
title='Pareto curve for each task').interactive()
# This chart needs to use the same dataframe as the first chart to enable the
# brushing on one to affect the other. Using max(task) for 'text' is a
# trick that causes bundling by task to avoid showing multiple overlapping
# points which otherwise make the text look funky.
task_scatter = alt.Chart(df).mark_point(size=10).encode(
x=alt.X('max(task total runtime)', title='Runtime (seconds)'),
y=alt.Y('task num examples:Q', title='Number of examples'),
color=alt.condition(brush, 'Task:N', alt.value('lightgray')),
tooltip=['Task', 'Runtime for task']
) \
.properties(title='Total runtime for each task (drag to highlight)') \
.add_selection(brush)
return pareto_by_task | task_scatter
def individual_region_bars(small_df: pd.DataFrame,
title: Union[str, Dict[str, str]] = '') -> alt.Chart:
"""Makes a stacked bar chart with runtime of each stage for individual regions.
Args:
small_df: A dataframe of regions, each of which will be shown as a bar.
title: A title for the plot. If a dict, it should contain 'title' and/or
'subtitle'.
Returns:
An altair chart.
"""
columns_used = ['region', 'Runtime'] + RUNTIME_COLUMNS
d = small_df[columns_used]
return alt.Chart(d).transform_fold(
RUNTIME_COLUMNS, as_=['Stage', 'runtime_by_stage']) \
.mark_bar().encode(
x=alt.X('region:N', sort=None),
y=alt.Y('runtime_by_stage:Q', scale=alt.Scale(type='linear'), title='Runtime (seconds)'),
fill=alt.Fill('Stage:N', sort=None),
tooltip='Runtime:N'
).properties(title=title)
def selected_longest_and_median_regions(df: pd.DataFrame) -> alt.Chart:
"""Creates a stacked bar charts of the top 20 and median 20 regions.
Args:
df: A dataframe of all regions.
Returns:
An altair chart.
"""
num_rows = len(df)
mid = round(num_rows / 2)
return individual_region_bars(df.iloc[0:20], 'Top runtime regions') \
| individual_region_bars(df.iloc[mid-10:mid+11], 'Median runtime regions')
def top_regions_producing_zero_examples(df: pd.DataFrame) -> alt.Chart:
"""Creates a chart of the top regions that produced zero examples.
Args:
df: A dataframe of all regions.
Returns:
An altair chart.
"""
regions_with_zero_examples = df[df['num examples'] == 0]
runtime_of_zeros = regions_with_zero_examples['total runtime'].sum() / 3600
total_runtime = df['total runtime'].sum() / 3600
subtitle = (
f'Spent {runtime_of_zeros:.2f} hours processing the '
f'{len(regions_with_zero_examples)} regions that produced no examples, '
f'which is {runtime_of_zeros / total_runtime * 100:.2f}% of the total '
f'runtime of {total_runtime:.2f} hours.')
return individual_region_bars(
regions_with_zero_examples.nlargest(50, 'total runtime'),
title={
'text': 'The longest-running regions that produced no examples',
'subtitle': subtitle
})
def write_to_html_report(charts: List[Dict[Text, alt.Chart]], title: str,
subtitle: str, html_output: Any) -> None:
"""Makes the html report with all the charts inserted.
Args:
charts: A list of altair chart objects.
title: The title to show at the top of the report.
subtitle: The subtitle to show just below the title on the report.
html_output: a writable file object.
Returns:
None. Writes into the html_output file object.
"""
# Start the HTML document.
html_output.write('<!DOCTYPE html>\n<html>\n<head>')
# Add dependencies vega and vega-lite, which render the altair charts.
html_output.write('<script type="text/javascript" src="{}/vega@5"></script>'
'\n'.format(VEGA_URL))
html_output.write(
'<script type="text/javascript" src="{}/[email protected]"></script>'
'\n'.format(VEGA_URL))
html_output.write(
'<script type="text/javascript" src="{}/vega-embed@6"></script>'
'\n'.format(VEGA_URL))
# Add styles (CSS).
html_output.write(CSS_STYLES)
html_output.write('</head>\n<body>')
html_output.write('<h1>{}</h1>\n'.format(title))
html_output.write('<h2>{}</h2>\n'.format(subtitle))
# Make a div containing all the charts.
html_output.write('<div>')
for chart in charts:
html_output.write(
'<div class="chart-container" id="vis_{}"></div>\n'.format(chart['id']))
html_output.write('</div>')
# Add JSON vega specs and hook them up to the divs with VegaEmbed.
html_output.write('<script>\n')
for chart in charts:
html_output.write('var spec_{} = {};\n'.format(chart['id'],
chart['chart'].to_json()))
download_filename = '{}_{}'.format(title.replace(' ', '_'), chart['id'])
embed_options = {'mode': 'vega-lite', 'downloadFileName': download_filename}
html_output.write('vegaEmbed("#vis_{}", spec_{}, {})\n'.format(
chart['id'], chart['id'], embed_options))
html_output.write('</script>\n')
# Close HTML document.
html_output.write('</body></html>')
def read_data_and_make_dataframes(
input_path: str) -> Tuple[pd.DataFrame, pd.DataFrame]:
"""Loads data from a file into one dataframe as-is and one by task.
Args:
input_path: str, path of the input TSV file (may be sharded).
Returns:
df: A dataframe with one row per region.
by_task: A dataframe with one row per task.
"""
df = read_sharded_runtime_tsvs(input_path)
df = calculate_totals(df)
by_task = summarize_by_task(df)
return df, by_task
def make_all_charts(
df: pd.DataFrame,
by_task: pd.DataFrame) -> List[Dict[Text, Union[str, alt.Chart]]]:
"""Creates charts and puts them in a list with their ID names.
Args:
df: A dataframe with one row per region.
by_task: A dataframe with one row per task.
Returns:
list of dicts, each containing a chart and a descriptive ID.
"""
charts = [{
'id': 'total_by_stage',
'chart': totals_by_stage(by_task)
}, {
'id': 'pareto_and_runtimes_by_task',
'chart': pareto_and_runtimes_by_task(df)
}, {
'id': 'histogram_by_task',
'chart': stage_histogram(by_task, title='Stage runtimes for each task')
}, {
'id': 'selected_longest_and_median_regions',
'chart': selected_longest_and_median_regions(df)
}, {
'id': 'zero_examples',
'chart': top_regions_producing_zero_examples(df)
}]
# Altair shows a max of 5000 data points.
if len(df) <= 5000:
# With up to 5000 points, just show them all.
charts.extend([{
'id': 'histogram',
'chart': stage_histogram(df, title='Runtime by stage for all regions')
}, {
'id': 'scatter_grid',
'chart': correlation_scatter_charts(df, title='Trends for all regions')
}])
else:
# With too many points, make different subsets to show trends better.
top_100 = df.nlargest(100, 'total runtime')
top_5000 = df.nlargest(5000, 'total runtime')
# Sample the bottom 99% to avoid outliers that obscure general trends.
bottom_99_percent = df.nsmallest(int(len(df) * .99), 'total runtime')
if len(bottom_99_percent) > 5000:
bottom_99_percent = bottom_99_percent.sample(5000)
charts.extend([{
'id':
'histogram_bottom_99_percent',
'chart':
stage_histogram(
bottom_99_percent,
title='Runtime by stage for regions in the bottom 99%')
}, {
'id':
'histogram_top_100',
'chart':
stage_histogram(
top_100, title='Runtime by stage for regions in the top 100')
}, {
'id':
'scatter_grid_top_5000',
'chart':
correlation_scatter_charts(
top_5000, title='Trends for regions in the top 5000')
}, {
'id':
'scatter_grid_bottom_99_percent',
'chart':
correlation_scatter_charts(
bottom_99_percent, title='Trends for regions in the bottom 99%')
}])
return charts
def make_report(input_path: str, title: str,
html_output: tf.io.gfile.GFile) -> None:
"""Reads data, creates charts, and composes the charts into an HTML report.
Args:
input_path: Path of the input TSV file (or sharded files).
title: Title to put at the top of the report.
html_output: Writable file object where output will be written.
"""
# Load data into pandas dataframes and add summary columns.
df, by_task = read_data_and_make_dataframes(input_path)
# Build all the charts.
charts = make_all_charts(df, by_task)
# Write a subtitle with some top-level stats.
subtitle = (f'Runtime profiling for make_examples on {len(df)} regions '
f'across {len(by_task)} task{"(s)" if len(by_task) > 1 else ""}')
# Write the HTML report with all the charts.
write_to_html_report(
charts=charts, title=title, subtitle=subtitle, html_output=html_output)
def main(argv: Sequence[str]):
if len(argv) > 1:
raise app.UsageError(
'Command line parsing failure: this script does not accept '
'positional arguments, but found these extra arguments: "{}".'
''.format(str(argv[1:])))
# Add html to the output path if that is not already the suffix.
if FLAGS.output.endswith('html'):
output_filename = FLAGS.output
else:
output_filename = f'{FLAGS.output}.html'
# Start HTML document. Using GFile enables writing to GCS too.
html_output = tf.io.gfile.GFile(output_filename, 'w')
make_report(
input_path=FLAGS.input, title=FLAGS.title, html_output=html_output)
html_output.close() # Abstracted out the file open/close to enable testing.
print('Output written to:', output_filename)
if __name__ == '__main__':
flags.mark_flags_as_required(['input', 'title'])
app.run(main)
| [
1,
529,
9507,
29958,
24535,
19365,
29914,
15634,
29918,
1609,
29918,
12803,
29918,
1730,
29889,
2272,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
5087,
365,
12182,
29889,
13,
29937,
13,
29937,
4367,
391,
3224,
322,
671,
297,
2752,
322,
7581,
7190,
29892,
411,
470,
1728,
13,
29937,
21733,
29892,
526,
21905,
4944,
393,
278,
1494,
5855,
13,
29937,
526,
1539,
29901,
13,
29937,
13,
29937,
29871,
29896,
29889,
4367,
391,
3224,
29879,
310,
2752,
775,
1818,
11551,
278,
2038,
3509,
1266,
8369,
29892,
13,
29937,
1678,
445,
1051,
310,
5855,
322,
278,
1494,
2313,
433,
4193,
29889,
13,
29937,
13,
29937,
29871,
29906,
29889,
4367,
391,
3224,
29879,
297,
7581,
883,
1818,
18532,
278,
2038,
3509,
1266,
13,
29937,
1678,
8369,
29892,
445,
1051,
310,
5855,
322,
278,
1494,
2313,
433,
4193,
297,
278,
13,
29937,
1678,
5106,
322,
29914,
272,
916,
17279,
4944,
411,
278,
4978,
29889,
13,
29937,
13,
29937,
29871,
29941,
29889,
2448,
2121,
278,
1024,
310,
278,
3509,
1266,
19464,
3643,
278,
2983,
310,
967,
13,
29937,
1678,
17737,
29560,
1122,
367,
1304,
304,
1095,
272,
344,
470,
27391,
9316,
10723,
515,
445,
13,
29937,
1678,
7047,
1728,
2702,
7536,
3971,
10751,
29889,
13,
29937,
13,
29937,
3446,
3235,
7791,
7818,
12982,
1525,
8519,
13756,
13044,
3352,
6770,
6093,
315,
4590,
29979,
22789,
3912,
379,
5607,
8032,
29903,
5300,
8707,
29911,
3960,
29933,
2692,
24125,
376,
3289,
8519,
29908,
13,
29937,
5300,
13764,
29979,
8528,
15094,
1799,
6323,
306,
3580,
5265,
3352,
399,
1718,
29934,
13566,
29059,
29892,
2672,
6154,
15789,
4214,
29892,
350,
2692,
6058,
27848,
3352,
7495,
29892,
6093,
13,
29937,
306,
3580,
5265,
3352,
399,
1718,
29934,
13566,
29059,
8079,
341,
1001,
3210,
13566,
2882,
6227,
11937,
5300,
383,
1806,
8186,
1799,
15842,
319,
349,
8322,
2965,
13309,
1718,
349,
4574,
13152,
1660,
13,
29937,
319,
1525,
28657,
13875,
8890,
29928,
29889,
2672,
11698,
382,
29963,
3919,
24972,
9818,
6093,
315,
4590,
29979,
22789,
3912,
379,
5607,
8032,
6323,
8707,
29911,
3960,
29933,
2692,
24125,
20700,
13,
29937,
17705,
6181,
15842,
13764,
29979,
22471,
26282,
29892,
2672,
4571,
26282,
29892,
2672,
29907,
1367,
3919,
1964,
29892,
317,
4162,
8426,
1964,
29892,
8528,
29923,
3580,
29931,
19926,
29892,
6323,
13,
29937,
8707,
1660,
13356,
3919,
25758,
21330,
1529,
1692,
29903,
313,
1177,
6154,
15789,
4214,
29892,
350,
2692,
6058,
27848,
3352,
7495,
29892,
13756,
29907,
11499,
13780,
8079,
13,
29937,
27092,
1254,
1806,
26027,
21947,
29949,
8452,
6323,
26996,
29963,
2965,
2890,
29936,
11247,
1799,
8079,
501,
1660,
29892,
360,
8254,
29892,
6323,
13756,
29943,
1806,
29903,
29936,
6323,
350,
3308,
8895,
1799,
13,
29937,
2672,
4945,
29934,
4897,
29911,
2725,
29897,
29832,
8851,
5348,
12766,
17171,
29928,
5300,
6732,
13764,
29979,
6093,
18929,
8079,
17705,
2882,
6227,
11937,
29892,
12317,
2544,
4448,
2672,
13,
29937,
8707,
29911,
4717,
1783,
29892,
6850,
3960,
1783,
17705,
2882,
6227,
11937,
29892,
6323,
323,
8476,
313,
1177,
6154,
15789,
4214,
405,
11787,
5265,
24647,
4741,
6323,
438,
29911,
4448,
22119,
1660,
29897,
13,
29937,
9033,
3235,
4214,
2672,
13764,
29979,
399,
29909,
29979,
19474,
8079,
6093,
501,
1660,
8079,
3446,
3235,
7791,
7818,
12982,
1525,
29892,
382,
29963,
1430,
10762,
11033,
18118,
1660,
29928,
8079,
6093,
13,
29937,
21521,
1799,
8979,
6227,
11937,
8079,
20134,
3210,
21330,
1529,
1692,
29889,
13,
29878,
15945,
29908,
4391,
263,
7604,
3461,
310,
1207,
29918,
19057,
10073,
491,
5120,
29889,
13,
13,
11403,
445,
2471,
304,
7604,
675,
278,
10073,
29899,
1609,
29899,
12803,
848,
5759,
491,
2734,
13,
5675,
29918,
19057,
411,
1192,
15634,
29918,
1609,
29918,
12803,
29889,
13,
15945,
29908,
13,
13,
3166,
19229,
1053,
360,
919,
29892,
922,
3910,
29892,
2391,
29892,
12603,
552,
29892,
3992,
29892,
3139,
29892,
7761,
13,
13,
3166,
633,
2536,
1053,
623,
13,
3166,
633,
2536,
1053,
13449,
13,
5215,
21352,
381,
408,
5272,
13,
5215,
11701,
408,
10518,
13,
5215,
26110,
408,
15886,
13,
13,
3166,
4654,
29918,
22633,
29889,
29876,
1682,
280,
375,
29889,
601,
1053,
528,
25600,
29918,
1445,
29918,
13239,
13,
13,
29937,
838,
941,
381,
3913,
263,
3287,
310,
1158,
9704,
292,
29892,
1316,
408,
13,
29937,
8727,
29889,
3502,
29918,
1646,
2141,
12508,
19327,
467,
11330,
19327,
511,
577,
773,
1250,
17057,
13,
29937,
3133,
362,
304,
2867,
445,
964,
5004,
3454,
3732,
278,
775,
901,
19909,
29889,
13,
29937,
282,
2904,
524,
29901,
11262,
29922,
29887,
29899,
1627,
17057,
29899,
20621,
362,
13,
13,
29963,
11787,
29909,
29918,
4219,
353,
525,
991,
597,
12925,
29889,
15947,
29889,
510,
29914,
24535,
19365,
29914,
1982,
29914,
345,
3249,
29915,
13,
13,
18823,
10749,
353,
13449,
29889,
18823,
10749,
13,
13,
15764,
29889,
24405,
8895,
29918,
1807,
29898,
13,
1678,
525,
2080,
742,
6213,
29892,
525,
29911,
7597,
934,
393,
471,
7371,
746,
2734,
1207,
29918,
19057,
525,
13,
1678,
525,
2541,
1192,
15634,
29918,
1609,
29918,
12803,
29889,
1815,
367,
528,
25600,
29892,
321,
29889,
29887,
29889,
847,
2084,
29914,
15634,
29992,
29953,
29946,
29889,
1372,
29894,
29889,
1495,
13,
15764,
29889,
24405,
8895,
29918,
1807,
29898,
13,
1678,
525,
3257,
742,
6213,
29892,
525,
7030,
674,
367,
4318,
472,
278,
2246,
310,
278,
3461,
322,
674,
525,
13,
1678,
525,
915,
1304,
408,
263,
10944,
363,
16532,
1967,
2066,
29889,
1495,
13,
15764,
29889,
24405,
8895,
29918,
1807,
877,
4905,
742,
525,
15634,
29918,
1609,
29918,
12803,
29918,
12276,
29889,
1420,
742,
13,
462,
1678,
525,
2605,
363,
278,
1962,
3461,
29892,
607,
674,
367,
385,
3472,
934,
29889,
1495,
13,
13,
29934,
10356,
8890,
29918,
15032,
5005,
3059,
353,
518,
13,
1678,
525,
657,
13623,
742,
525,
2886,
21669,
742,
525,
5675,
282,
488,
786,
4558,
742,
525,
3539,
14391,
29915,
13,
29962,
13,
18736,
29918,
15032,
5005,
3059,
353,
6024,
1949,
13623,
742,
525,
1949,
21669,
742,
525,
1949,
6455,
2033,
13,
13,
19407,
29918,
1254,
29979,
17101,
353,
9995,
13,
29966,
3293,
29958,
13,
1678,
3573,
426,
13,
418,
4079,
29899,
11922,
29901,
7209,
29899,
643,
361,
29936,
13,
1678,
500,
13,
1678,
869,
15425,
29899,
7611,
426,
13,
418,
7164,
29901,
29871,
29941,
29900,
1756,
29936,
13,
1678,
500,
13,
829,
3293,
29958,
13,
15945,
29908,
13,
13,
13,
1753,
1303,
29918,
845,
25600,
29918,
15634,
29918,
1372,
4270,
29898,
2084,
29918,
1807,
29901,
851,
29897,
1599,
10518,
29889,
17271,
29901,
13,
29871,
9995,
1888,
4011,
848,
515,
263,
2323,
470,
528,
25600,
2224,
964,
263,
11701,
12205,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
2224,
29918,
1807,
29901,
450,
2224,
304,
278,
1881,
934,
29892,
607,
1122,
367,
528,
25600,
29889,
13,
13,
29871,
16969,
29901,
13,
1678,
319,
12205,
9686,
278,
323,
7597,
934,
29898,
29879,
29897,
541,
411,
2715,
9330,
1897,
29889,
13,
29871,
9995,
13,
29871,
565,
528,
25600,
29918,
1445,
29918,
13239,
29889,
275,
29918,
845,
25600,
29918,
1445,
29918,
6550,
29898,
2084,
29918,
1807,
1125,
13,
1678,
10898,
353,
528,
25600,
29918,
1445,
29918,
13239,
29889,
17158,
29918,
845,
25600,
29918,
1777,
264,
1280,
29898,
2084,
29918,
1807,
29897,
13,
29871,
1683,
29901,
13,
1678,
10898,
353,
518,
2084,
29918,
1807,
29962,
13,
29871,
1051,
29918,
974,
29918,
1272,
19935,
353,
5159,
13,
29871,
363,
474,
29892,
2224,
297,
26985,
29898,
24772,
1125,
13,
1678,
565,
2224,
29889,
27382,
2541,
877,
3174,
597,
29374,
13,
418,
396,
9038,
11701,
338,
4784,
304,
29871,
29900,
29889,
29906,
29946,
29974,
29892,
10518,
29889,
949,
29918,
7638,
674,
664,
363,
330,
29879,
597,
13,
418,
396,
1728,
445,
14725,
29889,
13,
418,
411,
15886,
29889,
601,
29889,
29887,
1445,
29889,
29954,
2283,
29898,
2084,
29897,
408,
285,
29901,
13,
4706,
270,
353,
10518,
29889,
949,
29918,
7638,
29898,
29888,
29892,
16345,
2433,
29905,
29873,
1495,
13,
1678,
1683,
29901,
13,
418,
270,
353,
10518,
29889,
949,
29918,
7638,
29898,
2084,
29892,
16345,
2433,
29905,
29873,
1495,
13,
1678,
270,
1839,
5398,
2033,
353,
474,
13,
1678,
1051,
29918,
974,
29918,
1272,
19935,
29889,
4397,
29898,
29881,
29897,
13,
13,
29871,
736,
10518,
29889,
17685,
29898,
1761,
29918,
974,
29918,
1272,
19935,
29892,
9685,
29922,
29900,
29892,
11455,
29918,
2248,
29922,
5574,
29897,
13,
13,
13,
1753,
3402,
29918,
15634,
29918,
1807,
29898,
1610,
29918,
23128,
29901,
5785,
29897,
1599,
851,
29901,
13,
29871,
9995,
9832,
1078,
263,
7575,
3402,
1347,
515,
263,
19998,
2919,
1353,
310,
6923,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
10650,
29918,
23128,
29901,
319,
1353,
310,
6923,
29889,
13,
13,
29871,
16969,
29901,
13,
1678,
450,
6923,
13931,
964,
6199,
29892,
6233,
29892,
322,
9886,
6923,
29892,
20917,
13,
4706,
28138,
29889,
1152,
1342,
29892,
29871,
29906,
29882,
29941,
29885,
29945,
29889,
29900,
29896,
29906,
29879,
29889,
13,
29871,
9995,
13,
29871,
6233,
29892,
6923,
353,
1933,
1545,
29898,
1610,
29918,
23128,
29892,
29871,
29953,
29900,
29897,
13,
29871,
6199,
29892,
6233,
353,
1933,
1545,
29898,
1195,
2667,
29892,
29871,
29953,
29900,
29897,
13,
29871,
6923,
353,
4513,
29898,
23128,
29892,
29871,
29941,
29897,
13,
29871,
1962,
353,
6629,
13,
29871,
565,
6199,
1405,
29871,
29900,
29901,
13,
1678,
1962,
4619,
285,
29915,
29912,
524,
29898,
29882,
2470,
2915,
29882,
29915,
13,
29871,
565,
6233,
1405,
29871,
29900,
29901,
13,
1678,
1962,
4619,
285,
29915,
29912,
524,
29898,
1195,
2667,
2915,
29885,
29915,
13,
29871,
565,
6923,
1405,
29871,
29900,
470,
451,
1962,
29901,
13,
1678,
1962,
4619,
285,
29915,
29912,
23128,
29913,
29879,
29915,
13,
29871,
736,
1962,
13,
13,
13,
1753,
8147,
29918,
4260,
1338,
29898,
2176,
29901,
10518,
29889,
17271,
29897,
1599,
10518,
29889,
17271,
29901,
13,
29871,
9995,
27065,
1078,
3001,
10073,
29892,
21971,
372,
28138,
29892,
322,
23551,
491,
372,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
4489,
29901,
319,
12205,
310,
10073,
20077,
292,
3694,
29889,
13,
13,
29871,
16969,
29901,
13,
1678,
450,
1021,
12205,
411,
777,
5684,
15837,
4341,
29889,
13,
29871,
9995,
13,
29871,
396,
525,
7827,
10073,
29915,
338,
263,
2560,
2533,
310,
278,
10073,
4341,
29889,
13,
29871,
4489,
1839,
7827,
10073,
2033,
353,
4489,
29961,
29934,
10356,
8890,
29918,
15032,
5005,
3059,
1822,
2083,
29898,
8990,
29922,
29896,
29897,
13,
13,
29871,
396,
6204,
263,
20917,
10073,
1347,
363,
5780,
2034,
567,
29889,
13,
29871,
4489,
1839,
7944,
2033,
353,
4489,
1839,
7827,
10073,
13359,
7302,
29898,
4830,
29918,
15634,
29918,
1807,
29897,
13,
13,
29871,
396,
20025,
491,
5153,
2548,
3001,
5120,
10073,
29889,
13,
29871,
4489,
29889,
6605,
29918,
5975,
29898,
1609,
2433,
7827,
10073,
742,
297,
6689,
29922,
5574,
29892,
12066,
2548,
29922,
8824,
29897,
13,
13,
29871,
736,
4489,
13,
13,
13,
1753,
19138,
675,
29918,
1609,
29918,
7662,
29898,
2176,
29901,
10518,
29889,
17271,
29897,
1599,
10518,
29889,
17271,
29901,
13,
29871,
9995,
24020,
12786,
304,
679,
278,
3001,
10073,
363,
1269,
3414,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
4489,
29901,
319,
12205,
310,
10073,
20077,
292,
3694,
29889,
13,
13,
29871,
16969,
29901,
13,
1678,
450,
12205,
27831,
491,
3414,
29889,
13,
29871,
9995,
13,
29871,
491,
29918,
7662,
353,
4489,
29889,
27789,
29898,
1609,
29922,
1839,
5398,
2033,
467,
2083,
580,
13,
29871,
736,
491,
29918,
7662,
29889,
12071,
29918,
2248,
580,
13,
13,
13,
1753,
7408,
29918,
29882,
391,
13342,
29898,
29881,
29901,
10518,
29889,
17271,
29892,
3611,
29901,
851,
353,
27255,
1599,
5272,
29889,
14732,
29901,
13,
29871,
9995,
3247,
1862,
263,
9825,
13342,
310,
1065,
3706,
5096,
287,
491,
7408,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
270,
29901,
319,
12205,
310,
1065,
3706,
29892,
2845,
491,
5120,
470,
491,
3414,
29889,
13,
1678,
3611,
29901,
319,
3611,
363,
278,
6492,
29889,
13,
13,
29871,
16969,
29901,
13,
1678,
530,
21352,
381,
8727,
29889,
13,
29871,
9995,
13,
29871,
4341,
29918,
3880,
353,
390,
10356,
8890,
29918,
15032,
5005,
3059,
13,
29871,
270,
353,
270,
29961,
13099,
29918,
3880,
29962,
13,
29871,
736,
5272,
29889,
14732,
29898,
29881,
467,
9067,
29918,
8771,
29898,
13,
418,
390,
10356,
8890,
29918,
15032,
5005,
3059,
29892,
408,
29918,
29922,
1839,
27276,
742,
525,
15634,
29918,
1609,
29918,
19190,
11287,
320,
13,
1678,
869,
3502,
29918,
1646,
29898,
28193,
29922,
29900,
29889,
29941,
29897,
320,
13,
1678,
869,
12508,
29898,
13,
4706,
921,
29922,
1997,
29889,
29990,
877,
15634,
29918,
1609,
29918,
19190,
29901,
29984,
742,
9016,
29922,
1997,
29889,
29933,
262,
29898,
3317,
29890,
1144,
29922,
29896,
29900,
29900,
511,
13,
18884,
3611,
2433,
7944,
313,
23128,
29897,
5477,
13,
4706,
343,
29922,
1997,
29889,
29979,
877,
2798,
580,
742,
3611,
2433,
3981,
310,
12786,
742,
5096,
29922,
8516,
511,
13,
4706,
2927,
29922,
1997,
29889,
3306,
877,
27276,
29901,
29940,
742,
2656,
29922,
8516,
29897,
13,
1678,
13742,
11330,
29898,
3257,
29922,
3257,
29897,
13,
13,
13,
1753,
19869,
29918,
1557,
2620,
29918,
18366,
29898,
29881,
29901,
10518,
29889,
17271,
29892,
3611,
29901,
851,
353,
27255,
1599,
5272,
29889,
14732,
29901,
13,
29871,
9995,
23665,
778,
263,
6856,
310,
14801,
24580,
310,
1065,
3706,
310,
22950,
23797,
18838,
1306,
1078,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
270,
29901,
319,
11701,
12205,
310,
10073,
491,
12786,
29889,
13,
1678,
3611,
29901,
319,
3611,
363,
278,
6492,
29889,
13,
13,
29871,
16969,
29901,
13,
1678,
530,
21352,
381,
8727,
13,
29871,
9995,
13,
29871,
4341,
29918,
3880,
353,
6024,
12803,
742,
525,
7827,
10073,
2033,
718,
390,
10356,
8890,
29918,
15032,
5005,
3059,
718,
21122,
29918,
15032,
5005,
3059,
13,
29871,
270,
353,
270,
29961,
13099,
29918,
3880,
29962,
13,
29871,
736,
5272,
29889,
14732,
29898,
29881,
467,
3502,
29918,
16622,
29898,
28193,
29922,
29900,
29889,
29896,
467,
12508,
29898,
13,
418,
921,
29922,
1997,
29889,
29990,
29898,
1997,
29889,
14358,
877,
4914,
5477,
1134,
2433,
12150,
23378,
742,
13,
795,
9685,
29922,
1997,
29889,
16070,
29898,
1643,
21176,
543,
4130,
398,
29889,
1767,
718,
525,
29879,
29915,
1159,
511,
13,
418,
343,
29922,
1997,
29889,
29979,
29898,
1997,
29889,
14358,
877,
798,
5477,
1134,
2433,
12150,
23378,
5477,
13,
418,
5780,
12632,
2433,
12803,
29915,
13,
29871,
13742,
11330,
29898,
2103,
29922,
29896,
29900,
29900,
29892,
3171,
29922,
29896,
29900,
29900,
29897,
320,
13,
29871,
869,
14358,
29898,
13,
418,
1897,
29922,
1839,
7827,
10073,
2033,
718,
390,
10356,
8890,
29918,
15032,
5005,
3059,
29892,
13,
418,
1948,
29922,
18736,
29918,
15032,
5005,
3059,
29892,
13,
29871,
13742,
11330,
29898,
3257,
29922,
3257,
29897,
13,
13,
13,
1753,
2025,
1338,
29918,
1609,
29918,
19190,
29898,
29881,
29901,
10518,
29889,
17271,
29897,
1599,
5272,
29889,
14732,
29901,
13,
29871,
9995,
3247,
1862,
3001,
1065,
3706,
363,
1269,
7408,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
270,
29901,
319,
12205,
310,
1065,
3706,
29889,
13,
13,
29871,
16969,
29901,
13,
1678,
530,
21352,
381,
8727,
29889,
13,
29871,
9995,
13,
29871,
7408,
29918,
4260,
1338,
29918,
13757,
353,
270,
29889,
2083,
580,
29961,
29934,
10356,
8890,
29918,
15032,
5005,
3059,
29962,
13,
29871,
7408,
29918,
4260,
1338,
353,
10518,
29889,
17271,
29898,
13,
418,
7408,
29918,
4260,
1338,
29918,
13757,
29892,
4341,
29922,
1839,
7944,
313,
23128,
29897,
11287,
13,
29871,
7408,
29918,
4260,
1338,
29889,
12071,
29918,
2248,
29898,
262,
6689,
29922,
5574,
29897,
13,
29871,
7408,
29918,
4260,
1338,
353,
7408,
29918,
4260,
1338,
29889,
1267,
420,
29898,
13099,
3790,
29915,
2248,
2396,
525,
27276,
29915,
1800,
13,
29871,
7408,
29918,
4260,
1338,
1839,
7944,
2033,
353,
7408,
29918,
4260,
1338,
1839,
7944,
313,
23128,
29897,
13359,
7302,
29898,
13,
418,
3402,
29918,
15634,
29918,
1807,
29897,
13,
29871,
736,
5272,
29889,
14732,
29898,
19190,
29918,
4260,
1338,
467,
3502,
29918,
1646,
2141,
12508,
29898,
13,
418,
921,
2433,
7944,
313,
23128,
29897,
742,
13,
418,
343,
29922,
1997,
29889,
29979,
877,
27276,
742,
2656,
29922,
8516,
511,
13,
418,
5780,
12632,
29922,
1839,
7944,
7464,
13,
418,
5445,
29922,
1997,
29889,
20876,
877,
27276,
742,
13,
462,
1678,
2656,
29922,
8516,
8106,
11330,
29898,
3257,
2433,
3563,
497,
10073,
491,
7408,
1495,
13,
13,
13,
1753,
9541,
517,
29918,
1609,
29918,
7662,
29918,
10154,
12632,
29898,
798,
29901,
10518,
29889,
19204,
29897,
1599,
851,
29901,
13,
29871,
9995,
2831,
697,
1948,
310,
263,
12205,
29892,
2912,
267,
263,
5780,
12632,
6139,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
1948,
29901,
319,
349,
7086,
10488,
29892,
697,
1948,
310,
263,
12205,
6943,
777,
2702,
13,
418,
13299,
28524,
2533,
4341,
29889,
13,
13,
29871,
16969,
29901,
13,
1678,
319,
1347,
304,
1510,
408,
278,
5780,
12632,
363,
263,
9541,
517,
11672,
29889,
13,
29871,
9995,
13,
29871,
736,
313,
29888,
29908,
29912,
798,
1839,
7662,
13299,
2083,
1797,
2033,
334,
29871,
29896,
29900,
29900,
29901,
29889,
29906,
29888,
10560,
310,
12786,
376,
13,
3986,
285,
29908,
10149,
363,
426,
798,
1839,
7662,
13299,
2083,
15958,
2033,
334,
29871,
29896,
29900,
29900,
29901,
29889,
29906,
29888,
10560,
310,
376,
13,
3986,
285,
29908,
1552,
10073,
297,
3414,
426,
798,
1839,
5398,
2033,
27195,
13,
13,
13,
1753,
8147,
29918,
29886,
598,
517,
29918,
2527,
10817,
29898,
2176,
29918,
6484,
29901,
10518,
29889,
17271,
29897,
1599,
10518,
29889,
17271,
29901,
13,
29871,
9995,
27065,
1078,
13299,
28524,
25470,
363,
263,
11306,
310,
263,
12205,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
4489,
29918,
6484,
29901,
319,
12205,
11306,
310,
697,
3414,
29889,
13,
13,
29871,
16969,
29901,
13,
1678,
450,
1021,
12205,
11306,
411,
777,
5684,
4341,
29889,
13,
29871,
9995,
13,
29871,
396,
4525,
526,
278,
1021,
363,
599,
12786,
297,
278,
1021,
3414,
29892,
363,
278,
14801,
6492,
29901,
13,
29871,
4489,
29918,
6484,
1839,
7662,
3001,
10073,
2033,
353,
4489,
29918,
6484,
1839,
7827,
10073,
13359,
2083,
580,
13,
29871,
4489,
29918,
6484,
1839,
7944,
363,
3414,
2033,
353,
4489,
29918,
6484,
1839,
7662,
3001,
10073,
13359,
7302,
29898,
13,
418,
3402,
29918,
15634,
29918,
1807,
29897,
13,
29871,
4489,
29918,
6484,
1839,
7662,
954,
6455,
2033,
353,
4489,
29918,
6484,
1839,
1949,
6455,
13359,
2083,
580,
13,
29871,
396,
4525,
526,
13299,
28524,
25470,
363,
278,
9541,
517,
19684,
29901,
13,
29871,
4489,
29918,
6484,
1839,
7662,
13299,
2083,
15958,
2033,
353,
4489,
29918,
6484,
1839,
7827,
10073,
13359,
29883,
398,
2083,
29898,
13,
29871,
1723,
847,
4489,
29918,
6484,
1839,
7827,
10073,
13359,
2083,
580,
13,
29871,
302,
353,
7431,
29898,
2176,
29918,
6484,
29897,
13,
29871,
4489,
29918,
6484,
1839,
7662,
13299,
2083,
1797,
2033,
353,
1051,
29898,
1958,
29898,
2892,
921,
29901,
921,
847,
302,
29892,
3464,
29898,
29900,
29892,
302,
4961,
13,
29871,
4489,
29918,
6484,
1839,
10154,
12632,
2033,
353,
4489,
29918,
6484,
29889,
7302,
29898,
29886,
598,
517,
29918,
1609,
29918,
7662,
29918,
10154,
12632,
29892,
9685,
29922,
29896,
29897,
13,
29871,
736,
4489,
29918,
6484,
13,
13,
13,
1753,
9541,
517,
29918,
392,
29918,
29878,
1657,
1355,
29918,
1609,
29918,
7662,
29898,
2176,
29901,
10518,
29889,
17271,
29897,
1599,
5272,
29889,
14732,
29901,
13,
29871,
9995,
9832,
1078,
385,
28923,
349,
598,
517,
11672,
322,
14801,
6492,
310,
3414,
1065,
3706,
29889,
13,
13,
29871,
323,
945,
292,
1269,
11672,
3697,
304,
825,
15834,
263,
2319,
18618,
310,
1472,
29899,
21094,
13,
29871,
12786,
29126,
766,
771,
637,
291,
2486,
304,
278,
12463,
10073,
29889,
2193,
338,
29892,
13,
29871,
376,
1576,
27217,
29899,
21094,
1060,
29995,
310,
12786,
3633,
363,
612,
29995,
310,
278,
3001,
10073,
1213,
13,
29871,
1670,
338,
263,
11672,
363,
1269,
3414,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
4489,
29901,
319,
12205,
310,
599,
12786,
29889,
13,
13,
29871,
16969,
29901,
13,
1678,
530,
21352,
381,
8727,
29889,
13,
29871,
9995,
13,
29871,
27831,
353,
4489,
29889,
27789,
29898,
2176,
1839,
5398,
7464,
2656,
29922,
8824,
29897,
13,
29871,
4489,
353,
27831,
29889,
7302,
29898,
15807,
403,
29918,
29886,
598,
517,
29918,
2527,
10817,
29897,
13,
13,
29871,
396,
21029,
3412,
278,
349,
598,
517,
11672,
29892,
5662,
3864,
278,
27217,
12786,
526,
4318,
29889,
13,
29871,
565,
7431,
29898,
2176,
29897,
1405,
29871,
29945,
29900,
29900,
29900,
29901,
13,
1678,
921,
353,
29871,
29896,
29900,
29900,
29900,
13,
1678,
4489,
353,
10518,
29889,
17685,
4197,
2176,
29889,
12938,
1191,
342,
29898,
29916,
29892,
525,
7827,
10073,
5477,
4489,
29889,
11249,
29898,
29945,
29900,
29900,
29900,
448,
921,
29897,
2314,
13,
13,
29871,
396,
9628,
277,
4341,
304,
11180,
10032,
278,
2159,
310,
278,
3472,
3461,
29889,
13,
29871,
4341,
29918,
3880,
353,
518,
13,
418,
525,
7662,
13299,
2083,
1797,
742,
525,
7662,
13299,
2083,
15958,
742,
525,
10154,
12632,
742,
525,
5398,
742,
13,
418,
525,
7662,
3001,
10073,
742,
525,
7662,
954,
6455,
742,
525,
7944,
363,
3414,
29915,
13,
29871,
4514,
13,
29871,
4489,
353,
4489,
29961,
13099,
29918,
3880,
29962,
13,
13,
29871,
396,
1771,
21616,
373,
278,
3414,
29918,
1557,
2620,
6492,
12141,
29879,
278,
1021,
9595,
297,
278,
349,
598,
517,
13,
29871,
396,
11672,
29889,
13,
29871,
1506,
1878,
353,
5272,
29889,
21731,
29918,
19207,
580,
13,
13,
29871,
9541,
517,
29918,
1609,
29918,
7662,
353,
5272,
29889,
14732,
29898,
2176,
467,
3502,
29918,
1220,
29898,
2311,
29922,
29906,
467,
12508,
29898,
13,
418,
921,
29922,
1997,
29889,
29990,
29898,
13,
3986,
525,
7662,
13299,
2083,
1797,
742,
13,
3986,
3611,
2433,
1576,
27217,
29899,
15634,
1060,
29995,
310,
12786,
742,
13,
3986,
9685,
29922,
1997,
29889,
16070,
29898,
4830,
2433,
29995,
1495,
511,
13,
418,
343,
29922,
1997,
29889,
29979,
29898,
13,
3986,
525,
7662,
13299,
2083,
15958,
742,
13,
3986,
3611,
2433,
10601,
363,
612,
29995,
310,
278,
3001,
10073,
742,
13,
3986,
9685,
29922,
1997,
29889,
16070,
29898,
4830,
2433,
29995,
1495,
511,
13,
418,
5780,
12632,
2433,
10154,
12632,
742,
13,
418,
2927,
29922,
1997,
29889,
16122,
29898,
1182,
1878,
29892,
525,
5398,
29901,
29940,
742,
5272,
29889,
1767,
877,
4366,
21012,
8785,
467,
11330,
29898,
13,
3986,
3611,
2433,
29925,
598,
517,
11672,
363,
1269,
3414,
2824,
1639,
4925,
580,
13,
13,
29871,
396,
910,
8727,
4225,
304,
671,
278,
1021,
12205,
408,
278,
937,
8727,
304,
9025,
278,
13,
29871,
396,
1506,
21616,
373,
697,
304,
6602,
278,
916,
29889,
5293,
4236,
29898,
7662,
29897,
363,
525,
726,
29915,
338,
263,
13,
29871,
396,
8938,
393,
9946,
22813,
1847,
491,
3414,
304,
4772,
6445,
2999,
975,
433,
3262,
13,
29871,
396,
3291,
607,
6467,
1207,
278,
1426,
1106,
2090,
3459,
29889,
13,
29871,
3414,
29918,
1557,
2620,
353,
5272,
29889,
14732,
29898,
2176,
467,
3502,
29918,
3149,
29898,
2311,
29922,
29896,
29900,
467,
12508,
29898,
13,
418,
921,
29922,
1997,
29889,
29990,
877,
3317,
29898,
7662,
3001,
10073,
29897,
742,
3611,
2433,
7944,
313,
23128,
29897,
5477,
13,
418,
343,
29922,
1997,
29889,
29979,
877,
7662,
954,
6455,
29901,
29984,
742,
3611,
2433,
4557,
310,
6455,
5477,
13,
418,
2927,
29922,
1997,
29889,
16122,
29898,
1182,
1878,
29892,
525,
5398,
29901,
29940,
742,
5272,
29889,
1767,
877,
4366,
21012,
1495,
511,
13,
418,
5780,
12632,
29922,
1839,
5398,
742,
525,
7944,
363,
3414,
2033,
13,
1678,
1723,
320,
13,
1678,
869,
11330,
29898,
3257,
2433,
11536,
10073,
363,
1269,
3414,
313,
20515,
304,
12141,
29897,
1495,
320,
13,
1678,
869,
1202,
29918,
21731,
29898,
1182,
1878,
29897,
13,
13,
29871,
736,
9541,
517,
29918,
1609,
29918,
7662,
891,
3414,
29918,
1557,
2620,
13,
13,
13,
1753,
5375,
29918,
12803,
29918,
28408,
29898,
9278,
29918,
2176,
29901,
10518,
29889,
17271,
29892,
13,
462,
965,
3611,
29901,
7761,
29961,
710,
29892,
360,
919,
29961,
710,
29892,
851,
5262,
353,
27255,
1599,
5272,
29889,
14732,
29901,
13,
29871,
9995,
29924,
6926,
263,
5096,
287,
2594,
8727,
411,
10073,
310,
1269,
7408,
363,
5375,
12786,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
2319,
29918,
2176,
29901,
319,
12205,
310,
12786,
29892,
1269,
310,
607,
674,
367,
4318,
408,
263,
2594,
29889,
13,
1678,
3611,
29901,
319,
3611,
363,
278,
6492,
29889,
960,
263,
9657,
29892,
372,
881,
1712,
525,
3257,
29915,
322,
29914,
272,
13,
418,
525,
1491,
3257,
4286,
13,
13,
29871,
16969,
29901,
13,
1678,
530,
21352,
381,
8727,
29889,
13,
29871,
9995,
13,
29871,
4341,
29918,
3880,
353,
6024,
12803,
742,
525,
7944,
2033,
718,
390,
10356,
8890,
29918,
15032,
5005,
3059,
13,
29871,
270,
353,
2319,
29918,
2176,
29961,
13099,
29918,
3880,
29962,
13,
29871,
736,
5272,
29889,
14732,
29898,
29881,
467,
9067,
29918,
8771,
29898,
13,
418,
390,
10356,
8890,
29918,
15032,
5005,
3059,
29892,
408,
29918,
29922,
1839,
27276,
742,
525,
15634,
29918,
1609,
29918,
19190,
11287,
320,
13,
1678,
869,
3502,
29918,
1646,
2141,
12508,
29898,
13,
4706,
921,
29922,
1997,
29889,
29990,
877,
12803,
29901,
29940,
742,
2656,
29922,
8516,
511,
13,
4706,
343,
29922,
1997,
29889,
29979,
877,
15634,
29918,
1609,
29918,
19190,
29901,
29984,
742,
6287,
29922,
1997,
29889,
17185,
29898,
1853,
2433,
10660,
5477,
3611,
2433,
7944,
313,
23128,
29897,
5477,
13,
4706,
5445,
29922,
1997,
29889,
20876,
877,
27276,
29901,
29940,
742,
2656,
29922,
8516,
511,
13,
4706,
5780,
12632,
2433,
7944,
29901,
29940,
29915,
13,
1678,
13742,
11330,
29898,
3257,
29922,
3257,
29897,
13,
13,
13,
1753,
4629,
29918,
5426,
342,
29918,
392,
29918,
2168,
713,
29918,
1727,
1080,
29898,
2176,
29901,
10518,
29889,
17271,
29897,
1599,
5272,
29889,
14732,
29901,
13,
29871,
9995,
9832,
1078,
263,
5096,
287,
2594,
24469,
310,
278,
2246,
29871,
29906,
29900,
322,
19194,
29871,
29906,
29900,
12786,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
4489,
29901,
319,
12205,
310,
599,
12786,
29889,
13,
13,
29871,
16969,
29901,
13,
1678,
530,
21352,
381,
8727,
29889,
13,
29871,
9995,
13,
29871,
954,
29918,
5727,
353,
7431,
29898,
2176,
29897,
13,
29871,
7145,
353,
4513,
29898,
1949,
29918,
5727,
847,
29871,
29906,
29897,
13,
13,
29871,
736,
5375,
29918,
12803,
29918,
28408,
29898,
2176,
29889,
309,
542,
29961,
29900,
29901,
29906,
29900,
1402,
525,
7031,
10073,
12786,
1495,
320,
13,
29871,
891,
5375,
29918,
12803,
29918,
28408,
29898,
2176,
29889,
309,
542,
29961,
6563,
29899,
29896,
29900,
29901,
6563,
29974,
29896,
29896,
1402,
525,
19302,
713,
10073,
12786,
1495,
13,
13,
13,
1753,
2246,
29918,
1727,
1080,
29918,
5498,
3277,
29918,
9171,
29918,
19057,
29898,
2176,
29901,
10518,
29889,
17271,
29897,
1599,
5272,
29889,
14732,
29901,
13,
29871,
9995,
9832,
1078,
263,
8727,
310,
278,
2246,
12786,
393,
7371,
5225,
6455,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
4489,
29901,
319,
12205,
310,
599,
12786,
29889,
13,
13,
29871,
16969,
29901,
13,
1678,
530,
21352,
381,
8727,
29889,
13,
29871,
9995,
13,
29871,
12786,
29918,
2541,
29918,
9171,
29918,
19057,
353,
4489,
29961,
2176,
1839,
1949,
6455,
2033,
1275,
29871,
29900,
29962,
13,
13,
29871,
10073,
29918,
974,
29918,
3298,
359,
353,
12786,
29918,
2541,
29918,
9171,
29918,
19057,
1839,
7827,
10073,
13359,
2083,
580,
847,
29871,
29941,
29953,
29900,
29900,
13,
13,
29871,
3001,
29918,
15634,
353,
4489,
1839,
7827,
10073,
13359,
2083,
580,
847,
29871,
29941,
29953,
29900,
29900,
13,
29871,
1014,
3257,
353,
313,
13,
418,
285,
29915,
5592,
296,
426,
15634,
29918,
974,
29918,
3298,
359,
29901,
29889,
29906,
29888,
29913,
6199,
9068,
278,
525,
13,
418,
285,
29915,
29912,
2435,
29898,
1727,
1080,
29918,
2541,
29918,
9171,
29918,
19057,
2915,
12786,
393,
7371,
694,
6455,
29892,
525,
13,
418,
285,
29915,
4716,
338,
426,
15634,
29918,
974,
29918,
3298,
359,
847,
3001,
29918,
15634,
334,
29871,
29896,
29900,
29900,
29901,
29889,
29906,
29888,
10560,
310,
278,
3001,
525,
13,
418,
285,
29915,
15634,
310,
426,
7827,
29918,
15634,
29901,
29889,
29906,
29888,
29913,
6199,
29889,
1495,
13,
13,
29871,
736,
5375,
29918,
12803,
29918,
28408,
29898,
13,
418,
12786,
29918,
2541,
29918,
9171,
29918,
19057,
29889,
12938,
1191,
342,
29898,
29945,
29900,
29892,
525,
7827,
10073,
5477,
13,
418,
3611,
3790,
13,
3986,
525,
726,
2396,
525,
1576,
27217,
29899,
21094,
12786,
393,
7371,
694,
6455,
742,
13,
3986,
525,
1491,
3257,
2396,
1014,
3257,
13,
418,
5615,
13,
13,
13,
1753,
2436,
29918,
517,
29918,
1420,
29918,
12276,
29898,
18366,
29901,
2391,
29961,
21533,
29961,
1626,
29892,
5272,
29889,
14732,
20526,
3611,
29901,
851,
29892,
13,
462,
308,
1014,
3257,
29901,
851,
29892,
3472,
29918,
4905,
29901,
3139,
29897,
1599,
6213,
29901,
13,
29871,
9995,
29924,
6926,
278,
3472,
3461,
411,
599,
278,
24469,
15478,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
24469,
29901,
319,
1051,
310,
21352,
381,
8727,
3618,
29889,
13,
1678,
3611,
29901,
450,
3611,
304,
1510,
472,
278,
2246,
310,
278,
3461,
29889,
13,
1678,
1014,
3257,
29901,
450,
1014,
3257,
304,
1510,
925,
2400,
278,
3611,
373,
278,
3461,
29889,
13,
1678,
3472,
29918,
4905,
29901,
263,
2044,
519,
934,
1203,
29889,
13,
13,
29871,
16969,
29901,
13,
418,
6213,
29889,
16849,
267,
964,
278,
3472,
29918,
4905,
934,
1203,
29889,
13,
29871,
9995,
13,
29871,
396,
7370,
278,
4544,
1842,
29889,
13,
29871,
3472,
29918,
4905,
29889,
3539,
877,
29966,
29991,
21300,
3472,
14247,
29876,
29966,
1420,
14247,
29876,
29966,
2813,
29958,
1495,
13,
29871,
396,
3462,
9962,
325,
2442,
322,
325,
2442,
29899,
29880,
568,
29892,
607,
4050,
278,
21352,
381,
24469,
29889,
13,
29871,
3472,
29918,
4905,
29889,
3539,
877,
29966,
2154,
1134,
543,
726,
29914,
7729,
29908,
4765,
10724,
6822,
345,
3249,
29992,
29945,
5319,
2154,
16299,
13,
462,
1678,
11297,
29876,
4286,
4830,
29898,
29963,
11787,
29909,
29918,
4219,
876,
13,
29871,
3472,
29918,
4905,
29889,
3539,
29898,
13,
418,
12801,
2154,
1134,
543,
726,
29914,
7729,
29908,
4765,
10724,
6822,
345,
3249,
29899,
29880,
568,
29992,
29946,
29889,
29947,
29889,
29896,
5319,
2154,
16299,
13,
418,
11297,
29876,
4286,
4830,
29898,
29963,
11787,
29909,
29918,
4219,
876,
13,
29871,
3472,
29918,
4905,
29889,
3539,
29898,
13,
418,
12801,
2154,
1134,
543,
726,
29914,
7729,
29908,
4765,
10724,
6822,
345,
3249,
29899,
17987,
29992,
29953,
5319,
2154,
16299,
13,
418,
11297,
29876,
4286,
4830,
29898,
29963,
11787,
29909,
29918,
4219,
876,
13,
29871,
396,
3462,
11949,
313,
19407,
467,
13,
29871,
3472,
29918,
4905,
29889,
3539,
29898,
19407,
29918,
1254,
29979,
17101,
29897,
13,
29871,
3472,
29918,
4905,
29889,
3539,
877,
829,
2813,
14247,
29876,
29966,
2587,
29958,
1495,
13,
13,
29871,
3472,
29918,
4905,
29889,
3539,
877,
29966,
29882,
29896,
29958,
8875,
829,
29882,
29896,
14247,
29876,
4286,
4830,
29898,
3257,
876,
13,
29871,
3472,
29918,
4905,
29889,
3539,
877,
29966,
29882,
29906,
29958,
8875,
829,
29882,
29906,
14247,
29876,
4286,
4830,
29898,
1491,
3257,
876,
13,
13,
29871,
396,
8561,
263,
1933,
6943,
599,
278,
24469,
29889,
13,
29871,
3472,
29918,
4905,
29889,
3539,
877,
29966,
4563,
29958,
1495,
13,
29871,
363,
8727,
297,
24469,
29901,
13,
1678,
3472,
29918,
4905,
29889,
3539,
29898,
13,
4706,
12801,
4563,
770,
543,
15425,
29899,
7611,
29908,
1178,
543,
1730,
648,
29913,
5319,
4563,
14247,
29876,
4286,
4830,
29898,
15425,
1839,
333,
25901,
13,
29871,
3472,
29918,
4905,
29889,
3539,
877,
829,
4563,
29958,
1495,
13,
13,
29871,
396,
3462,
4663,
325,
2442,
1580,
29879,
322,
12422,
963,
701,
304,
278,
24641,
411,
478,
2442,
6026,
2580,
29889,
13,
29871,
3472,
29918,
4905,
29889,
3539,
877,
29966,
2154,
14247,
29876,
1495,
13,
29871,
363,
8727,
297,
24469,
29901,
13,
1678,
3472,
29918,
4905,
29889,
3539,
877,
1707,
1580,
648,
29913,
353,
15739,
29905,
29876,
4286,
4830,
29898,
15425,
1839,
333,
7464,
13,
462,
462,
462,
259,
8727,
1839,
15425,
13359,
517,
29918,
3126,
22130,
13,
1678,
5142,
29918,
9507,
353,
22372,
3227,
29913,
4286,
4830,
29898,
3257,
29889,
6506,
877,
13420,
22868,
5477,
8727,
1839,
333,
11287,
13,
1678,
8297,
29918,
6768,
353,
11117,
8513,
2396,
525,
345,
3249,
29899,
29880,
568,
742,
525,
10382,
17020,
2396,
5142,
29918,
9507,
29913,
13,
13,
1678,
3472,
29918,
4905,
29889,
3539,
877,
345,
3249,
6026,
2580,
14822,
1730,
648,
17671,
1580,
648,
1118,
426,
11606,
29876,
4286,
4830,
29898,
13,
4706,
8727,
1839,
333,
7464,
8727,
1839,
333,
7464,
8297,
29918,
6768,
876,
13,
29871,
3472,
29918,
4905,
29889,
3539,
877,
829,
2154,
14247,
29876,
1495,
13,
13,
29871,
396,
23186,
4544,
1842,
29889,
13,
29871,
3472,
29918,
4905,
29889,
3539,
877,
829,
2587,
2565,
1420,
29958,
1495,
13,
13,
13,
1753,
1303,
29918,
1272,
29918,
392,
29918,
5675,
29918,
1272,
19935,
29898,
13,
1678,
1881,
29918,
2084,
29901,
851,
29897,
1599,
12603,
552,
29961,
15926,
29889,
17271,
29892,
10518,
29889,
17271,
5387,
13,
29871,
9995,
5896,
29879,
848,
515,
263,
934,
964,
697,
12205,
408,
29899,
275,
322,
697,
491,
3414,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
1881,
29918,
2084,
29901,
851,
29892,
2224,
310,
278,
1881,
323,
7597,
934,
313,
13029,
367,
528,
25600,
467,
13,
13,
29871,
16969,
29901,
13,
1678,
4489,
29901,
319,
12205,
411,
697,
1948,
639,
5120,
29889,
13,
1678,
491,
29918,
7662,
29901,
319,
12205,
411,
697,
1948,
639,
3414,
29889,
13,
29871,
9995,
13,
29871,
4489,
353,
1303,
29918,
845,
25600,
29918,
15634,
29918,
1372,
4270,
29898,
2080,
29918,
2084,
29897,
13,
29871,
4489,
353,
8147,
29918,
4260,
1338,
29898,
2176,
29897,
13,
29871,
491,
29918,
7662,
353,
19138,
675,
29918,
1609,
29918,
7662,
29898,
2176,
29897,
13,
29871,
736,
4489,
29892,
491,
29918,
7662,
13,
13,
13,
1753,
1207,
29918,
497,
29918,
18366,
29898,
13,
1678,
4489,
29901,
10518,
29889,
17271,
29892,
13,
1678,
491,
29918,
7662,
29901,
10518,
29889,
17271,
29897,
1599,
2391,
29961,
21533,
29961,
1626,
29892,
7761,
29961,
710,
29892,
5272,
29889,
14732,
5262,
5387,
13,
29871,
9995,
9832,
1078,
24469,
322,
15223,
963,
297,
263,
1051,
411,
1009,
3553,
2983,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
4489,
29901,
319,
12205,
411,
697,
1948,
639,
5120,
29889,
13,
1678,
491,
29918,
7662,
29901,
319,
12205,
411,
697,
1948,
639,
3414,
29889,
13,
13,
29871,
16969,
29901,
13,
1678,
1051,
310,
9657,
29879,
29892,
1269,
6943,
263,
8727,
322,
263,
29037,
573,
3553,
29889,
13,
29871,
9995,
13,
29871,
24469,
353,
15974,
13,
418,
525,
333,
2396,
525,
7827,
29918,
1609,
29918,
19190,
742,
13,
418,
525,
15425,
2396,
2025,
1338,
29918,
1609,
29918,
19190,
29898,
1609,
29918,
7662,
29897,
13,
29871,
2981,
426,
13,
418,
525,
333,
2396,
525,
29886,
598,
517,
29918,
392,
29918,
29878,
1657,
1355,
29918,
1609,
29918,
7662,
742,
13,
418,
525,
15425,
2396,
9541,
517,
29918,
392,
29918,
29878,
1657,
1355,
29918,
1609,
29918,
7662,
29898,
2176,
29897,
13,
29871,
2981,
426,
13,
418,
525,
333,
2396,
525,
29882,
391,
13342,
29918,
1609,
29918,
7662,
742,
13,
418,
525,
15425,
2396,
7408,
29918,
29882,
391,
13342,
29898,
1609,
29918,
7662,
29892,
3611,
2433,
27276,
1065,
3706,
363,
1269,
3414,
1495,
13,
29871,
2981,
426,
13,
418,
525,
333,
2396,
525,
8391,
29918,
5426,
342,
29918,
392,
29918,
2168,
713,
29918,
1727,
1080,
742,
13,
418,
525,
15425,
2396,
4629,
29918,
5426,
342,
29918,
392,
29918,
2168,
713,
29918,
1727,
1080,
29898,
2176,
29897,
13,
29871,
2981,
426,
13,
418,
525,
333,
2396,
525,
9171,
29918,
19057,
742,
13,
418,
525,
15425,
2396,
2246,
29918,
1727,
1080,
29918,
5498,
3277,
29918,
9171,
29918,
19057,
29898,
2176,
29897,
13,
29871,
500,
29962,
13,
13,
29871,
396,
838,
941,
381,
3697,
263,
4236,
310,
29871,
29945,
29900,
29900,
29900,
848,
3291,
29889,
13,
29871,
565,
7431,
29898,
2176,
29897,
5277,
29871,
29945,
29900,
29900,
29900,
29901,
13,
1678,
396,
2973,
701,
304,
29871,
29945,
29900,
29900,
29900,
3291,
29892,
925,
1510,
963,
599,
29889,
13,
1678,
24469,
29889,
21843,
4197,
29912,
13,
4706,
525,
333,
2396,
525,
29882,
391,
13342,
742,
13,
4706,
525,
15425,
2396,
7408,
29918,
29882,
391,
13342,
29898,
2176,
29892,
3611,
2433,
7944,
491,
7408,
363,
599,
12786,
1495,
13,
1678,
2981,
426,
13,
4706,
525,
333,
2396,
525,
1557,
2620,
29918,
7720,
742,
13,
4706,
525,
15425,
2396,
19869,
29918,
1557,
2620,
29918,
18366,
29898,
2176,
29892,
3611,
2433,
2308,
1975,
363,
599,
12786,
1495,
13,
1678,
500,
2314,
13,
29871,
1683,
29901,
13,
1678,
396,
2973,
2086,
1784,
3291,
29892,
1207,
1422,
27639,
304,
1510,
534,
1975,
2253,
29889,
13,
1678,
2246,
29918,
29896,
29900,
29900,
353,
4489,
29889,
12938,
1191,
342,
29898,
29896,
29900,
29900,
29892,
525,
7827,
10073,
1495,
13,
1678,
2246,
29918,
29945,
29900,
29900,
29900,
353,
4489,
29889,
12938,
1191,
342,
29898,
29945,
29900,
29900,
29900,
29892,
525,
7827,
10073,
1495,
13,
13,
1678,
396,
21029,
278,
5970,
29871,
29929,
29929,
29995,
304,
4772,
714,
27801,
393,
19726,
545,
2498,
534,
1975,
29889,
13,
1678,
5970,
29918,
29929,
29929,
29918,
25376,
353,
4489,
29889,
1983,
29885,
497,
342,
29898,
524,
29898,
2435,
29898,
2176,
29897,
334,
869,
29929,
29929,
511,
525,
7827,
10073,
1495,
13,
1678,
565,
7431,
29898,
8968,
29918,
29929,
29929,
29918,
25376,
29897,
1405,
29871,
29945,
29900,
29900,
29900,
29901,
13,
418,
5970,
29918,
29929,
29929,
29918,
25376,
353,
5970,
29918,
29929,
29929,
29918,
25376,
29889,
11249,
29898,
29945,
29900,
29900,
29900,
29897,
13,
13,
1678,
24469,
29889,
21843,
4197,
29912,
13,
4706,
525,
333,
2396,
13,
9651,
525,
29882,
391,
13342,
29918,
8968,
29918,
29929,
29929,
29918,
25376,
742,
13,
4706,
525,
15425,
2396,
13,
9651,
7408,
29918,
29882,
391,
13342,
29898,
13,
18884,
5970,
29918,
29929,
29929,
29918,
25376,
29892,
13,
18884,
3611,
2433,
7944,
491,
7408,
363,
12786,
297,
278,
5970,
29871,
29929,
29929,
29995,
1495,
13,
1678,
2981,
426,
13,
4706,
525,
333,
2396,
13,
9651,
525,
29882,
391,
13342,
29918,
3332,
29918,
29896,
29900,
29900,
742,
13,
4706,
525,
15425,
2396,
13,
9651,
7408,
29918,
29882,
391,
13342,
29898,
13,
18884,
2246,
29918,
29896,
29900,
29900,
29892,
3611,
2433,
7944,
491,
7408,
363,
12786,
297,
278,
2246,
29871,
29896,
29900,
29900,
1495,
13,
1678,
2981,
426,
13,
4706,
525,
333,
2396,
13,
9651,
525,
1557,
2620,
29918,
7720,
29918,
3332,
29918,
29945,
29900,
29900,
29900,
742,
13,
4706,
525,
15425,
2396,
13,
9651,
19869,
29918,
1557,
2620,
29918,
18366,
29898,
13,
18884,
2246,
29918,
29945,
29900,
29900,
29900,
29892,
3611,
2433,
2308,
1975,
363,
12786,
297,
278,
2246,
29871,
29945,
29900,
29900,
29900,
1495,
13,
1678,
2981,
426,
13,
4706,
525,
333,
2396,
13,
9651,
525,
1557,
2620,
29918,
7720,
29918,
8968,
29918,
29929,
29929,
29918,
25376,
742,
13,
4706,
525,
15425,
2396,
13,
9651,
19869,
29918,
1557,
2620,
29918,
18366,
29898,
13,
18884,
5970,
29918,
29929,
29929,
29918,
25376,
29892,
3611,
2433,
2308,
1975,
363,
12786,
297,
278,
5970,
29871,
29929,
29929,
29995,
1495,
13,
1678,
500,
2314,
13,
29871,
736,
24469,
13,
13,
13,
1753,
1207,
29918,
12276,
29898,
2080,
29918,
2084,
29901,
851,
29892,
3611,
29901,
851,
29892,
13,
18884,
3472,
29918,
4905,
29901,
15886,
29889,
601,
29889,
29887,
1445,
29889,
29954,
2283,
29897,
1599,
6213,
29901,
13,
29871,
9995,
6359,
29879,
848,
29892,
10017,
24469,
29892,
322,
5541,
267,
278,
24469,
964,
385,
4544,
3461,
29889,
13,
13,
29871,
826,
3174,
29901,
13,
1678,
1881,
29918,
2084,
29901,
10802,
310,
278,
1881,
323,
7597,
934,
313,
272,
528,
25600,
2066,
467,
13,
1678,
3611,
29901,
18527,
304,
1925,
472,
278,
2246,
310,
278,
3461,
29889,
13,
1678,
3472,
29918,
4905,
29901,
16849,
519,
934,
1203,
988,
1962,
674,
367,
3971,
29889,
13,
29871,
9995,
13,
13,
29871,
396,
16012,
848,
964,
11701,
848,
19935,
322,
788,
15837,
4341,
29889,
13,
29871,
4489,
29892,
491,
29918,
7662,
353,
1303,
29918,
1272,
29918,
392,
29918,
5675,
29918,
1272,
19935,
29898,
2080,
29918,
2084,
29897,
13,
13,
29871,
396,
8878,
599,
278,
24469,
29889,
13,
29871,
24469,
353,
1207,
29918,
497,
29918,
18366,
29898,
2176,
29892,
491,
29918,
7662,
29897,
13,
13,
29871,
396,
14350,
263,
1014,
3257,
411,
777,
2246,
29899,
5563,
22663,
29889,
13,
29871,
1014,
3257,
353,
313,
29888,
29915,
7944,
20077,
292,
363,
1207,
29918,
19057,
373,
426,
2435,
29898,
2176,
2915,
12786,
525,
13,
795,
285,
29915,
562,
2124,
426,
2435,
29898,
1609,
29918,
7662,
2915,
3414,
6377,
29898,
29879,
5513,
565,
7431,
29898,
1609,
29918,
7662,
29897,
1405,
29871,
29896,
1683,
5124,
29913,
1495,
13,
13,
29871,
396,
14350,
278,
4544,
3461,
411,
599,
278,
24469,
29889,
13,
29871,
2436,
29918,
517,
29918,
1420,
29918,
12276,
29898,
13,
418,
24469,
29922,
18366,
29892,
3611,
29922,
3257,
29892,
1014,
3257,
29922,
1491,
3257,
29892,
3472,
29918,
4905,
29922,
1420,
29918,
4905,
29897,
13,
13,
13,
1753,
1667,
29898,
19218,
29901,
922,
3910,
29961,
710,
29962,
1125,
13,
29871,
565,
7431,
29898,
19218,
29897,
1405,
29871,
29896,
29901,
13,
1678,
12020,
623,
29889,
27573,
2392,
29898,
13,
4706,
525,
6255,
1196,
13755,
10672,
29901,
445,
2471,
947,
451,
3544,
525,
13,
4706,
525,
1066,
3245,
6273,
29892,
541,
1476,
1438,
4805,
6273,
29901,
376,
8875,
1642,
29915,
13,
4706,
525,
4286,
4830,
29898,
710,
29898,
19218,
29961,
29896,
17531,
4961,
13,
13,
29871,
396,
3462,
3472,
304,
278,
1962,
2224,
565,
393,
338,
451,
2307,
278,
25557,
29889,
13,
29871,
565,
383,
4375,
10749,
29889,
4905,
29889,
1975,
2541,
877,
1420,
29374,
13,
1678,
1962,
29918,
9507,
353,
383,
4375,
10749,
29889,
4905,
13,
29871,
1683,
29901,
13,
1678,
1962,
29918,
9507,
353,
285,
29915,
29912,
18823,
10749,
29889,
4905,
1836,
1420,
29915,
13,
13,
29871,
396,
7370,
4544,
1842,
29889,
5293,
402,
2283,
28936,
5007,
304,
402,
9295,
2086,
29889,
13,
29871,
3472,
29918,
4905,
353,
15886,
29889,
601,
29889,
29887,
1445,
29889,
29954,
2283,
29898,
4905,
29918,
9507,
29892,
525,
29893,
1495,
13,
29871,
1207,
29918,
12276,
29898,
13,
418,
1881,
29918,
2084,
29922,
18823,
10749,
29889,
2080,
29892,
3611,
29922,
18823,
10749,
29889,
3257,
29892,
3472,
29918,
4905,
29922,
1420,
29918,
4905,
29897,
13,
29871,
3472,
29918,
4905,
29889,
5358,
580,
29871,
396,
25513,
287,
714,
278,
934,
1722,
29914,
5358,
304,
9025,
6724,
29889,
13,
29871,
1596,
877,
6466,
3971,
304,
29901,
742,
1962,
29918,
9507,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
29871,
13449,
29889,
3502,
29918,
15764,
29918,
294,
29918,
12403,
18959,
2080,
742,
525,
3257,
11287,
13,
29871,
623,
29889,
3389,
29898,
3396,
29897,
13,
2
] |
CEV/ex033.py | EduardoMachadoCostaOliveira/Python | 0 | 76276 | # Faça um programa que leia três números e mostre
# qual é o Maior e qual é o Menor.
a = int(input('\033[34;43mPrimeiro valor:\033[m '))
b = int(input('\033[32;44mSegundo valor:\033[m '))
c = int(input('\033[32;47mTerceiro valor:\033[m '))
# Verificando quem é o menor
menor = a
if b < a and b < c:
menor = b
if c < a and c < b:
menor = c
# Verificando quem é o maior
maior = a
if b > a and b > c:
maior = b
if c > a and c > b:
maior = c
print(f'\033[44mO menor valor digitado foi\033[m\033[4;33;41m {menor} \033[m')
print(f'\033[45mO maior valor digitado foi\033[m \033[4;31;43m {maior} \033[m')
'''Alternativa01
if a<b and a<c:
menor = a
if b<a and b<c:
menor = b
if c<a and c<b:
menor = c
'''
| [
1,
396,
7748,
4277,
1922,
16914,
712,
454,
423,
26299,
12158,
359,
321,
1556,
276,
13,
29937,
4021,
904,
288,
3219,
1611,
321,
4021,
904,
288,
7567,
272,
29889,
13,
29874,
353,
938,
29898,
2080,
28909,
29900,
29941,
29941,
29961,
29941,
29946,
29936,
29946,
29941,
29885,
4040,
603,
3350,
16497,
3583,
29900,
29941,
29941,
29961,
29885,
525,
876,
13,
29890,
353,
938,
29898,
2080,
28909,
29900,
29941,
29941,
29961,
29941,
29906,
29936,
29946,
29946,
29885,
17669,
6201,
16497,
3583,
29900,
29941,
29941,
29961,
29885,
525,
876,
13,
29883,
353,
938,
29898,
2080,
28909,
29900,
29941,
29941,
29961,
29941,
29906,
29936,
29946,
29955,
29885,
29911,
261,
346,
3350,
16497,
3583,
29900,
29941,
29941,
29961,
29885,
525,
876,
13,
29937,
1798,
928,
1743,
439,
331,
904,
288,
26764,
13,
1527,
272,
353,
263,
13,
361,
289,
529,
263,
322,
289,
529,
274,
29901,
13,
1678,
26764,
353,
289,
13,
361,
274,
529,
263,
322,
274,
529,
289,
29901,
13,
1678,
26764,
353,
274,
13,
29937,
1798,
928,
1743,
439,
331,
904,
288,
17136,
13,
655,
1611,
353,
263,
13,
361,
289,
1405,
263,
322,
289,
1405,
274,
29901,
13,
1678,
17136,
353,
289,
13,
361,
274,
1405,
263,
322,
274,
1405,
289,
29901,
13,
1678,
17136,
353,
274,
13,
2158,
29898,
29888,
12764,
29900,
29941,
29941,
29961,
29946,
29946,
29885,
29949,
26764,
16497,
13615,
912,
4732,
29905,
29900,
29941,
29941,
29961,
29885,
29905,
29900,
29941,
29941,
29961,
29946,
29936,
29941,
29941,
29936,
29946,
29896,
29885,
426,
1527,
272,
29913,
320,
29900,
29941,
29941,
29961,
29885,
1495,
13,
2158,
29898,
29888,
12764,
29900,
29941,
29941,
29961,
29946,
29945,
29885,
29949,
17136,
16497,
13615,
912,
4732,
29905,
29900,
29941,
29941,
29961,
29885,
320,
29900,
29941,
29941,
29961,
29946,
29936,
29941,
29896,
29936,
29946,
29941,
29885,
426,
655,
1611,
29913,
320,
29900,
29941,
29941,
29961,
29885,
1495,
13,
12008,
2499,
725,
8657,
29900,
29896,
13,
361,
263,
29966,
29890,
322,
263,
29966,
29883,
29901,
13,
1678,
26764,
353,
263,
13,
361,
289,
29966,
29874,
322,
289,
29966,
29883,
29901,
13,
1678,
26764,
353,
289,
13,
361,
274,
29966,
29874,
322,
274,
29966,
29890,
29901,
13,
1678,
26764,
353,
274,
13,
12008,
13,
2
] |
gym_tetris/envs/__init__.py | michielcx/Tetris-DQN | 13 | 165860 | <reponame>michielcx/Tetris-DQN<gh_stars>10-100
from gym_tetris.envs.tetris_env import TetrisEnv
| [
1,
529,
276,
1112,
420,
29958,
29885,
436,
709,
18904,
29914,
29911,
300,
3780,
29899,
29928,
29984,
29940,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
3166,
330,
962,
29918,
29873,
300,
3780,
29889,
264,
4270,
29889,
29873,
300,
3780,
29918,
6272,
1053,
323,
300,
3780,
21745,
13,
2
] |
convlab2/policy/ppo/multiwoz/__init__.py | Malavikka/ConvLab-2 | 339 | 86781 | <reponame>Malavikka/ConvLab-2<filename>convlab2/policy/ppo/multiwoz/__init__.py
from convlab2.policy.ppo.multiwoz.ppo_policy import PPOPolicy | [
1,
529,
276,
1112,
420,
29958,
22995,
485,
638,
1335,
29914,
1168,
29894,
28632,
29899,
29906,
29966,
9507,
29958,
20580,
8205,
29906,
29914,
22197,
29914,
9759,
29914,
9910,
827,
29920,
29914,
1649,
2344,
26914,
2272,
13,
3166,
7602,
8205,
29906,
29889,
22197,
29889,
9759,
29889,
9910,
827,
29920,
29889,
9759,
29918,
22197,
1053,
349,
29925,
4590,
324,
4245,
2
] |
src/adventofcode/year_2015/day_24_2015.py | Frazzer951/Advent-Of-Code | 0 | 116424 | <gh_stars>0
from functools import reduce
from itertools import combinations
from operator import mul
from typing import List
from adventofcode.util.helpers import solution_timer
from adventofcode.util.input_helpers import get_input_for_day
def splitPresents(weights, num_groups):
group_size = sum(weights) // num_groups
for i in range(len(weights)):
qes = [reduce(mul, c) for c in combinations(weights, i) if sum(c) == group_size]
if qes:
return min(qes)
@solution_timer(2015, 24, 1)
def part_one(input_data: List[str]):
nums = [int(i) for i in input_data]
return splitPresents(nums, 3)
@solution_timer(2015, 24, 2)
def part_two(input_data: List[str]):
nums = [int(i) for i in input_data]
return splitPresents(nums, 4)
if __name__ == "__main__":
data = get_input_for_day(2015, 24)
part_one(data)
part_two(data)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
2090,
312,
8789,
1053,
10032,
13,
3166,
4256,
8504,
1053,
18240,
13,
3166,
5455,
1053,
15065,
13,
3166,
19229,
1053,
2391,
13,
13,
3166,
17623,
974,
401,
29889,
4422,
29889,
3952,
6774,
1053,
1650,
29918,
20404,
13,
3166,
17623,
974,
401,
29889,
4422,
29889,
2080,
29918,
3952,
6774,
1053,
679,
29918,
2080,
29918,
1454,
29918,
3250,
13,
13,
13,
1753,
6219,
13504,
1237,
29898,
705,
5861,
29892,
954,
29918,
13155,
1125,
13,
1678,
2318,
29918,
2311,
353,
2533,
29898,
705,
5861,
29897,
849,
954,
29918,
13155,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
705,
5861,
22164,
13,
4706,
3855,
267,
353,
518,
17469,
29898,
16109,
29892,
274,
29897,
363,
274,
297,
18240,
29898,
705,
5861,
29892,
474,
29897,
565,
2533,
29898,
29883,
29897,
1275,
2318,
29918,
2311,
29962,
13,
4706,
565,
3855,
267,
29901,
13,
9651,
736,
1375,
29898,
29939,
267,
29897,
13,
13,
13,
29992,
2929,
918,
29918,
20404,
29898,
29906,
29900,
29896,
29945,
29892,
29871,
29906,
29946,
29892,
29871,
29896,
29897,
13,
1753,
760,
29918,
650,
29898,
2080,
29918,
1272,
29901,
2391,
29961,
710,
29962,
1125,
13,
1678,
954,
29879,
353,
518,
524,
29898,
29875,
29897,
363,
474,
297,
1881,
29918,
1272,
29962,
13,
1678,
736,
6219,
13504,
1237,
29898,
1949,
29879,
29892,
29871,
29941,
29897,
13,
13,
13,
29992,
2929,
918,
29918,
20404,
29898,
29906,
29900,
29896,
29945,
29892,
29871,
29906,
29946,
29892,
29871,
29906,
29897,
13,
1753,
760,
29918,
10184,
29898,
2080,
29918,
1272,
29901,
2391,
29961,
710,
29962,
1125,
13,
1678,
954,
29879,
353,
518,
524,
29898,
29875,
29897,
363,
474,
297,
1881,
29918,
1272,
29962,
13,
1678,
736,
6219,
13504,
1237,
29898,
1949,
29879,
29892,
29871,
29946,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
848,
353,
679,
29918,
2080,
29918,
1454,
29918,
3250,
29898,
29906,
29900,
29896,
29945,
29892,
29871,
29906,
29946,
29897,
13,
1678,
760,
29918,
650,
29898,
1272,
29897,
13,
1678,
760,
29918,
10184,
29898,
1272,
29897,
13,
2
] |
Exercise6.6/environment.py | yuishihara/ReinforcementLearningExcersices | 0 | 136575 | <filename>Exercise6.6/environment.py
class Environment(object):
def __init__(self):
pass
def act(self, state, action):
pass
def end_state(self, state):
return True
def reset(self):
pass
def available_actions(self):
return None
| [
1,
529,
9507,
29958,
1252,
6269,
895,
29953,
29889,
29953,
29914,
20944,
29889,
2272,
13,
1990,
16738,
29898,
3318,
1125,
13,
29871,
822,
4770,
2344,
12035,
1311,
1125,
13,
1678,
1209,
13,
13,
13,
29871,
822,
1044,
29898,
1311,
29892,
2106,
29892,
3158,
1125,
13,
1678,
1209,
13,
13,
13,
29871,
822,
1095,
29918,
3859,
29898,
1311,
29892,
2106,
1125,
13,
1678,
736,
5852,
13,
13,
13,
29871,
822,
10092,
29898,
1311,
1125,
13,
1678,
1209,
13,
13,
13,
29871,
822,
3625,
29918,
7387,
29898,
1311,
1125,
13,
1678,
736,
6213,
13,
2
] |
src/robotide/ui/treenodehandlers.py | crylearner/RIDE3X | 1 | 16926 | <gh_stars>1-10
# Copyright 2008-2015 Nokia Solutions and Networks
#
# 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 wx
from robotide.controller.commands import (
RenameKeywordOccurrences, RemoveMacro, AddKeyword, AddTestCase, RenameTest,
CopyMacroAs, AddVariable, UpdateVariableName, RenameFile,
RenameResourceFile, DeleteFile, SortKeywords, Include, Exclude)
from robotide.controller.settingcontrollers import VariableController
from robotide.controller.macrocontrollers import (
TestCaseController, UserKeywordController)
from robotide.controller.filecontrollers import (
TestDataDirectoryController, ResourceFileController,
TestCaseFileController, ExcludedDirectoryController,
DirtyRobotDataException)
from robotide.editor.editordialogs import (
TestCaseNameDialog, UserKeywordNameDialog, ScalarVariableDialog,
ListVariableDialog, CopyUserKeywordDialog, DictionaryVariableDialog)
from robotide.publish import RideOpenVariableDialog
from robotide.ui.progress import LoadProgressObserver
from robotide.usages.UsageRunner import Usages, ResourceFileUsages
from .filedialogs import (
AddSuiteDialog, AddDirectoryDialog, ChangeFormatDialog, NewResourceDialog,
RobotFilePathDialog)
from robotide.utils import overrides
from robotide.widgets import PopupMenuItems
from .progress import RenameProgressObserver
from .resourcedialogs import ResourceRenameDialog, ResourceDeleteDialog
from robotide.ui.resourcedialogs import FolderDeleteDialog
def action_handler_class(controller):
return {
TestDataDirectoryController: TestDataDirectoryHandler,
ResourceFileController: ResourceFileHandler,
TestCaseFileController: TestCaseFileHandler,
TestCaseController: TestCaseHandler,
UserKeywordController: UserKeywordHandler,
VariableController: VariableHandler,
ExcludedDirectoryController: ExcludedDirectoryHandler
}[controller.__class__]
class _ActionHandler(wx.Window):
is_user_keyword = False
is_test_suite = False
is_variable = False
_label_add_suite = 'New Suite\tCtrl-Shift-F'
_label_add_directory = 'New Directory'
_label_new_test_case = 'New Test Case\tCtrl-Shift-T'
_label_new_user_keyword = 'New User Keyword\tCtrl-Shift-K'
_label_sort_keywords = 'Sort Keywords'
_label_new_scalar = 'New Scalar\tCtrl-Shift-V'
_label_new_list_variable = 'New List Variable\tCtrl-Shift-L'
_label_new_dict_variable = 'New Dictionary Variable'
_label_change_format = 'Change Format'
_label_copy_macro = 'Copy\tCtrl-Shift-C'
_label_rename = 'Rename\tF2'
_label_add_resource = 'Add Resource'
_label_new_resource = 'New Resource'
_label_find_usages = 'Find Usages'
_label_select_all = 'Select All Tests'
_label_deselect_all = 'Deselect All Tests'
_label_select_failed_tests = 'Select Only Failed Tests'
_label_select_passed_tests = 'Select Only Passed Tests'
_label_delete = 'Delete\tCtrl-Shift-D'
_label_delete_no_kbsc = 'Delete'
_label_exclude = 'Exclude'
_label_include = 'Include'
_label_expand_all = 'Expand all'
_label_collapse_all = 'Collapse all'
def __init__(self, controller, tree, node, settings):
wx.Window.__init__(self, tree)
self.controller = controller
self._tree = tree
self._node = node
self._settings = settings
self._rendered = False
self.Show(False)
self._popup_creator = tree._popup_creator
@property
def item(self):
return self.controller.data
@property
def node(self):
return self._node
def show_popup(self):
self._popup_creator.show(self, PopupMenuItems(self, self._actions),
self.controller)
def begin_label_edit(self):
return False
def double_clicked(self):
pass
def end_label_edit(self, event):
pass
def OnDelete(self, event):
pass
def OnNewSuite(self, event):
pass
def OnNewDirectory(self, event):
pass
def OnNewResource(self, event):
pass
def OnNewUserKeyword(self, event):
pass
def OnNewTestCase(self, event):
pass
def OnNewScalar(self, event):
pass
def OnNewListVariable(self, event):
pass
def OnNewDictionaryVariable(self, event):
pass
def OnCopy(self, event):
pass
def OnFindUsages(self, event):
pass
def OnSelectAllTests(self, event):
self._tree.SelectAllTests(self._node)
def OnDeselectAllTests(self, event):
self._tree.DeselectAllTests(self._node)
def OnSelectOnlyFailedTests(self, event):
self._tree.SelectFailedTests(self._node)
def OnSelectOnlyPassedTests(self, event):
self._tree.SelectPassedTests(self._node)
def OnSafeDelete(self, event):
pass
def OnExclude(self, event):
pass
def OnInclude(self, event):
pass
class _CanBeRenamed(object):
def OnRename(self, event):
self._tree.label_editor.OnLabelEdit()
def begin_label_edit(self):
def label_edit():
# FIXME: yep.yep.yep.yep.yep
node = self._tree._controller.find_node_by_controller(
self.controller)
if node:
self._tree.EditLabel(node)
# Must handle pending events before label edit
# This is a fix for situations where there is a pending action
# that will change this label (Text Editor all changing actions)
wx.CallAfter(label_edit)
return True
def end_label_edit(self, event):
if not event.IsEditCancelled():
if self._is_valid_rename(event.GetLabel()):
self.rename(event.GetLabel())
else:
event.Veto()
def _is_valid_rename(self, label):
validation = self.controller.validate_name(label)
if validation.error_message:
self._show_validation_error(validation.error_message)
return False
return True
def _show_validation_error(self, err_msg):
wx.MessageBox(err_msg, 'Validation Error', style=wx.ICON_ERROR)
class DirectoryHandler(_ActionHandler):
is_draggable = False
is_test_suite = False
can_be_rendered = False
_actions = [_ActionHandler._label_new_resource]
def OnNewResource(self, event):
NewResourceDialog(self.controller, self._settings).execute()
class TestDataHandler(_ActionHandler):
accepts_drag = lambda self, dragged: \
(isinstance(dragged, UserKeywordHandler) or
isinstance(dragged, VariableHandler))
is_draggable = False
is_test_suite = True
@property
def tests(self):
return self.controller.tests
@property
def keywords(self):
return self.controller.keywords
@property
def variables(self):
return self.controller.variables
def has_been_modified_on_disk(self):
return self.item.has_been_modified_on_disk()
def do_drop(self, item):
self.controller.add_test_or_keyword(item)
def rename(self, new_name):
return False
def OnSortKeywords(self, event):
"""Sorts the keywords inside the treenode"""
self.controller.execute(SortKeywords())
@property
def can_be_rendered(self):
if not self._has_children():
return False
return not self._rendered
def _has_children(self):
return (self.item.keyword_table or self.item.testcase_table or
self.item.variable_table)
def set_rendered(self):
self._rendered = True
def OnChangeFormat(self, event):
ChangeFormatDialog(self.controller).execute()
def OnNewUserKeyword(self, event):
dlg = UserKeywordNameDialog(self.controller)
if dlg.ShowModal() == wx.ID_OK:
self.controller.execute(AddKeyword(dlg.get_name(), dlg.get_args()))
dlg.Destroy()
def OnNewScalar(self, event):
self._new_var(ScalarVariableDialog)
def OnNewListVariable(self, event):
class FakePlugin(object):
global_settings = self._settings
self._new_var(ListVariableDialog, plugin=FakePlugin())
def OnNewDictionaryVariable(self, event):
class FakePlugin(object):
global_settings = self._settings
self._new_var(DictionaryVariableDialog, plugin=FakePlugin())
def _new_var(self, dialog_class, plugin=None):
dlg = dialog_class(self._var_controller, plugin=plugin)
if dlg.ShowModal() == wx.ID_OK:
name, value = dlg.get_value()
comment = dlg.get_comment()
self.controller.execute(AddVariable(name, value, comment))
@property
def _var_controller(self):
return self.controller.datafile_controller.variables
class TestDataDirectoryHandler(TestDataHandler):
def __init__(self, *args):
TestDataHandler.__init__(self, *args)
self._actions = [
_ActionHandler._label_add_suite,
_ActionHandler._label_add_directory,
_ActionHandler._label_new_resource,
'---',
_ActionHandler._label_new_user_keyword,
_ActionHandler._label_new_scalar,
_ActionHandler._label_new_list_variable,
_ActionHandler._label_new_dict_variable,
'---',
_ActionHandler._label_change_format
]
if self.controller.parent:
self._actions.extend([_ActionHandler._label_delete_no_kbsc])
self._actions.extend([
'---',
_ActionHandler._label_select_all,
_ActionHandler._label_deselect_all,
_ActionHandler._label_select_failed_tests,
_ActionHandler._label_select_passed_tests
])
if self.controller.parent:
self._actions.extend(['---',
_ActionHandler._label_exclude])
self._actions.extend(['---',
_ActionHandler._label_expand_all,
_ActionHandler._label_collapse_all])
def OnExpandAll(self, event):
self._tree.ExpandAllSubNodes(self._node)
def OnCollapseAll(self, event):
self._tree.CollapseAllSubNodes(self._node)
def OnNewSuite(self, event):
AddSuiteDialog(self.controller, self._settings).execute()
def OnNewDirectory(self, event):
AddDirectoryDialog(self.controller, self._settings).execute()
def OnNewResource(self, event):
NewResourceDialog(self.controller, self._settings).execute()
def OnDelete(self, event):
FolderDeleteDialog(self.controller).execute()
def OnExclude(self, event):
try:
self.controller.execute(Exclude())
except DirtyRobotDataException:
wx.MessageBox('Directory contains unsaved data!\n'
'You must save data before excluding.')
class _FileHandlerThanCanBeRenamed(_CanBeRenamed):
@overrides(_CanBeRenamed)
def begin_label_edit(self):
self._old_label = self._node.GetText()
self._set_node_label(self.controller.basename)
return _CanBeRenamed.begin_label_edit(self)
@overrides(_CanBeRenamed)
def end_label_edit(self, event):
if not event.IsEditCancelled():
result = self.controller.execute(
self._rename_command(event.GetLabel()))
if result:
self._rename_ok_handler()
self._old_label = self.controller.basename
else:
event.Veto()
else:
self._set_node_label(self._old_label)
def _rename_ok_handler(self):
pass
def _rename_command(self, label):
raise NotImplementedError(self.__class__)
def _set_node_label(self, label):
self._tree.SetItemText(self._node, label)
class ResourceFileHandler(_FileHandlerThanCanBeRenamed, TestDataHandler):
is_test_suite = False
_actions = [_ActionHandler._label_new_user_keyword,
_ActionHandler._label_new_scalar,
_ActionHandler._label_new_list_variable,
_ActionHandler._label_new_dict_variable,
'---',
_ActionHandler._label_rename,
_ActionHandler._label_change_format,
_ActionHandler._label_sort_keywords,
_ActionHandler._label_find_usages,
_ActionHandler._label_delete]
def OnFindUsages(self, event):
ResourceFileUsages(self.controller, self._tree.highlight).show()
def OnDelete(self, event):
ResourceDeleteDialog(self.controller).execute()
def OnSafeDelete(self, event):
return self.OnDelete(event)
@overrides(_FileHandlerThanCanBeRenamed)
def _rename_command(self, label):
return RenameResourceFile(
label, self._check_should_rename_static_imports)
def _check_should_rename_static_imports(self):
return ResourceRenameDialog(self.controller).execute()
class TestCaseFileHandler(_FileHandlerThanCanBeRenamed, TestDataHandler):
accepts_drag = lambda *args: True
_actions = [_ActionHandler._label_new_test_case,
_ActionHandler._label_new_user_keyword,
_ActionHandler._label_new_scalar,
_ActionHandler._label_new_list_variable,
_ActionHandler._label_new_dict_variable,
'---',
_ActionHandler._label_rename,
_ActionHandler._label_change_format,
_ActionHandler._label_sort_keywords,
_ActionHandler._label_delete,
'---',
_ActionHandler._label_select_all,
_ActionHandler._label_deselect_all,
_ActionHandler._label_select_failed_tests,
_ActionHandler._label_select_passed_tests
]
def OnNewTestCase(self, event):
dlg = TestCaseNameDialog(self.controller)
if dlg.ShowModal() == wx.ID_OK:
self.controller.execute(AddTestCase(dlg.get_name()))
dlg.Destroy()
def OnDelete(self, event):
if wx.MessageBox('Delete test case file', caption='Confirm',
style=wx.YES_NO | wx.ICON_QUESTION) == wx.YES:
self.controller.execute(DeleteFile())
def OnSafeDelete(self, event):
return self.OnDelete(event)
@overrides(_FileHandlerThanCanBeRenamed)
def _rename_command(self, label):
return RenameFile(label)
@overrides(_FileHandlerThanCanBeRenamed)
def _rename_ok_handler(self):
self._tree.DeselectAllTests(self._node)
class _TestOrUserKeywordHandler(_CanBeRenamed, _ActionHandler):
accepts_drag = lambda *args: False
is_draggable = True
_actions = [
_ActionHandler._label_copy_macro, 'Move Up\tCtrl-Up',
'Move Down\tCtrl-Down', _ActionHandler._label_rename, '---', 'Delete'
]
def remove(self):
self.controller.delete()
def rename(self, new_name):
self.controller.execute(self._create_rename_command(new_name))
def OnCopy(self, event):
dlg = self._copy_name_dialog_class(self.controller, self.item)
if dlg.ShowModal() == wx.ID_OK:
self.controller.execute(CopyMacroAs(dlg.get_name()))
dlg.Destroy()
def OnMoveUp(self, event):
if self.controller.move_up():
self._tree.move_up(self._node)
def OnMoveDown(self, event):
if self.controller.move_down():
self._tree.move_down(self._node)
def OnDelete(self, event):
self.controller.execute(RemoveMacro(self.controller))
class TestCaseHandler(_TestOrUserKeywordHandler):
_datalist = property(lambda self: self.item.datalist)
_copy_name_dialog_class = TestCaseNameDialog
def _add_copy_to_tree(self, parent_node, copied):
self._tree.add_test(parent_node, copied)
def _create_rename_command(self, new_name):
return RenameTest(new_name)
class UserKeywordHandler(_TestOrUserKeywordHandler):
is_user_keyword = True
_datalist = property(lambda self: self.item.datalist)
_copy_name_dialog_class = CopyUserKeywordDialog
_actions = _TestOrUserKeywordHandler._actions + [
_ActionHandler._label_find_usages]
def _add_copy_to_tree(self, parent_node, copied):
self._tree.add_keyword(parent_node, copied)
def _create_rename_command(self, new_name):
return RenameKeywordOccurrences(
self.controller.name, new_name,
RenameProgressObserver(self.GetParent().GetParent()),
self.controller.info)
def OnFindUsages(self, event):
Usages(self.controller, self._tree.highlight).show()
class VariableHandler(_CanBeRenamed, _ActionHandler):
accepts_drag = lambda *args: False
is_draggable = True
is_variable = True
OnMoveUp = OnMoveDown = lambda *args: None
_actions = [_ActionHandler._label_rename, 'Delete']
@overrides(_ActionHandler)
def double_clicked(self):
RideOpenVariableDialog(controller=self.controller).publish()
def OnDelete(self, event):
self.remove()
def remove(self):
self.controller.delete()
def rename(self, new_name):
self.controller.execute(UpdateVariableName(new_name))
@property
def index(self):
return self.controller.index
class ResourceRootHandler(_ActionHandler):
can_be_rendered = is_draggable = is_user_keyword = is_test_suite = False
rename = lambda self, new_name: False
accepts_drag = lambda self, dragged: False
_actions = [_ActionHandler._label_add_resource]
@property
def item(self):
return None
def OnAddResource(self, event):
path = RobotFilePathDialog(
self, self.controller, self._settings).execute()
if path:
self.controller.load_resource(path, LoadProgressObserver(self))
class ExcludedDirectoryHandler(TestDataDirectoryHandler):
is_draggable = False
is_test_suite = True
def __init__(self, *args):
TestDataHandler.__init__(self, *args)
self._actions = [_ActionHandler._label_include]
def OnInclude(self, event):
self.controller.execute(Include())
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
29871,
14187,
1266,
29871,
29906,
29900,
29900,
29947,
29899,
29906,
29900,
29896,
29945,
405,
554,
423,
4956,
17925,
322,
8527,
29879,
30004,
13,
29937,
30004,
13,
29937,
29871,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
18584,
13,
29937,
29871,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
22993,
13,
29937,
29871,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
30004,
13,
29937,
30004,
13,
29937,
418,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
30004,
13,
29937,
30004,
13,
29937,
29871,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
30004,
13,
29937,
29871,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
11167,
13,
29937,
29871,
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,
22993,
13,
29937,
29871,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
30004,
13,
29937,
29871,
27028,
1090,
278,
19245,
22993,
13,
30004,
13,
5215,
26437,
30004,
13,
30004,
13,
3166,
19964,
680,
29889,
8299,
29889,
26381,
1053,
313,
30004,
13,
1678,
390,
3871,
2558,
1742,
22034,
1038,
2063,
29892,
15154,
15735,
307,
29892,
3462,
2558,
1742,
29892,
3462,
3057,
8259,
29892,
390,
3871,
3057,
11167,
13,
1678,
14187,
15735,
307,
2887,
29892,
3462,
16174,
29892,
10318,
16174,
1170,
29892,
390,
3871,
2283,
11167,
13,
1678,
390,
3871,
6848,
2283,
29892,
21267,
2283,
29892,
20025,
2558,
9303,
29892,
512,
2325,
29892,
1222,
2325,
8443,
13,
3166,
19964,
680,
29889,
8299,
29889,
26740,
1285,
11897,
1053,
28736,
2956,
30004,
13,
3166,
19964,
680,
29889,
8299,
29889,
25254,
1285,
11897,
1053,
313,
30004,
13,
1678,
4321,
8259,
2956,
29892,
4911,
2558,
1742,
2956,
8443,
13,
3166,
19964,
680,
29889,
8299,
29889,
1445,
1285,
11897,
1053,
313,
30004,
13,
1678,
4321,
1469,
9882,
2956,
29892,
18981,
2283,
2956,
11167,
13,
1678,
4321,
8259,
2283,
2956,
29892,
1222,
13347,
9882,
2956,
11167,
13,
1678,
360,
13163,
21860,
327,
1469,
2451,
8443,
13,
3166,
19964,
680,
29889,
15204,
29889,
5628,
536,
3658,
29879,
1053,
313,
30004,
13,
1678,
4321,
8259,
1170,
7647,
29892,
4911,
2558,
1742,
1170,
7647,
29892,
317,
1052,
279,
16174,
7647,
11167,
13,
1678,
2391,
16174,
7647,
29892,
14187,
2659,
2558,
1742,
7647,
29892,
13343,
16174,
7647,
8443,
13,
3166,
19964,
680,
29889,
23679,
1053,
390,
680,
6585,
16174,
7647,
30004,
13,
3166,
19964,
680,
29889,
1481,
29889,
18035,
1053,
16012,
14470,
28066,
30004,
13,
3166,
19964,
680,
29889,
375,
1179,
29889,
27573,
16802,
1053,
10783,
1179,
29892,
18981,
2283,
15922,
1179,
30004,
13,
3166,
869,
1445,
15901,
29879,
1053,
313,
30004,
13,
1678,
3462,
5091,
568,
7647,
29892,
3462,
9882,
7647,
29892,
10726,
5809,
7647,
29892,
1570,
6848,
7647,
11167,
13,
1678,
6417,
327,
2283,
2605,
7647,
8443,
13,
3166,
19964,
680,
29889,
13239,
1053,
975,
24040,
30004,
13,
3166,
19964,
680,
29889,
8030,
29879,
1053,
6977,
786,
6823,
6913,
30004,
13,
3166,
869,
18035,
1053,
390,
3871,
14470,
28066,
30004,
13,
3166,
869,
690,
473,
1133,
3658,
29879,
1053,
18981,
29934,
3871,
7647,
29892,
18981,
12498,
7647,
30004,
13,
3166,
19964,
680,
29889,
1481,
29889,
690,
473,
1133,
3658,
29879,
1053,
383,
3194,
12498,
7647,
30004,
13,
30004,
13,
30004,
13,
1753,
3158,
29918,
13789,
29918,
1990,
29898,
8299,
1125,
30004,
13,
1678,
736,
3336,
13,
4706,
4321,
1469,
9882,
2956,
29901,
4321,
1469,
9882,
4598,
11167,
13,
4706,
18981,
2283,
2956,
29901,
18981,
2283,
4598,
11167,
13,
4706,
4321,
8259,
2283,
2956,
29901,
4321,
8259,
2283,
4598,
11167,
13,
4706,
4321,
8259,
2956,
29901,
4321,
8259,
4598,
11167,
13,
4706,
4911,
2558,
1742,
2956,
29901,
4911,
2558,
1742,
4598,
11167,
13,
4706,
28736,
2956,
29901,
28736,
4598,
11167,
13,
4706,
1222,
13347,
9882,
2956,
29901,
1222,
13347,
9882,
4598,
30004,
13,
1678,
500,
29961,
8299,
17255,
1990,
1649,
29962,
30004,
13,
30004,
13,
30004,
13,
1990,
903,
4276,
4598,
29898,
23310,
29889,
5907,
1125,
30004,
13,
1678,
338,
29918,
1792,
29918,
26766,
353,
7700,
30004,
13,
1678,
338,
29918,
1688,
29918,
13495,
353,
7700,
30004,
13,
1678,
338,
29918,
11918,
353,
7700,
30004,
13,
30004,
13,
1678,
903,
1643,
29918,
1202,
29918,
13495,
353,
525,
4373,
2166,
568,
29905,
29873,
18069,
29899,
29657,
29899,
29943,
29915,
30004,
13,
1678,
903,
1643,
29918,
1202,
29918,
12322,
353,
525,
4373,
18862,
29915,
30004,
13,
1678,
903,
1643,
29918,
1482,
29918,
1688,
29918,
4878,
353,
525,
4373,
4321,
11733,
29905,
29873,
18069,
29899,
29657,
29899,
29911,
29915,
30004,
13,
1678,
903,
1643,
29918,
1482,
29918,
1792,
29918,
26766,
353,
525,
4373,
4911,
7670,
1742,
29905,
29873,
18069,
29899,
29657,
29899,
29968,
29915,
30004,
13,
1678,
903,
1643,
29918,
6605,
29918,
1989,
9303,
353,
525,
13685,
7670,
9303,
29915,
30004,
13,
1678,
903,
1643,
29918,
1482,
29918,
19529,
279,
353,
525,
4373,
317,
1052,
279,
29905,
29873,
18069,
29899,
29657,
29899,
29963,
29915,
30004,
13,
1678,
903,
1643,
29918,
1482,
29918,
1761,
29918,
11918,
353,
525,
4373,
2391,
28736,
29905,
29873,
18069,
29899,
29657,
29899,
29931,
29915,
30004,
13,
1678,
903,
1643,
29918,
1482,
29918,
8977,
29918,
11918,
353,
525,
4373,
13343,
28736,
29915,
30004,
13,
1678,
903,
1643,
29918,
3167,
29918,
4830,
353,
525,
7277,
19191,
29915,
30004,
13,
1678,
903,
1643,
29918,
8552,
29918,
25254,
353,
525,
11882,
29905,
29873,
18069,
29899,
29657,
29899,
29907,
29915,
30004,
13,
1678,
903,
1643,
29918,
1267,
420,
353,
525,
29934,
3871,
29905,
29873,
29943,
29906,
29915,
30004,
13,
1678,
903,
1643,
29918,
1202,
29918,
10314,
353,
525,
2528,
18981,
29915,
30004,
13,
1678,
903,
1643,
29918,
1482,
29918,
10314,
353,
525,
4373,
18981,
29915,
30004,
13,
1678,
903,
1643,
29918,
2886,
29918,
375,
1179,
353,
525,
12542,
10783,
1179,
29915,
30004,
13,
1678,
903,
1643,
29918,
2622,
29918,
497,
353,
525,
3549,
2178,
4321,
29879,
29915,
30004,
13,
1678,
903,
1643,
29918,
29881,
968,
781,
29918,
497,
353,
525,
29928,
968,
781,
2178,
4321,
29879,
29915,
30004,
13,
1678,
903,
1643,
29918,
2622,
29918,
26061,
29918,
21150,
353,
525,
3549,
9333,
18390,
4321,
29879,
29915,
30004,
13,
1678,
903,
1643,
29918,
2622,
29918,
3364,
287,
29918,
21150,
353,
525,
3549,
9333,
6978,
287,
4321,
29879,
29915,
30004,
13,
1678,
903,
1643,
29918,
8143,
353,
525,
12498,
29905,
29873,
18069,
29899,
29657,
29899,
29928,
29915,
30004,
13,
1678,
903,
1643,
29918,
8143,
29918,
1217,
29918,
21066,
1557,
353,
525,
12498,
29915,
30004,
13,
1678,
903,
1643,
29918,
735,
2325,
353,
525,
1252,
2325,
29915,
30004,
13,
1678,
903,
1643,
29918,
2856,
353,
525,
29419,
29915,
30004,
13,
1678,
903,
1643,
29918,
18837,
29918,
497,
353,
525,
29777,
599,
29915,
30004,
13,
1678,
903,
1643,
29918,
27756,
29918,
497,
353,
525,
1625,
13938,
599,
29915,
30004,
13,
30004,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4701,
29892,
5447,
29892,
2943,
29892,
6055,
1125,
30004,
13,
4706,
26437,
29889,
5907,
17255,
2344,
12035,
1311,
29892,
5447,
8443,
13,
4706,
1583,
29889,
8299,
353,
4701,
30004,
13,
4706,
1583,
3032,
8336,
353,
5447,
30004,
13,
4706,
1583,
3032,
3177,
353,
2943,
30004,
13,
4706,
1583,
3032,
11027,
353,
6055,
30004,
13,
4706,
1583,
3032,
9482,
287,
353,
7700,
30004,
13,
4706,
1583,
29889,
8964,
29898,
8824,
8443,
13,
4706,
1583,
3032,
7323,
786,
29918,
1037,
1061,
353,
5447,
3032,
7323,
786,
29918,
1037,
1061,
30004,
13,
30004,
13,
1678,
732,
6799,
30004,
13,
1678,
822,
2944,
29898,
1311,
1125,
30004,
13,
4706,
736,
1583,
29889,
8299,
29889,
1272,
30004,
13,
30004,
13,
1678,
732,
6799,
30004,
13,
1678,
822,
2943,
29898,
1311,
1125,
30004,
13,
4706,
736,
1583,
3032,
3177,
30004,
13,
30004,
13,
1678,
822,
1510,
29918,
7323,
786,
29898,
1311,
1125,
30004,
13,
4706,
1583,
3032,
7323,
786,
29918,
1037,
1061,
29889,
4294,
29898,
1311,
29892,
6977,
786,
6823,
6913,
29898,
1311,
29892,
1583,
3032,
7387,
511,
30004,
13,
462,
462,
1583,
29889,
8299,
8443,
13,
30004,
13,
1678,
822,
3380,
29918,
1643,
29918,
5628,
29898,
1311,
1125,
30004,
13,
4706,
736,
7700,
30004,
13,
30004,
13,
1678,
822,
3765,
29918,
3808,
287,
29898,
1311,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
822,
1095,
29918,
1643,
29918,
5628,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
822,
1551,
12498,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
822,
1551,
4373,
5091,
568,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
822,
1551,
4373,
9882,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
822,
1551,
4373,
6848,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
822,
1551,
4373,
2659,
2558,
1742,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
822,
1551,
4373,
3057,
8259,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
822,
1551,
4373,
29636,
279,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
822,
1551,
4373,
1293,
16174,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
822,
1551,
4373,
11513,
16174,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
822,
1551,
11882,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
822,
1551,
12542,
15922,
1179,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
822,
1551,
3549,
3596,
24376,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1583,
3032,
8336,
29889,
3549,
3596,
24376,
29898,
1311,
3032,
3177,
8443,
13,
30004,
13,
1678,
822,
1551,
29928,
968,
781,
3596,
24376,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1583,
3032,
8336,
29889,
29928,
968,
781,
3596,
24376,
29898,
1311,
3032,
3177,
8443,
13,
30004,
13,
1678,
822,
1551,
3549,
11730,
17776,
24376,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1583,
3032,
8336,
29889,
3549,
17776,
24376,
29898,
1311,
3032,
3177,
8443,
13,
30004,
13,
1678,
822,
1551,
3549,
11730,
7129,
287,
24376,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1583,
3032,
8336,
29889,
3549,
7129,
287,
24376,
29898,
1311,
3032,
3177,
8443,
13,
30004,
13,
1678,
822,
1551,
17618,
1725,
12498,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
822,
1551,
1252,
2325,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
822,
1551,
29419,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
30004,
13,
1990,
903,
6028,
3629,
29934,
264,
2795,
29898,
3318,
1125,
30004,
13,
30004,
13,
1678,
822,
1551,
29934,
3871,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1583,
3032,
8336,
29889,
1643,
29918,
15204,
29889,
2951,
4775,
6103,
26471,
13,
30004,
13,
1678,
822,
3380,
29918,
1643,
29918,
5628,
29898,
1311,
1125,
30004,
13,
4706,
822,
3858,
29918,
5628,
7295,
30004,
13,
9651,
396,
383,
6415,
2303,
29901,
343,
1022,
29889,
29891,
1022,
29889,
29891,
1022,
29889,
29891,
1022,
29889,
29891,
1022,
30004,
13,
9651,
2943,
353,
1583,
3032,
8336,
3032,
8299,
29889,
2886,
29918,
3177,
29918,
1609,
29918,
8299,
29898,
30004,
13,
18884,
1583,
29889,
8299,
8443,
13,
9651,
565,
2943,
29901,
30004,
13,
18884,
1583,
3032,
8336,
29889,
6103,
4775,
29898,
3177,
8443,
13,
4706,
396,
19928,
4386,
28235,
4959,
1434,
3858,
3863,
30004,
13,
4706,
396,
910,
338,
263,
2329,
363,
18845,
988,
727,
338,
263,
28235,
3158,
30004,
13,
4706,
396,
393,
674,
1735,
445,
3858,
313,
1626,
14059,
599,
6480,
8820,
8443,
13,
4706,
26437,
29889,
5594,
13555,
29898,
1643,
29918,
5628,
8443,
13,
4706,
736,
5852,
30004,
13,
30004,
13,
1678,
822,
1095,
29918,
1643,
29918,
5628,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
565,
451,
1741,
29889,
3624,
6103,
19420,
839,
7295,
30004,
13,
9651,
565,
1583,
3032,
275,
29918,
3084,
29918,
1267,
420,
29898,
3696,
29889,
2577,
4775,
580,
1125,
30004,
13,
18884,
1583,
29889,
1267,
420,
29898,
3696,
29889,
2577,
4775,
3101,
30004,
13,
9651,
1683,
29901,
30004,
13,
18884,
1741,
29889,
29963,
10896,
26471,
13,
30004,
13,
1678,
822,
903,
275,
29918,
3084,
29918,
1267,
420,
29898,
1311,
29892,
3858,
1125,
30004,
13,
4706,
8845,
353,
1583,
29889,
8299,
29889,
15480,
29918,
978,
29898,
1643,
8443,
13,
4706,
565,
8845,
29889,
2704,
29918,
4906,
29901,
30004,
13,
9651,
1583,
3032,
4294,
29918,
18157,
29918,
2704,
29898,
18157,
29889,
2704,
29918,
4906,
8443,
13,
9651,
736,
7700,
30004,
13,
4706,
736,
5852,
30004,
13,
30004,
13,
1678,
822,
903,
4294,
29918,
18157,
29918,
2704,
29898,
1311,
29892,
4589,
29918,
7645,
1125,
30004,
13,
4706,
26437,
29889,
3728,
3313,
29898,
3127,
29918,
7645,
29892,
525,
19448,
4829,
742,
3114,
29922,
23310,
29889,
2965,
1164,
29918,
11432,
8443,
13,
30004,
13,
30004,
13,
1990,
18862,
4598,
7373,
4276,
4598,
1125,
30004,
13,
1678,
338,
29918,
20515,
29531,
353,
7700,
30004,
13,
1678,
338,
29918,
1688,
29918,
13495,
353,
7700,
30004,
13,
1678,
508,
29918,
915,
29918,
9482,
287,
353,
7700,
30004,
13,
1678,
903,
7387,
353,
23160,
4276,
4598,
3032,
1643,
29918,
1482,
29918,
10314,
29962,
30004,
13,
30004,
13,
1678,
822,
1551,
4373,
6848,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1570,
6848,
7647,
29898,
1311,
29889,
8299,
29892,
1583,
3032,
11027,
467,
7978,
26471,
13,
30004,
13,
30004,
13,
1990,
4321,
1469,
4598,
7373,
4276,
4598,
1125,
30004,
13,
1678,
21486,
29918,
20515,
353,
14013,
1583,
29892,
8338,
3192,
29901,
320,
30004,
13,
4706,
313,
275,
8758,
29898,
20515,
3192,
29892,
4911,
2558,
1742,
4598,
29897,
470,
30004,
13,
308,
338,
8758,
29898,
20515,
3192,
29892,
28736,
4598,
876,
30004,
13,
30004,
13,
1678,
338,
29918,
20515,
29531,
353,
7700,
30004,
13,
1678,
338,
29918,
1688,
29918,
13495,
353,
5852,
30004,
13,
30004,
13,
1678,
732,
6799,
30004,
13,
1678,
822,
6987,
29898,
1311,
1125,
30004,
13,
4706,
736,
1583,
29889,
8299,
29889,
21150,
30004,
13,
30004,
13,
1678,
732,
6799,
30004,
13,
1678,
822,
29361,
29898,
1311,
1125,
30004,
13,
4706,
736,
1583,
29889,
8299,
29889,
1989,
9303,
30004,
13,
30004,
13,
1678,
732,
6799,
30004,
13,
1678,
822,
3651,
29898,
1311,
1125,
30004,
13,
4706,
736,
1583,
29889,
8299,
29889,
20897,
30004,
13,
30004,
13,
1678,
822,
756,
29918,
915,
264,
29918,
1545,
2164,
29918,
265,
29918,
20960,
29898,
1311,
1125,
30004,
13,
4706,
736,
1583,
29889,
667,
29889,
5349,
29918,
915,
264,
29918,
1545,
2164,
29918,
265,
29918,
20960,
26471,
13,
30004,
13,
1678,
822,
437,
29918,
8865,
29898,
1311,
29892,
2944,
1125,
30004,
13,
4706,
1583,
29889,
8299,
29889,
1202,
29918,
1688,
29918,
272,
29918,
26766,
29898,
667,
8443,
13,
30004,
13,
1678,
822,
19508,
29898,
1311,
29892,
716,
29918,
978,
1125,
30004,
13,
4706,
736,
7700,
30004,
13,
30004,
13,
1678,
822,
1551,
13685,
2558,
9303,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
9995,
13685,
29879,
278,
29361,
2768,
278,
2578,
264,
356,
15945,
19451,
13,
4706,
1583,
29889,
8299,
29889,
7978,
29898,
13685,
2558,
9303,
3101,
30004,
13,
30004,
13,
1678,
732,
6799,
30004,
13,
1678,
822,
508,
29918,
915,
29918,
9482,
287,
29898,
1311,
1125,
30004,
13,
4706,
565,
451,
1583,
3032,
5349,
29918,
11991,
7295,
30004,
13,
9651,
736,
7700,
30004,
13,
4706,
736,
451,
1583,
3032,
9482,
287,
30004,
13,
30004,
13,
1678,
822,
903,
5349,
29918,
11991,
29898,
1311,
1125,
30004,
13,
4706,
736,
313,
1311,
29889,
667,
29889,
26766,
29918,
2371,
470,
1583,
29889,
667,
29889,
1688,
4878,
29918,
2371,
470,
30004,
13,
18884,
1583,
29889,
667,
29889,
11918,
29918,
2371,
8443,
13,
30004,
13,
1678,
822,
731,
29918,
9482,
287,
29898,
1311,
1125,
30004,
13,
4706,
1583,
3032,
9482,
287,
353,
5852,
30004,
13,
30004,
13,
1678,
822,
1551,
7277,
5809,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
10726,
5809,
7647,
29898,
1311,
29889,
8299,
467,
7978,
26471,
13,
30004,
13,
1678,
822,
1551,
4373,
2659,
2558,
1742,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
270,
19920,
353,
4911,
2558,
1742,
1170,
7647,
29898,
1311,
29889,
8299,
8443,
13,
4706,
565,
270,
19920,
29889,
8964,
19751,
580,
1275,
26437,
29889,
1367,
29918,
8949,
29901,
30004,
13,
9651,
1583,
29889,
8299,
29889,
7978,
29898,
2528,
2558,
1742,
29898,
11671,
29887,
29889,
657,
29918,
978,
3285,
270,
19920,
29889,
657,
29918,
5085,
22130,
30004,
13,
4706,
270,
19920,
29889,
14994,
4727,
26471,
13,
30004,
13,
1678,
822,
1551,
4373,
29636,
279,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1583,
3032,
1482,
29918,
1707,
29898,
29636,
279,
16174,
7647,
8443,
13,
30004,
13,
1678,
822,
1551,
4373,
1293,
16174,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
770,
383,
1296,
16288,
29898,
3318,
1125,
30004,
13,
9651,
5534,
29918,
11027,
353,
1583,
3032,
11027,
30004,
13,
4706,
1583,
3032,
1482,
29918,
1707,
29898,
1293,
16174,
7647,
29892,
7079,
29922,
29943,
1296,
16288,
3101,
30004,
13,
30004,
13,
1678,
822,
1551,
4373,
11513,
16174,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
770,
383,
1296,
16288,
29898,
3318,
1125,
30004,
13,
9651,
5534,
29918,
11027,
353,
1583,
3032,
11027,
30004,
13,
4706,
1583,
3032,
1482,
29918,
1707,
29898,
11513,
16174,
7647,
29892,
7079,
29922,
29943,
1296,
16288,
3101,
30004,
13,
30004,
13,
1678,
822,
903,
1482,
29918,
1707,
29898,
1311,
29892,
7928,
29918,
1990,
29892,
7079,
29922,
8516,
1125,
30004,
13,
4706,
270,
19920,
353,
7928,
29918,
1990,
29898,
1311,
3032,
1707,
29918,
8299,
29892,
7079,
29922,
8582,
8443,
13,
4706,
565,
270,
19920,
29889,
8964,
19751,
580,
1275,
26437,
29889,
1367,
29918,
8949,
29901,
30004,
13,
9651,
1024,
29892,
995,
353,
270,
19920,
29889,
657,
29918,
1767,
26471,
13,
9651,
3440,
353,
270,
19920,
29889,
657,
29918,
9342,
26471,
13,
9651,
1583,
29889,
8299,
29889,
7978,
29898,
2528,
16174,
29898,
978,
29892,
995,
29892,
3440,
876,
30004,
13,
30004,
13,
1678,
732,
6799,
30004,
13,
1678,
822,
903,
1707,
29918,
8299,
29898,
1311,
1125,
30004,
13,
4706,
736,
1583,
29889,
8299,
29889,
1272,
1445,
29918,
8299,
29889,
20897,
30004,
13,
30004,
13,
30004,
13,
1990,
4321,
1469,
9882,
4598,
29898,
3057,
1469,
4598,
1125,
30004,
13,
30004,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
334,
5085,
1125,
30004,
13,
4706,
4321,
1469,
4598,
17255,
2344,
12035,
1311,
29892,
334,
5085,
8443,
13,
4706,
1583,
3032,
7387,
353,
518,
30004,
13,
9651,
903,
4276,
4598,
3032,
1643,
29918,
1202,
29918,
13495,
11167,
13,
9651,
903,
4276,
4598,
3032,
1643,
29918,
1202,
29918,
12322,
11167,
13,
9651,
903,
4276,
4598,
3032,
1643,
29918,
1482,
29918,
10314,
11167,
13,
9651,
525,
5634,
23592,
13,
9651,
903,
4276,
4598,
3032,
1643,
29918,
1482,
29918,
1792,
29918,
26766,
11167,
13,
9651,
903,
4276,
4598,
3032,
1643,
29918,
1482,
29918,
19529,
279,
11167,
13,
9651,
903,
4276,
4598,
3032,
1643,
29918,
1482,
29918,
1761,
29918,
11918,
11167,
13,
9651,
903,
4276,
4598,
3032,
1643,
29918,
1482,
29918,
8977,
29918,
11918,
11167,
13,
9651,
525,
5634,
23592,
13,
9651,
903,
4276,
4598,
3032,
1643,
29918,
3167,
29918,
4830,
30004,
13,
4706,
4514,
30004,
13,
4706,
565,
1583,
29889,
8299,
29889,
3560,
29901,
30004,
13,
9651,
1583,
3032,
7387,
29889,
21843,
4197,
29918,
4276,
4598,
3032,
1643,
29918,
8143,
29918,
1217,
29918,
21066,
1557,
2314,
30004,
13,
30004,
13,
4706,
1583,
3032,
7387,
29889,
21843,
4197,
30004,
13,
9651,
525,
5634,
23592,
13,
9651,
903,
4276,
4598,
3032,
1643,
29918,
2622,
29918,
497,
11167,
13,
9651,
903,
4276,
4598,
3032,
1643,
29918,
29881,
968,
781,
29918,
497,
11167,
13,
9651,
903,
4276,
4598,
3032,
1643,
29918,
2622,
29918,
26061,
29918,
21150,
11167,
13,
9651,
903,
4276,
4598,
3032,
1643,
29918,
2622,
29918,
3364,
287,
29918,
21150,
30004,
13,
308,
2314,
30004,
13,
4706,
565,
1583,
29889,
8299,
29889,
3560,
29901,
30004,
13,
9651,
1583,
3032,
7387,
29889,
21843,
18959,
5634,
23592,
13,
462,
462,
29871,
903,
4276,
4598,
3032,
1643,
29918,
735,
2325,
2314,
30004,
13,
4706,
1583,
3032,
7387,
29889,
21843,
18959,
5634,
23592,
13,
462,
795,
903,
4276,
4598,
3032,
1643,
29918,
18837,
29918,
497,
11167,
13,
462,
795,
903,
4276,
4598,
3032,
1643,
29918,
27756,
29918,
497,
2314,
30004,
13,
30004,
13,
1678,
822,
1551,
29777,
3596,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1583,
3032,
8336,
29889,
29777,
3596,
4035,
20284,
29898,
1311,
3032,
3177,
8443,
13,
30004,
13,
1678,
822,
1551,
1625,
13938,
3596,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1583,
3032,
8336,
29889,
1625,
13938,
3596,
4035,
20284,
29898,
1311,
3032,
3177,
8443,
13,
30004,
13,
1678,
822,
1551,
4373,
5091,
568,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
3462,
5091,
568,
7647,
29898,
1311,
29889,
8299,
29892,
1583,
3032,
11027,
467,
7978,
26471,
13,
30004,
13,
1678,
822,
1551,
4373,
9882,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
3462,
9882,
7647,
29898,
1311,
29889,
8299,
29892,
1583,
3032,
11027,
467,
7978,
26471,
13,
30004,
13,
1678,
822,
1551,
4373,
6848,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1570,
6848,
7647,
29898,
1311,
29889,
8299,
29892,
1583,
3032,
11027,
467,
7978,
26471,
13,
30004,
13,
1678,
822,
1551,
12498,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
383,
3194,
12498,
7647,
29898,
1311,
29889,
8299,
467,
7978,
26471,
13,
30004,
13,
1678,
822,
1551,
1252,
2325,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1018,
29901,
30004,
13,
9651,
1583,
29889,
8299,
29889,
7978,
29898,
1252,
2325,
3101,
30004,
13,
4706,
5174,
360,
13163,
21860,
327,
1469,
2451,
29901,
30004,
13,
9651,
26437,
29889,
3728,
3313,
877,
9882,
3743,
9644,
10511,
848,
9903,
29876,
29915,
30004,
13,
462,
3986,
525,
3492,
1818,
4078,
848,
1434,
429,
22368,
29889,
1495,
30004,
13,
30004,
13,
30004,
13,
1990,
903,
2283,
4598,
1349,
273,
6028,
3629,
29934,
264,
2795,
7373,
6028,
3629,
29934,
264,
2795,
1125,
30004,
13,
30004,
13,
1678,
732,
957,
24040,
7373,
6028,
3629,
29934,
264,
2795,
8443,
13,
1678,
822,
3380,
29918,
1643,
29918,
5628,
29898,
1311,
1125,
30004,
13,
4706,
1583,
3032,
1025,
29918,
1643,
353,
1583,
3032,
3177,
29889,
2577,
1626,
26471,
13,
4706,
1583,
3032,
842,
29918,
3177,
29918,
1643,
29898,
1311,
29889,
8299,
29889,
6500,
3871,
8443,
13,
4706,
736,
903,
6028,
3629,
29934,
264,
2795,
29889,
463,
29918,
1643,
29918,
5628,
29898,
1311,
8443,
13,
30004,
13,
1678,
732,
957,
24040,
7373,
6028,
3629,
29934,
264,
2795,
8443,
13,
1678,
822,
1095,
29918,
1643,
29918,
5628,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
565,
451,
1741,
29889,
3624,
6103,
19420,
839,
7295,
30004,
13,
9651,
1121,
353,
1583,
29889,
8299,
29889,
7978,
29898,
30004,
13,
18884,
1583,
3032,
1267,
420,
29918,
6519,
29898,
3696,
29889,
2577,
4775,
22130,
30004,
13,
9651,
565,
1121,
29901,
30004,
13,
18884,
1583,
3032,
1267,
420,
29918,
554,
29918,
13789,
26471,
13,
18884,
1583,
3032,
1025,
29918,
1643,
353,
1583,
29889,
8299,
29889,
6500,
3871,
30004,
13,
9651,
1683,
29901,
30004,
13,
18884,
1741,
29889,
29963,
10896,
26471,
13,
4706,
1683,
29901,
30004,
13,
9651,
1583,
3032,
842,
29918,
3177,
29918,
1643,
29898,
1311,
3032,
1025,
29918,
1643,
8443,
13,
30004,
13,
1678,
822,
903,
1267,
420,
29918,
554,
29918,
13789,
29898,
1311,
1125,
30004,
13,
4706,
1209,
30004,
13,
30004,
13,
1678,
822,
903,
1267,
420,
29918,
6519,
29898,
1311,
29892,
3858,
1125,
30004,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
29898,
1311,
17255,
1990,
1649,
8443,
13,
30004,
13,
1678,
822,
903,
842,
29918,
3177,
29918,
1643,
29898,
1311,
29892,
3858,
1125,
30004,
13,
4706,
1583,
3032,
8336,
29889,
2697,
2001,
1626,
29898,
1311,
3032,
3177,
29892,
3858,
8443,
13,
30004,
13,
30004,
13,
1990,
18981,
2283,
4598,
7373,
2283,
4598,
1349,
273,
6028,
3629,
29934,
264,
2795,
29892,
4321,
1469,
4598,
1125,
30004,
13,
1678,
338,
29918,
1688,
29918,
13495,
353,
7700,
30004,
13,
1678,
903,
7387,
353,
23160,
4276,
4598,
3032,
1643,
29918,
1482,
29918,
1792,
29918,
26766,
11167,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
1482,
29918,
19529,
279,
11167,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
1482,
29918,
1761,
29918,
11918,
11167,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
1482,
29918,
8977,
29918,
11918,
11167,
13,
18884,
525,
5634,
23592,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
1267,
420,
11167,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
3167,
29918,
4830,
11167,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
6605,
29918,
1989,
9303,
11167,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
2886,
29918,
375,
1179,
11167,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
8143,
29962,
30004,
13,
30004,
13,
1678,
822,
1551,
12542,
15922,
1179,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
18981,
2283,
15922,
1179,
29898,
1311,
29889,
8299,
29892,
1583,
3032,
8336,
29889,
28970,
467,
4294,
26471,
13,
30004,
13,
1678,
822,
1551,
12498,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
18981,
12498,
7647,
29898,
1311,
29889,
8299,
467,
7978,
26471,
13,
30004,
13,
1678,
822,
1551,
17618,
1725,
12498,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
736,
1583,
29889,
2951,
12498,
29898,
3696,
8443,
13,
30004,
13,
1678,
732,
957,
24040,
7373,
2283,
4598,
1349,
273,
6028,
3629,
29934,
264,
2795,
8443,
13,
1678,
822,
903,
1267,
420,
29918,
6519,
29898,
1311,
29892,
3858,
1125,
30004,
13,
4706,
736,
390,
3871,
6848,
2283,
29898,
30004,
13,
9651,
3858,
29892,
1583,
3032,
3198,
29918,
9344,
29918,
1267,
420,
29918,
7959,
29918,
326,
4011,
8443,
13,
30004,
13,
1678,
822,
903,
3198,
29918,
9344,
29918,
1267,
420,
29918,
7959,
29918,
326,
4011,
29898,
1311,
1125,
30004,
13,
4706,
736,
18981,
29934,
3871,
7647,
29898,
1311,
29889,
8299,
467,
7978,
26471,
13,
30004,
13,
30004,
13,
1990,
4321,
8259,
2283,
4598,
7373,
2283,
4598,
1349,
273,
6028,
3629,
29934,
264,
2795,
29892,
4321,
1469,
4598,
1125,
30004,
13,
1678,
21486,
29918,
20515,
353,
14013,
334,
5085,
29901,
5852,
30004,
13,
1678,
903,
7387,
353,
23160,
4276,
4598,
3032,
1643,
29918,
1482,
29918,
1688,
29918,
4878,
11167,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
1482,
29918,
1792,
29918,
26766,
11167,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
1482,
29918,
19529,
279,
11167,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
1482,
29918,
1761,
29918,
11918,
11167,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
1482,
29918,
8977,
29918,
11918,
11167,
13,
18884,
525,
5634,
23592,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
1267,
420,
11167,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
3167,
29918,
4830,
11167,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
6605,
29918,
1989,
9303,
11167,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
8143,
11167,
13,
18884,
525,
5634,
23592,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
2622,
29918,
497,
11167,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
29881,
968,
781,
29918,
497,
11167,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
2622,
29918,
26061,
29918,
21150,
11167,
13,
18884,
903,
4276,
4598,
3032,
1643,
29918,
2622,
29918,
3364,
287,
29918,
21150,
30004,
13,
18884,
4514,
30004,
13,
30004,
13,
1678,
822,
1551,
4373,
3057,
8259,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
270,
19920,
353,
4321,
8259,
1170,
7647,
29898,
1311,
29889,
8299,
8443,
13,
4706,
565,
270,
19920,
29889,
8964,
19751,
580,
1275,
26437,
29889,
1367,
29918,
8949,
29901,
30004,
13,
9651,
1583,
29889,
8299,
29889,
7978,
29898,
2528,
3057,
8259,
29898,
11671,
29887,
29889,
657,
29918,
978,
22130,
30004,
13,
4706,
270,
19920,
29889,
14994,
4727,
26471,
13,
30004,
13,
1678,
822,
1551,
12498,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
565,
26437,
29889,
3728,
3313,
877,
12498,
1243,
1206,
934,
742,
5777,
683,
2433,
16376,
3568,
23592,
13,
462,
308,
3114,
29922,
23310,
29889,
21143,
29918,
6632,
891,
26437,
29889,
2965,
1164,
29918,
14130,
2725,
29897,
1275,
26437,
29889,
21143,
29901,
30004,
13,
9651,
1583,
29889,
8299,
29889,
7978,
29898,
12498,
2283,
3101,
30004,
13,
30004,
13,
1678,
822,
1551,
17618,
1725,
12498,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
736,
1583,
29889,
2951,
12498,
29898,
3696,
8443,
13,
30004,
13,
1678,
732,
957,
24040,
7373,
2283,
4598,
1349,
273,
6028,
3629,
29934,
264,
2795,
8443,
13,
1678,
822,
903,
1267,
420,
29918,
6519,
29898,
1311,
29892,
3858,
1125,
30004,
13,
4706,
736,
390,
3871,
2283,
29898,
1643,
8443,
13,
30004,
13,
1678,
732,
957,
24040,
7373,
2283,
4598,
1349,
273,
6028,
3629,
29934,
264,
2795,
8443,
13,
1678,
822,
903,
1267,
420,
29918,
554,
29918,
13789,
29898,
1311,
1125,
30004,
13,
4706,
1583,
3032,
8336,
29889,
29928,
968,
781,
3596,
24376,
29898,
1311,
3032,
3177,
8443,
13,
30004,
13,
30004,
13,
1990,
903,
3057,
2816,
2659,
2558,
1742,
4598,
7373,
6028,
3629,
29934,
264,
2795,
29892,
903,
4276,
4598,
1125,
30004,
13,
1678,
21486,
29918,
20515,
353,
14013,
334,
5085,
29901,
7700,
30004,
13,
1678,
338,
29918,
20515,
29531,
353,
5852,
30004,
13,
1678,
903,
7387,
353,
518,
30004,
13,
4706,
903,
4276,
4598,
3032,
1643,
29918,
8552,
29918,
25254,
29892,
525,
16619,
5020,
29905,
29873,
18069,
29899,
3373,
23592,
13,
4706,
525,
16619,
9943,
29905,
29873,
18069,
29899,
6767,
742,
903,
4276,
4598,
3032,
1643,
29918,
1267,
420,
29892,
525,
5634,
742,
525,
12498,
29915,
30004,
13,
1678,
4514,
30004,
13,
30004,
13,
1678,
822,
3349,
29898,
1311,
1125,
30004,
13,
4706,
1583,
29889,
8299,
29889,
8143,
26471,
13,
30004,
13,
1678,
822,
19508,
29898,
1311,
29892,
716,
29918,
978,
1125,
30004,
13,
4706,
1583,
29889,
8299,
29889,
7978,
29898,
1311,
3032,
3258,
29918,
1267,
420,
29918,
6519,
29898,
1482,
29918,
978,
876,
30004,
13,
30004,
13,
1678,
822,
1551,
11882,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
270,
19920,
353,
1583,
3032,
8552,
29918,
978,
29918,
15901,
29918,
1990,
29898,
1311,
29889,
8299,
29892,
1583,
29889,
667,
8443,
13,
4706,
565,
270,
19920,
29889,
8964,
19751,
580,
1275,
26437,
29889,
1367,
29918,
8949,
29901,
30004,
13,
9651,
1583,
29889,
8299,
29889,
7978,
29898,
11882,
15735,
307,
2887,
29898,
11671,
29887,
29889,
657,
29918,
978,
22130,
30004,
13,
4706,
270,
19920,
29889,
14994,
4727,
26471,
13,
30004,
13,
1678,
822,
1551,
16619,
3373,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
565,
1583,
29889,
8299,
29889,
11631,
29918,
786,
7295,
30004,
13,
9651,
1583,
3032,
8336,
29889,
11631,
29918,
786,
29898,
1311,
3032,
3177,
8443,
13,
30004,
13,
1678,
822,
1551,
16619,
6767,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
565,
1583,
29889,
8299,
29889,
11631,
29918,
3204,
7295,
30004,
13,
9651,
1583,
3032,
8336,
29889,
11631,
29918,
3204,
29898,
1311,
3032,
3177,
8443,
13,
30004,
13,
1678,
822,
1551,
12498,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1583,
29889,
8299,
29889,
7978,
29898,
15941,
15735,
307,
29898,
1311,
29889,
8299,
876,
30004,
13,
30004,
13,
30004,
13,
1990,
4321,
8259,
4598,
7373,
3057,
2816,
2659,
2558,
1742,
4598,
1125,
30004,
13,
1678,
903,
29881,
2075,
391,
353,
2875,
29898,
2892,
1583,
29901,
1583,
29889,
667,
29889,
29881,
2075,
391,
8443,
13,
1678,
903,
8552,
29918,
978,
29918,
15901,
29918,
1990,
353,
4321,
8259,
1170,
7647,
30004,
13,
30004,
13,
1678,
822,
903,
1202,
29918,
8552,
29918,
517,
29918,
8336,
29898,
1311,
29892,
3847,
29918,
3177,
29892,
13746,
1125,
30004,
13,
4706,
1583,
3032,
8336,
29889,
1202,
29918,
1688,
29898,
3560,
29918,
3177,
29892,
13746,
8443,
13,
30004,
13,
1678,
822,
903,
3258,
29918,
1267,
420,
29918,
6519,
29898,
1311,
29892,
716,
29918,
978,
1125,
30004,
13,
4706,
736,
390,
3871,
3057,
29898,
1482,
29918,
978,
8443,
13,
30004,
13,
30004,
13,
1990,
4911,
2558,
1742,
4598,
7373,
3057,
2816,
2659,
2558,
1742,
4598,
1125,
30004,
13,
1678,
338,
29918,
1792,
29918,
26766,
353,
5852,
30004,
13,
1678,
903,
29881,
2075,
391,
353,
2875,
29898,
2892,
1583,
29901,
1583,
29889,
667,
29889,
29881,
2075,
391,
8443,
13,
1678,
903,
8552,
29918,
978,
29918,
15901,
29918,
1990,
353,
14187,
2659,
2558,
1742,
7647,
30004,
13,
1678,
903,
7387,
353,
903,
3057,
2816,
2659,
2558,
1742,
4598,
3032,
7387,
718,
518,
30004,
13,
4706,
903,
4276,
4598,
3032,
1643,
29918,
2886,
29918,
375,
1179,
29962,
30004,
13,
30004,
13,
1678,
822,
903,
1202,
29918,
8552,
29918,
517,
29918,
8336,
29898,
1311,
29892,
3847,
29918,
3177,
29892,
13746,
1125,
30004,
13,
4706,
1583,
3032,
8336,
29889,
1202,
29918,
26766,
29898,
3560,
29918,
3177,
29892,
13746,
8443,
13,
30004,
13,
1678,
822,
903,
3258,
29918,
1267,
420,
29918,
6519,
29898,
1311,
29892,
716,
29918,
978,
1125,
30004,
13,
4706,
736,
390,
3871,
2558,
1742,
22034,
1038,
2063,
29898,
30004,
13,
9651,
1583,
29889,
8299,
29889,
978,
29892,
716,
29918,
978,
11167,
13,
9651,
390,
3871,
14470,
28066,
29898,
1311,
29889,
2577,
9780,
2141,
2577,
9780,
25739,
30004,
13,
9651,
1583,
29889,
8299,
29889,
3888,
8443,
13,
30004,
13,
1678,
822,
1551,
12542,
15922,
1179,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
10783,
1179,
29898,
1311,
29889,
8299,
29892,
1583,
3032,
8336,
29889,
28970,
467,
4294,
26471,
13,
30004,
13,
30004,
13,
1990,
28736,
4598,
7373,
6028,
3629,
29934,
264,
2795,
29892,
903,
4276,
4598,
1125,
30004,
13,
1678,
21486,
29918,
20515,
353,
14013,
334,
5085,
29901,
7700,
30004,
13,
1678,
338,
29918,
20515,
29531,
353,
5852,
30004,
13,
1678,
338,
29918,
11918,
353,
5852,
30004,
13,
1678,
1551,
16619,
3373,
353,
1551,
16619,
6767,
353,
14013,
334,
5085,
29901,
6213,
30004,
13,
1678,
903,
7387,
353,
23160,
4276,
4598,
3032,
1643,
29918,
1267,
420,
29892,
525,
12498,
2033,
30004,
13,
30004,
13,
1678,
732,
957,
24040,
7373,
4276,
4598,
8443,
13,
1678,
822,
3765,
29918,
3808,
287,
29898,
1311,
1125,
30004,
13,
4706,
390,
680,
6585,
16174,
7647,
29898,
8299,
29922,
1311,
29889,
8299,
467,
23679,
26471,
13,
30004,
13,
1678,
822,
1551,
12498,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1583,
29889,
5992,
26471,
13,
30004,
13,
1678,
822,
3349,
29898,
1311,
1125,
30004,
13,
4706,
1583,
29889,
8299,
29889,
8143,
26471,
13,
30004,
13,
1678,
822,
19508,
29898,
1311,
29892,
716,
29918,
978,
1125,
30004,
13,
4706,
1583,
29889,
8299,
29889,
7978,
29898,
6422,
16174,
1170,
29898,
1482,
29918,
978,
876,
30004,
13,
30004,
13,
1678,
732,
6799,
30004,
13,
1678,
822,
2380,
29898,
1311,
1125,
30004,
13,
4706,
736,
1583,
29889,
8299,
29889,
2248,
30004,
13,
30004,
13,
30004,
13,
1990,
18981,
10303,
4598,
7373,
4276,
4598,
1125,
30004,
13,
1678,
508,
29918,
915,
29918,
9482,
287,
353,
338,
29918,
20515,
29531,
353,
338,
29918,
1792,
29918,
26766,
353,
338,
29918,
1688,
29918,
13495,
353,
7700,
30004,
13,
1678,
19508,
353,
14013,
1583,
29892,
716,
29918,
978,
29901,
7700,
30004,
13,
1678,
21486,
29918,
20515,
353,
14013,
1583,
29892,
8338,
3192,
29901,
7700,
30004,
13,
1678,
903,
7387,
353,
23160,
4276,
4598,
3032,
1643,
29918,
1202,
29918,
10314,
29962,
30004,
13,
30004,
13,
1678,
732,
6799,
30004,
13,
1678,
822,
2944,
29898,
1311,
1125,
30004,
13,
4706,
736,
6213,
30004,
13,
30004,
13,
1678,
822,
1551,
2528,
6848,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
2224,
353,
6417,
327,
2283,
2605,
7647,
29898,
30004,
13,
9651,
1583,
29892,
1583,
29889,
8299,
29892,
1583,
3032,
11027,
467,
7978,
26471,
13,
4706,
565,
2224,
29901,
30004,
13,
9651,
1583,
29889,
8299,
29889,
1359,
29918,
10314,
29898,
2084,
29892,
16012,
14470,
28066,
29898,
1311,
876,
30004,
13,
30004,
13,
30004,
13,
1990,
1222,
13347,
9882,
4598,
29898,
3057,
1469,
9882,
4598,
1125,
30004,
13,
1678,
338,
29918,
20515,
29531,
353,
7700,
30004,
13,
1678,
338,
29918,
1688,
29918,
13495,
353,
5852,
30004,
13,
30004,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
334,
5085,
1125,
30004,
13,
4706,
4321,
1469,
4598,
17255,
2344,
12035,
1311,
29892,
334,
5085,
8443,
13,
4706,
1583,
3032,
7387,
353,
23160,
4276,
4598,
3032,
1643,
29918,
2856,
29962,
30004,
13,
30004,
13,
1678,
822,
1551,
29419,
29898,
1311,
29892,
1741,
1125,
30004,
13,
4706,
1583,
29889,
8299,
29889,
7978,
29898,
29419,
3101,
30004,
13,
2
] |
api/exceptions.py | SirSkaro/smogon.py | 0 | 78235 | class Error(Exception):
"""Base class for other exceptions"""
pass
class InvalidSpecies(Error):
"""Species out of bounds of legitimate species"""
pass
class InvalidForm(Error):
"""Form is invalid"""
pass
class APIError(Error):
"""Something wrong with the API"""
pass | [
1,
770,
4829,
29898,
2451,
1125,
13,
1678,
9995,
5160,
770,
363,
916,
15283,
15945,
29908,
13,
1678,
1209,
13,
13,
1990,
21403,
10649,
2478,
29898,
2392,
1125,
13,
1678,
9995,
10649,
2478,
714,
310,
13451,
310,
25204,
6490,
6606,
15945,
29908,
13,
1678,
1209,
13,
13,
1990,
21403,
2500,
29898,
2392,
1125,
13,
1678,
9995,
2500,
338,
8340,
15945,
29908,
13,
1678,
1209,
13,
13,
1990,
3450,
2392,
29898,
2392,
1125,
13,
1678,
9995,
16804,
2743,
411,
278,
3450,
15945,
29908,
13,
1678,
1209,
2
] |
app.py | sasidharpunna/CRMFBot | 0 | 52352 | from flask import Flask, render_template, request
from chatterbot import ChatBot
import pypyodbc as odbc
import re
app = Flask(__name__)
CRMFBot = ChatBot("Chatterbot", storage_adapter="chatterbot.storage.SQLStorageAdapter")
@app.route("/")
def home():
return render_template("index.html")
@app.route("/get")
def get_bot_response():
userText = request.args.get('msg')
db_host = 'python1'
db_name = 'projectdetails'
db_user = 'sa'
db_password = '$'
mudid='12345'
weekno = re.findall('\d+',userText)
req=userText.upper().find('TARGET')
def get_target_details(required,weekno):
connection_string = 'DSN=' + db_host + ';Database=' + db_name + ';UID=' + db_user + ';PWD=' + db_password + ';'
db = odbc.connect(connection_string)
cur=db.cursor()
SQL= "select " + required + " from targetdetails where MUDID = '" + mudid +"' and weekno = '" + weekno[0] +"';"
cur.execute(SQL)
output=cur.fetchone()
print(output[0])
print(type(output))
print(type(output[0]))
if output[0] == '':
res = 'Most likely, you dont have ' + required + ' for week no ' + str(weekno[0])
print(res)
return res
else:
res = 'Your ' + required + ' for week ' + str(weekno[0]) + ' is ' + str(output[0])
print(res)
return res
if req != -1 and weekno:
required='target'
return get_target_details(required,weekno)
elif req == -1 and weekno:
required='achieved'
return get_target_details(required,weekno)
else:
result = str(CRMFBot.get_response(userText))
return result
if __name__ == "__main__":
app.run()
| [
1,
515,
29784,
1053,
2379,
1278,
29892,
4050,
29918,
6886,
29892,
2009,
13,
3166,
521,
2620,
7451,
1053,
678,
271,
29933,
327,
13,
5215,
282,
1478,
29891,
10396,
29883,
408,
2413,
12328,
13,
5215,
337,
13,
13,
932,
353,
2379,
1278,
22168,
978,
1649,
29897,
13,
11341,
29924,
18426,
327,
353,
678,
271,
29933,
327,
703,
1451,
2620,
7451,
613,
8635,
29918,
21412,
543,
305,
2620,
7451,
29889,
12925,
29889,
4176,
10486,
6168,
1159,
13,
29992,
932,
29889,
13134,
11974,
1159,
13,
1753,
3271,
7295,
13,
1678,
736,
4050,
29918,
6886,
703,
2248,
29889,
1420,
1159,
13,
13,
29992,
932,
29889,
13134,
11974,
657,
1159,
13,
1753,
679,
29918,
7451,
29918,
5327,
7295,
13,
1678,
1404,
1626,
353,
2009,
29889,
5085,
29889,
657,
877,
7645,
1495,
13,
1678,
4833,
29918,
3069,
353,
525,
4691,
29896,
29915,
13,
1678,
4833,
29918,
978,
353,
525,
4836,
14144,
29915,
13,
1678,
4833,
29918,
1792,
353,
525,
4977,
29915,
13,
1678,
4833,
29918,
5630,
353,
14180,
29915,
13,
1678,
17439,
333,
2433,
29896,
29906,
29941,
29946,
29945,
29915,
13,
1678,
4723,
1217,
353,
337,
29889,
2886,
497,
28909,
29881,
29974,
742,
1792,
1626,
29897,
13,
1678,
12428,
29922,
1792,
1626,
29889,
21064,
2141,
2886,
877,
29911,
1718,
7194,
1495,
13,
13,
1678,
822,
679,
29918,
5182,
29918,
14144,
29898,
12403,
29892,
18448,
1217,
1125,
13,
4706,
3957,
29918,
1807,
353,
525,
8452,
29940,
2433,
718,
4833,
29918,
3069,
718,
21921,
9112,
2433,
718,
4833,
29918,
978,
718,
21921,
11150,
2433,
718,
4833,
29918,
1792,
718,
21921,
29925,
24668,
2433,
718,
4833,
29918,
5630,
718,
21921,
29915,
13,
4706,
4833,
353,
2413,
12328,
29889,
6915,
29898,
9965,
29918,
1807,
29897,
13,
4706,
3151,
29922,
2585,
29889,
18127,
580,
13,
4706,
3758,
29922,
376,
2622,
376,
718,
3734,
718,
376,
515,
3646,
14144,
988,
341,
15789,
1367,
353,
18793,
718,
17439,
333,
718,
29908,
29915,
322,
4723,
1217,
353,
18793,
718,
4723,
1217,
29961,
29900,
29962,
718,
29908,
2670,
29908,
13,
4706,
3151,
29889,
7978,
29898,
4176,
29897,
13,
4706,
1962,
29922,
2764,
29889,
9155,
650,
580,
13,
4706,
1596,
29898,
4905,
29961,
29900,
2314,
13,
4706,
1596,
29898,
1853,
29898,
4905,
876,
13,
4706,
1596,
29898,
1853,
29898,
4905,
29961,
29900,
12622,
13,
4706,
565,
1962,
29961,
29900,
29962,
1275,
525,
2396,
13,
9651,
620,
353,
525,
29924,
520,
5517,
29892,
366,
4555,
505,
525,
718,
3734,
718,
525,
363,
4723,
694,
525,
718,
851,
29898,
18448,
1217,
29961,
29900,
2314,
13,
9651,
1596,
29898,
690,
29897,
13,
9651,
736,
620,
13,
4706,
1683,
29901,
13,
9651,
620,
353,
525,
10858,
525,
718,
3734,
718,
525,
363,
4723,
525,
718,
851,
29898,
18448,
1217,
29961,
29900,
2314,
718,
525,
338,
525,
718,
851,
29898,
4905,
29961,
29900,
2314,
13,
9651,
1596,
29898,
690,
29897,
13,
9651,
736,
620,
13,
13,
1678,
565,
12428,
2804,
448,
29896,
322,
4723,
1217,
29901,
13,
4706,
3734,
2433,
5182,
29915,
13,
4706,
736,
679,
29918,
5182,
29918,
14144,
29898,
12403,
29892,
18448,
1217,
29897,
13,
3986,
13,
1678,
25342,
12428,
1275,
448,
29896,
322,
4723,
1217,
29901,
13,
4706,
3734,
2433,
496,
6402,
29915,
13,
4706,
736,
679,
29918,
5182,
29918,
14144,
29898,
12403,
29892,
18448,
1217,
29897,
13,
13,
1678,
1683,
29901,
13,
4706,
1121,
353,
851,
29898,
11341,
29924,
18426,
327,
29889,
657,
29918,
5327,
29898,
1792,
1626,
876,
13,
4706,
736,
1121,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
623,
29889,
3389,
580,
13,
2
] |
tasks/task 2.py | Mirror-Shard/L2.8 | 0 | 116795 | <filename>tasks/task 2.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
в основной ветке программы вызывается функция cylinder(),
которая вычисляет площадь цилиндра.
В теле cylinder() определена функция circle(),
вычисляющая площадь круга по формуле. В теле cylinder() у пользователя
спрашивается, хочет ли он получить только площадь боковой поверхности,
которая вычисляется по формуле, или полную площадь цилиндра. В последнем
случае к площади боковой поверхности цилиндра должен
добавляться удвоенный результат вычислений функции circle().
"""
import sys
import math
# Функция вычисляет площадь цилиндра
def cylinder(radius, height, pick):
# Вычисляет площадь круга
def cylinder_circle(r):
circle = math.pi * r ** 2
return circle
# Вычисляет боковую сторону цилиндра
def cylinder_side(r, h):
side = 2 * math.pi * r * h
return side
# Вычисляет площадь всего цилиндра
def full_cylinder(r, h):
full = cylinder_side(r, h) + cylinder_circle(r) * 2
return full
# Если выбор 1
if pick == 1:
print("Площадь всего цилиндра равна:")
print(full_cylinder(radius, height))
# Если выбор 2
elif pick == 2:
print("Площадь боковой стороны цилиндра равна:")
print(cylinder_side(radius, height))
# Недопустимый выбор
else:
print("Введено недопустимое значение", file=sys.stderr)
exit(1)
if __name__ == '__main__':
# Запрос радиуса и высоты
rad = float(input("Введите радиус: "))
hei = float(input("Введите высоту: "))
# Запрос выбора
print("Вычислить площадь всего цилиндра или только боковой стороны?")
print("1 - всего цилиндра, 2 - только боковой стороны")
choice = int(input())
cylinder(rad, hei, choice)
| [
1,
529,
9507,
29958,
20673,
29914,
7662,
29871,
29906,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
29942,
8838,
2082,
490,
1257,
2476,
20796,
5588,
2771,
10706,
4364,
20153,
5274,
20396,
4995,
3285,
13,
551,
9011,
29970,
2771,
1499,
29935,
23401,
20281,
10826,
12442,
8279,
17955,
29889,
13,
30012,
13947,
20396,
4995,
580,
20658,
14275,
20153,
5274,
8607,
3285,
13,
4938,
1499,
29935,
1225,
30005,
19485,
20281,
10826,
1186,
1086,
1779,
733,
9116,
1805,
753,
29889,
939,
13947,
20396,
4995,
580,
863,
18636,
9718,
11146,
13,
29935,
8821,
1911,
25107,
29892,
6785,
1093,
29932,
3550,
6524,
12052,
1413,
15302,
20281,
10826,
3419,
7220,
29977,
19759,
29988,
5395,
29892,
13,
551,
9011,
29970,
2771,
1499,
29935,
1225,
4364,
733,
9116,
1805,
753,
29892,
7082,
7372,
6627,
20281,
10826,
12442,
8279,
17955,
29889,
939,
17235,
14522,
13,
12394,
1282,
29919,
1186,
20281,
956,
3419,
7220,
29977,
19759,
29988,
5395,
12442,
8279,
17955,
11213,
4054,
13,
1802,
3102,
7593,
4199,
863,
29957,
984,
656,
2370,
13439,
29932,
2771,
1499,
3280,
2332,
20153,
3540,
8607,
2141,
13,
15945,
29908,
13,
13,
5215,
10876,
13,
5215,
5844,
13,
13,
13,
29937,
2515,
13937,
5274,
2771,
1499,
29935,
23401,
20281,
10826,
12442,
8279,
17955,
13,
1753,
20396,
4995,
29898,
13471,
29892,
3171,
29892,
5839,
1125,
13,
13,
1678,
396,
14966,
1499,
29935,
23401,
20281,
10826,
1186,
1086,
1779,
13,
1678,
822,
20396,
4995,
29918,
16622,
29898,
29878,
1125,
13,
4706,
8607,
353,
5844,
29889,
1631,
334,
364,
3579,
29871,
29906,
13,
4706,
736,
8607,
13,
13,
1678,
396,
14966,
1499,
29935,
23401,
3419,
2530,
29744,
18779,
1864,
12442,
8279,
17955,
13,
1678,
822,
20396,
4995,
29918,
2975,
29898,
29878,
29892,
298,
1125,
13,
4706,
2625,
353,
29871,
29906,
334,
5844,
29889,
1631,
334,
364,
334,
298,
13,
4706,
736,
2625,
13,
13,
1678,
396,
14966,
1499,
29935,
23401,
20281,
10826,
26566,
12442,
8279,
17955,
13,
1678,
822,
2989,
29918,
1270,
29880,
4995,
29898,
29878,
29892,
298,
1125,
13,
4706,
2989,
353,
20396,
4995,
29918,
2975,
29898,
29878,
29892,
298,
29897,
718,
20396,
4995,
29918,
16622,
29898,
29878,
29897,
334,
29871,
29906,
13,
4706,
736,
2989,
13,
13,
1678,
396,
3337,
12068,
2771,
7677,
29871,
29896,
13,
1678,
565,
5839,
1275,
29871,
29896,
29901,
13,
4706,
1596,
703,
30013,
843,
4826,
10826,
26566,
12442,
8279,
17955,
1345,
29942,
477,
29901,
1159,
13,
4706,
1596,
29898,
8159,
29918,
1270,
29880,
4995,
29898,
13471,
29892,
3171,
876,
13,
13,
1678,
396,
3337,
12068,
2771,
7677,
29871,
29906,
13,
1678,
25342,
5839,
1275,
29871,
29906,
29901,
13,
4706,
1596,
703,
30013,
843,
4826,
10826,
3419,
7220,
29977,
18779,
933,
12442,
8279,
17955,
1345,
29942,
477,
29901,
1159,
13,
4706,
1596,
29898,
1270,
29880,
4995,
29918,
2975,
29898,
13471,
29892,
3171,
876,
13,
13,
1678,
396,
8616,
1802,
2968,
1415,
5588,
29977,
2771,
7677,
13,
1678,
1683,
29901,
13,
4706,
1596,
703,
30012,
12055,
570,
1538,
1802,
2968,
1415,
1630,
29919,
6253,
12854,
613,
934,
29922,
9675,
29889,
303,
20405,
29897,
13,
4706,
6876,
29898,
29896,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
13,
1678,
396,
3982,
5945,
29935,
14898,
29960,
2019,
606,
15804,
3327,
13,
1678,
2971,
353,
5785,
29898,
2080,
703,
30012,
1521,
956,
730,
14898,
22375,
29901,
376,
876,
13,
1678,
540,
29875,
353,
5785,
29898,
2080,
703,
30012,
1521,
956,
730,
15804,
1500,
29901,
376,
876,
13,
13,
1678,
396,
3982,
5945,
29935,
2771,
23243,
13,
1678,
1596,
703,
30012,
29982,
1499,
12068,
1413,
20281,
10826,
26566,
12442,
8279,
17955,
7082,
15302,
3419,
7220,
29977,
18779,
933,
29973,
1159,
13,
1678,
1596,
703,
29896,
448,
26566,
12442,
8279,
17955,
29892,
29871,
29906,
448,
15302,
3419,
7220,
29977,
18779,
933,
1159,
13,
1678,
7348,
353,
938,
29898,
2080,
3101,
13,
13,
1678,
20396,
4995,
29898,
3665,
29892,
540,
29875,
29892,
7348,
29897,
13,
2
] |
catalyst/dl/experiment/__init__.py | andrey-avdeev/catalyst | 3 | 18634 | <filename>catalyst/dl/experiment/__init__.py
# flake8: noqa
from .base import BaseExperiment
from .config import ConfigExperiment
from .supervised import SupervisedExperiment
| [
1,
529,
9507,
29958,
16431,
858,
29914,
11671,
29914,
735,
15362,
29914,
1649,
2344,
26914,
2272,
13,
29937,
17422,
446,
29947,
29901,
694,
25621,
13,
13,
3166,
869,
3188,
1053,
7399,
1252,
15362,
13,
3166,
869,
2917,
1053,
12782,
1252,
15362,
13,
3166,
869,
9136,
11292,
1053,
5670,
11292,
1252,
15362,
13,
2
] |
examples/scatters/scatter5.py | aengelke/z-plot | 22 | 1605179 | <gh_stars>10-100
#! /usr/bin/env python
# should be in your PYTHONPATH or installed somewhere
from zplot import *
ctype = 'eps' if len(sys.argv) < 2 else sys.argv[1]
c = canvas(ctype, title='scatter5', dimensions=[300,300])
t = table(file='scatter5.data')
d = drawable(canvas=c, xrange=[0,80], yrange=[0,80], coord=[30,30],
dimensions=[260,260])
axis(drawable=d, yauto=['','',10], xauto=['','',10])
p = plotter()
p.function(drawable=d, function=lambda x: x, xrange=[0,80], step=10,
linewidth=0.25, linecolor='gray')
# now plot the intervals and points
p.points(drawable=d, table=t, xfield='x', yfield='y', style='label',
labelfield='state', labelsize=9.0)
# now, do a closeup!
closeup = drawable(canvas=c, xrange=[51,53], yrange=[0,10],
coord=[220,100], dimensions=[100,70])
# this is UGLY -- but get all the data in the scrunhed-up area
t2 = table(table=t, where='(x>=50.9) and (x<=51.1)')
p.points(drawable=closeup, table=t2, xfield='x', yfield='rownumber',
style='label', labelfield='state', labelsize=8.0)
c.box(coord=[[205,90],[235,190]], linecolor='red')
c.line(coord=[[205,190],[199,202]], linecolor='red', arrow=True,
arrowlinecolor='red', arrowfillcolor='red')
c.render()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
29991,
847,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
29937,
881,
367,
297,
596,
349,
29979,
4690,
1164,
10145,
470,
5130,
9051,
13,
3166,
503,
5317,
1053,
334,
13,
13,
312,
668,
353,
525,
8961,
29915,
565,
7431,
29898,
9675,
29889,
19218,
29897,
529,
29871,
29906,
1683,
10876,
29889,
19218,
29961,
29896,
29962,
13,
29883,
353,
10508,
29898,
312,
668,
29892,
3611,
2433,
1557,
2620,
29945,
742,
13391,
11759,
29941,
29900,
29900,
29892,
29941,
29900,
29900,
2314,
13,
29873,
353,
1591,
29898,
1445,
2433,
1557,
2620,
29945,
29889,
1272,
1495,
13,
29881,
353,
4216,
519,
29898,
15257,
29922,
29883,
29892,
921,
3881,
11759,
29900,
29892,
29947,
29900,
1402,
343,
3881,
11759,
29900,
29892,
29947,
29900,
1402,
29311,
11759,
29941,
29900,
29892,
29941,
29900,
1402,
13,
632,
13391,
11759,
29906,
29953,
29900,
29892,
29906,
29953,
29900,
2314,
13,
13,
8990,
29898,
13131,
29922,
29881,
29892,
343,
6921,
29922,
1839,
3788,
742,
29896,
29900,
1402,
921,
6921,
29922,
1839,
3788,
742,
29896,
29900,
2314,
13,
13,
29886,
353,
6492,
357,
580,
13,
29886,
29889,
2220,
29898,
13131,
29922,
29881,
29892,
740,
29922,
2892,
921,
29901,
921,
29892,
921,
3881,
11759,
29900,
29892,
29947,
29900,
1402,
4331,
29922,
29896,
29900,
29892,
13,
965,
1196,
2103,
29922,
29900,
29889,
29906,
29945,
29892,
1196,
2780,
2433,
21012,
1495,
13,
13,
29937,
1286,
6492,
278,
18747,
322,
3291,
13,
29886,
29889,
9748,
29898,
13131,
29922,
29881,
29892,
1591,
29922,
29873,
29892,
921,
2671,
2433,
29916,
742,
343,
2671,
2433,
29891,
742,
3114,
2433,
1643,
742,
13,
308,
9775,
761,
969,
2433,
3859,
742,
3858,
2311,
29922,
29929,
29889,
29900,
29897,
13,
13,
29937,
1286,
29892,
437,
263,
3802,
786,
29991,
13,
5358,
786,
353,
4216,
519,
29898,
15257,
29922,
29883,
29892,
921,
3881,
11759,
29945,
29896,
29892,
29945,
29941,
1402,
343,
3881,
11759,
29900,
29892,
29896,
29900,
1402,
13,
462,
259,
29311,
11759,
29906,
29906,
29900,
29892,
29896,
29900,
29900,
1402,
13391,
11759,
29896,
29900,
29900,
29892,
29955,
29900,
2314,
13,
13,
29937,
445,
338,
501,
7239,
29979,
1192,
541,
679,
599,
278,
848,
297,
278,
885,
3389,
17143,
29899,
786,
4038,
13,
29873,
29906,
353,
1591,
29898,
2371,
29922,
29873,
29892,
988,
2433,
29898,
29916,
18572,
29945,
29900,
29889,
29929,
29897,
322,
313,
29916,
14065,
29945,
29896,
29889,
29896,
29897,
1495,
13,
13,
29886,
29889,
9748,
29898,
13131,
29922,
5358,
786,
29892,
1591,
29922,
29873,
29906,
29892,
921,
2671,
2433,
29916,
742,
343,
2671,
2433,
798,
4537,
742,
13,
308,
3114,
2433,
1643,
742,
9775,
761,
969,
2433,
3859,
742,
3858,
2311,
29922,
29947,
29889,
29900,
29897,
13,
13,
29883,
29889,
1884,
29898,
1111,
536,
29922,
8999,
29906,
29900,
29945,
29892,
29929,
29900,
16272,
29906,
29941,
29945,
29892,
29896,
29929,
29900,
20526,
1196,
2780,
2433,
1127,
1495,
13,
29883,
29889,
1220,
29898,
1111,
536,
29922,
8999,
29906,
29900,
29945,
29892,
29896,
29929,
29900,
16272,
29896,
29929,
29929,
29892,
29906,
29900,
29906,
20526,
1196,
2780,
2433,
1127,
742,
16578,
29922,
5574,
29892,
13,
539,
16578,
1220,
2780,
2433,
1127,
742,
16578,
5589,
2780,
2433,
1127,
1495,
13,
13,
29883,
29889,
9482,
580,
13,
13,
13,
13,
13,
2
] |
data/transforms/utils.py | apple/ml-cvnets | 209 | 116019 | <reponame>apple/ml-cvnets<gh_stars>100-1000
#
# For licensing see accompanying LICENSE file.
# Copyright (C) 2022 Apple Inc. All Rights Reserved.
#
from typing import Any
import numpy as np
def setup_size(size: Any, error_msg="Need a tuple of length 2"):
if isinstance(size, int):
return size, size
if isinstance(size, (list, tuple)) and len(size) == 1:
return size[0], size[0]
if len(size) != 2:
raise ValueError(error_msg)
return size
def intersect(box_a, box_b):
"""Computes the intersection between box_a and box_b"""
max_xy = np.minimum(box_a[:, 2:], box_b[2:])
min_xy = np.maximum(box_a[:, :2], box_b[:2])
inter = np.clip((max_xy - min_xy), a_min=0, a_max=np.inf)
return inter[:, 0] * inter[:, 1]
def jaccard_numpy(box_a: np.ndarray, box_b: np.ndarray):
"""
Computes the intersection of two boxes.
Args:
box_a (np.ndarray): Boxes of shape [Num_boxes_A, 4]
box_b (np.ndarray): Box osf shape [Num_boxes_B, 4]
Returns:
intersection over union scores. Shape is [box_a.shape[0], box_a.shape[1]]
"""
inter = intersect(box_a, box_b)
area_a = (box_a[:, 2] - box_a[:, 0]) * (box_a[:, 3] - box_a[:, 1]) # [A,B]
area_b = (box_b[2] - box_b[0]) * (box_b[3] - box_b[1]) # [A,B]
union = area_a + area_b - inter
return inter / union # [A,B]
| [
1,
529,
276,
1112,
420,
29958,
11548,
29914,
828,
29899,
11023,
1212,
29879,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
29937,
13,
29937,
1152,
7794,
575,
292,
1074,
10259,
1384,
292,
365,
2965,
1430,
1660,
934,
29889,
13,
29937,
14187,
1266,
313,
29907,
29897,
29871,
29906,
29900,
29906,
29906,
12113,
9266,
29889,
2178,
26863,
2538,
9841,
29889,
13,
29937,
13,
13,
3166,
19229,
1053,
3139,
13,
5215,
12655,
408,
7442,
13,
13,
13,
1753,
6230,
29918,
2311,
29898,
2311,
29901,
3139,
29892,
1059,
29918,
7645,
543,
8139,
287,
263,
18761,
310,
3309,
29871,
29906,
29908,
1125,
13,
1678,
565,
338,
8758,
29898,
2311,
29892,
938,
1125,
13,
4706,
736,
2159,
29892,
2159,
13,
13,
1678,
565,
338,
8758,
29898,
2311,
29892,
313,
1761,
29892,
18761,
876,
322,
7431,
29898,
2311,
29897,
1275,
29871,
29896,
29901,
13,
4706,
736,
2159,
29961,
29900,
1402,
2159,
29961,
29900,
29962,
13,
13,
1678,
565,
7431,
29898,
2311,
29897,
2804,
29871,
29906,
29901,
13,
4706,
12020,
7865,
2392,
29898,
2704,
29918,
7645,
29897,
13,
13,
1678,
736,
2159,
13,
13,
13,
1753,
25869,
29898,
1884,
29918,
29874,
29892,
3800,
29918,
29890,
1125,
13,
1678,
9995,
20606,
267,
278,
17686,
1546,
3800,
29918,
29874,
322,
3800,
29918,
29890,
15945,
29908,
13,
1678,
4236,
29918,
3594,
353,
7442,
29889,
1195,
12539,
29898,
1884,
29918,
29874,
7503,
29892,
29871,
29906,
29901,
1402,
3800,
29918,
29890,
29961,
29906,
29901,
2314,
13,
1678,
1375,
29918,
3594,
353,
7442,
29889,
27525,
398,
29898,
1884,
29918,
29874,
7503,
29892,
584,
29906,
1402,
3800,
29918,
29890,
7503,
29906,
2314,
13,
1678,
1006,
353,
7442,
29889,
24049,
3552,
3317,
29918,
3594,
448,
1375,
29918,
3594,
511,
263,
29918,
1195,
29922,
29900,
29892,
263,
29918,
3317,
29922,
9302,
29889,
7192,
29897,
13,
1678,
736,
1006,
7503,
29892,
29871,
29900,
29962,
334,
1006,
7503,
29892,
29871,
29896,
29962,
13,
13,
13,
1753,
432,
5753,
538,
29918,
23749,
29898,
1884,
29918,
29874,
29901,
7442,
29889,
299,
2378,
29892,
3800,
29918,
29890,
29901,
7442,
29889,
299,
2378,
1125,
13,
1678,
9995,
13,
1678,
11796,
267,
278,
17686,
310,
1023,
16273,
29889,
13,
1678,
826,
3174,
29901,
13,
4706,
3800,
29918,
29874,
313,
9302,
29889,
299,
2378,
1125,
1952,
9100,
310,
8267,
518,
8009,
29918,
1884,
267,
29918,
29909,
29892,
29871,
29946,
29962,
13,
4706,
3800,
29918,
29890,
313,
9302,
29889,
299,
2378,
1125,
11773,
2897,
29888,
8267,
518,
8009,
29918,
1884,
267,
29918,
29933,
29892,
29871,
29946,
29962,
13,
13,
1678,
16969,
29901,
13,
4706,
17686,
975,
9833,
19435,
29889,
1383,
4085,
338,
518,
1884,
29918,
29874,
29889,
12181,
29961,
29900,
1402,
3800,
29918,
29874,
29889,
12181,
29961,
29896,
5262,
13,
1678,
9995,
13,
1678,
1006,
353,
25869,
29898,
1884,
29918,
29874,
29892,
3800,
29918,
29890,
29897,
13,
1678,
4038,
29918,
29874,
353,
313,
1884,
29918,
29874,
7503,
29892,
29871,
29906,
29962,
448,
3800,
29918,
29874,
7503,
29892,
29871,
29900,
2314,
334,
313,
1884,
29918,
29874,
7503,
29892,
29871,
29941,
29962,
448,
3800,
29918,
29874,
7503,
29892,
29871,
29896,
2314,
29871,
396,
518,
29909,
29892,
29933,
29962,
13,
1678,
4038,
29918,
29890,
353,
313,
1884,
29918,
29890,
29961,
29906,
29962,
448,
3800,
29918,
29890,
29961,
29900,
2314,
334,
313,
1884,
29918,
29890,
29961,
29941,
29962,
448,
3800,
29918,
29890,
29961,
29896,
2314,
29871,
396,
518,
29909,
29892,
29933,
29962,
13,
1678,
9833,
353,
4038,
29918,
29874,
718,
4038,
29918,
29890,
448,
1006,
13,
1678,
736,
1006,
847,
9833,
29871,
396,
518,
29909,
29892,
29933,
29962,
13,
2
] |
package/awesome_panel/application/services/message_service.py | Jhsmit/awesome-panel | 179 | 30712 | """This module implements the MessageService
The MessageService enables sending and receiving messages
"""
import param
class MessageService(param.Parameterized):
"""The MessageService enables sending and receiving messages"""
| [
1,
9995,
4013,
3883,
10703,
278,
7777,
3170,
30004,
13,
30004,
13,
1576,
7777,
3170,
28936,
9348,
322,
13442,
7191,
30004,
13,
15945,
19451,
13,
5215,
1828,
30004,
13,
30004,
13,
30004,
13,
1990,
7777,
3170,
29898,
3207,
29889,
9329,
1891,
1125,
30004,
13,
1678,
9995,
1576,
7777,
3170,
28936,
9348,
322,
13442,
7191,
15945,
19451,
13,
2
] |
pthtemplate/iterator/__init__.py | try-skycn/PytorchTemplate | 0 | 105984 | from .epoch import Epoch
from .iteration import Iteration
| [
1,
515,
869,
1022,
2878,
1053,
382,
1129,
305,
13,
3166,
869,
1524,
362,
1053,
20504,
362,
13,
2
] |
dacman/plugins/csv/__init__.py | yocheah/dac-man | 0 | 35522 | <reponame>yocheah/dac-man
from pathlib import Path
from collections import defaultdict
import numpy as np
try:
import pandas as pd
except ImportError:
from dacman.core.utils import dispatch_import_error
dispatch_import_error(module_name='pandas', plugin_name='CSV')
from dacman.compare import base
try:
from IPython.display import display # for debugging
except ImportError:
display = print
class ChangeStatus:
added = 'ADDED'
deleted = 'DELETED'
modified = 'MODIFIED'
unchanged = 'UNCHANGED'
unset = 'UNSET'
@classmethod
def iter(cls):
yield from (cls.added, cls.deleted, cls.modified, cls.unchanged)
_S = ChangeStatus
class _InternalFields:
"""
Utility class to access commonly used table/dict fields as constants rather than bare strings.
"""
LOC_ORIG_ROW = '_loc_orig_row'
LOC_ORIG_COL = '_loc_orig_col'
ORIG = 'orig'
CALC = 'calc'
_F = _InternalFields
class ChangeMetricsBase:
"""
Convenience class to access properties from items being compared and calculate comparison metrics from them.
"""
def __init__(self, key, a=None, b=None):
self.key = key
self.a = a
self.b = b
self._comparison_data = {
'status': _S.unset,
'metadata': {
'common': {},
'changes': {},
},
}
def __setitem__(self, key, val):
self._comparison_data[key] = val
def __getitem__(self, key):
return self._comparison_data[key]
def keys(self):
# TODO maybe enforce some order?
return self._comparison_data.keys()
def add(self, other_data):
self._comparison_data.update(other_data)
@property
def properties(self):
# only interested in common fields, since we have to compare them directly
# return self.a.keys() & self.b.keys()
# use a dict with dummy values as an ordered set to preserve the order
dict_for_ordered_set = {key: None for key in self.a.keys() if key in self.b.keys()}
return dict_for_ordered_set.keys()
@property
def is_missing_a(self):
return len(self.a) == 0
@property
def is_missing_b(self):
return len(self.b) == 0
def change_in(self, prop):
if prop not in self.properties:
return False
try:
return self.a[prop] != self.b[prop]
except Exception as e:
print(e)
return False
def get_value_common(self, prop):
if prop in self.properties and not self.change_in(prop):
return self.a[prop]
# maybe use a sentinel value other than None here?
return None
def get_value_single(self, prop):
if self.is_missing_a:
return self.b[prop]
if self.is_missing_b:
return self.a[prop]
return self.get_value_common(prop)
def get_values(self, prop, orient=dict, convert=None, as_type=None, fallback=None):
if convert is None and as_type is not None:
convert = as_type
convert = convert or (lambda x: x)
val_a = convert(self.a.get(prop, fallback))
val_b = convert(self.b.get(prop, fallback))
if orient in {tuple, list}:
return val_a, val_b
if orient in {dict}:
return {'a': val_a, 'b': val_b}
@property
def is_modified(self):
# TODO change if we use multiple modified states
return self['status'] in {_S.modified}
@is_modified.setter
def is_modified(self, val):
if bool(val) is True:
# TODO manage other types as extra "modified" characterizers
# e.g. if `val` is a list, append to self['modified_labels']
self['status'] = _S.modified
def store_common_value_or_values(self, prop):
# TODO there could be some redundant logic in general in this class
if self.change_in(prop):
self['metadata']['changes'][prop] = self.get_values(prop, orient=dict)
self.is_modified = True
else:
self['metadata']['common'][prop] = self.get_value_single(prop)
def calculate(self, exclude=None):
exclude = exclude or set()
if self.is_missing_a:
self['status'] = _S.added
elif self.is_missing_b:
self['status'] = _S.deleted
for prop in self.properties:
if prop not in exclude:
self.store_common_value_or_values(prop)
if self['status'] == _S.unset:
self['status'] = _S.unchanged
class TableColumnChangeMetrics(ChangeMetricsBase):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def calculate(self):
super().calculate(exclude='values_frame')
if self['status'] == _S.unset:
self['status'] = _S.unchanged
def calculate_from_value_metrics(self, value_metrics_table):
col_metrics_from_value_metrics = self.get_column_metrics_from_values(value_metrics_table)
if col_metrics_from_value_metrics['frac_changed'] > 0.:
self.is_modified = True
self['values'] = col_metrics_from_value_metrics
def get_column_metrics_from_values(self, metrics_table):
m = {}
df = metrics_table
n_total = len(df)
m['n_unchanged'] = (df['status'] == _S.unchanged).sum()
m['n_added'] = (df['status'] == _S.added).sum()
m['n_deleted'] = (df['status'] == _S.deleted).sum()
m['n_modified'] = (df['status'] == _S.modified).sum()
m['n_changed'] = (m['n_added'] + m['n_deleted'] + m['n_modified'])
m['frac_changed'] = m['n_changed'] / n_total
if not (df['delta'].isnull().all()):
m['delta_mean'] = df['delta'].mean()
m['delta_std'] = df['delta'].std()
return m
def get_stats(self):
stats = {'name': self.key}
stats.update(self['values'])
stats['status'] = self['status']
return stats
class _BaseRecord:
@staticmethod
def default_key_getter(item):
raise NotImplementedError
def __init__(self, key_getter=None, **kwargs):
super().__init__(**kwargs)
self.key_getter = key_getter or type(self).default_key_getter
self._mapping = self.get_mapping()
def get_mapping(self):
return {}
def keys(self):
return self._mapping.keys()
def __getitem__(self, key):
return self._mapping[key]
def get_empty(self):
return dict()
def get(self, key):
# TODO should we customize the default return type at the level of the class or of the instance?
return self._mapping.get(key, self.get_empty())
class TableColumnsRecord(_BaseRecord):
# TODO this class should probably also deal with the field renames,
# i.e. should receive a mapping with the field renames
def __init__(self, loader, **kwargs):
self.loader = loader
super().__init__(**kwargs)
@property
def dataframe(self):
return self.loader.to_table_dtype()
def get_metadata(self, series, name):
md = {}
md['name'] = name
md['series'] = series
md['dtype'] = series.dtype
md['n_notnull'] = series.notnull().sum()
md['n_null'] = series.isna().sum()
return md
def default_key_getter(self, col_metadata):
return col_metadata['name']
def get_mapping(self):
df = self.dataframe
mapping = {}
for colname in df:
# TODO in general the metadata collecting can also be done directly in the Record,
# since here we don't have several types of items at the same level like in the HDF5 plug-in
col_md = self.get_metadata(series=df[colname], name=colname)
# we don't need a specific record for table fields, since these are collected as metadata of the columns
mapping[self.key_getter(col_md)] = col_md
return mapping
def get_lines_frame(path, comment_char=None):
"""Read lines and associated metadata from a file"""
with Path(path).open() as f:
lines = pd.DataFrame({'content': list(f)})
lines['lineno'] = lines.index + 1
def is_comment(s):
if comment_char is None:
# get a series where all values are False
return s == np.nan
return (s
.astype(str)
.str.startswith(comment_char)
)
lines['is_comment'] = is_comment(lines['content'])
return lines
def infer_dtypes(data, converters=None):
# the order here is relevant: strings representing floats can be read (erroneously) as datetimes,
# but the reverse is not true, so pd.to_numeric should come first
converters = converters or [pd.to_numeric, pd.to_datetime]
if data.dtype == 'object':
for conv in converters:
try:
data = conv(data)
except (TypeError, ValueError):
pass
else:
break
return data
class ColumnnProcessor:
"""
Utility class to perform per-column processing and hold data in various formats
as needed to create the column-level metadata.
"""
def __init__(self, data_orig, name=None):
self.data_orig = data_orig
self.data_calc = None
self.name = name
self.header = {}
def process_header(self, data, pos_mapper=None, pos='rel', **kwargs):
# pos: relative or absolute
# relative: count from start of subrange
# absolute: use _loc_orig_row
indexer = data.iloc
if pos.startswith('abs'):
indexer = data.loc
pos_mapper = pos_mapper or kwargs
to_drop = []
for key, pos in pos_mapper.items():
val = indexer[pos]
self.header[key] = val
to_drop.append(pos)
return data.drop(indexer[to_drop].index)
def process_rename(self, data, mapper):
self.name = self.header.get('name', self.name)
self.name = mapper.get(self.name, self.name)
if self.name:
data.name = self.name
return data
def process_dtype(self, data, dtype):
if dtype is True:
data = infer_dtypes(data)
else:
if dtype is None:
dtype = {}
data.astype(dtype.get(self.name, data.dtype))
return data
def get_values_frame(self, data_orig, data_calc, index=None):
df = pd.DataFrame({_F.ORIG: data_orig, _F.CALC: data_calc}, index=data_calc.index)
# print(f'{self.name}: dtypes={df.dtypes}')
# so here there are three cases for the index:
# - a data column
# - orig
# - none (reset)
# - In this case, we don't particularly need to give it a name
# we can probably manage to express this by resetting the index in all three cases,
# and then setting the index appropriately
if isinstance(index, str) and index == 'orig':
df = df.reset_index().set_index(df.index.name, drop=False)
elif index is not None:
df = pd.merge(index, df, how='left', left_index=True, right_index=True).reset_index().set_index(index.name)
else:
# we need to be sure that we have the loc_orig_row as a column of this table
df = df.reset_index()
return df
class CSVTableColumnsRecord(_BaseRecord):
"""
Convert a CSV file into a table, and expose a record as Column in the usual way
"""
def __init__(self,
src,
comment_char=None,
drop_empty_cols=True,
table_range=None,
header=None,
column_renames=None,
index=None,
dtype=None,
):
self.src = src
self.comment_char = comment_char
self.drop_empty_cols = drop_empty_cols
self.table_range = table_range or {}
self.header = header or {}
self.column_renames = column_renames or {}
self.dtype = dtype
self.index = index
self._mapping = {}
@staticmethod
def get_lines_frame(path, comment_char=None):
"""Read lines and associated metadata from a file"""
with Path(path).open() as f:
lines = pd.DataFrame({'content': list(f)})
lines['lineno'] = lines.index + 1
def is_comment(s):
if comment_char is None:
# get a series with the same index where all values are False
return s == np.nan
return (s
.astype(str)
.str.startswith(comment_char)
)
lines['is_comment'] = is_comment(lines['content'])
return lines
def get_lineno_loadable(self):
"""
Return a sequence containing the line numbers (1-based) of lines in the source
that are loadable by the CSV parser.
This is used to associate table index/rows with their position in the source.
"""
def is_skipped_by_csv_parser(s):
# TODO redo this with more robust values
# (and maybe invert the logic to "is_included" while we're at it)
return s.astype(str) == '\n'
# TODO all of this could probably be merged in a regex
def is_loadable(df):
return ~(df['is_comment'] | is_skipped_by_csv_parser(df['content']))
lines = get_lines_frame(self.src, comment_char=self.comment_char)
return (lines
[is_loadable]
['lineno']
.to_list()
)
def get_table_orig(self, index_col=_F.LOC_ORIG_ROW):
load_opts = dict(dtype=object, header=None, comment=self.comment_char)
table_range = {'row_start': 1, 'row_end': None}
table_range.update(self.table_range)
row_idx_start = table_range['row_start'] - 1
row_idx_end = None
try:
row_idx_end = table_range['row_end'] - 1
except TypeError:
pass
load_opts['skiprows'] = range(0, row_idx_start)
if row_idx_end is not None:
# TODO check for off-by-1 errors
load_opts['nrows'] = row_idx_end - row_idx_start
df = pd.read_csv(self.src, **load_opts)
lineno = self.get_lineno_loadable()[row_idx_start:row_idx_end]
return (df
.assign(**{_F.LOC_ORIG_ROW: lineno})
.set_index(index_col, drop=True)
)
def get_metadata(self, col_processor, index=None):
md = {}
md['colidx'] = col_processor.colidx
md['name'] = col_processor.name
md['header'] = col_processor.header
md['values_frame'] = col_processor.get_values_frame(col_processor.data_orig,
col_processor.data_calc,
index=index)
return md
@staticmethod
def key_getter(metadata):
return metadata['name']
# TODO a more detailed name for this could be "get_column_metadata_mapping"
def get_mapping(self):
df = self.get_table_orig()
if self.drop_empty_cols:
df = df.dropna(axis='columns', how='all')
processors = []
index = None
for col in df:
proc = ColumnnProcessor(df[col], name=col)
proc.colidx = col
proc.data_calc = (proc.data_orig
.pipe(proc.process_header, **self.header)
.pipe(proc.process_rename, self.column_renames)
.pipe(proc.process_dtype, dtype=self.dtype)
)
if proc.name:
processors.append(proc)
proc.is_index = (proc.name == self.index)
if proc.is_index:
index = proc.data_calc
mapping = {}
for proc in processors:
md = self.get_metadata(proc, index=index)
mapping[self.key_getter(md)] = md
return mapping
def load(self):
self._mapping = self.get_mapping()
# this is just for display/reference, and it's not used for actual calculations
# self.table_calc = pd.DataFrame({name: md['values_frame']['calc'] for name, md in self._mapping.items()})
def get_empty(self):
return {'values_frame': pd.DataFrame([], columns=[_F.ORIG, _F.CALC, _F.LOC_ORIG_ROW])}
class TableValuesRecord(_BaseRecord):
def __init__(self, src: pd.DataFrame, **kwargs):
self.src = src
super().__init__(**kwargs)
def get_mapping(self):
df = self.src
mapping = {}
for colname in df:
col = df[colname]
for row_idx in col.index:
# this is basically the anti-pandas, but this is just here as an example
key = (colname, row_idx)
val = col[row_idx]
mapping[key] = val
return mapping
class TableColumnValuesChangeMetrics:
"""
Calculate change metrics on a per-value basis using indexed containers.
Instead of calculating value-level changes as a separate step,
i.e. creating a Record from each values frame and looping over matching pairs,
we use the fact that the value frame's index allow vectorized operations with similar semantics.
"""
@classmethod
def from_column_metrics(cls, col_metrics):
values_a, values_b = col_metrics.get_values('values_frame', orient=tuple)
return cls(values_a, values_b, col_metrics=col_metrics)
def __init__(self, values_a, values_b, col_metrics=None):
self.values_a = values_a
self.values_b = values_b
self.col_metrics = col_metrics
self._table = None
self._supports_numeric_delta = None
@property
def supports_numeric_delta(self):
return self._supports_numeric_delta
def get_table(self):
values_frames = {'a': self.values_a, 'b': self.values_b}
concat_opts = {
'axis': 'columns',
'join': 'outer',
'sort': False,
}
df = pd.concat(values_frames, **concat_opts)
# TODO factor out this dtype assignment?
return (df
.astype({('a', _F.LOC_ORIG_ROW): 'Int64', ('b', _F.LOC_ORIG_ROW): 'Int64'})
)
@property
def table(self):
return self._table
def calculate(self):
self._table = (self.get_table()
.pipe(self.calc_change_metrics_base)
.pipe(self.calc_delta)
.pipe(self.assign_change_status)
)
return self.get_per_status_metrics()
def calc_change_metrics_base(self, df):
df.loc[:, 'is_equal'] = df[('a', _F.CALC)] == df[('b', _F.CALC)]
df.loc[:, 'is_null_a'] = df[('a', _F.CALC)].isna()
df.loc[:, 'is_null_b'] = df[('b', _F.CALC)].isna()
df.loc[:, 'is_null_both'] = df['is_null_a'] & df['is_null_b']
df.loc[:, 'is_null_any'] = df['is_null_a'] | df['is_null_b']
return df
def calc_delta(self, df):
# here one could add more specific deltas, e.g. depending on dtype or column name (which is self.key)
# check if datatype is numeric, or try with exceptions?
# functions to check are: pandas.api.types.is_number etc
# TODO since we need to know whether we can do numeric calculations or not in several places,
# we could store this information as an attribute/property
try:
delta = df[('b', _F.CALC)] - df[('a', _F.CALC)]
except TypeError:
self._supports_numeric_delta = False
delta = np.nan
else:
self._supports_numeric_delta = True
df.loc[:, 'delta'] = delta
return df
def is_value_modified(self, df):
epsilon = 1e-6
if self.supports_numeric_delta:
return ~df['is_equal'] & (df['delta'].abs() > epsilon)
return ~df['is_equal']
def assign_change_status(self, df):
# TODO additional logic here would be e.g. implementing per-field or per-dtype thresholds
# TODO make this a categorical
status = pd.Series(_S.unset, index=df.index)
status[df['is_null_a'] & (~df['is_null_b'])] = _S.added
status[(~df['is_null_a']) & df['is_null_b']] = _S.deleted
status[(~df['is_null_any']) & self.is_value_modified(df)] = _S.modified
status[status == _S.unset] = _S.unchanged
df.loc[:, 'status'] = status
return df
def get_per_status_metrics(self):
m = {}
for status in [_S.unchanged, _S.added, _S.deleted, _S.modified]:
m_status = {}
values_with_status = self._table[lambda d: d['status'] == status]
has_with_status = len(values_with_status) > 0
if not has_with_status:
# this "continue" means that change statuses with no values
# are not added to the metrics at all (as opposed to having `{count: 0}` or similar)
# it could possibly be exposed as an option
# depening on what are the requirements for the schema/structure of the output
continue
f_aggregated = self.map_status_function_aggregated[status]
m_status.update(f_aggregated(values_with_status))
f_per_value = self.map_status_function_per_value[status]
if f_per_value is not None:
per_value_metrics = []
if has_with_status:
per_value_metrics = values_with_status.apply(f_per_value, axis=1).to_list()
m_status['values'] = per_value_metrics
m[status] = m_status
return m
@property
def map_status_function_aggregated(self):
return {
_S.added: self.get_stats_default,
_S.deleted: self.get_stats_default,
_S.unchanged: self.get_stats_default,
_S.modified: self.get_stats_default,
}
@property
def map_status_function_per_value(self):
return {
_S.unchanged: None,
_S.added: self.get_per_value_added,
_S.deleted: self.get_per_value_deleted,
_S.modified: self.get_per_value_modified,
}
def get_stats_default(self, values):
return {'count': len(values)}
def get_per_value_added(self, value_properties):
return {
'value': value_properties[('b', _F.ORIG)],
'loc': {'row': value_properties[('b', _F.LOC_ORIG_ROW)]}
}
def get_per_value_deleted(self, value_properties):
return {
'value': value_properties[('a', _F.ORIG)],
'loc': {'row': value_properties[('a', _F.LOC_ORIG_ROW)]}
}
def get_per_value_modified(self, value_properties):
vp = value_properties
m = {}
def get_m_for_side(d, side):
return {
'original': d[(side, _F.ORIG)],
'calculated_as': d[(side, _F.CALC)],
'loc': {
'row': d[(side, _F.LOC_ORIG_ROW)]
}
}
m['a'] = get_m_for_side(vp, 'a')
m['b'] = get_m_for_side(vp, 'b')
# the key must be ('delta', '') instead of only 'delta'
# otherwise strange and horrible errors (segmentation faults from numpy/pandas) will occur
# this could be a pandas bug, so it would be good to investigate this in more detail at some point
if self.supports_numeric_delta:
m['delta'] = vp[('delta', '')]
return m
class CSVPlugin(base.Comparator):
@staticmethod
def supports():
return ['csv']
@classmethod
def description(cls):
return cls.__doc__
def gen_comparison_pairs(self, a, b):
"""
Return an iterable of (key, comparison_pair), where comparison_pair is a tuple of (item_a, item_b) with a matching key.
"""
# union of the keys of the two records
# the ordering of the first record takes precedence
# an alternative option would be to sort them, lexicographically or with a custom criteria
keys_union = {**a, **b}.keys()
for key in keys_union:
yield key, (a.get(key), b.get(key))
record_opts = {}
comment_char = '#'
def get_file_metadata(self, src):
"""
Collect and return file-level metadata.
Since it's simple, we can do it here rather than in a dedicated class.
"""
# TODO have to properly decide if Records should be passed a Processor instance or the raw input
path = Path(src)
lines = get_lines_frame(path, comment_char=self.comment_char)
return {
'path_parent': path.parent,
'filename': path.name,
'n_lines': len(lines),
'n_lines_commented': len(lines[lines['is_comment']]),
'n_lines_uncommented': len(lines[~lines['is_comment']]),
'n_chars': lines['content'].str.len().sum(),
}
def compare_file(self, src_a, src_b):
file_md_a = self.get_file_metadata(src_a)
file_md_b = self.get_file_metadata(src_b)
metrics = ChangeMetricsBase('file', file_md_a, file_md_b)
metrics.calculate()
return dict(metrics)
def columns_key_getter(self, col_metadata):
# here the only choice is which col metadata property to use
# "name", "name_header" and "colidx"
# TODO consider exposing this as a plug-in-level option (or maybe bool flag?)
return col_metadata['name']
def get_record_columns(self, *args, **kwargs):
"""
Return the Record object used to fetch, process and expose for comparison table columns.
"""
rec = CSVTableColumnsRecord(*args, comment_char=self.comment_char, **self.record_opts, **kwargs)
rec.load()
return rec
def get_change_metrics_column(self, *args, **kwargs):
"""
Return the object used to calculate change metrics for table columns.
"""
return TableColumnChangeMetrics(*args, **kwargs)
def get_change_metrics_column_values(self, *args, **kwargs):
"""
Return the object used to calculate change metrics for table column values.
"""
return TableColumnValuesChangeMetrics.from_column_metrics(*args, **kwargs)
def compare_table_data(self, src_a, src_b, **kwargs):
metr_table = {
'columns': {},
'values_by_column': {},
}
rec_a = self.get_record_columns(src_a)
rec_b = self.get_record_columns(src_b)
# for each comparison pair of columns from the two tables
for comp_key, (col_md_a, col_md_b) in self.gen_comparison_pairs(rec_a, rec_b):
# first, calculate the change metrics for the column as a whole
metr_single_col = self.get_change_metrics_column(comp_key, col_md_a, col_md_b)
metr_single_col.calculate()
# then, calculate the change metrics for the column values
metr_values = self.get_change_metrics_column_values(metr_single_col)
metr_values_data = metr_values.calculate()
# finally, add info about change in values to the column change metrics
metr_single_col.calculate_from_value_metrics(metr_values.table)
metr_table['values_by_column'][comp_key] = metr_values_data
metr_table['columns'][comp_key] = dict(metr_single_col)
return metr_table
def compare(self, path_a, path_b, **kwargs):
self._percent_change = np.nan
all_metrics = {}
all_metrics['file'] = self.compare_file(path_a, path_b)
# col_metrics also contains the value-level metrics as a DataFrame
# these should be collected separately and merged together in a single table
all_metrics['table_data'] = self.compare_table_data(path_a, path_b)
return self.get_processed_metrics(all_metrics)
def get_processed_metrics(self, metrics):
return metrics
def percent_change(self):
return self._percent_change
def get_stats_table(self, table_metrics):
all_cols_stats = []
for colname, col_metrics in table_metrics['columns'].items():
col_stats = {'name': colname}
col_stats.update(col_metrics['values'])
col_stats['status'] = col_metrics['status']
all_cols_stats.append(col_stats)
df = pd.DataFrame(all_cols_stats).set_index('name')
self._percent_change = df['frac_changed'].mean() * 100
return df
detail_level = 1
def stats(self, changes, detail_level=None):
from .util import to_json
detail_level = detail_level or self.detail_level
df_table = self.get_stats_table(changes['table_data'])
if detail_level >= 0:
# single-number change percentage:
print(f'percent change: {self.percent_change():04.2f}%')
if detail_level >= 1:
with pd.option_context('display.max_columns', None):
# overview table with per-column statistics for all columns
print(df_table)
if detail_level >= 2:
# complete change data, assumed to be dict-like (with no assumptions on structure)
out = to_json(changes)
print(out)
| [
1,
529,
276,
1112,
420,
29958,
9029,
1173,
801,
29914,
29881,
562,
29899,
1171,
13,
3166,
2224,
1982,
1053,
10802,
13,
3166,
16250,
1053,
2322,
8977,
13,
13,
5215,
12655,
408,
7442,
13,
13,
2202,
29901,
13,
1678,
1053,
11701,
408,
10518,
13,
19499,
16032,
2392,
29901,
13,
1678,
515,
270,
562,
1171,
29889,
3221,
29889,
13239,
1053,
13916,
29918,
5215,
29918,
2704,
13,
1678,
13916,
29918,
5215,
29918,
2704,
29898,
5453,
29918,
978,
2433,
15112,
742,
7079,
29918,
978,
2433,
29907,
7597,
1495,
13,
13,
3166,
270,
562,
1171,
29889,
18307,
1053,
2967,
13,
13,
2202,
29901,
13,
1678,
515,
5641,
1656,
29889,
4990,
1053,
2479,
29871,
396,
363,
13490,
13,
19499,
16032,
2392,
29901,
13,
1678,
2479,
353,
1596,
13,
13,
13,
1990,
10726,
5709,
29901,
13,
1678,
2715,
353,
525,
3035,
2287,
29928,
29915,
13,
1678,
11132,
353,
525,
2287,
1307,
29911,
3352,
29915,
13,
1678,
9120,
353,
525,
6720,
4571,
3738,
3352,
29915,
13,
1678,
443,
15033,
353,
525,
3904,
3210,
24336,
29928,
29915,
13,
1678,
443,
842,
353,
525,
3904,
10490,
29915,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
4256,
29898,
25932,
1125,
13,
4706,
7709,
515,
313,
25932,
29889,
23959,
29892,
1067,
29879,
29889,
311,
22742,
29892,
1067,
29879,
29889,
1545,
2164,
29892,
1067,
29879,
29889,
3322,
4618,
29897,
13,
29918,
29903,
353,
10726,
5709,
13,
13,
13,
1990,
903,
16491,
14256,
29901,
13,
1678,
9995,
13,
1678,
22310,
537,
770,
304,
2130,
15574,
1304,
1591,
29914,
8977,
4235,
408,
17727,
3265,
1135,
16079,
6031,
29889,
13,
1678,
9995,
13,
1678,
11247,
29907,
29918,
1955,
6259,
29918,
25180,
353,
22868,
2029,
29918,
12683,
29918,
798,
29915,
13,
1678,
11247,
29907,
29918,
1955,
6259,
29918,
15032,
353,
22868,
2029,
29918,
12683,
29918,
1054,
29915,
13,
13,
1678,
438,
22789,
353,
525,
12683,
29915,
13,
1678,
315,
1964,
29907,
353,
525,
28667,
29915,
13,
29918,
29943,
353,
903,
16491,
14256,
13,
13,
13,
1990,
10726,
10095,
10817,
5160,
29901,
13,
1678,
9995,
13,
1678,
1281,
854,
5597,
770,
304,
2130,
4426,
515,
4452,
1641,
9401,
322,
8147,
10230,
21556,
515,
963,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1820,
29892,
263,
29922,
8516,
29892,
289,
29922,
8516,
1125,
13,
4706,
1583,
29889,
1989,
353,
1820,
13,
4706,
1583,
29889,
29874,
353,
263,
13,
4706,
1583,
29889,
29890,
353,
289,
13,
13,
4706,
1583,
3032,
510,
20941,
29918,
1272,
353,
426,
13,
9651,
525,
4882,
2396,
903,
29903,
29889,
348,
842,
29892,
13,
9651,
525,
19635,
2396,
426,
13,
18884,
525,
9435,
2396,
24335,
13,
18884,
525,
25990,
2396,
24335,
13,
9651,
2981,
13,
4706,
500,
13,
308,
13,
1678,
822,
4770,
842,
667,
12035,
1311,
29892,
1820,
29892,
659,
1125,
13,
4706,
1583,
3032,
510,
20941,
29918,
1272,
29961,
1989,
29962,
353,
659,
13,
308,
13,
1678,
822,
4770,
657,
667,
12035,
1311,
29892,
1820,
1125,
13,
4706,
736,
1583,
3032,
510,
20941,
29918,
1272,
29961,
1989,
29962,
13,
13,
1678,
822,
6611,
29898,
1311,
1125,
13,
4706,
396,
14402,
5505,
427,
10118,
777,
1797,
29973,
13,
4706,
736,
1583,
3032,
510,
20941,
29918,
1272,
29889,
8149,
580,
13,
268,
13,
1678,
822,
788,
29898,
1311,
29892,
916,
29918,
1272,
1125,
13,
4706,
1583,
3032,
510,
20941,
29918,
1272,
29889,
5504,
29898,
1228,
29918,
1272,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
4426,
29898,
1311,
1125,
13,
4706,
396,
871,
8852,
297,
3619,
4235,
29892,
1951,
591,
505,
304,
7252,
963,
4153,
13,
4706,
396,
736,
1583,
29889,
29874,
29889,
8149,
580,
669,
1583,
29889,
29890,
29889,
8149,
580,
13,
4706,
396,
671,
263,
9657,
411,
20254,
1819,
408,
385,
10372,
731,
304,
19905,
278,
1797,
13,
4706,
9657,
29918,
1454,
29918,
21693,
29918,
842,
353,
426,
1989,
29901,
6213,
363,
1820,
297,
1583,
29889,
29874,
29889,
8149,
580,
565,
1820,
297,
1583,
29889,
29890,
29889,
8149,
28296,
13,
4706,
736,
9657,
29918,
1454,
29918,
21693,
29918,
842,
29889,
8149,
580,
13,
13,
1678,
732,
6799,
13,
1678,
822,
338,
29918,
27259,
29918,
29874,
29898,
1311,
1125,
13,
4706,
736,
7431,
29898,
1311,
29889,
29874,
29897,
1275,
29871,
29900,
13,
13,
1678,
732,
6799,
13,
1678,
822,
338,
29918,
27259,
29918,
29890,
29898,
1311,
1125,
13,
4706,
736,
7431,
29898,
1311,
29889,
29890,
29897,
1275,
29871,
29900,
13,
13,
1678,
822,
1735,
29918,
262,
29898,
1311,
29892,
3107,
1125,
13,
4706,
565,
3107,
451,
297,
1583,
29889,
11330,
29901,
13,
9651,
736,
7700,
13,
4706,
1018,
29901,
13,
9651,
736,
1583,
29889,
29874,
29961,
7728,
29962,
2804,
1583,
29889,
29890,
29961,
7728,
29962,
13,
4706,
5174,
8960,
408,
321,
29901,
13,
9651,
1596,
29898,
29872,
29897,
13,
9651,
736,
7700,
13,
13,
1678,
822,
679,
29918,
1767,
29918,
9435,
29898,
1311,
29892,
3107,
1125,
13,
4706,
565,
3107,
297,
1583,
29889,
11330,
322,
451,
1583,
29889,
3167,
29918,
262,
29898,
7728,
1125,
13,
9651,
736,
1583,
29889,
29874,
29961,
7728,
29962,
13,
4706,
396,
5505,
671,
263,
2665,
262,
295,
995,
916,
1135,
6213,
1244,
29973,
13,
4706,
736,
6213,
13,
13,
1678,
822,
679,
29918,
1767,
29918,
14369,
29898,
1311,
29892,
3107,
1125,
13,
4706,
565,
1583,
29889,
275,
29918,
27259,
29918,
29874,
29901,
13,
9651,
736,
1583,
29889,
29890,
29961,
7728,
29962,
13,
4706,
565,
1583,
29889,
275,
29918,
27259,
29918,
29890,
29901,
13,
9651,
736,
1583,
29889,
29874,
29961,
7728,
29962,
13,
4706,
736,
1583,
29889,
657,
29918,
1767,
29918,
9435,
29898,
7728,
29897,
13,
13,
1678,
822,
679,
29918,
5975,
29898,
1311,
29892,
3107,
29892,
7769,
29922,
8977,
29892,
3588,
29922,
8516,
29892,
408,
29918,
1853,
29922,
8516,
29892,
6416,
1627,
29922,
8516,
1125,
13,
4706,
565,
3588,
338,
6213,
322,
408,
29918,
1853,
338,
451,
6213,
29901,
13,
9651,
3588,
353,
408,
29918,
1853,
13,
13,
4706,
3588,
353,
3588,
470,
313,
2892,
921,
29901,
921,
29897,
13,
13,
4706,
659,
29918,
29874,
353,
3588,
29898,
1311,
29889,
29874,
29889,
657,
29898,
7728,
29892,
6416,
1627,
876,
13,
4706,
659,
29918,
29890,
353,
3588,
29898,
1311,
29889,
29890,
29889,
657,
29898,
7728,
29892,
6416,
1627,
876,
13,
13,
4706,
565,
7769,
297,
426,
23583,
29892,
1051,
6177,
13,
9651,
736,
659,
29918,
29874,
29892,
659,
29918,
29890,
13,
13,
4706,
565,
7769,
297,
426,
8977,
6177,
13,
9651,
736,
11117,
29874,
2396,
659,
29918,
29874,
29892,
525,
29890,
2396,
659,
29918,
29890,
29913,
13,
13,
1678,
732,
6799,
13,
1678,
822,
338,
29918,
1545,
2164,
29898,
1311,
1125,
13,
4706,
396,
14402,
1735,
565,
591,
671,
2999,
9120,
5922,
13,
4706,
736,
1583,
1839,
4882,
2033,
297,
426,
29918,
29903,
29889,
1545,
2164,
29913,
13,
13,
1678,
732,
275,
29918,
1545,
2164,
29889,
842,
357,
13,
1678,
822,
338,
29918,
1545,
2164,
29898,
1311,
29892,
659,
1125,
13,
4706,
565,
6120,
29898,
791,
29897,
338,
5852,
29901,
13,
9651,
396,
14402,
10933,
916,
4072,
408,
4805,
376,
1545,
2164,
29908,
2931,
19427,
13,
9651,
396,
321,
29889,
29887,
29889,
565,
421,
791,
29952,
338,
263,
1051,
29892,
9773,
304,
1583,
1839,
1545,
2164,
29918,
21134,
2033,
13,
9651,
1583,
1839,
4882,
2033,
353,
903,
29903,
29889,
1545,
2164,
13,
13,
1678,
822,
3787,
29918,
9435,
29918,
1767,
29918,
272,
29918,
5975,
29898,
1311,
29892,
3107,
1125,
13,
4706,
396,
14402,
727,
1033,
367,
777,
28005,
5900,
297,
2498,
297,
445,
770,
13,
13,
4706,
565,
1583,
29889,
3167,
29918,
262,
29898,
7728,
1125,
13,
9651,
1583,
1839,
19635,
16215,
25990,
2033,
29961,
7728,
29962,
353,
1583,
29889,
657,
29918,
5975,
29898,
7728,
29892,
7769,
29922,
8977,
29897,
13,
9651,
1583,
29889,
275,
29918,
1545,
2164,
353,
5852,
13,
4706,
1683,
29901,
13,
9651,
1583,
1839,
19635,
16215,
9435,
2033,
29961,
7728,
29962,
353,
1583,
29889,
657,
29918,
1767,
29918,
14369,
29898,
7728,
29897,
13,
13,
1678,
822,
8147,
29898,
1311,
29892,
19060,
29922,
8516,
1125,
13,
4706,
19060,
353,
19060,
470,
731,
580,
13,
13,
4706,
565,
1583,
29889,
275,
29918,
27259,
29918,
29874,
29901,
13,
9651,
1583,
1839,
4882,
2033,
353,
903,
29903,
29889,
23959,
13,
4706,
25342,
1583,
29889,
275,
29918,
27259,
29918,
29890,
29901,
13,
9651,
1583,
1839,
4882,
2033,
353,
903,
29903,
29889,
311,
22742,
13,
13,
4706,
363,
3107,
297,
1583,
29889,
11330,
29901,
13,
9651,
565,
3107,
451,
297,
19060,
29901,
13,
18884,
1583,
29889,
8899,
29918,
9435,
29918,
1767,
29918,
272,
29918,
5975,
29898,
7728,
29897,
13,
308,
13,
4706,
565,
1583,
1839,
4882,
2033,
1275,
903,
29903,
29889,
348,
842,
29901,
13,
9651,
1583,
1839,
4882,
2033,
353,
903,
29903,
29889,
3322,
4618,
13,
13,
13,
1990,
6137,
4409,
7277,
10095,
10817,
29898,
7277,
10095,
10817,
5160,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
2428,
2141,
1649,
2344,
1649,
10456,
5085,
29892,
3579,
19290,
29897,
13,
13,
1678,
822,
8147,
29898,
1311,
1125,
13,
13,
4706,
2428,
2141,
15807,
403,
29898,
735,
2325,
2433,
5975,
29918,
2557,
1495,
13,
13,
4706,
565,
1583,
1839,
4882,
2033,
1275,
903,
29903,
29889,
348,
842,
29901,
13,
9651,
1583,
1839,
4882,
2033,
353,
903,
29903,
29889,
3322,
4618,
13,
13,
1678,
822,
8147,
29918,
3166,
29918,
1767,
29918,
2527,
10817,
29898,
1311,
29892,
995,
29918,
2527,
10817,
29918,
2371,
1125,
13,
4706,
784,
29918,
2527,
10817,
29918,
3166,
29918,
1767,
29918,
2527,
10817,
353,
1583,
29889,
657,
29918,
4914,
29918,
2527,
10817,
29918,
3166,
29918,
5975,
29898,
1767,
29918,
2527,
10817,
29918,
2371,
29897,
13,
13,
4706,
565,
784,
29918,
2527,
10817,
29918,
3166,
29918,
1767,
29918,
2527,
10817,
1839,
1154,
29918,
15033,
2033,
1405,
29871,
29900,
4898,
13,
9651,
1583,
29889,
275,
29918,
1545,
2164,
353,
5852,
13,
13,
4706,
1583,
1839,
5975,
2033,
353,
784,
29918,
2527,
10817,
29918,
3166,
29918,
1767,
29918,
2527,
10817,
13,
13,
1678,
822,
679,
29918,
4914,
29918,
2527,
10817,
29918,
3166,
29918,
5975,
29898,
1311,
29892,
21556,
29918,
2371,
1125,
13,
4706,
286,
353,
6571,
13,
4706,
4489,
353,
21556,
29918,
2371,
13,
13,
4706,
302,
29918,
7827,
353,
7431,
29898,
2176,
29897,
13,
13,
4706,
286,
1839,
29876,
29918,
3322,
4618,
2033,
353,
313,
2176,
1839,
4882,
2033,
1275,
903,
29903,
29889,
3322,
4618,
467,
2083,
580,
13,
4706,
286,
1839,
29876,
29918,
23959,
2033,
353,
313,
2176,
1839,
4882,
2033,
1275,
903,
29903,
29889,
23959,
467,
2083,
580,
13,
4706,
286,
1839,
29876,
29918,
311,
22742,
2033,
353,
313,
2176,
1839,
4882,
2033,
1275,
903,
29903,
29889,
311,
22742,
467,
2083,
580,
13,
4706,
286,
1839,
29876,
29918,
1545,
2164,
2033,
353,
313,
2176,
1839,
4882,
2033,
1275,
903,
29903,
29889,
1545,
2164,
467,
2083,
580,
13,
4706,
286,
1839,
29876,
29918,
15033,
2033,
353,
313,
29885,
1839,
29876,
29918,
23959,
2033,
718,
286,
1839,
29876,
29918,
311,
22742,
2033,
718,
286,
1839,
29876,
29918,
1545,
2164,
11287,
13,
13,
4706,
286,
1839,
1154,
29918,
15033,
2033,
353,
286,
1839,
29876,
29918,
15033,
2033,
847,
302,
29918,
7827,
13,
13,
4706,
565,
451,
313,
2176,
1839,
4181,
13359,
275,
4304,
2141,
497,
580,
1125,
13,
9651,
286,
1839,
4181,
29918,
12676,
2033,
353,
4489,
1839,
4181,
13359,
12676,
580,
13,
9651,
286,
1839,
4181,
29918,
4172,
2033,
353,
4489,
1839,
4181,
13359,
4172,
580,
13,
13,
4706,
736,
286,
13,
13,
1678,
822,
679,
29918,
16202,
29898,
1311,
1125,
13,
4706,
22663,
353,
11117,
978,
2396,
1583,
29889,
1989,
29913,
13,
4706,
22663,
29889,
5504,
29898,
1311,
1839,
5975,
11287,
13,
4706,
22663,
1839,
4882,
2033,
353,
1583,
1839,
4882,
2033,
13,
13,
4706,
736,
22663,
13,
13,
13,
1990,
903,
5160,
9182,
29901,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
2322,
29918,
1989,
29918,
657,
357,
29898,
667,
1125,
13,
4706,
12020,
2216,
1888,
2037,
287,
2392,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1820,
29918,
657,
357,
29922,
8516,
29892,
3579,
19290,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
1068,
19290,
29897,
13,
13,
4706,
1583,
29889,
1989,
29918,
657,
357,
353,
1820,
29918,
657,
357,
470,
1134,
29898,
1311,
467,
4381,
29918,
1989,
29918,
657,
357,
13,
13,
4706,
1583,
3032,
20698,
353,
1583,
29889,
657,
29918,
20698,
580,
13,
13,
1678,
822,
679,
29918,
20698,
29898,
1311,
1125,
13,
4706,
736,
6571,
13,
13,
1678,
822,
6611,
29898,
1311,
1125,
13,
4706,
736,
1583,
3032,
20698,
29889,
8149,
580,
13,
13,
1678,
822,
4770,
657,
667,
12035,
1311,
29892,
1820,
1125,
13,
4706,
736,
1583,
3032,
20698,
29961,
1989,
29962,
13,
13,
1678,
822,
679,
29918,
6310,
29898,
1311,
1125,
13,
4706,
736,
9657,
580,
13,
13,
1678,
822,
679,
29898,
1311,
29892,
1820,
1125,
13,
4706,
396,
14402,
881,
591,
2888,
675,
278,
2322,
736,
1134,
472,
278,
3233,
310,
278,
770,
470,
310,
278,
2777,
29973,
13,
4706,
736,
1583,
3032,
20698,
29889,
657,
29898,
1989,
29892,
1583,
29889,
657,
29918,
6310,
3101,
13,
13,
13,
1990,
6137,
14289,
9182,
7373,
5160,
9182,
1125,
13,
13,
1678,
396,
14402,
445,
770,
881,
3117,
884,
5376,
411,
278,
1746,
4325,
1280,
29892,
13,
1678,
396,
474,
29889,
29872,
29889,
881,
7150,
263,
10417,
411,
278,
1746,
4325,
1280,
29871,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
23466,
29892,
3579,
19290,
1125,
13,
4706,
1583,
29889,
12657,
353,
23466,
13,
4706,
2428,
2141,
1649,
2344,
12035,
1068,
19290,
29897,
13,
13,
1678,
732,
6799,
13,
1678,
822,
12205,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
12657,
29889,
517,
29918,
2371,
29918,
29881,
1853,
580,
13,
13,
1678,
822,
679,
29918,
19635,
29898,
1311,
29892,
3652,
29892,
1024,
1125,
13,
4706,
22821,
353,
6571,
13,
13,
4706,
22821,
1839,
978,
2033,
353,
1024,
13,
4706,
22821,
1839,
13757,
2033,
353,
3652,
13,
13,
4706,
22821,
1839,
29881,
1853,
2033,
353,
3652,
29889,
29881,
1853,
13,
13,
4706,
22821,
1839,
29876,
29918,
1333,
4304,
2033,
353,
3652,
29889,
1333,
4304,
2141,
2083,
580,
13,
4706,
22821,
1839,
29876,
29918,
4304,
2033,
353,
3652,
29889,
275,
1056,
2141,
2083,
580,
13,
13,
4706,
736,
22821,
13,
13,
1678,
822,
2322,
29918,
1989,
29918,
657,
357,
29898,
1311,
29892,
784,
29918,
19635,
1125,
13,
4706,
736,
784,
29918,
19635,
1839,
978,
2033,
13,
13,
1678,
822,
679,
29918,
20698,
29898,
1311,
1125,
13,
4706,
4489,
353,
1583,
29889,
1272,
2557,
13,
13,
4706,
10417,
353,
6571,
13,
13,
4706,
363,
784,
978,
297,
4489,
29901,
13,
13,
9651,
396,
14402,
297,
2498,
278,
15562,
6314,
292,
508,
884,
367,
2309,
4153,
297,
278,
14164,
29892,
13,
9651,
396,
1951,
1244,
591,
1016,
29915,
29873,
505,
3196,
4072,
310,
4452,
472,
278,
1021,
3233,
763,
297,
278,
379,
4037,
29945,
18665,
29899,
262,
13,
9651,
784,
29918,
3487,
353,
1583,
29889,
657,
29918,
19635,
29898,
13757,
29922,
2176,
29961,
1054,
978,
1402,
1024,
29922,
1054,
978,
29897,
13,
9651,
396,
591,
1016,
29915,
29873,
817,
263,
2702,
2407,
363,
1591,
4235,
29892,
1951,
1438,
526,
16531,
408,
15562,
310,
278,
4341,
13,
13,
9651,
10417,
29961,
1311,
29889,
1989,
29918,
657,
357,
29898,
1054,
29918,
3487,
4638,
353,
784,
29918,
3487,
13,
13,
4706,
736,
10417,
13,
13,
13,
1753,
679,
29918,
9012,
29918,
2557,
29898,
2084,
29892,
3440,
29918,
3090,
29922,
8516,
1125,
13,
1678,
9995,
6359,
3454,
322,
6942,
15562,
515,
263,
934,
15945,
29908,
13,
1678,
411,
10802,
29898,
2084,
467,
3150,
580,
408,
285,
29901,
13,
4706,
3454,
353,
10518,
29889,
17271,
3319,
29915,
3051,
2396,
1051,
29898,
29888,
26972,
13,
4706,
3454,
1839,
1915,
8154,
2033,
353,
3454,
29889,
2248,
718,
29871,
29896,
13,
13,
1678,
822,
338,
29918,
9342,
29898,
29879,
1125,
13,
4706,
565,
3440,
29918,
3090,
338,
6213,
29901,
13,
9651,
396,
679,
263,
3652,
988,
599,
1819,
526,
7700,
13,
9651,
736,
269,
1275,
7442,
29889,
13707,
13,
4706,
736,
313,
29879,
13,
18884,
869,
579,
668,
29898,
710,
29897,
13,
18884,
869,
710,
29889,
27382,
2541,
29898,
9342,
29918,
3090,
29897,
13,
18884,
1723,
13,
13,
1678,
3454,
1839,
275,
29918,
9342,
2033,
353,
338,
29918,
9342,
29898,
9012,
1839,
3051,
11287,
13,
13,
1678,
736,
3454,
13,
13,
13,
1753,
10115,
29918,
29881,
8768,
29898,
1272,
29892,
5486,
2153,
29922,
8516,
1125,
13,
1678,
396,
278,
1797,
1244,
338,
8018,
29901,
6031,
15783,
5685,
1446,
508,
367,
1303,
313,
3127,
650,
5794,
29897,
408,
1418,
300,
1355,
29892,
13,
1678,
396,
541,
278,
11837,
338,
451,
1565,
29892,
577,
10518,
29889,
517,
29918,
21574,
881,
2041,
937,
13,
1678,
5486,
2153,
353,
5486,
2153,
470,
518,
15926,
29889,
517,
29918,
21574,
29892,
10518,
29889,
517,
29918,
12673,
29962,
13,
13,
1678,
565,
848,
29889,
29881,
1853,
1275,
525,
3318,
2396,
13,
4706,
363,
7602,
297,
5486,
2153,
29901,
13,
9651,
1018,
29901,
13,
18884,
848,
353,
7602,
29898,
1272,
29897,
13,
9651,
5174,
313,
1542,
2392,
29892,
7865,
2392,
1125,
13,
18884,
1209,
13,
9651,
1683,
29901,
13,
18884,
2867,
13,
268,
13,
1678,
736,
848,
13,
13,
13,
1990,
12481,
29876,
18689,
29901,
13,
1678,
9995,
13,
1678,
22310,
537,
770,
304,
2189,
639,
29899,
4914,
9068,
322,
4808,
848,
297,
5164,
21971,
13,
1678,
408,
4312,
304,
1653,
278,
1897,
29899,
5563,
15562,
29889,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
848,
29918,
12683,
29892,
1024,
29922,
8516,
1125,
13,
308,
13,
4706,
1583,
29889,
1272,
29918,
12683,
353,
848,
29918,
12683,
13,
13,
4706,
1583,
29889,
1272,
29918,
28667,
353,
6213,
13,
13,
4706,
1583,
29889,
978,
353,
1024,
13,
4706,
1583,
29889,
6672,
353,
6571,
13,
13,
1678,
822,
1889,
29918,
6672,
29898,
1311,
29892,
848,
29892,
926,
29918,
655,
2496,
29922,
8516,
29892,
926,
2433,
2674,
742,
3579,
19290,
1125,
13,
13,
4706,
396,
926,
29901,
6198,
470,
8380,
13,
4706,
396,
6198,
29901,
2302,
515,
1369,
310,
1014,
3881,
13,
4706,
396,
8380,
29901,
671,
903,
2029,
29918,
12683,
29918,
798,
13,
4706,
2380,
261,
353,
848,
29889,
309,
542,
13,
4706,
565,
926,
29889,
27382,
2541,
877,
6897,
29374,
13,
9651,
2380,
261,
353,
848,
29889,
2029,
13,
13,
4706,
926,
29918,
655,
2496,
353,
926,
29918,
655,
2496,
470,
9049,
5085,
13,
13,
4706,
304,
29918,
8865,
353,
5159,
13,
13,
4706,
363,
1820,
29892,
926,
297,
926,
29918,
655,
2496,
29889,
7076,
7295,
13,
9651,
659,
353,
2380,
261,
29961,
1066,
29962,
13,
9651,
1583,
29889,
6672,
29961,
1989,
29962,
353,
659,
13,
9651,
304,
29918,
8865,
29889,
4397,
29898,
1066,
29897,
13,
13,
4706,
736,
848,
29889,
8865,
29898,
2248,
261,
29961,
517,
29918,
8865,
1822,
2248,
29897,
13,
13,
1678,
822,
1889,
29918,
1267,
420,
29898,
1311,
29892,
848,
29892,
611,
2496,
1125,
13,
4706,
1583,
29889,
978,
353,
1583,
29889,
6672,
29889,
657,
877,
978,
742,
1583,
29889,
978,
29897,
13,
13,
4706,
1583,
29889,
978,
353,
611,
2496,
29889,
657,
29898,
1311,
29889,
978,
29892,
1583,
29889,
978,
29897,
13,
13,
4706,
565,
1583,
29889,
978,
29901,
13,
9651,
848,
29889,
978,
353,
1583,
29889,
978,
13,
13,
4706,
736,
848,
13,
13,
1678,
822,
1889,
29918,
29881,
1853,
29898,
1311,
29892,
848,
29892,
26688,
1125,
13,
4706,
565,
26688,
338,
5852,
29901,
13,
9651,
848,
353,
10115,
29918,
29881,
8768,
29898,
1272,
29897,
13,
4706,
1683,
29901,
13,
9651,
565,
26688,
338,
6213,
29901,
13,
18884,
26688,
353,
6571,
13,
9651,
848,
29889,
579,
668,
29898,
29881,
1853,
29889,
657,
29898,
1311,
29889,
978,
29892,
848,
29889,
29881,
1853,
876,
13,
4706,
736,
848,
13,
13,
1678,
822,
679,
29918,
5975,
29918,
2557,
29898,
1311,
29892,
848,
29918,
12683,
29892,
848,
29918,
28667,
29892,
2380,
29922,
8516,
1125,
13,
4706,
4489,
353,
10518,
29889,
17271,
3319,
29918,
29943,
29889,
1955,
6259,
29901,
848,
29918,
12683,
29892,
903,
29943,
29889,
29907,
1964,
29907,
29901,
848,
29918,
28667,
1118,
2380,
29922,
1272,
29918,
28667,
29889,
2248,
29897,
13,
4706,
396,
1596,
29898,
29888,
29915,
29912,
1311,
29889,
978,
6177,
270,
8768,
3790,
2176,
29889,
29881,
8768,
29913,
1495,
13,
13,
4706,
396,
577,
1244,
727,
526,
2211,
4251,
363,
278,
2380,
29901,
13,
4706,
396,
448,
263,
848,
1897,
13,
4706,
396,
448,
1677,
13,
4706,
396,
448,
5642,
313,
12071,
29897,
13,
4706,
396,
259,
448,
512,
445,
1206,
29892,
591,
1016,
29915,
29873,
10734,
817,
304,
2367,
372,
263,
1024,
13,
4706,
396,
591,
508,
3117,
10933,
304,
4653,
445,
491,
10092,
1259,
278,
2380,
297,
599,
2211,
4251,
29892,
13,
4706,
396,
322,
769,
4444,
278,
2380,
7128,
2486,
13,
4706,
565,
338,
8758,
29898,
2248,
29892,
851,
29897,
322,
2380,
1275,
525,
12683,
2396,
13,
9651,
4489,
353,
4489,
29889,
12071,
29918,
2248,
2141,
842,
29918,
2248,
29898,
2176,
29889,
2248,
29889,
978,
29892,
5768,
29922,
8824,
29897,
13,
4706,
25342,
2380,
338,
451,
6213,
29901,
13,
9651,
4489,
353,
10518,
29889,
14634,
29898,
2248,
29892,
4489,
29892,
920,
2433,
1563,
742,
2175,
29918,
2248,
29922,
5574,
29892,
1492,
29918,
2248,
29922,
5574,
467,
12071,
29918,
2248,
2141,
842,
29918,
2248,
29898,
2248,
29889,
978,
29897,
13,
4706,
1683,
29901,
13,
9651,
396,
591,
817,
304,
367,
1854,
393,
591,
505,
278,
1180,
29918,
12683,
29918,
798,
408,
263,
1897,
310,
445,
1591,
13,
9651,
4489,
353,
4489,
29889,
12071,
29918,
2248,
580,
13,
13,
4706,
736,
4489,
13,
13,
13,
1990,
16874,
3562,
14289,
9182,
7373,
5160,
9182,
1125,
13,
1678,
9995,
13,
1678,
14806,
263,
16874,
934,
964,
263,
1591,
29892,
322,
24396,
263,
2407,
408,
12481,
297,
278,
9670,
982,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
4765,
29892,
13,
462,
3440,
29918,
3090,
29922,
8516,
29892,
13,
462,
5768,
29918,
6310,
29918,
22724,
29922,
5574,
29892,
13,
462,
1591,
29918,
3881,
29922,
8516,
29892,
13,
462,
4839,
29922,
8516,
29892,
13,
462,
1897,
29918,
1267,
1280,
29922,
8516,
29892,
13,
462,
2380,
29922,
8516,
29892,
13,
462,
26688,
29922,
8516,
29892,
13,
462,
1125,
13,
4706,
1583,
29889,
4351,
353,
4765,
13,
13,
4706,
1583,
29889,
9342,
29918,
3090,
353,
3440,
29918,
3090,
13,
4706,
1583,
29889,
8865,
29918,
6310,
29918,
22724,
353,
5768,
29918,
6310,
29918,
22724,
13,
4706,
1583,
29889,
2371,
29918,
3881,
353,
1591,
29918,
3881,
470,
6571,
13,
13,
4706,
1583,
29889,
6672,
353,
4839,
470,
6571,
13,
4706,
1583,
29889,
4914,
29918,
1267,
1280,
353,
1897,
29918,
1267,
1280,
470,
6571,
13,
4706,
1583,
29889,
29881,
1853,
353,
26688,
13,
4706,
1583,
29889,
2248,
353,
2380,
13,
13,
4706,
1583,
3032,
20698,
353,
6571,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
679,
29918,
9012,
29918,
2557,
29898,
2084,
29892,
3440,
29918,
3090,
29922,
8516,
1125,
13,
4706,
9995,
6359,
3454,
322,
6942,
15562,
515,
263,
934,
15945,
29908,
13,
4706,
411,
10802,
29898,
2084,
467,
3150,
580,
408,
285,
29901,
13,
9651,
3454,
353,
10518,
29889,
17271,
3319,
29915,
3051,
2396,
1051,
29898,
29888,
26972,
13,
9651,
3454,
1839,
1915,
8154,
2033,
353,
3454,
29889,
2248,
718,
29871,
29896,
13,
13,
4706,
822,
338,
29918,
9342,
29898,
29879,
1125,
13,
9651,
565,
3440,
29918,
3090,
338,
6213,
29901,
13,
18884,
396,
679,
263,
3652,
411,
278,
1021,
2380,
988,
599,
1819,
526,
7700,
13,
18884,
736,
269,
1275,
7442,
29889,
13707,
13,
9651,
736,
313,
29879,
13,
462,
1678,
869,
579,
668,
29898,
710,
29897,
13,
462,
1678,
869,
710,
29889,
27382,
2541,
29898,
9342,
29918,
3090,
29897,
13,
462,
1678,
1723,
13,
13,
4706,
3454,
1839,
275,
29918,
9342,
2033,
353,
338,
29918,
9342,
29898,
9012,
1839,
3051,
11287,
13,
13,
4706,
736,
3454,
13,
13,
1678,
822,
679,
29918,
1915,
8154,
29918,
1359,
519,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
7106,
263,
5665,
6943,
278,
1196,
3694,
313,
29896,
29899,
6707,
29897,
310,
3454,
297,
278,
2752,
13,
4706,
393,
526,
2254,
519,
491,
278,
16874,
13812,
29889,
13,
13,
4706,
910,
338,
1304,
304,
25836,
1591,
2380,
29914,
5727,
411,
1009,
2602,
297,
278,
2752,
29889,
13,
4706,
9995,
13,
13,
4706,
822,
338,
29918,
2574,
2986,
29918,
1609,
29918,
7638,
29918,
16680,
29898,
29879,
1125,
13,
9651,
396,
14402,
337,
1867,
445,
411,
901,
16424,
1819,
13,
9651,
396,
313,
392,
5505,
21292,
278,
5900,
304,
376,
275,
29918,
11707,
287,
29908,
1550,
591,
29915,
276,
472,
372,
29897,
13,
9651,
736,
269,
29889,
579,
668,
29898,
710,
29897,
1275,
11297,
29876,
29915,
13,
13,
4706,
396,
14402,
599,
310,
445,
1033,
3117,
367,
19412,
297,
263,
6528,
13,
4706,
822,
338,
29918,
1359,
519,
29898,
2176,
1125,
13,
9651,
736,
3695,
29898,
2176,
1839,
275,
29918,
9342,
2033,
891,
338,
29918,
2574,
2986,
29918,
1609,
29918,
7638,
29918,
16680,
29898,
2176,
1839,
3051,
25901,
13,
13,
4706,
3454,
353,
679,
29918,
9012,
29918,
2557,
29898,
1311,
29889,
4351,
29892,
3440,
29918,
3090,
29922,
1311,
29889,
9342,
29918,
3090,
29897,
13,
13,
4706,
736,
313,
9012,
13,
18884,
518,
275,
29918,
1359,
519,
29962,
13,
18884,
6024,
1915,
8154,
2033,
13,
18884,
869,
517,
29918,
1761,
580,
13,
1669,
1723,
13,
13,
1678,
822,
679,
29918,
2371,
29918,
12683,
29898,
1311,
29892,
2380,
29918,
1054,
29922,
29918,
29943,
29889,
16652,
29918,
1955,
6259,
29918,
25180,
1125,
13,
4706,
2254,
29918,
25707,
353,
9657,
29898,
29881,
1853,
29922,
3318,
29892,
4839,
29922,
8516,
29892,
3440,
29922,
1311,
29889,
9342,
29918,
3090,
29897,
13,
13,
4706,
1591,
29918,
3881,
353,
11117,
798,
29918,
2962,
2396,
29871,
29896,
29892,
525,
798,
29918,
355,
2396,
6213,
29913,
13,
4706,
1591,
29918,
3881,
29889,
5504,
29898,
1311,
29889,
2371,
29918,
3881,
29897,
13,
13,
4706,
1948,
29918,
13140,
29918,
2962,
353,
1591,
29918,
3881,
1839,
798,
29918,
2962,
2033,
448,
29871,
29896,
13,
4706,
1948,
29918,
13140,
29918,
355,
353,
6213,
13,
13,
4706,
1018,
29901,
13,
9651,
1948,
29918,
13140,
29918,
355,
353,
1591,
29918,
3881,
1839,
798,
29918,
355,
2033,
448,
29871,
29896,
13,
4706,
5174,
20948,
29901,
13,
9651,
1209,
13,
13,
4706,
2254,
29918,
25707,
1839,
11014,
5727,
2033,
353,
3464,
29898,
29900,
29892,
1948,
29918,
13140,
29918,
2962,
29897,
13,
13,
4706,
565,
1948,
29918,
13140,
29918,
355,
338,
451,
6213,
29901,
13,
9651,
396,
14402,
1423,
363,
1283,
29899,
1609,
29899,
29896,
4436,
13,
9651,
2254,
29918,
25707,
1839,
29876,
5727,
2033,
353,
1948,
29918,
13140,
29918,
355,
448,
1948,
29918,
13140,
29918,
2962,
13,
13,
4706,
4489,
353,
10518,
29889,
949,
29918,
7638,
29898,
1311,
29889,
4351,
29892,
3579,
1359,
29918,
25707,
29897,
13,
13,
4706,
6276,
8154,
353,
1583,
29889,
657,
29918,
1915,
8154,
29918,
1359,
519,
580,
29961,
798,
29918,
13140,
29918,
2962,
29901,
798,
29918,
13140,
29918,
355,
29962,
13,
13,
4706,
736,
313,
2176,
13,
18884,
869,
16645,
29898,
1068,
29912,
29918,
29943,
29889,
16652,
29918,
1955,
6259,
29918,
25180,
29901,
6276,
8154,
1800,
13,
18884,
869,
842,
29918,
2248,
29898,
2248,
29918,
1054,
29892,
5768,
29922,
5574,
29897,
13,
1669,
1723,
13,
13,
1678,
822,
679,
29918,
19635,
29898,
1311,
29892,
784,
29918,
26482,
29892,
2380,
29922,
8516,
1125,
13,
4706,
22821,
353,
6571,
13,
13,
4706,
22821,
1839,
1054,
13140,
2033,
353,
784,
29918,
26482,
29889,
1054,
13140,
13,
4706,
22821,
1839,
978,
2033,
353,
784,
29918,
26482,
29889,
978,
13,
4706,
22821,
1839,
6672,
2033,
353,
784,
29918,
26482,
29889,
6672,
13,
13,
4706,
22821,
1839,
5975,
29918,
2557,
2033,
353,
784,
29918,
26482,
29889,
657,
29918,
5975,
29918,
2557,
29898,
1054,
29918,
26482,
29889,
1272,
29918,
12683,
29892,
13,
462,
462,
462,
9651,
784,
29918,
26482,
29889,
1272,
29918,
28667,
29892,
13,
462,
462,
462,
9651,
2380,
29922,
2248,
29897,
13,
13,
4706,
736,
22821,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
1820,
29918,
657,
357,
29898,
19635,
1125,
13,
4706,
736,
15562,
1839,
978,
2033,
13,
13,
1678,
396,
14402,
263,
901,
13173,
1024,
363,
445,
1033,
367,
376,
657,
29918,
4914,
29918,
19635,
29918,
20698,
29908,
13,
1678,
822,
679,
29918,
20698,
29898,
1311,
1125,
13,
13,
4706,
4489,
353,
1583,
29889,
657,
29918,
2371,
29918,
12683,
580,
13,
13,
4706,
565,
1583,
29889,
8865,
29918,
6310,
29918,
22724,
29901,
13,
9651,
4489,
353,
4489,
29889,
8865,
1056,
29898,
8990,
2433,
13099,
742,
920,
2433,
497,
1495,
13,
13,
4706,
1889,
943,
353,
5159,
13,
4706,
2380,
353,
6213,
13,
13,
4706,
363,
784,
297,
4489,
29901,
13,
9651,
9580,
353,
12481,
29876,
18689,
29898,
2176,
29961,
1054,
1402,
1024,
29922,
1054,
29897,
13,
9651,
9580,
29889,
1054,
13140,
353,
784,
13,
13,
9651,
9580,
29889,
1272,
29918,
28667,
353,
313,
15439,
29889,
1272,
29918,
12683,
13,
462,
795,
869,
17760,
29898,
15439,
29889,
5014,
29918,
6672,
29892,
3579,
1311,
29889,
6672,
29897,
13,
462,
795,
869,
17760,
29898,
15439,
29889,
5014,
29918,
1267,
420,
29892,
1583,
29889,
4914,
29918,
1267,
1280,
29897,
13,
462,
795,
869,
17760,
29898,
15439,
29889,
5014,
29918,
29881,
1853,
29892,
26688,
29922,
1311,
29889,
29881,
1853,
29897,
13,
462,
632,
1723,
13,
13,
9651,
565,
9580,
29889,
978,
29901,
13,
18884,
1889,
943,
29889,
4397,
29898,
15439,
29897,
13,
13,
18884,
9580,
29889,
275,
29918,
2248,
353,
313,
15439,
29889,
978,
1275,
1583,
29889,
2248,
29897,
13,
18884,
565,
9580,
29889,
275,
29918,
2248,
29901,
13,
462,
1678,
2380,
353,
9580,
29889,
1272,
29918,
28667,
13,
13,
4706,
10417,
353,
6571,
13,
13,
4706,
363,
9580,
297,
1889,
943,
29901,
13,
9651,
22821,
353,
1583,
29889,
657,
29918,
19635,
29898,
15439,
29892,
2380,
29922,
2248,
29897,
13,
9651,
10417,
29961,
1311,
29889,
1989,
29918,
657,
357,
29898,
3487,
4638,
353,
22821,
13,
13,
4706,
736,
10417,
13,
13,
1678,
822,
2254,
29898,
1311,
1125,
13,
4706,
1583,
3032,
20698,
353,
1583,
29889,
657,
29918,
20698,
580,
13,
4706,
396,
445,
338,
925,
363,
2479,
29914,
5679,
29892,
322,
372,
29915,
29879,
451,
1304,
363,
3935,
17203,
13,
4706,
396,
1583,
29889,
2371,
29918,
28667,
353,
10518,
29889,
17271,
3319,
978,
29901,
22821,
1839,
5975,
29918,
2557,
16215,
28667,
2033,
363,
1024,
29892,
22821,
297,
1583,
3032,
20698,
29889,
7076,
580,
1800,
13,
13,
1678,
822,
679,
29918,
6310,
29898,
1311,
1125,
13,
4706,
736,
11117,
5975,
29918,
2557,
2396,
10518,
29889,
17271,
4197,
1402,
4341,
11759,
29918,
29943,
29889,
1955,
6259,
29892,
903,
29943,
29889,
29907,
1964,
29907,
29892,
903,
29943,
29889,
16652,
29918,
1955,
6259,
29918,
25180,
2314,
29913,
13,
13,
13,
1990,
6137,
9065,
9182,
7373,
5160,
9182,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4765,
29901,
10518,
29889,
17271,
29892,
3579,
19290,
1125,
13,
4706,
1583,
29889,
4351,
353,
4765,
13,
4706,
2428,
2141,
1649,
2344,
12035,
1068,
19290,
29897,
13,
13,
1678,
822,
679,
29918,
20698,
29898,
1311,
1125,
13,
4706,
4489,
353,
1583,
29889,
4351,
13,
13,
4706,
10417,
353,
6571,
13,
13,
4706,
363,
784,
978,
297,
4489,
29901,
13,
9651,
784,
353,
4489,
29961,
1054,
978,
29962,
13,
9651,
363,
1948,
29918,
13140,
297,
784,
29889,
2248,
29901,
13,
18884,
396,
445,
338,
8830,
278,
9418,
29899,
15112,
29892,
541,
445,
338,
925,
1244,
408,
385,
1342,
13,
18884,
1820,
353,
313,
1054,
978,
29892,
1948,
29918,
13140,
29897,
13,
18884,
659,
353,
784,
29961,
798,
29918,
13140,
29962,
13,
13,
18884,
10417,
29961,
1989,
29962,
353,
659,
13,
13,
4706,
736,
10417,
13,
13,
13,
1990,
6137,
4409,
9065,
7277,
10095,
10817,
29901,
13,
1678,
9995,
13,
1678,
20535,
403,
1735,
21556,
373,
263,
639,
29899,
1767,
8405,
773,
27541,
22637,
29889,
13,
13,
1678,
8669,
310,
25202,
995,
29899,
5563,
3620,
408,
263,
5004,
4331,
29892,
13,
1678,
474,
29889,
29872,
29889,
4969,
263,
14164,
515,
1269,
1819,
3515,
322,
26113,
975,
9686,
11000,
29892,
13,
1678,
591,
671,
278,
2114,
393,
278,
995,
3515,
29915,
29879,
2380,
2758,
4608,
1891,
6931,
411,
2788,
29505,
29889,
13,
1678,
9995,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
515,
29918,
4914,
29918,
2527,
10817,
29898,
25932,
29892,
784,
29918,
2527,
10817,
1125,
13,
4706,
1819,
29918,
29874,
29892,
1819,
29918,
29890,
353,
784,
29918,
2527,
10817,
29889,
657,
29918,
5975,
877,
5975,
29918,
2557,
742,
7769,
29922,
23583,
29897,
13,
308,
13,
4706,
736,
1067,
29879,
29898,
5975,
29918,
29874,
29892,
1819,
29918,
29890,
29892,
784,
29918,
2527,
10817,
29922,
1054,
29918,
2527,
10817,
29897,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1819,
29918,
29874,
29892,
1819,
29918,
29890,
29892,
784,
29918,
2527,
10817,
29922,
8516,
1125,
13,
4706,
1583,
29889,
5975,
29918,
29874,
353,
1819,
29918,
29874,
13,
4706,
1583,
29889,
5975,
29918,
29890,
353,
1819,
29918,
29890,
13,
4706,
1583,
29889,
1054,
29918,
2527,
10817,
353,
784,
29918,
2527,
10817,
13,
13,
4706,
1583,
3032,
2371,
353,
6213,
13,
4706,
1583,
3032,
5924,
29879,
29918,
21574,
29918,
4181,
353,
6213,
13,
13,
1678,
732,
6799,
13,
1678,
822,
11286,
29918,
21574,
29918,
4181,
29898,
1311,
1125,
13,
4706,
736,
1583,
3032,
5924,
29879,
29918,
21574,
29918,
4181,
13,
13,
1678,
822,
679,
29918,
2371,
29898,
1311,
1125,
13,
4706,
1819,
29918,
19935,
353,
11117,
29874,
2396,
1583,
29889,
5975,
29918,
29874,
29892,
525,
29890,
2396,
1583,
29889,
5975,
29918,
29890,
29913,
13,
13,
4706,
3022,
271,
29918,
25707,
353,
426,
13,
9651,
525,
8990,
2396,
525,
13099,
742,
13,
9651,
525,
7122,
2396,
525,
5561,
742,
13,
9651,
525,
6605,
2396,
7700,
29892,
13,
4706,
500,
13,
13,
4706,
4489,
353,
10518,
29889,
17685,
29898,
5975,
29918,
19935,
29892,
3579,
17685,
29918,
25707,
29897,
13,
13,
4706,
396,
14402,
7329,
714,
445,
26688,
12827,
29973,
13,
4706,
736,
313,
2176,
13,
18884,
869,
579,
668,
3319,
877,
29874,
742,
903,
29943,
29889,
16652,
29918,
1955,
6259,
29918,
25180,
1125,
525,
2928,
29953,
29946,
742,
6702,
29890,
742,
903,
29943,
29889,
16652,
29918,
1955,
6259,
29918,
25180,
1125,
525,
2928,
29953,
29946,
29915,
1800,
13,
1669,
1723,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1591,
29898,
1311,
1125,
13,
4706,
736,
1583,
3032,
2371,
13,
13,
1678,
822,
8147,
29898,
1311,
1125,
13,
13,
4706,
1583,
3032,
2371,
353,
313,
1311,
29889,
657,
29918,
2371,
580,
13,
462,
539,
869,
17760,
29898,
1311,
29889,
28667,
29918,
3167,
29918,
2527,
10817,
29918,
3188,
29897,
13,
462,
539,
869,
17760,
29898,
1311,
29889,
28667,
29918,
4181,
29897,
13,
462,
539,
869,
17760,
29898,
1311,
29889,
16645,
29918,
3167,
29918,
4882,
29897,
13,
462,
418,
1723,
13,
13,
4706,
736,
1583,
29889,
657,
29918,
546,
29918,
4882,
29918,
2527,
10817,
580,
13,
13,
1678,
822,
22235,
29918,
3167,
29918,
2527,
10817,
29918,
3188,
29898,
1311,
29892,
4489,
1125,
13,
13,
4706,
4489,
29889,
2029,
7503,
29892,
525,
275,
29918,
11745,
2033,
353,
4489,
29961,
877,
29874,
742,
903,
29943,
29889,
29907,
1964,
29907,
4638,
1275,
4489,
29961,
877,
29890,
742,
903,
29943,
29889,
29907,
1964,
29907,
4638,
13,
4706,
4489,
29889,
2029,
7503,
29892,
525,
275,
29918,
4304,
29918,
29874,
2033,
353,
4489,
29961,
877,
29874,
742,
903,
29943,
29889,
29907,
1964,
29907,
29897,
1822,
275,
1056,
580,
13,
4706,
4489,
29889,
2029,
7503,
29892,
525,
275,
29918,
4304,
29918,
29890,
2033,
353,
4489,
29961,
877,
29890,
742,
903,
29943,
29889,
29907,
1964,
29907,
29897,
1822,
275,
1056,
580,
13,
4706,
4489,
29889,
2029,
7503,
29892,
525,
275,
29918,
4304,
29918,
20313,
2033,
353,
4489,
1839,
275,
29918,
4304,
29918,
29874,
2033,
669,
4489,
1839,
275,
29918,
4304,
29918,
29890,
2033,
13,
4706,
4489,
29889,
2029,
7503,
29892,
525,
275,
29918,
4304,
29918,
1384,
2033,
353,
4489,
1839,
275,
29918,
4304,
29918,
29874,
2033,
891,
4489,
1839,
275,
29918,
4304,
29918,
29890,
2033,
13,
4706,
736,
4489,
13,
13,
1678,
822,
22235,
29918,
4181,
29898,
1311,
29892,
4489,
1125,
13,
4706,
396,
1244,
697,
1033,
788,
901,
2702,
628,
29873,
294,
29892,
321,
29889,
29887,
29889,
8679,
373,
26688,
470,
1897,
1024,
313,
4716,
338,
1583,
29889,
1989,
29897,
13,
13,
4706,
396,
1423,
565,
1418,
23179,
338,
16985,
29892,
470,
1018,
411,
15283,
29973,
13,
4706,
396,
3168,
304,
1423,
526,
29901,
11701,
29889,
2754,
29889,
8768,
29889,
275,
29918,
4537,
2992,
13,
4706,
396,
14402,
1951,
591,
817,
304,
1073,
3692,
591,
508,
437,
16985,
17203,
470,
451,
297,
3196,
7600,
29892,
13,
4706,
396,
591,
1033,
3787,
445,
2472,
408,
385,
5352,
29914,
6799,
13,
4706,
1018,
29901,
13,
9651,
19471,
353,
4489,
29961,
877,
29890,
742,
903,
29943,
29889,
29907,
1964,
29907,
4638,
448,
4489,
29961,
877,
29874,
742,
903,
29943,
29889,
29907,
1964,
29907,
4638,
13,
4706,
5174,
20948,
29901,
13,
9651,
1583,
3032,
5924,
29879,
29918,
21574,
29918,
4181,
353,
7700,
13,
9651,
19471,
353,
7442,
29889,
13707,
13,
4706,
1683,
29901,
13,
9651,
1583,
3032,
5924,
29879,
29918,
21574,
29918,
4181,
353,
5852,
13,
13,
4706,
4489,
29889,
2029,
7503,
29892,
525,
4181,
2033,
353,
19471,
13,
13,
4706,
736,
4489,
13,
13,
1678,
822,
338,
29918,
1767,
29918,
1545,
2164,
29898,
1311,
29892,
4489,
1125,
13,
4706,
321,
3232,
353,
29871,
29896,
29872,
29899,
29953,
13,
13,
4706,
565,
1583,
29889,
5924,
29879,
29918,
21574,
29918,
4181,
29901,
13,
9651,
736,
3695,
2176,
1839,
275,
29918,
11745,
2033,
669,
313,
2176,
1839,
4181,
13359,
6897,
580,
1405,
321,
3232,
29897,
13,
4706,
736,
3695,
2176,
1839,
275,
29918,
11745,
2033,
13,
13,
1678,
822,
3566,
29918,
3167,
29918,
4882,
29898,
1311,
29892,
4489,
1125,
13,
4706,
396,
14402,
5684,
5900,
1244,
723,
367,
321,
29889,
29887,
29889,
16049,
639,
29899,
2671,
470,
639,
29899,
29881,
1853,
266,
3781,
3361,
13,
4706,
396,
14402,
1207,
445,
263,
11608,
936,
13,
4706,
4660,
353,
10518,
29889,
19204,
7373,
29903,
29889,
348,
842,
29892,
2380,
29922,
2176,
29889,
2248,
29897,
13,
4706,
4660,
29961,
2176,
1839,
275,
29918,
4304,
29918,
29874,
2033,
669,
313,
30022,
2176,
1839,
275,
29918,
4304,
29918,
29890,
2033,
4638,
353,
903,
29903,
29889,
23959,
13,
4706,
4660,
15625,
30022,
2176,
1839,
275,
29918,
4304,
29918,
29874,
11287,
669,
4489,
1839,
275,
29918,
4304,
29918,
29890,
2033,
29962,
353,
903,
29903,
29889,
311,
22742,
13,
13,
4706,
4660,
15625,
30022,
2176,
1839,
275,
29918,
4304,
29918,
1384,
11287,
669,
1583,
29889,
275,
29918,
1767,
29918,
1545,
2164,
29898,
2176,
4638,
353,
903,
29903,
29889,
1545,
2164,
13,
4706,
4660,
29961,
4882,
1275,
903,
29903,
29889,
348,
842,
29962,
353,
903,
29903,
29889,
3322,
4618,
13,
4706,
4489,
29889,
2029,
7503,
29892,
525,
4882,
2033,
353,
4660,
13,
13,
4706,
736,
4489,
13,
13,
1678,
822,
679,
29918,
546,
29918,
4882,
29918,
2527,
10817,
29898,
1311,
1125,
13,
4706,
286,
353,
6571,
13,
13,
4706,
363,
4660,
297,
23160,
29903,
29889,
3322,
4618,
29892,
903,
29903,
29889,
23959,
29892,
903,
29903,
29889,
311,
22742,
29892,
903,
29903,
29889,
1545,
2164,
5387,
13,
9651,
286,
29918,
4882,
353,
6571,
13,
9651,
1819,
29918,
2541,
29918,
4882,
353,
1583,
3032,
2371,
29961,
2892,
270,
29901,
270,
1839,
4882,
2033,
1275,
4660,
29962,
13,
9651,
756,
29918,
2541,
29918,
4882,
353,
7431,
29898,
5975,
29918,
2541,
29918,
4882,
29897,
1405,
29871,
29900,
13,
13,
9651,
565,
451,
756,
29918,
2541,
29918,
4882,
29901,
13,
18884,
396,
445,
376,
19878,
29908,
2794,
393,
1735,
4660,
267,
411,
694,
1819,
13,
18884,
396,
526,
451,
2715,
304,
278,
21556,
472,
599,
313,
294,
15869,
304,
2534,
23230,
2798,
29901,
29871,
29900,
10114,
470,
2788,
29897,
13,
18884,
396,
372,
1033,
10075,
367,
19884,
408,
385,
2984,
13,
18884,
396,
1401,
8333,
373,
825,
526,
278,
11780,
363,
278,
10938,
29914,
23905,
310,
278,
1962,
13,
18884,
6773,
13,
13,
9651,
285,
29918,
26193,
630,
353,
1583,
29889,
1958,
29918,
4882,
29918,
2220,
29918,
26193,
630,
29961,
4882,
29962,
13,
13,
9651,
286,
29918,
4882,
29889,
5504,
29898,
29888,
29918,
26193,
630,
29898,
5975,
29918,
2541,
29918,
4882,
876,
13,
13,
9651,
285,
29918,
546,
29918,
1767,
353,
1583,
29889,
1958,
29918,
4882,
29918,
2220,
29918,
546,
29918,
1767,
29961,
4882,
29962,
13,
13,
9651,
565,
285,
29918,
546,
29918,
1767,
338,
451,
6213,
29901,
13,
18884,
639,
29918,
1767,
29918,
2527,
10817,
353,
5159,
13,
18884,
565,
756,
29918,
2541,
29918,
4882,
29901,
13,
462,
1678,
639,
29918,
1767,
29918,
2527,
10817,
353,
1819,
29918,
2541,
29918,
4882,
29889,
7302,
29898,
29888,
29918,
546,
29918,
1767,
29892,
9685,
29922,
29896,
467,
517,
29918,
1761,
580,
13,
18884,
286,
29918,
4882,
1839,
5975,
2033,
353,
639,
29918,
1767,
29918,
2527,
10817,
13,
9651,
286,
29961,
4882,
29962,
353,
286,
29918,
4882,
13,
13,
4706,
736,
286,
13,
13,
1678,
732,
6799,
13,
1678,
822,
2910,
29918,
4882,
29918,
2220,
29918,
26193,
630,
29898,
1311,
1125,
13,
4706,
736,
426,
13,
9651,
903,
29903,
29889,
23959,
29901,
1583,
29889,
657,
29918,
16202,
29918,
4381,
29892,
13,
9651,
903,
29903,
29889,
311,
22742,
29901,
1583,
29889,
657,
29918,
16202,
29918,
4381,
29892,
13,
9651,
903,
29903,
29889,
3322,
4618,
29901,
1583,
29889,
657,
29918,
16202,
29918,
4381,
29892,
13,
9651,
903,
29903,
29889,
1545,
2164,
29901,
1583,
29889,
657,
29918,
16202,
29918,
4381,
29892,
13,
4706,
500,
13,
13,
1678,
732,
6799,
13,
1678,
822,
2910,
29918,
4882,
29918,
2220,
29918,
546,
29918,
1767,
29898,
1311,
1125,
13,
4706,
736,
426,
13,
9651,
903,
29903,
29889,
3322,
4618,
29901,
6213,
29892,
13,
9651,
903,
29903,
29889,
23959,
29901,
1583,
29889,
657,
29918,
546,
29918,
1767,
29918,
23959,
29892,
13,
9651,
903,
29903,
29889,
311,
22742,
29901,
1583,
29889,
657,
29918,
546,
29918,
1767,
29918,
311,
22742,
29892,
13,
9651,
903,
29903,
29889,
1545,
2164,
29901,
1583,
29889,
657,
29918,
546,
29918,
1767,
29918,
1545,
2164,
29892,
13,
4706,
500,
13,
13,
1678,
822,
679,
29918,
16202,
29918,
4381,
29898,
1311,
29892,
1819,
1125,
13,
4706,
736,
11117,
2798,
2396,
7431,
29898,
5975,
2915,
13,
13,
1678,
822,
679,
29918,
546,
29918,
1767,
29918,
23959,
29898,
1311,
29892,
995,
29918,
11330,
1125,
13,
4706,
736,
426,
13,
9651,
525,
1767,
2396,
995,
29918,
11330,
29961,
877,
29890,
742,
903,
29943,
29889,
1955,
6259,
29897,
1402,
13,
9651,
525,
2029,
2396,
11117,
798,
2396,
995,
29918,
11330,
29961,
877,
29890,
742,
903,
29943,
29889,
16652,
29918,
1955,
6259,
29918,
25180,
4638,
29913,
13,
4706,
500,
13,
13,
1678,
822,
679,
29918,
546,
29918,
1767,
29918,
311,
22742,
29898,
1311,
29892,
995,
29918,
11330,
1125,
13,
4706,
736,
426,
13,
9651,
525,
1767,
2396,
995,
29918,
11330,
29961,
877,
29874,
742,
903,
29943,
29889,
1955,
6259,
29897,
1402,
13,
9651,
525,
2029,
2396,
11117,
798,
2396,
995,
29918,
11330,
29961,
877,
29874,
742,
903,
29943,
29889,
16652,
29918,
1955,
6259,
29918,
25180,
4638,
29913,
13,
4706,
500,
13,
13,
1678,
822,
679,
29918,
546,
29918,
1767,
29918,
1545,
2164,
29898,
1311,
29892,
995,
29918,
11330,
1125,
13,
4706,
325,
29886,
353,
995,
29918,
11330,
13,
4706,
286,
353,
6571,
13,
13,
4706,
822,
679,
29918,
29885,
29918,
1454,
29918,
2975,
29898,
29881,
29892,
2625,
1125,
13,
9651,
736,
426,
13,
18884,
525,
13492,
2396,
270,
15625,
2975,
29892,
903,
29943,
29889,
1955,
6259,
29897,
1402,
13,
18884,
525,
15807,
630,
29918,
294,
2396,
270,
15625,
2975,
29892,
903,
29943,
29889,
29907,
1964,
29907,
29897,
1402,
13,
18884,
525,
2029,
2396,
426,
13,
462,
1678,
525,
798,
2396,
270,
15625,
2975,
29892,
903,
29943,
29889,
16652,
29918,
1955,
6259,
29918,
25180,
4638,
13,
18884,
500,
13,
9651,
500,
13,
4706,
286,
1839,
29874,
2033,
353,
679,
29918,
29885,
29918,
1454,
29918,
2975,
29898,
29894,
29886,
29892,
525,
29874,
1495,
13,
4706,
286,
1839,
29890,
2033,
353,
679,
29918,
29885,
29918,
1454,
29918,
2975,
29898,
29894,
29886,
29892,
525,
29890,
1495,
13,
4706,
396,
278,
1820,
1818,
367,
6702,
4181,
742,
27255,
2012,
310,
871,
525,
4181,
29915,
13,
4706,
396,
6467,
8515,
322,
4029,
11710,
4436,
313,
28192,
362,
12570,
29879,
515,
12655,
29914,
15112,
29897,
674,
6403,
13,
4706,
396,
445,
1033,
367,
263,
11701,
6494,
29892,
577,
372,
723,
367,
1781,
304,
23033,
445,
297,
901,
9493,
472,
777,
1298,
13,
4706,
565,
1583,
29889,
5924,
29879,
29918,
21574,
29918,
4181,
29901,
13,
9651,
286,
1839,
4181,
2033,
353,
325,
29886,
29961,
877,
4181,
742,
27255,
29962,
13,
13,
4706,
736,
286,
13,
13,
13,
1990,
16874,
16288,
29898,
3188,
29889,
1523,
17954,
1125,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
11286,
7295,
13,
4706,
736,
6024,
7638,
2033,
13,
13,
1678,
732,
1990,
5696,
13,
1678,
822,
6139,
29898,
25932,
1125,
13,
4706,
736,
1067,
29879,
17255,
1514,
1649,
13,
13,
1678,
822,
2531,
29918,
510,
20941,
29918,
29886,
7121,
29898,
1311,
29892,
263,
29892,
289,
1125,
13,
4706,
9995,
13,
4706,
7106,
385,
4256,
519,
310,
313,
1989,
29892,
10230,
29918,
18784,
511,
988,
10230,
29918,
18784,
338,
263,
18761,
310,
313,
667,
29918,
29874,
29892,
2944,
29918,
29890,
29897,
411,
263,
9686,
1820,
29889,
13,
4706,
9995,
13,
4706,
396,
9833,
310,
278,
6611,
310,
278,
1023,
6475,
13,
4706,
396,
278,
20520,
310,
278,
937,
2407,
4893,
9399,
663,
13,
4706,
396,
385,
8671,
2984,
723,
367,
304,
2656,
963,
29892,
19566,
293,
1946,
1711,
470,
411,
263,
2888,
16614,
13,
4706,
6611,
29918,
13094,
353,
426,
1068,
29874,
29892,
3579,
29890,
1836,
8149,
580,
13,
13,
4706,
363,
1820,
297,
6611,
29918,
13094,
29901,
13,
9651,
7709,
1820,
29892,
313,
29874,
29889,
657,
29898,
1989,
511,
289,
29889,
657,
29898,
1989,
876,
13,
13,
1678,
2407,
29918,
25707,
353,
6571,
13,
1678,
3440,
29918,
3090,
353,
16321,
29915,
13,
13,
1678,
822,
679,
29918,
1445,
29918,
19635,
29898,
1311,
29892,
4765,
1125,
13,
4706,
9995,
13,
4706,
24930,
322,
736,
934,
29899,
5563,
15562,
29889,
13,
13,
4706,
4001,
372,
29915,
29879,
2560,
29892,
591,
508,
437,
372,
1244,
3265,
1135,
297,
263,
16955,
770,
29889,
13,
4706,
9995,
13,
4706,
396,
14402,
505,
304,
6284,
11097,
565,
7983,
881,
367,
4502,
263,
10554,
272,
2777,
470,
278,
10650,
1881,
13,
4706,
2224,
353,
10802,
29898,
4351,
29897,
13,
4706,
3454,
353,
679,
29918,
9012,
29918,
2557,
29898,
2084,
29892,
3440,
29918,
3090,
29922,
1311,
29889,
9342,
29918,
3090,
29897,
13,
13,
4706,
736,
426,
13,
9651,
525,
2084,
29918,
3560,
2396,
2224,
29889,
3560,
29892,
13,
9651,
525,
9507,
2396,
2224,
29889,
978,
29892,
13,
9651,
525,
29876,
29918,
9012,
2396,
7431,
29898,
9012,
511,
13,
9651,
525,
29876,
29918,
9012,
29918,
9342,
287,
2396,
7431,
29898,
9012,
29961,
9012,
1839,
275,
29918,
9342,
2033,
11724,
13,
9651,
525,
29876,
29918,
9012,
29918,
348,
9342,
287,
2396,
7431,
29898,
9012,
29961,
30022,
9012,
1839,
275,
29918,
9342,
2033,
11724,
13,
9651,
525,
29876,
29918,
305,
1503,
2396,
3454,
1839,
3051,
13359,
710,
29889,
2435,
2141,
2083,
3285,
13,
4706,
500,
13,
13,
1678,
822,
7252,
29918,
1445,
29898,
1311,
29892,
4765,
29918,
29874,
29892,
4765,
29918,
29890,
1125,
13,
13,
4706,
934,
29918,
3487,
29918,
29874,
353,
1583,
29889,
657,
29918,
1445,
29918,
19635,
29898,
4351,
29918,
29874,
29897,
13,
4706,
934,
29918,
3487,
29918,
29890,
353,
1583,
29889,
657,
29918,
1445,
29918,
19635,
29898,
4351,
29918,
29890,
29897,
13,
13,
4706,
21556,
353,
10726,
10095,
10817,
5160,
877,
1445,
742,
934,
29918,
3487,
29918,
29874,
29892,
934,
29918,
3487,
29918,
29890,
29897,
13,
4706,
21556,
29889,
15807,
403,
580,
13,
13,
4706,
736,
9657,
29898,
2527,
10817,
29897,
13,
13,
1678,
822,
4341,
29918,
1989,
29918,
657,
357,
29898,
1311,
29892,
784,
29918,
19635,
1125,
13,
4706,
396,
1244,
278,
871,
7348,
338,
607,
784,
15562,
2875,
304,
671,
13,
4706,
396,
376,
978,
613,
376,
978,
29918,
6672,
29908,
322,
376,
1054,
13140,
29908,
13,
4706,
396,
14402,
2050,
14060,
292,
445,
408,
263,
18665,
29899,
262,
29899,
5563,
2984,
313,
272,
5505,
6120,
7353,
7897,
13,
4706,
736,
784,
29918,
19635,
1839,
978,
2033,
13,
13,
1678,
822,
679,
29918,
11651,
29918,
13099,
29898,
1311,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
7106,
278,
14164,
1203,
1304,
304,
6699,
29892,
1889,
322,
24396,
363,
10230,
1591,
4341,
29889,
13,
4706,
9995,
13,
4706,
1162,
353,
16874,
3562,
14289,
9182,
10456,
5085,
29892,
3440,
29918,
3090,
29922,
1311,
29889,
9342,
29918,
3090,
29892,
3579,
1311,
29889,
11651,
29918,
25707,
29892,
3579,
19290,
29897,
13,
4706,
1162,
29889,
1359,
580,
13,
13,
4706,
736,
1162,
13,
13,
1678,
822,
679,
29918,
3167,
29918,
2527,
10817,
29918,
4914,
29898,
1311,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
7106,
278,
1203,
1304,
304,
8147,
1735,
21556,
363,
1591,
4341,
29889,
13,
4706,
9995,
13,
4706,
736,
6137,
4409,
7277,
10095,
10817,
10456,
5085,
29892,
3579,
19290,
29897,
13,
13,
1678,
822,
679,
29918,
3167,
29918,
2527,
10817,
29918,
4914,
29918,
5975,
29898,
1311,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
9995,
13,
4706,
7106,
278,
1203,
1304,
304,
8147,
1735,
21556,
363,
1591,
1897,
1819,
29889,
13,
4706,
9995,
13,
4706,
736,
6137,
4409,
9065,
7277,
10095,
10817,
29889,
3166,
29918,
4914,
29918,
2527,
10817,
10456,
5085,
29892,
3579,
19290,
29897,
13,
13,
1678,
822,
7252,
29918,
2371,
29918,
1272,
29898,
1311,
29892,
4765,
29918,
29874,
29892,
4765,
29918,
29890,
29892,
3579,
19290,
1125,
13,
4706,
1539,
29878,
29918,
2371,
353,
426,
13,
9651,
525,
13099,
2396,
24335,
13,
9651,
525,
5975,
29918,
1609,
29918,
4914,
2396,
24335,
13,
4706,
500,
13,
13,
4706,
1162,
29918,
29874,
353,
1583,
29889,
657,
29918,
11651,
29918,
13099,
29898,
4351,
29918,
29874,
29897,
13,
4706,
1162,
29918,
29890,
353,
1583,
29889,
657,
29918,
11651,
29918,
13099,
29898,
4351,
29918,
29890,
29897,
13,
13,
4706,
396,
363,
1269,
10230,
5101,
310,
4341,
515,
278,
1023,
6131,
13,
4706,
363,
752,
29918,
1989,
29892,
313,
1054,
29918,
3487,
29918,
29874,
29892,
784,
29918,
3487,
29918,
29890,
29897,
297,
1583,
29889,
1885,
29918,
510,
20941,
29918,
29886,
7121,
29898,
3757,
29918,
29874,
29892,
1162,
29918,
29890,
1125,
13,
13,
9651,
396,
937,
29892,
8147,
278,
1735,
21556,
363,
278,
1897,
408,
263,
3353,
13,
9651,
1539,
29878,
29918,
14369,
29918,
1054,
353,
1583,
29889,
657,
29918,
3167,
29918,
2527,
10817,
29918,
4914,
29898,
2388,
29918,
1989,
29892,
784,
29918,
3487,
29918,
29874,
29892,
784,
29918,
3487,
29918,
29890,
29897,
13,
9651,
1539,
29878,
29918,
14369,
29918,
1054,
29889,
15807,
403,
580,
13,
13,
9651,
396,
769,
29892,
8147,
278,
1735,
21556,
363,
278,
1897,
1819,
13,
9651,
1539,
29878,
29918,
5975,
353,
1583,
29889,
657,
29918,
3167,
29918,
2527,
10817,
29918,
4914,
29918,
5975,
29898,
2527,
29878,
29918,
14369,
29918,
1054,
29897,
13,
9651,
1539,
29878,
29918,
5975,
29918,
1272,
353,
1539,
29878,
29918,
5975,
29889,
15807,
403,
580,
13,
13,
9651,
396,
7146,
29892,
788,
5235,
1048,
1735,
297,
1819,
304,
278,
1897,
1735,
21556,
13,
9651,
1539,
29878,
29918,
14369,
29918,
1054,
29889,
15807,
403,
29918,
3166,
29918,
1767,
29918,
2527,
10817,
29898,
2527,
29878,
29918,
5975,
29889,
2371,
29897,
13,
13,
9651,
1539,
29878,
29918,
2371,
1839,
5975,
29918,
1609,
29918,
4914,
2033,
29961,
2388,
29918,
1989,
29962,
353,
1539,
29878,
29918,
5975,
29918,
1272,
13,
9651,
1539,
29878,
29918,
2371,
1839,
13099,
2033,
29961,
2388,
29918,
1989,
29962,
353,
9657,
29898,
2527,
29878,
29918,
14369,
29918,
1054,
29897,
13,
13,
4706,
736,
1539,
29878,
29918,
2371,
13,
13,
1678,
822,
7252,
29898,
1311,
29892,
2224,
29918,
29874,
29892,
2224,
29918,
29890,
29892,
3579,
19290,
1125,
13,
4706,
1583,
3032,
25376,
29918,
3167,
353,
7442,
29889,
13707,
13,
13,
4706,
599,
29918,
2527,
10817,
353,
6571,
13,
13,
4706,
599,
29918,
2527,
10817,
1839,
1445,
2033,
353,
1583,
29889,
18307,
29918,
1445,
29898,
2084,
29918,
29874,
29892,
2224,
29918,
29890,
29897,
13,
13,
4706,
396,
784,
29918,
2527,
10817,
884,
3743,
278,
995,
29899,
5563,
21556,
408,
263,
3630,
4308,
13,
4706,
396,
1438,
881,
367,
16531,
16949,
322,
19412,
4208,
297,
263,
2323,
1591,
13,
4706,
599,
29918,
2527,
10817,
1839,
2371,
29918,
1272,
2033,
353,
1583,
29889,
18307,
29918,
2371,
29918,
1272,
29898,
2084,
29918,
29874,
29892,
2224,
29918,
29890,
29897,
13,
13,
4706,
736,
1583,
29889,
657,
29918,
5014,
287,
29918,
2527,
10817,
29898,
497,
29918,
2527,
10817,
29897,
13,
13,
1678,
822,
679,
29918,
5014,
287,
29918,
2527,
10817,
29898,
1311,
29892,
21556,
1125,
13,
4706,
736,
21556,
13,
13,
1678,
822,
10151,
29918,
3167,
29898,
1311,
1125,
13,
4706,
736,
1583,
3032,
25376,
29918,
3167,
13,
13,
1678,
822,
679,
29918,
16202,
29918,
2371,
29898,
1311,
29892,
1591,
29918,
2527,
10817,
1125,
13,
4706,
599,
29918,
22724,
29918,
16202,
353,
5159,
13,
13,
4706,
363,
784,
978,
29892,
784,
29918,
2527,
10817,
297,
1591,
29918,
2527,
10817,
1839,
13099,
13359,
7076,
7295,
13,
9651,
784,
29918,
16202,
353,
11117,
978,
2396,
784,
978,
29913,
13,
9651,
784,
29918,
16202,
29889,
5504,
29898,
1054,
29918,
2527,
10817,
1839,
5975,
11287,
13,
9651,
784,
29918,
16202,
1839,
4882,
2033,
353,
784,
29918,
2527,
10817,
1839,
4882,
2033,
13,
13,
9651,
599,
29918,
22724,
29918,
16202,
29889,
4397,
29898,
1054,
29918,
16202,
29897,
13,
13,
4706,
4489,
353,
10518,
29889,
17271,
29898,
497,
29918,
22724,
29918,
16202,
467,
842,
29918,
2248,
877,
978,
1495,
13,
13,
4706,
1583,
3032,
25376,
29918,
3167,
353,
4489,
1839,
1154,
29918,
15033,
13359,
12676,
580,
334,
29871,
29896,
29900,
29900,
13,
13,
4706,
736,
4489,
13,
13,
1678,
9493,
29918,
5563,
353,
29871,
29896,
13,
13,
1678,
822,
22663,
29898,
1311,
29892,
3620,
29892,
9493,
29918,
5563,
29922,
8516,
1125,
13,
4706,
515,
869,
4422,
1053,
304,
29918,
3126,
13,
13,
4706,
9493,
29918,
5563,
353,
9493,
29918,
5563,
470,
1583,
29889,
16432,
29918,
5563,
13,
13,
4706,
4489,
29918,
2371,
353,
1583,
29889,
657,
29918,
16202,
29918,
2371,
29898,
25990,
1839,
2371,
29918,
1272,
11287,
13,
13,
4706,
565,
9493,
29918,
5563,
6736,
29871,
29900,
29901,
13,
9651,
396,
2323,
29899,
4537,
1735,
19649,
29901,
13,
9651,
1596,
29898,
29888,
29915,
25376,
1735,
29901,
426,
1311,
29889,
25376,
29918,
3167,
7295,
29900,
29946,
29889,
29906,
29888,
10560,
1495,
13,
13,
4706,
565,
9493,
29918,
5563,
6736,
29871,
29896,
29901,
13,
9651,
411,
10518,
29889,
3385,
29918,
4703,
877,
4990,
29889,
3317,
29918,
13099,
742,
6213,
1125,
13,
9651,
396,
975,
1493,
1591,
411,
639,
29899,
4914,
13964,
363,
599,
4341,
13,
18884,
1596,
29898,
2176,
29918,
2371,
29897,
13,
13,
4706,
565,
9493,
29918,
5563,
6736,
29871,
29906,
29901,
13,
9651,
396,
4866,
1735,
848,
29892,
12023,
304,
367,
9657,
29899,
4561,
313,
2541,
694,
20813,
373,
3829,
29897,
13,
9651,
714,
353,
304,
29918,
3126,
29898,
25990,
29897,
13,
9651,
1596,
29898,
449,
29897,
13,
2
] |
core/self6dpp/tools/hb_bdp/lm_pbr_so_mlBCE_2_merge_hbBdpAll_InitResultsWithRefinedPosesToJson.py | THU-DA-6D-Pose-Group/self6dpp | 33 | 97943 | <filename>core/self6dpp/tools/hb_bdp/lm_pbr_so_mlBCE_2_merge_hbBdpAll_InitResultsWithRefinedPosesToJson.py
import os.path as osp
import sys
import numpy as np
import mmcv
from tqdm import tqdm
from functools import cmp_to_key
cur_dir = osp.dirname(osp.abspath(__file__))
PROJ_ROOT = osp.normpath(osp.join(cur_dir, "../../../../"))
sys.path.insert(0, PROJ_ROOT)
from lib.pysixd import inout, misc
from lib.utils.bbox_utils import xyxy_to_xywh
from lib.utils.utils import iprint, wprint
id2obj = {
2: "benchvise",
7: "driller",
21: "phone",
} # bop 2, hb-v1:1 # bop 7, hb-v1:6 # bop 21, hb-v1:20
obj_num = len(id2obj)
obj2id = {_name: _id for _id, _name in id2obj.items()}
if __name__ == "__main__":
new_res_path = osp.join(
PROJ_ROOT,
"datasets/hb_bench_driller_phone/init_poses/",
"resnest50d_a6_AugCosyAAEGray_BG05_mlBCE_lm_pbr_100e_so_GdrnPose_wYolov4PbrBbox_wDeepimPose_hbBdpAll.json",
)
if osp.exists(new_res_path):
wprint("{} already exists! overriding!".format(new_res_path))
res_root = "output/deepim/lmPbrSO/FlowNet512_1.5AugCosyAAEGray_AggressiveV2_Flat_lmPbr_SO/"
iter_num_test = 4
pkl_paths = [
"benchvise/inference_model_final_wo_optim-956eb2eb/hb_bdp_benchvise_all_lmK/results.pkl",
"driller/inference_model_final_wo_optim-45c5dd36/hb_bdp_driller_all_lmK/results.pkl",
"phone/inference_model_final_wo_optim-61aad172/hb_bdp_phone_all_lmK/results.pkl",
]
obj_names = [obj for obj in obj2id]
new_res_dict = {}
for obj_name, pred_name in zip(obj_names, pkl_paths):
assert obj_name in pred_name, "{} not in {}".format(obj_name, pred_name)
pred_path = osp.join(res_root, pred_name)
assert osp.exists(pred_path), pred_path
iprint(obj_name, pred_path)
# pkl scene_im_id key, list of preds
preds = mmcv.load(pred_path)
for scene_im_id, pred_list in preds.items():
for pred in pred_list:
obj_id = pred["obj_id"]
score = pred["score"]
bbox_crop = pred["bbox_det_xyxy"] # xyxy
bbox_crop_xywh = xyxy_to_xywh(bbox_crop)
refined_pose = pred["pose_{}".format(iter_num_test)]
pose_est = pred["pose_0"]
cur_new_res = {
"obj_id": obj_id,
"score": float(score),
# "bbox_crop": bbox_crop_xywh.tolist(),
"bbox_est": bbox_crop_xywh.tolist(),
"pose_est": pose_est.tolist(),
"pose_refine": refined_pose.tolist(),
}
if scene_im_id not in new_res_dict:
new_res_dict[scene_im_id] = []
new_res_dict[scene_im_id].append(cur_new_res)
def mycmp(x, y):
# compare two scene_im_id
x_scene_id = int(x[0].split("/")[0])
y_scene_id = int(y[0].split("/")[0])
if x_scene_id == y_scene_id:
x_im_id = int(x[0].split("/")[1])
y_im_id = int(y[0].split("/")[1])
return x_im_id - y_im_id
else:
return x_scene_id - y_scene_id
new_res_dict_sorted = dict(sorted(new_res_dict.items(), key=cmp_to_key(mycmp)))
inout.save_json(new_res_path, new_res_dict_sorted)
iprint()
iprint("new result path: {}".format(new_res_path))
| [
1,
529,
9507,
29958,
3221,
29914,
1311,
29953,
29881,
407,
29914,
8504,
29914,
29882,
29890,
29918,
29890,
6099,
29914,
21457,
29918,
29886,
1182,
29918,
578,
29918,
828,
29933,
4741,
29918,
29906,
29918,
14634,
29918,
29882,
29890,
29933,
6099,
3596,
29918,
6644,
12191,
3047,
5620,
1312,
9135,
267,
1762,
8148,
29889,
2272,
13,
5215,
2897,
29889,
2084,
408,
288,
1028,
13,
5215,
10876,
13,
5215,
12655,
408,
7442,
13,
5215,
5654,
11023,
13,
3166,
260,
29939,
18933,
1053,
260,
29939,
18933,
13,
3166,
2090,
312,
8789,
1053,
274,
1526,
29918,
517,
29918,
1989,
13,
13,
2764,
29918,
3972,
353,
288,
1028,
29889,
25721,
29898,
4705,
29889,
370,
1028,
493,
22168,
1445,
1649,
876,
13,
8618,
29967,
29918,
21289,
353,
288,
1028,
29889,
12324,
2084,
29898,
4705,
29889,
7122,
29898,
2764,
29918,
3972,
29892,
376,
21546,
21546,
5783,
13,
9675,
29889,
2084,
29889,
7851,
29898,
29900,
29892,
13756,
29967,
29918,
21289,
29897,
13,
3166,
4303,
29889,
29886,
952,
861,
29881,
1053,
297,
449,
29892,
3984,
29883,
13,
3166,
4303,
29889,
13239,
29889,
29890,
1884,
29918,
13239,
1053,
921,
29891,
3594,
29918,
517,
29918,
3594,
1332,
13,
3166,
4303,
29889,
13239,
29889,
13239,
1053,
474,
2158,
29892,
281,
2158,
13,
13,
13,
333,
29906,
5415,
353,
426,
13,
268,
29906,
29901,
376,
1785,
305,
29894,
895,
613,
13,
268,
29955,
29901,
376,
7707,
5495,
613,
13,
268,
29906,
29896,
29901,
376,
6710,
613,
13,
29913,
29871,
396,
289,
459,
29871,
29906,
29892,
298,
29890,
29899,
29894,
29896,
29901,
29896,
29871,
396,
289,
459,
29871,
29955,
29892,
298,
29890,
29899,
29894,
29896,
29901,
29953,
29871,
396,
289,
459,
29871,
29906,
29896,
29892,
298,
29890,
29899,
29894,
29896,
29901,
29906,
29900,
13,
5415,
29918,
1949,
353,
7431,
29898,
333,
29906,
5415,
29897,
13,
5415,
29906,
333,
353,
426,
29918,
978,
29901,
903,
333,
363,
903,
333,
29892,
903,
978,
297,
1178,
29906,
5415,
29889,
7076,
28296,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
716,
29918,
690,
29918,
2084,
353,
288,
1028,
29889,
7122,
29898,
13,
4706,
13756,
29967,
29918,
21289,
29892,
13,
4706,
376,
14538,
1691,
29914,
29882,
29890,
29918,
1785,
305,
29918,
7707,
5495,
29918,
6710,
29914,
2344,
29918,
10590,
29914,
613,
13,
4706,
376,
690,
17510,
29945,
29900,
29881,
29918,
29874,
29953,
29918,
29909,
688,
29907,
359,
29891,
6344,
11787,
764,
29918,
29933,
29954,
29900,
29945,
29918,
828,
29933,
4741,
29918,
21457,
29918,
29886,
1182,
29918,
29896,
29900,
29900,
29872,
29918,
578,
29918,
29954,
7707,
29876,
29925,
852,
29918,
29893,
29979,
324,
586,
29946,
29925,
1182,
29933,
1884,
29918,
29893,
2772,
1022,
326,
29925,
852,
29918,
29882,
29890,
29933,
6099,
3596,
29889,
3126,
613,
13,
1678,
1723,
13,
1678,
565,
288,
1028,
29889,
9933,
29898,
1482,
29918,
690,
29918,
2084,
1125,
13,
4706,
281,
2158,
703,
8875,
2307,
4864,
29991,
20831,
292,
29991,
1642,
4830,
29898,
1482,
29918,
690,
29918,
2084,
876,
13,
13,
1678,
620,
29918,
4632,
353,
376,
4905,
29914,
24535,
326,
29914,
21457,
29925,
1182,
6156,
29914,
17907,
6779,
29945,
29896,
29906,
29918,
29896,
29889,
29945,
29909,
688,
29907,
359,
29891,
6344,
11787,
764,
29918,
14769,
3663,
573,
29963,
29906,
29918,
29943,
5066,
29918,
21457,
29925,
1182,
29918,
6156,
12975,
13,
1678,
4256,
29918,
1949,
29918,
1688,
353,
29871,
29946,
13,
13,
1678,
282,
6321,
29918,
24772,
353,
518,
13,
4706,
376,
1785,
305,
29894,
895,
29914,
262,
1659,
29918,
4299,
29918,
8394,
29918,
827,
29918,
20640,
29899,
29929,
29945,
29953,
774,
29906,
774,
29914,
29882,
29890,
29918,
29890,
6099,
29918,
1785,
305,
29894,
895,
29918,
497,
29918,
21457,
29968,
29914,
9902,
29889,
29886,
6321,
613,
13,
4706,
376,
7707,
5495,
29914,
262,
1659,
29918,
4299,
29918,
8394,
29918,
827,
29918,
20640,
29899,
29946,
29945,
29883,
29945,
1289,
29941,
29953,
29914,
29882,
29890,
29918,
29890,
6099,
29918,
7707,
5495,
29918,
497,
29918,
21457,
29968,
29914,
9902,
29889,
29886,
6321,
613,
13,
4706,
376,
6710,
29914,
262,
1659,
29918,
4299,
29918,
8394,
29918,
827,
29918,
20640,
29899,
29953,
29896,
29874,
328,
29896,
29955,
29906,
29914,
29882,
29890,
29918,
29890,
6099,
29918,
6710,
29918,
497,
29918,
21457,
29968,
29914,
9902,
29889,
29886,
6321,
613,
13,
1678,
4514,
13,
1678,
5446,
29918,
7039,
353,
518,
5415,
363,
5446,
297,
5446,
29906,
333,
29962,
13,
13,
1678,
716,
29918,
690,
29918,
8977,
353,
6571,
13,
1678,
363,
5446,
29918,
978,
29892,
4450,
29918,
978,
297,
14319,
29898,
5415,
29918,
7039,
29892,
282,
6321,
29918,
24772,
1125,
13,
4706,
4974,
5446,
29918,
978,
297,
4450,
29918,
978,
29892,
376,
8875,
451,
297,
6571,
1642,
4830,
29898,
5415,
29918,
978,
29892,
4450,
29918,
978,
29897,
13,
13,
4706,
4450,
29918,
2084,
353,
288,
1028,
29889,
7122,
29898,
690,
29918,
4632,
29892,
4450,
29918,
978,
29897,
13,
4706,
4974,
288,
1028,
29889,
9933,
29898,
11965,
29918,
2084,
511,
4450,
29918,
2084,
13,
4706,
474,
2158,
29898,
5415,
29918,
978,
29892,
4450,
29918,
2084,
29897,
13,
13,
4706,
396,
282,
6321,
29871,
9088,
29918,
326,
29918,
333,
1820,
29892,
1051,
310,
4450,
29879,
13,
4706,
4450,
29879,
353,
5654,
11023,
29889,
1359,
29898,
11965,
29918,
2084,
29897,
13,
13,
4706,
363,
9088,
29918,
326,
29918,
333,
29892,
4450,
29918,
1761,
297,
4450,
29879,
29889,
7076,
7295,
13,
9651,
363,
4450,
297,
4450,
29918,
1761,
29901,
13,
18884,
5446,
29918,
333,
353,
4450,
3366,
5415,
29918,
333,
3108,
13,
18884,
8158,
353,
4450,
3366,
13628,
3108,
13,
18884,
289,
1884,
29918,
29883,
1336,
353,
4450,
3366,
29890,
1884,
29918,
4801,
29918,
3594,
3594,
3108,
29871,
396,
921,
29891,
3594,
13,
18884,
289,
1884,
29918,
29883,
1336,
29918,
3594,
1332,
353,
921,
29891,
3594,
29918,
517,
29918,
3594,
1332,
29898,
29890,
1884,
29918,
29883,
1336,
29897,
13,
13,
18884,
2143,
1312,
29918,
4220,
353,
4450,
3366,
4220,
648,
29913,
1642,
4830,
29898,
1524,
29918,
1949,
29918,
1688,
4638,
13,
18884,
18593,
29918,
342,
353,
4450,
3366,
4220,
29918,
29900,
3108,
13,
18884,
3151,
29918,
1482,
29918,
690,
353,
426,
13,
462,
1678,
376,
5415,
29918,
333,
1115,
5446,
29918,
333,
29892,
13,
462,
1678,
376,
13628,
1115,
5785,
29898,
13628,
511,
13,
462,
1678,
396,
376,
29890,
1884,
29918,
29883,
1336,
1115,
289,
1884,
29918,
29883,
1336,
29918,
3594,
1332,
29889,
25027,
391,
3285,
13,
462,
1678,
376,
29890,
1884,
29918,
342,
1115,
289,
1884,
29918,
29883,
1336,
29918,
3594,
1332,
29889,
25027,
391,
3285,
13,
462,
1678,
376,
4220,
29918,
342,
1115,
18593,
29918,
342,
29889,
25027,
391,
3285,
13,
462,
1678,
376,
4220,
29918,
999,
457,
1115,
2143,
1312,
29918,
4220,
29889,
25027,
391,
3285,
13,
18884,
500,
13,
18884,
565,
9088,
29918,
326,
29918,
333,
451,
297,
716,
29918,
690,
29918,
8977,
29901,
13,
462,
1678,
716,
29918,
690,
29918,
8977,
29961,
24645,
29918,
326,
29918,
333,
29962,
353,
5159,
13,
18884,
716,
29918,
690,
29918,
8977,
29961,
24645,
29918,
326,
29918,
333,
1822,
4397,
29898,
2764,
29918,
1482,
29918,
690,
29897,
13,
13,
1678,
822,
590,
21058,
29898,
29916,
29892,
343,
1125,
13,
4706,
396,
7252,
1023,
9088,
29918,
326,
29918,
333,
13,
4706,
921,
29918,
24645,
29918,
333,
353,
938,
29898,
29916,
29961,
29900,
1822,
5451,
11974,
1159,
29961,
29900,
2314,
13,
4706,
343,
29918,
24645,
29918,
333,
353,
938,
29898,
29891,
29961,
29900,
1822,
5451,
11974,
1159,
29961,
29900,
2314,
13,
4706,
565,
921,
29918,
24645,
29918,
333,
1275,
343,
29918,
24645,
29918,
333,
29901,
13,
9651,
921,
29918,
326,
29918,
333,
353,
938,
29898,
29916,
29961,
29900,
1822,
5451,
11974,
1159,
29961,
29896,
2314,
13,
9651,
343,
29918,
326,
29918,
333,
353,
938,
29898,
29891,
29961,
29900,
1822,
5451,
11974,
1159,
29961,
29896,
2314,
13,
9651,
736,
921,
29918,
326,
29918,
333,
448,
343,
29918,
326,
29918,
333,
13,
4706,
1683,
29901,
13,
9651,
736,
921,
29918,
24645,
29918,
333,
448,
343,
29918,
24645,
29918,
333,
13,
13,
1678,
716,
29918,
690,
29918,
8977,
29918,
24582,
353,
9657,
29898,
24582,
29898,
1482,
29918,
690,
29918,
8977,
29889,
7076,
3285,
1820,
29922,
21058,
29918,
517,
29918,
1989,
29898,
1357,
21058,
4961,
13,
1678,
297,
449,
29889,
7620,
29918,
3126,
29898,
1482,
29918,
690,
29918,
2084,
29892,
716,
29918,
690,
29918,
8977,
29918,
24582,
29897,
13,
1678,
474,
2158,
580,
13,
1678,
474,
2158,
703,
1482,
1121,
2224,
29901,
6571,
1642,
4830,
29898,
1482,
29918,
690,
29918,
2084,
876,
13,
2
] |
emitter_observer.py | HerculesJack/grtrans | 25 | 1604550 | <reponame>HerculesJack/grtrans
import geokerr_interface
import numpy as np
from scipy.optimize import minimize
g = geokerr_interface.geokerr()
def cartesian(u,mu,phi):
x = 1./u*np.sqrt(1.-mu**2.)*np.cos(phi)
y = 1./u*np.sqrt(1.-mu**2.)*np.sin(phi)
z = 1./u*mu
return x,y,z
def calc_orbit(ab,args):
a=args[0]; mu0=args[1]; uf=args[2]; tpr=args[3]
u,mu,t,lam,phi,tpm,tpr,i1,i2 = g.run_camera(n=[1,1,2],avals=[ab[0],ab[0],ab[1],ab[1]],a=a,mu0=mu0,standard=1,mufill=0,kext=0,next=0,uf=uf,uout=1e-6,tpr=tpr,offset=0)
x,y,z = cartesian(u[0,-1],mu[0,-1],-phi[0,-1])
# print 'calc_orbit: ',a,mu0,uf
# print 'calc_orbit: ',u,mu,phi
return np.array([x,y,z]),np.array([u[0,-1],mu[0,-1],phi[0,-1],tpm[0,-1],tpr[0,-1],g.sm,g.su])
def calc_sep(xobs,xem):
return np.sum((xobs[0]-xem[0])**2.+(xobs[1]-xem[1])**2.+(xobs[2]-xem[2])**2.)
def iterate(ab,args):
xobs,robs = calc_orbit(ab,args[1:])
sep = calc_sep(xobs,args[0])
# print 'iterate: ',ab,xobs,sep
return sep
# take first guess from my attempted flat space alpha, beta
def run(ustar,mustar,phistar,abguess,a=0.99,mu0=np.cos(45./180.*np.pi),tpr=-1):
xs,ys,zs = cartesian(ustar,mustar,phistar)
if tpr==-1:
tpr=-(np.sign(ys)-1)/2
print 'xs: ',xs,ys,zs,tpr
args=[np.array([xs,ys,zs]),a,mu0,ustar,tpr]
res = minimize(iterate,abguess,args=args)
return res
| [
1,
529,
276,
1112,
420,
29958,
18650,
21337,
27006,
29914,
629,
3286,
13,
5215,
1737,
554,
3127,
29918,
13248,
13,
5215,
12655,
408,
7442,
13,
3166,
4560,
2272,
29889,
20640,
675,
1053,
6260,
675,
13,
13,
29887,
353,
1737,
554,
3127,
29918,
13248,
29889,
479,
554,
3127,
580,
13,
13,
1753,
7774,
18970,
29898,
29884,
29892,
2589,
29892,
2876,
1125,
13,
1678,
921,
353,
29871,
29896,
6904,
29884,
29930,
9302,
29889,
3676,
29898,
29896,
9229,
2589,
1068,
29906,
1846,
29930,
9302,
29889,
3944,
29898,
2876,
29897,
13,
1678,
343,
353,
29871,
29896,
6904,
29884,
29930,
9302,
29889,
3676,
29898,
29896,
9229,
2589,
1068,
29906,
1846,
29930,
9302,
29889,
5223,
29898,
2876,
29897,
13,
1678,
503,
353,
29871,
29896,
6904,
29884,
29930,
2589,
13,
1678,
736,
921,
29892,
29891,
29892,
29920,
13,
13,
1753,
22235,
29918,
272,
2966,
29898,
370,
29892,
5085,
1125,
13,
1678,
263,
29922,
5085,
29961,
29900,
1385,
3887,
29900,
29922,
5085,
29961,
29896,
1385,
318,
29888,
29922,
5085,
29961,
29906,
1385,
260,
558,
29922,
5085,
29961,
29941,
29962,
13,
1678,
318,
29892,
2589,
29892,
29873,
29892,
5288,
29892,
2876,
29892,
29873,
3358,
29892,
29873,
558,
29892,
29875,
29896,
29892,
29875,
29906,
353,
330,
29889,
3389,
29918,
26065,
29898,
29876,
11759,
29896,
29892,
29896,
29892,
29906,
1402,
485,
1338,
11759,
370,
29961,
29900,
1402,
370,
29961,
29900,
1402,
370,
29961,
29896,
1402,
370,
29961,
29896,
20526,
29874,
29922,
29874,
29892,
2589,
29900,
29922,
2589,
29900,
29892,
15770,
29922,
29896,
29892,
29885,
1137,
453,
29922,
29900,
29892,
446,
486,
29922,
29900,
29892,
4622,
29922,
29900,
29892,
1137,
29922,
1137,
29892,
29884,
449,
29922,
29896,
29872,
29899,
29953,
29892,
29873,
558,
29922,
29873,
558,
29892,
10289,
29922,
29900,
29897,
13,
1678,
921,
29892,
29891,
29892,
29920,
353,
7774,
18970,
29898,
29884,
29961,
29900,
6653,
29896,
1402,
2589,
29961,
29900,
6653,
29896,
1402,
29899,
2876,
29961,
29900,
6653,
29896,
2314,
13,
29937,
1678,
1596,
525,
28667,
29918,
272,
2966,
29901,
13420,
29874,
29892,
2589,
29900,
29892,
1137,
13,
29937,
1678,
1596,
525,
28667,
29918,
272,
2966,
29901,
13420,
29884,
29892,
2589,
29892,
2876,
13,
1678,
736,
7442,
29889,
2378,
4197,
29916,
29892,
29891,
29892,
29920,
11724,
9302,
29889,
2378,
4197,
29884,
29961,
29900,
6653,
29896,
1402,
2589,
29961,
29900,
6653,
29896,
1402,
2876,
29961,
29900,
6653,
29896,
1402,
29873,
3358,
29961,
29900,
6653,
29896,
1402,
29873,
558,
29961,
29900,
6653,
29896,
1402,
29887,
29889,
3844,
29892,
29887,
29889,
2146,
2314,
13,
13,
1753,
22235,
29918,
19570,
29898,
29916,
26290,
29892,
29916,
331,
1125,
13,
259,
736,
7442,
29889,
2083,
3552,
29916,
26290,
29961,
29900,
29962,
29899,
29916,
331,
29961,
29900,
2314,
1068,
29906,
29889,
17108,
29916,
26290,
29961,
29896,
29962,
29899,
29916,
331,
29961,
29896,
2314,
1068,
29906,
29889,
17108,
29916,
26290,
29961,
29906,
29962,
29899,
29916,
331,
29961,
29906,
2314,
1068,
29906,
1846,
13,
13,
1753,
13649,
29898,
370,
29892,
5085,
1125,
13,
1678,
921,
26290,
29892,
307,
5824,
353,
22235,
29918,
272,
2966,
29898,
370,
29892,
5085,
29961,
29896,
29901,
2314,
13,
1678,
16345,
353,
22235,
29918,
19570,
29898,
29916,
26290,
29892,
5085,
29961,
29900,
2314,
13,
29937,
1678,
1596,
525,
1524,
403,
29901,
13420,
370,
29892,
29916,
26290,
29892,
19570,
13,
1678,
736,
16345,
13,
13,
29937,
2125,
937,
4140,
515,
590,
16388,
12151,
2913,
15595,
29892,
21762,
13,
1753,
1065,
29898,
504,
279,
29892,
21969,
279,
29892,
561,
391,
279,
29892,
370,
2543,
404,
29892,
29874,
29922,
29900,
29889,
29929,
29929,
29892,
2589,
29900,
29922,
9302,
29889,
3944,
29898,
29946,
29945,
6904,
29896,
29947,
29900,
5575,
9302,
29889,
1631,
511,
29873,
558,
10457,
29896,
1125,
13,
1678,
14492,
29892,
952,
29892,
22381,
353,
7774,
18970,
29898,
504,
279,
29892,
21969,
279,
29892,
561,
391,
279,
29897,
13,
1678,
565,
260,
558,
1360,
29899,
29896,
29901,
13,
4706,
260,
558,
10457,
29898,
9302,
29889,
4530,
29898,
952,
6817,
29896,
6802,
29906,
13,
1678,
1596,
525,
10351,
29901,
13420,
10351,
29892,
952,
29892,
22381,
29892,
29873,
558,
13,
1678,
6389,
11759,
9302,
29889,
2378,
4197,
10351,
29892,
952,
29892,
22381,
11724,
29874,
29892,
2589,
29900,
29892,
504,
279,
29892,
29873,
558,
29962,
13,
1678,
620,
353,
6260,
675,
29898,
1524,
403,
29892,
370,
2543,
404,
29892,
5085,
29922,
5085,
29897,
13,
1678,
736,
620,
13,
2
] |
titration/utils/devices/temperature_probe.py | kieransukachevin/AlkalinityTitrator | 0 | 179211 | import adafruit_max31865
import busio
import digitalio
from titration.utils import constants
class Temperature_Probe:
def __init__(self, sck, mosi, miso, cs, wires=2):
self.spi = busio.SPI(sck, MOSI=mosi, MISO=miso)
self.cs = digitalio.DigitalInOut(cs)
self.sensor = adafruit_max31865.MAX31865(
self.spi,
self.cs,
wires=wires,
rtd_nominal=constants.TEMPERATURE_NOMINAL_RESISTANCE,
ref_resistor=constants.TEMPERATURE_REF_RESISTANCE,
)
def get_temperature(self):
return self.sensor.temperature
def get_resistance(self):
return self.sensor.resistance
| [
1,
1053,
594,
2142,
9216,
29918,
3317,
29941,
29896,
29947,
29953,
29945,
13,
5215,
3593,
601,
13,
5215,
13436,
601,
13,
13,
3166,
4329,
29878,
362,
29889,
13239,
1053,
17727,
13,
13,
13,
1990,
6789,
546,
1535,
29918,
1184,
915,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
269,
384,
29892,
286,
8156,
29892,
3984,
29877,
29892,
5939,
29892,
281,
2658,
29922,
29906,
1125,
13,
4706,
1583,
29889,
1028,
29875,
353,
3593,
601,
29889,
29903,
2227,
29898,
29879,
384,
29892,
341,
3267,
29902,
29922,
7681,
29875,
29892,
341,
29096,
29922,
29885,
10718,
29897,
13,
4706,
1583,
29889,
2395,
353,
13436,
601,
29889,
27103,
797,
3744,
29898,
2395,
29897,
13,
4706,
1583,
29889,
29879,
6073,
353,
594,
2142,
9216,
29918,
3317,
29941,
29896,
29947,
29953,
29945,
29889,
12648,
29941,
29896,
29947,
29953,
29945,
29898,
13,
9651,
1583,
29889,
1028,
29875,
29892,
13,
9651,
1583,
29889,
2395,
29892,
13,
9651,
281,
2658,
29922,
29893,
2658,
29892,
13,
9651,
364,
1594,
29918,
11522,
979,
29922,
3075,
1934,
29889,
4330,
3580,
1001,
1299,
11499,
29918,
29940,
6488,
1177,
1964,
29918,
1525,
5425,
1254,
23219,
29892,
13,
9651,
2143,
29918,
690,
2118,
29922,
3075,
1934,
29889,
4330,
3580,
1001,
1299,
11499,
29918,
25866,
29918,
1525,
5425,
1254,
23219,
29892,
13,
4706,
1723,
13,
13,
1678,
822,
679,
29918,
12863,
1535,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
29879,
6073,
29889,
12863,
1535,
13,
13,
1678,
822,
679,
29918,
690,
21558,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
29879,
6073,
29889,
690,
21558,
13,
2
] |
pkg_dir/src/utils/notion_utils.py | robperch/robase_datalysis | 2 | 4606 | ## MODULE WITH UTIL FUNCTIONS - NOTION
"----------------------------------------------------------------------------------------------------------------------"
####################################################### Imports ########################################################
"----------------------------------------------------------------------------------------------------------------------"
## Standard library imports
import requests
## Third party imports
import pandas as pd
## Local application imports
from pkg_dir.config.config import (
creds_file_path as crds_loc,
)
from pkg_dir.src.utils.general_utils import (
read_yaml,
)
"----------------------------------------------------------------------------------------------------------------------"
####################################################### Functions ######################################################
"----------------------------------------------------------------------------------------------------------------------"
## Read notion database with api
def notion_api_call(db_api_url, db_id, headers):
"""
Read notion database with api
:param db_api_url (string): base url provided by Notion to make api calls
:param db_id (string): unique id of the database that will be read
:param headers (dictionary): dict with authorization and version info
:return req (?): response after calling notions api
"""
## Configuring reading URL
read_url = db_api_url + db_id + "/query"
## Requesting info via the API
req = requests.request(
"POST",
read_url,
headers=headers
)
## Verifying API call status
print("API interaction status code: ", req.status_code)
return req
## Calling a Notion database as a json via Notion's API
def get_notion_db_json(db_id):
"""
Calling a Notion database as a json via Notion's API
:param db_id (string): unique id of the database that will be called
:return db_json (json): json with the notion's db contents
"""
## Reading credentials from yaml file
yaml_file = read_yaml(crds_loc)
notion_version = yaml_file["notion_api"]["notion_version"]
db_api_url = yaml_file["notion_api"]["db_api_url"]
api_key = yaml_file["notion_api"]["api_key"]
## Building headers for the API call
headers = {
"Authorization": "Bearer " + api_key,
"Notion-Version": notion_version
}
## Calling notion's api
req = notion_api_call(db_api_url, db_id, headers)
## Converting the api response to a json
db_json = req.json()
return db_json
## Crating a schema of the notion database that was read
def create_notion_db_schema(db_json, relevant_properties):
"""
Crating a schema of the notion database that was read
:param db_json (json): json object obtained by calling notion's api
:param relevant_properties (list): list of string with the names of the relevant properties
:return db_schema (dictionary): schema of the table that includes the properties' data type
"""
## Selecting a sample entry to go over all of it's properties
sample_entry = db_json["results"][0]["properties"]
## Bulding dictionary (schema) of the relevant properties and their datatypes
db_schema = {
prop: {
"data_type": sample_entry[prop]["type"]
}
for prop in sample_entry
if prop in relevant_properties
}
# print(db_schema)
return db_schema
## Building a the blueprint dictionary for the dataframe (orient=index)
def notion_db_blueprint_df(db_json, db_schema, index_prop):
"""
Building a the blueprint dictionary for the dataframe (orient=index)
:param db_json (json): json object obtained by calling notion's api
:return db_schema (dictionary): schema of the table that includes the properties' data type
:param index_prop (string): name of the property that will serve as the df's index
:return df_dict (dict): dictionary that will be used to create a dataframe with the json contents
"""
## Empty dictionary that will store all the results
df_dict = {}
## Iterating over every row in the dataframe
for row in db_json["results"]:
## Defining the table's base attributes
#### All properties contained in the notion db
row_props = row["properties"]
#### Name of the index; key attribute in the notion db
row_name = row_props[index_prop]["title"][0]["plain_text"]
#### Empty list to store all the row contents
row_contents = []
## Iterating over every relevant property in the table
for col in db_schema:
## Identifying the datatype of the property
data_type = db_schema[col]["data_type"]
## Set of conditions to determine how the row will be treated
#### Skipping the index row
if data_type == "title":
continue
#### Searching for data in specific locations for special data types (1)
elif data_type in ["select", "person", "created_by"]:
try:
row_contents.append(row_props[col][data_type]["name"])
except:
row_contents.append("No_data")
#### Searching for data in specific locations for special data types (2)
elif data_type in ["rich_text"]:
try:
row_contents.append(row_props[col][data_type][0]["text"]["content"])
except:
row_contents.append("No_data")
#### Searching for data in specific locations for special data types (2)
elif data_type in ["formula"]:
try:
#### Applying conditions based on the type of formula result
if row_props[col][data_type]["type"] == "string":
row_contents.append(row_props[col][data_type]["string"])
elif row_props[col][data_type]["type"] == "number":
row_contents.append(row_props[col][data_type]["number"])
except:
row_contents.append("No_data")
#### General procedure to find data
else:
row_contents.append(row_props[col][db_schema[col]["data_type"]])
## Saving the row contents gathered
df_dict[row_name] = row_contents
return df_dict
## Obtaining a dataframe from a notion database
def notion_json_to_df(db_json, relevant_properties):
"""
Obtaining a dataframe from a notion database
:param db_json (json): json object obtained by calling notion's api
:param relevant_properties (list): list of string with the names of the relevant properties
:return df_n (dataframe): resulting dataframe crated based on the blueprint generated
"""
## General parameters needed to build the dataframe
#### Database schema
db_schema = create_notion_db_schema(db_json, relevant_properties)
#### Property that will be used as the dataframe's index
index_prop = [prop for prop in db_schema if db_schema[prop]["data_type"] == "title"][0]
## Building a the blueprint dictionary for the dataframe (orient=index)
df_dict = notion_db_blueprint_df(db_json, db_schema, index_prop)
## Creating dataframe with the resulting blueprint dictionary
#### Crating dataframe
df_n = pd.DataFrame.from_dict(df_dict, orient="index")
#### Inserting the table's index as a column at the end of the df
df_n.insert(
df_n.shape[1],
index_prop,
df_n.index
)
#### Resetting index
df_n.reset_index(inplace=True, drop=True)
#### Adjusting column names
df_n.columns = [col_n for col_n in db_schema]
return df_n
## Obtaining a Notion database as dataframe with the selected columns
def notion_db_to_df(db_id, relevant_properties):
"""
Obtaining a Notion database as dataframe with the selected columns
:param db_id (string): unique id to identify the notion database
:param relevant_properties (list): list of string with the names of the relevant properties
:return df_n (dataframe): resulting dataframe crated based on the blueprint generated
"""
## Calling a Notion database as a json via Notion's API
db_json = get_notion_db_json(db_id)
## Obtaining a dataframe from a notion database
df_n = notion_json_to_df(db_json, relevant_properties)
return df_n
"----------------------------------------------------------------------------------------------------------------------"
"----------------------------------------------------------------------------------------------------------------------"
## END OF FILE ##
"----------------------------------------------------------------------------------------------------------------------"
"----------------------------------------------------------------------------------------------------------------------" | [
1,
444,
341,
13668,
29965,
1307,
22659,
501,
29911,
6227,
383,
28700,
29903,
448,
6058,
2725,
13,
13,
13,
13,
13,
13,
29908,
2683,
2683,
2683,
2683,
2683,
2683,
2683,
807,
13869,
13,
13383,
13383,
13383,
4136,
2277,
29937,
1954,
4011,
835,
13383,
13383,
13383,
4136,
29937,
13,
29908,
2683,
2683,
2683,
2683,
2683,
2683,
2683,
807,
13869,
13,
13,
13,
2277,
10117,
3489,
24802,
13,
13,
5215,
7274,
13,
13,
13,
2277,
18008,
6263,
24802,
13,
13,
5215,
11701,
408,
10518,
13,
13,
13,
2277,
9959,
2280,
24802,
13,
13,
3166,
282,
9415,
29918,
3972,
29889,
2917,
29889,
2917,
1053,
313,
13,
13,
1678,
907,
6289,
29918,
1445,
29918,
2084,
408,
2181,
6289,
29918,
2029,
29892,
13,
13,
29897,
13,
13,
3166,
282,
9415,
29918,
3972,
29889,
4351,
29889,
13239,
29889,
17492,
29918,
13239,
1053,
313,
13,
13,
1678,
1303,
29918,
25162,
29892,
13,
13,
29897,
13,
13,
13,
13,
13,
13,
29908,
2683,
2683,
2683,
2683,
2683,
2683,
2683,
807,
13869,
13,
13383,
13383,
13383,
4136,
2277,
29937,
6680,
29879,
835,
13383,
13383,
13383,
2277,
29937,
13,
29908,
2683,
2683,
2683,
2683,
2683,
2683,
2683,
807,
13869,
13,
13,
13,
2277,
7523,
17837,
2566,
411,
7882,
13,
1753,
17837,
29918,
2754,
29918,
4804,
29898,
2585,
29918,
2754,
29918,
2271,
29892,
4833,
29918,
333,
29892,
9066,
1125,
13,
1678,
9995,
13,
1678,
7523,
17837,
2566,
411,
7882,
13,
13,
1678,
584,
3207,
4833,
29918,
2754,
29918,
2271,
313,
1807,
1125,
2967,
3142,
4944,
491,
2216,
291,
304,
1207,
7882,
5717,
13,
1678,
584,
3207,
4833,
29918,
333,
313,
1807,
1125,
5412,
1178,
310,
278,
2566,
393,
674,
367,
1303,
13,
1678,
584,
3207,
9066,
313,
27126,
1125,
9657,
411,
28733,
322,
1873,
5235,
13,
1678,
584,
2457,
12428,
22308,
1125,
2933,
1156,
5432,
451,
1080,
7882,
13,
1678,
9995,
13,
13,
13,
1678,
444,
12782,
3864,
5183,
3988,
13,
1678,
1303,
29918,
2271,
353,
4833,
29918,
2754,
29918,
2271,
718,
4833,
29918,
333,
718,
5591,
1972,
29908,
13,
13,
1678,
444,
10729,
292,
5235,
3025,
278,
3450,
13,
1678,
12428,
353,
7274,
29889,
3827,
29898,
13,
4706,
376,
5438,
613,
13,
4706,
1303,
29918,
2271,
29892,
13,
4706,
9066,
29922,
13662,
13,
1678,
1723,
13,
13,
1678,
444,
1798,
9215,
3450,
1246,
4660,
13,
1678,
1596,
703,
8787,
14881,
4660,
775,
29901,
9162,
12428,
29889,
4882,
29918,
401,
29897,
13,
13,
13,
1678,
736,
12428,
13,
13,
13,
13,
2277,
8251,
292,
263,
2216,
291,
2566,
408,
263,
4390,
3025,
2216,
291,
29915,
29879,
3450,
13,
1753,
679,
29918,
1333,
291,
29918,
2585,
29918,
3126,
29898,
2585,
29918,
333,
1125,
13,
1678,
9995,
13,
1678,
8251,
292,
263,
2216,
291,
2566,
408,
263,
4390,
3025,
2216,
291,
29915,
29879,
3450,
13,
13,
1678,
584,
3207,
4833,
29918,
333,
313,
1807,
1125,
5412,
1178,
310,
278,
2566,
393,
674,
367,
2000,
13,
1678,
584,
2457,
4833,
29918,
3126,
313,
3126,
1125,
4390,
411,
278,
17837,
29915,
29879,
4833,
8118,
13,
1678,
9995,
13,
13,
13,
1678,
444,
21439,
16140,
515,
343,
8807,
934,
13,
1678,
343,
8807,
29918,
1445,
353,
1303,
29918,
25162,
29898,
29883,
5499,
29879,
29918,
2029,
29897,
13,
1678,
17837,
29918,
3259,
353,
343,
8807,
29918,
1445,
3366,
1333,
291,
29918,
2754,
3108,
3366,
1333,
291,
29918,
3259,
3108,
13,
1678,
4833,
29918,
2754,
29918,
2271,
353,
343,
8807,
29918,
1445,
3366,
1333,
291,
29918,
2754,
3108,
3366,
2585,
29918,
2754,
29918,
2271,
3108,
13,
1678,
7882,
29918,
1989,
353,
343,
8807,
29918,
1445,
3366,
1333,
291,
29918,
2754,
3108,
3366,
2754,
29918,
1989,
3108,
13,
13,
13,
1678,
444,
17166,
9066,
363,
278,
3450,
1246,
13,
1678,
9066,
353,
426,
13,
4706,
376,
25471,
1115,
376,
29933,
799,
261,
376,
718,
7882,
29918,
1989,
29892,
13,
4706,
376,
3664,
291,
29899,
6594,
1115,
17837,
29918,
3259,
13,
1678,
500,
13,
13,
13,
1678,
444,
8251,
292,
17837,
29915,
29879,
7882,
13,
1678,
12428,
353,
17837,
29918,
2754,
29918,
4804,
29898,
2585,
29918,
2754,
29918,
2271,
29892,
4833,
29918,
333,
29892,
9066,
29897,
13,
13,
1678,
444,
1281,
369,
1259,
278,
7882,
2933,
304,
263,
4390,
13,
1678,
4833,
29918,
3126,
353,
12428,
29889,
3126,
580,
13,
13,
13,
1678,
736,
4833,
29918,
3126,
13,
13,
13,
13,
2277,
6781,
1218,
263,
10938,
310,
278,
17837,
2566,
393,
471,
1303,
13,
1753,
1653,
29918,
1333,
291,
29918,
2585,
29918,
11010,
29898,
2585,
29918,
3126,
29892,
8018,
29918,
11330,
1125,
13,
1678,
9995,
13,
1678,
6781,
1218,
263,
10938,
310,
278,
17837,
2566,
393,
471,
1303,
13,
13,
1678,
584,
3207,
4833,
29918,
3126,
313,
3126,
1125,
4390,
1203,
7625,
491,
5432,
17837,
29915,
29879,
7882,
13,
1678,
584,
3207,
8018,
29918,
11330,
313,
1761,
1125,
1051,
310,
1347,
411,
278,
2983,
310,
278,
8018,
4426,
13,
1678,
584,
2457,
4833,
29918,
11010,
313,
27126,
1125,
10938,
310,
278,
1591,
393,
7805,
278,
4426,
29915,
848,
1134,
13,
1678,
9995,
13,
13,
13,
1678,
444,
7605,
292,
263,
4559,
6251,
304,
748,
975,
599,
310,
372,
29915,
29879,
4426,
13,
1678,
4559,
29918,
8269,
353,
4833,
29918,
3126,
3366,
9902,
3108,
29961,
29900,
29962,
3366,
11330,
3108,
13,
13,
13,
1678,
444,
8313,
8497,
8600,
313,
11010,
29897,
310,
278,
8018,
4426,
322,
1009,
1418,
271,
7384,
13,
1678,
4833,
29918,
11010,
353,
426,
13,
4706,
3107,
29901,
426,
13,
9651,
376,
1272,
29918,
1853,
1115,
4559,
29918,
8269,
29961,
7728,
29962,
3366,
1853,
3108,
13,
4706,
500,
13,
4706,
363,
3107,
297,
4559,
29918,
8269,
13,
4706,
565,
3107,
297,
8018,
29918,
11330,
13,
1678,
500,
13,
13,
1678,
396,
1596,
29898,
2585,
29918,
11010,
29897,
13,
13,
13,
1678,
736,
4833,
29918,
11010,
13,
13,
13,
13,
2277,
17166,
263,
278,
7254,
2158,
8600,
363,
278,
12205,
313,
12236,
29922,
2248,
29897,
13,
1753,
17837,
29918,
2585,
29918,
9539,
2158,
29918,
2176,
29898,
2585,
29918,
3126,
29892,
4833,
29918,
11010,
29892,
2380,
29918,
7728,
1125,
13,
1678,
9995,
13,
1678,
17166,
263,
278,
7254,
2158,
8600,
363,
278,
12205,
313,
12236,
29922,
2248,
29897,
13,
13,
1678,
584,
3207,
4833,
29918,
3126,
313,
3126,
1125,
4390,
1203,
7625,
491,
5432,
17837,
29915,
29879,
7882,
13,
1678,
584,
2457,
4833,
29918,
11010,
313,
27126,
1125,
10938,
310,
278,
1591,
393,
7805,
278,
4426,
29915,
848,
1134,
13,
1678,
584,
3207,
2380,
29918,
7728,
313,
1807,
1125,
1024,
310,
278,
2875,
393,
674,
9080,
408,
278,
4489,
29915,
29879,
2380,
13,
1678,
584,
2457,
4489,
29918,
8977,
313,
8977,
1125,
8600,
393,
674,
367,
1304,
304,
1653,
263,
12205,
411,
278,
4390,
8118,
13,
1678,
9995,
13,
13,
13,
1678,
444,
2812,
2349,
8600,
393,
674,
3787,
599,
278,
2582,
13,
1678,
4489,
29918,
8977,
353,
6571,
13,
13,
13,
1678,
444,
20504,
1218,
975,
1432,
1948,
297,
278,
12205,
13,
1678,
363,
1948,
297,
4833,
29918,
3126,
3366,
9902,
3108,
29901,
13,
13,
4706,
444,
5282,
2827,
278,
1591,
29915,
29879,
2967,
8393,
13,
13,
4706,
3191,
2178,
4426,
11122,
297,
278,
17837,
4833,
13,
4706,
1948,
29918,
11030,
353,
1948,
3366,
11330,
3108,
13,
13,
4706,
3191,
4408,
310,
278,
2380,
29936,
1820,
5352,
297,
278,
17837,
4833,
13,
4706,
1948,
29918,
978,
353,
1948,
29918,
11030,
29961,
2248,
29918,
7728,
29962,
3366,
3257,
3108,
29961,
29900,
29962,
3366,
24595,
29918,
726,
3108,
13,
13,
4706,
3191,
2812,
2349,
1051,
304,
3787,
599,
278,
1948,
8118,
13,
4706,
1948,
29918,
10853,
353,
5159,
13,
13,
13,
4706,
444,
20504,
1218,
975,
1432,
8018,
2875,
297,
278,
1591,
13,
4706,
363,
784,
297,
4833,
29918,
11010,
29901,
13,
13,
9651,
444,
13355,
9215,
278,
1418,
23179,
310,
278,
2875,
13,
9651,
848,
29918,
1853,
353,
4833,
29918,
11010,
29961,
1054,
29962,
3366,
1272,
29918,
1853,
3108,
13,
13,
13,
9651,
444,
3789,
310,
5855,
304,
8161,
920,
278,
1948,
674,
367,
14914,
13,
13,
9651,
3191,
28551,
3262,
278,
2380,
1948,
13,
9651,
565,
848,
29918,
1853,
1275,
376,
3257,
1115,
13,
18884,
6773,
13,
13,
9651,
3191,
11856,
292,
363,
848,
297,
2702,
14354,
363,
4266,
848,
4072,
313,
29896,
29897,
13,
9651,
25342,
848,
29918,
1853,
297,
6796,
2622,
613,
376,
10532,
613,
376,
11600,
29918,
1609,
3108,
29901,
13,
18884,
1018,
29901,
13,
462,
1678,
1948,
29918,
10853,
29889,
4397,
29898,
798,
29918,
11030,
29961,
1054,
3816,
1272,
29918,
1853,
29962,
3366,
978,
20068,
13,
18884,
5174,
29901,
13,
462,
1678,
1948,
29918,
10853,
29889,
4397,
703,
3782,
29918,
1272,
1159,
13,
13,
9651,
3191,
11856,
292,
363,
848,
297,
2702,
14354,
363,
4266,
848,
4072,
313,
29906,
29897,
13,
9651,
25342,
848,
29918,
1853,
297,
6796,
4018,
29918,
726,
3108,
29901,
13,
18884,
1018,
29901,
13,
462,
1678,
1948,
29918,
10853,
29889,
4397,
29898,
798,
29918,
11030,
29961,
1054,
3816,
1272,
29918,
1853,
3816,
29900,
29962,
3366,
726,
3108,
3366,
3051,
20068,
13,
18884,
5174,
29901,
13,
462,
1678,
1948,
29918,
10853,
29889,
4397,
703,
3782,
29918,
1272,
1159,
13,
13,
9651,
3191,
11856,
292,
363,
848,
297,
2702,
14354,
363,
4266,
848,
4072,
313,
29906,
29897,
13,
9651,
25342,
848,
29918,
1853,
297,
6796,
689,
2497,
3108,
29901,
13,
13,
18884,
1018,
29901,
13,
13,
462,
1678,
3191,
2401,
5890,
5855,
2729,
373,
278,
1134,
310,
7063,
1121,
13,
13,
462,
1678,
565,
1948,
29918,
11030,
29961,
1054,
3816,
1272,
29918,
1853,
29962,
3366,
1853,
3108,
1275,
376,
1807,
1115,
13,
462,
4706,
1948,
29918,
10853,
29889,
4397,
29898,
798,
29918,
11030,
29961,
1054,
3816,
1272,
29918,
1853,
29962,
3366,
1807,
20068,
13,
13,
462,
1678,
25342,
1948,
29918,
11030,
29961,
1054,
3816,
1272,
29918,
1853,
29962,
3366,
1853,
3108,
1275,
376,
4537,
1115,
13,
462,
4706,
1948,
29918,
10853,
29889,
4397,
29898,
798,
29918,
11030,
29961,
1054,
3816,
1272,
29918,
1853,
29962,
3366,
4537,
20068,
13,
13,
18884,
5174,
29901,
13,
462,
1678,
1948,
29918,
10853,
29889,
4397,
703,
3782,
29918,
1272,
1159,
13,
13,
9651,
3191,
4593,
8792,
304,
1284,
848,
13,
9651,
1683,
29901,
13,
18884,
1948,
29918,
10853,
29889,
4397,
29898,
798,
29918,
11030,
29961,
1054,
3816,
2585,
29918,
11010,
29961,
1054,
29962,
3366,
1272,
29918,
1853,
3108,
2314,
13,
13,
13,
4706,
444,
317,
5555,
278,
1948,
8118,
22229,
13,
4706,
4489,
29918,
8977,
29961,
798,
29918,
978,
29962,
353,
1948,
29918,
10853,
13,
13,
13,
1678,
736,
4489,
29918,
8977,
13,
13,
13,
13,
2277,
4250,
2408,
292,
263,
12205,
515,
263,
17837,
2566,
13,
1753,
17837,
29918,
3126,
29918,
517,
29918,
2176,
29898,
2585,
29918,
3126,
29892,
8018,
29918,
11330,
1125,
13,
1678,
9995,
13,
1678,
4250,
2408,
292,
263,
12205,
515,
263,
17837,
2566,
13,
13,
1678,
584,
3207,
4833,
29918,
3126,
313,
3126,
1125,
4390,
1203,
7625,
491,
5432,
17837,
29915,
29879,
7882,
13,
1678,
584,
3207,
8018,
29918,
11330,
313,
1761,
1125,
1051,
310,
1347,
411,
278,
2983,
310,
278,
8018,
4426,
13,
1678,
584,
2457,
4489,
29918,
29876,
313,
1272,
2557,
1125,
9819,
12205,
2181,
630,
2729,
373,
278,
7254,
2158,
5759,
13,
1678,
9995,
13,
13,
13,
1678,
444,
4593,
4128,
4312,
304,
2048,
278,
12205,
13,
13,
1678,
3191,
5470,
10938,
13,
1678,
4833,
29918,
11010,
353,
1653,
29918,
1333,
291,
29918,
2585,
29918,
11010,
29898,
2585,
29918,
3126,
29892,
8018,
29918,
11330,
29897,
13,
13,
1678,
3191,
9079,
393,
674,
367,
1304,
408,
278,
12205,
29915,
29879,
2380,
13,
1678,
2380,
29918,
7728,
353,
518,
7728,
363,
3107,
297,
4833,
29918,
11010,
565,
4833,
29918,
11010,
29961,
7728,
29962,
3366,
1272,
29918,
1853,
3108,
1275,
376,
3257,
3108,
29961,
29900,
29962,
13,
13,
13,
1678,
444,
17166,
263,
278,
7254,
2158,
8600,
363,
278,
12205,
313,
12236,
29922,
2248,
29897,
13,
1678,
4489,
29918,
8977,
353,
17837,
29918,
2585,
29918,
9539,
2158,
29918,
2176,
29898,
2585,
29918,
3126,
29892,
4833,
29918,
11010,
29892,
2380,
29918,
7728,
29897,
13,
13,
13,
1678,
444,
26221,
12205,
411,
278,
9819,
7254,
2158,
8600,
13,
13,
1678,
3191,
6781,
1218,
12205,
13,
1678,
4489,
29918,
29876,
353,
10518,
29889,
17271,
29889,
3166,
29918,
8977,
29898,
2176,
29918,
8977,
29892,
7769,
543,
2248,
1159,
13,
13,
1678,
3191,
512,
643,
1259,
278,
1591,
29915,
29879,
2380,
408,
263,
1897,
472,
278,
1095,
310,
278,
4489,
13,
1678,
4489,
29918,
29876,
29889,
7851,
29898,
13,
4706,
4489,
29918,
29876,
29889,
12181,
29961,
29896,
1402,
13,
4706,
2380,
29918,
7728,
29892,
13,
4706,
4489,
29918,
29876,
29889,
2248,
13,
1678,
1723,
13,
13,
1678,
3191,
2538,
300,
1259,
2380,
13,
1678,
4489,
29918,
29876,
29889,
12071,
29918,
2248,
29898,
262,
6689,
29922,
5574,
29892,
5768,
29922,
5574,
29897,
13,
13,
1678,
3191,
2087,
5143,
292,
1897,
2983,
13,
1678,
4489,
29918,
29876,
29889,
13099,
353,
518,
1054,
29918,
29876,
363,
784,
29918,
29876,
297,
4833,
29918,
11010,
29962,
13,
13,
13,
1678,
736,
4489,
29918,
29876,
13,
13,
13,
13,
2277,
4250,
2408,
292,
263,
2216,
291,
2566,
408,
12205,
411,
278,
4629,
4341,
13,
1753,
17837,
29918,
2585,
29918,
517,
29918,
2176,
29898,
2585,
29918,
333,
29892,
8018,
29918,
11330,
1125,
13,
1678,
9995,
13,
1678,
4250,
2408,
292,
263,
2216,
291,
2566,
408,
12205,
411,
278,
4629,
4341,
13,
13,
1678,
584,
3207,
4833,
29918,
333,
313,
1807,
1125,
5412,
1178,
304,
12439,
278,
17837,
2566,
13,
1678,
584,
3207,
8018,
29918,
11330,
313,
1761,
1125,
1051,
310,
1347,
411,
278,
2983,
310,
278,
8018,
4426,
13,
1678,
584,
2457,
4489,
29918,
29876,
313,
1272,
2557,
1125,
9819,
12205,
2181,
630,
2729,
373,
278,
7254,
2158,
5759,
13,
1678,
9995,
13,
13,
13,
1678,
444,
8251,
292,
263,
2216,
291,
2566,
408,
263,
4390,
3025,
2216,
291,
29915,
29879,
3450,
13,
1678,
4833,
29918,
3126,
353,
679,
29918,
1333,
291,
29918,
2585,
29918,
3126,
29898,
2585,
29918,
333,
29897,
13,
13,
1678,
444,
4250,
2408,
292,
263,
12205,
515,
263,
17837,
2566,
13,
1678,
4489,
29918,
29876,
353,
17837,
29918,
3126,
29918,
517,
29918,
2176,
29898,
2585,
29918,
3126,
29892,
8018,
29918,
11330,
29897,
13,
13,
13,
1678,
736,
4489,
29918,
29876,
13,
13,
13,
13,
13,
13,
29908,
2683,
2683,
2683,
2683,
2683,
2683,
2683,
807,
13869,
13,
29908,
2683,
2683,
2683,
2683,
2683,
2683,
2683,
807,
13869,
13,
2277,
11056,
8079,
24080,
444,
13,
29908,
2683,
2683,
2683,
2683,
2683,
2683,
2683,
807,
13869,
13,
29908,
2683,
2683,
2683,
2683,
2683,
2683,
2683,
807,
13869,
2
] |
pact/test/test_constants.py | dwang7/pact-python | 0 | 15125 | from unittest import TestCase
from mock import patch
from .. import constants
class mock_service_exeTestCase(TestCase):
def setUp(self):
super(mock_service_exeTestCase, self).setUp()
self.addCleanup(patch.stopall)
self.mock_os = patch.object(constants, 'os', autospec=True).start()
def test_other(self):
self.mock_os.name = 'posix'
self.assertEqual(constants.mock_service_exe(), 'pact-mock-service')
def test_windows(self):
self.mock_os.name = 'nt'
self.assertEqual(constants.mock_service_exe(), 'pact-mock-service.bat')
class provider_verifier_exeTestCase(TestCase):
def setUp(self):
super(provider_verifier_exeTestCase, self).setUp()
self.addCleanup(patch.stopall)
self.mock_os = patch.object(constants, 'os', autospec=True).start()
def test_other(self):
self.mock_os.name = 'posix'
self.assertEqual(
constants.provider_verifier_exe(), 'pact-provider-verifier')
def test_windows(self):
self.mock_os.name = 'nt'
self.assertEqual(
constants.provider_verifier_exe(), 'pact-provider-verifier.bat')
| [
1,
515,
443,
27958,
1053,
4321,
8259,
13,
13,
3166,
11187,
1053,
13261,
13,
13,
3166,
6317,
1053,
17727,
13,
13,
13,
1990,
11187,
29918,
5509,
29918,
8097,
3057,
8259,
29898,
3057,
8259,
1125,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
2428,
29898,
17640,
29918,
5509,
29918,
8097,
3057,
8259,
29892,
1583,
467,
842,
3373,
580,
13,
4706,
1583,
29889,
1202,
29907,
14044,
786,
29898,
5041,
29889,
9847,
497,
29897,
13,
4706,
1583,
29889,
17640,
29918,
359,
353,
13261,
29889,
3318,
29898,
3075,
1934,
29892,
525,
359,
742,
1120,
359,
3135,
29922,
5574,
467,
2962,
580,
13,
13,
1678,
822,
1243,
29918,
1228,
29898,
1311,
1125,
13,
4706,
1583,
29889,
17640,
29918,
359,
29889,
978,
353,
525,
1066,
861,
29915,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3075,
1934,
29889,
17640,
29918,
5509,
29918,
8097,
3285,
525,
29886,
627,
29899,
17640,
29899,
5509,
1495,
13,
13,
1678,
822,
1243,
29918,
10499,
29898,
1311,
1125,
13,
4706,
1583,
29889,
17640,
29918,
359,
29889,
978,
353,
525,
593,
29915,
13,
4706,
1583,
29889,
9294,
9843,
29898,
3075,
1934,
29889,
17640,
29918,
5509,
29918,
8097,
3285,
525,
29886,
627,
29899,
17640,
29899,
5509,
29889,
10222,
1495,
13,
13,
13,
1990,
13113,
29918,
369,
3709,
29918,
8097,
3057,
8259,
29898,
3057,
8259,
1125,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
2428,
29898,
18121,
29918,
369,
3709,
29918,
8097,
3057,
8259,
29892,
1583,
467,
842,
3373,
580,
13,
4706,
1583,
29889,
1202,
29907,
14044,
786,
29898,
5041,
29889,
9847,
497,
29897,
13,
4706,
1583,
29889,
17640,
29918,
359,
353,
13261,
29889,
3318,
29898,
3075,
1934,
29892,
525,
359,
742,
1120,
359,
3135,
29922,
5574,
467,
2962,
580,
13,
13,
1678,
822,
1243,
29918,
1228,
29898,
1311,
1125,
13,
4706,
1583,
29889,
17640,
29918,
359,
29889,
978,
353,
525,
1066,
861,
29915,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
17727,
29889,
18121,
29918,
369,
3709,
29918,
8097,
3285,
525,
29886,
627,
29899,
18121,
29899,
369,
3709,
1495,
13,
13,
1678,
822,
1243,
29918,
10499,
29898,
1311,
1125,
13,
4706,
1583,
29889,
17640,
29918,
359,
29889,
978,
353,
525,
593,
29915,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
17727,
29889,
18121,
29918,
369,
3709,
29918,
8097,
3285,
525,
29886,
627,
29899,
18121,
29899,
369,
3709,
29889,
10222,
1495,
13,
2
] |
smart_meter/apps.py | GPXenergy/gpx_server_api | 0 | 35750 | <reponame>GPXenergy/gpx_server_api<filename>smart_meter/apps.py
from django.apps import AppConfig
class SmartMeterConfig(AppConfig):
name = 'smart_meter'
| [
1,
529,
276,
1112,
420,
29958,
19903,
29990,
27548,
29914,
29887,
1756,
29918,
2974,
29918,
2754,
29966,
9507,
29958,
3844,
442,
29918,
29391,
29914,
13371,
29889,
2272,
13,
3166,
9557,
29889,
13371,
1053,
2401,
3991,
13,
13,
13,
1990,
4116,
442,
29924,
1308,
3991,
29898,
2052,
3991,
1125,
13,
1678,
1024,
353,
525,
3844,
442,
29918,
29391,
29915,
13,
2
] |
cctbx/dmtbx/boost_python/tst_dmtbx.py | dperl-sol/cctbx_project | 155 | 135036 | <filename>cctbx/dmtbx/boost_python/tst_dmtbx.py<gh_stars>100-1000
from __future__ import absolute_import, division, print_function
from cctbx import dmtbx
from cctbx import sgtbx
from cctbx.array_family import flex
from libtbx.test_utils import approx_equal
def exercise_triplet_generator():
sg = sgtbx.space_group_info("P 41").group()
i = flex.miller_index(((1,2,3),(2,3,4)))
a = flex.double((1,2))
t = dmtbx.ext.triplet_generator(sg, i, None, 0, False, False)
assert t.t_den() == sg.t_den()
assert t.max_relations_per_reflection() == 0
assert t.sigma_2_only() == False
assert t.discard_weights() == False
t = dmtbx.ext.triplet_generator(sg, i, a, 3, True, False)
assert t.max_relations_per_reflection() == 3
assert t.sigma_2_only() == True
assert t.discard_weights() == False
t = dmtbx.ext.triplet_generator(sg, i, None, 0, False, True)
assert t.sigma_2_only() == False
assert t.discard_weights() == True
assert tuple(t.n_relations()) == (0,0)
assert t.relations_for(0) == ()
assert approx_equal(tuple(t.sums_of_amplitude_products(a)), (0,0))
s = flex.bool()
r = t.raw_apply_tangent_formula(a, a, s, False, False, 1.e-15)
assert approx_equal(tuple(r), (1,2))
i = flex.miller_index(((4,6,0),(5,2,5),(6,1,5)))
a = flex.double((1,2,3))
t = dmtbx.ext.triplet_generator(sg, i, None, 0, False, False)
assert tuple(t.n_relations()) == (4,2,2)
assert [r.format(i, 0) for r in t.relations_for(0)] \
== ["(4,6,0) (5,2,5) %s (6,1,5) %s 3 2" % (True, False),
"(4,6,0) (5,2,5) %s (6,1,5) %s 9 2" % (False, True)]
assert [r.format(i, 1) for r in t.relations_for(1)] \
== ["(5,2,5) (4,6,0) %s (6,1,5) %s 3 2" % (False, False)]
assert [r.format(i, 2) for r in t.relations_for(2)] \
== ["(6,1,5) (4,6,0) %s (5,2,5) %s 9 2" % (False, False)]
assert approx_equal(tuple(t.sums_of_amplitude_products(a)), (24,6,4))
t = dmtbx.ext.triplet_generator(sg, i, None, 0, False, True)
assert tuple(t.n_relations()) == (1,1,1)
assert [r.format(i, 0) for r in t.relations_for(0)] \
== ["(4,6,0) (5,2,5) %s (6,1,5) %s 3 1" % (True, False)]
assert approx_equal(tuple(t.sums_of_amplitude_products(a)), (6,3,2))
t = dmtbx.ext.triplet_generator(sg, i, None, 0, False, False)
r0 = t.relations_for(0)
r1 = t.relations_for(1)
assert r0[0].is_sigma_2(0)
assert r0[0].is_similar_to(r0[1])
assert not r0[0].is_similar_to(r1[0])
i = flex.miller_index(((4,6,0),(5,1,2)))
t = dmtbx.ext.triplet_generator(sg, i, None, 0, False, False)
assert [r.format(i, 0) for r in t.relations_for(0)] \
== ["(4,6,0) (5,1,2) %s (5,1,2) %s 6 4" % (False, True)]
assert [r.format(i, 1) for r in t.relations_for(1)] \
== ["(5,1,2) (4,6,0) %s (5,1,2) %s 6 4" % (False, False)]
assert not t.relations_for(0)[0].is_sigma_2(0)
t = dmtbx.ext.triplet_generator(sg, i, None, 0, False, True)
assert [r.format(i, 0) for r in t.relations_for(0)] \
== ["(4,6,0) (5,1,2) %s (5,1,2) %s 6 1" % (False, True)]
assert [r.format(i, 1) for r in t.relations_for(1)] \
== ["(5,1,2) (4,6,0) %s (5,1,2) %s 6 1" % (False, False)]
t = dmtbx.ext.triplet_generator(sg, i, None, 0, True, False)
assert tuple(t.n_relations()) == (0,0)
def run():
exercise_triplet_generator()
print("OK")
if (__name__ == "__main__"):
run()
| [
1,
529,
9507,
29958,
29883,
312,
29890,
29916,
29914,
29881,
4378,
29890,
29916,
29914,
17079,
29918,
4691,
29914,
29873,
303,
29918,
29881,
4378,
29890,
29916,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29899,
29896,
29900,
29900,
29900,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
8542,
29892,
1596,
29918,
2220,
13,
3166,
274,
312,
29890,
29916,
1053,
270,
4378,
29890,
29916,
13,
3166,
274,
312,
29890,
29916,
1053,
269,
4141,
29890,
29916,
13,
3166,
274,
312,
29890,
29916,
29889,
2378,
29918,
11922,
1053,
8525,
13,
3166,
619,
3116,
29890,
29916,
29889,
1688,
29918,
13239,
1053,
2134,
29916,
29918,
11745,
13,
13,
1753,
15058,
29918,
3626,
552,
29873,
29918,
27959,
7295,
13,
29871,
269,
29887,
353,
269,
4141,
29890,
29916,
29889,
3493,
29918,
2972,
29918,
3888,
703,
29925,
29871,
29946,
29896,
2564,
2972,
580,
13,
29871,
474,
353,
8525,
29889,
29885,
5495,
29918,
2248,
3552,
29898,
29896,
29892,
29906,
29892,
29941,
21336,
29906,
29892,
29941,
29892,
29946,
4961,
13,
29871,
263,
353,
8525,
29889,
8896,
3552,
29896,
29892,
29906,
876,
13,
29871,
260,
353,
270,
4378,
29890,
29916,
29889,
1062,
29889,
3626,
552,
29873,
29918,
27959,
29898,
5311,
29892,
474,
29892,
6213,
29892,
29871,
29900,
29892,
7700,
29892,
7700,
29897,
13,
29871,
4974,
260,
29889,
29873,
29918,
1145,
580,
1275,
269,
29887,
29889,
29873,
29918,
1145,
580,
13,
29871,
4974,
260,
29889,
3317,
29918,
2674,
800,
29918,
546,
29918,
999,
1464,
580,
1275,
29871,
29900,
13,
29871,
4974,
260,
29889,
3754,
29918,
29906,
29918,
6194,
580,
1275,
7700,
13,
29871,
4974,
260,
29889,
2218,
7543,
29918,
705,
5861,
580,
1275,
7700,
13,
29871,
260,
353,
270,
4378,
29890,
29916,
29889,
1062,
29889,
3626,
552,
29873,
29918,
27959,
29898,
5311,
29892,
474,
29892,
263,
29892,
29871,
29941,
29892,
5852,
29892,
7700,
29897,
13,
29871,
4974,
260,
29889,
3317,
29918,
2674,
800,
29918,
546,
29918,
999,
1464,
580,
1275,
29871,
29941,
13,
29871,
4974,
260,
29889,
3754,
29918,
29906,
29918,
6194,
580,
1275,
5852,
13,
29871,
4974,
260,
29889,
2218,
7543,
29918,
705,
5861,
580,
1275,
7700,
13,
29871,
260,
353,
270,
4378,
29890,
29916,
29889,
1062,
29889,
3626,
552,
29873,
29918,
27959,
29898,
5311,
29892,
474,
29892,
6213,
29892,
29871,
29900,
29892,
7700,
29892,
5852,
29897,
13,
29871,
4974,
260,
29889,
3754,
29918,
29906,
29918,
6194,
580,
1275,
7700,
13,
29871,
4974,
260,
29889,
2218,
7543,
29918,
705,
5861,
580,
1275,
5852,
13,
29871,
4974,
18761,
29898,
29873,
29889,
29876,
29918,
2674,
800,
3101,
1275,
313,
29900,
29892,
29900,
29897,
13,
29871,
4974,
260,
29889,
2674,
800,
29918,
1454,
29898,
29900,
29897,
1275,
3861,
13,
29871,
4974,
2134,
29916,
29918,
11745,
29898,
23583,
29898,
29873,
29889,
2083,
29879,
29918,
974,
29918,
314,
2830,
1151,
29918,
14456,
29898,
29874,
8243,
313,
29900,
29892,
29900,
876,
13,
29871,
269,
353,
8525,
29889,
11227,
580,
13,
29871,
364,
353,
260,
29889,
1610,
29918,
7302,
29918,
29873,
574,
296,
29918,
689,
2497,
29898,
29874,
29892,
263,
29892,
269,
29892,
7700,
29892,
7700,
29892,
29871,
29896,
29889,
29872,
29899,
29896,
29945,
29897,
13,
29871,
4974,
2134,
29916,
29918,
11745,
29898,
23583,
29898,
29878,
511,
313,
29896,
29892,
29906,
876,
13,
29871,
474,
353,
8525,
29889,
29885,
5495,
29918,
2248,
3552,
29898,
29946,
29892,
29953,
29892,
29900,
21336,
29945,
29892,
29906,
29892,
29945,
21336,
29953,
29892,
29896,
29892,
29945,
4961,
13,
29871,
263,
353,
8525,
29889,
8896,
3552,
29896,
29892,
29906,
29892,
29941,
876,
13,
29871,
260,
353,
270,
4378,
29890,
29916,
29889,
1062,
29889,
3626,
552,
29873,
29918,
27959,
29898,
5311,
29892,
474,
29892,
6213,
29892,
29871,
29900,
29892,
7700,
29892,
7700,
29897,
13,
29871,
4974,
18761,
29898,
29873,
29889,
29876,
29918,
2674,
800,
3101,
1275,
313,
29946,
29892,
29906,
29892,
29906,
29897,
13,
29871,
4974,
518,
29878,
29889,
4830,
29898,
29875,
29892,
29871,
29900,
29897,
363,
364,
297,
260,
29889,
2674,
800,
29918,
1454,
29898,
29900,
4638,
320,
13,
418,
1275,
6796,
29898,
29946,
29892,
29953,
29892,
29900,
29897,
313,
29945,
29892,
29906,
29892,
29945,
29897,
1273,
29879,
313,
29953,
29892,
29896,
29892,
29945,
29897,
1273,
29879,
29871,
29941,
29871,
29906,
29908,
1273,
313,
5574,
29892,
7700,
511,
13,
3986,
18227,
29946,
29892,
29953,
29892,
29900,
29897,
313,
29945,
29892,
29906,
29892,
29945,
29897,
1273,
29879,
313,
29953,
29892,
29896,
29892,
29945,
29897,
1273,
29879,
29871,
29929,
29871,
29906,
29908,
1273,
313,
8824,
29892,
5852,
4638,
13,
29871,
4974,
518,
29878,
29889,
4830,
29898,
29875,
29892,
29871,
29896,
29897,
363,
364,
297,
260,
29889,
2674,
800,
29918,
1454,
29898,
29896,
4638,
320,
13,
418,
1275,
6796,
29898,
29945,
29892,
29906,
29892,
29945,
29897,
313,
29946,
29892,
29953,
29892,
29900,
29897,
1273,
29879,
313,
29953,
29892,
29896,
29892,
29945,
29897,
1273,
29879,
29871,
29941,
29871,
29906,
29908,
1273,
313,
8824,
29892,
7700,
4638,
13,
29871,
4974,
518,
29878,
29889,
4830,
29898,
29875,
29892,
29871,
29906,
29897,
363,
364,
297,
260,
29889,
2674,
800,
29918,
1454,
29898,
29906,
4638,
320,
13,
418,
1275,
6796,
29898,
29953,
29892,
29896,
29892,
29945,
29897,
313,
29946,
29892,
29953,
29892,
29900,
29897,
1273,
29879,
313,
29945,
29892,
29906,
29892,
29945,
29897,
1273,
29879,
29871,
29929,
29871,
29906,
29908,
1273,
313,
8824,
29892,
7700,
4638,
13,
29871,
4974,
2134,
29916,
29918,
11745,
29898,
23583,
29898,
29873,
29889,
2083,
29879,
29918,
974,
29918,
314,
2830,
1151,
29918,
14456,
29898,
29874,
8243,
313,
29906,
29946,
29892,
29953,
29892,
29946,
876,
13,
29871,
260,
353,
270,
4378,
29890,
29916,
29889,
1062,
29889,
3626,
552,
29873,
29918,
27959,
29898,
5311,
29892,
474,
29892,
6213,
29892,
29871,
29900,
29892,
7700,
29892,
5852,
29897,
13,
29871,
4974,
18761,
29898,
29873,
29889,
29876,
29918,
2674,
800,
3101,
1275,
313,
29896,
29892,
29896,
29892,
29896,
29897,
13,
29871,
4974,
518,
29878,
29889,
4830,
29898,
29875,
29892,
29871,
29900,
29897,
363,
364,
297,
260,
29889,
2674,
800,
29918,
1454,
29898,
29900,
4638,
320,
13,
418,
1275,
6796,
29898,
29946,
29892,
29953,
29892,
29900,
29897,
313,
29945,
29892,
29906,
29892,
29945,
29897,
1273,
29879,
313,
29953,
29892,
29896,
29892,
29945,
29897,
1273,
29879,
29871,
29941,
29871,
29896,
29908,
1273,
313,
5574,
29892,
7700,
4638,
13,
29871,
4974,
2134,
29916,
29918,
11745,
29898,
23583,
29898,
29873,
29889,
2083,
29879,
29918,
974,
29918,
314,
2830,
1151,
29918,
14456,
29898,
29874,
8243,
313,
29953,
29892,
29941,
29892,
29906,
876,
13,
29871,
260,
353,
270,
4378,
29890,
29916,
29889,
1062,
29889,
3626,
552,
29873,
29918,
27959,
29898,
5311,
29892,
474,
29892,
6213,
29892,
29871,
29900,
29892,
7700,
29892,
7700,
29897,
13,
29871,
364,
29900,
353,
260,
29889,
2674,
800,
29918,
1454,
29898,
29900,
29897,
13,
29871,
364,
29896,
353,
260,
29889,
2674,
800,
29918,
1454,
29898,
29896,
29897,
13,
29871,
4974,
364,
29900,
29961,
29900,
1822,
275,
29918,
3754,
29918,
29906,
29898,
29900,
29897,
13,
29871,
4974,
364,
29900,
29961,
29900,
1822,
275,
29918,
29764,
29918,
517,
29898,
29878,
29900,
29961,
29896,
2314,
13,
29871,
4974,
451,
364,
29900,
29961,
29900,
1822,
275,
29918,
29764,
29918,
517,
29898,
29878,
29896,
29961,
29900,
2314,
13,
29871,
474,
353,
8525,
29889,
29885,
5495,
29918,
2248,
3552,
29898,
29946,
29892,
29953,
29892,
29900,
21336,
29945,
29892,
29896,
29892,
29906,
4961,
13,
29871,
260,
353,
270,
4378,
29890,
29916,
29889,
1062,
29889,
3626,
552,
29873,
29918,
27959,
29898,
5311,
29892,
474,
29892,
6213,
29892,
29871,
29900,
29892,
7700,
29892,
7700,
29897,
13,
29871,
4974,
518,
29878,
29889,
4830,
29898,
29875,
29892,
29871,
29900,
29897,
363,
364,
297,
260,
29889,
2674,
800,
29918,
1454,
29898,
29900,
4638,
320,
13,
418,
1275,
6796,
29898,
29946,
29892,
29953,
29892,
29900,
29897,
313,
29945,
29892,
29896,
29892,
29906,
29897,
1273,
29879,
313,
29945,
29892,
29896,
29892,
29906,
29897,
1273,
29879,
29871,
29953,
29871,
29946,
29908,
1273,
313,
8824,
29892,
5852,
4638,
13,
29871,
4974,
518,
29878,
29889,
4830,
29898,
29875,
29892,
29871,
29896,
29897,
363,
364,
297,
260,
29889,
2674,
800,
29918,
1454,
29898,
29896,
4638,
320,
13,
418,
1275,
6796,
29898,
29945,
29892,
29896,
29892,
29906,
29897,
313,
29946,
29892,
29953,
29892,
29900,
29897,
1273,
29879,
313,
29945,
29892,
29896,
29892,
29906,
29897,
1273,
29879,
29871,
29953,
29871,
29946,
29908,
1273,
313,
8824,
29892,
7700,
4638,
13,
29871,
4974,
451,
260,
29889,
2674,
800,
29918,
1454,
29898,
29900,
9601,
29900,
1822,
275,
29918,
3754,
29918,
29906,
29898,
29900,
29897,
13,
29871,
260,
353,
270,
4378,
29890,
29916,
29889,
1062,
29889,
3626,
552,
29873,
29918,
27959,
29898,
5311,
29892,
474,
29892,
6213,
29892,
29871,
29900,
29892,
7700,
29892,
5852,
29897,
13,
29871,
4974,
518,
29878,
29889,
4830,
29898,
29875,
29892,
29871,
29900,
29897,
363,
364,
297,
260,
29889,
2674,
800,
29918,
1454,
29898,
29900,
4638,
320,
13,
418,
1275,
6796,
29898,
29946,
29892,
29953,
29892,
29900,
29897,
313,
29945,
29892,
29896,
29892,
29906,
29897,
1273,
29879,
313,
29945,
29892,
29896,
29892,
29906,
29897,
1273,
29879,
29871,
29953,
29871,
29896,
29908,
1273,
313,
8824,
29892,
5852,
4638,
13,
29871,
4974,
518,
29878,
29889,
4830,
29898,
29875,
29892,
29871,
29896,
29897,
363,
364,
297,
260,
29889,
2674,
800,
29918,
1454,
29898,
29896,
4638,
320,
13,
418,
1275,
6796,
29898,
29945,
29892,
29896,
29892,
29906,
29897,
313,
29946,
29892,
29953,
29892,
29900,
29897,
1273,
29879,
313,
29945,
29892,
29896,
29892,
29906,
29897,
1273,
29879,
29871,
29953,
29871,
29896,
29908,
1273,
313,
8824,
29892,
7700,
4638,
13,
29871,
260,
353,
270,
4378,
29890,
29916,
29889,
1062,
29889,
3626,
552,
29873,
29918,
27959,
29898,
5311,
29892,
474,
29892,
6213,
29892,
29871,
29900,
29892,
5852,
29892,
7700,
29897,
13,
29871,
4974,
18761,
29898,
29873,
29889,
29876,
29918,
2674,
800,
3101,
1275,
313,
29900,
29892,
29900,
29897,
13,
13,
1753,
1065,
7295,
13,
29871,
15058,
29918,
3626,
552,
29873,
29918,
27959,
580,
13,
29871,
1596,
703,
8949,
1159,
13,
13,
361,
313,
1649,
978,
1649,
1275,
376,
1649,
3396,
1649,
29908,
1125,
13,
29871,
1065,
580,
13,
2
] |
shadowsocks/util.py | lyrl/ssmgr-ssrest | 0 | 109580 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Created on 2016-07-26 11:04:34
import socket
import urllib2
import json
import requests
import logging
def is_port_using(port):
'''
https://docs.python.org/2/library/socket.html#example
'''
while True:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s.bind(('', port)) ## Try to open port
except socket.error as e:
if e.errno is 98: ## Errorno 98 means address already bound
return True
else:
print e
s.close()
return False
def send_post(url, data):
"""
HTTP POST Util
Args:
url (str): resource url eg: http://xxxx.com/api/users
data (dict): post body
Returns:
str: response content
"""
logging.debug("send data %s to url %s !" % (json.dumps(data), url))
headers = {'content-type': 'application/json'}
try:
response = requests.post(url, data=json.dumps(data), headers=headers)
except requests.exceptions.ConnectionError as e:
logging.error(e.message)
raise HttpUtilException("Failed to establish a new connection!")
logging.debug("return code: %s content: %s" % (response.status_code, response.content))
return response.content
class UtilException(Exception):
def __init__(self, msg):
self.message = msg
def __str__(self):
return self.message
class HttpUtilException(UtilException):
def __init__(self, msg):
self.message = msg
def __str__(self):
return self.message
if __name__ == '__main__':
# port = 1080
# b = is_port_using(port)
# print("Is port {0} open {1}".format(port,b))
logging.basicConfig(level=5,
format='%(asctime)s [%(module)-16s] %(levelname)-8s %(message)s',
datefmt='%Y-%m-%d %H:%M:%S')
send_post('http://baidu21231.com', {"test": "test"}) | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
8025,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
6760,
630,
373,
29871,
29906,
29900,
29896,
29953,
29899,
29900,
29955,
29899,
29906,
29953,
29871,
29896,
29896,
29901,
29900,
29946,
29901,
29941,
29946,
13,
13,
5215,
9909,
13,
5215,
3142,
1982,
29906,
13,
5215,
4390,
13,
5215,
7274,
13,
5215,
12183,
13,
13,
1753,
338,
29918,
637,
29918,
4746,
29898,
637,
1125,
13,
1678,
14550,
13,
1678,
2045,
597,
2640,
29889,
4691,
29889,
990,
29914,
29906,
29914,
5258,
29914,
11514,
29889,
1420,
29937,
4773,
13,
1678,
14550,
13,
1678,
1550,
5852,
29901,
13,
4706,
269,
353,
9909,
29889,
11514,
29898,
11514,
29889,
5098,
29918,
1177,
2544,
29892,
9909,
29889,
6156,
7077,
29918,
1254,
1525,
5194,
29897,
13,
4706,
1018,
29901,
13,
9651,
269,
29889,
5355,
29898,
877,
742,
2011,
876,
444,
3967,
304,
1722,
2011,
13,
4706,
5174,
9909,
29889,
2704,
408,
321,
29901,
13,
9651,
565,
321,
29889,
3127,
1217,
338,
29871,
29929,
29947,
29901,
444,
4829,
1217,
29871,
29929,
29947,
2794,
3211,
2307,
3216,
13,
18884,
736,
5852,
13,
9651,
1683,
29901,
13,
18884,
1596,
321,
13,
4706,
269,
29889,
5358,
580,
13,
4706,
736,
7700,
13,
13,
13,
1753,
3638,
29918,
2490,
29898,
2271,
29892,
848,
1125,
13,
1678,
9995,
13,
1678,
7331,
11971,
22310,
13,
1678,
826,
3174,
29901,
13,
4706,
3142,
313,
710,
1125,
6503,
3142,
8087,
29901,
1732,
597,
14633,
29889,
510,
29914,
2754,
29914,
7193,
13,
4706,
848,
313,
8977,
1125,
1400,
3573,
13,
1678,
16969,
29901,
13,
4706,
851,
29901,
2933,
2793,
13,
1678,
9995,
13,
1678,
12183,
29889,
8382,
703,
6717,
848,
1273,
29879,
304,
3142,
1273,
29879,
1738,
29908,
1273,
313,
3126,
29889,
29881,
17204,
29898,
1272,
511,
3142,
876,
13,
13,
1678,
9066,
353,
11117,
3051,
29899,
1853,
2396,
525,
6214,
29914,
3126,
10827,
13,
1678,
1018,
29901,
13,
4706,
2933,
353,
7274,
29889,
2490,
29898,
2271,
29892,
848,
29922,
3126,
29889,
29881,
17204,
29898,
1272,
511,
9066,
29922,
13662,
29897,
13,
1678,
5174,
7274,
29889,
11739,
29879,
29889,
5350,
2392,
408,
321,
29901,
13,
4706,
12183,
29889,
2704,
29898,
29872,
29889,
4906,
29897,
13,
4706,
12020,
9056,
7270,
2451,
703,
17776,
304,
10127,
263,
716,
3957,
29991,
1159,
13,
13,
1678,
12183,
29889,
8382,
703,
2457,
775,
29901,
1273,
29879,
2793,
29901,
1273,
29879,
29908,
1273,
313,
5327,
29889,
4882,
29918,
401,
29892,
2933,
29889,
3051,
876,
13,
1678,
736,
2933,
29889,
3051,
13,
13,
13,
1990,
22310,
2451,
29898,
2451,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
10191,
1125,
13,
4706,
1583,
29889,
4906,
353,
10191,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
4906,
13,
13,
13,
1990,
9056,
7270,
2451,
29898,
7270,
2451,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
10191,
1125,
13,
4706,
1583,
29889,
4906,
353,
10191,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
4906,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
396,
2011,
353,
29871,
29896,
29900,
29947,
29900,
13,
1678,
396,
289,
353,
338,
29918,
637,
29918,
4746,
29898,
637,
29897,
13,
1678,
396,
1596,
703,
3624,
2011,
426,
29900,
29913,
1722,
426,
29896,
29913,
1642,
4830,
29898,
637,
29892,
29890,
876,
13,
13,
1678,
12183,
29889,
16121,
3991,
29898,
5563,
29922,
29945,
29892,
13,
462,
4706,
3402,
2433,
29995,
29898,
294,
312,
603,
29897,
29879,
518,
29995,
29898,
5453,
6817,
29896,
29953,
29879,
29962,
1273,
29898,
5563,
978,
6817,
29947,
29879,
1273,
29898,
4906,
29897,
29879,
742,
13,
462,
4706,
2635,
23479,
2433,
29995,
29979,
19222,
29885,
19222,
29881,
1273,
29950,
16664,
29924,
16664,
29903,
1495,
13,
13,
1678,
3638,
29918,
2490,
877,
1124,
597,
2291,
333,
29884,
29906,
29896,
29906,
29941,
29896,
29889,
510,
742,
8853,
1688,
1115,
376,
1688,
29908,
1800,
2
] |
qqbot_ipc.py | AndrewWayne/bot-flandre | 0 | 154965 | # -*- coding: utf-8 -*-
"""
Created on Wed Feb 26 16:52:29 2020
@author: eliphat
"""
import win32api
import win32con
import win32gui
import time
hwnd = win32gui.FindWindow("TXGuiFoundation", "bot/ctf交流")
print(hwnd)
def send_msg(s):
for c in s:
win32api.SendMessage(hwnd, win32con.WM_CHAR, ord(c), 0)
time.sleep(0.02)
print(s)
win32api.SendMessage(hwnd, win32con.WM_KEYDOWN, win32con.VK_RETURN, 0)
win32api.SendMessage(hwnd, win32con.WM_KEYUP, win32con.VK_RETURN, 0)
print(s)
# send_msg("强行中文")
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
20399,
373,
15050,
26319,
29871,
29906,
29953,
29871,
29896,
29953,
29901,
29945,
29906,
29901,
29906,
29929,
29871,
29906,
29900,
29906,
29900,
13,
13,
29992,
8921,
29901,
560,
29875,
561,
271,
13,
15945,
29908,
13,
5215,
5401,
29941,
29906,
2754,
13,
5215,
5401,
29941,
29906,
535,
13,
5215,
5401,
29941,
29906,
23569,
13,
5215,
931,
13,
13,
13,
26828,
299,
353,
5401,
29941,
29906,
23569,
29889,
12542,
5907,
703,
28627,
28707,
28077,
613,
376,
7451,
29914,
312,
29888,
31398,
31151,
1159,
13,
2158,
29898,
26828,
299,
29897,
13,
13,
13,
1753,
3638,
29918,
7645,
29898,
29879,
1125,
13,
1678,
363,
274,
297,
269,
29901,
13,
4706,
5401,
29941,
29906,
2754,
29889,
12600,
3728,
29898,
26828,
299,
29892,
5401,
29941,
29906,
535,
29889,
26735,
29918,
11282,
29892,
4356,
29898,
29883,
511,
29871,
29900,
29897,
13,
4706,
931,
29889,
17059,
29898,
29900,
29889,
29900,
29906,
29897,
13,
1678,
1596,
29898,
29879,
29897,
13,
1678,
5401,
29941,
29906,
2754,
29889,
12600,
3728,
29898,
26828,
299,
29892,
5401,
29941,
29906,
535,
29889,
26735,
29918,
10818,
3970,
16048,
29892,
5401,
29941,
29906,
535,
29889,
29963,
29968,
29918,
1525,
29911,
24015,
29892,
29871,
29900,
29897,
13,
1678,
5401,
29941,
29906,
2754,
29889,
12600,
3728,
29898,
26828,
299,
29892,
5401,
29941,
29906,
535,
29889,
26735,
29918,
10818,
4897,
29892,
5401,
29941,
29906,
535,
29889,
29963,
29968,
29918,
1525,
29911,
24015,
29892,
29871,
29900,
29897,
13,
1678,
1596,
29898,
29879,
29897,
13,
13,
13,
29937,
3638,
29918,
7645,
703,
232,
191,
189,
30448,
30275,
30333,
1159,
13,
2
] |
scripts/opendict_to_json.py | md84419/English-to-IPA | 0 | 1605687 | <reponame>md84419/English-to-IPA
#!/usr/bin/python
# USAGE:
# PYTHONPATH=".." python opendict_to_json.py ../eng_to_ipa/resources/Opendict_source_files/en_UK.txt > ../eng_to_ipa/resources/Open_dict.json
import getopt, json, io, os, re, sys, subprocess
from signal import signal, SIGPIPE, SIG_DFL
from eng_to_ipa import tokenize
signal(SIGPIPE, SIG_DFL)
debug = False
debug2 = False
SYMBOLS_FILE1 = "opendict.symbols.txt"
tokenize.configure( os.path.join(os.path.abspath(os.path.dirname(__file__)),
'..','eng_to_ipa','resources','Opendict_source_files',SYMBOLS_FILE1) )
def main(argv):
global debug, debug2
input_file = None
output_file = None
try:
opts, args = getopt.getopt(argv, "dDo:")
except getopt.GetoptError:
print( "{0}: syntax: [-d|-D] [-o output.json] input.txt".format( sys.argv[0]) )
sys.exit(2)
for opt, arg in opts:
if opt == '-d':
debug2 = True
if debug2: print( "debug level 1" )
elif opt == '-D':
debug = True
debug2 = True
if debug2: print( "debug level 2" )
elif opt == '-o':
output_file = arg
if debug2: print( "output_file is {0}".format( output_file ) )
try:
input_file = args[0]
except:
print( "{0}: syntax: [-d|-D] [-o output.json] input.txt".format( sys.argv[0]) )
sys.exit(2)
p_out = subprocess.check_output( ['awk', '-f', 'txt_to_json.awk', input_file] )
open_dict = json.loads( p_out )
fix_opendict_words( open_dict )
for key in open_dict:
#if debug2: print( open_dict[key][0] )
for idx in range( len( open_dict[key] ) ):
open_dict[key][idx] = fix_opendict( open_dict[key][idx] )
open_dict[key][idx] = tokenize.tokenize( open_dict[key][idx], 'ˑ', 'symbols' )
#if debug2: print( "{0} {1}".format( key, open_dict[key][0] ) )
if( output_file != None ):
try:
with open(output_file, 'wb') as o_fp:
json.dump( open_dict, o_fp, check_circular=True, indent=None, sort_keys=True, separators=[',\n', ':'], ensure_ascii=False )
sys.exit(0)
except TypeError:
pass
j = json.dumps( open_dict, check_circular=True, indent=None, sort_keys=True, separators=[',\n', ':'], ensure_ascii=False )
print( j )
sys.exit(0)
def fix_opendict(source):
destination = source
# Map phonetic to phonemic; Anglicise IPA for foreign words (croissant, denouement, frisson, etc)
destination = destination.replace("ɐ", "ʌ")
destination = destination.replace("ɡ", "g")
destination = destination.replace("ɔ̃", "ɔ")
destination = destination.replace("ɑ̃", "ɒn")
destination = destination.replace("ɹ", "r")
destination = destination.replace("ˈɛ", "ˈe")
destination = destination.replace("ˌɛ", "ˌe")
destination = destination.replace("ɛr", "eə")
destination = destination.replace("ˈɛː", "ˈeə")
destination = destination.replace("ˌɛː", "ˌeə")
destination = destination.replace("ɛː", "eə")
destination = destination.replace("ɛ", "e")
#mark the diphthongs with the non-breaking space character
destination = destination.replace("aɪ", "aɪ") # 39
destination = destination.replace("aʊ", "aʊ") # 45
destination = destination.replace("eə", "eə") # 42
destination = destination.replace("eɪ", "eɪ") # 38
destination = destination.replace("ɔɪ", "ɔɪ") # 40
destination = destination.replace("əʊ", "əʊ") # 45
destination = destination.replace("ɛə", "ɛə") # 42
destination = destination.replace("ɪə", "ɪə") # 41
destination = destination.replace("ʊə", "ʊə") # 43
# mark the affricates with the non-breaking space character
destination = destination.replace("dʒ", "dʒ")
destination = destination.replace("tʃ", "tʃ")
# mark US English diphthong /ie/ - we'll undo this again in create_en_GB_dict
destination = destination.replace("iə", "iə")
# unmark US English /əl/
destination = destination.replace("əl", "əl")
# Use the standard (quantitative-qualitative) IPA notation scheme for vowels
# See section 5 of https://www.phon.ucl.ac.uk/home/wells/ipa-english-uni.htm
destination = re.sub("ɑ(?!)", "ɑː", destination)
destination = destination.replace("ɒː", "ɒ")
destination = re.sub("i(?!)", "iː", destination)
destination = re.sub("ɔ(?!)", "ɔː", destination)
destination = re.sub("u(?!)", "uː", destination)
destination = destination.replace("ːː", "ː")
# Replace US diphthongs with UK diphthongs in UK dictionary
destination = destination.replace("ɔɪəʊ", "ɔɪəʊ")
destination = destination.replace("ɔɪəʊ", "ɔɪəʊ")
destination = destination.replace("eɪəʊ", "eɪəʊ")
destination = destination.replace("aɪəʊ", "aɪəʊ")
#Split triphthongs into diphthong followed by schwa or ʊ
#'aɪə', 'aʊə', 'eɪə', 'eəʊ', 'ɔɪə', 'ɪəʊ', 'əʊə'
destination = destination.replace("aɪə", "aɪə")
destination = destination.replace("aʊə", "aʊə")
destination = destination.replace("eɪə", "eɪə")
destination = destination.replace("eəʊ", "eəʊ")
destination = destination.replace("ɔɪə", "ɔɪə")
destination = destination.replace("ɪəʊ", "ɪəʊ")
destination = destination.replace("əʊə", "əʊə")
return destination
# fix whole words
def fix_opendict_words( dct ):
dct.update({"ablation": ["ʌblˈeɪʃən","ʌblˈeɪʃn"]})
#dct.update({"abdominal": ["æbdˈɒmənəl"]})
dct.update({"llanos": ["lænˈəʊz"]})
dct.update({"denouement": ["deɪnˈuːmɔː"]})
dct.update({"argyll": ["ˈɑːgaɪl"]})
dct.update({"croissant": ["kwæsɒŋ","kwæsɒn"]})
dct.update({"croissants": ["kwæsɒŋs","kwæsɒns"]})
dct.update({"bach": ["bˈɒx"]})
dct.update({"visually": ["vˈɪʒəˈliː"]})
dct.update({"aba":["æbˈæ"]})
dct.update({"abalone":["æbˈælə\u200dʊn"]})
if( __name__ == "__main__"):
main(sys.argv[1:])
| [
1,
529,
276,
1112,
420,
29958,
3487,
29947,
29946,
29946,
29896,
29929,
29914,
24636,
29899,
517,
29899,
5690,
29909,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
13,
13,
29937,
8278,
1692,
29901,
13,
29937,
29871,
349,
29979,
4690,
1164,
10145,
543,
636,
29908,
3017,
1015,
355,
919,
29918,
517,
29918,
3126,
29889,
2272,
29772,
996,
29918,
517,
29918,
666,
29874,
29914,
13237,
29914,
11746,
355,
919,
29918,
4993,
29918,
5325,
29914,
264,
29918,
19960,
29889,
3945,
1405,
29772,
996,
29918,
517,
29918,
666,
29874,
29914,
13237,
29914,
6585,
29918,
8977,
29889,
3126,
13,
13,
5215,
679,
3670,
29892,
4390,
29892,
12013,
29892,
2897,
29892,
337,
29892,
10876,
29892,
1014,
5014,
13,
3166,
7182,
1053,
7182,
29892,
317,
6259,
2227,
4162,
29892,
317,
6259,
29918,
4037,
29931,
13,
3166,
3033,
29918,
517,
29918,
666,
29874,
1053,
5993,
675,
13,
13,
25436,
29898,
5425,
29954,
2227,
4162,
29892,
317,
6259,
29918,
4037,
29931,
29897,
13,
13,
8382,
29871,
353,
7700,
13,
8382,
29906,
353,
7700,
13,
13,
14816,
9486,
5607,
29903,
29918,
7724,
29896,
353,
376,
459,
355,
919,
29889,
18098,
29879,
29889,
3945,
29908,
13,
13,
6979,
675,
29889,
17591,
29898,
2897,
29889,
2084,
29889,
7122,
29898,
359,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
8243,
13,
462,
308,
525,
636,
3788,
996,
29918,
517,
29918,
666,
29874,
3788,
13237,
3788,
11746,
355,
919,
29918,
4993,
29918,
5325,
742,
14816,
9486,
5607,
29903,
29918,
7724,
29896,
29897,
1723,
13,
13,
1753,
1667,
29898,
19218,
1125,
13,
29871,
5534,
4744,
29892,
4744,
29906,
13,
29871,
1881,
29918,
1445,
353,
6213,
13,
29871,
1962,
29918,
1445,
353,
6213,
13,
259,
13,
29871,
1018,
29901,
13,
1678,
29111,
29892,
6389,
353,
679,
3670,
29889,
657,
3670,
29898,
19218,
29892,
376,
29881,
6132,
29901,
1159,
13,
29871,
5174,
679,
3670,
29889,
2577,
3670,
2392,
29901,
13,
1678,
1596,
29898,
29850,
29900,
6177,
5877,
29901,
21069,
29881,
29989,
29899,
29928,
29962,
21069,
29877,
1962,
29889,
3126,
29962,
1881,
29889,
3945,
1642,
4830,
29898,
10876,
29889,
19218,
29961,
29900,
2314,
1723,
13,
1678,
10876,
29889,
13322,
29898,
29906,
29897,
13,
29871,
363,
3523,
29892,
1852,
297,
29111,
29901,
13,
1678,
565,
3523,
1275,
17411,
29881,
2396,
13,
418,
4744,
29906,
353,
5852,
13,
418,
565,
4744,
29906,
29901,
1596,
29898,
376,
8382,
3233,
29871,
29896,
29908,
1723,
13,
1678,
25342,
3523,
1275,
17411,
29928,
2396,
13,
418,
4744,
353,
5852,
13,
418,
4744,
29906,
353,
5852,
13,
418,
565,
4744,
29906,
29901,
1596,
29898,
376,
8382,
3233,
29871,
29906,
29908,
1723,
13,
1678,
25342,
3523,
1275,
17411,
29877,
2396,
13,
418,
1962,
29918,
1445,
353,
1852,
13,
418,
565,
4744,
29906,
29901,
1596,
29898,
376,
4905,
29918,
1445,
338,
426,
29900,
29913,
1642,
4830,
29898,
1962,
29918,
1445,
1723,
1723,
13,
539,
13,
539,
13,
29871,
1018,
29901,
13,
1678,
1881,
29918,
1445,
353,
6389,
29961,
29900,
29962,
13,
29871,
5174,
29901,
13,
1678,
1596,
29898,
29850,
29900,
6177,
5877,
29901,
21069,
29881,
29989,
29899,
29928,
29962,
21069,
29877,
1962,
29889,
3126,
29962,
1881,
29889,
3945,
1642,
4830,
29898,
10876,
29889,
19218,
29961,
29900,
2314,
1723,
13,
1678,
10876,
29889,
13322,
29898,
29906,
29897,
13,
259,
13,
13,
29871,
282,
29918,
449,
353,
1014,
5014,
29889,
3198,
29918,
4905,
29898,
6024,
20011,
742,
17411,
29888,
742,
525,
3945,
29918,
517,
29918,
3126,
29889,
20011,
742,
1881,
29918,
1445,
29962,
1723,
13,
13,
29871,
1722,
29918,
8977,
353,
4390,
29889,
18132,
29898,
282,
29918,
449,
1723,
13,
29871,
2329,
29918,
459,
355,
919,
29918,
9303,
29898,
1722,
29918,
8977,
1723,
13,
13,
29871,
363,
1820,
297,
1722,
29918,
8977,
29901,
13,
1678,
396,
361,
4744,
29906,
29901,
1596,
29898,
1722,
29918,
8977,
29961,
1989,
3816,
29900,
29962,
1723,
13,
1678,
363,
22645,
297,
3464,
29898,
7431,
29898,
1722,
29918,
8977,
29961,
1989,
29962,
1723,
29871,
1125,
13,
418,
1722,
29918,
8977,
29961,
1989,
3816,
13140,
29962,
353,
2329,
29918,
459,
355,
919,
29898,
1722,
29918,
8977,
29961,
1989,
3816,
13140,
29962,
1723,
13,
418,
1722,
29918,
8977,
29961,
1989,
3816,
13140,
29962,
353,
5993,
675,
29889,
6979,
675,
29898,
1722,
29918,
8977,
29961,
1989,
3816,
13140,
1402,
525,
206,
148,
742,
525,
18098,
29879,
29915,
1723,
13,
1678,
396,
361,
4744,
29906,
29901,
1596,
29898,
29850,
29900,
29913,
426,
29896,
29913,
1642,
4830,
29898,
1820,
29892,
1722,
29918,
8977,
29961,
1989,
3816,
29900,
29962,
1723,
1723,
13,
259,
13,
29871,
565,
29898,
1962,
29918,
1445,
2804,
6213,
29871,
1125,
13,
1678,
1018,
29901,
13,
418,
411,
1722,
29898,
4905,
29918,
1445,
29892,
525,
29893,
29890,
1495,
408,
288,
29918,
18091,
29901,
13,
4706,
4390,
29889,
15070,
29898,
1722,
29918,
8977,
29892,
288,
29918,
18091,
29892,
1423,
29918,
6034,
1070,
29922,
5574,
29892,
29536,
29922,
8516,
29892,
2656,
29918,
8149,
29922,
5574,
29892,
2903,
4097,
11759,
742,
29905,
29876,
742,
525,
29901,
7464,
9801,
29918,
294,
18869,
29922,
8824,
1723,
13,
418,
10876,
29889,
13322,
29898,
29900,
29897,
13,
1678,
5174,
20948,
29901,
13,
418,
1209,
13,
29871,
432,
353,
4390,
29889,
29881,
17204,
29898,
1722,
29918,
8977,
29892,
1423,
29918,
6034,
1070,
29922,
5574,
29892,
29536,
29922,
8516,
29892,
2656,
29918,
8149,
29922,
5574,
29892,
2903,
4097,
11759,
742,
29905,
29876,
742,
525,
29901,
7464,
9801,
29918,
294,
18869,
29922,
8824,
1723,
13,
29871,
1596,
29898,
432,
1723,
13,
29871,
10876,
29889,
13322,
29898,
29900,
29897,
13,
13,
1753,
2329,
29918,
459,
355,
919,
29898,
4993,
1125,
13,
29871,
12551,
353,
2752,
13,
29871,
396,
7315,
1374,
265,
7492,
304,
1374,
265,
331,
293,
29936,
3218,
506,
895,
5641,
29909,
363,
9117,
3838,
313,
24077,
19505,
29892,
972,
283,
882,
29892,
1424,
17387,
29892,
2992,
29897,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30628,
613,
376,
31278,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30511,
613,
376,
29887,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30247,
30478,
613,
376,
30247,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30426,
30478,
613,
376,
31036,
29876,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
31513,
613,
376,
29878,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30176,
30234,
613,
376,
30176,
29872,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30713,
30234,
613,
376,
30713,
29872,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30234,
29878,
613,
376,
29872,
30184,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30176,
30234,
30215,
613,
376,
30176,
29872,
30184,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30713,
30234,
30215,
613,
376,
30713,
29872,
30184,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30234,
30215,
613,
376,
29872,
30184,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30234,
613,
376,
29872,
1159,
13,
13,
29871,
396,
3502,
278,
652,
561,
386,
24733,
411,
278,
1661,
29899,
1030,
5086,
2913,
2931,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
29874,
30312,
613,
376,
29874,
30722,
30312,
1159,
396,
29871,
29941,
29929,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
29874,
30599,
613,
376,
29874,
30722,
30599,
1159,
396,
29871,
29946,
29945,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
29872,
30184,
613,
376,
29872,
30722,
30184,
1159,
396,
29871,
29946,
29906,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
29872,
30312,
613,
376,
29872,
30722,
30312,
1159,
396,
29871,
29941,
29947,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30247,
30312,
613,
376,
30247,
30722,
30312,
1159,
396,
29871,
29946,
29900,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30184,
30599,
613,
376,
30184,
30722,
30599,
1159,
396,
29871,
29946,
29945,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30234,
30184,
613,
376,
30234,
30722,
30184,
1159,
396,
29871,
29946,
29906,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30312,
30184,
613,
376,
30312,
30722,
30184,
1159,
396,
29871,
29946,
29896,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30599,
30184,
613,
376,
30599,
30722,
30184,
1159,
396,
29871,
29946,
29941,
13,
259,
13,
29871,
396,
2791,
278,
2756,
2200,
1078,
411,
278,
1661,
29899,
1030,
5086,
2913,
2931,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
29881,
30614,
613,
376,
29881,
30722,
30614,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
29873,
30376,
613,
376,
29873,
30722,
30376,
1159,
13,
259,
13,
29871,
396,
2791,
3148,
4223,
652,
561,
386,
549,
847,
347,
29914,
448,
591,
29915,
645,
563,
29877,
445,
1449,
297,
1653,
29918,
264,
29918,
7210,
29918,
8977,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
29875,
30184,
613,
376,
29875,
30722,
30184,
1159,
13,
259,
13,
29871,
396,
443,
3502,
3148,
4223,
847,
30184,
29880,
29914,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30184,
30722,
29880,
613,
376,
30184,
29880,
1159,
13,
13,
29871,
396,
4803,
278,
3918,
313,
12150,
23378,
29899,
15380,
23378,
29897,
5641,
29909,
12640,
11380,
363,
325,
340,
1379,
13,
29871,
396,
2823,
4004,
29871,
29945,
310,
2045,
597,
1636,
29889,
17607,
29889,
29884,
695,
29889,
562,
29889,
2679,
29914,
5184,
29914,
5872,
29879,
29914,
666,
29874,
29899,
996,
1674,
29899,
3909,
29889,
13357,
13,
29871,
12551,
353,
337,
29889,
1491,
703,
30426,
10780,
29991,
30722,
19123,
376,
30426,
30215,
613,
12551,
29897,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
31036,
30215,
613,
376,
31036,
1159,
13,
29871,
12551,
353,
337,
29889,
1491,
703,
29875,
10780,
29991,
30722,
19123,
376,
29875,
30215,
613,
12551,
29897,
13,
29871,
12551,
353,
337,
29889,
1491,
703,
30247,
10780,
29991,
30722,
19123,
376,
30247,
30215,
613,
12551,
29897,
13,
29871,
12551,
353,
337,
29889,
1491,
703,
29884,
10780,
29991,
30722,
19123,
376,
29884,
30215,
613,
12551,
29897,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30215,
30215,
613,
376,
30215,
1159,
13,
13,
29871,
396,
22108,
3148,
652,
561,
386,
24733,
411,
10261,
652,
561,
386,
24733,
297,
10261,
8600,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30247,
30722,
30312,
30722,
30184,
30722,
30599,
613,
376,
30247,
30722,
30312,
30184,
30722,
30599,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30247,
30722,
30312,
30722,
30184,
30722,
30599,
613,
376,
30247,
30722,
30312,
30184,
30722,
30599,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
29872,
30722,
30312,
30722,
30184,
30722,
30599,
613,
376,
29872,
30722,
30312,
30184,
30722,
30599,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
29874,
30722,
30312,
30722,
30184,
30722,
30599,
613,
376,
29874,
30722,
30312,
30184,
30722,
30599,
1159,
13,
13,
29871,
396,
18772,
3367,
561,
386,
24733,
964,
652,
561,
386,
549,
5643,
491,
1364,
2766,
470,
29871,
30599,
13,
29871,
396,
29915,
29874,
30722,
30312,
30722,
30184,
742,
525,
29874,
30722,
30599,
30722,
30184,
742,
525,
29872,
30722,
30312,
30722,
30184,
742,
525,
29872,
30722,
30184,
30722,
30599,
742,
525,
30247,
30722,
30312,
30722,
30184,
742,
525,
30312,
30722,
30184,
30722,
30599,
742,
525,
30184,
30722,
30599,
30722,
30184,
29915,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
29874,
30722,
30312,
30722,
30184,
613,
376,
29874,
30722,
30312,
30184,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
29874,
30722,
30599,
30722,
30184,
613,
376,
29874,
30722,
30599,
30184,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
29872,
30722,
30312,
30722,
30184,
613,
376,
29872,
30722,
30312,
30184,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
29872,
30722,
30184,
30722,
30599,
613,
376,
29872,
30722,
30184,
30599,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30247,
30722,
30312,
30722,
30184,
613,
376,
30247,
30722,
30312,
30184,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30312,
30722,
30184,
30722,
30599,
613,
376,
30312,
30722,
30184,
30599,
1159,
13,
29871,
12551,
353,
12551,
29889,
6506,
703,
30184,
30722,
30599,
30722,
30184,
613,
376,
30184,
30722,
30599,
30184,
1159,
13,
29871,
736,
12551,
13,
13,
29937,
2329,
3353,
3838,
13,
1753,
2329,
29918,
459,
355,
919,
29918,
9303,
29898,
270,
312,
29871,
1125,
13,
29871,
270,
312,
29889,
5504,
3319,
29908,
12478,
362,
1115,
6796,
31278,
2204,
30176,
29872,
30722,
30312,
30376,
30184,
29876,
3284,
31278,
2204,
30176,
29872,
30722,
30312,
30376,
29876,
3108,
1800,
13,
29871,
396,
29881,
312,
29889,
5504,
3319,
29908,
370,
3129,
979,
1115,
6796,
30078,
6448,
30176,
31036,
29885,
30184,
29876,
30184,
29880,
3108,
1800,
13,
29871,
270,
312,
29889,
5504,
3319,
29908,
645,
16469,
1115,
6796,
29880,
30078,
29876,
30176,
30184,
30722,
30599,
29920,
3108,
1800,
13,
29871,
270,
312,
29889,
5504,
3319,
29908,
1145,
283,
882,
1115,
6796,
311,
30722,
30312,
29876,
30176,
29884,
30215,
29885,
30247,
30215,
3108,
1800,
13,
29871,
270,
312,
29889,
5504,
3319,
29908,
1191,
15114,
1115,
6796,
30176,
30426,
30215,
3249,
30722,
30312,
29880,
3108,
1800,
13,
29871,
270,
312,
29889,
5504,
3319,
29908,
24077,
19505,
1115,
6796,
11022,
30078,
29879,
31036,
30519,
3284,
11022,
30078,
29879,
31036,
29876,
3108,
1800,
13,
29871,
270,
312,
29889,
5504,
3319,
29908,
24077,
790,
1934,
1115,
6796,
11022,
30078,
29879,
31036,
30519,
29879,
3284,
11022,
30078,
29879,
31036,
1983,
3108,
1800,
13,
29871,
270,
312,
29889,
5504,
3319,
29908,
6740,
1115,
6796,
29890,
30176,
31036,
29916,
3108,
1800,
13,
29871,
270,
312,
29889,
5504,
3319,
29908,
1730,
1474,
1115,
6796,
29894,
30176,
30312,
30614,
30184,
30176,
492,
30215,
3108,
1800,
13,
29871,
270,
312,
29889,
5504,
3319,
29908,
5363,
1115,
3366,
30078,
29890,
30176,
30078,
3108,
1800,
13,
29871,
270,
312,
29889,
5504,
3319,
29908,
370,
18785,
1115,
3366,
30078,
29890,
30176,
30078,
29880,
30184,
29905,
29884,
29906,
29900,
29900,
29881,
30599,
29876,
3108,
1800,
13,
13,
361,
29898,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
29908,
1125,
13,
29871,
1667,
29898,
9675,
29889,
19218,
29961,
29896,
29901,
2314,
13,
2
] |
tests/helpers/imports.py | neptune-ml/pytorch-lightning | 15,666 | 144950 | <reponame>neptune-ml/pytorch-lightning<gh_stars>1000+
import operator
from pytorch_lightning.utilities.imports import _compare_version, _TORCHTEXT_LEGACY
if _TORCHTEXT_LEGACY:
if _compare_version("torchtext", operator.ge, "0.9.0"):
from torchtext.legacy.data import Batch, Dataset, Example, Field, Iterator, LabelField
else:
from torchtext.data import Batch, Dataset, Example, Field, Iterator, LabelField
else:
Batch = type(None)
Dataset = type(None)
Example = type(None)
Field = type(None)
Iterator = type(None)
LabelField = type(None)
| [
1,
529,
276,
1112,
420,
29958,
484,
415,
1540,
29899,
828,
29914,
2272,
7345,
305,
29899,
4366,
1076,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29900,
29900,
29974,
13,
5215,
5455,
13,
13,
3166,
282,
3637,
25350,
29918,
4366,
1076,
29889,
4422,
1907,
29889,
326,
4011,
1053,
903,
18307,
29918,
3259,
29892,
903,
29911,
1955,
3210,
16975,
29918,
1307,
29954,
2477,
29979,
13,
13,
361,
903,
29911,
1955,
3210,
16975,
29918,
1307,
29954,
2477,
29979,
29901,
13,
1678,
565,
903,
18307,
29918,
3259,
703,
7345,
305,
726,
613,
5455,
29889,
479,
29892,
376,
29900,
29889,
29929,
29889,
29900,
29908,
1125,
13,
4706,
515,
4842,
305,
726,
29889,
1397,
4135,
29889,
1272,
1053,
350,
905,
29892,
13373,
24541,
29892,
8741,
29892,
8989,
29892,
20504,
1061,
29892,
15796,
3073,
13,
1678,
1683,
29901,
13,
4706,
515,
4842,
305,
726,
29889,
1272,
1053,
350,
905,
29892,
13373,
24541,
29892,
8741,
29892,
8989,
29892,
20504,
1061,
29892,
15796,
3073,
13,
2870,
29901,
13,
1678,
350,
905,
353,
1134,
29898,
8516,
29897,
13,
1678,
13373,
24541,
353,
1134,
29898,
8516,
29897,
13,
1678,
8741,
353,
1134,
29898,
8516,
29897,
13,
1678,
8989,
353,
1134,
29898,
8516,
29897,
13,
1678,
20504,
1061,
353,
1134,
29898,
8516,
29897,
13,
1678,
15796,
3073,
353,
1134,
29898,
8516,
29897,
13,
2
] |
facturapi/types/exc.py | cuenca-mx/facturapi-python | 1 | 176059 | <filename>facturapi/types/exc.py
from dataclasses import dataclass
from typing import Any, Dict
class FacturapiException(Exception):
...
class NoResultFound(FacturapiException):
"""No results where found"""
class MultipleResultsFound(FacturapiException):
"""One result was expected but multiple were returned"""
@dataclass
class FacturapiResponseException(FacturapiException):
json: Dict[str, Any]
status_code: int
def __str__(self) -> str:
return repr(self)
| [
1,
529,
9507,
29958,
17028,
332,
2754,
29914,
8768,
29914,
735,
29883,
29889,
2272,
13,
3166,
848,
13203,
1053,
848,
1990,
13,
3166,
19229,
1053,
3139,
29892,
360,
919,
13,
13,
13,
1990,
26748,
332,
2754,
2451,
29898,
2451,
1125,
13,
1678,
2023,
13,
13,
13,
1990,
1939,
3591,
9692,
29898,
20738,
332,
2754,
2451,
1125,
13,
1678,
9995,
3782,
2582,
988,
1476,
15945,
29908,
13,
13,
13,
1990,
26905,
12191,
9692,
29898,
20738,
332,
2754,
2451,
1125,
13,
1678,
9995,
6716,
1121,
471,
3806,
541,
2999,
892,
4133,
15945,
29908,
13,
13,
13,
29992,
1272,
1990,
13,
1990,
26748,
332,
2754,
5103,
2451,
29898,
20738,
332,
2754,
2451,
1125,
13,
1678,
4390,
29901,
360,
919,
29961,
710,
29892,
3139,
29962,
13,
1678,
4660,
29918,
401,
29901,
938,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
29897,
1599,
851,
29901,
13,
4706,
736,
2062,
29898,
1311,
29897,
13,
2
] |
db.py | Technik-Tueftler/TeTueTwitchBot | 2 | 168437 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from sqlalchemy import Column, String, Integer, ForeignKey, TIMESTAMP, func, and_, or_
from sqlalchemy.sql import text
from sqlalchemy.orm import sessionmaker, relationship, query, backref
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
import tetueSrc
read_successful, cfg = tetueSrc.get_configuration("database")
Base = declarative_base()
engine = create_engine(
f'mariadb+mariadbconnector://{cfg["user"]}:{cfg["password"]}@{cfg["host"]}:{cfg["port"]}/{cfg["database"]}')
class Award(Base):
__tablename__ = 'awards'
id = Column(Integer, primary_key=True)
award_user_id = Column(Integer, ForeignKey("users.id"))
sponsor_points = Column(Integer, nullable=False, default=0)
tinker_points = Column(Integer, nullable=False, default=0)
battle_points = Column(Integer, nullable=False, default=0)
fitness_points = Column(Integer, nullable=False, default=0)
water_points = Column(Integer, nullable=False, default=0)
class Quote(Base):
__tablename__ = 'quotes'
id = Column(Integer, primary_key=True)
create_user_id = Column(Integer, ForeignKey("users.id"))
author_user_id = Column(Integer, ForeignKey("users.id"))
quote_date = Column(TIMESTAMP(timezone=False), nullable=False, server_default=text("NOW()"))
quote = Column(String(500), nullable=False)
class Raid(Base):
__tablename__ = 'raids'
id = Column(Integer, primary_key=True)
raider_user_id = Column(Integer, ForeignKey("users.id"))
raid_date = Column(TIMESTAMP(timezone=False), nullable=False, server_default=text("NOW()"))
number_of_raiders = Column(Integer)
"""class GameStatistic(Base):
__tablename__ = 'gamestatistics'
id = Column(Integer, primary_key=True)
gamer_user_id = Column(Integer, ForeignKey("users.id"))
game_date = Column(TIMESTAMP(timezone=False), nullable=False, server_default=text("NOW()"))
game_type = Column(String(100), nullable=False)
win = Column(Integer, nullable=False, default=0)
lost = Column(Integer, nullable=False, default=0)"""
"""class Phrase(Base):
__tablename__ = 'phrases'
id = Column(Integer, primary_key=True)
explorer_user_id = Column(Integer, ForeignKey("users.id"))
phrase_date = Column(TIMESTAMP(timezone=False), nullable=False, server_default=text("NOW()"))
phrase = Column(String(500), nullable=False)"""
class Category(Base):
__tablename__ = 'categorys'
id = Column(Integer, primary_key=True)
category_name = Column(String(100), nullable=False)
win_label = Column(String(100), nullable=False)
wins = Column(Integer, nullable=False, default=0)
lost_label = Column(String(100), nullable=False)
lost = Column(Integer, nullable=False, default=0)
bit_type = Column(String(100), nullable=False, default='channel')
bits = Column(Integer, nullable=False, default=0)
welcome_text = Column(String(200))
class User(Base):
__tablename__ = 'users'
id = Column(Integer, primary_key=True)
twitch_user_id = Column(String(50))
twitch_user_name = Column(String(50))
messages_sent = Column(Integer, nullable=False, default=0)
number_of_logins = Column(Integer, nullable=False, default=1)
last_visit = Column(TIMESTAMP(timezone=False), nullable=False, server_default=text("NOW()"))
loyalty_points = Column(Integer, nullable=False, default=0)
eggs = Column(Integer, nullable=False, default=0)
egg_lock = Column(TIMESTAMP(timezone=False), nullable=False, server_default=text("NOW()"))
warnings = Column(Integer, nullable=False, default=0)
lost_counter = Column(Integer, nullable=False, default=0)
stream_badges = Column(String(50), nullable=False, default="Tueftlie")
hen_name = Column(String(50))
smart_counter = Column(Integer, nullable=False, default=0)
honor_counter = Column(Integer, nullable=False, default=0)
name_pronunciation = Column(String(50))
shoutout_text = Column(String(500))
# Relationships
raids = relationship('Raid', backref='user')
# quotes = relationship('Quote', backref='user_quote')
session = sessionmaker()
session.configure(bind=engine)
Base.metadata.create_all(engine)
session = session()
def add_new_user(twitch_user_id: str, twitch_user_name: str) -> None:
new_user = User(twitch_user_id=twitch_user_id, twitch_user_name=twitch_user_name)
session.add(new_user)
session.commit()
def delete_user(user):
user_db_for_delete = session.query(User).filter(User.id == user.db_data.id).first()
user_db_for_delete.twitch_user_id = 0
user_db_for_delete.twitch_user_name = "gans"
user_db_for_delete.messages_sent = 0
user_db_for_delete.number_of_logins = 0
user_db_for_delete.loyalty_points = 0
user_db_for_delete.eggs = 0
user_db_for_delete.warnings = 0
user_db_for_delete.lost_counter = 0
user_db_for_delete.stream_badges = None
user_db_for_delete.hen_name = None
user_db_for_delete.smart_counter = 0
user_db_for_delete.honor_counter = 0
user_db_for_delete.name_pronunciation = None
user_db_for_delete.shoutout_text = None
session.commit()
def add_new_quote(create_user_id: int, author_user_id: id, quote: str) -> None:
session.add(Quote(create_user_id=create_user_id, author_user_id=author_user_id, quote=quote))
session.commit()
def check_category_exist_or_create(name: str, win_label: str, lose_label: str, bit_type: str, welcome_text: str
) -> Category:
category = session.query(Category).filter(Category.category_name == name).first()
if category is not None: return category
new_category = Category(category_name=name, win_label=win_label, lost_label=lose_label, bit_type=bit_type,
welcome_text=welcome_text)
session.add(new_category)
session.commit()
return new_category
def check_award_exist_or_create(user_id: int) -> Award:
award = session.query(Award).filter(Award.award_user_id == user_id).first()
if award is not None: return award
new_award = Award(award_user_id=user_id)
session.add(new_award)
session.commit()
return new_award
def check_user_from_name_exist(twitch_user_name: str) -> bool:
user_db = session.query(User).filter(User.twitch_user_name == twitch_user_name).first()
if user_db is not None: return True
return False
def first_value_with_id(attribute, search_column, search_value):
return session.query(attribute).filter(search_column == search_value).first()[0]
def update_user_attribute_with_id(user_id: int, attribute, value) -> None:
session.query(User).filter(User.id == user_id).update({attribute: value})
session.commit()
def query_auto_vip() -> query.Query:
return session.query(User). \
filter(User.stream_badges == 'Tueftlie'). \
order_by(User.warnings.asc(),
User.number_of_logins.desc(),
User.honor_counter.desc(),
User.loyalty_points.desc(),
User.eggs.desc()). \
limit(tetueSrc.get_int_element("autovip", "num_max_auto_vips_loyalty"))
def query_raid_vip() -> query.Query:
return session.query(User.twitch_user_name,
User.id). \
join(Raid). \
filter(and_(User.stream_badges == 'Tueftlie', User.warnings == 0)). \
group_by(Raid.raider_user_id). \
order_by(func.count(Raid.raider_user_id).desc(),
func.sum(Raid.number_of_raiders).desc()). \
limit(tetueSrc.get_int_element("autovip", "num_max_auto_vips_raid"))
def main():
"""user = session.query(User).filter(User.id == 79).first()
print(user.id)
print(user.twitch_user_name)
print(user.raids)
for element in user.raids:
print(element.number_of_raiders)
print(element.id)
quote = session.query(Quote).filter(Quote.id == 3).first()
print(quote.quote)"""
"""test2 = any([x[0] for x in session.query(Category).filter(Category.category_name == "Science & Technology").all()])
print(test2)
if test2 is False:
add_new_category("Science & Technology", "Features", "Bugs", "technology", "Viel Spaß beim mittüfteln.")
wins = session.query(Category).filter(Category.category_name == "Populous: The Beginning").first()
print(wins.win_label)"""
# args = ("1", "2", "3")
# print(*args[1:])
"""user_statistic_list = session.query(User). \
filter(and_(User.twitch_user_name != 'technik_tueftler',
User.twitch_user_name != 'gans',
User.twitch_user_name != 'streamelements')). \
order_by(User.warnings.asc(),
User.number_of_logins.desc(),
User.honor_counter.desc(),
User.loyalty_points.desc(),
User.eggs.desc()).all()
print(f'Größe: {len(user_statistic_list)}')
print(f'Typ: {type(user_statistic_list)}')
user_test = session.query(User).filter(User.twitch_user_name == "kongfurakete").first()
try:
# search for the item
index = user_statistic_list.index(user_test)
print('The index of', user_test, 'in the list is:', index)
except ValueError:
print('item not present')"""
test = tetueSrc.get_string_list_only_section("output_text")
print(test)
list2 = list()
for _, value in test.items():
if value['active']:
list2 = list2 + value['commands']
print(list2)
list3 = list()
list3 = [element for key, value in test.items() for element in value['commands'] if value['active']]
print(list3)
cmd = "wgh"
key = [key for key, value in test.items() if cmd in value['commands']]
print(key)
if len(key) == 0:
print("NOPE")
#print(test[key[0]])
#print(test[key[0]]["output_string"])
if __name__ == "__main__":
main()
| [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
4576,
284,
305,
6764,
1053,
12481,
29892,
1714,
29892,
8102,
29892,
19358,
2558,
29892,
323,
8890,
1254,
19297,
29892,
3653,
29892,
322,
3383,
470,
29918,
13,
3166,
4576,
284,
305,
6764,
29889,
2850,
1053,
1426,
13,
3166,
4576,
284,
305,
6764,
29889,
555,
1053,
4867,
28107,
29892,
9443,
29892,
2346,
29892,
1250,
999,
13,
3166,
4576,
284,
305,
6764,
29889,
1062,
29889,
311,
16544,
1230,
1053,
7669,
1230,
29918,
3188,
13,
3166,
4576,
284,
305,
6764,
1053,
1653,
29918,
10599,
13,
5215,
260,
300,
434,
29903,
2214,
13,
13,
949,
29918,
8698,
1319,
29892,
274,
16434,
353,
260,
300,
434,
29903,
2214,
29889,
657,
29918,
13305,
703,
9803,
1159,
13,
5160,
353,
7669,
1230,
29918,
3188,
580,
13,
10599,
353,
1653,
29918,
10599,
29898,
13,
1678,
285,
29915,
29885,
1306,
328,
29890,
29974,
29885,
1306,
328,
29890,
11958,
2801,
597,
29912,
16859,
3366,
1792,
3108,
6177,
29912,
16859,
3366,
5630,
3108,
29913,
28312,
16859,
3366,
3069,
3108,
6177,
29912,
16859,
3366,
637,
3108,
6822,
29912,
16859,
3366,
9803,
3108,
29913,
1495,
13,
13,
13,
1990,
7526,
29898,
5160,
1125,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
29874,
2935,
29915,
13,
1678,
1178,
353,
12481,
29898,
7798,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
9862,
29918,
1792,
29918,
333,
353,
12481,
29898,
7798,
29892,
19358,
2558,
703,
7193,
29889,
333,
5783,
13,
1678,
21955,
272,
29918,
9748,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29900,
29897,
13,
1678,
260,
682,
261,
29918,
9748,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29900,
29897,
13,
1678,
10555,
29918,
9748,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29900,
29897,
13,
1678,
6216,
2264,
29918,
9748,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29900,
29897,
13,
1678,
4094,
29918,
9748,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29900,
29897,
13,
13,
13,
1990,
751,
866,
29898,
5160,
1125,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
339,
4769,
29915,
13,
1678,
1178,
353,
12481,
29898,
7798,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
1653,
29918,
1792,
29918,
333,
353,
12481,
29898,
7798,
29892,
19358,
2558,
703,
7193,
29889,
333,
5783,
13,
1678,
4148,
29918,
1792,
29918,
333,
353,
12481,
29898,
7798,
29892,
19358,
2558,
703,
7193,
29889,
333,
5783,
13,
1678,
14978,
29918,
1256,
353,
12481,
29898,
15307,
1254,
19297,
29898,
2230,
8028,
29922,
8824,
511,
1870,
519,
29922,
8824,
29892,
1923,
29918,
4381,
29922,
726,
703,
6632,
29956,
580,
5783,
13,
1678,
14978,
353,
12481,
29898,
1231,
29898,
29945,
29900,
29900,
511,
1870,
519,
29922,
8824,
29897,
13,
13,
13,
1990,
6981,
333,
29898,
5160,
1125,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
336,
4841,
29915,
13,
1678,
1178,
353,
12481,
29898,
7798,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
1153,
1241,
29918,
1792,
29918,
333,
353,
12481,
29898,
7798,
29892,
19358,
2558,
703,
7193,
29889,
333,
5783,
13,
1678,
1153,
333,
29918,
1256,
353,
12481,
29898,
15307,
1254,
19297,
29898,
2230,
8028,
29922,
8824,
511,
1870,
519,
29922,
8824,
29892,
1923,
29918,
4381,
29922,
726,
703,
6632,
29956,
580,
5783,
13,
1678,
1353,
29918,
974,
29918,
336,
11376,
353,
12481,
29898,
7798,
29897,
13,
13,
13,
15945,
29908,
1990,
8448,
9513,
4695,
29898,
5160,
1125,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
29887,
314,
342,
271,
6765,
29915,
13,
1678,
1178,
353,
12481,
29898,
7798,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
330,
4183,
29918,
1792,
29918,
333,
353,
12481,
29898,
7798,
29892,
19358,
2558,
703,
7193,
29889,
333,
5783,
13,
1678,
3748,
29918,
1256,
353,
12481,
29898,
15307,
1254,
19297,
29898,
2230,
8028,
29922,
8824,
511,
1870,
519,
29922,
8824,
29892,
1923,
29918,
4381,
29922,
726,
703,
6632,
29956,
580,
5783,
13,
1678,
3748,
29918,
1853,
353,
12481,
29898,
1231,
29898,
29896,
29900,
29900,
511,
1870,
519,
29922,
8824,
29897,
13,
1678,
5401,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29900,
29897,
13,
1678,
5714,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29900,
5513,
15945,
13,
13,
13,
15945,
29908,
1990,
349,
1092,
559,
29898,
5160,
1125,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
24588,
2129,
29915,
13,
1678,
1178,
353,
12481,
29898,
7798,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
3902,
9386,
29918,
1792,
29918,
333,
353,
12481,
29898,
7798,
29892,
19358,
2558,
703,
7193,
29889,
333,
5783,
13,
1678,
16549,
29918,
1256,
353,
12481,
29898,
15307,
1254,
19297,
29898,
2230,
8028,
29922,
8824,
511,
1870,
519,
29922,
8824,
29892,
1923,
29918,
4381,
29922,
726,
703,
6632,
29956,
580,
5783,
13,
1678,
16549,
353,
12481,
29898,
1231,
29898,
29945,
29900,
29900,
511,
1870,
519,
29922,
8824,
5513,
15945,
13,
13,
13,
1990,
17943,
29898,
5160,
1125,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
7320,
29879,
29915,
13,
1678,
1178,
353,
12481,
29898,
7798,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
7663,
29918,
978,
353,
12481,
29898,
1231,
29898,
29896,
29900,
29900,
511,
1870,
519,
29922,
8824,
29897,
13,
1678,
5401,
29918,
1643,
353,
12481,
29898,
1231,
29898,
29896,
29900,
29900,
511,
1870,
519,
29922,
8824,
29897,
13,
1678,
21614,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29900,
29897,
13,
1678,
5714,
29918,
1643,
353,
12481,
29898,
1231,
29898,
29896,
29900,
29900,
511,
1870,
519,
29922,
8824,
29897,
13,
1678,
5714,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29900,
29897,
13,
1678,
2586,
29918,
1853,
353,
12481,
29898,
1231,
29898,
29896,
29900,
29900,
511,
1870,
519,
29922,
8824,
29892,
2322,
2433,
12719,
1495,
13,
1678,
9978,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29900,
29897,
13,
1678,
12853,
29918,
726,
353,
12481,
29898,
1231,
29898,
29906,
29900,
29900,
876,
13,
13,
13,
1990,
4911,
29898,
5160,
1125,
13,
1678,
4770,
3891,
2435,
420,
1649,
353,
525,
7193,
29915,
13,
1678,
1178,
353,
12481,
29898,
7798,
29892,
7601,
29918,
1989,
29922,
5574,
29897,
13,
1678,
3252,
2335,
29918,
1792,
29918,
333,
353,
12481,
29898,
1231,
29898,
29945,
29900,
876,
13,
1678,
3252,
2335,
29918,
1792,
29918,
978,
353,
12481,
29898,
1231,
29898,
29945,
29900,
876,
13,
1678,
7191,
29918,
18616,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29900,
29897,
13,
1678,
1353,
29918,
974,
29918,
1188,
1144,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29896,
29897,
13,
1678,
1833,
29918,
1730,
277,
353,
12481,
29898,
15307,
1254,
19297,
29898,
2230,
8028,
29922,
8824,
511,
1870,
519,
29922,
8824,
29892,
1923,
29918,
4381,
29922,
726,
703,
6632,
29956,
580,
5783,
13,
1678,
28108,
1017,
29918,
9748,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29900,
29897,
13,
1678,
29808,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29900,
29897,
13,
1678,
19710,
29918,
908,
353,
12481,
29898,
15307,
1254,
19297,
29898,
2230,
8028,
29922,
8824,
511,
1870,
519,
29922,
8824,
29892,
1923,
29918,
4381,
29922,
726,
703,
6632,
29956,
580,
5783,
13,
1678,
18116,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29900,
29897,
13,
1678,
5714,
29918,
11808,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29900,
29897,
13,
1678,
4840,
29918,
12313,
2710,
353,
12481,
29898,
1231,
29898,
29945,
29900,
511,
1870,
519,
29922,
8824,
29892,
2322,
543,
29911,
434,
615,
3197,
1159,
13,
1678,
19061,
29918,
978,
353,
12481,
29898,
1231,
29898,
29945,
29900,
876,
13,
1678,
15040,
29918,
11808,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29900,
29897,
13,
1678,
10657,
29918,
11808,
353,
12481,
29898,
7798,
29892,
1870,
519,
29922,
8824,
29892,
2322,
29922,
29900,
29897,
13,
1678,
1024,
29918,
558,
265,
11173,
362,
353,
12481,
29898,
1231,
29898,
29945,
29900,
876,
13,
1678,
21272,
449,
29918,
726,
353,
12481,
29898,
1231,
29898,
29945,
29900,
29900,
876,
13,
13,
1678,
396,
6376,
800,
14587,
13,
1678,
1153,
4841,
353,
9443,
877,
29934,
29874,
333,
742,
1250,
999,
2433,
1792,
1495,
13,
1678,
396,
11839,
353,
9443,
877,
2182,
866,
742,
1250,
999,
2433,
1792,
29918,
1396,
1495,
13,
13,
13,
7924,
353,
4867,
28107,
580,
13,
7924,
29889,
17591,
29898,
5355,
29922,
10599,
29897,
13,
5160,
29889,
19635,
29889,
3258,
29918,
497,
29898,
10599,
29897,
13,
7924,
353,
4867,
580,
13,
13,
13,
1753,
788,
29918,
1482,
29918,
1792,
29898,
7516,
2335,
29918,
1792,
29918,
333,
29901,
851,
29892,
3252,
2335,
29918,
1792,
29918,
978,
29901,
851,
29897,
1599,
6213,
29901,
13,
1678,
716,
29918,
1792,
353,
4911,
29898,
7516,
2335,
29918,
1792,
29918,
333,
29922,
7516,
2335,
29918,
1792,
29918,
333,
29892,
3252,
2335,
29918,
1792,
29918,
978,
29922,
7516,
2335,
29918,
1792,
29918,
978,
29897,
13,
1678,
4867,
29889,
1202,
29898,
1482,
29918,
1792,
29897,
13,
1678,
4867,
29889,
15060,
580,
13,
13,
13,
1753,
5217,
29918,
1792,
29898,
1792,
1125,
13,
1678,
1404,
29918,
2585,
29918,
1454,
29918,
8143,
353,
4867,
29889,
1972,
29898,
2659,
467,
4572,
29898,
2659,
29889,
333,
1275,
1404,
29889,
2585,
29918,
1272,
29889,
333,
467,
4102,
580,
13,
1678,
1404,
29918,
2585,
29918,
1454,
29918,
8143,
29889,
7516,
2335,
29918,
1792,
29918,
333,
353,
29871,
29900,
13,
1678,
1404,
29918,
2585,
29918,
1454,
29918,
8143,
29889,
7516,
2335,
29918,
1792,
29918,
978,
353,
376,
29887,
550,
29908,
13,
1678,
1404,
29918,
2585,
29918,
1454,
29918,
8143,
29889,
19158,
29918,
18616,
353,
29871,
29900,
13,
1678,
1404,
29918,
2585,
29918,
1454,
29918,
8143,
29889,
4537,
29918,
974,
29918,
1188,
1144,
353,
29871,
29900,
13,
1678,
1404,
29918,
2585,
29918,
1454,
29918,
8143,
29889,
2376,
18745,
29918,
9748,
353,
29871,
29900,
13,
1678,
1404,
29918,
2585,
29918,
1454,
29918,
8143,
29889,
387,
3174,
353,
29871,
29900,
13,
1678,
1404,
29918,
2585,
29918,
1454,
29918,
8143,
29889,
25442,
886,
353,
29871,
29900,
13,
1678,
1404,
29918,
2585,
29918,
1454,
29918,
8143,
29889,
18767,
29918,
11808,
353,
29871,
29900,
13,
1678,
1404,
29918,
2585,
29918,
1454,
29918,
8143,
29889,
5461,
29918,
12313,
2710,
353,
6213,
13,
1678,
1404,
29918,
2585,
29918,
1454,
29918,
8143,
29889,
3169,
29918,
978,
353,
6213,
13,
1678,
1404,
29918,
2585,
29918,
1454,
29918,
8143,
29889,
3844,
442,
29918,
11808,
353,
29871,
29900,
13,
1678,
1404,
29918,
2585,
29918,
1454,
29918,
8143,
29889,
27305,
272,
29918,
11808,
353,
29871,
29900,
13,
1678,
1404,
29918,
2585,
29918,
1454,
29918,
8143,
29889,
978,
29918,
558,
265,
11173,
362,
353,
6213,
13,
1678,
1404,
29918,
2585,
29918,
1454,
29918,
8143,
29889,
845,
449,
449,
29918,
726,
353,
6213,
13,
1678,
4867,
29889,
15060,
580,
13,
13,
13,
1753,
788,
29918,
1482,
29918,
1396,
29898,
3258,
29918,
1792,
29918,
333,
29901,
938,
29892,
4148,
29918,
1792,
29918,
333,
29901,
1178,
29892,
14978,
29901,
851,
29897,
1599,
6213,
29901,
13,
1678,
4867,
29889,
1202,
29898,
2182,
866,
29898,
3258,
29918,
1792,
29918,
333,
29922,
3258,
29918,
1792,
29918,
333,
29892,
4148,
29918,
1792,
29918,
333,
29922,
8921,
29918,
1792,
29918,
333,
29892,
14978,
29922,
1396,
876,
13,
1678,
4867,
29889,
15060,
580,
13,
13,
13,
1753,
1423,
29918,
7320,
29918,
28997,
29918,
272,
29918,
3258,
29898,
978,
29901,
851,
29892,
5401,
29918,
1643,
29901,
851,
29892,
14074,
29918,
1643,
29901,
851,
29892,
2586,
29918,
1853,
29901,
851,
29892,
12853,
29918,
726,
29901,
851,
13,
462,
462,
259,
1723,
1599,
17943,
29901,
13,
1678,
7663,
353,
4867,
29889,
1972,
29898,
10900,
467,
4572,
29898,
10900,
29889,
7320,
29918,
978,
1275,
1024,
467,
4102,
580,
13,
1678,
565,
7663,
338,
451,
6213,
29901,
736,
7663,
13,
1678,
716,
29918,
7320,
353,
17943,
29898,
7320,
29918,
978,
29922,
978,
29892,
5401,
29918,
1643,
29922,
5080,
29918,
1643,
29892,
5714,
29918,
1643,
29922,
2226,
29918,
1643,
29892,
2586,
29918,
1853,
29922,
2966,
29918,
1853,
29892,
13,
462,
9651,
12853,
29918,
726,
29922,
20466,
2763,
29918,
726,
29897,
13,
1678,
4867,
29889,
1202,
29898,
1482,
29918,
7320,
29897,
13,
1678,
4867,
29889,
15060,
580,
13,
1678,
736,
716,
29918,
7320,
13,
13,
13,
1753,
1423,
29918,
29874,
1328,
29918,
28997,
29918,
272,
29918,
3258,
29898,
1792,
29918,
333,
29901,
938,
29897,
1599,
7526,
29901,
13,
1678,
9862,
353,
4867,
29889,
1972,
29898,
29909,
1328,
467,
4572,
29898,
29909,
1328,
29889,
29874,
1328,
29918,
1792,
29918,
333,
1275,
1404,
29918,
333,
467,
4102,
580,
13,
1678,
565,
9862,
338,
451,
6213,
29901,
736,
9862,
13,
1678,
716,
29918,
29874,
1328,
353,
7526,
29898,
29874,
1328,
29918,
1792,
29918,
333,
29922,
1792,
29918,
333,
29897,
13,
1678,
4867,
29889,
1202,
29898,
1482,
29918,
29874,
1328,
29897,
13,
1678,
4867,
29889,
15060,
580,
13,
1678,
736,
716,
29918,
29874,
1328,
13,
13,
13,
1753,
1423,
29918,
1792,
29918,
3166,
29918,
978,
29918,
28997,
29898,
7516,
2335,
29918,
1792,
29918,
978,
29901,
851,
29897,
1599,
6120,
29901,
13,
1678,
1404,
29918,
2585,
353,
4867,
29889,
1972,
29898,
2659,
467,
4572,
29898,
2659,
29889,
7516,
2335,
29918,
1792,
29918,
978,
1275,
3252,
2335,
29918,
1792,
29918,
978,
467,
4102,
580,
13,
1678,
565,
1404,
29918,
2585,
338,
451,
6213,
29901,
736,
5852,
13,
1678,
736,
7700,
13,
13,
13,
1753,
937,
29918,
1767,
29918,
2541,
29918,
333,
29898,
12715,
29892,
2740,
29918,
4914,
29892,
2740,
29918,
1767,
1125,
13,
1678,
736,
4867,
29889,
1972,
29898,
12715,
467,
4572,
29898,
4478,
29918,
4914,
1275,
2740,
29918,
1767,
467,
4102,
580,
29961,
29900,
29962,
13,
13,
13,
1753,
2767,
29918,
1792,
29918,
12715,
29918,
2541,
29918,
333,
29898,
1792,
29918,
333,
29901,
938,
29892,
5352,
29892,
995,
29897,
1599,
6213,
29901,
13,
1678,
4867,
29889,
1972,
29898,
2659,
467,
4572,
29898,
2659,
29889,
333,
1275,
1404,
29918,
333,
467,
5504,
3319,
12715,
29901,
995,
1800,
13,
1678,
4867,
29889,
15060,
580,
13,
13,
13,
1753,
2346,
29918,
6921,
29918,
29894,
666,
580,
1599,
2346,
29889,
3010,
29901,
13,
1678,
736,
4867,
29889,
1972,
29898,
2659,
467,
320,
13,
4706,
4175,
29898,
2659,
29889,
5461,
29918,
12313,
2710,
1275,
525,
29911,
434,
615,
3197,
2824,
320,
13,
4706,
1797,
29918,
1609,
29898,
2659,
29889,
25442,
886,
29889,
6151,
3285,
13,
462,
4911,
29889,
4537,
29918,
974,
29918,
1188,
1144,
29889,
14273,
3285,
13,
462,
4911,
29889,
27305,
272,
29918,
11808,
29889,
14273,
3285,
13,
462,
4911,
29889,
2376,
18745,
29918,
9748,
29889,
14273,
3285,
13,
462,
4911,
29889,
387,
3174,
29889,
14273,
16655,
320,
13,
4706,
4046,
29898,
29873,
300,
434,
29903,
2214,
29889,
657,
29918,
524,
29918,
5029,
703,
1300,
586,
666,
613,
376,
1949,
29918,
3317,
29918,
6921,
29918,
1403,
567,
29918,
2376,
18745,
5783,
13,
13,
13,
1753,
2346,
29918,
12240,
29918,
29894,
666,
580,
1599,
2346,
29889,
3010,
29901,
13,
1678,
736,
4867,
29889,
1972,
29898,
2659,
29889,
7516,
2335,
29918,
1792,
29918,
978,
29892,
13,
462,
308,
4911,
29889,
333,
467,
320,
13,
4706,
5988,
29898,
29934,
29874,
333,
467,
320,
13,
4706,
4175,
29898,
392,
23538,
2659,
29889,
5461,
29918,
12313,
2710,
1275,
525,
29911,
434,
615,
3197,
742,
4911,
29889,
25442,
886,
1275,
29871,
29900,
8106,
320,
13,
4706,
2318,
29918,
1609,
29898,
29934,
29874,
333,
29889,
336,
1241,
29918,
1792,
29918,
333,
467,
320,
13,
4706,
1797,
29918,
1609,
29898,
9891,
29889,
2798,
29898,
29934,
29874,
333,
29889,
336,
1241,
29918,
1792,
29918,
333,
467,
14273,
3285,
13,
462,
3653,
29889,
2083,
29898,
29934,
29874,
333,
29889,
4537,
29918,
974,
29918,
336,
11376,
467,
14273,
16655,
320,
13,
4706,
4046,
29898,
29873,
300,
434,
29903,
2214,
29889,
657,
29918,
524,
29918,
5029,
703,
1300,
586,
666,
613,
376,
1949,
29918,
3317,
29918,
6921,
29918,
1403,
567,
29918,
12240,
5783,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
9995,
1792,
353,
4867,
29889,
1972,
29898,
2659,
467,
4572,
29898,
2659,
29889,
333,
1275,
29871,
29955,
29929,
467,
4102,
580,
13,
1678,
1596,
29898,
1792,
29889,
333,
29897,
13,
1678,
1596,
29898,
1792,
29889,
7516,
2335,
29918,
1792,
29918,
978,
29897,
13,
1678,
1596,
29898,
1792,
29889,
336,
4841,
29897,
13,
1678,
363,
1543,
297,
1404,
29889,
336,
4841,
29901,
13,
4706,
1596,
29898,
5029,
29889,
4537,
29918,
974,
29918,
336,
11376,
29897,
13,
4706,
1596,
29898,
5029,
29889,
333,
29897,
13,
13,
1678,
14978,
353,
4867,
29889,
1972,
29898,
2182,
866,
467,
4572,
29898,
2182,
866,
29889,
333,
1275,
29871,
29941,
467,
4102,
580,
13,
1678,
1596,
29898,
1396,
29889,
1396,
5513,
15945,
13,
1678,
9995,
1688,
29906,
353,
738,
4197,
29916,
29961,
29900,
29962,
363,
921,
297,
4867,
29889,
1972,
29898,
10900,
467,
4572,
29898,
10900,
29889,
7320,
29918,
978,
1275,
376,
29903,
15277,
669,
17968,
2564,
497,
580,
2314,
13,
1678,
1596,
29898,
1688,
29906,
29897,
13,
1678,
565,
1243,
29906,
338,
7700,
29901,
13,
4706,
788,
29918,
1482,
29918,
7320,
703,
29903,
15277,
669,
17968,
613,
376,
8263,
3698,
613,
376,
29933,
16926,
613,
376,
21695,
3002,
613,
376,
29963,
709,
1706,
29874,
30034,
10005,
22219,
29993,
615,
3478,
23157,
13,
1678,
21614,
353,
4867,
29889,
1972,
29898,
10900,
467,
4572,
29898,
10900,
29889,
7320,
29918,
978,
1275,
376,
12310,
352,
681,
29901,
450,
14893,
1076,
2564,
4102,
580,
13,
1678,
1596,
29898,
29893,
1144,
29889,
5080,
29918,
1643,
5513,
15945,
13,
1678,
396,
6389,
353,
4852,
29896,
613,
376,
29906,
613,
376,
29941,
1159,
13,
1678,
396,
1596,
10456,
5085,
29961,
29896,
29901,
2314,
13,
1678,
9995,
1792,
29918,
6112,
4695,
29918,
1761,
353,
4867,
29889,
1972,
29898,
2659,
467,
320,
13,
4706,
4175,
29898,
392,
23538,
2659,
29889,
7516,
2335,
29918,
1792,
29918,
978,
2804,
525,
21695,
638,
29918,
29873,
434,
615,
1358,
742,
13,
462,
1678,
4911,
29889,
7516,
2335,
29918,
1792,
29918,
978,
2804,
525,
29887,
550,
742,
13,
462,
1678,
4911,
29889,
7516,
2335,
29918,
1792,
29918,
978,
2804,
525,
13045,
420,
944,
29879,
1495,
467,
320,
13,
4706,
1797,
29918,
1609,
29898,
2659,
29889,
25442,
886,
29889,
6151,
3285,
13,
462,
4911,
29889,
4537,
29918,
974,
29918,
1188,
1144,
29889,
14273,
3285,
13,
462,
4911,
29889,
27305,
272,
29918,
11808,
29889,
14273,
3285,
13,
462,
4911,
29889,
2376,
18745,
29918,
9748,
29889,
14273,
3285,
13,
462,
4911,
29889,
387,
3174,
29889,
14273,
16655,
497,
580,
13,
1678,
1596,
29898,
29888,
29915,
3338,
29997,
5831,
29901,
426,
2435,
29898,
1792,
29918,
6112,
4695,
29918,
1761,
2915,
1495,
13,
1678,
1596,
29898,
29888,
29915,
24933,
29901,
426,
1853,
29898,
1792,
29918,
6112,
4695,
29918,
1761,
2915,
1495,
13,
1678,
1404,
29918,
1688,
353,
4867,
29889,
1972,
29898,
2659,
467,
4572,
29898,
2659,
29889,
7516,
2335,
29918,
1792,
29918,
978,
1275,
376,
29895,
549,
22613,
557,
2650,
2564,
4102,
580,
13,
1678,
1018,
29901,
13,
4706,
396,
2740,
363,
278,
2944,
13,
4706,
2380,
353,
1404,
29918,
6112,
4695,
29918,
1761,
29889,
2248,
29898,
1792,
29918,
1688,
29897,
13,
4706,
1596,
877,
1576,
2380,
310,
742,
1404,
29918,
1688,
29892,
525,
262,
278,
1051,
338,
29901,
742,
2380,
29897,
13,
1678,
5174,
7865,
2392,
29901,
13,
4706,
1596,
877,
667,
451,
2198,
1495,
15945,
29908,
13,
1678,
1243,
353,
260,
300,
434,
29903,
2214,
29889,
657,
29918,
1807,
29918,
1761,
29918,
6194,
29918,
2042,
703,
4905,
29918,
726,
1159,
13,
1678,
1596,
29898,
1688,
29897,
13,
1678,
1051,
29906,
353,
1051,
580,
13,
1678,
363,
17117,
995,
297,
1243,
29889,
7076,
7295,
13,
4706,
565,
995,
1839,
4925,
2033,
29901,
13,
9651,
1051,
29906,
353,
1051,
29906,
718,
995,
1839,
26381,
2033,
13,
1678,
1596,
29898,
1761,
29906,
29897,
13,
13,
1678,
1051,
29941,
353,
1051,
580,
13,
1678,
1051,
29941,
353,
518,
5029,
363,
1820,
29892,
995,
297,
1243,
29889,
7076,
580,
363,
1543,
297,
995,
1839,
26381,
2033,
565,
995,
1839,
4925,
2033,
29962,
13,
1678,
1596,
29898,
1761,
29941,
29897,
13,
1678,
9920,
353,
376,
29893,
12443,
29908,
13,
1678,
1820,
353,
518,
1989,
363,
1820,
29892,
995,
297,
1243,
29889,
7076,
580,
565,
9920,
297,
995,
1839,
26381,
2033,
29962,
13,
1678,
1596,
29898,
1989,
29897,
13,
1678,
565,
7431,
29898,
1989,
29897,
1275,
29871,
29900,
29901,
13,
4706,
1596,
703,
6632,
4162,
1159,
13,
1678,
396,
2158,
29898,
1688,
29961,
1989,
29961,
29900,
24960,
13,
1678,
396,
2158,
29898,
1688,
29961,
1989,
29961,
29900,
5262,
3366,
4905,
29918,
1807,
20068,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1667,
580,
13,
2
] |
examples/collect_match_result.py | ceb10n/okerr | 0 | 1616307 | <reponame>ceb10n/okerr
from okerr import Err, Ok, Match
class User:
def __init__(self, username):
self.username = username
def __str__(self):
return f"I'm {username} and I'm authenticated ;)"
def authenticate(username, password):
if username == 'ok' and password == '<PASSWORD>':
user = User(username)
return Ok(user)
return Err("You're not allowed here!")
def awesome_authenticated_stuff(user: User) -> User:
return user
def awful_result(msg: str):
return msg
if __name__ == '__main__':
username = input('username: ')
password = input('password: ')
result = authenticate(username, password)
collected_value = Match(result) \
.ok(awesome_authenticated_stuff, result.value) \
.err(awful_result, result.value) \
.collect()
print(collected_value)
| [
1,
529,
276,
1112,
420,
29958,
346,
29890,
29896,
29900,
29876,
29914,
554,
3127,
13,
3166,
3431,
3127,
1053,
25361,
29892,
3674,
29892,
14514,
13,
13,
13,
1990,
4911,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
8952,
1125,
13,
4706,
1583,
29889,
6786,
353,
8952,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
285,
29908,
29902,
29915,
29885,
426,
6786,
29913,
322,
306,
29915,
29885,
15585,
630,
2056,
5513,
13,
13,
13,
1753,
15585,
403,
29898,
6786,
29892,
4800,
1125,
13,
1678,
565,
8952,
1275,
525,
554,
29915,
322,
4800,
1275,
12801,
25711,
17013,
29958,
2396,
13,
4706,
1404,
353,
4911,
29898,
6786,
29897,
13,
4706,
736,
3674,
29898,
1792,
29897,
13,
13,
1678,
736,
25361,
703,
3492,
29915,
276,
451,
6068,
1244,
29991,
1159,
13,
13,
13,
1753,
29663,
29918,
27218,
630,
29918,
303,
3096,
29898,
1792,
29901,
4911,
29897,
1599,
4911,
29901,
13,
1678,
736,
1404,
13,
13,
13,
1753,
28893,
29918,
2914,
29898,
7645,
29901,
851,
1125,
13,
1678,
736,
10191,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
8952,
353,
1881,
877,
6786,
29901,
25710,
13,
1678,
4800,
353,
1881,
877,
5630,
29901,
25710,
13,
13,
1678,
1121,
353,
15585,
403,
29898,
6786,
29892,
4800,
29897,
13,
13,
1678,
16531,
29918,
1767,
353,
14514,
29898,
2914,
29897,
320,
13,
4706,
869,
554,
29898,
1450,
14151,
29918,
27218,
630,
29918,
303,
3096,
29892,
1121,
29889,
1767,
29897,
320,
13,
4706,
869,
3127,
29898,
1450,
1319,
29918,
2914,
29892,
1121,
29889,
1767,
29897,
320,
13,
4706,
869,
15914,
580,
13,
13,
1678,
1596,
29898,
15914,
287,
29918,
1767,
29897,
13,
2
] |
labelit/active_learning/scorer/allconv.py | shibing624/labelit | 5 | 135805 | <reponame>shibing624/labelit
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Implements allconv model in keras using tensorflow backend."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import copy
import keras
import keras.backend as K
from keras.layers import Activation
from keras.layers import Conv2D
from keras.layers import Dropout
from keras.layers import GlobalAveragePooling2D
from keras.models import Sequential
import numpy as np
import tensorflow as tf
class AllConv(object):
"""allconv network that matches sklearn api."""
def __init__(self,
random_state=1,
epochs=50,
batch_size=32,
solver='rmsprop',
learning_rate=0.001,
lr_decay=0.):
# params
self.solver = solver
self.epochs = epochs
self.batch_size = batch_size
self.learning_rate = learning_rate
self.lr_decay = lr_decay
# data
self.encode_map = None
self.decode_map = None
self.model = None
self.random_state = random_state
self.n_classes = None
def build_model(self, X):
# assumes that data axis order is same as the backend
input_shape = X.shape[1:]
np.random.seed(self.random_state)
tf.set_random_seed(self.random_state)
model = Sequential()
model.add(Conv2D(96, (3, 3), padding='same',
input_shape=input_shape, name='conv1'))
model.add(Activation('relu'))
model.add(Conv2D(96, (3, 3), name='conv2', padding='same'))
model.add(Activation('relu'))
model.add(Conv2D(96, (3, 3), strides=(2, 2), padding='same', name='conv3'))
model.add(Activation('relu'))
model.add(Dropout(0.5))
model.add(Conv2D(192, (3, 3), name='conv4', padding='same'))
model.add(Activation('relu'))
model.add(Conv2D(192, (3, 3), name='conv5', padding='same'))
model.add(Activation('relu'))
model.add(Conv2D(192, (3, 3), strides=(2, 2), name='conv6', padding='same'))
model.add(Activation('relu'))
model.add(Dropout(0.5))
model.add(Conv2D(192, (3, 3), name='conv7', padding='same'))
model.add(Activation('relu'))
model.add(Conv2D(192, (1, 1), name='conv8', padding='valid'))
model.add(Activation('relu'))
model.add(Conv2D(10, (1, 1), name='conv9', padding='valid'))
model.add(GlobalAveragePooling2D())
model.add(Activation('softmax', name='activation_top'))
model.summary()
try:
optimizer = getattr(keras.optimizers, self.solver)
except:
raise NotImplementedError('optimizer not implemented in keras')
# All optimizers with the exception of nadam take decay as named arg
try:
opt = optimizer(lr=self.learning_rate, decay=self.lr_decay)
except:
opt = optimizer(lr=self.learning_rate, schedule_decay=self.lr_decay)
model.compile(loss='categorical_crossentropy',
optimizer=opt,
metrics=['accuracy'])
# Save initial weights so that model can be retrained with same
# initialization
self.initial_weights = copy.deepcopy(model.get_weights())
self.model = model
def create_y_mat(self, y):
y_encode = self.encode_y(y)
y_encode = np.reshape(y_encode, (len(y_encode), 1))
y_mat = keras.utils.to_categorical(y_encode, self.n_classes)
return y_mat
# Add handling for classes that do not start counting from 0
def encode_y(self, y):
if self.encode_map is None:
self.classes_ = sorted(list(set(y)))
self.n_classes = len(self.classes_)
self.encode_map = dict(zip(self.classes_, range(len(self.classes_))))
self.decode_map = dict(zip(range(len(self.classes_)), self.classes_))
mapper = lambda x: self.encode_map[x]
transformed_y = np.array(map(mapper, y))
return transformed_y
def decode_y(self, y):
mapper = lambda x: self.decode_map[x]
transformed_y = np.array(map(mapper, y))
return transformed_y
def fit(self, X_train, y_train, sample_weight=None):
y_mat = self.create_y_mat(y_train)
if self.model is None:
self.build_model(X_train)
# We don't want incremental fit so reset learning rate and weights
K.set_value(self.model.optimizer.lr, self.learning_rate)
self.model.set_weights(self.initial_weights)
self.model.fit(
X_train,
y_mat,
batch_size=self.batch_size,
epochs=self.epochs,
shuffle=True,
sample_weight=sample_weight,
verbose=0)
def predict(self, X_val):
predicted = self.model.predict(X_val)
return predicted
def score(self, X_val, val_y):
y_mat = self.create_y_mat(val_y)
val_acc = self.model.evaluate(X_val, y_mat)[1]
return val_acc
def decision_function(self, X):
return self.predict(X)
def transform(self, X):
model = self.model
inp = [model.input]
activations = []
# Get activations of the last conv layer.
output = [layer.output for layer in model.layers if
layer.name == 'conv9'][0]
func = K.function(inp + [K.learning_phase()], [output])
for i in range(int(X.shape[0] / self.batch_size) + 1):
minibatch = X[i * self.batch_size
: min(X.shape[0], (i + 1) * self.batch_size)]
list_inputs = [minibatch, 0.]
# Learning phase. 0 = Test mode (no dropout or batch normalization)
layer_output = func(list_inputs)[0]
activations.append(layer_output)
output = np.vstack(tuple(activations))
output = np.reshape(output, (output.shape[0], np.product(output.shape[1:])))
return output
def get_params(self, deep=False):
params = {}
params['solver'] = self.solver
params['epochs'] = self.epochs
params['batch_size'] = self.batch_size
params['learning_rate'] = self.learning_rate
params['weight_decay'] = self.lr_decay
if deep:
return copy.deepcopy(params)
return copy.copy(params)
def set_params(self, **parameters):
for parameter, value in parameters.items():
setattr(self, parameter, value)
return self
| [
1,
529,
276,
1112,
420,
29958,
845,
747,
292,
29953,
29906,
29946,
29914,
1643,
277,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29955,
5087,
9266,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
29937,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
418,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
29937,
13,
29937,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
29937,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
13,
29937,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
27028,
1090,
278,
19245,
29889,
13,
13,
15945,
29908,
1888,
9711,
599,
20580,
1904,
297,
13023,
294,
773,
26110,
14998,
1213,
15945,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
13,
5215,
3509,
13,
13,
5215,
13023,
294,
13,
5215,
13023,
294,
29889,
27852,
408,
476,
13,
3166,
13023,
294,
29889,
29277,
1053,
21775,
362,
13,
3166,
13023,
294,
29889,
29277,
1053,
1281,
29894,
29906,
29928,
13,
3166,
13023,
294,
29889,
29277,
1053,
20724,
449,
13,
3166,
13023,
294,
29889,
29277,
1053,
12002,
29909,
19698,
11426,
292,
29906,
29928,
13,
3166,
13023,
294,
29889,
9794,
1053,
922,
339,
2556,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
26110,
408,
15886,
13,
13,
13,
1990,
2178,
1168,
29894,
29898,
3318,
1125,
13,
1678,
9995,
497,
20580,
3564,
393,
7087,
2071,
19668,
7882,
1213,
15945,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
4036,
29918,
3859,
29922,
29896,
29892,
13,
462,
21502,
12168,
29922,
29945,
29900,
29892,
13,
462,
9853,
29918,
2311,
29922,
29941,
29906,
29892,
13,
462,
899,
369,
2433,
29878,
1516,
7728,
742,
13,
462,
6509,
29918,
10492,
29922,
29900,
29889,
29900,
29900,
29896,
29892,
13,
462,
301,
29878,
29918,
7099,
388,
29922,
29900,
9575,
13,
4706,
396,
8636,
13,
4706,
1583,
29889,
2929,
369,
353,
899,
369,
13,
4706,
1583,
29889,
1022,
2878,
29879,
353,
21502,
12168,
13,
4706,
1583,
29889,
16175,
29918,
2311,
353,
9853,
29918,
2311,
13,
4706,
1583,
29889,
21891,
29918,
10492,
353,
6509,
29918,
10492,
13,
4706,
1583,
29889,
29212,
29918,
7099,
388,
353,
301,
29878,
29918,
7099,
388,
13,
4706,
396,
848,
13,
4706,
1583,
29889,
12508,
29918,
1958,
353,
6213,
13,
4706,
1583,
29889,
13808,
29918,
1958,
353,
6213,
13,
4706,
1583,
29889,
4299,
353,
6213,
13,
4706,
1583,
29889,
8172,
29918,
3859,
353,
4036,
29918,
3859,
13,
4706,
1583,
29889,
29876,
29918,
13203,
353,
6213,
13,
13,
1678,
822,
2048,
29918,
4299,
29898,
1311,
29892,
1060,
1125,
13,
4706,
396,
15894,
393,
848,
9685,
1797,
338,
1021,
408,
278,
14998,
13,
4706,
1881,
29918,
12181,
353,
1060,
29889,
12181,
29961,
29896,
17531,
13,
4706,
7442,
29889,
8172,
29889,
26776,
29898,
1311,
29889,
8172,
29918,
3859,
29897,
13,
4706,
15886,
29889,
842,
29918,
8172,
29918,
26776,
29898,
1311,
29889,
8172,
29918,
3859,
29897,
13,
13,
4706,
1904,
353,
922,
339,
2556,
580,
13,
4706,
1904,
29889,
1202,
29898,
1168,
29894,
29906,
29928,
29898,
29929,
29953,
29892,
313,
29941,
29892,
29871,
29941,
511,
7164,
2433,
17642,
742,
13,
462,
308,
1881,
29918,
12181,
29922,
2080,
29918,
12181,
29892,
1024,
2433,
20580,
29896,
8785,
13,
4706,
1904,
29889,
1202,
29898,
21786,
362,
877,
2674,
29884,
8785,
13,
4706,
1904,
29889,
1202,
29898,
1168,
29894,
29906,
29928,
29898,
29929,
29953,
29892,
313,
29941,
29892,
29871,
29941,
511,
1024,
2433,
20580,
29906,
742,
7164,
2433,
17642,
8785,
13,
4706,
1904,
29889,
1202,
29898,
21786,
362,
877,
2674,
29884,
8785,
13,
4706,
1904,
29889,
1202,
29898,
1168,
29894,
29906,
29928,
29898,
29929,
29953,
29892,
313,
29941,
29892,
29871,
29941,
511,
851,
2247,
7607,
29906,
29892,
29871,
29906,
511,
7164,
2433,
17642,
742,
1024,
2433,
20580,
29941,
8785,
13,
4706,
1904,
29889,
1202,
29898,
21786,
362,
877,
2674,
29884,
8785,
13,
4706,
1904,
29889,
1202,
29898,
15063,
449,
29898,
29900,
29889,
29945,
876,
13,
13,
4706,
1904,
29889,
1202,
29898,
1168,
29894,
29906,
29928,
29898,
29896,
29929,
29906,
29892,
313,
29941,
29892,
29871,
29941,
511,
1024,
2433,
20580,
29946,
742,
7164,
2433,
17642,
8785,
13,
4706,
1904,
29889,
1202,
29898,
21786,
362,
877,
2674,
29884,
8785,
13,
4706,
1904,
29889,
1202,
29898,
1168,
29894,
29906,
29928,
29898,
29896,
29929,
29906,
29892,
313,
29941,
29892,
29871,
29941,
511,
1024,
2433,
20580,
29945,
742,
7164,
2433,
17642,
8785,
13,
4706,
1904,
29889,
1202,
29898,
21786,
362,
877,
2674,
29884,
8785,
13,
4706,
1904,
29889,
1202,
29898,
1168,
29894,
29906,
29928,
29898,
29896,
29929,
29906,
29892,
313,
29941,
29892,
29871,
29941,
511,
851,
2247,
7607,
29906,
29892,
29871,
29906,
511,
1024,
2433,
20580,
29953,
742,
7164,
2433,
17642,
8785,
13,
4706,
1904,
29889,
1202,
29898,
21786,
362,
877,
2674,
29884,
8785,
13,
4706,
1904,
29889,
1202,
29898,
15063,
449,
29898,
29900,
29889,
29945,
876,
13,
13,
4706,
1904,
29889,
1202,
29898,
1168,
29894,
29906,
29928,
29898,
29896,
29929,
29906,
29892,
313,
29941,
29892,
29871,
29941,
511,
1024,
2433,
20580,
29955,
742,
7164,
2433,
17642,
8785,
13,
4706,
1904,
29889,
1202,
29898,
21786,
362,
877,
2674,
29884,
8785,
13,
4706,
1904,
29889,
1202,
29898,
1168,
29894,
29906,
29928,
29898,
29896,
29929,
29906,
29892,
313,
29896,
29892,
29871,
29896,
511,
1024,
2433,
20580,
29947,
742,
7164,
2433,
3084,
8785,
13,
4706,
1904,
29889,
1202,
29898,
21786,
362,
877,
2674,
29884,
8785,
13,
4706,
1904,
29889,
1202,
29898,
1168,
29894,
29906,
29928,
29898,
29896,
29900,
29892,
313,
29896,
29892,
29871,
29896,
511,
1024,
2433,
20580,
29929,
742,
7164,
2433,
3084,
8785,
13,
13,
4706,
1904,
29889,
1202,
29898,
12756,
29909,
19698,
11426,
292,
29906,
29928,
3101,
13,
4706,
1904,
29889,
1202,
29898,
21786,
362,
877,
2695,
3317,
742,
1024,
2433,
11236,
362,
29918,
3332,
8785,
13,
4706,
1904,
29889,
7727,
580,
13,
13,
4706,
1018,
29901,
13,
9651,
5994,
3950,
353,
679,
5552,
29898,
3946,
294,
29889,
20640,
19427,
29892,
1583,
29889,
2929,
369,
29897,
13,
4706,
5174,
29901,
13,
9651,
12020,
2216,
1888,
2037,
287,
2392,
877,
20640,
3950,
451,
8762,
297,
13023,
294,
1495,
13,
4706,
396,
2178,
5994,
19427,
411,
278,
3682,
310,
8642,
314,
2125,
20228,
408,
4257,
1852,
13,
4706,
1018,
29901,
13,
9651,
3523,
353,
5994,
3950,
29898,
29212,
29922,
1311,
29889,
21891,
29918,
10492,
29892,
20228,
29922,
1311,
29889,
29212,
29918,
7099,
388,
29897,
13,
4706,
5174,
29901,
13,
9651,
3523,
353,
5994,
3950,
29898,
29212,
29922,
1311,
29889,
21891,
29918,
10492,
29892,
20410,
29918,
7099,
388,
29922,
1311,
29889,
29212,
29918,
7099,
388,
29897,
13,
13,
4706,
1904,
29889,
12198,
29898,
6758,
2433,
29883,
20440,
936,
29918,
19128,
296,
14441,
742,
13,
462,
418,
5994,
3950,
29922,
3670,
29892,
13,
462,
418,
21556,
29922,
1839,
562,
2764,
4135,
11287,
13,
4706,
396,
16913,
2847,
18177,
577,
393,
1904,
508,
367,
29578,
1312,
411,
1021,
13,
4706,
396,
17865,
13,
4706,
1583,
29889,
11228,
29918,
705,
5861,
353,
3509,
29889,
24535,
8552,
29898,
4299,
29889,
657,
29918,
705,
5861,
3101,
13,
13,
4706,
1583,
29889,
4299,
353,
1904,
13,
13,
1678,
822,
1653,
29918,
29891,
29918,
2922,
29898,
1311,
29892,
343,
1125,
13,
4706,
343,
29918,
12508,
353,
1583,
29889,
12508,
29918,
29891,
29898,
29891,
29897,
13,
4706,
343,
29918,
12508,
353,
7442,
29889,
690,
14443,
29898,
29891,
29918,
12508,
29892,
313,
2435,
29898,
29891,
29918,
12508,
511,
29871,
29896,
876,
13,
4706,
343,
29918,
2922,
353,
13023,
294,
29889,
13239,
29889,
517,
29918,
29883,
20440,
936,
29898,
29891,
29918,
12508,
29892,
1583,
29889,
29876,
29918,
13203,
29897,
13,
4706,
736,
343,
29918,
2922,
13,
13,
1678,
396,
3462,
11415,
363,
4413,
393,
437,
451,
1369,
21248,
515,
29871,
29900,
13,
1678,
822,
19750,
29918,
29891,
29898,
1311,
29892,
343,
1125,
13,
4706,
565,
1583,
29889,
12508,
29918,
1958,
338,
6213,
29901,
13,
9651,
1583,
29889,
13203,
29918,
353,
12705,
29898,
1761,
29898,
842,
29898,
29891,
4961,
13,
9651,
1583,
29889,
29876,
29918,
13203,
353,
7431,
29898,
1311,
29889,
13203,
19925,
13,
9651,
1583,
29889,
12508,
29918,
1958,
353,
9657,
29898,
7554,
29898,
1311,
29889,
13203,
3383,
3464,
29898,
2435,
29898,
1311,
29889,
13203,
29918,
13697,
13,
9651,
1583,
29889,
13808,
29918,
1958,
353,
9657,
29898,
7554,
29898,
3881,
29898,
2435,
29898,
1311,
29889,
13203,
29918,
8243,
1583,
29889,
13203,
29918,
876,
13,
4706,
611,
2496,
353,
14013,
921,
29901,
1583,
29889,
12508,
29918,
1958,
29961,
29916,
29962,
13,
4706,
27615,
29918,
29891,
353,
7442,
29889,
2378,
29898,
1958,
29898,
655,
2496,
29892,
343,
876,
13,
4706,
736,
27615,
29918,
29891,
13,
13,
1678,
822,
21822,
29918,
29891,
29898,
1311,
29892,
343,
1125,
13,
4706,
611,
2496,
353,
14013,
921,
29901,
1583,
29889,
13808,
29918,
1958,
29961,
29916,
29962,
13,
4706,
27615,
29918,
29891,
353,
7442,
29889,
2378,
29898,
1958,
29898,
655,
2496,
29892,
343,
876,
13,
4706,
736,
27615,
29918,
29891,
13,
13,
1678,
822,
6216,
29898,
1311,
29892,
1060,
29918,
14968,
29892,
343,
29918,
14968,
29892,
4559,
29918,
7915,
29922,
8516,
1125,
13,
4706,
343,
29918,
2922,
353,
1583,
29889,
3258,
29918,
29891,
29918,
2922,
29898,
29891,
29918,
14968,
29897,
13,
13,
4706,
565,
1583,
29889,
4299,
338,
6213,
29901,
13,
9651,
1583,
29889,
4282,
29918,
4299,
29898,
29990,
29918,
14968,
29897,
13,
13,
4706,
396,
1334,
1016,
29915,
29873,
864,
11924,
284,
6216,
577,
10092,
6509,
6554,
322,
18177,
13,
4706,
476,
29889,
842,
29918,
1767,
29898,
1311,
29889,
4299,
29889,
20640,
3950,
29889,
29212,
29892,
1583,
29889,
21891,
29918,
10492,
29897,
13,
4706,
1583,
29889,
4299,
29889,
842,
29918,
705,
5861,
29898,
1311,
29889,
11228,
29918,
705,
5861,
29897,
13,
4706,
1583,
29889,
4299,
29889,
9202,
29898,
13,
9651,
1060,
29918,
14968,
29892,
13,
9651,
343,
29918,
2922,
29892,
13,
9651,
9853,
29918,
2311,
29922,
1311,
29889,
16175,
29918,
2311,
29892,
13,
9651,
21502,
12168,
29922,
1311,
29889,
1022,
2878,
29879,
29892,
13,
9651,
528,
21897,
29922,
5574,
29892,
13,
9651,
4559,
29918,
7915,
29922,
11249,
29918,
7915,
29892,
13,
9651,
26952,
29922,
29900,
29897,
13,
13,
1678,
822,
8500,
29898,
1311,
29892,
1060,
29918,
791,
1125,
13,
4706,
25383,
353,
1583,
29889,
4299,
29889,
27711,
29898,
29990,
29918,
791,
29897,
13,
4706,
736,
25383,
13,
13,
1678,
822,
8158,
29898,
1311,
29892,
1060,
29918,
791,
29892,
659,
29918,
29891,
1125,
13,
4706,
343,
29918,
2922,
353,
1583,
29889,
3258,
29918,
29891,
29918,
2922,
29898,
791,
29918,
29891,
29897,
13,
4706,
659,
29918,
5753,
353,
1583,
29889,
4299,
29889,
24219,
403,
29898,
29990,
29918,
791,
29892,
343,
29918,
2922,
9601,
29896,
29962,
13,
4706,
736,
659,
29918,
5753,
13,
13,
1678,
822,
10608,
29918,
2220,
29898,
1311,
29892,
1060,
1125,
13,
4706,
736,
1583,
29889,
27711,
29898,
29990,
29897,
13,
13,
1678,
822,
4327,
29898,
1311,
29892,
1060,
1125,
13,
4706,
1904,
353,
1583,
29889,
4299,
13,
4706,
297,
29886,
353,
518,
4299,
29889,
2080,
29962,
13,
4706,
5039,
800,
353,
5159,
13,
13,
4706,
396,
3617,
5039,
800,
310,
278,
1833,
7602,
7546,
29889,
13,
4706,
1962,
353,
518,
13148,
29889,
4905,
363,
7546,
297,
1904,
29889,
29277,
565,
13,
462,
29871,
7546,
29889,
978,
1275,
525,
20580,
29929,
2033,
29961,
29900,
29962,
13,
4706,
3653,
353,
476,
29889,
2220,
29898,
262,
29886,
718,
518,
29968,
29889,
21891,
29918,
21646,
580,
1402,
518,
4905,
2314,
13,
4706,
363,
474,
297,
3464,
29898,
524,
29898,
29990,
29889,
12181,
29961,
29900,
29962,
847,
1583,
29889,
16175,
29918,
2311,
29897,
718,
29871,
29896,
1125,
13,
9651,
1375,
747,
905,
353,
1060,
29961,
29875,
334,
1583,
29889,
16175,
29918,
2311,
13,
9651,
584,
1375,
29898,
29990,
29889,
12181,
29961,
29900,
1402,
313,
29875,
718,
29871,
29896,
29897,
334,
1583,
29889,
16175,
29918,
2311,
4638,
13,
9651,
1051,
29918,
2080,
29879,
353,
518,
1195,
747,
905,
29892,
29871,
29900,
5586,
13,
9651,
396,
29257,
8576,
29889,
29871,
29900,
353,
4321,
4464,
313,
1217,
5768,
449,
470,
9853,
4226,
2133,
29897,
13,
9651,
7546,
29918,
4905,
353,
3653,
29898,
1761,
29918,
2080,
29879,
9601,
29900,
29962,
13,
9651,
5039,
800,
29889,
4397,
29898,
13148,
29918,
4905,
29897,
13,
4706,
1962,
353,
7442,
29889,
29894,
1429,
29898,
23583,
29898,
11236,
800,
876,
13,
4706,
1962,
353,
7442,
29889,
690,
14443,
29898,
4905,
29892,
313,
4905,
29889,
12181,
29961,
29900,
1402,
7442,
29889,
4704,
29898,
4905,
29889,
12181,
29961,
29896,
17531,
4961,
13,
4706,
736,
1962,
13,
13,
1678,
822,
679,
29918,
7529,
29898,
1311,
29892,
6483,
29922,
8824,
1125,
13,
4706,
8636,
353,
6571,
13,
4706,
8636,
1839,
2929,
369,
2033,
353,
1583,
29889,
2929,
369,
13,
4706,
8636,
1839,
1022,
2878,
29879,
2033,
353,
1583,
29889,
1022,
2878,
29879,
13,
4706,
8636,
1839,
16175,
29918,
2311,
2033,
353,
1583,
29889,
16175,
29918,
2311,
13,
4706,
8636,
1839,
21891,
29918,
10492,
2033,
353,
1583,
29889,
21891,
29918,
10492,
13,
4706,
8636,
1839,
7915,
29918,
7099,
388,
2033,
353,
1583,
29889,
29212,
29918,
7099,
388,
13,
4706,
565,
6483,
29901,
13,
9651,
736,
3509,
29889,
24535,
8552,
29898,
7529,
29897,
13,
4706,
736,
3509,
29889,
8552,
29898,
7529,
29897,
13,
13,
1678,
822,
731,
29918,
7529,
29898,
1311,
29892,
3579,
16744,
1125,
13,
4706,
363,
3443,
29892,
995,
297,
4128,
29889,
7076,
7295,
13,
9651,
731,
5552,
29898,
1311,
29892,
3443,
29892,
995,
29897,
13,
4706,
736,
1583,
13,
2
] |
tests/tools/test_openvino2tf.py | fixstars/arachne | 3 | 108167 | import os
import subprocess
import sys
import tarfile
import tempfile
from dataclasses import asdict
import numpy as np
import onnxruntime as ort
import tensorflow as tf
import yaml
from tvm.contrib.download import download
from arachne.data import ModelSpec, TensorSpec
from arachne.tools.openvino2tf import OpenVINO2TF, OpenVINO2TFConfig
from arachne.tools.openvino_mo import OpenVINOModelOptConfig, OpenVINOModelOptimizer
from arachne.utils.model_utils import init_from_file
from arachne.utils.tf_utils import make_tf_gpu_usage_growth
def check_openvino2tf_output(onnx_model_path, tf_model_path):
tf_loaded = tf.saved_model.load(tf_model_path)
resnet18_tf = tf_loaded.signatures["serving_default"] # type: ignore
input = np.random.rand(1, 3, 224, 224).astype(np.float32) # type: ignore
# onnx runtime
sess = ort.InferenceSession(onnx_model_path, providers=["CPUExecutionProvider"])
input_name = sess.get_inputs()[0].name
dout = sess.run(output_names=None, input_feed={input_name: input})[0]
# tf
tf_input = tf.convert_to_tensor(np.transpose(input, (0, 2, 3, 1)))
tf_result = resnet18_tf(tf_input)
aout = tf_result["tf.identity"].numpy()
np.testing.assert_allclose(aout, dout, atol=1e-5, rtol=1e-5) # type: ignore
def test_openvino2tf():
with tempfile.TemporaryDirectory() as tmp_dir:
os.chdir(tmp_dir)
url = (
"https://arachne-public-pkgs.s3.ap-northeast-1.amazonaws.com/models/test/resnet18.onnx"
)
onnx_model_path = "resnet18.onnx"
download(url, onnx_model_path)
input_model = init_from_file(onnx_model_path)
m = OpenVINOModelOptimizer.run(input_model, OpenVINOModelOptConfig())
m = OpenVINO2TF.run(m, OpenVINO2TFConfig())
check_openvino2tf_output(onnx_model_path, m.path)
def test_cli():
# Due to the test time, we only test one case
make_tf_gpu_usage_growth()
with tempfile.TemporaryDirectory() as tmp_dir:
os.chdir(tmp_dir)
url = (
"https://arachne-public-pkgs.s3.ap-northeast-1.amazonaws.com/models/test/resnet18.onnx"
)
onnx_model_path = "resnet18.onnx"
download(url, onnx_model_path)
ret = subprocess.run(
[
sys.executable,
"-m",
"arachne.driver.cli",
"+tools=openvino_mo",
"model_file=resnet18.onnx",
"output_path=output.tar",
]
)
assert ret.returncode == 0
model_path = None
with tarfile.open("output.tar", "r:gz") as tar:
for m in tar.getmembers():
if m.name.endswith("_0"):
model_path = m.name
tar.extractall(".")
assert model_path is not None
spec = ModelSpec(
inputs=[TensorSpec(name="input0", shape=[1, 3, 224, 224], dtype="float32")],
outputs=[TensorSpec(name="output0", shape=[1, 1000], dtype="float32")],
)
with open("spec.yaml", "w") as file:
yaml.dump(asdict(spec), file)
ret2 = subprocess.run(
[
sys.executable,
"-m",
"arachne.driver.cli",
"+tools=openvino2tf",
f"model_dir={model_path}",
"model_spec_file=spec.yaml",
"output_path=output2.tar",
]
)
assert ret2.returncode == 0
with tarfile.open("output2.tar", "r:gz") as tar:
for m in tar.getmembers():
if m.name.endswith("saved_model"):
model_path = m.name
tar.extractall(".")
check_openvino2tf_output(onnx_model_path, model_path)
| [
1,
1053,
2897,
13,
5215,
1014,
5014,
13,
5215,
10876,
13,
5215,
9913,
1445,
13,
5215,
5694,
1445,
13,
3166,
848,
13203,
1053,
408,
8977,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
373,
23818,
15634,
408,
20289,
13,
5215,
26110,
408,
15886,
13,
5215,
343,
8807,
13,
3166,
260,
6925,
29889,
21570,
29889,
10382,
1053,
5142,
13,
13,
3166,
263,
10221,
484,
29889,
1272,
1053,
8125,
10299,
29892,
323,
6073,
10299,
13,
3166,
263,
10221,
484,
29889,
8504,
29889,
3150,
29894,
1789,
29906,
13264,
1053,
4673,
29963,
1177,
29949,
29906,
8969,
29892,
4673,
29963,
1177,
29949,
29906,
8969,
3991,
13,
3166,
263,
10221,
484,
29889,
8504,
29889,
3150,
29894,
1789,
29918,
4346,
1053,
4673,
29963,
1177,
29949,
3195,
20624,
3991,
29892,
4673,
29963,
1177,
29949,
3195,
20624,
326,
3950,
13,
3166,
263,
10221,
484,
29889,
13239,
29889,
4299,
29918,
13239,
1053,
2069,
29918,
3166,
29918,
1445,
13,
3166,
263,
10221,
484,
29889,
13239,
29889,
13264,
29918,
13239,
1053,
1207,
29918,
13264,
29918,
29887,
3746,
29918,
21125,
29918,
29887,
798,
386,
13,
13,
13,
1753,
1423,
29918,
3150,
29894,
1789,
29906,
13264,
29918,
4905,
29898,
3409,
29916,
29918,
4299,
29918,
2084,
29892,
15886,
29918,
4299,
29918,
2084,
1125,
13,
1678,
15886,
29918,
15638,
353,
15886,
29889,
17314,
29918,
4299,
29889,
1359,
29898,
13264,
29918,
4299,
29918,
2084,
29897,
13,
1678,
620,
1212,
29896,
29947,
29918,
13264,
353,
15886,
29918,
15638,
29889,
4530,
3698,
3366,
643,
1747,
29918,
4381,
3108,
29871,
396,
1134,
29901,
11455,
13,
13,
1678,
1881,
353,
7442,
29889,
8172,
29889,
9502,
29898,
29896,
29892,
29871,
29941,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29906,
29906,
29946,
467,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
29897,
29871,
396,
1134,
29901,
11455,
13,
13,
1678,
396,
373,
23818,
10073,
13,
1678,
27937,
353,
20289,
29889,
797,
1659,
7317,
29898,
3409,
29916,
29918,
4299,
29918,
2084,
29892,
1326,
11376,
29922,
3366,
6271,
29965,
20418,
6980,
20068,
13,
1678,
1881,
29918,
978,
353,
27937,
29889,
657,
29918,
2080,
29879,
580,
29961,
29900,
1822,
978,
13,
1678,
270,
449,
353,
27937,
29889,
3389,
29898,
4905,
29918,
7039,
29922,
8516,
29892,
1881,
29918,
18798,
3790,
2080,
29918,
978,
29901,
1881,
1800,
29961,
29900,
29962,
13,
13,
1678,
396,
15886,
13,
1678,
15886,
29918,
2080,
353,
15886,
29889,
13441,
29918,
517,
29918,
20158,
29898,
9302,
29889,
3286,
4220,
29898,
2080,
29892,
313,
29900,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29896,
4961,
13,
1678,
15886,
29918,
2914,
353,
620,
1212,
29896,
29947,
29918,
13264,
29898,
13264,
29918,
2080,
29897,
13,
1678,
263,
449,
353,
15886,
29918,
2914,
3366,
13264,
29889,
22350,
16862,
23749,
580,
13,
13,
1678,
7442,
29889,
13424,
29889,
9294,
29918,
497,
5358,
29898,
29874,
449,
29892,
270,
449,
29892,
472,
324,
29922,
29896,
29872,
29899,
29945,
29892,
364,
25027,
29922,
29896,
29872,
29899,
29945,
29897,
29871,
396,
1134,
29901,
11455,
13,
13,
13,
1753,
1243,
29918,
3150,
29894,
1789,
29906,
13264,
7295,
13,
1678,
411,
5694,
1445,
29889,
5776,
1971,
653,
9882,
580,
408,
13128,
29918,
3972,
29901,
13,
4706,
2897,
29889,
305,
3972,
29898,
7050,
29918,
3972,
29897,
13,
13,
4706,
3142,
353,
313,
13,
9651,
376,
991,
597,
279,
496,
484,
29899,
3597,
29899,
20571,
3174,
29889,
29879,
29941,
29889,
481,
29899,
29876,
27374,
29899,
29896,
29889,
17260,
10467,
29889,
510,
29914,
9794,
29914,
1688,
29914,
690,
1212,
29896,
29947,
29889,
3409,
29916,
29908,
13,
4706,
1723,
13,
13,
4706,
373,
23818,
29918,
4299,
29918,
2084,
353,
376,
690,
1212,
29896,
29947,
29889,
3409,
29916,
29908,
13,
4706,
5142,
29898,
2271,
29892,
373,
23818,
29918,
4299,
29918,
2084,
29897,
13,
13,
4706,
1881,
29918,
4299,
353,
2069,
29918,
3166,
29918,
1445,
29898,
3409,
29916,
29918,
4299,
29918,
2084,
29897,
13,
4706,
286,
353,
4673,
29963,
1177,
29949,
3195,
20624,
326,
3950,
29889,
3389,
29898,
2080,
29918,
4299,
29892,
4673,
29963,
1177,
29949,
3195,
20624,
3991,
3101,
13,
4706,
286,
353,
4673,
29963,
1177,
29949,
29906,
8969,
29889,
3389,
29898,
29885,
29892,
4673,
29963,
1177,
29949,
29906,
8969,
3991,
3101,
13,
13,
4706,
1423,
29918,
3150,
29894,
1789,
29906,
13264,
29918,
4905,
29898,
3409,
29916,
29918,
4299,
29918,
2084,
29892,
286,
29889,
2084,
29897,
13,
13,
13,
1753,
1243,
29918,
11303,
7295,
13,
1678,
396,
16809,
304,
278,
1243,
931,
29892,
591,
871,
1243,
697,
1206,
13,
13,
1678,
1207,
29918,
13264,
29918,
29887,
3746,
29918,
21125,
29918,
29887,
798,
386,
580,
13,
13,
1678,
411,
5694,
1445,
29889,
5776,
1971,
653,
9882,
580,
408,
13128,
29918,
3972,
29901,
13,
4706,
2897,
29889,
305,
3972,
29898,
7050,
29918,
3972,
29897,
13,
4706,
3142,
353,
313,
13,
9651,
376,
991,
597,
279,
496,
484,
29899,
3597,
29899,
20571,
3174,
29889,
29879,
29941,
29889,
481,
29899,
29876,
27374,
29899,
29896,
29889,
17260,
10467,
29889,
510,
29914,
9794,
29914,
1688,
29914,
690,
1212,
29896,
29947,
29889,
3409,
29916,
29908,
13,
4706,
1723,
13,
13,
4706,
373,
23818,
29918,
4299,
29918,
2084,
353,
376,
690,
1212,
29896,
29947,
29889,
3409,
29916,
29908,
13,
4706,
5142,
29898,
2271,
29892,
373,
23818,
29918,
4299,
29918,
2084,
29897,
13,
13,
4706,
3240,
353,
1014,
5014,
29889,
3389,
29898,
13,
9651,
518,
13,
18884,
10876,
29889,
4258,
9246,
29892,
13,
18884,
11663,
29885,
613,
13,
18884,
376,
279,
496,
484,
29889,
9465,
29889,
11303,
613,
13,
18884,
15691,
8504,
29922,
3150,
29894,
1789,
29918,
4346,
613,
13,
18884,
376,
4299,
29918,
1445,
29922,
690,
1212,
29896,
29947,
29889,
3409,
29916,
613,
13,
18884,
376,
4905,
29918,
2084,
29922,
4905,
29889,
12637,
613,
13,
9651,
4514,
13,
4706,
1723,
13,
13,
4706,
4974,
3240,
29889,
2457,
401,
1275,
29871,
29900,
13,
13,
4706,
1904,
29918,
2084,
353,
6213,
13,
4706,
411,
9913,
1445,
29889,
3150,
703,
4905,
29889,
12637,
613,
376,
29878,
29901,
18828,
1159,
408,
9913,
29901,
13,
9651,
363,
286,
297,
9913,
29889,
657,
28109,
7295,
13,
18884,
565,
286,
29889,
978,
29889,
1975,
2541,
703,
29918,
29900,
29908,
1125,
13,
462,
1678,
1904,
29918,
2084,
353,
286,
29889,
978,
13,
9651,
9913,
29889,
21111,
497,
17350,
1159,
13,
13,
4706,
4974,
1904,
29918,
2084,
338,
451,
6213,
13,
13,
4706,
1580,
353,
8125,
10299,
29898,
13,
9651,
10970,
11759,
29911,
6073,
10299,
29898,
978,
543,
2080,
29900,
613,
8267,
11759,
29896,
29892,
29871,
29941,
29892,
29871,
29906,
29906,
29946,
29892,
29871,
29906,
29906,
29946,
1402,
26688,
543,
7411,
29941,
29906,
1159,
1402,
13,
9651,
14391,
11759,
29911,
6073,
10299,
29898,
978,
543,
4905,
29900,
613,
8267,
11759,
29896,
29892,
29871,
29896,
29900,
29900,
29900,
1402,
26688,
543,
7411,
29941,
29906,
1159,
1402,
13,
4706,
1723,
13,
13,
4706,
411,
1722,
703,
6550,
29889,
25162,
613,
376,
29893,
1159,
408,
934,
29901,
13,
9651,
343,
8807,
29889,
15070,
29898,
294,
8977,
29898,
6550,
511,
934,
29897,
13,
13,
4706,
3240,
29906,
353,
1014,
5014,
29889,
3389,
29898,
13,
9651,
518,
13,
18884,
10876,
29889,
4258,
9246,
29892,
13,
18884,
11663,
29885,
613,
13,
18884,
376,
279,
496,
484,
29889,
9465,
29889,
11303,
613,
13,
18884,
15691,
8504,
29922,
3150,
29894,
1789,
29906,
13264,
613,
13,
18884,
285,
29908,
4299,
29918,
3972,
3790,
4299,
29918,
2084,
17671,
13,
18884,
376,
4299,
29918,
6550,
29918,
1445,
29922,
6550,
29889,
25162,
613,
13,
18884,
376,
4905,
29918,
2084,
29922,
4905,
29906,
29889,
12637,
613,
13,
9651,
4514,
13,
4706,
1723,
13,
13,
4706,
4974,
3240,
29906,
29889,
2457,
401,
1275,
29871,
29900,
13,
13,
4706,
411,
9913,
1445,
29889,
3150,
703,
4905,
29906,
29889,
12637,
613,
376,
29878,
29901,
18828,
1159,
408,
9913,
29901,
13,
9651,
363,
286,
297,
9913,
29889,
657,
28109,
7295,
13,
18884,
565,
286,
29889,
978,
29889,
1975,
2541,
703,
17314,
29918,
4299,
29908,
1125,
13,
462,
1678,
1904,
29918,
2084,
353,
286,
29889,
978,
13,
9651,
9913,
29889,
21111,
497,
17350,
1159,
13,
13,
4706,
1423,
29918,
3150,
29894,
1789,
29906,
13264,
29918,
4905,
29898,
3409,
29916,
29918,
4299,
29918,
2084,
29892,
1904,
29918,
2084,
29897,
13,
2
] |
lumin/nn/models/blocks/body.py | kiryteo/lumin | 0 | 176036 | from typing import Optional, Callable, Any, List, Dict
import numpy as np
from functools import partial
import torch.nn as nn
import torch
from torch import Tensor
from ..layers.activations import lookup_act
from ..initialisations import lookup_normal_init
from .abs_block import AbsBlock
__all__ = ['FullyConnected', 'MultiBlock']
class AbsBody(AbsBlock):
def __init__(self, n_in:int, feat_map:Dict[str,List[int]],
lookup_init:Callable[[str,Optional[int],Optional[int]],Callable[[Tensor],None]]=lookup_normal_init,
lookup_act:Callable[[str],Any]=lookup_act, freeze:bool=False, bn_class:Callable[[int],nn.Module]=nn.BatchNorm1d):
super().__init__(lookup_init=lookup_init, freeze=freeze)
self.n_in,self.feat_map,self.lookup_act,self.bn_class = n_in,feat_map,lookup_act,bn_class
class FullyConnected(AbsBody):
r'''
Fully connected set of hidden layers. Designed to be passed as a 'body' to :class:`~lumin.nn.models.model_builder.ModelBuilder`.
Supports batch normalisation and dropout.
Order is dense->activation->BN->DO, except when res is true in which case the BN is applied after the addition.
Can optionaly have skip connections between each layer (res=true).
Alternatively can concatinate layers (dense=true)
growth_rate parameter can be used to adjust the width of layers according to width+(width*(depth-1)*growth_rate)
Arguments:
n_in: number of inputs to the block
feat_map: dictionary mapping input features to the model to outputs of head block
depth: number of hidden layers. If res==True and depth is even, depth will be increased by one.
width: base width of each hidden layer
do: if not None will add dropout layers with dropout rates do
bn: whether to use batch normalisation
act: string representation of argument to pass to lookup_act
res: whether to add an additative skip connection every two dense layers. Mutually exclusive with dense.
dense: whether to perform layer-wise concatinations after every layer. Mutually exclusion with res.
growth_rate: rate at which width of dense layers should increase with depth beyond the initial layer. Ignored if res=True. Can be negative.
lookup_init: function taking choice of activation function, number of inputs, and number of outputs an returning a function to initialise layer weights.
lookup_act: function taking choice of activation function and returning an activation function layer
freeze: whether to start with module parameters set to untrainable
bn_class: class to use for BatchNorm, default is `nn.BatchNorm1d`
Examples::
>>> body = FullyConnected(n_in=32, feat_map=head.feat_map, depth=4,
... width=100, act='relu')
>>>
>>> body = FullyConnected(n_in=32, feat_map=head.feat_map, depth=4,
... width=200, act='relu', growth_rate=-0.3)
>>>
>>> body = FullyConnected(n_in=32, feat_map=head.feat_map, depth=4,
... width=100, act='swish', do=0.1, res=True)
>>>
>>> body = FullyConnected(n_in=32, feat_map=head.feat_map, depth=6,
... width=32, act='selu', dense=True,
... growth_rate=0.5)
>>>
>>> body = FullyConnected(n_in=32, feat_map=head.feat_map, depth=6,
... width=50, act='prelu', bn=True,
... lookup_init=lookup_uniform_init)
'''
def __init__(self, n_in:int, feat_map:Dict[str,List[int]], depth:int, width:int, do:float=0, bn:bool=False, act:str='relu', res:bool=False,
dense:bool=False, growth_rate:int=0, lookup_init:Callable[[str,Optional[int],Optional[int]],Callable[[Tensor],None]]=lookup_normal_init,
lookup_act:Callable[[str],Any]=lookup_act, freeze:bool=False, bn_class:Callable[[int],nn.Module]=nn.BatchNorm1d):
super().__init__(n_in=n_in, feat_map=feat_map, lookup_init=lookup_init, lookup_act=lookup_act, freeze=freeze, bn_class=bn_class)
self.depth,self.width,self.do,self.bn,self.act,self.res,self.dense,self.growth_rate = depth,width,do,bn,act,res,dense,growth_rate
if self.res:
self.depth = 1+int(np.floor(self.depth/2)) # One upscale layer + each subsequent block will contain 2 layers
self.res_bns = nn.ModuleList([self.bn_class(self.width) for d in range(self.depth-1)])
self.layers = nn.ModuleList([self._get_layer(idx=d, fan_in=self.width, fan_out=self.width)
if d > 0 else self._get_layer(idx=d, fan_in=self.n_in, fan_out=self.width)
for d in range(self.depth)])
elif self.dense:
self.layers = []
for d in range(self.depth):
self.layers.append(self._get_layer(idx=d, fan_in=self.n_in if d == 0 else self.n_in+np.sum([l[0].out_features for l in self.layers]),
fan_out=max(1,self.width+int(self.width*d*self.growth_rate))))
self.layers = nn.ModuleList(self.layers)
else:
self.layers = nn.Sequential(*[self._get_layer(idx=d, fan_in=self.width+int(self.width*(d-1)*self.growth_rate),
fan_out=self.width+int(self.width*d*self.growth_rate))
if d > 0 else self._get_layer(idx=d, fan_in=self.n_in, fan_out=self.width)
for d in range(self.depth)])
if self.freeze: self.freeze_layers()
def _get_layer(self, idx:int, fan_in:Optional[int]=None, fan_out:Optional[int]=None) -> nn.Module:
fan_in = self.width if fan_in is None else fan_in
fan_out = self.width if fan_out is None else fan_out
if fan_in < 1: fan_in = 1
if fan_out < 1: fan_out = 1
layers = []
for i in range(2 if self.res and idx > 0 else 1):
layers.append(nn.Linear(fan_in, fan_out))
self.lookup_init(self.act, fan_in, fan_out)(layers[-1].weight)
nn.init.zeros_(layers[-1].bias)
if self.act != 'linear': layers.append(self.lookup_act(self.act))
if self.bn and i == 0: layers.append(self.bn_class(fan_out)) # In case of residual, BN will be added after addition
if self.do:
if self.act == 'selu': layers.append(nn.AlphaDropout(self.do))
else: layers.append(nn.Dropout(self.do))
return nn.Sequential(*layers)
def forward(self, x:Tensor) -> Tensor:
if self.dense:
for l in self.layers[:-1]: x = torch.cat((l(x), x), -1)
x = self.layers[-1](x)
elif self.res:
for i, l in enumerate(self.layers):
if i > 0:
x = l(x)+x
x = self.res_bns[i-1](x) # Renormalise after addition
else:
x = l(x)
else:
x = self.layers(x)
return x
def get_out_size(self) -> int:
r'''
Get size width of output layer
Returns:
Width of output layer
'''
return self.layers[-1][0].out_features
class MultiBlock(AbsBody):
r'''
Body block allowing outputs of head block to be split amongst a series of body blocks.
Output is the concatination of all sub-body blocks.
Optionally, single-neuron 'bottleneck' layers can be used to pass an input to each sub-block based on a learned function of the input features that block
would otherwise not receive, i.e. a highly compressed representation of the rest of teh feature space.
Arguments:
n_in: number of inputs to the block
feat_map: dictionary mapping input features to the model to outputs of head block
blocks: list of uninstantciated :class:`~lumin.nn.models.blocks.body.AbsBody` blocks to which to pass a subsection of the total inputs. Note that
partials should be used to set any relevant parameters at initialisation time
feats_per_block: list of lists of names of features to pass to each :class:`~lumin.nn.models.blocks.body.AbsBody`, not that the feat_map provided by
:class:`~lumin.nn.models.blocks.head.AbsHead` will map features to their relavant head outputs
bottleneck: if true, each block will receive the output of a single neuron which takes as input all the features which each given block does not
directly take as inputs
bottleneck_act: if set to a string representation of an activation function, the output of each bottleneck neuron will be passed throguh the defined
activation function before being passed to their associated blocks
lookup_init: function taking choice of activation function, number of inputs, and number of outputs an returning a function to initialise layer weights.
lookup_act: function taking choice of activation function and returning an activation function layer
freeze: whether to start with module parameters set to untrainable
Examples::
>>> body = MultiBlock(
... blocks=[partial(FullyConnected, depth=1, width=50, act='swish'),
... partial(FullyConnected, depth=6, width=55, act='swish',
... dense=True, growth_rate=-0.1)],
... feats_per_block=[[f for f in train_feats if 'DER_' in f],
... [f for f in train_feats if 'PRI_' in f]])
>>>
>>> body = MultiBlock(
... blocks=[partial(FullyConnected, depth=1, width=50, act='swish'),
... partial(FullyConnected, depth=6, width=55, act='swish',
... dense=True, growth_rate=-0.1)],
... feats_per_block=[[f for f in train_feats if 'DER_' in f],
... [f for f in train_feats if 'PRI_' in f]],
... bottleneck=True)
>>>
>>> body = MultiBlock(
... blocks=[partial(FullyConnected, depth=1, width=50, act='swish'),
... partial(FullyConnected, depth=6, width=55, act='swish',
... dense=True, growth_rate=-0.1)],
... feats_per_block=[[f for f in train_feats if 'DER_' in f],
... [f for f in train_feats if 'PRI_' in f]],
... bottleneck=True, bottleneck_act='swish')
'''
def __init__(self, n_in:int, feat_map:Dict[str,List[int]], blocks:List[partial], feats_per_block:List[List[str]],
bottleneck_sz:int=0, bottleneck_act:Optional[str]=None,
lookup_init:Callable[[str,Optional[int],Optional[int]],Callable[[Tensor],None]]=lookup_normal_init,
lookup_act:Callable[[str],Any]=lookup_act, freeze:bool=False):
super().__init__(n_in=n_in, feat_map=feat_map, lookup_init=lookup_init, lookup_act=lookup_act, freeze=freeze)
self.feats_per_block,self.bottleneck_sz,self.bottleneck_act = feats_per_block,bottleneck_sz,bottleneck_act
self.blocks,self.n_out,self.masks,self.bottleneck_blocks = [],0,[],None
if self.bottleneck_sz > 0:
self.bottleneck_blocks,self.bottleneck_masks = [],[]
for fpb in self.feats_per_block:
tmp_map = {f: self.feat_map[f] for f in self.feat_map if f not in fpb}
self.bottleneck_masks.append([i for f in tmp_map for i in tmp_map[f]])
self.bottleneck_blocks.append(self._get_bottleneck(self.bottleneck_masks[-1]))
self.bottleneck_blocks = nn.ModuleList(self.bottleneck_blocks)
for i, b in enumerate(blocks):
tmp_map = {f: self.feat_map[f] for f in self.feat_map if f in self.feats_per_block[i]}
self.masks.append([i for f in tmp_map for i in tmp_map[f]])
self.blocks.append(b(n_in=len(self.masks[-1])+self.bottleneck_sz, feat_map=tmp_map, lookup_init=self.lookup_init,
lookup_act=self.lookup_act, freeze=self.freeze))
self.n_out += self.blocks[-1].get_out_size()
self.blocks = nn.ModuleList(self.blocks)
def _get_bottleneck(self, mask:List[int]) -> nn.Module:
layers = [nn.Linear(len(mask), self.bottleneck_sz)]
if self.bottleneck_act is None:
init = self.lookup_init('linear', len(mask), self.bottleneck_sz)
else:
init = self.lookup_init(self.bottleneck_act, len(mask), self.bottleneck_sz)
layers.append(self.lookup_act(self.bottleneck_act))
init(layers[0].weight)
nn.init.zeros_(layers[0].bias)
return nn.Sequential(*layers)
def get_out_size(self) -> int:
r'''
Get size width of output layer
Returns:
Total number of outputs across all blocks
'''
return self.n_out
def forward(self, x:Tensor) -> Tensor:
y = None
for i, b in enumerate(self.blocks):
if self.bottleneck_sz:
a = self.bottleneck_blocks[i](x[:,self.bottleneck_masks[i]])
tmp_x = torch.cat((x[:,self.masks[i]], a), -1)
else:
tmp_x = x[:,self.masks[i]]
out = b(tmp_x)
if y is None: y = out
else: y = torch.cat((y, out), -1)
return y
| [
1,
515,
19229,
1053,
28379,
29892,
8251,
519,
29892,
3139,
29892,
2391,
29892,
360,
919,
13,
5215,
12655,
408,
7442,
13,
3166,
2090,
312,
8789,
1053,
7687,
13,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
5215,
4842,
305,
13,
3166,
4842,
305,
1053,
323,
6073,
13,
13,
3166,
6317,
29277,
29889,
11236,
800,
1053,
16280,
29918,
627,
13,
3166,
6317,
11228,
275,
800,
1053,
16280,
29918,
8945,
29918,
2344,
13,
3166,
869,
6897,
29918,
1271,
1053,
24650,
7445,
13,
13,
1649,
497,
1649,
353,
6024,
29943,
352,
368,
20971,
2954,
742,
525,
15329,
7445,
2033,
13,
13,
13,
1990,
24650,
8434,
29898,
4920,
29879,
7445,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
302,
29918,
262,
29901,
524,
29892,
1238,
271,
29918,
1958,
29901,
21533,
29961,
710,
29892,
1293,
29961,
524,
20526,
13,
462,
16280,
29918,
2344,
29901,
5594,
519,
8999,
710,
29892,
27636,
29961,
524,
1402,
27636,
29961,
524,
20526,
5594,
519,
8999,
29911,
6073,
1402,
8516,
5262,
29922,
20401,
29918,
8945,
29918,
2344,
29892,
13,
462,
16280,
29918,
627,
29901,
5594,
519,
8999,
710,
1402,
10773,
13192,
20401,
29918,
627,
29892,
3889,
911,
29901,
11227,
29922,
8824,
29892,
289,
29876,
29918,
1990,
29901,
5594,
519,
8999,
524,
1402,
15755,
29889,
7355,
13192,
15755,
29889,
23145,
29940,
555,
29896,
29881,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
20401,
29918,
2344,
29922,
20401,
29918,
2344,
29892,
3889,
911,
29922,
9021,
911,
29897,
13,
4706,
1583,
29889,
29876,
29918,
262,
29892,
1311,
29889,
1725,
271,
29918,
1958,
29892,
1311,
29889,
20401,
29918,
627,
29892,
1311,
29889,
11197,
29918,
1990,
353,
302,
29918,
262,
29892,
1725,
271,
29918,
1958,
29892,
20401,
29918,
627,
29892,
11197,
29918,
1990,
13,
268,
13,
13,
1990,
23004,
368,
20971,
2954,
29898,
4920,
29879,
8434,
1125,
13,
1678,
364,
12008,
13,
1678,
23004,
368,
6631,
731,
310,
7934,
15359,
29889,
12037,
287,
304,
367,
4502,
408,
263,
525,
2587,
29915,
304,
584,
1990,
18078,
30022,
29880,
9735,
29889,
15755,
29889,
9794,
29889,
4299,
29918,
16409,
29889,
3195,
5627,
1412,
13,
1678,
18601,
29879,
9853,
4226,
4371,
322,
5768,
449,
29889,
13,
1678,
8170,
338,
20619,
976,
11236,
362,
976,
29933,
29940,
976,
3970,
29892,
5174,
746,
620,
338,
1565,
297,
607,
1206,
278,
350,
29940,
338,
7436,
1156,
278,
6124,
29889,
13,
1678,
1815,
13136,
29891,
505,
14383,
12368,
1546,
1269,
7546,
313,
690,
29922,
3009,
467,
13,
1678,
20360,
508,
3022,
271,
16976,
15359,
313,
1145,
344,
29922,
3009,
29897,
13,
1678,
14321,
29918,
10492,
3443,
508,
367,
1304,
304,
10365,
278,
2920,
310,
15359,
5034,
304,
2920,
17108,
2103,
16395,
19488,
29899,
29896,
11877,
29887,
798,
386,
29918,
10492,
29897,
13,
13,
1678,
11842,
9331,
29901,
13,
4706,
302,
29918,
262,
29901,
1353,
310,
10970,
304,
278,
2908,
13,
4706,
1238,
271,
29918,
1958,
29901,
8600,
10417,
1881,
5680,
304,
278,
1904,
304,
14391,
310,
2343,
2908,
13,
4706,
10809,
29901,
1353,
310,
7934,
15359,
29889,
960,
620,
1360,
5574,
322,
10809,
338,
1584,
29892,
10809,
674,
367,
11664,
491,
697,
29889,
13,
4706,
2920,
29901,
2967,
2920,
310,
1269,
7934,
7546,
13,
4706,
437,
29901,
565,
451,
6213,
674,
788,
5768,
449,
15359,
411,
5768,
449,
19257,
437,
13,
4706,
289,
29876,
29901,
3692,
304,
671,
9853,
4226,
4371,
13,
4706,
1044,
29901,
1347,
8954,
310,
2980,
304,
1209,
304,
16280,
29918,
627,
13,
4706,
620,
29901,
3692,
304,
788,
385,
788,
23378,
14383,
3957,
1432,
1023,
20619,
15359,
29889,
20749,
1474,
29192,
411,
20619,
29889,
13,
4706,
20619,
29901,
3692,
304,
2189,
7546,
29899,
3538,
3022,
21203,
800,
1156,
1432,
7546,
29889,
20749,
1474,
429,
10085,
411,
620,
29889,
13,
4706,
14321,
29918,
10492,
29901,
6554,
472,
607,
2920,
310,
20619,
15359,
881,
7910,
411,
10809,
8724,
278,
2847,
7546,
29889,
18076,
4395,
565,
620,
29922,
5574,
29889,
1815,
367,
8178,
29889,
13,
4706,
16280,
29918,
2344,
29901,
740,
5622,
7348,
310,
26229,
740,
29892,
1353,
310,
10970,
29892,
322,
1353,
310,
14391,
385,
7863,
263,
740,
304,
2847,
895,
7546,
18177,
29889,
13,
4706,
16280,
29918,
627,
29901,
740,
5622,
7348,
310,
26229,
740,
322,
7863,
385,
26229,
740,
7546,
13,
4706,
3889,
911,
29901,
3692,
304,
1369,
411,
3883,
4128,
731,
304,
443,
14968,
519,
13,
4706,
289,
29876,
29918,
1990,
29901,
770,
304,
671,
363,
350,
905,
29940,
555,
29892,
2322,
338,
421,
15755,
29889,
23145,
29940,
555,
29896,
29881,
29952,
13,
13,
1678,
1222,
9422,
1057,
13,
4706,
8653,
3573,
353,
23004,
368,
20971,
2954,
29898,
29876,
29918,
262,
29922,
29941,
29906,
29892,
1238,
271,
29918,
1958,
29922,
2813,
29889,
1725,
271,
29918,
1958,
29892,
10809,
29922,
29946,
29892,
13,
4706,
2023,
462,
539,
2920,
29922,
29896,
29900,
29900,
29892,
1044,
2433,
2674,
29884,
1495,
13,
4706,
8653,
13,
4706,
8653,
3573,
353,
23004,
368,
20971,
2954,
29898,
29876,
29918,
262,
29922,
29941,
29906,
29892,
1238,
271,
29918,
1958,
29922,
2813,
29889,
1725,
271,
29918,
1958,
29892,
10809,
29922,
29946,
29892,
13,
4706,
2023,
462,
539,
2920,
29922,
29906,
29900,
29900,
29892,
1044,
2433,
2674,
29884,
742,
14321,
29918,
10492,
10457,
29900,
29889,
29941,
29897,
13,
4706,
8653,
462,
462,
259,
13,
4706,
8653,
3573,
353,
23004,
368,
20971,
2954,
29898,
29876,
29918,
262,
29922,
29941,
29906,
29892,
1238,
271,
29918,
1958,
29922,
2813,
29889,
1725,
271,
29918,
1958,
29892,
10809,
29922,
29946,
29892,
13,
4706,
2023,
462,
539,
2920,
29922,
29896,
29900,
29900,
29892,
1044,
2433,
2774,
728,
742,
437,
29922,
29900,
29889,
29896,
29892,
620,
29922,
5574,
29897,
13,
4706,
8653,
462,
462,
259,
13,
4706,
8653,
3573,
353,
23004,
368,
20971,
2954,
29898,
29876,
29918,
262,
29922,
29941,
29906,
29892,
1238,
271,
29918,
1958,
29922,
2813,
29889,
1725,
271,
29918,
1958,
29892,
10809,
29922,
29953,
29892,
13,
4706,
2023,
462,
539,
2920,
29922,
29941,
29906,
29892,
1044,
2433,
2838,
29884,
742,
20619,
29922,
5574,
29892,
13,
4706,
2023,
462,
539,
14321,
29918,
10492,
29922,
29900,
29889,
29945,
29897,
13,
4706,
8653,
462,
462,
259,
13,
4706,
8653,
3573,
353,
23004,
368,
20971,
2954,
29898,
29876,
29918,
262,
29922,
29941,
29906,
29892,
1238,
271,
29918,
1958,
29922,
2813,
29889,
1725,
271,
29918,
1958,
29892,
10809,
29922,
29953,
29892,
13,
4706,
2023,
462,
539,
2920,
29922,
29945,
29900,
29892,
1044,
2433,
1457,
6092,
742,
289,
29876,
29922,
5574,
29892,
13,
4706,
2023,
462,
539,
16280,
29918,
2344,
29922,
20401,
29918,
29590,
29918,
2344,
29897,
13,
1678,
14550,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
302,
29918,
262,
29901,
524,
29892,
1238,
271,
29918,
1958,
29901,
21533,
29961,
710,
29892,
1293,
29961,
524,
20526,
10809,
29901,
524,
29892,
2920,
29901,
524,
29892,
437,
29901,
7411,
29922,
29900,
29892,
289,
29876,
29901,
11227,
29922,
8824,
29892,
1044,
29901,
710,
2433,
2674,
29884,
742,
620,
29901,
11227,
29922,
8824,
29892,
13,
462,
20619,
29901,
11227,
29922,
8824,
29892,
14321,
29918,
10492,
29901,
524,
29922,
29900,
29892,
16280,
29918,
2344,
29901,
5594,
519,
8999,
710,
29892,
27636,
29961,
524,
1402,
27636,
29961,
524,
20526,
5594,
519,
8999,
29911,
6073,
1402,
8516,
5262,
29922,
20401,
29918,
8945,
29918,
2344,
29892,
13,
462,
16280,
29918,
627,
29901,
5594,
519,
8999,
710,
1402,
10773,
13192,
20401,
29918,
627,
29892,
3889,
911,
29901,
11227,
29922,
8824,
29892,
289,
29876,
29918,
1990,
29901,
5594,
519,
8999,
524,
1402,
15755,
29889,
7355,
13192,
15755,
29889,
23145,
29940,
555,
29896,
29881,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
29876,
29918,
262,
29922,
29876,
29918,
262,
29892,
1238,
271,
29918,
1958,
29922,
1725,
271,
29918,
1958,
29892,
16280,
29918,
2344,
29922,
20401,
29918,
2344,
29892,
16280,
29918,
627,
29922,
20401,
29918,
627,
29892,
3889,
911,
29922,
9021,
911,
29892,
289,
29876,
29918,
1990,
29922,
11197,
29918,
1990,
29897,
13,
4706,
1583,
29889,
19488,
29892,
1311,
29889,
2103,
29892,
1311,
29889,
1867,
29892,
1311,
29889,
11197,
29892,
1311,
29889,
627,
29892,
1311,
29889,
690,
29892,
1311,
29889,
1145,
344,
29892,
1311,
29889,
29887,
798,
386,
29918,
10492,
353,
10809,
29892,
2103,
29892,
1867,
29892,
11197,
29892,
627,
29892,
690,
29892,
1145,
344,
29892,
29887,
798,
386,
29918,
10492,
13,
13,
4706,
565,
1583,
29889,
690,
29901,
13,
9651,
1583,
29889,
19488,
353,
29871,
29896,
29974,
524,
29898,
9302,
29889,
14939,
29898,
1311,
29889,
19488,
29914,
29906,
876,
29871,
396,
3118,
24081,
29883,
744,
7546,
718,
1269,
15352,
2908,
674,
1712,
29871,
29906,
15359,
13,
9651,
1583,
29889,
690,
29918,
29890,
1983,
353,
302,
29876,
29889,
7355,
1293,
4197,
1311,
29889,
11197,
29918,
1990,
29898,
1311,
29889,
2103,
29897,
363,
270,
297,
3464,
29898,
1311,
29889,
19488,
29899,
29896,
29897,
2314,
13,
9651,
1583,
29889,
29277,
353,
302,
29876,
29889,
7355,
1293,
4197,
1311,
3032,
657,
29918,
13148,
29898,
13140,
29922,
29881,
29892,
13524,
29918,
262,
29922,
1311,
29889,
2103,
29892,
13524,
29918,
449,
29922,
1311,
29889,
2103,
29897,
13,
462,
462,
308,
565,
270,
1405,
29871,
29900,
1683,
1583,
3032,
657,
29918,
13148,
29898,
13140,
29922,
29881,
29892,
13524,
29918,
262,
29922,
1311,
29889,
29876,
29918,
262,
29892,
13524,
29918,
449,
29922,
1311,
29889,
2103,
29897,
13,
462,
462,
308,
363,
270,
297,
3464,
29898,
1311,
29889,
19488,
29897,
2314,
13,
4706,
25342,
1583,
29889,
1145,
344,
29901,
13,
9651,
1583,
29889,
29277,
353,
5159,
13,
9651,
363,
270,
297,
3464,
29898,
1311,
29889,
19488,
1125,
13,
18884,
1583,
29889,
29277,
29889,
4397,
29898,
1311,
3032,
657,
29918,
13148,
29898,
13140,
29922,
29881,
29892,
13524,
29918,
262,
29922,
1311,
29889,
29876,
29918,
262,
565,
270,
1275,
29871,
29900,
1683,
1583,
29889,
29876,
29918,
262,
29974,
9302,
29889,
2083,
4197,
29880,
29961,
29900,
1822,
449,
29918,
22100,
363,
301,
297,
1583,
29889,
29277,
11724,
13,
462,
462,
259,
13524,
29918,
449,
29922,
3317,
29898,
29896,
29892,
1311,
29889,
2103,
29974,
524,
29898,
1311,
29889,
2103,
29930,
29881,
29930,
1311,
29889,
29887,
798,
386,
29918,
10492,
13697,
13,
9651,
1583,
29889,
29277,
353,
302,
29876,
29889,
7355,
1293,
29898,
1311,
29889,
29277,
29897,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
29277,
353,
302,
29876,
29889,
16941,
2556,
10456,
29961,
1311,
3032,
657,
29918,
13148,
29898,
13140,
29922,
29881,
29892,
13524,
29918,
262,
29922,
1311,
29889,
2103,
29974,
524,
29898,
1311,
29889,
2103,
16395,
29881,
29899,
29896,
11877,
1311,
29889,
29887,
798,
386,
29918,
10492,
511,
13,
462,
462,
462,
3986,
13524,
29918,
449,
29922,
1311,
29889,
2103,
29974,
524,
29898,
1311,
29889,
2103,
29930,
29881,
29930,
1311,
29889,
29887,
798,
386,
29918,
10492,
876,
13,
462,
462,
3986,
565,
270,
1405,
29871,
29900,
1683,
1583,
3032,
657,
29918,
13148,
29898,
13140,
29922,
29881,
29892,
13524,
29918,
262,
29922,
1311,
29889,
29876,
29918,
262,
29892,
13524,
29918,
449,
29922,
1311,
29889,
2103,
29897,
13,
462,
462,
3986,
363,
270,
297,
3464,
29898,
1311,
29889,
19488,
29897,
2314,
13,
632,
13,
4706,
565,
1583,
29889,
9021,
911,
29901,
1583,
29889,
9021,
911,
29918,
29277,
580,
13,
13,
1678,
822,
903,
657,
29918,
13148,
29898,
1311,
29892,
22645,
29901,
524,
29892,
13524,
29918,
262,
29901,
27636,
29961,
524,
13192,
8516,
29892,
13524,
29918,
449,
29901,
27636,
29961,
524,
13192,
8516,
29897,
1599,
302,
29876,
29889,
7355,
29901,
13,
4706,
13524,
29918,
262,
29871,
353,
1583,
29889,
2103,
565,
13524,
29918,
262,
29871,
338,
6213,
1683,
13524,
29918,
262,
13,
4706,
13524,
29918,
449,
353,
1583,
29889,
2103,
565,
13524,
29918,
449,
338,
6213,
1683,
13524,
29918,
449,
13,
4706,
565,
13524,
29918,
262,
29871,
529,
29871,
29896,
29901,
13524,
29918,
262,
29871,
353,
29871,
29896,
13,
4706,
565,
13524,
29918,
449,
529,
29871,
29896,
29901,
13524,
29918,
449,
353,
29871,
29896,
308,
13,
308,
13,
4706,
15359,
353,
5159,
13,
4706,
363,
474,
297,
3464,
29898,
29906,
565,
1583,
29889,
690,
322,
22645,
1405,
29871,
29900,
1683,
29871,
29896,
1125,
13,
9651,
15359,
29889,
4397,
29898,
15755,
29889,
12697,
29898,
12963,
29918,
262,
29892,
13524,
29918,
449,
876,
13,
9651,
1583,
29889,
20401,
29918,
2344,
29898,
1311,
29889,
627,
29892,
13524,
29918,
262,
29892,
13524,
29918,
449,
5033,
29277,
14352,
29896,
1822,
7915,
29897,
13,
9651,
302,
29876,
29889,
2344,
29889,
3298,
359,
23538,
29277,
14352,
29896,
1822,
29890,
3173,
29897,
13,
9651,
565,
1583,
29889,
627,
2804,
525,
10660,
2396,
15359,
29889,
4397,
29898,
1311,
29889,
20401,
29918,
627,
29898,
1311,
29889,
627,
876,
13,
9651,
565,
1583,
29889,
11197,
322,
474,
1275,
29871,
29900,
29901,
29871,
15359,
29889,
4397,
29898,
1311,
29889,
11197,
29918,
1990,
29898,
12963,
29918,
449,
876,
29871,
396,
512,
1206,
310,
10995,
950,
29892,
350,
29940,
674,
367,
2715,
1156,
6124,
13,
9651,
565,
1583,
29889,
1867,
29901,
29871,
13,
18884,
565,
1583,
29889,
627,
1275,
525,
2838,
29884,
2396,
15359,
29889,
4397,
29898,
15755,
29889,
28630,
15063,
449,
29898,
1311,
29889,
1867,
876,
13,
18884,
1683,
29901,
462,
29871,
15359,
29889,
4397,
29898,
15755,
29889,
15063,
449,
29898,
1311,
29889,
1867,
876,
13,
4706,
736,
302,
29876,
29889,
16941,
2556,
10456,
29277,
29897,
13,
268,
13,
1678,
822,
6375,
29898,
1311,
29892,
921,
29901,
29911,
6073,
29897,
1599,
323,
6073,
29901,
13,
4706,
565,
1583,
29889,
1145,
344,
29901,
13,
9651,
363,
301,
297,
1583,
29889,
29277,
7503,
29899,
29896,
5387,
921,
353,
4842,
305,
29889,
4117,
3552,
29880,
29898,
29916,
511,
921,
511,
448,
29896,
29897,
13,
9651,
921,
353,
1583,
29889,
29277,
14352,
29896,
850,
29916,
29897,
13,
4706,
25342,
1583,
29889,
690,
29901,
13,
9651,
363,
474,
29892,
301,
297,
26985,
29898,
1311,
29889,
29277,
1125,
13,
18884,
565,
474,
1405,
29871,
29900,
29901,
13,
462,
1678,
921,
353,
301,
29898,
29916,
7240,
29916,
13,
462,
1678,
921,
353,
1583,
29889,
690,
29918,
29890,
1983,
29961,
29875,
29899,
29896,
850,
29916,
29897,
29871,
396,
7493,
2759,
895,
1156,
6124,
13,
18884,
1683,
29901,
13,
462,
1678,
921,
353,
301,
29898,
29916,
29897,
13,
4706,
1683,
29901,
13,
9651,
921,
353,
1583,
29889,
29277,
29898,
29916,
29897,
13,
4706,
736,
921,
13,
268,
13,
1678,
822,
679,
29918,
449,
29918,
2311,
29898,
1311,
29897,
1599,
938,
29901,
13,
4706,
364,
12008,
13,
4706,
3617,
2159,
2920,
310,
1962,
7546,
13,
13,
4706,
16969,
29901,
13,
9651,
21485,
310,
1962,
7546,
13,
4706,
14550,
13,
308,
13,
4706,
736,
1583,
29889,
29277,
14352,
29896,
3816,
29900,
1822,
449,
29918,
22100,
13,
13,
13,
1990,
14974,
7445,
29898,
4920,
29879,
8434,
1125,
13,
1678,
364,
12008,
13,
1678,
24928,
2908,
14372,
14391,
310,
2343,
2908,
304,
367,
6219,
22611,
263,
3652,
310,
3573,
10930,
29889,
13,
1678,
10604,
338,
278,
3022,
271,
3381,
310,
599,
1014,
29899,
2587,
10930,
29889,
13,
1678,
10831,
635,
29892,
2323,
29899,
16115,
265,
525,
29890,
1501,
29880,
1600,
384,
29915,
15359,
508,
367,
1304,
304,
1209,
385,
1881,
304,
1269,
1014,
29899,
1271,
2729,
373,
263,
10972,
740,
310,
278,
1881,
5680,
393,
2908,
13,
1678,
723,
6467,
451,
7150,
29892,
474,
29889,
29872,
29889,
263,
29871,
10712,
419,
13120,
8954,
310,
278,
1791,
310,
734,
29882,
4682,
2913,
29889,
13,
13,
1678,
11842,
9331,
29901,
13,
4706,
302,
29918,
262,
29901,
1353,
310,
10970,
304,
278,
2908,
13,
4706,
1238,
271,
29918,
1958,
29901,
8600,
10417,
1881,
5680,
304,
278,
1904,
304,
14391,
310,
2343,
2908,
13,
4706,
10930,
29901,
1051,
310,
443,
2611,
424,
455,
630,
584,
1990,
18078,
30022,
29880,
9735,
29889,
15755,
29889,
9794,
29889,
1271,
29879,
29889,
2587,
29889,
4920,
29879,
8434,
29952,
10930,
304,
607,
304,
1209,
263,
1014,
2042,
310,
278,
3001,
10970,
29889,
3940,
393,
13,
9651,
7687,
29879,
881,
367,
1304,
304,
731,
738,
8018,
4128,
472,
2847,
4371,
931,
13,
4706,
1238,
1446,
29918,
546,
29918,
1271,
29901,
1051,
310,
8857,
310,
2983,
310,
5680,
304,
1209,
304,
1269,
584,
1990,
18078,
30022,
29880,
9735,
29889,
15755,
29889,
9794,
29889,
1271,
29879,
29889,
2587,
29889,
4920,
29879,
8434,
1673,
451,
393,
278,
1238,
271,
29918,
1958,
4944,
491,
13,
9651,
584,
1990,
18078,
30022,
29880,
9735,
29889,
15755,
29889,
9794,
29889,
1271,
29879,
29889,
2813,
29889,
4920,
29879,
5494,
29952,
674,
2910,
5680,
304,
1009,
337,
4112,
424,
2343,
14391,
13,
4706,
18046,
29880,
1600,
384,
29901,
565,
1565,
29892,
1269,
2908,
674,
7150,
278,
1962,
310,
263,
2323,
26808,
265,
607,
4893,
408,
1881,
599,
278,
5680,
607,
1269,
2183,
2908,
947,
451,
13,
9651,
4153,
2125,
408,
10970,
13,
4706,
18046,
29880,
1600,
384,
29918,
627,
29901,
565,
731,
304,
263,
1347,
8954,
310,
385,
26229,
740,
29892,
278,
1962,
310,
1269,
18046,
29880,
1600,
384,
26808,
265,
674,
367,
4502,
20961,
2543,
29882,
278,
3342,
13,
9651,
26229,
740,
1434,
1641,
4502,
304,
1009,
6942,
10930,
13,
4706,
16280,
29918,
2344,
29901,
740,
5622,
7348,
310,
26229,
740,
29892,
1353,
310,
10970,
29892,
322,
1353,
310,
14391,
385,
7863,
263,
740,
304,
2847,
895,
7546,
18177,
29889,
13,
4706,
16280,
29918,
627,
29901,
740,
5622,
7348,
310,
26229,
740,
322,
7863,
385,
26229,
740,
7546,
13,
4706,
3889,
911,
29901,
3692,
304,
1369,
411,
3883,
4128,
731,
304,
443,
14968,
519,
13,
13,
1678,
1222,
9422,
1057,
13,
4706,
8653,
3573,
353,
14974,
7445,
29898,
13,
4706,
2023,
268,
10930,
11759,
3846,
29898,
29943,
352,
368,
20971,
2954,
29892,
10809,
29922,
29896,
29892,
2920,
29922,
29945,
29900,
29892,
1044,
2433,
2774,
728,
5477,
13,
4706,
2023,
632,
7687,
29898,
29943,
352,
368,
20971,
2954,
29892,
10809,
29922,
29953,
29892,
2920,
29922,
29945,
29945,
29892,
1044,
2433,
2774,
728,
742,
13,
4706,
2023,
462,
268,
20619,
29922,
5574,
29892,
14321,
29918,
10492,
10457,
29900,
29889,
29896,
29897,
1402,
13,
4706,
2023,
268,
1238,
1446,
29918,
546,
29918,
1271,
29922,
8999,
29888,
363,
285,
297,
7945,
29918,
1725,
1446,
565,
525,
8032,
29918,
29915,
297,
285,
1402,
13,
4706,
2023,
462,
418,
518,
29888,
363,
285,
297,
7945,
29918,
1725,
1446,
565,
525,
29829,
29918,
29915,
297,
285,
24960,
13,
4706,
8653,
13,
4706,
8653,
3573,
353,
14974,
7445,
29898,
13,
4706,
2023,
268,
10930,
11759,
3846,
29898,
29943,
352,
368,
20971,
2954,
29892,
10809,
29922,
29896,
29892,
2920,
29922,
29945,
29900,
29892,
1044,
2433,
2774,
728,
5477,
13,
4706,
2023,
268,
7687,
29898,
29943,
352,
368,
20971,
2954,
29892,
10809,
29922,
29953,
29892,
2920,
29922,
29945,
29945,
29892,
1044,
2433,
2774,
728,
742,
13,
4706,
2023,
632,
20619,
29922,
5574,
29892,
14321,
29918,
10492,
10457,
29900,
29889,
29896,
29897,
1402,
13,
4706,
2023,
268,
1238,
1446,
29918,
546,
29918,
1271,
29922,
8999,
29888,
363,
285,
297,
7945,
29918,
1725,
1446,
565,
525,
8032,
29918,
29915,
297,
285,
1402,
13,
4706,
2023,
462,
418,
518,
29888,
363,
285,
297,
7945,
29918,
1725,
1446,
565,
525,
29829,
29918,
29915,
297,
285,
20526,
13,
4706,
2023,
268,
18046,
29880,
1600,
384,
29922,
5574,
29897,
13,
4706,
8653,
13,
4706,
8653,
3573,
353,
14974,
7445,
29898,
13,
4706,
2023,
268,
10930,
11759,
3846,
29898,
29943,
352,
368,
20971,
2954,
29892,
10809,
29922,
29896,
29892,
2920,
29922,
29945,
29900,
29892,
1044,
2433,
2774,
728,
5477,
13,
4706,
2023,
632,
7687,
29898,
29943,
352,
368,
20971,
2954,
29892,
10809,
29922,
29953,
29892,
2920,
29922,
29945,
29945,
29892,
1044,
2433,
2774,
728,
742,
13,
4706,
2023,
462,
268,
20619,
29922,
5574,
29892,
14321,
29918,
10492,
10457,
29900,
29889,
29896,
29897,
1402,
13,
4706,
2023,
268,
1238,
1446,
29918,
546,
29918,
1271,
29922,
8999,
29888,
363,
285,
297,
7945,
29918,
1725,
1446,
565,
525,
8032,
29918,
29915,
297,
285,
1402,
13,
4706,
2023,
462,
418,
518,
29888,
363,
285,
297,
7945,
29918,
1725,
1446,
565,
525,
29829,
29918,
29915,
297,
285,
20526,
13,
4706,
2023,
268,
18046,
29880,
1600,
384,
29922,
5574,
29892,
18046,
29880,
1600,
384,
29918,
627,
2433,
2774,
728,
1495,
13,
1678,
14550,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
302,
29918,
262,
29901,
524,
29892,
1238,
271,
29918,
1958,
29901,
21533,
29961,
710,
29892,
1293,
29961,
524,
20526,
10930,
29901,
1293,
29961,
3846,
1402,
1238,
1446,
29918,
546,
29918,
1271,
29901,
1293,
29961,
1293,
29961,
710,
20526,
13,
462,
18046,
29880,
1600,
384,
29918,
3616,
29901,
524,
29922,
29900,
29892,
18046,
29880,
1600,
384,
29918,
627,
29901,
27636,
29961,
710,
13192,
8516,
29892,
13,
462,
16280,
29918,
2344,
29901,
5594,
519,
8999,
710,
29892,
27636,
29961,
524,
1402,
27636,
29961,
524,
20526,
5594,
519,
8999,
29911,
6073,
1402,
8516,
5262,
29922,
20401,
29918,
8945,
29918,
2344,
29892,
13,
462,
16280,
29918,
627,
29901,
5594,
519,
8999,
710,
1402,
10773,
13192,
20401,
29918,
627,
29892,
3889,
911,
29901,
11227,
29922,
8824,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
29876,
29918,
262,
29922,
29876,
29918,
262,
29892,
1238,
271,
29918,
1958,
29922,
1725,
271,
29918,
1958,
29892,
16280,
29918,
2344,
29922,
20401,
29918,
2344,
29892,
16280,
29918,
627,
29922,
20401,
29918,
627,
29892,
3889,
911,
29922,
9021,
911,
29897,
13,
4706,
1583,
29889,
1725,
1446,
29918,
546,
29918,
1271,
29892,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
3616,
29892,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
627,
353,
1238,
1446,
29918,
546,
29918,
1271,
29892,
29890,
1501,
29880,
1600,
384,
29918,
3616,
29892,
29890,
1501,
29880,
1600,
384,
29918,
627,
13,
4706,
1583,
29889,
1271,
29879,
29892,
1311,
29889,
29876,
29918,
449,
29892,
1311,
29889,
13168,
29879,
29892,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
1271,
29879,
353,
19997,
29900,
17094,
1402,
8516,
13,
308,
13,
4706,
565,
1583,
29889,
29890,
1501,
29880,
1600,
384,
29918,
3616,
1405,
29871,
29900,
29901,
13,
9651,
1583,
29889,
29890,
1501,
29880,
1600,
384,
29918,
1271,
29879,
29892,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
13168,
29879,
353,
19997,
2636,
13,
9651,
363,
285,
24381,
297,
1583,
29889,
1725,
1446,
29918,
546,
29918,
1271,
29901,
13,
18884,
13128,
29918,
1958,
353,
426,
29888,
29901,
1583,
29889,
1725,
271,
29918,
1958,
29961,
29888,
29962,
363,
285,
297,
1583,
29889,
1725,
271,
29918,
1958,
565,
285,
451,
297,
285,
24381,
29913,
13,
18884,
1583,
29889,
29890,
1501,
29880,
1600,
384,
29918,
13168,
29879,
29889,
4397,
4197,
29875,
363,
285,
297,
13128,
29918,
1958,
363,
474,
297,
13128,
29918,
1958,
29961,
29888,
24960,
13,
18884,
1583,
29889,
29890,
1501,
29880,
1600,
384,
29918,
1271,
29879,
29889,
4397,
29898,
1311,
3032,
657,
29918,
29890,
1501,
29880,
1600,
384,
29898,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
13168,
29879,
14352,
29896,
12622,
13,
9651,
1583,
29889,
29890,
1501,
29880,
1600,
384,
29918,
1271,
29879,
353,
302,
29876,
29889,
7355,
1293,
29898,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
1271,
29879,
29897,
13,
13,
4706,
363,
474,
29892,
289,
297,
26985,
29898,
1271,
29879,
1125,
13,
9651,
13128,
29918,
1958,
353,
426,
29888,
29901,
1583,
29889,
1725,
271,
29918,
1958,
29961,
29888,
29962,
363,
285,
297,
1583,
29889,
1725,
271,
29918,
1958,
565,
285,
297,
1583,
29889,
1725,
1446,
29918,
546,
29918,
1271,
29961,
29875,
12258,
13,
9651,
1583,
29889,
13168,
29879,
29889,
4397,
4197,
29875,
363,
285,
297,
13128,
29918,
1958,
363,
474,
297,
13128,
29918,
1958,
29961,
29888,
24960,
13,
9651,
1583,
29889,
1271,
29879,
29889,
4397,
29898,
29890,
29898,
29876,
29918,
262,
29922,
2435,
29898,
1311,
29889,
13168,
29879,
14352,
29896,
2314,
29974,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
3616,
29892,
1238,
271,
29918,
1958,
29922,
7050,
29918,
1958,
29892,
16280,
29918,
2344,
29922,
1311,
29889,
20401,
29918,
2344,
29892,
13,
462,
462,
16280,
29918,
627,
29922,
1311,
29889,
20401,
29918,
627,
29892,
3889,
911,
29922,
1311,
29889,
9021,
911,
876,
13,
9651,
1583,
29889,
29876,
29918,
449,
4619,
1583,
29889,
1271,
29879,
14352,
29896,
1822,
657,
29918,
449,
29918,
2311,
580,
13,
4706,
1583,
29889,
1271,
29879,
353,
302,
29876,
29889,
7355,
1293,
29898,
1311,
29889,
1271,
29879,
29897,
13,
13,
1678,
822,
903,
657,
29918,
29890,
1501,
29880,
1600,
384,
29898,
1311,
29892,
11105,
29901,
1293,
29961,
524,
2314,
1599,
302,
29876,
29889,
7355,
29901,
13,
4706,
15359,
353,
518,
15755,
29889,
12697,
29898,
2435,
29898,
13168,
511,
1583,
29889,
29890,
1501,
29880,
1600,
384,
29918,
3616,
4638,
13,
4706,
565,
1583,
29889,
29890,
1501,
29880,
1600,
384,
29918,
627,
338,
6213,
29901,
13,
9651,
2069,
353,
1583,
29889,
20401,
29918,
2344,
877,
10660,
742,
7431,
29898,
13168,
511,
1583,
29889,
29890,
1501,
29880,
1600,
384,
29918,
3616,
29897,
13,
4706,
1683,
29901,
13,
9651,
2069,
353,
1583,
29889,
20401,
29918,
2344,
29898,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
627,
29892,
7431,
29898,
13168,
511,
1583,
29889,
29890,
1501,
29880,
1600,
384,
29918,
3616,
29897,
13,
9651,
15359,
29889,
4397,
29898,
1311,
29889,
20401,
29918,
627,
29898,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
627,
876,
13,
4706,
2069,
29898,
29277,
29961,
29900,
1822,
7915,
29897,
13,
4706,
302,
29876,
29889,
2344,
29889,
3298,
359,
23538,
29277,
29961,
29900,
1822,
29890,
3173,
29897,
13,
4706,
736,
302,
29876,
29889,
16941,
2556,
10456,
29277,
29897,
13,
13,
1678,
822,
679,
29918,
449,
29918,
2311,
29898,
1311,
29897,
1599,
938,
29901,
13,
4706,
364,
12008,
13,
4706,
3617,
2159,
2920,
310,
1962,
7546,
13,
13,
4706,
16969,
29901,
13,
9651,
14990,
1353,
310,
14391,
4822,
599,
10930,
13,
4706,
14550,
13,
308,
13,
4706,
736,
1583,
29889,
29876,
29918,
449,
13,
268,
13,
1678,
822,
6375,
29898,
1311,
29892,
921,
29901,
29911,
6073,
29897,
1599,
323,
6073,
29901,
13,
4706,
343,
353,
6213,
13,
4706,
363,
474,
29892,
289,
297,
26985,
29898,
1311,
29889,
1271,
29879,
1125,
13,
9651,
565,
1583,
29889,
29890,
1501,
29880,
1600,
384,
29918,
3616,
29901,
13,
18884,
263,
353,
1583,
29889,
29890,
1501,
29880,
1600,
384,
29918,
1271,
29879,
29961,
29875,
850,
29916,
7503,
29892,
1311,
29889,
29890,
1501,
29880,
1600,
384,
29918,
13168,
29879,
29961,
29875,
24960,
13,
18884,
13128,
29918,
29916,
353,
4842,
305,
29889,
4117,
3552,
29916,
7503,
29892,
1311,
29889,
13168,
29879,
29961,
29875,
20526,
263,
511,
448,
29896,
29897,
13,
9651,
1683,
29901,
13,
18884,
13128,
29918,
29916,
353,
921,
7503,
29892,
1311,
29889,
13168,
29879,
29961,
29875,
5262,
13,
9651,
714,
353,
289,
29898,
7050,
29918,
29916,
29897,
13,
9651,
565,
343,
338,
6213,
29901,
343,
353,
714,
13,
9651,
1683,
29901,
308,
343,
353,
4842,
305,
29889,
4117,
3552,
29891,
29892,
714,
511,
448,
29896,
29897,
13,
4706,
736,
343,
13,
2
] |
RSICompute.py | bluefin1986/tinyspark | 3 | 7524 | <reponame>bluefin1986/tinyspark
# coding: utf-8
# In[1]:
import baostock as bs
import pandas as pd
import numpy as np
import talib as ta
import matplotlib.pyplot as plt
import KlineService
import BaoStockUtil
import math
import datetime
from scipy import integrate
from RSI import DayRSI,WeekRSI,MonthRSI,SixtyMinRSI
from concurrent.futures import ThreadPoolExecutor, as_completed
from Stock import Stock
import dbutil
from IPython.core.debugger import set_trace
#算积分用的节点数
INTEGRATE_CALC_RANGE = 4
RSI_OVER_BUY = 80
RSI_OVER_SELL = 20
RSI_OVER_BUY_12 = 75
RSI_OVER_SELL_12 = 25
RSI_OVER_BUY_24 = 70
RSI_OVER_SELL_24 = 30
RSI_MIDDLE = 50
#日线超卖区域积分阈值
RSI_INTE_OVERSELL_THRESHOLD_DAY = 50
# In[3]:
def findLatestRSIDate(period):
mydb = dbutil.connectDB()
collection = mydb[chooseRSICollection(period)]
cursor = collection.find().sort("date",-1).limit(1)
df = pd.DataFrame(list(cursor))
if df.empty:
return "1970-01-01"
return df["date"][0]
def clearRSI(period):
mydb = dbutil.connectDB()
collection = mydb[chooseRSICollection(period)]
collection.delete_many({})
indexes = collection.index_information()
if "code_1_date_1" in indexes.keys():
collection.drop_index( "code_1_date_1" )
def createIndex(period):
mydb = dbutil.connectDB()
collection = mydb[chooseRSICollection(period)]
collection.create_index( [("code", 1), ("date",1)])
def integrateValues(valuesArray):
return integrate.trapz(valuesArray, x=None, dx=1.0, axis=-1)
##
# 从数据库读指定日期RSI数据
#
#
def readRSI(period, stockCode, startDate, endDate):
mydb = dbutil.connectDB()
collection = mydb[chooseRSICollection(period)]
if type(startDate) == str:
startDate = datetime.datetime.strptime(startDate + "T00:00:00.000Z", "%Y-%m-%dT%H:%M:%S.000Z")
endDate = datetime.datetime.strptime(endDate + "T23:59:59.000Z", "%Y-%m-%dT%H:%M:%S.000Z")
cursor = collection.find({"code":stockCode,"date":{"$gte":startDate,"$lte":endDate}})
df = pd.DataFrame(list(cursor))
return df
##
# 写RSI数据库
#
#
def writeRSIToDB(period, stockCode, stockName, rsi_df):
dataList = []
for index,rsi in rsi_df.iterrows():
rsiDate = rsi['date']
if period == "day":
rsiObj = DayRSI(stockCode, stockName)
elif period == "week":
rsiObj = WeekRSI(stockCode, stockName)
elif period == "month":
rsiObj = MonthRSI(stockCode, stockName)
elif period == "5m":
rsiObj = FiveMinRSI(stockCode, stockName)
elif period == "15m":
rsiObj = FiftyMinRSI(stockCode, stockName)
elif period == "30m":
rsiObj = ThirtyMinRSI(stockCode, stockName)
elif period == "60m":
rsiObj = SixtyMinRSI(stockCode, stockName)
rsiObj.date = rsiDate
rsiObj.rsi_6 = rsi['rsi_6']
rsiObj.rsi_12 = rsi['rsi_12']
rsiObj.rsi_24 = rsi['rsi_24']
rsiObj.overBuy = rsi['overBuyFlag']
rsiObj.overSell = rsi['overSellFlag']
dataList.append(rsiObj.__dict__)
mydb = dbutil.connectDB()
collection = mydb[chooseRSICollection(period)]
if len(dataList) > 0:
collection.insert_many(dataList)
else:
raise RuntimeError("RSI数据为空")
def computeStockRSI(period, stockCode, stockName, startDate, endDate):
try:
# compute1 = datetime.datetime.now().timestamp()
df = KlineService.readStockKline(stockCode, period, startDate, endDate)
# compute2 = datetime.datetime.now().timestamp()
# print("read stockLine:", compute2 - compute1)
if df.empty:
return False
if period == "day":
# 剔除日线停盘数据
df = df[df['tradeStatus'] == '1']
rsi_df = computeRSI(df)
# compute3 = datetime.datetime.now().timestamp()
# print("compute rsi:", compute3 - compute2)
writeRSIToDB(period, stockCode, stockName, rsi_df)
# compute4 = datetime.datetime.now().timestamp()
# print("write to db:", compute4 - compute3)
return True
except BaseException as e:
print ("download " + stockCode + " error:" + str(e))
return False
##
# 选择不同的Kline Collection
#
def chooseRSICollection(period):
periodRSICollection = {
"day" : "RSI_Day",
"week" : "RSI_Week",
"month" : "RSI_Month",
"5m" : "RSI_5m",
"15m" : "RSI_15m",
"30m" : "RSI_30m",
"60m" : "RSI_60m"
}
return periodRSICollection.get(period)
def computeRSI(klineDataFrame):
rsi_12days = ta.RSI(klineDataFrame['closePrice'],timeperiod=12)
rsi_6days = ta.RSI(klineDataFrame['closePrice'],timeperiod=6)
rsi_24days = ta.RSI(klineDataFrame['closePrice'],timeperiod=24)
rsiFrame = pd.DataFrame(klineDataFrame, columns=["date"])
rsiFrame['rsi_6'] = rsi_6days
rsiFrame['rsi_12'] = rsi_12days
rsiFrame['rsi_24'] = rsi_24days
##添加参考线位置
rsiFrame['overBuy'] = RSI_OVER_BUY
rsiFrame['overSell'] = RSI_OVER_SELL
rsiFrame['middle'] = RSI_MIDDLE
# RSI超卖和超买
rsi_buy_position = rsiFrame['rsi_12'] > RSI_OVER_BUY_12
rsi_sell_position = rsiFrame['rsi_12'] < RSI_OVER_SELL_12
rsiFrame.loc[rsi_buy_position[(rsi_buy_position == True) & (rsi_buy_position.shift() == False)].index, 'overBuyFlag'] = 'Yes'
rsiFrame.loc[rsi_sell_position[(rsi_sell_position == True) & (rsi_sell_position.shift() == False)].index, 'overSellFlag'] = 'Yes'
return rsiFrame
##
# 计算自起始日期起的RSI
#
#
def computeAllRSIDataOfPeriod(period, startDate):
# currtime = datetime.datetime.now().timestamp()
print("begin clear RSI period:", period)
clearRSI(period)
print("cleared RSI period:", period)
# time1 = datetime.datetime.now().timestamp()
# print("clear finished:",time1 - currtime)
stockDict = KlineService.allStocks()
# time2 = datetime.datetime.now().timestamp()
# print("read stocks finished:",time2 - time1)
endDate = str(datetime.date.today())
jobStart = datetime.datetime.now().timestamp()
processCount = 0
failCount = 0
jobTotal = len(stockDict)
'''
#起线程池来跑,单线程太慢了, 事实证明慢个鬼
executor = ThreadPoolExecutor(max_workers=1)
funcVars = []
for key,stock in stockDict.items():
#指数没有分钟线,调过指数的RSI分钟线计算
if period.endswith("m") and (key.startswith("sh.000") or key.startswith("sz.399")):
continue
funcVars.append([period, key, stock["name"], startDate, endDate])
all_task = [executor.submit(computeStockRSI, funcVar[0], funcVar[1], funcVar[2], funcVar[3], funcVar[4])
for funcVar in funcVars]
for future in as_completed(all_task):
processCount = processCount + 1
if not future.result():
failCount = failCount + 1
if processCount % 100 == 0 and processCount > 0:
print ("rsi process:", processCount, " of ", jobTotal ," failed:", failCount)
'''
for key,stock in stockDict.items():
processCount = processCount + 1
#指数没有分钟线,调过指数的RSI分钟线计算
if period.endswith("m") and (key.startswith("sh.000") or key.startswith("sz.399")):
continue
result = computeStockRSI(period, key, stock["name"], startDate, endDate)
if not result:
failCount = failCount + 1
if processCount % 100 == 0 and processCount > 0:
print ("rsi process:", processCount, " of ", jobTotal ," failed:", failCount)
jobFinished = datetime.datetime.now().timestamp()
createIndex(period)
print("write all stock RSI to db finished, cost:", jobFinished - jobStart)
return True
##
# 计算指定日期的RSI积分
#
#
def computeAllRSIDataIntegrate(period, specifiedDateStr, includeST):
BaoStockUtil.customLogin()
specifiedDate = datetime.datetime.strptime(specifiedDateStr, "%Y-%m-%d")
today = datetime.date.today()
#如果把时间设成未来,自动调成今天
if specifiedDate > datetime.datetime.today():
specifiedDate = datetime.date.today()
#避免跨年问题,直接从去年开始取
startDate = specifiedDate - datetime.timedelta(days = 365)
#取交易日列表,用作倒推周期使用
rs = bs.query_trade_dates(start_date=datetime.datetime.strftime(startDate, "%Y-%m-%d"), end_date = specifiedDate)
BaoStockUtil.customLogout()
if rs.error_code != '0':
raise RuntimeError("交易日api调用失败了:" + rs.error_code)
tradeDates = []
while (rs.error_code == '0') & rs.next():
row = rs.get_row_data()
if row[1] == "1":
tradeDates.append(row[0])
if len(tradeDates) == 0:
raise RuntimeError("取不到最新的交易日")
#若期望计算的日期比库里RSI最新日期还晚,数据不全待补齐
rsiLatestDate = findLatestRSIDate(period)
rsiLatestDateStr = datetime.datetime.strftime(rsiLatestDate, "%Y-%m-%d")
if rsiLatestDate < specifiedDate:
raise RuntimeError(specifiedDateStr + " 的 " + period + " RSI的数据不存在,待补齐数据")
#找到指定日期以及rsi存量数据最近日期在交易日周期的序号
specifiedDateIndex = tradeDates.index(specifiedDateStr)
if specifiedDateIndex == -1:
raise RuntimeError(specifiedDateStr + " 可能不是交易日")
daysBefore = computeRSIDataStartTradeDateRange(period, specifiedDateStr)
startDateIndex = specifiedDateIndex - daysBefore
#起始日期index负数,说明rsi数据不够
if startDateIndex < 0:
raise RuntimeError(period + " rsi数据不够")
startDateStr = tradeDates[startDateIndex]
print("compute rsi tradeDates from ", startDateStr, "to", specifiedDateStr)
processCount = 0
failCount = 0
startDateIndex = -1
dictStocks = KlineService.allStocks()
klineDataFrame = KlineService.readAllStockKline(period, specifiedDateStr, specifiedDateStr)
klineDataFrame = klineDataFrame.set_index("code")
klineDict = klineDataFrame.to_dict('index')
jobTotal = len(dictStocks)
rsiValueArrs = []
for i in range(0, 6):
rsiValueArrs.append([])
for key,stock in dictStocks.items():
processCount = processCount + 1
#指数没有分钟线,跳过指数的RSI分钟线计算
if period.endswith("m") and stock.stockType != 1:
continue
#如果不计算ST,跳过
if not includeST and stock["isST"]:
continue
#退市股就不要算了
if "退" in stock["name"]:
continue
#科创板不达门槛没法买,不看
if key.startswith("sh.68"):
continue
try:
rsiDF = readRSI(period, key, startDateStr, specifiedDateStr)
rsiCount = len(rsiDF)
if rsiCount < INTEGRATE_CALC_RANGE:
raise RuntimeError("积分计算节点不够")
rsiValueArrs[0].append(key)
rsiValueArrs[1].append(stock["name"])
rsiValueArrs[2].append(klineDict[key]["closePrice"])
#取最近的数据用于计算积分
rsiValueArrs[3].append(rsiDF["rsi_6"][rsiCount - INTEGRATE_CALC_RANGE : rsiCount])
rsiValueArrs[4].append(rsiDF["rsi_12"][rsiCount - INTEGRATE_CALC_RANGE : rsiCount])
rsiValueArrs[5].append(rsiDF["rsi_24"][rsiCount - INTEGRATE_CALC_RANGE : rsiCount])
except BaseException as e:
failCount = failCount + 1
print ("compute rsi integrate " + key + " error:" + str(e))
if processCount % 100 == 0 and processCount > 0:
print ("compute rsi integrate process:", processCount, " of ", jobTotal ," failed:", failCount)
rsi6Arr = np.array(rsiValueArrs[3]).reshape(-1, INTEGRATE_CALC_RANGE)
rsi6InteArr = integrateValues(rsi6Arr)
rsi12Arr = np.array(rsiValueArrs[4]).reshape(-1, INTEGRATE_CALC_RANGE)
rsi12InteArr = integrateValues(rsi12Arr)
rsi24Arr = np.array(rsiValueArrs[5]).reshape(-1, INTEGRATE_CALC_RANGE)
rsi24InteArr = integrateValues(rsi24Arr)
rsiInteDF = pd.DataFrame()
rsiInteDF["code"] = rsiValueArrs[0]
rsiInteDF["name"] = rsiValueArrs[1]
rsiInteDF["closePrice"] = rsiValueArrs[2]
rsiInteDF["rsi_inte_6"] = rsi6InteArr
rsiInteDF["rsi_inte_12"] = rsi12InteArr
rsiInteDF["rsi_inte_24"] = rsi24InteArr
return rsiInteDF
#算出计算本周期下指定数据需要的起始交易日
#每个交易日一共4小时,所以取4小时为一天,而不是24小时
#每个计算周期一共至少需要4个节点,分钟线RSI统一除以4*60=240分钟算出所需计算数据天数,最少为一天
#日线不用除分钟
## TODO 周线没想好怎么算,更别说月线了。
def computeRSIDataStartTradeDateRange(period, specifiedDate):
daysBefore = 0
if period.endswith("m"):
daysBefore = math.ceil(INTEGRATE_CALC_RANGE * (int(period.replace("m", "")) + 1) / (60 * 4))
elif period == "day":
daysBefore = INTEGRATE_CALC_RANGE
else:
raise RuntimeError("周期有误")
return daysBefore
| [
1,
529,
276,
1112,
420,
29958,
9539,
4951,
29896,
29929,
29947,
29953,
29914,
29873,
262,
952,
6378,
13,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
13,
29937,
512,
29961,
29896,
5387,
13,
13,
13,
5215,
9922,
520,
1698,
408,
24512,
13,
5215,
11701,
408,
10518,
13,
5215,
12655,
408,
7442,
13,
5215,
5969,
747,
408,
11062,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
476,
1220,
3170,
13,
5215,
6000,
29877,
20754,
384,
7270,
13,
5215,
5844,
13,
5215,
12865,
13,
3166,
4560,
2272,
1053,
22782,
13,
13,
3166,
390,
5425,
1053,
8373,
29934,
5425,
29892,
22606,
29934,
5425,
29892,
13953,
29934,
5425,
29892,
25598,
29312,
8140,
29934,
5425,
13,
3166,
21984,
29889,
29888,
329,
1973,
1053,
10480,
11426,
13366,
29892,
408,
29918,
5729,
9446,
13,
3166,
10224,
1053,
10224,
13,
5215,
270,
4187,
309,
13,
13,
13,
3166,
5641,
1656,
29889,
3221,
29889,
8382,
914,
1053,
731,
29918,
15003,
13,
13,
29937,
31565,
234,
170,
178,
30748,
30406,
30210,
31669,
30940,
30354,
13,
1177,
4330,
14345,
3040,
29918,
29907,
1964,
29907,
29918,
29934,
24336,
353,
29871,
29946,
13,
13,
29934,
5425,
29918,
29949,
5348,
29918,
7838,
29979,
353,
29871,
29947,
29900,
13,
29934,
5425,
29918,
29949,
5348,
29918,
1660,
2208,
353,
29871,
29906,
29900,
13,
29934,
5425,
29918,
29949,
5348,
29918,
7838,
29979,
29918,
29896,
29906,
353,
29871,
29955,
29945,
13,
29934,
5425,
29918,
29949,
5348,
29918,
1660,
2208,
29918,
29896,
29906,
353,
29871,
29906,
29945,
13,
29934,
5425,
29918,
29949,
5348,
29918,
7838,
29979,
29918,
29906,
29946,
353,
29871,
29955,
29900,
13,
29934,
5425,
29918,
29949,
5348,
29918,
1660,
2208,
29918,
29906,
29946,
353,
29871,
29941,
29900,
13,
29934,
5425,
29918,
29924,
1367,
29928,
1307,
353,
29871,
29945,
29900,
13,
29937,
30325,
31532,
31480,
232,
144,
153,
30467,
232,
162,
162,
234,
170,
178,
30748,
236,
155,
139,
30959,
13,
29934,
5425,
29918,
1177,
4330,
29918,
29949,
5348,
1660,
2208,
29918,
4690,
1525,
7068,
5607,
29928,
29918,
28658,
353,
29871,
29945,
29900,
13,
13,
13,
29937,
512,
29961,
29941,
5387,
13,
13,
13,
1753,
1284,
13992,
342,
12445,
1367,
403,
29898,
19145,
1125,
13,
1678,
590,
2585,
353,
270,
4187,
309,
29889,
6915,
4051,
580,
13,
1678,
4333,
353,
590,
2585,
29961,
21803,
29934,
5425,
7196,
29898,
19145,
4638,
13,
1678,
10677,
353,
4333,
29889,
2886,
2141,
6605,
703,
1256,
613,
29899,
29896,
467,
13400,
29898,
29896,
29897,
13,
1678,
4489,
353,
29871,
10518,
29889,
17271,
29898,
1761,
29898,
18127,
876,
13,
1678,
565,
4489,
29889,
6310,
29901,
13,
4706,
736,
376,
29896,
29929,
29955,
29900,
29899,
29900,
29896,
29899,
29900,
29896,
29908,
13,
1678,
736,
4489,
3366,
1256,
3108,
29961,
29900,
29962,
13,
13,
1753,
2821,
29934,
5425,
29898,
19145,
1125,
13,
1678,
590,
2585,
353,
270,
4187,
309,
29889,
6915,
4051,
580,
13,
1678,
4333,
353,
590,
2585,
29961,
21803,
29934,
5425,
7196,
29898,
19145,
4638,
13,
1678,
4333,
29889,
8143,
29918,
13011,
3319,
1800,
13,
1678,
18111,
353,
4333,
29889,
2248,
29918,
19678,
580,
13,
1678,
565,
376,
401,
29918,
29896,
29918,
1256,
29918,
29896,
29908,
297,
18111,
29889,
8149,
7295,
13,
4706,
4333,
29889,
8865,
29918,
2248,
29898,
376,
401,
29918,
29896,
29918,
1256,
29918,
29896,
29908,
1723,
13,
308,
13,
1753,
1653,
3220,
29898,
19145,
1125,
13,
1678,
590,
2585,
353,
270,
4187,
309,
29889,
6915,
4051,
580,
13,
1678,
4333,
353,
590,
2585,
29961,
21803,
29934,
5425,
7196,
29898,
19145,
4638,
13,
1678,
4333,
29889,
3258,
29918,
2248,
29898,
518,
703,
401,
613,
29871,
29896,
511,
4852,
1256,
613,
29896,
29897,
2314,
13,
13,
1753,
22782,
9065,
29898,
5975,
2588,
1125,
13,
1678,
736,
22782,
29889,
29873,
2390,
29920,
29898,
5975,
2588,
29892,
921,
29922,
8516,
29892,
15414,
29922,
29896,
29889,
29900,
29892,
9685,
10457,
29896,
29897,
13,
268,
13,
2277,
13,
29937,
259,
31594,
30354,
30763,
31700,
235,
178,
190,
31084,
30495,
30325,
31117,
29934,
5425,
30354,
30763,
13,
29937,
13,
29937,
13,
1753,
1303,
29934,
5425,
29898,
19145,
29892,
10961,
3399,
29892,
1369,
2539,
29892,
1095,
2539,
1125,
13,
1678,
590,
2585,
353,
270,
4187,
309,
29889,
6915,
4051,
580,
13,
1678,
4333,
353,
590,
2585,
29961,
21803,
29934,
5425,
7196,
29898,
19145,
4638,
13,
1678,
565,
1134,
29898,
2962,
2539,
29897,
1275,
851,
29901,
13,
4706,
1369,
2539,
353,
12865,
29889,
12673,
29889,
710,
415,
603,
29898,
2962,
2539,
718,
376,
29911,
29900,
29900,
29901,
29900,
29900,
29901,
29900,
29900,
29889,
29900,
29900,
29900,
29999,
613,
11860,
29979,
19222,
29885,
19222,
29881,
29911,
29995,
29950,
16664,
29924,
16664,
29903,
29889,
29900,
29900,
29900,
29999,
1159,
13,
4706,
1095,
2539,
353,
12865,
29889,
12673,
29889,
710,
415,
603,
29898,
355,
2539,
718,
376,
29911,
29906,
29941,
29901,
29945,
29929,
29901,
29945,
29929,
29889,
29900,
29900,
29900,
29999,
613,
11860,
29979,
19222,
29885,
19222,
29881,
29911,
29995,
29950,
16664,
29924,
16664,
29903,
29889,
29900,
29900,
29900,
29999,
1159,
13,
1678,
10677,
353,
4333,
29889,
2886,
3319,
29908,
401,
1115,
17712,
3399,
1699,
1256,
28819,
29938,
29887,
371,
1115,
2962,
2539,
1699,
29938,
29880,
371,
1115,
355,
2539,
24289,
13,
1678,
4489,
353,
29871,
10518,
29889,
17271,
29898,
1761,
29898,
18127,
876,
13,
1678,
736,
4489,
13,
268,
13,
2277,
13,
29937,
259,
31479,
29934,
5425,
30354,
30763,
31700,
13,
29937,
13,
29937,
13,
1753,
2436,
29934,
5425,
1762,
4051,
29898,
19145,
29892,
10961,
3399,
29892,
10961,
1170,
29892,
364,
1039,
29918,
2176,
1125,
13,
1678,
848,
1293,
353,
5159,
13,
1678,
363,
2380,
29892,
29878,
1039,
297,
364,
1039,
29918,
2176,
29889,
1524,
5727,
7295,
13,
4706,
364,
1039,
2539,
353,
364,
1039,
1839,
1256,
2033,
13,
4706,
565,
3785,
1275,
376,
3250,
1115,
13,
9651,
364,
1039,
9930,
353,
8373,
29934,
5425,
29898,
17712,
3399,
29892,
10961,
1170,
29897,
13,
4706,
25342,
3785,
1275,
376,
18448,
1115,
13,
9651,
364,
1039,
9930,
353,
15511,
29934,
5425,
29898,
17712,
3399,
29892,
10961,
1170,
29897,
13,
4706,
25342,
3785,
1275,
376,
10874,
1115,
13,
9651,
364,
1039,
9930,
353,
23471,
29934,
5425,
29898,
17712,
3399,
29892,
10961,
1170,
29897,
13,
4706,
25342,
3785,
1275,
376,
29945,
29885,
1115,
13,
9651,
364,
1039,
9930,
353,
22853,
8140,
29934,
5425,
29898,
17712,
3399,
29892,
10961,
1170,
29897,
13,
4706,
25342,
3785,
1275,
376,
29896,
29945,
29885,
1115,
13,
9651,
364,
1039,
9930,
353,
29008,
1017,
8140,
29934,
5425,
29898,
17712,
3399,
29892,
10961,
1170,
29897,
13,
4706,
25342,
3785,
1275,
376,
29941,
29900,
29885,
1115,
13,
9651,
364,
1039,
9930,
353,
498,
13163,
8140,
29934,
5425,
29898,
17712,
3399,
29892,
10961,
1170,
29897,
13,
4706,
25342,
3785,
1275,
376,
29953,
29900,
29885,
1115,
13,
9651,
364,
1039,
9930,
353,
6101,
29312,
8140,
29934,
5425,
29898,
17712,
3399,
29892,
10961,
1170,
29897,
13,
13,
4706,
364,
1039,
9930,
29889,
1256,
353,
364,
1039,
2539,
13,
4706,
364,
1039,
9930,
29889,
29878,
1039,
29918,
29953,
353,
364,
1039,
1839,
29878,
1039,
29918,
29953,
2033,
13,
4706,
364,
1039,
9930,
29889,
29878,
1039,
29918,
29896,
29906,
353,
364,
1039,
1839,
29878,
1039,
29918,
29896,
29906,
2033,
13,
4706,
364,
1039,
9930,
29889,
29878,
1039,
29918,
29906,
29946,
353,
364,
1039,
1839,
29878,
1039,
29918,
29906,
29946,
2033,
13,
4706,
364,
1039,
9930,
29889,
957,
3727,
29891,
353,
364,
1039,
1839,
957,
3727,
29891,
21979,
2033,
13,
4706,
364,
1039,
9930,
29889,
957,
29903,
514,
353,
364,
1039,
1839,
957,
29903,
514,
21979,
2033,
13,
308,
13,
4706,
848,
1293,
29889,
4397,
29898,
29878,
1039,
9930,
17255,
8977,
1649,
29897,
13,
308,
13,
1678,
590,
2585,
353,
270,
4187,
309,
29889,
6915,
4051,
580,
13,
1678,
4333,
353,
590,
2585,
29961,
21803,
29934,
5425,
7196,
29898,
19145,
4638,
13,
1678,
565,
7431,
29898,
1272,
1293,
29897,
1405,
29871,
29900,
29901,
13,
4706,
4333,
29889,
7851,
29918,
13011,
29898,
1272,
1293,
29897,
13,
1678,
1683,
29901,
13,
4706,
12020,
24875,
2392,
703,
29934,
5425,
30354,
30763,
30573,
30816,
1159,
13,
13,
13,
1753,
10272,
20754,
384,
29934,
5425,
29898,
19145,
29892,
10961,
3399,
29892,
10961,
1170,
29892,
1369,
2539,
29892,
1095,
2539,
1125,
13,
1678,
1018,
29901,
13,
29937,
539,
10272,
29896,
353,
12865,
29889,
12673,
29889,
3707,
2141,
16394,
580,
13,
4706,
4489,
353,
476,
1220,
3170,
29889,
949,
20754,
384,
29968,
1220,
29898,
17712,
3399,
29892,
3785,
29892,
1369,
2539,
29892,
1095,
2539,
29897,
13,
29937,
539,
10272,
29906,
353,
12865,
29889,
12673,
29889,
3707,
2141,
16394,
580,
13,
29937,
539,
1596,
703,
949,
10961,
3542,
29901,
613,
10272,
29906,
448,
10272,
29896,
29897,
13,
4706,
565,
4489,
29889,
6310,
29901,
13,
9651,
736,
7700,
13,
4706,
565,
3785,
1275,
376,
3250,
1115,
13,
9651,
396,
29871,
232,
140,
151,
31152,
30325,
31532,
232,
132,
159,
234,
158,
155,
30354,
30763,
13,
9651,
4489,
353,
4489,
29961,
2176,
1839,
3018,
311,
5709,
2033,
1275,
525,
29896,
2033,
13,
4706,
364,
1039,
29918,
2176,
353,
10272,
29934,
5425,
29898,
2176,
29897,
13,
29937,
539,
10272,
29941,
353,
12865,
29889,
12673,
29889,
3707,
2141,
16394,
580,
13,
29937,
539,
1596,
703,
26017,
364,
1039,
29901,
613,
10272,
29941,
448,
10272,
29906,
29897,
13,
4706,
2436,
29934,
5425,
1762,
4051,
29898,
19145,
29892,
10961,
3399,
29892,
10961,
1170,
29892,
364,
1039,
29918,
2176,
29897,
13,
29937,
539,
10272,
29946,
353,
12865,
29889,
12673,
29889,
3707,
2141,
16394,
580,
13,
29937,
539,
1596,
703,
3539,
304,
4833,
29901,
613,
10272,
29946,
448,
10272,
29941,
29897,
13,
4706,
736,
5852,
13,
1678,
5174,
7399,
2451,
408,
321,
29901,
13,
4706,
1596,
4852,
10382,
376,
718,
10961,
3399,
718,
376,
1059,
6160,
718,
851,
29898,
29872,
876,
13,
4706,
736,
7700,
13,
13,
2277,
13,
29937,
259,
31333,
233,
142,
172,
30413,
30980,
30210,
29968,
1220,
14348,
13,
29937,
13,
1753,
6755,
29934,
5425,
7196,
29898,
19145,
1125,
13,
1678,
3785,
29934,
5425,
7196,
353,
426,
13,
4706,
376,
3250,
29908,
584,
376,
29934,
5425,
29918,
12742,
613,
13,
4706,
376,
18448,
29908,
584,
376,
29934,
5425,
29918,
22606,
613,
13,
4706,
376,
10874,
29908,
584,
376,
29934,
5425,
29918,
13953,
613,
13,
4706,
376,
29945,
29885,
29908,
584,
376,
29934,
5425,
29918,
29945,
29885,
613,
13,
4706,
376,
29896,
29945,
29885,
29908,
584,
376,
29934,
5425,
29918,
29896,
29945,
29885,
613,
13,
4706,
376,
29941,
29900,
29885,
29908,
584,
376,
29934,
5425,
29918,
29941,
29900,
29885,
613,
13,
4706,
376,
29953,
29900,
29885,
29908,
584,
376,
29934,
5425,
29918,
29953,
29900,
29885,
29908,
13,
1678,
500,
13,
1678,
736,
3785,
29934,
5425,
7196,
29889,
657,
29898,
19145,
29897,
13,
13,
13,
1753,
10272,
29934,
5425,
29898,
29895,
1220,
17271,
1125,
13,
1678,
364,
1039,
29918,
29896,
29906,
16700,
353,
11062,
29889,
29934,
5425,
29898,
29895,
1220,
17271,
1839,
5358,
13026,
7464,
2230,
19145,
29922,
29896,
29906,
29897,
13,
1678,
364,
1039,
29918,
29953,
16700,
353,
11062,
29889,
29934,
5425,
29898,
29895,
1220,
17271,
1839,
5358,
13026,
7464,
2230,
19145,
29922,
29953,
29897,
13,
1678,
364,
1039,
29918,
29906,
29946,
16700,
353,
11062,
29889,
29934,
5425,
29898,
29895,
1220,
17271,
1839,
5358,
13026,
7464,
2230,
19145,
29922,
29906,
29946,
29897,
13,
268,
13,
1678,
364,
1039,
4308,
353,
10518,
29889,
17271,
29898,
29895,
1220,
17271,
29892,
4341,
29922,
3366,
1256,
20068,
13,
1678,
364,
1039,
4308,
1839,
29878,
1039,
29918,
29953,
2033,
353,
364,
1039,
29918,
29953,
16700,
13,
1678,
364,
1039,
4308,
1839,
29878,
1039,
29918,
29896,
29906,
2033,
353,
364,
1039,
29918,
29896,
29906,
16700,
13,
1678,
364,
1039,
4308,
1839,
29878,
1039,
29918,
29906,
29946,
2033,
353,
364,
1039,
29918,
29906,
29946,
16700,
13,
1678,
444,
31538,
30666,
31125,
235,
131,
134,
31532,
30956,
30669,
13,
1678,
364,
1039,
4308,
1839,
957,
3727,
29891,
2033,
353,
390,
5425,
29918,
29949,
5348,
29918,
7838,
29979,
13,
1678,
364,
1039,
4308,
1839,
957,
29903,
514,
2033,
353,
390,
5425,
29918,
29949,
5348,
29918,
1660,
2208,
13,
1678,
364,
1039,
4308,
1839,
17662,
2033,
353,
390,
5425,
29918,
29924,
1367,
29928,
1307,
13,
13,
1678,
396,
390,
5425,
31480,
232,
144,
153,
30503,
31480,
231,
188,
179,
13,
1678,
364,
1039,
29918,
2423,
29891,
29918,
3283,
353,
364,
1039,
4308,
1839,
29878,
1039,
29918,
29896,
29906,
2033,
1405,
390,
5425,
29918,
29949,
5348,
29918,
7838,
29979,
29918,
29896,
29906,
13,
1678,
364,
1039,
29918,
29879,
514,
29918,
3283,
353,
364,
1039,
4308,
1839,
29878,
1039,
29918,
29896,
29906,
2033,
529,
390,
5425,
29918,
29949,
5348,
29918,
1660,
2208,
29918,
29896,
29906,
13,
1678,
364,
1039,
4308,
29889,
2029,
29961,
29878,
1039,
29918,
2423,
29891,
29918,
3283,
15625,
29878,
1039,
29918,
2423,
29891,
29918,
3283,
1275,
5852,
29897,
669,
313,
29878,
1039,
29918,
2423,
29891,
29918,
3283,
29889,
10889,
580,
1275,
7700,
29897,
1822,
2248,
29892,
525,
957,
3727,
29891,
21979,
2033,
353,
525,
8241,
29915,
13,
1678,
364,
1039,
4308,
29889,
2029,
29961,
29878,
1039,
29918,
29879,
514,
29918,
3283,
15625,
29878,
1039,
29918,
29879,
514,
29918,
3283,
1275,
5852,
29897,
669,
313,
29878,
1039,
29918,
29879,
514,
29918,
3283,
29889,
10889,
580,
1275,
7700,
29897,
1822,
2248,
29892,
525,
957,
29903,
514,
21979,
2033,
353,
525,
8241,
29915,
13,
1678,
736,
364,
1039,
4308,
13,
13,
13,
2277,
13,
29937,
259,
31466,
31565,
30688,
31558,
31020,
30325,
31117,
31558,
30210,
29934,
5425,
13,
29937,
13,
29937,
13,
1753,
10272,
3596,
12445,
1367,
532,
2776,
29853,
29898,
19145,
29892,
1369,
2539,
1125,
13,
29937,
268,
16256,
2230,
353,
12865,
29889,
12673,
29889,
3707,
2141,
16394,
580,
13,
1678,
1596,
703,
463,
2821,
390,
5425,
3785,
29901,
613,
3785,
29897,
13,
1678,
2821,
29934,
5425,
29898,
19145,
29897,
13,
1678,
1596,
703,
2841,
1965,
390,
5425,
3785,
29901,
613,
3785,
29897,
13,
29937,
268,
931,
29896,
353,
12865,
29889,
12673,
29889,
3707,
2141,
16394,
580,
13,
29937,
268,
1596,
703,
8551,
7743,
29901,
613,
2230,
29896,
448,
16256,
2230,
29897,
13,
1678,
10961,
21533,
353,
476,
1220,
3170,
29889,
497,
20754,
4684,
580,
13,
29937,
268,
931,
29906,
353,
12865,
29889,
12673,
29889,
3707,
2141,
16394,
580,
13,
29937,
268,
1596,
703,
949,
10961,
29879,
7743,
29901,
613,
2230,
29906,
448,
931,
29896,
29897,
13,
1678,
1095,
2539,
353,
851,
29898,
12673,
29889,
1256,
29889,
27765,
3101,
13,
1678,
4982,
4763,
353,
12865,
29889,
12673,
29889,
3707,
2141,
16394,
580,
13,
268,
13,
1678,
1889,
3981,
353,
29871,
29900,
13,
1678,
4418,
3981,
353,
29871,
29900,
13,
1678,
4982,
11536,
353,
7431,
29898,
17712,
21533,
29897,
13,
1678,
14550,
13,
1678,
396,
31558,
31532,
31101,
31853,
30805,
235,
186,
148,
30214,
31166,
31532,
31101,
30654,
233,
136,
165,
30743,
29892,
29871,
30745,
31195,
235,
178,
132,
30592,
233,
136,
165,
30502,
31820,
13,
1678,
2279,
3406,
353,
10480,
11426,
13366,
29898,
3317,
29918,
1287,
414,
29922,
29896,
29897,
13,
1678,
3653,
29963,
1503,
353,
5159,
13,
1678,
363,
1820,
29892,
17712,
297,
10961,
21533,
29889,
7076,
7295,
13,
4706,
396,
31084,
30354,
31423,
30417,
30748,
236,
149,
162,
31532,
30214,
31268,
31138,
31084,
30354,
30210,
29934,
5425,
30748,
236,
149,
162,
31532,
31466,
31565,
13,
4706,
565,
3785,
29889,
1975,
2541,
703,
29885,
1159,
322,
313,
1989,
29889,
27382,
2541,
703,
845,
29889,
29900,
29900,
29900,
1159,
470,
29871,
1820,
29889,
27382,
2541,
703,
3616,
29889,
29941,
29929,
29929,
5783,
29901,
13,
9651,
6773,
13,
4706,
3653,
29963,
1503,
29889,
4397,
4197,
19145,
29892,
1820,
29892,
10961,
3366,
978,
12436,
1369,
2539,
29892,
1095,
2539,
2314,
13,
268,
13,
1678,
599,
29918,
7662,
353,
518,
4258,
3406,
29889,
7892,
29898,
26017,
20754,
384,
29934,
5425,
29892,
3653,
9037,
29961,
29900,
1402,
3653,
9037,
29961,
29896,
1402,
3653,
9037,
29961,
29906,
1402,
3653,
9037,
29961,
29941,
1402,
3653,
9037,
29961,
29946,
2314,
29871,
13,
18884,
363,
3653,
9037,
297,
3653,
29963,
1503,
29962,
13,
1678,
363,
5434,
297,
408,
29918,
5729,
9446,
29898,
497,
29918,
7662,
1125,
13,
4706,
1889,
3981,
353,
1889,
3981,
718,
29871,
29896,
13,
4706,
565,
451,
5434,
29889,
2914,
7295,
13,
9651,
4418,
3981,
353,
4418,
3981,
718,
29871,
29896,
13,
4706,
565,
1889,
3981,
1273,
29871,
29896,
29900,
29900,
1275,
29871,
29900,
322,
1889,
3981,
1405,
29871,
29900,
29901,
13,
9651,
1596,
4852,
29878,
1039,
1889,
29901,
613,
1889,
3981,
29892,
376,
310,
9162,
4982,
11536,
29871,
1699,
5229,
29901,
613,
4418,
3981,
29897,
13,
1678,
14550,
13,
1678,
363,
1820,
29892,
17712,
297,
10961,
21533,
29889,
7076,
7295,
13,
4706,
1889,
3981,
353,
1889,
3981,
718,
29871,
29896,
13,
4706,
396,
31084,
30354,
31423,
30417,
30748,
236,
149,
162,
31532,
30214,
31268,
31138,
31084,
30354,
30210,
29934,
5425,
30748,
236,
149,
162,
31532,
31466,
31565,
13,
4706,
565,
3785,
29889,
1975,
2541,
703,
29885,
1159,
322,
313,
1989,
29889,
27382,
2541,
703,
845,
29889,
29900,
29900,
29900,
1159,
470,
29871,
1820,
29889,
27382,
2541,
703,
3616,
29889,
29941,
29929,
29929,
5783,
29901,
13,
9651,
6773,
13,
4706,
1121,
353,
10272,
20754,
384,
29934,
5425,
29898,
19145,
29892,
1820,
29892,
10961,
3366,
978,
12436,
1369,
2539,
29892,
1095,
2539,
29897,
13,
4706,
565,
451,
1121,
29901,
13,
9651,
4418,
3981,
353,
4418,
3981,
718,
29871,
29896,
13,
4706,
565,
1889,
3981,
1273,
29871,
29896,
29900,
29900,
1275,
29871,
29900,
322,
1889,
3981,
1405,
29871,
29900,
29901,
13,
9651,
1596,
4852,
29878,
1039,
1889,
29901,
613,
1889,
3981,
29892,
376,
310,
9162,
4982,
11536,
29871,
1699,
5229,
29901,
613,
4418,
3981,
29897,
13,
632,
13,
1678,
4982,
12881,
3276,
353,
12865,
29889,
12673,
29889,
3707,
2141,
16394,
580,
13,
1678,
1653,
3220,
29898,
19145,
29897,
13,
1678,
1596,
703,
3539,
599,
10961,
390,
5425,
304,
4833,
7743,
29892,
3438,
29901,
613,
4982,
12881,
3276,
448,
4982,
4763,
29897,
13,
1678,
736,
5852,
13,
13,
2277,
13,
29937,
259,
31466,
31565,
31084,
30495,
30325,
31117,
30210,
29934,
5425,
234,
170,
178,
30748,
13,
29937,
13,
29937,
13,
1753,
10272,
3596,
12445,
1367,
532,
23573,
403,
29898,
19145,
29892,
6790,
2539,
5015,
29892,
3160,
1254,
1125,
13,
1678,
6000,
29877,
20754,
384,
7270,
29889,
6341,
11049,
580,
13,
1678,
6790,
2539,
353,
12865,
29889,
12673,
29889,
710,
415,
603,
29898,
6550,
2164,
2539,
5015,
29892,
11860,
29979,
19222,
29885,
19222,
29881,
1159,
13,
1678,
9826,
353,
12865,
29889,
1256,
29889,
27765,
580,
13,
1678,
396,
30847,
30801,
233,
141,
141,
30594,
31016,
30872,
30494,
31295,
30805,
30214,
30688,
30846,
31268,
30494,
31482,
30408,
13,
1678,
565,
6790,
2539,
1405,
12865,
29889,
12673,
29889,
27765,
7295,
13,
4706,
6790,
2539,
353,
12865,
29889,
1256,
29889,
27765,
580,
13,
1678,
396,
236,
132,
194,
232,
136,
144,
235,
186,
171,
30470,
31658,
31596,
30214,
31157,
31092,
31594,
31475,
30470,
31026,
31020,
30683,
13,
1678,
1369,
2539,
353,
6790,
2539,
448,
12865,
29889,
9346,
287,
2554,
29898,
16700,
353,
29871,
29941,
29953,
29945,
29897,
13,
1678,
396,
30683,
31398,
233,
155,
150,
30325,
31025,
30746,
30214,
30406,
30732,
232,
131,
149,
233,
145,
171,
31109,
31117,
30785,
30406,
13,
1678,
20371,
353,
24512,
29889,
1972,
29918,
3018,
311,
29918,
15190,
29898,
2962,
29918,
1256,
29922,
12673,
29889,
12673,
29889,
710,
615,
603,
29898,
2962,
2539,
29892,
11860,
29979,
19222,
29885,
19222,
29881,
4968,
1095,
29918,
1256,
353,
6790,
2539,
29897,
13,
1678,
6000,
29877,
20754,
384,
7270,
29889,
6341,
3403,
449,
580,
13,
1678,
565,
20371,
29889,
2704,
29918,
401,
2804,
525,
29900,
2396,
13,
4706,
12020,
24875,
2392,
703,
31398,
233,
155,
150,
30325,
2754,
31268,
30406,
31369,
31955,
30743,
6160,
718,
20371,
29889,
2704,
29918,
401,
29897,
13,
1678,
11302,
29928,
1078,
353,
5159,
13,
1678,
1550,
313,
2288,
29889,
2704,
29918,
401,
1275,
525,
29900,
1495,
669,
20371,
29889,
4622,
7295,
13,
4706,
1948,
353,
20371,
29889,
657,
29918,
798,
29918,
1272,
580,
13,
4706,
565,
1948,
29961,
29896,
29962,
1275,
376,
29896,
1115,
13,
9651,
11302,
29928,
1078,
29889,
4397,
29898,
798,
29961,
29900,
2314,
13,
1678,
565,
7431,
29898,
3018,
311,
29928,
1078,
29897,
1275,
29871,
29900,
29901,
13,
4706,
12020,
24875,
2392,
703,
30683,
30413,
30780,
30878,
30374,
30210,
31398,
233,
155,
150,
30325,
1159,
13,
268,
13,
1678,
396,
31653,
31117,
31839,
31466,
31565,
30210,
30325,
31117,
31419,
31700,
30755,
29934,
5425,
30878,
30374,
30325,
31117,
31994,
233,
156,
157,
30214,
30354,
30763,
30413,
30753,
232,
193,
136,
235,
164,
168,
236,
192,
147,
13,
1678,
364,
1039,
13992,
342,
2539,
353,
1284,
13992,
342,
12445,
1367,
403,
29898,
19145,
29897,
13,
1678,
364,
1039,
13992,
342,
2539,
5015,
353,
12865,
29889,
12673,
29889,
710,
615,
603,
29898,
29878,
1039,
13992,
342,
2539,
29892,
11860,
29979,
19222,
29885,
19222,
29881,
1159,
13,
1678,
565,
364,
1039,
13992,
342,
2539,
529,
6790,
2539,
29901,
13,
4706,
12020,
24875,
2392,
29898,
6550,
2164,
2539,
5015,
718,
376,
29871,
30210,
376,
718,
3785,
718,
376,
390,
5425,
30210,
30354,
30763,
30413,
30946,
30505,
30214,
232,
193,
136,
235,
164,
168,
236,
192,
147,
30354,
30763,
1159,
13,
268,
13,
1678,
396,
233,
140,
193,
30780,
31084,
30495,
30325,
31117,
30651,
31436,
29878,
1039,
30946,
31180,
30354,
30763,
30878,
31830,
30325,
31117,
30505,
31398,
233,
155,
150,
30325,
31109,
31117,
30210,
31463,
30850,
13,
1678,
6790,
2539,
3220,
353,
11302,
29928,
1078,
29889,
2248,
29898,
6550,
2164,
2539,
5015,
29897,
13,
632,
13,
1678,
565,
6790,
2539,
3220,
1275,
448,
29896,
29901,
13,
4706,
12020,
24875,
2392,
29898,
6550,
2164,
2539,
5015,
718,
376,
29871,
30682,
30815,
30413,
30392,
31398,
233,
155,
150,
30325,
1159,
13,
1678,
3841,
18743,
353,
10272,
12445,
1367,
532,
4763,
5323,
311,
2539,
6069,
29898,
19145,
29892,
6790,
2539,
5015,
29897,
13,
1678,
1369,
2539,
3220,
353,
6790,
2539,
3220,
448,
3841,
18743,
13,
268,
13,
1678,
396,
31558,
31020,
30325,
31117,
2248,
235,
183,
162,
30354,
30214,
31639,
30592,
29878,
1039,
30354,
30763,
30413,
232,
167,
162,
13,
1678,
565,
1369,
2539,
3220,
529,
29871,
29900,
29901,
13,
4706,
12020,
24875,
2392,
29898,
19145,
718,
376,
364,
1039,
30354,
30763,
30413,
232,
167,
162,
1159,
13,
268,
13,
1678,
1369,
2539,
5015,
353,
11302,
29928,
1078,
29961,
2962,
2539,
3220,
29962,
13,
1678,
1596,
703,
26017,
364,
1039,
11302,
29928,
1078,
515,
9162,
1369,
2539,
5015,
29892,
376,
517,
613,
6790,
2539,
5015,
29897,
13,
268,
13,
1678,
1889,
3981,
353,
29871,
29900,
13,
1678,
4418,
3981,
353,
29871,
29900,
13,
1678,
1369,
2539,
3220,
353,
448,
29896,
13,
1678,
9657,
20754,
4684,
353,
476,
1220,
3170,
29889,
497,
20754,
4684,
580,
13,
1678,
413,
1220,
17271,
353,
476,
1220,
3170,
29889,
949,
3596,
20754,
384,
29968,
1220,
29898,
19145,
29892,
6790,
2539,
5015,
29892,
6790,
2539,
5015,
29897,
13,
1678,
413,
1220,
17271,
353,
413,
1220,
17271,
29889,
842,
29918,
2248,
703,
401,
1159,
13,
1678,
413,
1220,
21533,
353,
413,
1220,
17271,
29889,
517,
29918,
8977,
877,
2248,
1495,
13,
1678,
4982,
11536,
353,
7431,
29898,
8977,
20754,
4684,
29897,
13,
1678,
364,
1039,
1917,
1433,
2288,
353,
5159,
13,
1678,
363,
474,
297,
3464,
29898,
29900,
29892,
29871,
29953,
1125,
13,
4706,
364,
1039,
1917,
1433,
2288,
29889,
4397,
4197,
2314,
13,
268,
13,
1678,
363,
1820,
29892,
17712,
297,
9657,
20754,
4684,
29889,
7076,
7295,
13,
4706,
1889,
3981,
353,
1889,
3981,
718,
29871,
29896,
13,
4706,
396,
31084,
30354,
31423,
30417,
30748,
236,
149,
162,
31532,
30214,
235,
186,
182,
31138,
31084,
30354,
30210,
29934,
5425,
30748,
236,
149,
162,
31532,
31466,
31565,
13,
4706,
565,
3785,
29889,
1975,
2541,
703,
29885,
1159,
322,
10961,
29889,
17712,
1542,
2804,
29871,
29896,
29901,
13,
9651,
6773,
13,
4706,
396,
30847,
30801,
30413,
31466,
31565,
1254,
30214,
235,
186,
182,
31138,
13,
4706,
565,
451,
3160,
1254,
322,
10961,
3366,
275,
1254,
3108,
29901,
13,
9651,
6773,
13,
4706,
396,
236,
131,
131,
30461,
235,
133,
164,
31238,
30413,
30698,
31565,
30743,
13,
4706,
565,
376,
236,
131,
131,
29908,
297,
10961,
3366,
978,
3108,
29901,
13,
9651,
6773,
13,
4706,
396,
31030,
31441,
233,
160,
194,
30413,
31798,
31649,
233,
170,
158,
31423,
30545,
231,
188,
179,
30214,
30413,
31811,
13,
4706,
565,
1820,
29889,
27382,
2541,
703,
845,
29889,
29953,
29947,
29908,
1125,
13,
9651,
6773,
13,
4706,
1018,
29901,
13,
9651,
364,
1039,
4037,
353,
1303,
29934,
5425,
29898,
19145,
29892,
1820,
29892,
1369,
2539,
5015,
29892,
6790,
2539,
5015,
29897,
13,
9651,
364,
1039,
3981,
353,
7431,
29898,
29878,
1039,
4037,
29897,
13,
9651,
565,
364,
1039,
3981,
529,
2672,
4330,
14345,
3040,
29918,
29907,
1964,
29907,
29918,
29934,
24336,
29901,
13,
18884,
12020,
24875,
2392,
703,
234,
170,
178,
30748,
31466,
31565,
31669,
30940,
30413,
232,
167,
162,
1159,
13,
9651,
364,
1039,
1917,
1433,
2288,
29961,
29900,
1822,
4397,
29898,
1989,
29897,
13,
9651,
364,
1039,
1917,
1433,
2288,
29961,
29896,
1822,
4397,
29898,
17712,
3366,
978,
20068,
13,
9651,
364,
1039,
1917,
1433,
2288,
29961,
29906,
1822,
4397,
29898,
29895,
1220,
21533,
29961,
1989,
29962,
3366,
5358,
13026,
20068,
13,
9651,
396,
30683,
30878,
31830,
30210,
30354,
30763,
30406,
30909,
31466,
31565,
234,
170,
178,
30748,
13,
9651,
364,
1039,
1917,
1433,
2288,
29961,
29941,
1822,
4397,
29898,
29878,
1039,
4037,
3366,
29878,
1039,
29918,
29953,
3108,
29961,
29878,
1039,
3981,
448,
2672,
4330,
14345,
3040,
29918,
29907,
1964,
29907,
29918,
29934,
24336,
584,
364,
1039,
3981,
2314,
13,
9651,
364,
1039,
1917,
1433,
2288,
29961,
29946,
1822,
4397,
29898,
29878,
1039,
4037,
3366,
29878,
1039,
29918,
29896,
29906,
3108,
29961,
29878,
1039,
3981,
448,
2672,
4330,
14345,
3040,
29918,
29907,
1964,
29907,
29918,
29934,
24336,
584,
364,
1039,
3981,
2314,
13,
9651,
364,
1039,
1917,
1433,
2288,
29961,
29945,
1822,
4397,
29898,
29878,
1039,
4037,
3366,
29878,
1039,
29918,
29906,
29946,
3108,
29961,
29878,
1039,
3981,
448,
2672,
4330,
14345,
3040,
29918,
29907,
1964,
29907,
29918,
29934,
24336,
584,
364,
1039,
3981,
2314,
13,
4706,
5174,
7399,
2451,
408,
321,
29901,
13,
9651,
4418,
3981,
353,
4418,
3981,
718,
29871,
29896,
13,
9651,
1596,
4852,
26017,
364,
1039,
22782,
376,
718,
1820,
718,
376,
1059,
6160,
718,
851,
29898,
29872,
876,
13,
4706,
565,
1889,
3981,
1273,
29871,
29896,
29900,
29900,
1275,
29871,
29900,
322,
1889,
3981,
1405,
29871,
29900,
29901,
13,
9651,
1596,
4852,
26017,
364,
1039,
22782,
1889,
29901,
613,
1889,
3981,
29892,
376,
310,
9162,
4982,
11536,
29871,
1699,
5229,
29901,
613,
4418,
3981,
29897,
13,
268,
13,
268,
13,
1678,
364,
1039,
29953,
16401,
353,
7442,
29889,
2378,
29898,
29878,
1039,
1917,
1433,
2288,
29961,
29941,
14664,
690,
14443,
6278,
29896,
29892,
2672,
4330,
14345,
3040,
29918,
29907,
1964,
29907,
29918,
29934,
24336,
29897,
13,
1678,
364,
1039,
29953,
797,
371,
16401,
353,
22782,
9065,
29898,
29878,
1039,
29953,
16401,
29897,
13,
1678,
364,
1039,
29896,
29906,
16401,
353,
7442,
29889,
2378,
29898,
29878,
1039,
1917,
1433,
2288,
29961,
29946,
14664,
690,
14443,
6278,
29896,
29892,
2672,
4330,
14345,
3040,
29918,
29907,
1964,
29907,
29918,
29934,
24336,
29897,
13,
1678,
364,
1039,
29896,
29906,
797,
371,
16401,
353,
22782,
9065,
29898,
29878,
1039,
29896,
29906,
16401,
29897,
13,
1678,
364,
1039,
29906,
29946,
16401,
353,
7442,
29889,
2378,
29898,
29878,
1039,
1917,
1433,
2288,
29961,
29945,
14664,
690,
14443,
6278,
29896,
29892,
2672,
4330,
14345,
3040,
29918,
29907,
1964,
29907,
29918,
29934,
24336,
29897,
13,
1678,
364,
1039,
29906,
29946,
797,
371,
16401,
353,
22782,
9065,
29898,
29878,
1039,
29906,
29946,
16401,
29897,
13,
268,
13,
1678,
364,
1039,
797,
371,
4037,
353,
10518,
29889,
17271,
580,
13,
1678,
364,
1039,
797,
371,
4037,
3366,
401,
3108,
353,
364,
1039,
1917,
1433,
2288,
29961,
29900,
29962,
13,
1678,
364,
1039,
797,
371,
4037,
3366,
978,
3108,
353,
364,
1039,
1917,
1433,
2288,
29961,
29896,
29962,
13,
1678,
364,
1039,
797,
371,
4037,
3366,
5358,
13026,
3108,
353,
364,
1039,
1917,
1433,
2288,
29961,
29906,
29962,
13,
1678,
364,
1039,
797,
371,
4037,
3366,
29878,
1039,
29918,
6693,
29918,
29953,
3108,
353,
364,
1039,
29953,
797,
371,
16401,
13,
1678,
364,
1039,
797,
371,
4037,
3366,
29878,
1039,
29918,
6693,
29918,
29896,
29906,
3108,
353,
364,
1039,
29896,
29906,
797,
371,
16401,
13,
1678,
364,
1039,
797,
371,
4037,
3366,
29878,
1039,
29918,
6693,
29918,
29906,
29946,
3108,
353,
364,
1039,
29906,
29946,
797,
371,
16401,
13,
268,
13,
1678,
736,
364,
1039,
797,
371,
4037,
13,
268,
13,
13,
29937,
31565,
30544,
31466,
31565,
30346,
31109,
31117,
30557,
31084,
30495,
30354,
30763,
31383,
30698,
30210,
31558,
31020,
31398,
233,
155,
150,
30325,
13,
29937,
31951,
30502,
31398,
233,
155,
150,
30325,
30287,
31611,
29946,
30446,
30594,
30214,
30744,
30651,
30683,
29946,
30446,
30594,
30573,
30287,
30408,
30214,
31325,
30413,
30392,
29906,
29946,
30446,
30594,
13,
29937,
31951,
30502,
31466,
31565,
31109,
31117,
30287,
31611,
235,
138,
182,
31022,
31383,
30698,
29946,
30502,
31669,
30940,
30214,
30748,
236,
149,
162,
31532,
29934,
5425,
31675,
30287,
31152,
30651,
29946,
29930,
29953,
29900,
29922,
29906,
29946,
29900,
30748,
236,
149,
162,
31565,
30544,
30744,
31383,
31466,
31565,
30354,
30763,
30408,
30354,
30214,
30878,
31022,
30573,
30287,
30408,
13,
29937,
30325,
31532,
30413,
30406,
31152,
30748,
236,
149,
162,
13,
2277,
14402,
29871,
31109,
31532,
31423,
31522,
31076,
233,
131,
145,
31882,
31565,
30214,
31100,
232,
139,
174,
31639,
30534,
31532,
30743,
30267,
13,
1753,
10272,
12445,
1367,
532,
4763,
5323,
311,
2539,
6069,
29898,
19145,
29892,
6790,
2539,
1125,
13,
1678,
3841,
18743,
353,
29871,
29900,
13,
1678,
565,
3785,
29889,
1975,
2541,
703,
29885,
29908,
1125,
13,
4706,
3841,
18743,
353,
5844,
29889,
27696,
29898,
1177,
4330,
14345,
3040,
29918,
29907,
1964,
29907,
29918,
29934,
24336,
334,
313,
524,
29898,
19145,
29889,
6506,
703,
29885,
613,
5124,
876,
718,
29871,
29896,
29897,
847,
313,
29953,
29900,
334,
29871,
29946,
876,
13,
1678,
25342,
3785,
1275,
376,
3250,
1115,
13,
4706,
3841,
18743,
353,
2672,
4330,
14345,
3040,
29918,
29907,
1964,
29907,
29918,
29934,
24336,
13,
1678,
1683,
29901,
13,
4706,
12020,
24875,
2392,
703,
31109,
31117,
30417,
235,
178,
178,
1159,
13,
1678,
736,
3841,
18743,
13,
13,
2
] |
tests/attr/test_kernel_shap.py | trsvchn/captum | 3,140 | 7398 | <filename>tests/attr/test_kernel_shap.py
#!/usr/bin/env python3
import io
import unittest
import unittest.mock
from typing import Any, Callable, List, Tuple, Union
import torch
from captum._utils.typing import BaselineType, TensorOrTupleOfTensorsGeneric
from captum.attr._core.kernel_shap import KernelShap
from tests.helpers.basic import (
BaseTest,
assertTensorAlmostEqual,
assertTensorTuplesAlmostEqual,
)
from tests.helpers.basic_models import (
BasicModel_MultiLayer,
BasicModel_MultiLayer_MultiInput,
)
class Test(BaseTest):
def setUp(self) -> None:
super().setUp()
try:
import sklearn # noqa: F401
assert (
sklearn.__version__ >= "0.23.0"
), "Must have sklearn version 0.23.0 or higher"
except (ImportError, AssertionError):
raise unittest.SkipTest("Skipping KernelShap tests, sklearn not available.")
def test_linear_kernel_shap(self) -> None:
net = BasicModel_MultiLayer()
inp = torch.tensor([[20.0, 50.0, 30.0]], requires_grad=True)
baseline = torch.tensor([[10.0, 20.0, 10.0]], requires_grad=True)
self._kernel_shap_test_assert(
net,
inp,
[40.0, 120.0, 80.0],
n_samples=500,
baselines=baseline,
expected_coefs=[40.0, 120.0, 80.0],
)
def test_simple_kernel_shap(self) -> None:
net = BasicModel_MultiLayer()
inp = torch.tensor([[20.0, 50.0, 30.0]], requires_grad=True)
self._kernel_shap_test_assert(
net,
inp,
[76.66666, 196.66666, 116.66666],
perturbations_per_eval=(1, 2, 3),
n_samples=500,
)
def test_simple_kernel_shap_with_mask(self) -> None:
net = BasicModel_MultiLayer()
inp = torch.tensor([[20.0, 50.0, 30.0]], requires_grad=True)
self._kernel_shap_test_assert(
net,
inp,
[275.0, 275.0, 115.0],
feature_mask=torch.tensor([[0, 0, 1]]),
perturbations_per_eval=(1, 2, 3),
expected_coefs=[275.0, 115.0],
)
@unittest.mock.patch("sys.stderr", new_callable=io.StringIO)
def test_simple_kernel_shap_with_show_progress(self, mock_stderr) -> None:
net = BasicModel_MultiLayer()
inp = torch.tensor([[20.0, 50.0, 30.0]], requires_grad=True)
# test progress output for each batch size
for bsz in (1, 2, 3):
self._kernel_shap_test_assert(
net,
inp,
[76.66666, 196.66666, 116.66666],
perturbations_per_eval=(bsz,),
n_samples=500,
show_progress=True,
)
output = mock_stderr.getvalue()
# to test if progress calculation aligns with the actual iteration
# all perturbations_per_eval should reach progress of 100%
assert (
"Kernel Shap attribution: 100%" in output
), f"Error progress output: {repr(output)}"
mock_stderr.seek(0)
mock_stderr.truncate(0)
def test_simple_kernel_shap_with_baselines(self) -> None:
net = BasicModel_MultiLayer()
inp = torch.tensor([[20.0, 50.0, 30.0]])
self._kernel_shap_test_assert(
net,
inp,
[248.0, 248.0, 104.0],
feature_mask=torch.tensor([[0, 0, 1]]),
baselines=4,
perturbations_per_eval=(1, 2, 3),
)
def test_simple_batch_kernel_shap(self) -> None:
net = BasicModel_MultiLayer()
inp = torch.tensor([[2.0, 10.0, 3.0], [20.0, 50.0, 30.0]], requires_grad=True)
self._kernel_shap_test_assert(
net,
inp,
[[7.0, 32.5, 10.5], [76.66666, 196.66666, 116.66666]],
perturbations_per_eval=(1, 2, 3),
n_samples=20000,
)
def test_simple_batch_kernel_shap_with_mask(self) -> None:
net = BasicModel_MultiLayer()
inp = torch.tensor([[2.0, 10.0, 3.0], [20.0, 50.0, 30.0]], requires_grad=True)
self._kernel_shap_test_assert(
net,
inp,
[[39.5, 39.5, 10.5], [275.0, 275.0, 115.0]],
feature_mask=torch.tensor([[0, 0, 1], [1, 1, 0]]),
perturbations_per_eval=(1, 2, 3),
n_samples=100,
expected_coefs=[[39.5, 10.5], [115.0, 275.0]],
)
def test_multi_input_kernel_shap_without_mask(self) -> None:
net = BasicModel_MultiLayer_MultiInput()
inp1 = torch.tensor([[23.0, 0.0, 0.0]])
inp2 = torch.tensor([[20.0, 0.0, 50.0]])
inp3 = torch.tensor([[0.0, 100.0, 10.0]])
expected = (
[[90, 0, 0]],
[[78, 0, 198]],
[[0, 398, 38]],
)
self._kernel_shap_test_assert(
net,
(inp1, inp2, inp3),
expected,
additional_input=(1,),
n_samples=2000,
)
def test_multi_input_kernel_shap_with_mask(self) -> None:
net = BasicModel_MultiLayer_MultiInput()
inp1 = torch.tensor([[20.0, 50.0, 30.0]])
inp2 = torch.tensor([[0.0, 100.0, 0.0]])
inp3 = torch.tensor([[2.0, 10.0, 3.0]])
mask1 = torch.tensor([[0, 1, 0]])
mask2 = torch.tensor([[0, 1, 2]])
mask3 = torch.tensor([[0, 0, 0]])
expected = (
[[255.0, 595.0, 255.0]],
[[255.0, 595.0, 0.0]],
[[255.0, 255.0, 255.0]],
)
self._kernel_shap_test_assert(
net,
(inp1, inp2, inp3),
expected,
additional_input=(1,),
feature_mask=(mask1, mask2, mask3),
)
expected_with_baseline = (
[[184, 580.0, 184]],
[[184, 580.0, -12.0]],
[[184, 184, 184]],
)
self._kernel_shap_test_assert(
net,
(inp1, inp2, inp3),
expected_with_baseline,
additional_input=(1,),
feature_mask=(mask1, mask2, mask3),
baselines=(2, 3.0, 4),
perturbations_per_eval=(1, 2, 3),
)
def test_multi_input_batch_kernel_shap_without_mask(self) -> None:
net = BasicModel_MultiLayer_MultiInput()
inp1 = torch.tensor([[23.0, 0.0, 0.0], [20.0, 50.0, 30.0]])
inp2 = torch.tensor([[20.0, 0.0, 50.0], [0.0, 100.0, 0.0]])
inp3 = torch.tensor([[0.0, 100.0, 10.0], [0.0, 10.0, 0.0]])
expected = (
[[90, 0, 0], [78.0, 198.0, 118.0]],
[[78, 0, 198], [0.0, 398.0, 0.0]],
[[0, 398, 38], [0.0, 38.0, 0.0]],
)
self._kernel_shap_test_assert(
net,
(inp1, inp2, inp3),
expected,
additional_input=(1,),
n_samples=2500,
expected_coefs=[
[90.0, 0, 0, 78, 0, 198, 0, 398, 38],
[78.0, 198.0, 118.0, 0.0, 398.0, 0.0, 0.0, 38.0, 0.0],
],
)
def test_multi_input_batch_kernel_shap(self) -> None:
net = BasicModel_MultiLayer_MultiInput()
inp1 = torch.tensor([[23.0, 100.0, 0.0], [20.0, 50.0, 30.0]])
inp2 = torch.tensor([[20.0, 50.0, 30.0], [0.0, 100.0, 0.0]])
inp3 = torch.tensor([[0.0, 100.0, 10.0], [2.0, 10.0, 3.0]])
mask1 = torch.tensor([[1, 1, 1], [0, 1, 0]])
mask2 = torch.tensor([[0, 1, 2]])
mask3 = torch.tensor([[0, 1, 2], [0, 0, 0]])
expected = (
[[1088.6666, 1088.6666, 1088.6666], [255.0, 595.0, 255.0]],
[[76.6666, 1088.6666, 156.6666], [255.0, 595.0, 0.0]],
[[76.6666, 1088.6666, 156.6666], [255.0, 255.0, 255.0]],
)
self._kernel_shap_test_assert(
net,
(inp1, inp2, inp3),
expected,
additional_input=(1,),
feature_mask=(mask1, mask2, mask3),
n_samples=300,
)
expected_with_baseline = (
[[1040, 1040, 1040], [184, 580.0, 184]],
[[52, 1040, 132], [184, 580.0, -12.0]],
[[52, 1040, 132], [184, 184, 184]],
)
self._kernel_shap_test_assert(
net,
(inp1, inp2, inp3),
expected_with_baseline,
additional_input=(1,),
feature_mask=(mask1, mask2, mask3),
baselines=(2, 3.0, 4),
perturbations_per_eval=(1, 2, 3),
)
# Remaining tests are for cases where forward function returns a scalar
# as either a float, integer, 0d tensor or 1d tensor.
def test_single_kernel_shap_scalar_float(self) -> None:
net = BasicModel_MultiLayer()
self._single_input_scalar_kernel_shap_assert(
lambda inp: torch.sum(net(inp)).item()
)
def test_single_kernel_shap_scalar_tensor_0d(self) -> None:
net = BasicModel_MultiLayer()
self._single_input_scalar_kernel_shap_assert(lambda inp: torch.sum(net(inp)))
def test_single_kernel_shap_scalar_tensor_1d(self) -> None:
net = BasicModel_MultiLayer()
self._single_input_scalar_kernel_shap_assert(
lambda inp: torch.sum(net(inp)).reshape(1)
)
def test_single_kernel_shap_scalar_int(self) -> None:
net = BasicModel_MultiLayer()
self._single_input_scalar_kernel_shap_assert(
lambda inp: int(torch.sum(net(inp)).item())
)
def _single_input_scalar_kernel_shap_assert(self, func: Callable) -> None:
inp = torch.tensor([[2.0, 10.0, 3.0]], requires_grad=True)
mask = torch.tensor([[0, 0, 1]])
self._kernel_shap_test_assert(
func,
inp,
[[79.0, 79.0, 21.0]],
feature_mask=mask,
perturbations_per_eval=(1,),
target=None,
)
def test_multi_inp_kernel_shap_scalar_tensor_0d(self) -> None:
net = BasicModel_MultiLayer_MultiInput()
self._multi_input_scalar_kernel_shap_assert(lambda *inp: torch.sum(net(*inp)))
def test_multi_inp_kernel_shap_scalar_tensor_1d(self) -> None:
net = BasicModel_MultiLayer_MultiInput()
self._multi_input_scalar_kernel_shap_assert(
lambda *inp: torch.sum(net(*inp)).reshape(1)
)
def test_multi_inp_kernel_shap_scalar_tensor_int(self) -> None:
net = BasicModel_MultiLayer_MultiInput()
self._multi_input_scalar_kernel_shap_assert(
lambda *inp: int(torch.sum(net(*inp)).item())
)
def test_multi_inp_kernel_shap_scalar_float(self) -> None:
net = BasicModel_MultiLayer_MultiInput()
self._multi_input_scalar_kernel_shap_assert(
lambda *inp: torch.sum(net(*inp)).item()
)
def _multi_input_scalar_kernel_shap_assert(self, func: Callable) -> None:
inp1 = torch.tensor([[23.0, 100.0, 0.0], [20.0, 50.0, 30.0]])
inp2 = torch.tensor([[20.0, 50.0, 30.0], [0.0, 100.0, 0.0]])
inp3 = torch.tensor([[0.0, 100.0, 10.0], [20.0, 10.0, 13.0]])
mask1 = torch.tensor([[1, 1, 1]])
mask2 = torch.tensor([[0, 1, 2]])
mask3 = torch.tensor([[0, 1, 2]])
expected = (
[[3850.6666, 3850.6666, 3850.6666]],
[[306.6666, 3850.6666, 410.6666]],
[[306.6666, 3850.6666, 410.6666]],
)
self._kernel_shap_test_assert(
func,
(inp1, inp2, inp3),
expected,
additional_input=(1,),
feature_mask=(mask1, mask2, mask3),
perturbations_per_eval=(1,),
target=None,
n_samples=1500,
)
def _kernel_shap_test_assert(
self,
model: Callable,
test_input: TensorOrTupleOfTensorsGeneric,
expected_attr,
feature_mask: Union[None, TensorOrTupleOfTensorsGeneric] = None,
additional_input: Any = None,
perturbations_per_eval: Tuple[int, ...] = (1,),
baselines: BaselineType = None,
target: Union[None, int] = 0,
n_samples: int = 100,
delta: float = 1.0,
expected_coefs: Union[None, List[float], List[List[float]]] = None,
show_progress: bool = False,
) -> None:
for batch_size in perturbations_per_eval:
kernel_shap = KernelShap(model)
attributions = kernel_shap.attribute(
test_input,
target=target,
feature_mask=feature_mask,
additional_forward_args=additional_input,
baselines=baselines,
perturbations_per_eval=batch_size,
n_samples=n_samples,
show_progress=show_progress,
)
assertTensorTuplesAlmostEqual(
self, attributions, expected_attr, delta=delta, mode="max"
)
if expected_coefs is not None:
# Test with return_input_shape = False
attributions = kernel_shap.attribute(
test_input,
target=target,
feature_mask=feature_mask,
additional_forward_args=additional_input,
baselines=baselines,
perturbations_per_eval=batch_size,
n_samples=n_samples,
return_input_shape=False,
show_progress=show_progress,
)
assertTensorAlmostEqual(
self, attributions, expected_coefs, delta=delta, mode="max"
)
if __name__ == "__main__":
unittest.main()
| [
1,
529,
9507,
29958,
21150,
29914,
5552,
29914,
1688,
29918,
17460,
29918,
845,
481,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
13,
5215,
12013,
13,
5215,
443,
27958,
13,
5215,
443,
27958,
29889,
17640,
13,
3166,
19229,
1053,
3139,
29892,
8251,
519,
29892,
2391,
29892,
12603,
552,
29892,
7761,
13,
13,
5215,
4842,
305,
13,
3166,
4332,
398,
3032,
13239,
29889,
1017,
15702,
1053,
4886,
5570,
1542,
29892,
323,
6073,
2816,
23215,
552,
2776,
29911,
575,
943,
15809,
13,
3166,
4332,
398,
29889,
5552,
3032,
3221,
29889,
17460,
29918,
845,
481,
1053,
476,
5851,
2713,
481,
13,
3166,
6987,
29889,
3952,
6774,
29889,
16121,
1053,
313,
13,
1678,
7399,
3057,
29892,
13,
1678,
4974,
29911,
6073,
2499,
3242,
9843,
29892,
13,
1678,
4974,
29911,
6073,
23215,
2701,
2499,
3242,
9843,
29892,
13,
29897,
13,
3166,
6987,
29889,
3952,
6774,
29889,
16121,
29918,
9794,
1053,
313,
13,
1678,
19219,
3195,
29918,
15329,
14420,
29892,
13,
1678,
19219,
3195,
29918,
15329,
14420,
29918,
15329,
4290,
29892,
13,
29897,
13,
13,
13,
1990,
4321,
29898,
5160,
3057,
1125,
13,
1678,
822,
731,
3373,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
2428,
2141,
842,
3373,
580,
13,
4706,
1018,
29901,
13,
9651,
1053,
2071,
19668,
29871,
396,
694,
25621,
29901,
383,
29946,
29900,
29896,
13,
13,
9651,
4974,
313,
13,
18884,
2071,
19668,
17255,
3259,
1649,
6736,
376,
29900,
29889,
29906,
29941,
29889,
29900,
29908,
13,
9651,
10353,
376,
29924,
504,
505,
2071,
19668,
1873,
29871,
29900,
29889,
29906,
29941,
29889,
29900,
470,
6133,
29908,
13,
4706,
5174,
313,
17518,
2392,
29892,
16499,
291,
2392,
1125,
13,
9651,
12020,
443,
27958,
29889,
15797,
666,
3057,
703,
29903,
1984,
3262,
476,
5851,
2713,
481,
6987,
29892,
2071,
19668,
451,
3625,
23157,
13,
13,
1678,
822,
1243,
29918,
10660,
29918,
17460,
29918,
845,
481,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
580,
13,
4706,
297,
29886,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29900,
29889,
29900,
29892,
29871,
29945,
29900,
29889,
29900,
29892,
29871,
29941,
29900,
29889,
29900,
20526,
6858,
29918,
5105,
29922,
5574,
29897,
13,
4706,
2362,
5570,
353,
4842,
305,
29889,
20158,
4197,
29961,
29896,
29900,
29889,
29900,
29892,
29871,
29906,
29900,
29889,
29900,
29892,
29871,
29896,
29900,
29889,
29900,
20526,
6858,
29918,
5105,
29922,
5574,
29897,
13,
13,
4706,
1583,
3032,
17460,
29918,
845,
481,
29918,
1688,
29918,
9294,
29898,
13,
9651,
7787,
29892,
13,
9651,
297,
29886,
29892,
13,
9651,
518,
29946,
29900,
29889,
29900,
29892,
29871,
29896,
29906,
29900,
29889,
29900,
29892,
29871,
29947,
29900,
29889,
29900,
1402,
13,
9651,
302,
29918,
27736,
29922,
29945,
29900,
29900,
29892,
13,
9651,
2362,
24210,
29922,
6500,
5570,
29892,
13,
9651,
3806,
29918,
1111,
1389,
29879,
11759,
29946,
29900,
29889,
29900,
29892,
29871,
29896,
29906,
29900,
29889,
29900,
29892,
29871,
29947,
29900,
29889,
29900,
1402,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
12857,
29918,
17460,
29918,
845,
481,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
580,
13,
4706,
297,
29886,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29900,
29889,
29900,
29892,
29871,
29945,
29900,
29889,
29900,
29892,
29871,
29941,
29900,
29889,
29900,
20526,
6858,
29918,
5105,
29922,
5574,
29897,
13,
4706,
1583,
3032,
17460,
29918,
845,
481,
29918,
1688,
29918,
9294,
29898,
13,
9651,
7787,
29892,
13,
9651,
297,
29886,
29892,
13,
9651,
518,
29955,
29953,
29889,
29953,
29953,
29953,
29953,
29953,
29892,
29871,
29896,
29929,
29953,
29889,
29953,
29953,
29953,
29953,
29953,
29892,
29871,
29896,
29896,
29953,
29889,
29953,
29953,
29953,
29953,
29953,
1402,
13,
9651,
22786,
800,
29918,
546,
29918,
14513,
7607,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
511,
13,
9651,
302,
29918,
27736,
29922,
29945,
29900,
29900,
29892,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
12857,
29918,
17460,
29918,
845,
481,
29918,
2541,
29918,
13168,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
580,
13,
4706,
297,
29886,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29900,
29889,
29900,
29892,
29871,
29945,
29900,
29889,
29900,
29892,
29871,
29941,
29900,
29889,
29900,
20526,
6858,
29918,
5105,
29922,
5574,
29897,
13,
4706,
1583,
3032,
17460,
29918,
845,
481,
29918,
1688,
29918,
9294,
29898,
13,
9651,
7787,
29892,
13,
9651,
297,
29886,
29892,
13,
9651,
518,
29906,
29955,
29945,
29889,
29900,
29892,
29871,
29906,
29955,
29945,
29889,
29900,
29892,
29871,
29896,
29896,
29945,
29889,
29900,
1402,
13,
9651,
4682,
29918,
13168,
29922,
7345,
305,
29889,
20158,
4197,
29961,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
5262,
511,
13,
9651,
22786,
800,
29918,
546,
29918,
14513,
7607,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
511,
13,
9651,
3806,
29918,
1111,
1389,
29879,
11759,
29906,
29955,
29945,
29889,
29900,
29892,
29871,
29896,
29896,
29945,
29889,
29900,
1402,
13,
4706,
1723,
13,
13,
1678,
732,
348,
27958,
29889,
17640,
29889,
5041,
703,
9675,
29889,
303,
20405,
613,
716,
29918,
4804,
519,
29922,
601,
29889,
1231,
5971,
29897,
13,
1678,
822,
1243,
29918,
12857,
29918,
17460,
29918,
845,
481,
29918,
2541,
29918,
4294,
29918,
18035,
29898,
1311,
29892,
11187,
29918,
303,
20405,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
580,
13,
4706,
297,
29886,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29900,
29889,
29900,
29892,
29871,
29945,
29900,
29889,
29900,
29892,
29871,
29941,
29900,
29889,
29900,
20526,
6858,
29918,
5105,
29922,
5574,
29897,
13,
13,
4706,
396,
1243,
6728,
1962,
363,
1269,
9853,
2159,
13,
4706,
363,
289,
3616,
297,
313,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
1125,
13,
9651,
1583,
3032,
17460,
29918,
845,
481,
29918,
1688,
29918,
9294,
29898,
13,
18884,
7787,
29892,
13,
18884,
297,
29886,
29892,
13,
18884,
518,
29955,
29953,
29889,
29953,
29953,
29953,
29953,
29953,
29892,
29871,
29896,
29929,
29953,
29889,
29953,
29953,
29953,
29953,
29953,
29892,
29871,
29896,
29896,
29953,
29889,
29953,
29953,
29953,
29953,
29953,
1402,
13,
18884,
22786,
800,
29918,
546,
29918,
14513,
7607,
29890,
3616,
29892,
511,
13,
18884,
302,
29918,
27736,
29922,
29945,
29900,
29900,
29892,
13,
18884,
1510,
29918,
18035,
29922,
5574,
29892,
13,
9651,
1723,
13,
9651,
1962,
353,
11187,
29918,
303,
20405,
29889,
657,
1767,
580,
13,
13,
9651,
396,
304,
1243,
565,
6728,
13944,
7595,
29879,
411,
278,
3935,
12541,
13,
9651,
396,
599,
22786,
800,
29918,
546,
29918,
14513,
881,
6159,
6728,
310,
29871,
29896,
29900,
29900,
29995,
13,
9651,
4974,
313,
13,
18884,
376,
29968,
5851,
1383,
481,
1098,
3224,
29901,
29871,
29896,
29900,
29900,
23577,
297,
1962,
13,
9651,
10353,
285,
29908,
2392,
6728,
1962,
29901,
426,
276,
558,
29898,
4905,
2915,
29908,
13,
13,
9651,
11187,
29918,
303,
20405,
29889,
344,
1416,
29898,
29900,
29897,
13,
9651,
11187,
29918,
303,
20405,
29889,
509,
4661,
403,
29898,
29900,
29897,
13,
13,
1678,
822,
1243,
29918,
12857,
29918,
17460,
29918,
845,
481,
29918,
2541,
29918,
6500,
24210,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
580,
13,
4706,
297,
29886,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29900,
29889,
29900,
29892,
29871,
29945,
29900,
29889,
29900,
29892,
29871,
29941,
29900,
29889,
29900,
24960,
13,
4706,
1583,
3032,
17460,
29918,
845,
481,
29918,
1688,
29918,
9294,
29898,
13,
9651,
7787,
29892,
13,
9651,
297,
29886,
29892,
13,
9651,
518,
29906,
29946,
29947,
29889,
29900,
29892,
29871,
29906,
29946,
29947,
29889,
29900,
29892,
29871,
29896,
29900,
29946,
29889,
29900,
1402,
13,
9651,
4682,
29918,
13168,
29922,
7345,
305,
29889,
20158,
4197,
29961,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
5262,
511,
13,
9651,
2362,
24210,
29922,
29946,
29892,
13,
9651,
22786,
800,
29918,
546,
29918,
14513,
7607,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
511,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
12857,
29918,
16175,
29918,
17460,
29918,
845,
481,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
580,
13,
4706,
297,
29886,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29889,
29900,
29892,
29871,
29896,
29900,
29889,
29900,
29892,
29871,
29941,
29889,
29900,
1402,
518,
29906,
29900,
29889,
29900,
29892,
29871,
29945,
29900,
29889,
29900,
29892,
29871,
29941,
29900,
29889,
29900,
20526,
6858,
29918,
5105,
29922,
5574,
29897,
13,
4706,
1583,
3032,
17460,
29918,
845,
481,
29918,
1688,
29918,
9294,
29898,
13,
9651,
7787,
29892,
13,
9651,
297,
29886,
29892,
13,
9651,
5519,
29955,
29889,
29900,
29892,
29871,
29941,
29906,
29889,
29945,
29892,
29871,
29896,
29900,
29889,
29945,
1402,
518,
29955,
29953,
29889,
29953,
29953,
29953,
29953,
29953,
29892,
29871,
29896,
29929,
29953,
29889,
29953,
29953,
29953,
29953,
29953,
29892,
29871,
29896,
29896,
29953,
29889,
29953,
29953,
29953,
29953,
29953,
20526,
13,
9651,
22786,
800,
29918,
546,
29918,
14513,
7607,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
511,
13,
9651,
302,
29918,
27736,
29922,
29906,
29900,
29900,
29900,
29900,
29892,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
12857,
29918,
16175,
29918,
17460,
29918,
845,
481,
29918,
2541,
29918,
13168,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
580,
13,
4706,
297,
29886,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29889,
29900,
29892,
29871,
29896,
29900,
29889,
29900,
29892,
29871,
29941,
29889,
29900,
1402,
518,
29906,
29900,
29889,
29900,
29892,
29871,
29945,
29900,
29889,
29900,
29892,
29871,
29941,
29900,
29889,
29900,
20526,
6858,
29918,
5105,
29922,
5574,
29897,
13,
4706,
1583,
3032,
17460,
29918,
845,
481,
29918,
1688,
29918,
9294,
29898,
13,
9651,
7787,
29892,
13,
9651,
297,
29886,
29892,
13,
9651,
5519,
29941,
29929,
29889,
29945,
29892,
29871,
29941,
29929,
29889,
29945,
29892,
29871,
29896,
29900,
29889,
29945,
1402,
518,
29906,
29955,
29945,
29889,
29900,
29892,
29871,
29906,
29955,
29945,
29889,
29900,
29892,
29871,
29896,
29896,
29945,
29889,
29900,
20526,
13,
9651,
4682,
29918,
13168,
29922,
7345,
305,
29889,
20158,
4197,
29961,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
1402,
518,
29896,
29892,
29871,
29896,
29892,
29871,
29900,
5262,
511,
13,
9651,
22786,
800,
29918,
546,
29918,
14513,
7607,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
511,
13,
9651,
302,
29918,
27736,
29922,
29896,
29900,
29900,
29892,
13,
9651,
3806,
29918,
1111,
1389,
29879,
29922,
8999,
29941,
29929,
29889,
29945,
29892,
29871,
29896,
29900,
29889,
29945,
1402,
518,
29896,
29896,
29945,
29889,
29900,
29892,
29871,
29906,
29955,
29945,
29889,
29900,
20526,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
9910,
29918,
2080,
29918,
17460,
29918,
845,
481,
29918,
14037,
29918,
13168,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
29918,
15329,
4290,
580,
13,
4706,
297,
29886,
29896,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29941,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
24960,
13,
4706,
297,
29886,
29906,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29945,
29900,
29889,
29900,
24960,
13,
4706,
297,
29886,
29941,
353,
4842,
305,
29889,
20158,
4197,
29961,
29900,
29889,
29900,
29892,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
29871,
29896,
29900,
29889,
29900,
24960,
13,
4706,
3806,
353,
313,
13,
9651,
5519,
29929,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
20526,
13,
9651,
5519,
29955,
29947,
29892,
29871,
29900,
29892,
29871,
29896,
29929,
29947,
20526,
13,
9651,
5519,
29900,
29892,
29871,
29941,
29929,
29947,
29892,
29871,
29941,
29947,
20526,
13,
4706,
1723,
13,
4706,
1583,
3032,
17460,
29918,
845,
481,
29918,
1688,
29918,
9294,
29898,
13,
9651,
7787,
29892,
13,
9651,
313,
262,
29886,
29896,
29892,
297,
29886,
29906,
29892,
297,
29886,
29941,
511,
13,
9651,
3806,
29892,
13,
9651,
5684,
29918,
2080,
7607,
29896,
29892,
511,
13,
9651,
302,
29918,
27736,
29922,
29906,
29900,
29900,
29900,
29892,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
9910,
29918,
2080,
29918,
17460,
29918,
845,
481,
29918,
2541,
29918,
13168,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
29918,
15329,
4290,
580,
13,
4706,
297,
29886,
29896,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29900,
29889,
29900,
29892,
29871,
29945,
29900,
29889,
29900,
29892,
29871,
29941,
29900,
29889,
29900,
24960,
13,
4706,
297,
29886,
29906,
353,
4842,
305,
29889,
20158,
4197,
29961,
29900,
29889,
29900,
29892,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
24960,
13,
4706,
297,
29886,
29941,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29889,
29900,
29892,
29871,
29896,
29900,
29889,
29900,
29892,
29871,
29941,
29889,
29900,
24960,
13,
4706,
11105,
29896,
353,
4842,
305,
29889,
20158,
4197,
29961,
29900,
29892,
29871,
29896,
29892,
29871,
29900,
24960,
13,
4706,
11105,
29906,
353,
4842,
305,
29889,
20158,
4197,
29961,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
24960,
13,
4706,
11105,
29941,
353,
4842,
305,
29889,
20158,
4197,
29961,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
24960,
13,
4706,
3806,
353,
313,
13,
9651,
5519,
29906,
29945,
29945,
29889,
29900,
29892,
29871,
29945,
29929,
29945,
29889,
29900,
29892,
29871,
29906,
29945,
29945,
29889,
29900,
20526,
13,
9651,
5519,
29906,
29945,
29945,
29889,
29900,
29892,
29871,
29945,
29929,
29945,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
20526,
13,
9651,
5519,
29906,
29945,
29945,
29889,
29900,
29892,
29871,
29906,
29945,
29945,
29889,
29900,
29892,
29871,
29906,
29945,
29945,
29889,
29900,
20526,
13,
4706,
1723,
13,
4706,
1583,
3032,
17460,
29918,
845,
481,
29918,
1688,
29918,
9294,
29898,
13,
9651,
7787,
29892,
13,
9651,
313,
262,
29886,
29896,
29892,
297,
29886,
29906,
29892,
297,
29886,
29941,
511,
13,
9651,
3806,
29892,
13,
9651,
5684,
29918,
2080,
7607,
29896,
29892,
511,
13,
9651,
4682,
29918,
13168,
7607,
13168,
29896,
29892,
11105,
29906,
29892,
11105,
29941,
511,
13,
4706,
1723,
13,
4706,
3806,
29918,
2541,
29918,
6500,
5570,
353,
313,
13,
9651,
5519,
29896,
29947,
29946,
29892,
29871,
29945,
29947,
29900,
29889,
29900,
29892,
29871,
29896,
29947,
29946,
20526,
13,
9651,
5519,
29896,
29947,
29946,
29892,
29871,
29945,
29947,
29900,
29889,
29900,
29892,
448,
29896,
29906,
29889,
29900,
20526,
13,
9651,
5519,
29896,
29947,
29946,
29892,
29871,
29896,
29947,
29946,
29892,
29871,
29896,
29947,
29946,
20526,
13,
4706,
1723,
13,
4706,
1583,
3032,
17460,
29918,
845,
481,
29918,
1688,
29918,
9294,
29898,
13,
9651,
7787,
29892,
13,
9651,
313,
262,
29886,
29896,
29892,
297,
29886,
29906,
29892,
297,
29886,
29941,
511,
13,
9651,
3806,
29918,
2541,
29918,
6500,
5570,
29892,
13,
9651,
5684,
29918,
2080,
7607,
29896,
29892,
511,
13,
9651,
4682,
29918,
13168,
7607,
13168,
29896,
29892,
11105,
29906,
29892,
11105,
29941,
511,
13,
9651,
2362,
24210,
7607,
29906,
29892,
29871,
29941,
29889,
29900,
29892,
29871,
29946,
511,
13,
9651,
22786,
800,
29918,
546,
29918,
14513,
7607,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
511,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
9910,
29918,
2080,
29918,
16175,
29918,
17460,
29918,
845,
481,
29918,
14037,
29918,
13168,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
29918,
15329,
4290,
580,
13,
4706,
297,
29886,
29896,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29941,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
1402,
518,
29906,
29900,
29889,
29900,
29892,
29871,
29945,
29900,
29889,
29900,
29892,
29871,
29941,
29900,
29889,
29900,
24960,
13,
4706,
297,
29886,
29906,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29945,
29900,
29889,
29900,
1402,
518,
29900,
29889,
29900,
29892,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
24960,
13,
4706,
297,
29886,
29941,
353,
4842,
305,
29889,
20158,
4197,
29961,
29900,
29889,
29900,
29892,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
29871,
29896,
29900,
29889,
29900,
1402,
518,
29900,
29889,
29900,
29892,
29871,
29896,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
24960,
13,
4706,
3806,
353,
313,
13,
9651,
5519,
29929,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
1402,
518,
29955,
29947,
29889,
29900,
29892,
29871,
29896,
29929,
29947,
29889,
29900,
29892,
29871,
29896,
29896,
29947,
29889,
29900,
20526,
13,
9651,
5519,
29955,
29947,
29892,
29871,
29900,
29892,
29871,
29896,
29929,
29947,
1402,
518,
29900,
29889,
29900,
29892,
29871,
29941,
29929,
29947,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
20526,
13,
9651,
5519,
29900,
29892,
29871,
29941,
29929,
29947,
29892,
29871,
29941,
29947,
1402,
518,
29900,
29889,
29900,
29892,
29871,
29941,
29947,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
20526,
13,
4706,
1723,
13,
4706,
1583,
3032,
17460,
29918,
845,
481,
29918,
1688,
29918,
9294,
29898,
13,
9651,
7787,
29892,
13,
9651,
313,
262,
29886,
29896,
29892,
297,
29886,
29906,
29892,
297,
29886,
29941,
511,
13,
9651,
3806,
29892,
13,
9651,
5684,
29918,
2080,
7607,
29896,
29892,
511,
13,
9651,
302,
29918,
27736,
29922,
29906,
29945,
29900,
29900,
29892,
13,
9651,
3806,
29918,
1111,
1389,
29879,
11759,
13,
18884,
518,
29929,
29900,
29889,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
29892,
29871,
29955,
29947,
29892,
29871,
29900,
29892,
29871,
29896,
29929,
29947,
29892,
29871,
29900,
29892,
29871,
29941,
29929,
29947,
29892,
29871,
29941,
29947,
1402,
13,
18884,
518,
29955,
29947,
29889,
29900,
29892,
29871,
29896,
29929,
29947,
29889,
29900,
29892,
29871,
29896,
29896,
29947,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29941,
29929,
29947,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29941,
29947,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
1402,
13,
9651,
21251,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
9910,
29918,
2080,
29918,
16175,
29918,
17460,
29918,
845,
481,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
29918,
15329,
4290,
580,
13,
4706,
297,
29886,
29896,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29941,
29889,
29900,
29892,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
1402,
518,
29906,
29900,
29889,
29900,
29892,
29871,
29945,
29900,
29889,
29900,
29892,
29871,
29941,
29900,
29889,
29900,
24960,
13,
4706,
297,
29886,
29906,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29900,
29889,
29900,
29892,
29871,
29945,
29900,
29889,
29900,
29892,
29871,
29941,
29900,
29889,
29900,
1402,
518,
29900,
29889,
29900,
29892,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
24960,
13,
4706,
297,
29886,
29941,
353,
4842,
305,
29889,
20158,
4197,
29961,
29900,
29889,
29900,
29892,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
29871,
29896,
29900,
29889,
29900,
1402,
518,
29906,
29889,
29900,
29892,
29871,
29896,
29900,
29889,
29900,
29892,
29871,
29941,
29889,
29900,
24960,
13,
4706,
11105,
29896,
353,
4842,
305,
29889,
20158,
4197,
29961,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
1402,
518,
29900,
29892,
29871,
29896,
29892,
29871,
29900,
24960,
13,
4706,
11105,
29906,
353,
4842,
305,
29889,
20158,
4197,
29961,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
24960,
13,
4706,
11105,
29941,
353,
4842,
305,
29889,
20158,
4197,
29961,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
1402,
518,
29900,
29892,
29871,
29900,
29892,
29871,
29900,
24960,
13,
4706,
3806,
353,
313,
13,
9651,
5519,
29896,
29900,
29947,
29947,
29889,
29953,
29953,
29953,
29953,
29892,
29871,
29896,
29900,
29947,
29947,
29889,
29953,
29953,
29953,
29953,
29892,
29871,
29896,
29900,
29947,
29947,
29889,
29953,
29953,
29953,
29953,
1402,
518,
29906,
29945,
29945,
29889,
29900,
29892,
29871,
29945,
29929,
29945,
29889,
29900,
29892,
29871,
29906,
29945,
29945,
29889,
29900,
20526,
13,
9651,
5519,
29955,
29953,
29889,
29953,
29953,
29953,
29953,
29892,
29871,
29896,
29900,
29947,
29947,
29889,
29953,
29953,
29953,
29953,
29892,
29871,
29896,
29945,
29953,
29889,
29953,
29953,
29953,
29953,
1402,
518,
29906,
29945,
29945,
29889,
29900,
29892,
29871,
29945,
29929,
29945,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
20526,
13,
9651,
5519,
29955,
29953,
29889,
29953,
29953,
29953,
29953,
29892,
29871,
29896,
29900,
29947,
29947,
29889,
29953,
29953,
29953,
29953,
29892,
29871,
29896,
29945,
29953,
29889,
29953,
29953,
29953,
29953,
1402,
518,
29906,
29945,
29945,
29889,
29900,
29892,
29871,
29906,
29945,
29945,
29889,
29900,
29892,
29871,
29906,
29945,
29945,
29889,
29900,
20526,
13,
4706,
1723,
13,
4706,
1583,
3032,
17460,
29918,
845,
481,
29918,
1688,
29918,
9294,
29898,
13,
9651,
7787,
29892,
13,
9651,
313,
262,
29886,
29896,
29892,
297,
29886,
29906,
29892,
297,
29886,
29941,
511,
13,
9651,
3806,
29892,
13,
9651,
5684,
29918,
2080,
7607,
29896,
29892,
511,
13,
9651,
4682,
29918,
13168,
7607,
13168,
29896,
29892,
11105,
29906,
29892,
11105,
29941,
511,
13,
9651,
302,
29918,
27736,
29922,
29941,
29900,
29900,
29892,
13,
4706,
1723,
13,
4706,
3806,
29918,
2541,
29918,
6500,
5570,
353,
313,
13,
9651,
5519,
29896,
29900,
29946,
29900,
29892,
29871,
29896,
29900,
29946,
29900,
29892,
29871,
29896,
29900,
29946,
29900,
1402,
518,
29896,
29947,
29946,
29892,
29871,
29945,
29947,
29900,
29889,
29900,
29892,
29871,
29896,
29947,
29946,
20526,
13,
9651,
5519,
29945,
29906,
29892,
29871,
29896,
29900,
29946,
29900,
29892,
29871,
29896,
29941,
29906,
1402,
518,
29896,
29947,
29946,
29892,
29871,
29945,
29947,
29900,
29889,
29900,
29892,
448,
29896,
29906,
29889,
29900,
20526,
13,
9651,
5519,
29945,
29906,
29892,
29871,
29896,
29900,
29946,
29900,
29892,
29871,
29896,
29941,
29906,
1402,
518,
29896,
29947,
29946,
29892,
29871,
29896,
29947,
29946,
29892,
29871,
29896,
29947,
29946,
20526,
13,
4706,
1723,
13,
4706,
1583,
3032,
17460,
29918,
845,
481,
29918,
1688,
29918,
9294,
29898,
13,
9651,
7787,
29892,
13,
9651,
313,
262,
29886,
29896,
29892,
297,
29886,
29906,
29892,
297,
29886,
29941,
511,
13,
9651,
3806,
29918,
2541,
29918,
6500,
5570,
29892,
13,
9651,
5684,
29918,
2080,
7607,
29896,
29892,
511,
13,
9651,
4682,
29918,
13168,
7607,
13168,
29896,
29892,
11105,
29906,
29892,
11105,
29941,
511,
13,
9651,
2362,
24210,
7607,
29906,
29892,
29871,
29941,
29889,
29900,
29892,
29871,
29946,
511,
13,
9651,
22786,
800,
29918,
546,
29918,
14513,
7607,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
511,
13,
4706,
1723,
13,
13,
1678,
396,
5240,
17225,
6987,
526,
363,
4251,
988,
6375,
740,
3639,
263,
17336,
13,
1678,
396,
408,
2845,
263,
5785,
29892,
6043,
29892,
29871,
29900,
29881,
12489,
470,
29871,
29896,
29881,
12489,
29889,
13,
1678,
822,
1243,
29918,
14369,
29918,
17460,
29918,
845,
481,
29918,
19529,
279,
29918,
7411,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
580,
13,
4706,
1583,
3032,
14369,
29918,
2080,
29918,
19529,
279,
29918,
17460,
29918,
845,
481,
29918,
9294,
29898,
13,
9651,
14013,
297,
29886,
29901,
4842,
305,
29889,
2083,
29898,
1212,
29898,
262,
29886,
8106,
667,
580,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
14369,
29918,
17460,
29918,
845,
481,
29918,
19529,
279,
29918,
20158,
29918,
29900,
29881,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
580,
13,
4706,
1583,
3032,
14369,
29918,
2080,
29918,
19529,
279,
29918,
17460,
29918,
845,
481,
29918,
9294,
29898,
2892,
297,
29886,
29901,
4842,
305,
29889,
2083,
29898,
1212,
29898,
262,
29886,
4961,
13,
13,
1678,
822,
1243,
29918,
14369,
29918,
17460,
29918,
845,
481,
29918,
19529,
279,
29918,
20158,
29918,
29896,
29881,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
580,
13,
4706,
1583,
3032,
14369,
29918,
2080,
29918,
19529,
279,
29918,
17460,
29918,
845,
481,
29918,
9294,
29898,
13,
9651,
14013,
297,
29886,
29901,
4842,
305,
29889,
2083,
29898,
1212,
29898,
262,
29886,
8106,
690,
14443,
29898,
29896,
29897,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
14369,
29918,
17460,
29918,
845,
481,
29918,
19529,
279,
29918,
524,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
580,
13,
4706,
1583,
3032,
14369,
29918,
2080,
29918,
19529,
279,
29918,
17460,
29918,
845,
481,
29918,
9294,
29898,
13,
9651,
14013,
297,
29886,
29901,
938,
29898,
7345,
305,
29889,
2083,
29898,
1212,
29898,
262,
29886,
8106,
667,
3101,
13,
4706,
1723,
13,
13,
1678,
822,
903,
14369,
29918,
2080,
29918,
19529,
279,
29918,
17460,
29918,
845,
481,
29918,
9294,
29898,
1311,
29892,
3653,
29901,
8251,
519,
29897,
1599,
6213,
29901,
13,
4706,
297,
29886,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29889,
29900,
29892,
29871,
29896,
29900,
29889,
29900,
29892,
29871,
29941,
29889,
29900,
20526,
6858,
29918,
5105,
29922,
5574,
29897,
13,
4706,
11105,
353,
4842,
305,
29889,
20158,
4197,
29961,
29900,
29892,
29871,
29900,
29892,
29871,
29896,
24960,
13,
13,
4706,
1583,
3032,
17460,
29918,
845,
481,
29918,
1688,
29918,
9294,
29898,
13,
9651,
3653,
29892,
13,
9651,
297,
29886,
29892,
13,
9651,
5519,
29955,
29929,
29889,
29900,
29892,
29871,
29955,
29929,
29889,
29900,
29892,
29871,
29906,
29896,
29889,
29900,
20526,
13,
9651,
4682,
29918,
13168,
29922,
13168,
29892,
13,
9651,
22786,
800,
29918,
546,
29918,
14513,
7607,
29896,
29892,
511,
13,
9651,
3646,
29922,
8516,
29892,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
9910,
29918,
262,
29886,
29918,
17460,
29918,
845,
481,
29918,
19529,
279,
29918,
20158,
29918,
29900,
29881,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
29918,
15329,
4290,
580,
13,
4706,
1583,
3032,
9910,
29918,
2080,
29918,
19529,
279,
29918,
17460,
29918,
845,
481,
29918,
9294,
29898,
2892,
334,
262,
29886,
29901,
4842,
305,
29889,
2083,
29898,
1212,
10456,
262,
29886,
4961,
13,
13,
1678,
822,
1243,
29918,
9910,
29918,
262,
29886,
29918,
17460,
29918,
845,
481,
29918,
19529,
279,
29918,
20158,
29918,
29896,
29881,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
29918,
15329,
4290,
580,
13,
4706,
1583,
3032,
9910,
29918,
2080,
29918,
19529,
279,
29918,
17460,
29918,
845,
481,
29918,
9294,
29898,
13,
9651,
14013,
334,
262,
29886,
29901,
4842,
305,
29889,
2083,
29898,
1212,
10456,
262,
29886,
8106,
690,
14443,
29898,
29896,
29897,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
9910,
29918,
262,
29886,
29918,
17460,
29918,
845,
481,
29918,
19529,
279,
29918,
20158,
29918,
524,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
29918,
15329,
4290,
580,
13,
4706,
1583,
3032,
9910,
29918,
2080,
29918,
19529,
279,
29918,
17460,
29918,
845,
481,
29918,
9294,
29898,
13,
9651,
14013,
334,
262,
29886,
29901,
938,
29898,
7345,
305,
29889,
2083,
29898,
1212,
10456,
262,
29886,
8106,
667,
3101,
13,
4706,
1723,
13,
13,
1678,
822,
1243,
29918,
9910,
29918,
262,
29886,
29918,
17460,
29918,
845,
481,
29918,
19529,
279,
29918,
7411,
29898,
1311,
29897,
1599,
6213,
29901,
13,
4706,
7787,
353,
19219,
3195,
29918,
15329,
14420,
29918,
15329,
4290,
580,
13,
4706,
1583,
3032,
9910,
29918,
2080,
29918,
19529,
279,
29918,
17460,
29918,
845,
481,
29918,
9294,
29898,
13,
9651,
14013,
334,
262,
29886,
29901,
4842,
305,
29889,
2083,
29898,
1212,
10456,
262,
29886,
8106,
667,
580,
13,
4706,
1723,
13,
13,
1678,
822,
903,
9910,
29918,
2080,
29918,
19529,
279,
29918,
17460,
29918,
845,
481,
29918,
9294,
29898,
1311,
29892,
3653,
29901,
8251,
519,
29897,
1599,
6213,
29901,
13,
4706,
297,
29886,
29896,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29941,
29889,
29900,
29892,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
1402,
518,
29906,
29900,
29889,
29900,
29892,
29871,
29945,
29900,
29889,
29900,
29892,
29871,
29941,
29900,
29889,
29900,
24960,
13,
4706,
297,
29886,
29906,
353,
4842,
305,
29889,
20158,
4197,
29961,
29906,
29900,
29889,
29900,
29892,
29871,
29945,
29900,
29889,
29900,
29892,
29871,
29941,
29900,
29889,
29900,
1402,
518,
29900,
29889,
29900,
29892,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
24960,
13,
4706,
297,
29886,
29941,
353,
4842,
305,
29889,
20158,
4197,
29961,
29900,
29889,
29900,
29892,
29871,
29896,
29900,
29900,
29889,
29900,
29892,
29871,
29896,
29900,
29889,
29900,
1402,
518,
29906,
29900,
29889,
29900,
29892,
29871,
29896,
29900,
29889,
29900,
29892,
29871,
29896,
29941,
29889,
29900,
24960,
13,
4706,
11105,
29896,
353,
4842,
305,
29889,
20158,
4197,
29961,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
24960,
13,
4706,
11105,
29906,
353,
4842,
305,
29889,
20158,
4197,
29961,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
24960,
13,
4706,
11105,
29941,
353,
4842,
305,
29889,
20158,
4197,
29961,
29900,
29892,
29871,
29896,
29892,
29871,
29906,
24960,
13,
4706,
3806,
353,
313,
13,
9651,
5519,
29941,
29947,
29945,
29900,
29889,
29953,
29953,
29953,
29953,
29892,
29871,
29941,
29947,
29945,
29900,
29889,
29953,
29953,
29953,
29953,
29892,
29871,
29941,
29947,
29945,
29900,
29889,
29953,
29953,
29953,
29953,
20526,
13,
9651,
5519,
29941,
29900,
29953,
29889,
29953,
29953,
29953,
29953,
29892,
29871,
29941,
29947,
29945,
29900,
29889,
29953,
29953,
29953,
29953,
29892,
29871,
29946,
29896,
29900,
29889,
29953,
29953,
29953,
29953,
20526,
13,
9651,
5519,
29941,
29900,
29953,
29889,
29953,
29953,
29953,
29953,
29892,
29871,
29941,
29947,
29945,
29900,
29889,
29953,
29953,
29953,
29953,
29892,
29871,
29946,
29896,
29900,
29889,
29953,
29953,
29953,
29953,
20526,
13,
4706,
1723,
13,
13,
4706,
1583,
3032,
17460,
29918,
845,
481,
29918,
1688,
29918,
9294,
29898,
13,
9651,
3653,
29892,
13,
9651,
313,
262,
29886,
29896,
29892,
297,
29886,
29906,
29892,
297,
29886,
29941,
511,
13,
9651,
3806,
29892,
13,
9651,
5684,
29918,
2080,
7607,
29896,
29892,
511,
13,
9651,
4682,
29918,
13168,
7607,
13168,
29896,
29892,
11105,
29906,
29892,
11105,
29941,
511,
13,
9651,
22786,
800,
29918,
546,
29918,
14513,
7607,
29896,
29892,
511,
13,
9651,
3646,
29922,
8516,
29892,
13,
9651,
302,
29918,
27736,
29922,
29896,
29945,
29900,
29900,
29892,
13,
4706,
1723,
13,
13,
1678,
822,
903,
17460,
29918,
845,
481,
29918,
1688,
29918,
9294,
29898,
13,
4706,
1583,
29892,
13,
4706,
1904,
29901,
8251,
519,
29892,
13,
4706,
1243,
29918,
2080,
29901,
323,
6073,
2816,
23215,
552,
2776,
29911,
575,
943,
15809,
29892,
13,
4706,
3806,
29918,
5552,
29892,
13,
4706,
4682,
29918,
13168,
29901,
7761,
29961,
8516,
29892,
323,
6073,
2816,
23215,
552,
2776,
29911,
575,
943,
15809,
29962,
353,
6213,
29892,
13,
4706,
5684,
29918,
2080,
29901,
3139,
353,
6213,
29892,
13,
4706,
22786,
800,
29918,
546,
29918,
14513,
29901,
12603,
552,
29961,
524,
29892,
2023,
29962,
353,
313,
29896,
29892,
511,
13,
4706,
2362,
24210,
29901,
4886,
5570,
1542,
353,
6213,
29892,
13,
4706,
3646,
29901,
7761,
29961,
8516,
29892,
938,
29962,
353,
29871,
29900,
29892,
13,
4706,
302,
29918,
27736,
29901,
938,
353,
29871,
29896,
29900,
29900,
29892,
13,
4706,
19471,
29901,
5785,
353,
29871,
29896,
29889,
29900,
29892,
13,
4706,
3806,
29918,
1111,
1389,
29879,
29901,
7761,
29961,
8516,
29892,
2391,
29961,
7411,
1402,
2391,
29961,
1293,
29961,
7411,
5262,
29962,
353,
6213,
29892,
13,
4706,
1510,
29918,
18035,
29901,
6120,
353,
7700,
29892,
13,
1678,
1723,
1599,
6213,
29901,
13,
4706,
363,
9853,
29918,
2311,
297,
22786,
800,
29918,
546,
29918,
14513,
29901,
13,
9651,
8466,
29918,
845,
481,
353,
476,
5851,
2713,
481,
29898,
4299,
29897,
13,
9651,
1098,
3224,
29879,
353,
8466,
29918,
845,
481,
29889,
12715,
29898,
13,
18884,
1243,
29918,
2080,
29892,
13,
18884,
3646,
29922,
5182,
29892,
13,
18884,
4682,
29918,
13168,
29922,
14394,
29918,
13168,
29892,
13,
18884,
5684,
29918,
11333,
29918,
5085,
29922,
1202,
3245,
29918,
2080,
29892,
13,
18884,
2362,
24210,
29922,
6500,
24210,
29892,
13,
18884,
22786,
800,
29918,
546,
29918,
14513,
29922,
16175,
29918,
2311,
29892,
13,
18884,
302,
29918,
27736,
29922,
29876,
29918,
27736,
29892,
13,
18884,
1510,
29918,
18035,
29922,
4294,
29918,
18035,
29892,
13,
9651,
1723,
13,
9651,
4974,
29911,
6073,
23215,
2701,
2499,
3242,
9843,
29898,
13,
18884,
1583,
29892,
1098,
3224,
29879,
29892,
3806,
29918,
5552,
29892,
19471,
29922,
4181,
29892,
4464,
543,
3317,
29908,
13,
9651,
1723,
13,
13,
9651,
565,
3806,
29918,
1111,
1389,
29879,
338,
451,
6213,
29901,
13,
18884,
396,
4321,
411,
736,
29918,
2080,
29918,
12181,
353,
7700,
13,
18884,
1098,
3224,
29879,
353,
8466,
29918,
845,
481,
29889,
12715,
29898,
13,
462,
1678,
1243,
29918,
2080,
29892,
13,
462,
1678,
3646,
29922,
5182,
29892,
13,
462,
1678,
4682,
29918,
13168,
29922,
14394,
29918,
13168,
29892,
13,
462,
1678,
5684,
29918,
11333,
29918,
5085,
29922,
1202,
3245,
29918,
2080,
29892,
13,
462,
1678,
2362,
24210,
29922,
6500,
24210,
29892,
13,
462,
1678,
22786,
800,
29918,
546,
29918,
14513,
29922,
16175,
29918,
2311,
29892,
13,
462,
1678,
302,
29918,
27736,
29922,
29876,
29918,
27736,
29892,
13,
462,
1678,
736,
29918,
2080,
29918,
12181,
29922,
8824,
29892,
13,
462,
1678,
1510,
29918,
18035,
29922,
4294,
29918,
18035,
29892,
13,
18884,
1723,
13,
18884,
4974,
29911,
6073,
2499,
3242,
9843,
29898,
13,
462,
1678,
1583,
29892,
1098,
3224,
29879,
29892,
3806,
29918,
1111,
1389,
29879,
29892,
19471,
29922,
4181,
29892,
4464,
543,
3317,
29908,
13,
18884,
1723,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
443,
27958,
29889,
3396,
580,
13,
2
] |
chainer_/chainercv2/models/common.py | snsnlou/imgclsmob | 0 | 133120 | """
Common routines for models in Chainer.
"""
__all__ = ['round_channels', 'BreakBlock', 'ReLU6', 'HSwish', 'get_activation_layer', 'GlobalAvgPool2D',
'SelectableDense', 'DenseBlock', 'ConvBlock1d', 'conv1x1', 'conv3x3', 'depthwise_conv3x3', 'ConvBlock',
'conv1x1_block', 'conv3x3_block', 'conv5x5_block', 'conv7x7_block', 'dwconv_block', 'dwconv3x3_block',
'dwconv5x5_block', 'dwsconv3x3_block', 'PreConvBlock', 'pre_conv1x1_block', 'pre_conv3x3_block',
'DeconvBlock', 'ChannelShuffle', 'ChannelShuffle2', 'SEBlock', 'SABlock', 'SAConvBlock', 'saconv3x3_block',
'PixelShuffle', 'DucBlock', 'SimpleSequential', 'DualPathSequential', 'Concurrent', 'SequentialConcurrent',
'ParametricSequential', 'ParametricConcurrent', 'Hourglass', 'SesquialteralHourglass',
'MultiOutputSequential', 'ParallelConcurent', 'DualPathParallelConcurent', 'Flatten', 'AdaptiveAvgPool2D',
'NormActivation', 'InterpolationBlock', 'HeatmapMaxDetBlock']
from inspect import isfunction
from functools import partial
import numpy as np
from chainer import Chain
import chainer.functions as F
import chainer.links as L
from chainer import link
from chainer.initializers import _get_initializer
from chainer.variable import Parameter
def round_channels(channels,
divisor=8):
"""
Round weighted channel number (make divisible operation).
Parameters:
----------
channels : int or float
Original number of channels.
divisor : int, default 8
Alignment value.
Returns:
-------
int
Weighted number of channels.
"""
rounded_channels = max(int(channels + divisor / 2.0) // divisor * divisor, divisor)
if float(rounded_channels) < 0.9 * channels:
rounded_channels += divisor
return rounded_channels
class BreakBlock(Chain):
"""
Break coonnection block for hourglass.
"""
def __init__(self):
super(BreakBlock, self).__init__()
def __call__(self, x):
return None
def __repr__(self):
return '{name}()'.format(name=self.__class__.__name__)
class ReLU6(Chain):
"""
ReLU6 activation layer.
"""
def __call__(self, x):
return F.clip(x, 0.0, 6.0)
class Swish(Chain):
"""
Swish activation function from 'Searching for Activation Functions,' https://arxiv.org/abs/1710.05941.
"""
def __call__(self, x):
return x * F.sigmoid(x)
class HSigmoid(Chain):
"""
Approximated sigmoid function, so-called hard-version of sigmoid from 'Searching for MobileNetV3,'
https://arxiv.org/abs/1905.02244.
"""
def __call__(self, x):
return F.clip(x + 3.0, 0.0, 6.0) / 6.0
class HSwish(Chain):
"""
H-Swish activation function from 'Searching for MobileNetV3,' https://arxiv.org/abs/1905.02244.
"""
def __call__(self, x):
return x * F.clip(x + 3.0, 0.0, 6.0) / 6.0
def get_activation_layer(activation):
"""
Create activation layer from string/function.
Parameters:
----------
activation : function or str
Activation function or name of activation function.
Returns:
-------
function
Activation layer.
"""
assert (activation is not None)
if isfunction(activation):
return activation()
elif isinstance(activation, str):
if activation == "relu":
return F.relu
elif activation == "relu6":
return ReLU6()
elif activation == "swish":
return Swish()
# return partial(
# F.swish,
# beta=[1.0])
elif activation == "hswish":
return HSwish()
elif activation == "sigmoid":
return F.sigmoid
elif activation == "hsigmoid":
return HSigmoid()
else:
raise NotImplementedError()
else:
return activation
class GlobalAvgPool2D(Chain):
"""
Global average pooling operation for spatial data.
"""
def __call__(self, x):
return F.average_pooling_2d(x, ksize=x.shape[2:])
class SelectableDense(link.Link):
"""
Selectable dense layer.
Parameters:
----------
in_channels : int
Number of input features.
out_channels : int
Number of output features.
use_bias : bool, default False
Whether the layer uses a bias vector.
initial_weight : `types.InitializerSpec`, default None
Initializer for the `kernel` weights matrix.
initial_bias: `types.InitializerSpec`, default 0
Initializer for the bias vector.
num_options : int, default 1
Number of selectable options.
"""
def __init__(self,
in_channels,
out_channels,
use_bias=False,
initial_weight=None,
initial_bias=0,
num_options=1):
super(SelectableDense, self).__init__()
self.in_channels = in_channels
self.out_channels = out_channels
self.use_bias = use_bias
self.num_options = num_options
with self.init_scope():
weight_initializer = _get_initializer(initial_weight)
self.weight = Parameter(
initializer=weight_initializer,
shape=(num_options, out_channels, in_channels),
name="weight")
if use_bias:
bias_initializer = _get_initializer(initial_bias)
self.bias = Parameter(
initializer=bias_initializer,
shape=(num_options, out_channels),
name="bias")
else:
self.bias = None
def forward(self, x, indices):
weight = self.xp.take(self.weight.data, indices=indices, axis=0)
x = F.expand_dims(x, axis=-1)
x = F.batch_matmul(weight, x)
x = F.squeeze(x, axis=-1)
if self.use_bias:
bias = self.xp.take(self.bias.data, indices=indices, axis=0)
x += bias
return x
@property
def printable_specs(self):
specs = [
('in_channels', self.in_channels),
('out_channels', self.out_channels),
('use_bias', self.use_bias),
('num_options', self.num_options),
]
for spec in specs:
yield spec
class DenseBlock(Chain):
"""
Standard dense block with Batch normalization and activation.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
use_bias : bool, default False
Whether the layer uses a bias vector.
use_bn : bool, default True
Whether to use BatchNorm layer.
bn_eps : float, default 1e-5
Small float added to variance in Batch norm.
activation : function or str or None, default F.relu
Activation function or name of activation function.
"""
def __init__(self,
in_channels,
out_channels,
use_bias=False,
use_bn=True,
bn_eps=1e-5,
activation=(lambda: F.relu)):
super(DenseBlock, self).__init__()
self.activate = (activation is not None)
self.use_bn = use_bn
with self.init_scope():
self.fc = L.Linear(
in_size=in_channels,
out_size=out_channels,
nobias=(not use_bias))
if self.use_bn:
self.bn = L.BatchNormalization(
size=out_channels,
eps=bn_eps)
if self.activate:
self.activ = get_activation_layer(activation)
def __call__(self, x):
x = self.fc(x)
if self.use_bn:
x = self.bn(x)
if self.activate:
x = self.activ(x)
return x
class ConvBlock1d(Chain):
"""
Standard 1D convolution block with Batch normalization and activation.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
ksize : int
Convolution window size.
stride : int
Stride of the convolution.
pad : int
Padding value for convolution layer.
dilate : int, default 1
Dilation value for convolution layer.
groups : int, default 1
Number of groups.
use_bias : bool, default False
Whether the layer uses a bias vector.
use_bn : bool, default True
Whether to use BatchNorm layer.
bn_eps : float, default 1e-5
Small float added to variance in Batch norm.
activation : function or str or None, default F.relu
Activation function or name of activation function.
"""
def __init__(self,
in_channels,
out_channels,
ksize,
stride,
pad,
dilate=1,
groups=1,
use_bias=False,
use_bn=True,
bn_eps=1e-5,
activation=(lambda: F.relu)):
super(ConvBlock1d, self).__init__()
self.activate = (activation is not None)
self.use_bn = use_bn
with self.init_scope():
self.conv = L.Convolution1D(
in_channels=in_channels,
out_channels=out_channels,
ksize=ksize,
stride=stride,
pad=pad,
nobias=(not use_bias),
dilate=dilate,
groups=groups)
if self.use_bn:
self.bn = L.BatchNormalization(
size=out_channels,
eps=bn_eps)
if self.activate:
self.activ = get_activation_layer(activation)
def __call__(self, x):
x = self.conv(x)
if self.use_bn:
x = self.bn(x)
if self.activate:
x = self.activ(x)
return x
def conv1x1(in_channels,
out_channels,
stride=1,
groups=1,
use_bias=False):
"""
Convolution 1x1 layer.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
stride : int or tuple/list of 2 int, default 1
Stride of the convolution.
groups : int, default 1
Number of groups.
use_bias : bool, default False
Whether the layer uses a bias vector.
"""
return L.Convolution2D(
in_channels=in_channels,
out_channels=out_channels,
ksize=1,
stride=stride,
nobias=(not use_bias),
groups=groups)
def conv3x3(in_channels,
out_channels,
stride=1,
pad=1,
dilate=1,
groups=1,
use_bias=False):
"""
Convolution 3x3 layer.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
stride : int or tuple/list of 2 int, default 1
Stride of the convolution.
pad : int or tuple/list of 2 int, default 1
Padding value for convolution layer.
dilate : int or tuple/list of 2 int, default 1
Dilation value for convolution layer.
groups : int, default 1
Number of groups.
use_bias : bool, default False
Whether the layer uses a bias vector.
"""
return L.Convolution2D(
in_channels=in_channels,
out_channels=out_channels,
ksize=3,
stride=stride,
pad=pad,
nobias=(not use_bias),
dilate=dilate,
groups=groups)
def depthwise_conv3x3(channels,
stride=1,
pad=1,
dilate=1,
use_bias=False):
"""
Depthwise convolution 3x3 layer.
Parameters:
----------
channels : int
Number of input/output channels.
stride : int or tuple/list of 2 int, default 1
Stride of the convolution.
pad : int or tuple/list of 2 int, default 1
Padding value for convolution layer.
dilate : int or tuple/list of 2 int, default 1
Dilation value for convolution layer.
use_bias : bool, default False
Whether the layer uses a bias vector.
"""
return L.Convolution2D(
in_channels=channels,
out_channels=channels,
ksize=3,
stride=stride,
pad=pad,
nobias=(not use_bias),
dilate=dilate,
groups=channels)
class ConvBlock(Chain):
"""
Standard convolution block with Batch normalization and activation.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
ksize : int or tuple/list of 2 int
Convolution window size.
stride : int or tuple/list of 2 int
Stride of the convolution.
pad : int or tuple/list of 2 int
Padding value for convolution layer.
dilate : int or tuple/list of 2 int, default 1
Dilation value for convolution layer.
groups : int, default 1
Number of groups.
use_bias : bool, default False
Whether the layer uses a bias vector.
use_bn : bool, default True
Whether to use BatchNorm layer.
bn_eps : float, default 1e-5
Small float added to variance in Batch norm.
activation : function or str or None, default F.relu
Activation function or name of activation function.
"""
def __init__(self,
in_channels,
out_channels,
ksize,
stride,
pad,
dilate=1,
groups=1,
use_bias=False,
use_bn=True,
bn_eps=1e-5,
activation=(lambda: F.relu)):
super(ConvBlock, self).__init__()
self.activate = (activation is not None)
self.use_bn = use_bn
with self.init_scope():
self.conv = L.Convolution2D(
in_channels=in_channels,
out_channels=out_channels,
ksize=ksize,
stride=stride,
pad=pad,
nobias=(not use_bias),
dilate=dilate,
groups=groups)
if self.use_bn:
self.bn = L.BatchNormalization(
size=out_channels,
eps=bn_eps)
if self.activate:
self.activ = get_activation_layer(activation)
def __call__(self, x):
x = self.conv(x)
if self.use_bn:
x = self.bn(x)
if self.activate:
x = self.activ(x)
return x
def conv1x1_block(in_channels,
out_channels,
stride=1,
groups=1,
use_bias=False,
use_bn=True,
bn_eps=1e-5,
activation=(lambda: F.relu)):
"""
1x1 version of the standard convolution block.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
stride : int or tuple/list of 2 int, default 1
Stride of the convolution.
groups : int, default 1
Number of groups.
use_bias : bool, default False
Whether the layer uses a bias vector.
use_bn : bool, default True
Whether to use BatchNorm layer.
bn_eps : float, default 1e-5
Small float added to variance in Batch norm.
activation : function or str or None, default F.relu
Activation function or name of activation function.
"""
return ConvBlock(
in_channels=in_channels,
out_channels=out_channels,
ksize=1,
stride=stride,
pad=0,
groups=groups,
use_bias=use_bias,
use_bn=use_bn,
bn_eps=bn_eps,
activation=activation)
def conv3x3_block(in_channels,
out_channels,
stride=1,
pad=1,
dilate=1,
groups=1,
use_bias=False,
use_bn=True,
bn_eps=1e-5,
activation=(lambda: F.relu)):
"""
3x3 version of the standard convolution block.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
stride : int or tuple/list of 2 int, default 1
Stride of the convolution.
pad : int or tuple/list of 2 int, default 1
Padding value for convolution layer.
dilate : int or tuple/list of 2 int, default 1
Dilation value for convolution layer.
groups : int, default 1
Number of groups.
use_bias : bool, default False
Whether the layer uses a bias vector.
use_bn : bool, default True
Whether to use BatchNorm layer.
bn_eps : float, default 1e-5
Small float added to variance in Batch norm.
activation : function or str or None, default F.relu
Activation function or name of activation function.
"""
return ConvBlock(
in_channels=in_channels,
out_channels=out_channels,
ksize=3,
stride=stride,
pad=pad,
dilate=dilate,
groups=groups,
use_bias=use_bias,
use_bn=use_bn,
bn_eps=bn_eps,
activation=activation)
def conv5x5_block(in_channels,
out_channels,
stride=1,
pad=2,
dilate=1,
groups=1,
use_bias=False,
bn_eps=1e-5,
activation=(lambda: F.relu)):
"""
5x5 version of the standard convolution block.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
stride : int or tuple/list of 2 int, default 1
Stride of the convolution.
pad : int or tuple/list of 2 int, default 2
Padding value for convolution layer.
dilate : int or tuple/list of 2 int, default 1
Dilation value for convolution layer.
groups : int, default 1
Number of groups.
use_bias : bool, default False
Whether the layer uses a bias vector.
bn_eps : float, default 1e-5
Small float added to variance in Batch norm.
activation : function or str or None, default F.relu
Activation function or name of activation function.
"""
return ConvBlock(
in_channels=in_channels,
out_channels=out_channels,
ksize=5,
stride=stride,
pad=pad,
dilate=dilate,
groups=groups,
use_bias=use_bias,
bn_eps=bn_eps,
activation=activation)
def conv7x7_block(in_channels,
out_channels,
stride=1,
pad=3,
use_bias=False,
use_bn=True,
bn_eps=1e-5,
activation=(lambda: F.relu)):
"""
7x7 version of the standard convolution block.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
stride : int or tuple/list of 2 int, default 1
Stride of the convolution.
pad : int or tuple/list of 2 int, default 3
Padding value for convolution layer.
use_bias : bool, default False
Whether the layer uses a bias vector.
use_bn : bool, default True
Whether to use BatchNorm layer.
bn_eps : float, default 1e-5
Small float added to variance in Batch norm.
activation : function or str or None, default F.relu
Activation function or name of activation function.
"""
return ConvBlock(
in_channels=in_channels,
out_channels=out_channels,
ksize=7,
stride=stride,
pad=pad,
use_bias=use_bias,
use_bn=use_bn,
bn_eps=bn_eps,
activation=activation)
def dwconv_block(in_channels,
out_channels,
ksize,
stride,
pad,
dilate=1,
use_bias=False,
use_bn=True,
bn_eps=1e-5,
activation=(lambda: F.relu)):
"""
Depthwise version of the standard convolution block.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
ksize : int or tuple/list of 2 int
Convolution window size.
stride : int or tuple/list of 2 int
Stride of the convolution.
pad : int or tuple/list of 2 int
Padding value for convolution layer.
dilate : int or tuple/list of 2 int, default 1
Dilation value for convolution layer.
use_bias : bool, default False
Whether the layer uses a bias vector.
use_bn : bool, default True
Whether to use BatchNorm layer.
bn_eps : float, default 1e-5
Small float added to variance in Batch norm.
activation : function or str or None, default F.relu
Activation function or name of activation function.
"""
return ConvBlock(
in_channels=in_channels,
out_channels=out_channels,
ksize=ksize,
stride=stride,
pad=pad,
dilate=dilate,
groups=out_channels,
use_bias=use_bias,
use_bn=use_bn,
bn_eps=bn_eps,
activation=activation)
def dwconv3x3_block(in_channels,
out_channels,
stride=1,
pad=1,
dilate=1,
use_bias=False,
bn_eps=1e-5,
activation=(lambda: F.relu)):
"""
3x3 depthwise version of the standard convolution block.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
stride : int or tuple/list of 2 int, default 1
Stride of the convolution.
pad : int or tuple/list of 2 int, default 1
Padding value for convolution layer.
dilate : int or tuple/list of 2 int, default 1
Dilation value for convolution layer.
use_bias : bool, default False
Whether the layer uses a bias vector.
bn_eps : float, default 1e-5
Small float added to variance in Batch norm.
activation : function or str or None, default F.relu
Activation function or name of activation function.
"""
return dwconv_block(
in_channels=in_channels,
out_channels=out_channels,
ksize=3,
stride=stride,
pad=pad,
dilate=dilate,
use_bias=use_bias,
bn_eps=bn_eps,
activation=activation)
def dwconv5x5_block(in_channels,
out_channels,
stride=1,
pad=2,
dilate=1,
use_bias=False,
bn_eps=1e-5,
activation=(lambda: F.relu)):
"""
5x5 depthwise version of the standard convolution block.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
stride : int or tuple/list of 2 int, default 1
Stride of the convolution.
pad : int or tuple/list of 2 int, default 2
Padding value for convolution layer.
dilate : int or tuple/list of 2 int, default 1
Dilation value for convolution layer.
use_bias : bool, default False
Whether the layer uses a bias vector.
bn_eps : float, default 1e-5
Small float added to variance in Batch norm.
activation : function or str or None, default F.relu
Activation function or name of activation function.
"""
return dwconv_block(
in_channels=in_channels,
out_channels=out_channels,
ksize=5,
stride=stride,
pad=pad,
dilate=dilate,
use_bias=use_bias,
bn_eps=bn_eps,
activation=activation)
class DwsConvBlock(Chain):
"""
Depthwise separable convolution block with BatchNorms and activations at each convolution layers.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
ksize : int or tuple/list of 2 int
Convolution window size.
stride : int or tuple/list of 2 int
Stride of the convolution.
pad : int or tuple/list of 2 int
Padding value for convolution layer.
dilate : int or tuple/list of 2 int, default 1
Dilation value for convolution layer.
use_bias : bool, default False
Whether the layer uses a bias vector.
dw_use_bn : bool, default True
Whether to use BatchNorm layer (depthwise convolution block).
pw_use_bn : bool, default True
Whether to use BatchNorm layer (pointwise convolution block).
bn_eps : float, default 1e-5
Small float added to variance in Batch norm.
dw_activation : function or str or None, default F.relu
Activation function after the depthwise convolution block.
pw_activation : function or str or None, default F.relu
Activation function after the pointwise convolution block.
"""
def __init__(self,
in_channels,
out_channels,
ksize,
stride,
pad,
dilate=1,
use_bias=False,
dw_use_bn=True,
pw_use_bn=True,
bn_eps=1e-5,
dw_activation=(lambda: F.relu),
pw_activation=(lambda: F.relu)):
super(DwsConvBlock, self).__init__()
with self.init_scope():
self.dw_conv = dwconv_block(
in_channels=in_channels,
out_channels=in_channels,
ksize=ksize,
stride=stride,
pad=pad,
dilate=dilate,
use_bias=use_bias,
use_bn=dw_use_bn,
bn_eps=bn_eps,
activation=dw_activation)
self.pw_conv = conv1x1_block(
in_channels=in_channels,
out_channels=out_channels,
use_bias=use_bias,
use_bn=pw_use_bn,
bn_eps=bn_eps,
activation=pw_activation)
def __call__(self, x):
x = self.dw_conv(x)
x = self.pw_conv(x)
return x
def dwsconv3x3_block(in_channels,
out_channels,
stride=1,
pad=1,
dilate=1,
use_bias=False,
bn_eps=1e-5,
dw_activation=(lambda: F.relu),
pw_activation=(lambda: F.relu),
**kwargs):
"""
3x3 depthwise separable version of the standard convolution block.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
stride : int or tuple/list of 2 int, default 1
Stride of the convolution.
pad : int or tuple/list of 2 int, default 1
Padding value for convolution layer.
dilate : int or tuple/list of 2 int, default 1
Dilation value for convolution layer.
use_bias : bool, default False
Whether the layer uses a bias vector.
bn_eps : float, default 1e-5
Small float added to variance in Batch norm.
dw_activation : function or str or None, default F.relu
Activation function after the depthwise convolution block.
pw_activation : function or str or None, default F.relu
Activation function after the pointwise convolution block.
"""
return DwsConvBlock(
in_channels=in_channels,
out_channels=out_channels,
ksize=3,
stride=stride,
pad=pad,
dilate=dilate,
use_bias=use_bias,
bn_eps=bn_eps,
dw_activation=dw_activation,
pw_activation=pw_activation,
**kwargs)
class PreConvBlock(Chain):
"""
Convolution block with Batch normalization and ReLU pre-activation.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
ksize : int or tuple/list of 2 int
Convolution window size.
stride : int or tuple/list of 2 int
Stride of the convolution.
pad : int or tuple/list of 2 int
Padding value for convolution layer.
dilate : int or tuple/list of 2 int, default 1
Dilation value for convolution layer.
use_bias : bool, default False
Whether the layer uses a bias vector.
use_bn : bool, default True
Whether to use BatchNorm layer.
return_preact : bool, default False
Whether return pre-activation. It's used by PreResNet.
activate : bool, default True
Whether activate the convolution block.
"""
def __init__(self,
in_channels,
out_channels,
ksize,
stride,
pad,
dilate=1,
use_bias=False,
use_bn=True,
return_preact=False,
activate=True):
super(PreConvBlock, self).__init__()
self.return_preact = return_preact
self.activate = activate
self.use_bn = use_bn
with self.init_scope():
if self.use_bn:
self.bn = L.BatchNormalization(
size=in_channels,
eps=1e-5)
if self.activate:
self.activ = F.relu
self.conv = L.Convolution2D(
in_channels=in_channels,
out_channels=out_channels,
ksize=ksize,
stride=stride,
pad=pad,
nobias=(not use_bias),
dilate=dilate)
def __call__(self, x):
if self.use_bn:
x = self.bn(x)
if self.activate:
x = self.activ(x)
if self.return_preact:
x_pre_activ = x
x = self.conv(x)
if self.return_preact:
return x, x_pre_activ
else:
return x
def pre_conv1x1_block(in_channels,
out_channels,
stride=1,
use_bias=False,
use_bn=True,
return_preact=False,
activate=True):
"""
1x1 version of the pre-activated convolution block.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
stride : int or tuple/list of 2 int, default 1
Stride of the convolution.
use_bias : bool, default False
Whether the layer uses a bias vector.
use_bn : bool, default True
Whether to use BatchNorm layer.
return_preact : bool, default False
Whether return pre-activation.
activate : bool, default True
Whether activate the convolution block.
"""
return PreConvBlock(
in_channels=in_channels,
out_channels=out_channels,
ksize=1,
stride=stride,
pad=0,
use_bias=use_bias,
use_bn=use_bn,
return_preact=return_preact,
activate=activate)
def pre_conv3x3_block(in_channels,
out_channels,
stride=1,
pad=1,
dilate=1,
use_bias=False,
use_bn=True,
return_preact=False,
activate=True):
"""
3x3 version of the pre-activated convolution block.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
stride : int or tuple/list of 2 int, default 1
Stride of the convolution.
pad : int or tuple/list of 2 int, default 1
Padding value for convolution layer.
dilate : int or tuple/list of 2 int, default 1
Dilation value for convolution layer.
use_bias : bool, default False
Whether the layer uses a bias vector.
use_bn : bool, default True
Whether to use BatchNorm layer.
return_preact : bool, default False
Whether return pre-activation.
activate : bool, default True
Whether activate the convolution block.
"""
return PreConvBlock(
in_channels=in_channels,
out_channels=out_channels,
ksize=3,
stride=stride,
pad=pad,
dilate=dilate,
use_bias=use_bias,
use_bn=use_bn,
return_preact=return_preact,
activate=activate)
class DeconvBlock(Chain):
"""
Deconvolution block with batch normalization and activation.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
ksize : int or tuple/list of 2 int
Convolution window size.
stride : int or tuple/list of 2 int
Stride of the deconvolution.
pad : int or tuple/list of 2 int
Padding value for deconvolution layer.
dilate : int or tuple/list of 2 int, default 1
Dilation value for deconvolution layer.
groups : int, default 1
Number of groups.
use_bias : bool, default False
Whether the layer uses a bias vector.
use_bn : bool, default True
Whether to use BatchNorm layer.
bn_eps : float, default 1e-5
Small float added to variance in Batch norm.
activation : function or str or None, default F.relu
Activation function or name of activation function.
"""
def __init__(self,
in_channels,
out_channels,
ksize,
stride,
pad,
dilate=1,
groups=1,
use_bias=False,
use_bn=True,
bn_eps=1e-5,
activation=(lambda: F.relu),
**kwargs):
super(DeconvBlock, self).__init__(**kwargs)
self.activate = (activation is not None)
self.use_bn = use_bn
with self.init_scope():
self.conv = L.Deconvolution2D(
in_channels=in_channels,
out_channels=out_channels,
ksize=ksize,
stride=stride,
pad=pad,
nobias=(not use_bias),
dilate=dilate,
groups=groups)
if self.use_bn:
self.bn = L.BatchNormalization(
size=out_channels,
eps=bn_eps)
if self.activate:
self.activ = get_activation_layer(activation)
def __call__(self, x):
x = self.conv(x)
if self.use_bn:
x = self.bn(x)
if self.activate:
x = self.activ(x)
return x
def channel_shuffle(x,
groups):
"""
Channel shuffle operation from 'ShuffleNet: An Extremely Efficient Convolutional Neural Network for Mobile Devices,'
https://arxiv.org/abs/1707.01083.
Parameters:
----------
x : chainer.Variable or numpy.ndarray or cupy.ndarray
Input variable.
groups : int
Number of groups.
Returns:
-------
chainer.Variable or numpy.ndarray or cupy.ndarray
Resulted variable.
"""
batch, channels, height, width = x.shape
channels_per_group = channels // groups
x = F.reshape(x, shape=(batch, groups, channels_per_group, height, width))
x = F.swapaxes(x, axis1=1, axis2=2)
x = F.reshape(x, shape=(batch, channels, height, width))
return x
class ChannelShuffle(Chain):
"""
Channel shuffle layer. This is a wrapper over the same operation. It is designed to save the number of groups.
Parameters:
----------
channels : int
Number of channels.
groups : int
Number of groups.
"""
def __init__(self,
channels,
groups):
super(ChannelShuffle, self).__init__()
assert (channels % groups == 0)
self.groups = groups
def __call__(self, x):
return channel_shuffle(x, self.groups)
def channel_shuffle2(x,
groups):
"""
Channel shuffle operation from 'ShuffleNet: An Extremely Efficient Convolutional Neural Network for Mobile Devices,'
https://arxiv.org/abs/1707.01083. The alternative version.
Parameters:
----------
x : chainer.Variable or numpy.ndarray or cupy.ndarray
Input variable.
groups : int
Number of groups.
Returns:
-------
chainer.Variable or numpy.ndarray or cupy.ndarray
Resulted variable.
"""
batch, channels, height, width = x.shape
channels_per_group = channels // groups
x = F.reshape(x, shape=(batch, channels_per_group, groups, height, width))
x = F.swapaxes(x, axis1=1, axis2=2)
x = F.reshape(x, shape=(batch, channels, height, width))
return x
class ChannelShuffle2(Chain):
"""
Channel shuffle layer. This is a wrapper over the same operation. It is designed to save the number of groups.
The alternative version.
Parameters:
----------
channels : int
Number of channels.
groups : int
Number of groups.
"""
def __init__(self,
channels,
groups):
super(ChannelShuffle2, self).__init__()
assert (channels % groups == 0)
self.groups = groups
def __call__(self, x):
return channel_shuffle2(x, self.groups)
class SEBlock(Chain):
"""
Squeeze-and-Excitation block from 'Squeeze-and-Excitation Networks,' https://arxiv.org/abs/1709.01507.
Parameters:
----------
channels : int
Number of channels.
reduction : int, default 16
Squeeze reduction value.
mid_channels : int or None, default None
Number of middle channels.
round_mid : bool, default False
Whether to round middle channel number (make divisible by 8).
use_conv : bool, default True
Whether to convolutional layers instead of fully-connected ones.
activation : function or str, default F.relu
Activation function after the first convolution.
out_activation : function or str, default F.sigmoid
Activation function after the last convolution.
"""
def __init__(self,
channels,
reduction=16,
mid_channels=None,
round_mid=False,
use_conv=True,
mid_activation=(lambda: F.relu),
out_activation=(lambda: F.sigmoid)):
super(SEBlock, self).__init__()
self.use_conv = use_conv
if mid_channels is None:
mid_channels = channels // reduction if not round_mid else round_channels(float(channels) / reduction)
with self.init_scope():
if use_conv:
self.conv1 = conv1x1(
in_channels=channels,
out_channels=mid_channels,
use_bias=True)
else:
self.fc1 = L.Linear(
in_size=channels,
out_size=mid_channels)
self.activ = get_activation_layer(mid_activation)
if use_conv:
self.conv2 = conv1x1(
in_channels=mid_channels,
out_channels=channels,
use_bias=True)
else:
self.fc2 = L.Linear(
in_size=mid_channels,
out_size=channels)
self.sigmoid = get_activation_layer(out_activation)
def __call__(self, x):
w = F.average_pooling_2d(x, ksize=x.shape[2:])
if not self.use_conv:
w = F.reshape(w, shape=(w.shape[0], -1))
w = self.conv1(w) if self.use_conv else self.fc1(w)
w = self.activ(w)
w = self.conv2(w) if self.use_conv else self.fc2(w)
w = self.sigmoid(w)
if not self.use_conv:
w = F.expand_dims(F.expand_dims(w, axis=2), axis=3)
x = x * w
return x
class SABlock(Chain):
"""
Split-Attention block from 'ResNeSt: Split-Attention Networks,' https://arxiv.org/abs/2004.08955.
Parameters:
----------
out_channels : int
Number of output channels.
groups : int
Number of channel groups (cardinality, without radix).
radix : int
Number of splits within a cardinal group.
reduction : int, default 4
Squeeze reduction value.
min_channels : int, default 32
Minimal number of squeezed channels.
use_conv : bool, default True
Whether to convolutional layers instead of fully-connected ones.
bn_eps : float, default 1e-5
Small float added to variance in Batch norm.
"""
def __init__(self,
out_channels,
groups,
radix,
reduction=4,
min_channels=32,
use_conv=True,
bn_eps=1e-5):
super(SABlock, self).__init__()
self.groups = groups
self.radix = radix
self.use_conv = use_conv
in_channels = out_channels * radix
mid_channels = max(in_channels // reduction, min_channels)
with self.init_scope():
if use_conv:
self.conv1 = conv1x1(
in_channels=out_channels,
out_channels=mid_channels,
use_bias=True)
else:
self.fc1 = L.Linear(
in_size=out_channels,
out_size=mid_channels)
self.bn = L.BatchNormalization(
size=mid_channels,
eps=bn_eps)
self.activ = F.relu
if use_conv:
self.conv2 = conv1x1(
in_channels=mid_channels,
out_channels=in_channels,
use_bias=True)
else:
self.fc2 = L.Linear(
in_size=mid_channels,
out_size=in_channels)
self.softmax = partial(
F.softmax,
axis=1)
def __call__(self, x):
batch, channels, height, width = x.shape
x = F.reshape(x, shape=(batch, self.radix, channels // self.radix, height, width))
w = F.sum(x, axis=1)
w = F.average_pooling_2d(w, ksize=w.shape[2:])
if not self.use_conv:
w = F.reshape(w, shape=(w.shape[0], -1))
w = self.conv1(w) if self.use_conv else self.fc1(w)
w = self.bn(w)
w = self.activ(w)
w = self.conv2(w) if self.use_conv else self.fc2(w)
w = F.reshape(w, shape=(batch, self.groups, self.radix, -1))
w = F.swapaxes(w, axis1=1, axis2=2)
w = self.softmax(w)
w = F.reshape(w, shape=(batch, self.radix, -1, 1, 1))
x = x * w
x = F.sum(x, axis=1)
return x
class SAConvBlock(Chain):
"""
Split-Attention convolution block from 'ResNeSt: Split-Attention Networks,' https://arxiv.org/abs/2004.08955.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
ksize : int or tuple/list of 2 int
Convolution window size.
stride : int or tuple/list of 2 int
Stride of the convolution.
pad : int or tuple/list of 2 int
Padding value for convolution layer.
dilate : int or tuple/list of 2 int, default 1
Dilation value for convolution layer.
groups : int, default 1
Number of groups.
use_bias : bool, default False
Whether the layer uses a bias vector.
use_bn : bool, default True
Whether to use BatchNorm layer.
bn_eps : float, default 1e-5
Small float added to variance in Batch norm.
activation : function or str or None, default F.relu
Activation function or name of activation function.
radix : int, default 2
Number of splits within a cardinal group.
reduction : int, default 4
Squeeze reduction value.
min_channels : int, default 32
Minimal number of squeezed channels.
use_conv : bool, default True
Whether to convolutional layers instead of fully-connected ones.
"""
def __init__(self,
in_channels,
out_channels,
ksize,
stride,
pad,
dilate=1,
groups=1,
use_bias=False,
use_bn=True,
bn_eps=1e-5,
activation=(lambda: F.relu),
radix=2,
reduction=4,
min_channels=32,
use_conv=True):
super(SAConvBlock, self).__init__()
with self.init_scope():
self.conv = ConvBlock(
in_channels=in_channels,
out_channels=(out_channels * radix),
ksize=ksize,
stride=stride,
pad=pad,
dilate=dilate,
groups=(groups * radix),
use_bias=use_bias,
use_bn=use_bn,
bn_eps=bn_eps,
activation=activation)
self.att = SABlock(
out_channels=out_channels,
groups=groups,
radix=radix,
reduction=reduction,
min_channels=min_channels,
use_conv=use_conv,
bn_eps=bn_eps)
def __call__(self, x):
x = self.conv(x)
x = self.att(x)
return x
def saconv3x3_block(in_channels,
out_channels,
stride=1,
pad=1,
**kwargs):
"""
3x3 version of the Split-Attention convolution block.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
stride : int or tuple/list of 2 int, default 1
Stride of the convolution.
pad : int or tuple/list of 2 int, default 1
Padding value for convolution layer.
"""
return SAConvBlock(
in_channels=in_channels,
out_channels=out_channels,
ksize=3,
stride=stride,
pad=pad,
**kwargs)
class PixelShuffle(Chain):
"""
Pixel-shuffle operation from 'Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel
Convolutional Neural Network,' https://arxiv.org/abs/1609.05158.
Parameters:
----------
scale_factor : int
Multiplier for spatial size.
"""
def __init__(self,
scale_factor,
**kwargs):
super(PixelShuffle, self).__init__(**kwargs)
self.scale_factor = scale_factor
def __call__(self, x):
f1 = self.scale_factor
f2 = self.scale_factor
batch, channels, height, width = x.shape
assert (channels % f1 % f2 == 0)
new_channels = channels // f1 // f2
x = F.reshape(x, shape=(batch, new_channels, f1 * f2, height, width))
x = F.reshape(x, shape=(batch, new_channels, f1, f2, height, width))
x = F.transpose(x, axes=(0, 1, 4, 2, 5, 3))
x = F.reshape(x, shape=(batch, new_channels, height * f1, width * f2))
return x
class DucBlock(Chain):
"""
Dense Upsampling Convolution (DUC) block from 'Understanding Convolution for Semantic Segmentation,'
https://arxiv.org/abs/1702.08502.
Parameters:
----------
in_channels : int
Number of input channels.
out_channels : int
Number of output channels.
scale_factor : int
Multiplier for spatial size.
"""
def __init__(self,
in_channels,
out_channels,
scale_factor,
**kwargs):
super(DucBlock, self).__init__(**kwargs)
mid_channels = (scale_factor * scale_factor) * out_channels
with self.init_scope():
self.conv = conv3x3_block(
in_channels=in_channels,
out_channels=mid_channels)
self.pix_shuffle = PixelShuffle(scale_factor=scale_factor)
def __call__(self, x):
x = self.conv(x)
x = self.pix_shuffle(x)
return x
class SimpleSequential(Chain):
"""
A sequential chain that can be used instead of Sequential.
"""
def __init__(self):
super(SimpleSequential, self).__init__()
self.layer_names = []
def __setattr__(self, name, value):
super(SimpleSequential, self).__setattr__(name, value)
if self.within_init_scope and callable(value):
self.layer_names.append(name)
def __delattr__(self, name):
super(SimpleSequential, self).__delattr__(name)
try:
self.layer_names.remove(name)
except ValueError:
pass
def __len__(self):
return len(self.layer_names)
def __call__(self, x):
for name in self.layer_names:
x = self[name](x)
return x
def el(self, index):
return self[self.layer_names[index]]
class DualPathSequential(SimpleSequential):
"""
A sequential container for blocks with dual inputs/outputs.
Blocks will be executed in the order they are added.
Parameters:
----------
return_two : bool, default True
Whether to return two output after execution.
first_ordinals : int, default 0
Number of the first blocks with single input/output.
last_ordinals : int, default 0
Number of the final blocks with single input/output.
dual_path_scheme : function
Scheme of dual path response for a block.
dual_path_scheme_ordinal : function
Scheme of dual path response for an ordinal block.
"""
def __init__(self,
return_two=True,
first_ordinals=0,
last_ordinals=0,
dual_path_scheme=(lambda block, x1, x2: block(x1, x2)),
dual_path_scheme_ordinal=(lambda block, x1, x2: (block(x1), x2))):
super(DualPathSequential, self).__init__()
self.return_two = return_two
self.first_ordinals = first_ordinals
self.last_ordinals = last_ordinals
self.dual_path_scheme = dual_path_scheme
self.dual_path_scheme_ordinal = dual_path_scheme_ordinal
def __call__(self, x1, x2=None):
length = len(self.layer_names)
for i, block_name in enumerate(self.layer_names):
block = self[block_name]
if (i < self.first_ordinals) or (i >= length - self.last_ordinals):
x1, x2 = self.dual_path_scheme_ordinal(block, x1, x2)
else:
x1, x2 = self.dual_path_scheme(block, x1, x2)
if self.return_two:
return x1, x2
else:
return x1
class Concurrent(SimpleSequential):
"""
A container for concatenation of modules on the base of the sequential container.
Parameters:
----------
axis : int, default 1
The axis on which to concatenate the outputs.
stack : bool, default False
Whether to concatenate tensors along a new dimension.
merge_type : str, default None
Type of branch merging.
"""
def __init__(self,
axis=1,
stack=False,
merge_type=None):
super(Concurrent, self).__init__()
assert (merge_type is None) or (merge_type in ["cat", "stack", "sum"])
self.axis = axis
if merge_type is not None:
self.merge_type = merge_type
else:
self.merge_type = "stack" if stack else "cat"
def __call__(self, x):
out = []
for name in self.layer_names:
out.append(self[name](x))
if self.merge_type == "stack":
out = F.stack(tuple(out), axis=self.axis)
elif self.merge_type == "cat":
out = F.concat(tuple(out), axis=self.axis)
elif self.merge_type == "sum":
out = F.sum(F.stack(tuple(out), axis=self.axis), self.axis)
else:
raise NotImplementedError()
return out
class SequentialConcurrent(SimpleSequential):
"""
A sequential container with concatenated outputs.
Blocks will be executed in the order they are added.
Parameters:
----------
axis : int, default 1
The axis on which to concatenate the outputs.
stack : bool, default False
Whether to concatenate tensors along a new dimension.
cat_input : bool, default True
Whether to concatenate input tensor.
"""
def __init__(self,
axis=1,
stack=False,
cat_input=True):
super(SequentialConcurrent, self).__init__()
self.axis = axis
self.stack = stack
self.cat_input = cat_input
def __call__(self, x):
out = [x] if self.cat_input else []
for name in self.layer_names:
x = self[name](x)
out.append(x)
if self.stack:
out = F.stack(tuple(out), axis=self.axis)
else:
out = F.concat(tuple(out), axis=self.axis)
return out
class ParametricSequential(SimpleSequential):
"""
A sequential container for modules with parameters.
Blocks will be executed in the order they are added.
"""
def __init__(self):
super(ParametricSequential, self).__init__()
def __call__(self, x, **kwargs):
for name in self.layer_names:
x = self[name](x, **kwargs)
return x
class ParametricConcurrent(SimpleSequential):
"""
A container for concatenation of modules on the base of the sequential container.
Parameters:
----------
axis : int, default 1
The axis on which to concatenate the outputs.
"""
def __init__(self, axis=1):
super(ParametricConcurrent, self).__init__()
self.axis = axis
def __call__(self, x, **kwargs):
out = []
for name in self.layer_names:
out.append(self[name](x, **kwargs))
out = F.concat(tuple(out), axis=self.axis)
return out
class Hourglass(Chain):
"""
A hourglass block.
Parameters:
----------
down_seq : SimpleSequential
Down modules as sequential.
up_seq : SimpleSequential
Up modules as sequential.
skip_seq : SimpleSequential
Skip connection modules as sequential.
merge_type : str, default 'add'
Type of concatenation of up and skip outputs.
return_first_skip : bool, default False
Whether return the first skip connection output. Used in ResAttNet.
"""
def __init__(self,
down_seq,
up_seq,
skip_seq,
merge_type="add",
return_first_skip=False):
super(Hourglass, self).__init__()
self.depth = len(down_seq)
assert (merge_type in ["cat", "add"])
assert (len(up_seq) == self.depth)
assert (len(skip_seq) in (self.depth, self.depth + 1))
self.merge_type = merge_type
self.return_first_skip = return_first_skip
self.extra_skip = (len(skip_seq) == self.depth + 1)
with self.init_scope():
self.down_seq = down_seq
self.up_seq = up_seq
self.skip_seq = skip_seq
def _merge(self, x, y):
if y is not None:
if self.merge_type == "cat":
x = F.concat((x, y), axis=1)
elif self.merge_type == "add":
x = x + y
return x
def __call__(self, x):
y = None
down_outs = [x]
for down_module_name in self.down_seq.layer_names:
down_module = self.down_seq[down_module_name]
x = down_module(x)
down_outs.append(x)
for i in range(len(down_outs)):
if i != 0:
y = down_outs[self.depth - i]
skip_module = self.skip_seq.el(self.depth - i)
y = skip_module(y)
x = self._merge(x, y)
if i != len(down_outs) - 1:
if (i == 0) and self.extra_skip:
skip_module = self.skip_seq.el(self.depth)
x = skip_module(x)
up_module = self.up_seq.el(self.depth - 1 - i)
x = up_module(x)
if self.return_first_skip:
return x, y
else:
return x
class SesquialteralHourglass(Chain):
"""
A sesquialteral hourglass block.
Parameters:
----------
down1_seq : SimpleSequential
The first down modules as sequential.
skip1_seq : SimpleSequential
The first skip connection modules as sequential.
up_seq : SimpleSequential
Up modules as sequential.
skip2_seq : SimpleSequential
The second skip connection modules as sequential.
down2_seq : SimpleSequential
The second down modules as sequential.
merge_type : str, default 'cat'
Type of concatenation of up and skip outputs.
"""
def __init__(self,
down1_seq,
skip1_seq,
up_seq,
skip2_seq,
down2_seq,
merge_type="cat"):
super(SesquialteralHourglass, self).__init__()
assert (len(down1_seq) == len(up_seq))
assert (len(down1_seq) == len(down2_seq))
assert (len(skip1_seq) == len(skip2_seq))
assert (len(down1_seq) == len(skip1_seq) - 1)
assert (merge_type in ["cat", "add"])
self.merge_type = merge_type
self.depth = len(down1_seq)
with self.init_scope():
self.down1_seq = down1_seq
self.skip1_seq = skip1_seq
self.up_seq = up_seq
self.skip2_seq = skip2_seq
self.down2_seq = down2_seq
def _merge(self, x, y):
if y is not None:
if self.merge_type == "cat":
x = F.concat((x, y), axis=1)
elif self.merge_type == "add":
x = x + y
return x
def __call__(self, x):
y = self.skip1_seq[self.skip1_seq.layer_names[0]](x)
skip1_outs = [y]
for i in range(self.depth):
x = self.down1_seq[self.down1_seq.layer_names[i]](x)
y = self.skip1_seq[self.skip1_seq.layer_names[i + 1]](x)
skip1_outs.append(y)
x = skip1_outs[self.depth]
y = self.skip2_seq[self.skip2_seq.layer_names[0]](x)
skip2_outs = [y]
for i in range(self.depth):
x = self.up_seq[self.up_seq.layer_names[i]](x)
y = skip1_outs[self.depth - 1 - i]
x = self._merge(x, y)
y = self.skip2_seq[self.skip2_seq.layer_names[i + 1]](x)
skip2_outs.append(y)
x = self.skip2_seq[self.skip2_seq.layer_names[self.depth]](x)
for i in range(self.depth):
x = self.down2_seq[self.down2_seq.layer_names[i]](x)
y = skip2_outs[self.depth - 1 - i]
x = self._merge(x, y)
return x
class MultiOutputSequential(SimpleSequential):
"""
A sequential container with multiple outputs.
Blocks will be executed in the order they are added.
Parameters:
----------
multi_output : bool, default True
Whether to return multiple output.
dual_output : bool, default False
Whether to return dual output.
return_last : bool, default True
Whether to forcibly return last value.
"""
def __init__(self,
multi_output=True,
dual_output=False,
return_last=True):
super(MultiOutputSequential, self).__init__()
self.multi_output = multi_output
self.dual_output = dual_output
self.return_last = return_last
def __call__(self, x):
outs = []
for name in self.layer_names:
block = self[name]
x = block(x)
if hasattr(block, "do_output") and block.do_output:
outs.append(x)
elif hasattr(block, "do_output2") and block.do_output2:
assert (type(x) == tuple)
outs.extend(x[1])
x = x[0]
if self.multi_output:
return [x] + outs if self.return_last else outs
elif self.dual_output:
return x, outs
else:
return x
class ParallelConcurent(SimpleSequential):
"""
A sequential container with multiple inputs and single/multiple outputs.
Modules will be executed in the order they are added.
Parameters:
----------
axis : int, default 1
The axis on which to concatenate the outputs.
merge_type : str, default 'list'
Type of branch merging.
"""
def __init__(self,
axis=1,
merge_type="list"):
super(ParallelConcurent, self).__init__()
assert (merge_type is None) or (merge_type in ["list", "cat", "stack", "sum"])
self.axis = axis
self.merge_type = merge_type
def __call__(self, x):
out = []
for name, xi in zip(self.layer_names, x):
out.append(self[name](xi))
if self.merge_type == "list":
pass
elif self.merge_type == "stack":
out = F.stack(tuple(out), axis=self.axis)
elif self.merge_type == "cat":
out = F.concat(tuple(out), axis=self.axis)
elif self.merge_type == "sum":
out = F.sum(F.stack(tuple(out), axis=self.axis), self.axis)
else:
raise NotImplementedError()
return out
class DualPathParallelConcurent(SimpleSequential):
"""
A sequential container with multiple dual-path inputs and single/multiple outputs.
Modules will be executed in the order they are added.
Parameters:
----------
axis : int, default 1
The axis on which to concatenate the outputs.
merge_type : str, default 'list'
Type of branch merging.
"""
def __init__(self,
axis=1,
merge_type="list"):
super(DualPathParallelConcurent, self).__init__()
assert (merge_type is None) or (merge_type in ["list", "cat", "stack", "sum"])
self.axis = axis
self.merge_type = merge_type
def __call__(self, x1, x2):
x1_out = []
x2_out = []
for name, x1i, x2i in zip(self.layer_names, x1, x2):
y1i, y2i = self[name](x1i, x2i)
x1_out.append(y1i)
x2_out.append(y2i)
if self.merge_type == "list":
pass
elif self.merge_type == "stack":
x1_out = F.stack(tuple(x1_out), axis=self.axis)
x2_out = F.stack(tuple(x2_out), axis=self.axis)
elif self.merge_type == "cat":
x1_out = F.concat(tuple(x1_out), axis=self.axis)
x2_out = F.concat(tuple(x2_out), axis=self.axis)
elif self.merge_type == "sum":
x1_out = F.sum(F.stack(tuple(x1_out), axis=self.axis), self.axis)
x2_out = F.sum(F.stack(tuple(x2_out), axis=self.axis), self.axis)
else:
raise NotImplementedError()
return x1_out, x2_out
class Flatten(Chain):
"""
Simple flatten block.
"""
def __call__(self, x):
return x.reshape(x.shape[0], -1)
class AdaptiveAvgPool2D(Chain):
"""
Simple adaptive average pooling block.
"""
def __call__(self, x):
return F.average_pooling_2d(x, ksize=x.shape[2:])
class NormActivation(Chain):
"""
Activation block with preliminary batch normalization. It's used by itself as the final block in PreResNet.
Parameters:
----------
in_channels : int
Number of input channels.
bn_eps : float, default 1e-5
Small float added to variance in Batch norm.
activation : function or str or None, default F.relu
Activation function or name of activation function.
"""
def __init__(self,
in_channels,
bn_eps=1e-5,
activation=(lambda: F.relu),
**kwargs):
super(NormActivation, self).__init__(**kwargs)
with self.init_scope():
self.bn = L.BatchNormalization(
size=in_channels,
eps=bn_eps)
self.activ = get_activation_layer(activation)
def __call__(self, x):
x = self.bn(x)
x = self.activ(x)
return x
class InterpolationBlock(Chain):
"""
Interpolation block.
Parameters:
----------
scale_factor : int
Multiplier for spatial size.
out_size : tuple of 2 int, default None
Spatial size of the output tensor for the bilinear interpolation operation.
up : bool, default True
Whether to upsample or downsample.
mode : str, default 'bilinear'
Algorithm used for upsampling.
align_corners : bool, default True
Whether to align the corner pixels of the input and output tensors.
"""
def __init__(self,
scale_factor,
out_size=None,
up=True,
mode="bilinear",
align_corners=True,
**kwargs):
super(InterpolationBlock, self).__init__(**kwargs)
self.scale_factor = scale_factor
self.out_size = out_size
self.up = up
self.mode = mode
self.align_corners = align_corners
def __call__(self, x, size=None):
out_size = self.calc_out_size(x) if size is None else size
return F.resize_images(x, output_shape=out_size, mode=self.mode, align_corners=self.align_corners)
def calc_out_size(self, x):
if self.out_size is not None:
return self.out_size
if self.up:
return tuple(s * self.scale_factor for s in x.shape[2:])
else:
return tuple(s // self.scale_factor for s in x.shape[2:])
class HeatmapMaxDetBlock(Chain):
"""
Heatmap maximum detector block (for human pose estimation task).
"""
def __init__(self,
**kwargs):
super(HeatmapMaxDetBlock, self).__init__(**kwargs)
def __call__(self, x):
heatmap = x
vector_dim = 2
batch = heatmap.shape[0]
channels = heatmap.shape[1]
in_size = x.shape[2:]
heatmap_vector = F.reshape(heatmap, shape=(batch, channels, -1))
indices = F.cast(F.expand_dims(F.argmax(heatmap_vector, axis=vector_dim), axis=vector_dim), np.float32)
scores = F.max(heatmap_vector, axis=vector_dim, keepdims=True)
scores_mask = (scores.array > 0.0).astype(np.float32)
pts_x = (indices.array % in_size[1]) * scores_mask
pts_y = (indices.array // in_size[1]) * scores_mask
pts = F.concat((pts_x, pts_y, scores), axis=vector_dim).array
for b in range(batch):
for k in range(channels):
hm = heatmap[b, k, :, :].array
px = int(pts_x[b, k])
py = int(pts_y[b, k])
if (0 < px < in_size[1] - 1) and (0 < py < in_size[0] - 1):
pts[b, k, 0] += np.sign(hm[py, px + 1] - hm[py, px - 1]) * 0.25
pts[b, k, 1] += np.sign(hm[py + 1, px] - hm[py - 1, px]) * 0.25
return pts
| [
1,
9995,
13,
1678,
13103,
6745,
1475,
363,
4733,
297,
678,
4008,
29889,
13,
15945,
29908,
13,
13,
1649,
497,
1649,
353,
6024,
14486,
29918,
305,
12629,
742,
525,
20130,
557,
7445,
742,
525,
1123,
29931,
29965,
29953,
742,
525,
29950,
10840,
728,
742,
525,
657,
29918,
11236,
362,
29918,
13148,
742,
525,
12756,
12810,
29887,
11426,
29906,
29928,
742,
13,
965,
525,
3549,
519,
29928,
1947,
742,
525,
29928,
1947,
7445,
742,
525,
1168,
29894,
7445,
29896,
29881,
742,
525,
20580,
29896,
29916,
29896,
742,
525,
20580,
29941,
29916,
29941,
742,
525,
19488,
3538,
29918,
20580,
29941,
29916,
29941,
742,
525,
1168,
29894,
7445,
742,
13,
965,
525,
20580,
29896,
29916,
29896,
29918,
1271,
742,
525,
20580,
29941,
29916,
29941,
29918,
1271,
742,
525,
20580,
29945,
29916,
29945,
29918,
1271,
742,
525,
20580,
29955,
29916,
29955,
29918,
1271,
742,
525,
28012,
20580,
29918,
1271,
742,
525,
28012,
20580,
29941,
29916,
29941,
29918,
1271,
742,
13,
965,
525,
28012,
20580,
29945,
29916,
29945,
29918,
1271,
742,
525,
29881,
5652,
20580,
29941,
29916,
29941,
29918,
1271,
742,
525,
6572,
1168,
29894,
7445,
742,
525,
1457,
29918,
20580,
29896,
29916,
29896,
29918,
1271,
742,
525,
1457,
29918,
20580,
29941,
29916,
29941,
29918,
1271,
742,
13,
965,
525,
2772,
20580,
7445,
742,
525,
13599,
2713,
21897,
742,
525,
13599,
2713,
21897,
29906,
742,
525,
1660,
7445,
742,
525,
29903,
2882,
908,
742,
525,
8132,
1168,
29894,
7445,
742,
525,
4977,
20580,
29941,
29916,
29941,
29918,
1271,
742,
13,
965,
525,
29637,
2713,
21897,
742,
525,
29928,
1682,
7445,
742,
525,
15427,
16941,
2556,
742,
525,
29928,
950,
2605,
16941,
2556,
742,
525,
1168,
3784,
742,
525,
16941,
2556,
1168,
3784,
742,
13,
965,
525,
4736,
300,
2200,
16941,
2556,
742,
525,
4736,
300,
2200,
1168,
3784,
742,
525,
29950,
18041,
605,
742,
525,
29903,
267,
339,
616,
357,
284,
29950,
18041,
605,
742,
13,
965,
525,
15329,
6466,
16941,
2556,
742,
525,
2177,
6553,
1168,
2764,
296,
742,
525,
29928,
950,
2605,
2177,
6553,
1168,
2764,
296,
742,
525,
29943,
5066,
841,
742,
525,
29909,
1388,
415,
573,
12810,
29887,
11426,
29906,
29928,
742,
13,
965,
525,
29940,
555,
21786,
362,
742,
525,
4074,
3733,
362,
7445,
742,
525,
3868,
271,
1958,
7976,
6362,
7445,
2033,
13,
13,
3166,
16096,
1053,
338,
2220,
13,
3166,
2090,
312,
8789,
1053,
7687,
13,
5215,
12655,
408,
7442,
13,
3166,
521,
4008,
1053,
678,
475,
13,
5215,
521,
4008,
29889,
12171,
408,
383,
13,
5215,
521,
4008,
29889,
4965,
408,
365,
13,
3166,
521,
4008,
1053,
1544,
13,
3166,
521,
4008,
29889,
11228,
19427,
1053,
903,
657,
29918,
11228,
3950,
13,
3166,
521,
4008,
29889,
11918,
1053,
24953,
13,
13,
13,
1753,
4513,
29918,
305,
12629,
29898,
305,
12629,
29892,
13,
462,
259,
8572,
272,
29922,
29947,
1125,
13,
1678,
9995,
13,
1678,
21595,
7688,
287,
8242,
1353,
313,
5675,
8572,
1821,
5858,
467,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
18196,
584,
938,
470,
5785,
13,
4706,
8533,
1353,
310,
18196,
29889,
13,
1678,
8572,
272,
584,
938,
29892,
2322,
29871,
29947,
13,
4706,
838,
10194,
995,
29889,
13,
13,
1678,
16969,
29901,
13,
1678,
448,
22158,
13,
1678,
938,
13,
4706,
1334,
523,
287,
1353,
310,
18196,
29889,
13,
1678,
9995,
13,
1678,
28240,
29918,
305,
12629,
353,
4236,
29898,
524,
29898,
305,
12629,
718,
8572,
272,
847,
29871,
29906,
29889,
29900,
29897,
849,
8572,
272,
334,
8572,
272,
29892,
8572,
272,
29897,
13,
1678,
565,
5785,
29898,
29878,
7261,
29918,
305,
12629,
29897,
529,
29871,
29900,
29889,
29929,
334,
18196,
29901,
13,
4706,
28240,
29918,
305,
12629,
4619,
8572,
272,
13,
1678,
736,
28240,
29918,
305,
12629,
13,
13,
13,
1990,
28301,
7445,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
28301,
1302,
265,
3559,
2908,
363,
7234,
29050,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
2428,
29898,
20130,
557,
7445,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
736,
6213,
13,
13,
1678,
822,
4770,
276,
558,
12035,
1311,
1125,
13,
4706,
736,
22372,
978,
29913,
580,
4286,
4830,
29898,
978,
29922,
1311,
17255,
1990,
1649,
17255,
978,
1649,
29897,
13,
13,
13,
1990,
830,
29931,
29965,
29953,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
830,
29931,
29965,
29953,
26229,
7546,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
736,
383,
29889,
24049,
29898,
29916,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29953,
29889,
29900,
29897,
13,
13,
13,
1990,
3925,
728,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
3925,
728,
26229,
740,
515,
525,
7974,
292,
363,
21775,
362,
6680,
29879,
5501,
2045,
597,
279,
26560,
29889,
990,
29914,
6897,
29914,
29896,
29955,
29896,
29900,
29889,
29900,
29945,
29929,
29946,
29896,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
736,
921,
334,
383,
29889,
18816,
29885,
3398,
29898,
29916,
29897,
13,
13,
13,
1990,
379,
29903,
335,
29885,
3398,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
28268,
2657,
630,
4365,
29885,
3398,
740,
29892,
577,
29899,
13998,
2898,
29899,
3259,
310,
4365,
29885,
3398,
515,
525,
7974,
292,
363,
21600,
6779,
29963,
29941,
5501,
13,
1678,
2045,
597,
279,
26560,
29889,
990,
29914,
6897,
29914,
29896,
29929,
29900,
29945,
29889,
29900,
29906,
29906,
29946,
29946,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
736,
383,
29889,
24049,
29898,
29916,
718,
29871,
29941,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29953,
29889,
29900,
29897,
847,
29871,
29953,
29889,
29900,
13,
13,
13,
1990,
379,
10840,
728,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
379,
29899,
10840,
728,
26229,
740,
515,
525,
7974,
292,
363,
21600,
6779,
29963,
29941,
5501,
2045,
597,
279,
26560,
29889,
990,
29914,
6897,
29914,
29896,
29929,
29900,
29945,
29889,
29900,
29906,
29906,
29946,
29946,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
736,
921,
334,
383,
29889,
24049,
29898,
29916,
718,
29871,
29941,
29889,
29900,
29892,
29871,
29900,
29889,
29900,
29892,
29871,
29953,
29889,
29900,
29897,
847,
29871,
29953,
29889,
29900,
13,
13,
13,
1753,
679,
29918,
11236,
362,
29918,
13148,
29898,
11236,
362,
1125,
13,
1678,
9995,
13,
1678,
6204,
26229,
7546,
515,
1347,
29914,
2220,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
26229,
584,
740,
470,
851,
13,
4706,
21775,
362,
740,
470,
1024,
310,
26229,
740,
29889,
13,
13,
1678,
16969,
29901,
13,
1678,
448,
22158,
13,
1678,
740,
13,
4706,
21775,
362,
7546,
29889,
13,
1678,
9995,
13,
1678,
4974,
313,
11236,
362,
338,
451,
6213,
29897,
13,
1678,
565,
338,
2220,
29898,
11236,
362,
1125,
13,
4706,
736,
26229,
580,
13,
1678,
25342,
338,
8758,
29898,
11236,
362,
29892,
851,
1125,
13,
4706,
565,
26229,
1275,
376,
2674,
29884,
1115,
13,
9651,
736,
383,
29889,
2674,
29884,
13,
4706,
25342,
26229,
1275,
376,
2674,
29884,
29953,
1115,
13,
9651,
736,
830,
29931,
29965,
29953,
580,
13,
4706,
25342,
26229,
1275,
376,
2774,
728,
1115,
13,
9651,
736,
3925,
728,
580,
13,
9651,
396,
736,
7687,
29898,
13,
9651,
396,
268,
383,
29889,
2774,
728,
29892,
13,
9651,
396,
268,
21762,
11759,
29896,
29889,
29900,
2314,
13,
4706,
25342,
26229,
1275,
376,
29882,
2774,
728,
1115,
13,
9651,
736,
379,
10840,
728,
580,
13,
4706,
25342,
26229,
1275,
376,
18816,
29885,
3398,
1115,
13,
9651,
736,
383,
29889,
18816,
29885,
3398,
13,
4706,
25342,
26229,
1275,
376,
9499,
335,
29885,
3398,
1115,
13,
9651,
736,
379,
29903,
335,
29885,
3398,
580,
13,
4706,
1683,
29901,
13,
9651,
12020,
2216,
1888,
2037,
287,
2392,
580,
13,
1678,
1683,
29901,
13,
4706,
736,
26229,
13,
13,
13,
1990,
12002,
12810,
29887,
11426,
29906,
29928,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
12002,
6588,
11565,
292,
5858,
363,
18652,
848,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
736,
383,
29889,
12483,
482,
29918,
10109,
292,
29918,
29906,
29881,
29898,
29916,
29892,
413,
2311,
29922,
29916,
29889,
12181,
29961,
29906,
29901,
2314,
13,
13,
13,
1990,
7605,
519,
29928,
1947,
29898,
2324,
29889,
6595,
1125,
13,
1678,
9995,
13,
1678,
7605,
519,
20619,
7546,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
5680,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
5680,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
2847,
29918,
7915,
584,
421,
8768,
29889,
15514,
3950,
10299,
1673,
2322,
6213,
13,
4706,
17250,
3950,
363,
278,
421,
17460,
29952,
18177,
4636,
29889,
13,
1678,
2847,
29918,
29890,
3173,
29901,
421,
8768,
29889,
15514,
3950,
10299,
1673,
2322,
29871,
29900,
13,
4706,
17250,
3950,
363,
278,
24003,
4608,
29889,
13,
1678,
954,
29918,
6768,
584,
938,
29892,
2322,
29871,
29896,
13,
4706,
9681,
310,
1831,
519,
3987,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
297,
29918,
305,
12629,
29892,
13,
462,
714,
29918,
305,
12629,
29892,
13,
462,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
2847,
29918,
7915,
29922,
8516,
29892,
13,
462,
2847,
29918,
29890,
3173,
29922,
29900,
29892,
13,
462,
954,
29918,
6768,
29922,
29896,
1125,
13,
4706,
2428,
29898,
3549,
519,
29928,
1947,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
262,
29918,
305,
12629,
353,
297,
29918,
305,
12629,
13,
4706,
1583,
29889,
449,
29918,
305,
12629,
353,
714,
29918,
305,
12629,
13,
4706,
1583,
29889,
1509,
29918,
29890,
3173,
353,
671,
29918,
29890,
3173,
13,
4706,
1583,
29889,
1949,
29918,
6768,
353,
954,
29918,
6768,
13,
13,
4706,
411,
1583,
29889,
2344,
29918,
6078,
7295,
13,
9651,
7688,
29918,
11228,
3950,
353,
903,
657,
29918,
11228,
3950,
29898,
11228,
29918,
7915,
29897,
13,
9651,
1583,
29889,
7915,
353,
24953,
29898,
13,
18884,
2847,
3950,
29922,
7915,
29918,
11228,
3950,
29892,
13,
18884,
8267,
7607,
1949,
29918,
6768,
29892,
714,
29918,
305,
12629,
29892,
297,
29918,
305,
12629,
511,
13,
18884,
1024,
543,
7915,
1159,
13,
9651,
565,
671,
29918,
29890,
3173,
29901,
13,
18884,
24003,
29918,
11228,
3950,
353,
903,
657,
29918,
11228,
3950,
29898,
11228,
29918,
29890,
3173,
29897,
13,
18884,
1583,
29889,
29890,
3173,
353,
24953,
29898,
13,
462,
1678,
2847,
3950,
29922,
29890,
3173,
29918,
11228,
3950,
29892,
13,
462,
1678,
8267,
7607,
1949,
29918,
6768,
29892,
714,
29918,
305,
12629,
511,
13,
462,
1678,
1024,
543,
29890,
3173,
1159,
13,
9651,
1683,
29901,
13,
18884,
1583,
29889,
29890,
3173,
353,
6213,
13,
13,
1678,
822,
6375,
29898,
1311,
29892,
921,
29892,
16285,
1125,
13,
4706,
7688,
353,
1583,
29889,
26330,
29889,
19730,
29898,
1311,
29889,
7915,
29889,
1272,
29892,
16285,
29922,
513,
1575,
29892,
9685,
29922,
29900,
29897,
13,
4706,
921,
353,
383,
29889,
18837,
29918,
6229,
29879,
29898,
29916,
29892,
9685,
10457,
29896,
29897,
13,
4706,
921,
353,
383,
29889,
16175,
29918,
2922,
16109,
29898,
7915,
29892,
921,
29897,
13,
4706,
921,
353,
383,
29889,
29879,
802,
29872,
911,
29898,
29916,
29892,
9685,
10457,
29896,
29897,
13,
4706,
565,
1583,
29889,
1509,
29918,
29890,
3173,
29901,
13,
9651,
24003,
353,
1583,
29889,
26330,
29889,
19730,
29898,
1311,
29889,
29890,
3173,
29889,
1272,
29892,
16285,
29922,
513,
1575,
29892,
9685,
29922,
29900,
29897,
13,
9651,
921,
4619,
24003,
13,
4706,
736,
921,
13,
13,
1678,
732,
6799,
13,
1678,
822,
1596,
519,
29918,
5965,
2395,
29898,
1311,
1125,
13,
4706,
1580,
29879,
353,
518,
13,
9651,
6702,
262,
29918,
305,
12629,
742,
1583,
29889,
262,
29918,
305,
12629,
511,
13,
9651,
6702,
449,
29918,
305,
12629,
742,
1583,
29889,
449,
29918,
305,
12629,
511,
13,
9651,
6702,
1509,
29918,
29890,
3173,
742,
1583,
29889,
1509,
29918,
29890,
3173,
511,
13,
9651,
6702,
1949,
29918,
6768,
742,
1583,
29889,
1949,
29918,
6768,
511,
13,
4706,
4514,
13,
4706,
363,
1580,
297,
1580,
29879,
29901,
13,
9651,
7709,
1580,
13,
13,
13,
1990,
360,
1947,
7445,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
10117,
20619,
2908,
411,
350,
905,
4226,
2133,
322,
26229,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
671,
29918,
11197,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
671,
350,
905,
29940,
555,
7546,
29889,
13,
1678,
289,
29876,
29918,
8961,
584,
5785,
29892,
2322,
29871,
29896,
29872,
29899,
29945,
13,
4706,
18285,
5785,
2715,
304,
20162,
297,
350,
905,
6056,
29889,
13,
1678,
26229,
584,
740,
470,
851,
470,
6213,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
470,
1024,
310,
26229,
740,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
297,
29918,
305,
12629,
29892,
13,
462,
714,
29918,
305,
12629,
29892,
13,
462,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
671,
29918,
11197,
29922,
5574,
29892,
13,
462,
289,
29876,
29918,
8961,
29922,
29896,
29872,
29899,
29945,
29892,
13,
462,
26229,
7607,
2892,
29901,
383,
29889,
2674,
29884,
22164,
13,
4706,
2428,
29898,
29928,
1947,
7445,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
11236,
403,
353,
313,
11236,
362,
338,
451,
6213,
29897,
13,
4706,
1583,
29889,
1509,
29918,
11197,
353,
671,
29918,
11197,
13,
13,
4706,
411,
1583,
29889,
2344,
29918,
6078,
7295,
13,
9651,
1583,
29889,
13801,
353,
365,
29889,
12697,
29898,
13,
18884,
297,
29918,
2311,
29922,
262,
29918,
305,
12629,
29892,
13,
18884,
714,
29918,
2311,
29922,
449,
29918,
305,
12629,
29892,
13,
18884,
22182,
3173,
7607,
1333,
671,
29918,
29890,
3173,
876,
13,
9651,
565,
1583,
29889,
1509,
29918,
11197,
29901,
13,
18884,
1583,
29889,
11197,
353,
365,
29889,
23145,
19077,
2133,
29898,
13,
462,
1678,
2159,
29922,
449,
29918,
305,
12629,
29892,
13,
462,
1678,
321,
567,
29922,
11197,
29918,
8961,
29897,
13,
9651,
565,
1583,
29889,
11236,
403,
29901,
13,
18884,
1583,
29889,
11236,
353,
679,
29918,
11236,
362,
29918,
13148,
29898,
11236,
362,
29897,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
921,
353,
1583,
29889,
13801,
29898,
29916,
29897,
13,
4706,
565,
1583,
29889,
1509,
29918,
11197,
29901,
13,
9651,
921,
353,
1583,
29889,
11197,
29898,
29916,
29897,
13,
4706,
565,
1583,
29889,
11236,
403,
29901,
13,
9651,
921,
353,
1583,
29889,
11236,
29898,
29916,
29897,
13,
4706,
736,
921,
13,
13,
13,
1990,
1281,
29894,
7445,
29896,
29881,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
10117,
29871,
29896,
29928,
26851,
2908,
411,
350,
905,
4226,
2133,
322,
26229,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
413,
2311,
584,
938,
13,
4706,
1281,
4068,
3474,
2159,
29889,
13,
1678,
380,
2426,
584,
938,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
17132,
584,
938,
13,
4706,
349,
4676,
995,
363,
26851,
7546,
29889,
13,
1678,
21749,
403,
584,
938,
29892,
2322,
29871,
29896,
13,
4706,
360,
8634,
995,
363,
26851,
7546,
29889,
13,
1678,
6471,
584,
938,
29892,
2322,
29871,
29896,
13,
4706,
9681,
310,
6471,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
671,
29918,
11197,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
671,
350,
905,
29940,
555,
7546,
29889,
13,
1678,
289,
29876,
29918,
8961,
584,
5785,
29892,
2322,
29871,
29896,
29872,
29899,
29945,
13,
4706,
18285,
5785,
2715,
304,
20162,
297,
350,
905,
6056,
29889,
13,
1678,
26229,
584,
740,
470,
851,
470,
6213,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
470,
1024,
310,
26229,
740,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
297,
29918,
305,
12629,
29892,
13,
462,
714,
29918,
305,
12629,
29892,
13,
462,
413,
2311,
29892,
13,
462,
380,
2426,
29892,
13,
462,
17132,
29892,
13,
462,
21749,
403,
29922,
29896,
29892,
13,
462,
6471,
29922,
29896,
29892,
13,
462,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
671,
29918,
11197,
29922,
5574,
29892,
13,
462,
289,
29876,
29918,
8961,
29922,
29896,
29872,
29899,
29945,
29892,
13,
462,
26229,
7607,
2892,
29901,
383,
29889,
2674,
29884,
22164,
13,
4706,
2428,
29898,
1168,
29894,
7445,
29896,
29881,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
11236,
403,
353,
313,
11236,
362,
338,
451,
6213,
29897,
13,
4706,
1583,
29889,
1509,
29918,
11197,
353,
671,
29918,
11197,
13,
13,
4706,
411,
1583,
29889,
2344,
29918,
6078,
7295,
13,
9651,
1583,
29889,
20580,
353,
365,
29889,
1168,
4068,
29896,
29928,
29898,
13,
18884,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
18884,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
18884,
413,
2311,
29922,
2039,
675,
29892,
13,
18884,
380,
2426,
29922,
303,
2426,
29892,
13,
18884,
17132,
29922,
8305,
29892,
13,
18884,
22182,
3173,
7607,
1333,
671,
29918,
29890,
3173,
511,
13,
18884,
21749,
403,
29922,
29881,
309,
403,
29892,
13,
18884,
6471,
29922,
13155,
29897,
13,
9651,
565,
1583,
29889,
1509,
29918,
11197,
29901,
13,
18884,
1583,
29889,
11197,
353,
365,
29889,
23145,
19077,
2133,
29898,
13,
462,
1678,
2159,
29922,
449,
29918,
305,
12629,
29892,
13,
462,
1678,
321,
567,
29922,
11197,
29918,
8961,
29897,
13,
9651,
565,
1583,
29889,
11236,
403,
29901,
13,
18884,
1583,
29889,
11236,
353,
679,
29918,
11236,
362,
29918,
13148,
29898,
11236,
362,
29897,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
921,
353,
1583,
29889,
20580,
29898,
29916,
29897,
13,
4706,
565,
1583,
29889,
1509,
29918,
11197,
29901,
13,
9651,
921,
353,
1583,
29889,
11197,
29898,
29916,
29897,
13,
4706,
565,
1583,
29889,
11236,
403,
29901,
13,
9651,
921,
353,
1583,
29889,
11236,
29898,
29916,
29897,
13,
4706,
736,
921,
13,
13,
13,
1753,
7602,
29896,
29916,
29896,
29898,
262,
29918,
305,
12629,
29892,
13,
9651,
714,
29918,
305,
12629,
29892,
13,
9651,
380,
2426,
29922,
29896,
29892,
13,
9651,
6471,
29922,
29896,
29892,
13,
9651,
671,
29918,
29890,
3173,
29922,
8824,
1125,
13,
1678,
9995,
13,
1678,
1281,
4068,
29871,
29896,
29916,
29896,
7546,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
6471,
584,
938,
29892,
2322,
29871,
29896,
13,
4706,
9681,
310,
6471,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
9995,
13,
1678,
736,
365,
29889,
1168,
4068,
29906,
29928,
29898,
13,
4706,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
4706,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
4706,
413,
2311,
29922,
29896,
29892,
13,
4706,
380,
2426,
29922,
303,
2426,
29892,
13,
4706,
22182,
3173,
7607,
1333,
671,
29918,
29890,
3173,
511,
13,
4706,
6471,
29922,
13155,
29897,
13,
13,
13,
1753,
7602,
29941,
29916,
29941,
29898,
262,
29918,
305,
12629,
29892,
13,
9651,
714,
29918,
305,
12629,
29892,
13,
9651,
380,
2426,
29922,
29896,
29892,
13,
9651,
17132,
29922,
29896,
29892,
13,
9651,
21749,
403,
29922,
29896,
29892,
13,
9651,
6471,
29922,
29896,
29892,
13,
9651,
671,
29918,
29890,
3173,
29922,
8824,
1125,
13,
1678,
9995,
13,
1678,
1281,
4068,
29871,
29941,
29916,
29941,
7546,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
17132,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
349,
4676,
995,
363,
26851,
7546,
29889,
13,
1678,
21749,
403,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
360,
8634,
995,
363,
26851,
7546,
29889,
13,
1678,
6471,
584,
938,
29892,
2322,
29871,
29896,
13,
4706,
9681,
310,
6471,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
9995,
13,
1678,
736,
365,
29889,
1168,
4068,
29906,
29928,
29898,
13,
4706,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
4706,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
4706,
413,
2311,
29922,
29941,
29892,
13,
4706,
380,
2426,
29922,
303,
2426,
29892,
13,
4706,
17132,
29922,
8305,
29892,
13,
4706,
22182,
3173,
7607,
1333,
671,
29918,
29890,
3173,
511,
13,
4706,
21749,
403,
29922,
29881,
309,
403,
29892,
13,
4706,
6471,
29922,
13155,
29897,
13,
13,
13,
1753,
10809,
3538,
29918,
20580,
29941,
29916,
29941,
29898,
305,
12629,
29892,
13,
462,
418,
380,
2426,
29922,
29896,
29892,
13,
462,
418,
17132,
29922,
29896,
29892,
13,
462,
418,
21749,
403,
29922,
29896,
29892,
13,
462,
418,
671,
29918,
29890,
3173,
29922,
8824,
1125,
13,
1678,
9995,
13,
1678,
10034,
386,
3538,
26851,
29871,
29941,
29916,
29941,
7546,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
18196,
584,
938,
13,
4706,
9681,
310,
1881,
29914,
4905,
18196,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
17132,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
349,
4676,
995,
363,
26851,
7546,
29889,
13,
1678,
21749,
403,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
360,
8634,
995,
363,
26851,
7546,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
9995,
13,
1678,
736,
365,
29889,
1168,
4068,
29906,
29928,
29898,
13,
4706,
297,
29918,
305,
12629,
29922,
305,
12629,
29892,
13,
4706,
714,
29918,
305,
12629,
29922,
305,
12629,
29892,
13,
4706,
413,
2311,
29922,
29941,
29892,
13,
4706,
380,
2426,
29922,
303,
2426,
29892,
13,
4706,
17132,
29922,
8305,
29892,
13,
4706,
22182,
3173,
7607,
1333,
671,
29918,
29890,
3173,
511,
13,
4706,
21749,
403,
29922,
29881,
309,
403,
29892,
13,
4706,
6471,
29922,
305,
12629,
29897,
13,
13,
13,
1990,
1281,
29894,
7445,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
10117,
26851,
2908,
411,
350,
905,
4226,
2133,
322,
26229,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
413,
2311,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
1281,
4068,
3474,
2159,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
17132,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
349,
4676,
995,
363,
26851,
7546,
29889,
13,
1678,
21749,
403,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
360,
8634,
995,
363,
26851,
7546,
29889,
13,
1678,
6471,
584,
938,
29892,
2322,
29871,
29896,
13,
4706,
9681,
310,
6471,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
671,
29918,
11197,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
671,
350,
905,
29940,
555,
7546,
29889,
13,
1678,
289,
29876,
29918,
8961,
584,
5785,
29892,
2322,
29871,
29896,
29872,
29899,
29945,
13,
4706,
18285,
5785,
2715,
304,
20162,
297,
350,
905,
6056,
29889,
13,
1678,
26229,
584,
740,
470,
851,
470,
6213,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
470,
1024,
310,
26229,
740,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
297,
29918,
305,
12629,
29892,
13,
462,
714,
29918,
305,
12629,
29892,
13,
462,
413,
2311,
29892,
13,
462,
380,
2426,
29892,
13,
462,
17132,
29892,
13,
462,
21749,
403,
29922,
29896,
29892,
13,
462,
6471,
29922,
29896,
29892,
13,
462,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
671,
29918,
11197,
29922,
5574,
29892,
13,
462,
289,
29876,
29918,
8961,
29922,
29896,
29872,
29899,
29945,
29892,
13,
462,
26229,
7607,
2892,
29901,
383,
29889,
2674,
29884,
22164,
13,
4706,
2428,
29898,
1168,
29894,
7445,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
11236,
403,
353,
313,
11236,
362,
338,
451,
6213,
29897,
13,
4706,
1583,
29889,
1509,
29918,
11197,
353,
671,
29918,
11197,
13,
13,
4706,
411,
1583,
29889,
2344,
29918,
6078,
7295,
13,
9651,
1583,
29889,
20580,
353,
365,
29889,
1168,
4068,
29906,
29928,
29898,
13,
18884,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
18884,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
18884,
413,
2311,
29922,
2039,
675,
29892,
13,
18884,
380,
2426,
29922,
303,
2426,
29892,
13,
18884,
17132,
29922,
8305,
29892,
13,
18884,
22182,
3173,
7607,
1333,
671,
29918,
29890,
3173,
511,
13,
18884,
21749,
403,
29922,
29881,
309,
403,
29892,
13,
18884,
6471,
29922,
13155,
29897,
13,
9651,
565,
1583,
29889,
1509,
29918,
11197,
29901,
13,
18884,
1583,
29889,
11197,
353,
365,
29889,
23145,
19077,
2133,
29898,
13,
462,
1678,
2159,
29922,
449,
29918,
305,
12629,
29892,
13,
462,
1678,
321,
567,
29922,
11197,
29918,
8961,
29897,
13,
9651,
565,
1583,
29889,
11236,
403,
29901,
13,
18884,
1583,
29889,
11236,
353,
679,
29918,
11236,
362,
29918,
13148,
29898,
11236,
362,
29897,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
921,
353,
1583,
29889,
20580,
29898,
29916,
29897,
13,
4706,
565,
1583,
29889,
1509,
29918,
11197,
29901,
13,
9651,
921,
353,
1583,
29889,
11197,
29898,
29916,
29897,
13,
4706,
565,
1583,
29889,
11236,
403,
29901,
13,
9651,
921,
353,
1583,
29889,
11236,
29898,
29916,
29897,
13,
4706,
736,
921,
13,
13,
13,
1753,
7602,
29896,
29916,
29896,
29918,
1271,
29898,
262,
29918,
305,
12629,
29892,
13,
462,
29871,
714,
29918,
305,
12629,
29892,
13,
462,
29871,
380,
2426,
29922,
29896,
29892,
13,
462,
29871,
6471,
29922,
29896,
29892,
13,
462,
29871,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
29871,
671,
29918,
11197,
29922,
5574,
29892,
13,
462,
29871,
289,
29876,
29918,
8961,
29922,
29896,
29872,
29899,
29945,
29892,
13,
462,
29871,
26229,
7607,
2892,
29901,
383,
29889,
2674,
29884,
22164,
13,
1678,
9995,
13,
268,
29896,
29916,
29896,
1873,
310,
278,
3918,
26851,
2908,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
6471,
584,
938,
29892,
2322,
29871,
29896,
13,
4706,
9681,
310,
6471,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
671,
29918,
11197,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
671,
350,
905,
29940,
555,
7546,
29889,
13,
1678,
289,
29876,
29918,
8961,
584,
5785,
29892,
2322,
29871,
29896,
29872,
29899,
29945,
13,
4706,
18285,
5785,
2715,
304,
20162,
297,
350,
905,
6056,
29889,
13,
1678,
26229,
584,
740,
470,
851,
470,
6213,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
470,
1024,
310,
26229,
740,
29889,
13,
1678,
9995,
13,
1678,
736,
1281,
29894,
7445,
29898,
13,
4706,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
4706,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
4706,
413,
2311,
29922,
29896,
29892,
13,
4706,
380,
2426,
29922,
303,
2426,
29892,
13,
4706,
17132,
29922,
29900,
29892,
13,
4706,
6471,
29922,
13155,
29892,
13,
4706,
671,
29918,
29890,
3173,
29922,
1509,
29918,
29890,
3173,
29892,
13,
4706,
671,
29918,
11197,
29922,
1509,
29918,
11197,
29892,
13,
4706,
289,
29876,
29918,
8961,
29922,
11197,
29918,
8961,
29892,
13,
4706,
26229,
29922,
11236,
362,
29897,
13,
13,
13,
1753,
7602,
29941,
29916,
29941,
29918,
1271,
29898,
262,
29918,
305,
12629,
29892,
13,
462,
29871,
714,
29918,
305,
12629,
29892,
13,
462,
29871,
380,
2426,
29922,
29896,
29892,
13,
462,
29871,
17132,
29922,
29896,
29892,
13,
462,
29871,
21749,
403,
29922,
29896,
29892,
13,
462,
29871,
6471,
29922,
29896,
29892,
13,
462,
29871,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
29871,
671,
29918,
11197,
29922,
5574,
29892,
13,
462,
29871,
289,
29876,
29918,
8961,
29922,
29896,
29872,
29899,
29945,
29892,
13,
462,
29871,
26229,
7607,
2892,
29901,
383,
29889,
2674,
29884,
22164,
13,
1678,
9995,
13,
268,
29941,
29916,
29941,
1873,
310,
278,
3918,
26851,
2908,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
17132,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
349,
4676,
995,
363,
26851,
7546,
29889,
13,
1678,
21749,
403,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
360,
8634,
995,
363,
26851,
7546,
29889,
13,
1678,
6471,
584,
938,
29892,
2322,
29871,
29896,
13,
4706,
9681,
310,
6471,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
671,
29918,
11197,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
671,
350,
905,
29940,
555,
7546,
29889,
13,
1678,
289,
29876,
29918,
8961,
584,
5785,
29892,
2322,
29871,
29896,
29872,
29899,
29945,
13,
4706,
18285,
5785,
2715,
304,
20162,
297,
350,
905,
6056,
29889,
13,
1678,
26229,
584,
740,
470,
851,
470,
6213,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
470,
1024,
310,
26229,
740,
29889,
13,
1678,
9995,
13,
1678,
736,
1281,
29894,
7445,
29898,
13,
4706,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
4706,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
4706,
413,
2311,
29922,
29941,
29892,
13,
4706,
380,
2426,
29922,
303,
2426,
29892,
13,
4706,
17132,
29922,
8305,
29892,
13,
4706,
21749,
403,
29922,
29881,
309,
403,
29892,
13,
4706,
6471,
29922,
13155,
29892,
13,
4706,
671,
29918,
29890,
3173,
29922,
1509,
29918,
29890,
3173,
29892,
13,
4706,
671,
29918,
11197,
29922,
1509,
29918,
11197,
29892,
13,
4706,
289,
29876,
29918,
8961,
29922,
11197,
29918,
8961,
29892,
13,
4706,
26229,
29922,
11236,
362,
29897,
13,
13,
13,
1753,
7602,
29945,
29916,
29945,
29918,
1271,
29898,
262,
29918,
305,
12629,
29892,
13,
462,
29871,
714,
29918,
305,
12629,
29892,
13,
462,
29871,
380,
2426,
29922,
29896,
29892,
13,
462,
29871,
17132,
29922,
29906,
29892,
13,
462,
29871,
21749,
403,
29922,
29896,
29892,
13,
462,
29871,
6471,
29922,
29896,
29892,
13,
462,
29871,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
29871,
289,
29876,
29918,
8961,
29922,
29896,
29872,
29899,
29945,
29892,
13,
462,
29871,
26229,
7607,
2892,
29901,
383,
29889,
2674,
29884,
22164,
13,
1678,
9995,
13,
268,
29945,
29916,
29945,
1873,
310,
278,
3918,
26851,
2908,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
17132,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29906,
13,
4706,
349,
4676,
995,
363,
26851,
7546,
29889,
13,
1678,
21749,
403,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
360,
8634,
995,
363,
26851,
7546,
29889,
13,
1678,
6471,
584,
938,
29892,
2322,
29871,
29896,
13,
4706,
9681,
310,
6471,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
289,
29876,
29918,
8961,
584,
5785,
29892,
2322,
29871,
29896,
29872,
29899,
29945,
13,
4706,
18285,
5785,
2715,
304,
20162,
297,
350,
905,
6056,
29889,
13,
1678,
26229,
584,
740,
470,
851,
470,
6213,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
470,
1024,
310,
26229,
740,
29889,
13,
1678,
9995,
13,
1678,
736,
1281,
29894,
7445,
29898,
13,
4706,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
4706,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
4706,
413,
2311,
29922,
29945,
29892,
13,
4706,
380,
2426,
29922,
303,
2426,
29892,
13,
4706,
17132,
29922,
8305,
29892,
13,
4706,
21749,
403,
29922,
29881,
309,
403,
29892,
13,
4706,
6471,
29922,
13155,
29892,
13,
4706,
671,
29918,
29890,
3173,
29922,
1509,
29918,
29890,
3173,
29892,
13,
4706,
289,
29876,
29918,
8961,
29922,
11197,
29918,
8961,
29892,
13,
4706,
26229,
29922,
11236,
362,
29897,
13,
13,
13,
1753,
7602,
29955,
29916,
29955,
29918,
1271,
29898,
262,
29918,
305,
12629,
29892,
13,
462,
29871,
714,
29918,
305,
12629,
29892,
13,
462,
29871,
380,
2426,
29922,
29896,
29892,
13,
462,
29871,
17132,
29922,
29941,
29892,
13,
462,
29871,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
29871,
671,
29918,
11197,
29922,
5574,
29892,
13,
462,
29871,
289,
29876,
29918,
8961,
29922,
29896,
29872,
29899,
29945,
29892,
13,
462,
29871,
26229,
7607,
2892,
29901,
383,
29889,
2674,
29884,
22164,
13,
1678,
9995,
13,
268,
29955,
29916,
29955,
1873,
310,
278,
3918,
26851,
2908,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
17132,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29941,
13,
4706,
349,
4676,
995,
363,
26851,
7546,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
671,
29918,
11197,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
671,
350,
905,
29940,
555,
7546,
29889,
13,
1678,
289,
29876,
29918,
8961,
584,
5785,
29892,
2322,
29871,
29896,
29872,
29899,
29945,
13,
4706,
18285,
5785,
2715,
304,
20162,
297,
350,
905,
6056,
29889,
13,
1678,
26229,
584,
740,
470,
851,
470,
6213,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
470,
1024,
310,
26229,
740,
29889,
13,
1678,
9995,
13,
1678,
736,
1281,
29894,
7445,
29898,
13,
4706,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
4706,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
4706,
413,
2311,
29922,
29955,
29892,
13,
4706,
380,
2426,
29922,
303,
2426,
29892,
13,
4706,
17132,
29922,
8305,
29892,
13,
4706,
671,
29918,
29890,
3173,
29922,
1509,
29918,
29890,
3173,
29892,
13,
4706,
671,
29918,
11197,
29922,
1509,
29918,
11197,
29892,
13,
4706,
289,
29876,
29918,
8961,
29922,
11197,
29918,
8961,
29892,
13,
4706,
26229,
29922,
11236,
362,
29897,
13,
13,
13,
1753,
11988,
20580,
29918,
1271,
29898,
262,
29918,
305,
12629,
29892,
13,
462,
714,
29918,
305,
12629,
29892,
13,
462,
413,
2311,
29892,
13,
462,
380,
2426,
29892,
13,
462,
17132,
29892,
13,
462,
21749,
403,
29922,
29896,
29892,
13,
462,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
671,
29918,
11197,
29922,
5574,
29892,
13,
462,
289,
29876,
29918,
8961,
29922,
29896,
29872,
29899,
29945,
29892,
13,
462,
26229,
7607,
2892,
29901,
383,
29889,
2674,
29884,
22164,
13,
1678,
9995,
13,
1678,
10034,
386,
3538,
1873,
310,
278,
3918,
26851,
2908,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
413,
2311,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
1281,
4068,
3474,
2159,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
17132,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
349,
4676,
995,
363,
26851,
7546,
29889,
13,
1678,
21749,
403,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
360,
8634,
995,
363,
26851,
7546,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
671,
29918,
11197,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
671,
350,
905,
29940,
555,
7546,
29889,
13,
1678,
289,
29876,
29918,
8961,
584,
5785,
29892,
2322,
29871,
29896,
29872,
29899,
29945,
13,
4706,
18285,
5785,
2715,
304,
20162,
297,
350,
905,
6056,
29889,
13,
1678,
26229,
584,
740,
470,
851,
470,
6213,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
470,
1024,
310,
26229,
740,
29889,
13,
1678,
9995,
13,
1678,
736,
1281,
29894,
7445,
29898,
13,
4706,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
4706,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
4706,
413,
2311,
29922,
2039,
675,
29892,
13,
4706,
380,
2426,
29922,
303,
2426,
29892,
13,
4706,
17132,
29922,
8305,
29892,
13,
4706,
21749,
403,
29922,
29881,
309,
403,
29892,
13,
4706,
6471,
29922,
449,
29918,
305,
12629,
29892,
13,
4706,
671,
29918,
29890,
3173,
29922,
1509,
29918,
29890,
3173,
29892,
13,
4706,
671,
29918,
11197,
29922,
1509,
29918,
11197,
29892,
13,
4706,
289,
29876,
29918,
8961,
29922,
11197,
29918,
8961,
29892,
13,
4706,
26229,
29922,
11236,
362,
29897,
13,
13,
13,
1753,
11988,
20580,
29941,
29916,
29941,
29918,
1271,
29898,
262,
29918,
305,
12629,
29892,
13,
462,
1678,
714,
29918,
305,
12629,
29892,
13,
462,
1678,
380,
2426,
29922,
29896,
29892,
13,
462,
1678,
17132,
29922,
29896,
29892,
13,
462,
1678,
21749,
403,
29922,
29896,
29892,
13,
462,
1678,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
1678,
289,
29876,
29918,
8961,
29922,
29896,
29872,
29899,
29945,
29892,
13,
462,
1678,
26229,
7607,
2892,
29901,
383,
29889,
2674,
29884,
22164,
13,
1678,
9995,
13,
268,
29941,
29916,
29941,
10809,
3538,
1873,
310,
278,
3918,
26851,
2908,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
17132,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
349,
4676,
995,
363,
26851,
7546,
29889,
13,
1678,
21749,
403,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
360,
8634,
995,
363,
26851,
7546,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
289,
29876,
29918,
8961,
584,
5785,
29892,
2322,
29871,
29896,
29872,
29899,
29945,
13,
4706,
18285,
5785,
2715,
304,
20162,
297,
350,
905,
6056,
29889,
13,
1678,
26229,
584,
740,
470,
851,
470,
6213,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
470,
1024,
310,
26229,
740,
29889,
13,
1678,
9995,
13,
1678,
736,
11988,
20580,
29918,
1271,
29898,
13,
4706,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
4706,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
4706,
413,
2311,
29922,
29941,
29892,
13,
4706,
380,
2426,
29922,
303,
2426,
29892,
13,
4706,
17132,
29922,
8305,
29892,
13,
4706,
21749,
403,
29922,
29881,
309,
403,
29892,
13,
4706,
671,
29918,
29890,
3173,
29922,
1509,
29918,
29890,
3173,
29892,
13,
4706,
289,
29876,
29918,
8961,
29922,
11197,
29918,
8961,
29892,
13,
4706,
26229,
29922,
11236,
362,
29897,
13,
13,
13,
1753,
11988,
20580,
29945,
29916,
29945,
29918,
1271,
29898,
262,
29918,
305,
12629,
29892,
13,
462,
1678,
714,
29918,
305,
12629,
29892,
13,
462,
1678,
380,
2426,
29922,
29896,
29892,
13,
462,
1678,
17132,
29922,
29906,
29892,
13,
462,
1678,
21749,
403,
29922,
29896,
29892,
13,
462,
1678,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
1678,
289,
29876,
29918,
8961,
29922,
29896,
29872,
29899,
29945,
29892,
13,
462,
1678,
26229,
7607,
2892,
29901,
383,
29889,
2674,
29884,
22164,
13,
1678,
9995,
13,
268,
29945,
29916,
29945,
10809,
3538,
1873,
310,
278,
3918,
26851,
2908,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
17132,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29906,
13,
4706,
349,
4676,
995,
363,
26851,
7546,
29889,
13,
1678,
21749,
403,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
360,
8634,
995,
363,
26851,
7546,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
289,
29876,
29918,
8961,
584,
5785,
29892,
2322,
29871,
29896,
29872,
29899,
29945,
13,
4706,
18285,
5785,
2715,
304,
20162,
297,
350,
905,
6056,
29889,
13,
1678,
26229,
584,
740,
470,
851,
470,
6213,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
470,
1024,
310,
26229,
740,
29889,
13,
1678,
9995,
13,
1678,
736,
11988,
20580,
29918,
1271,
29898,
13,
4706,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
4706,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
4706,
413,
2311,
29922,
29945,
29892,
13,
4706,
380,
2426,
29922,
303,
2426,
29892,
13,
4706,
17132,
29922,
8305,
29892,
13,
4706,
21749,
403,
29922,
29881,
309,
403,
29892,
13,
4706,
671,
29918,
29890,
3173,
29922,
1509,
29918,
29890,
3173,
29892,
13,
4706,
289,
29876,
29918,
8961,
29922,
11197,
29918,
8961,
29892,
13,
4706,
26229,
29922,
11236,
362,
29897,
13,
13,
13,
1990,
360,
5652,
1168,
29894,
7445,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
10034,
386,
3538,
2903,
519,
26851,
2908,
411,
350,
905,
29940,
555,
29879,
322,
5039,
800,
472,
1269,
26851,
15359,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
413,
2311,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
1281,
4068,
3474,
2159,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
17132,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
349,
4676,
995,
363,
26851,
7546,
29889,
13,
1678,
21749,
403,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
360,
8634,
995,
363,
26851,
7546,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
11988,
29918,
1509,
29918,
11197,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
671,
350,
905,
29940,
555,
7546,
313,
19488,
3538,
26851,
2908,
467,
13,
1678,
282,
29893,
29918,
1509,
29918,
11197,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
671,
350,
905,
29940,
555,
7546,
313,
3149,
3538,
26851,
2908,
467,
13,
1678,
289,
29876,
29918,
8961,
584,
5785,
29892,
2322,
29871,
29896,
29872,
29899,
29945,
13,
4706,
18285,
5785,
2715,
304,
20162,
297,
350,
905,
6056,
29889,
13,
1678,
11988,
29918,
11236,
362,
584,
740,
470,
851,
470,
6213,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
1156,
278,
10809,
3538,
26851,
2908,
29889,
13,
1678,
282,
29893,
29918,
11236,
362,
584,
740,
470,
851,
470,
6213,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
1156,
278,
1298,
3538,
26851,
2908,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
297,
29918,
305,
12629,
29892,
13,
462,
714,
29918,
305,
12629,
29892,
13,
462,
413,
2311,
29892,
13,
462,
380,
2426,
29892,
13,
462,
17132,
29892,
13,
462,
21749,
403,
29922,
29896,
29892,
13,
462,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
11988,
29918,
1509,
29918,
11197,
29922,
5574,
29892,
13,
462,
282,
29893,
29918,
1509,
29918,
11197,
29922,
5574,
29892,
13,
462,
289,
29876,
29918,
8961,
29922,
29896,
29872,
29899,
29945,
29892,
13,
462,
11988,
29918,
11236,
362,
7607,
2892,
29901,
383,
29889,
2674,
29884,
511,
13,
462,
282,
29893,
29918,
11236,
362,
7607,
2892,
29901,
383,
29889,
2674,
29884,
22164,
13,
4706,
2428,
29898,
29928,
5652,
1168,
29894,
7445,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
411,
1583,
29889,
2344,
29918,
6078,
7295,
13,
9651,
1583,
29889,
28012,
29918,
20580,
353,
11988,
20580,
29918,
1271,
29898,
13,
18884,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
18884,
714,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
18884,
413,
2311,
29922,
2039,
675,
29892,
13,
18884,
380,
2426,
29922,
303,
2426,
29892,
13,
18884,
17132,
29922,
8305,
29892,
13,
18884,
21749,
403,
29922,
29881,
309,
403,
29892,
13,
18884,
671,
29918,
29890,
3173,
29922,
1509,
29918,
29890,
3173,
29892,
13,
18884,
671,
29918,
11197,
29922,
28012,
29918,
1509,
29918,
11197,
29892,
13,
18884,
289,
29876,
29918,
8961,
29922,
11197,
29918,
8961,
29892,
13,
18884,
26229,
29922,
28012,
29918,
11236,
362,
29897,
13,
9651,
1583,
29889,
29886,
29893,
29918,
20580,
353,
7602,
29896,
29916,
29896,
29918,
1271,
29898,
13,
18884,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
18884,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
18884,
671,
29918,
29890,
3173,
29922,
1509,
29918,
29890,
3173,
29892,
13,
18884,
671,
29918,
11197,
29922,
29886,
29893,
29918,
1509,
29918,
11197,
29892,
13,
18884,
289,
29876,
29918,
8961,
29922,
11197,
29918,
8961,
29892,
13,
18884,
26229,
29922,
29886,
29893,
29918,
11236,
362,
29897,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
921,
353,
1583,
29889,
28012,
29918,
20580,
29898,
29916,
29897,
13,
4706,
921,
353,
1583,
29889,
29886,
29893,
29918,
20580,
29898,
29916,
29897,
13,
4706,
736,
921,
13,
13,
13,
1753,
270,
5652,
20580,
29941,
29916,
29941,
29918,
1271,
29898,
262,
29918,
305,
12629,
29892,
13,
462,
268,
714,
29918,
305,
12629,
29892,
13,
462,
268,
380,
2426,
29922,
29896,
29892,
13,
462,
268,
17132,
29922,
29896,
29892,
13,
462,
268,
21749,
403,
29922,
29896,
29892,
13,
462,
268,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
268,
289,
29876,
29918,
8961,
29922,
29896,
29872,
29899,
29945,
29892,
13,
462,
268,
11988,
29918,
11236,
362,
7607,
2892,
29901,
383,
29889,
2674,
29884,
511,
13,
462,
268,
282,
29893,
29918,
11236,
362,
7607,
2892,
29901,
383,
29889,
2674,
29884,
511,
13,
462,
268,
3579,
19290,
1125,
13,
1678,
9995,
13,
268,
29941,
29916,
29941,
10809,
3538,
2903,
519,
1873,
310,
278,
3918,
26851,
2908,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
17132,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
349,
4676,
995,
363,
26851,
7546,
29889,
13,
1678,
21749,
403,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
360,
8634,
995,
363,
26851,
7546,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
289,
29876,
29918,
8961,
584,
5785,
29892,
2322,
29871,
29896,
29872,
29899,
29945,
13,
4706,
18285,
5785,
2715,
304,
20162,
297,
350,
905,
6056,
29889,
13,
1678,
11988,
29918,
11236,
362,
584,
740,
470,
851,
470,
6213,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
1156,
278,
10809,
3538,
26851,
2908,
29889,
13,
1678,
282,
29893,
29918,
11236,
362,
584,
740,
470,
851,
470,
6213,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
1156,
278,
1298,
3538,
26851,
2908,
29889,
13,
1678,
9995,
13,
1678,
736,
360,
5652,
1168,
29894,
7445,
29898,
13,
4706,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
4706,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
4706,
413,
2311,
29922,
29941,
29892,
13,
4706,
380,
2426,
29922,
303,
2426,
29892,
13,
4706,
17132,
29922,
8305,
29892,
13,
4706,
21749,
403,
29922,
29881,
309,
403,
29892,
13,
4706,
671,
29918,
29890,
3173,
29922,
1509,
29918,
29890,
3173,
29892,
13,
4706,
289,
29876,
29918,
8961,
29922,
11197,
29918,
8961,
29892,
13,
4706,
11988,
29918,
11236,
362,
29922,
28012,
29918,
11236,
362,
29892,
13,
4706,
282,
29893,
29918,
11236,
362,
29922,
29886,
29893,
29918,
11236,
362,
29892,
13,
4706,
3579,
19290,
29897,
13,
13,
13,
1990,
4721,
1168,
29894,
7445,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
1281,
4068,
2908,
411,
350,
905,
4226,
2133,
322,
830,
29931,
29965,
758,
29899,
11236,
362,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
413,
2311,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
1281,
4068,
3474,
2159,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
17132,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
349,
4676,
995,
363,
26851,
7546,
29889,
13,
1678,
21749,
403,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
360,
8634,
995,
363,
26851,
7546,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
671,
29918,
11197,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
671,
350,
905,
29940,
555,
7546,
29889,
13,
1678,
736,
29918,
1457,
627,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
736,
758,
29899,
11236,
362,
29889,
739,
29915,
29879,
1304,
491,
4721,
1666,
6779,
29889,
13,
1678,
5039,
403,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
5039,
403,
278,
26851,
2908,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
297,
29918,
305,
12629,
29892,
13,
462,
714,
29918,
305,
12629,
29892,
13,
462,
413,
2311,
29892,
13,
462,
380,
2426,
29892,
13,
462,
17132,
29892,
13,
462,
21749,
403,
29922,
29896,
29892,
13,
462,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
671,
29918,
11197,
29922,
5574,
29892,
13,
462,
736,
29918,
1457,
627,
29922,
8824,
29892,
13,
462,
5039,
403,
29922,
5574,
1125,
13,
4706,
2428,
29898,
6572,
1168,
29894,
7445,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
2457,
29918,
1457,
627,
353,
736,
29918,
1457,
627,
13,
4706,
1583,
29889,
11236,
403,
353,
5039,
403,
13,
4706,
1583,
29889,
1509,
29918,
11197,
353,
671,
29918,
11197,
13,
13,
4706,
411,
1583,
29889,
2344,
29918,
6078,
7295,
13,
9651,
565,
1583,
29889,
1509,
29918,
11197,
29901,
13,
18884,
1583,
29889,
11197,
353,
365,
29889,
23145,
19077,
2133,
29898,
13,
462,
1678,
2159,
29922,
262,
29918,
305,
12629,
29892,
13,
462,
1678,
321,
567,
29922,
29896,
29872,
29899,
29945,
29897,
13,
9651,
565,
1583,
29889,
11236,
403,
29901,
13,
18884,
1583,
29889,
11236,
353,
383,
29889,
2674,
29884,
13,
9651,
1583,
29889,
20580,
353,
365,
29889,
1168,
4068,
29906,
29928,
29898,
13,
18884,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
18884,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
18884,
413,
2311,
29922,
2039,
675,
29892,
13,
18884,
380,
2426,
29922,
303,
2426,
29892,
13,
18884,
17132,
29922,
8305,
29892,
13,
18884,
22182,
3173,
7607,
1333,
671,
29918,
29890,
3173,
511,
13,
18884,
21749,
403,
29922,
29881,
309,
403,
29897,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
565,
1583,
29889,
1509,
29918,
11197,
29901,
13,
9651,
921,
353,
1583,
29889,
11197,
29898,
29916,
29897,
13,
4706,
565,
1583,
29889,
11236,
403,
29901,
13,
9651,
921,
353,
1583,
29889,
11236,
29898,
29916,
29897,
13,
4706,
565,
1583,
29889,
2457,
29918,
1457,
627,
29901,
13,
9651,
921,
29918,
1457,
29918,
11236,
353,
921,
13,
4706,
921,
353,
1583,
29889,
20580,
29898,
29916,
29897,
13,
4706,
565,
1583,
29889,
2457,
29918,
1457,
627,
29901,
13,
9651,
736,
921,
29892,
921,
29918,
1457,
29918,
11236,
13,
4706,
1683,
29901,
13,
9651,
736,
921,
13,
13,
13,
1753,
758,
29918,
20580,
29896,
29916,
29896,
29918,
1271,
29898,
262,
29918,
305,
12629,
29892,
13,
462,
418,
714,
29918,
305,
12629,
29892,
13,
462,
418,
380,
2426,
29922,
29896,
29892,
13,
462,
418,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
418,
671,
29918,
11197,
29922,
5574,
29892,
13,
462,
418,
736,
29918,
1457,
627,
29922,
8824,
29892,
13,
462,
418,
5039,
403,
29922,
5574,
1125,
13,
1678,
9995,
13,
268,
29896,
29916,
29896,
1873,
310,
278,
758,
29899,
11236,
630,
26851,
2908,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
671,
29918,
11197,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
671,
350,
905,
29940,
555,
7546,
29889,
13,
1678,
736,
29918,
1457,
627,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
736,
758,
29899,
11236,
362,
29889,
13,
1678,
5039,
403,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
5039,
403,
278,
26851,
2908,
29889,
13,
1678,
9995,
13,
1678,
736,
4721,
1168,
29894,
7445,
29898,
13,
4706,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
4706,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
4706,
413,
2311,
29922,
29896,
29892,
13,
4706,
380,
2426,
29922,
303,
2426,
29892,
13,
4706,
17132,
29922,
29900,
29892,
13,
4706,
671,
29918,
29890,
3173,
29922,
1509,
29918,
29890,
3173,
29892,
13,
4706,
671,
29918,
11197,
29922,
1509,
29918,
11197,
29892,
13,
4706,
736,
29918,
1457,
627,
29922,
2457,
29918,
1457,
627,
29892,
13,
4706,
5039,
403,
29922,
11236,
403,
29897,
13,
13,
13,
1753,
758,
29918,
20580,
29941,
29916,
29941,
29918,
1271,
29898,
262,
29918,
305,
12629,
29892,
13,
462,
418,
714,
29918,
305,
12629,
29892,
13,
462,
418,
380,
2426,
29922,
29896,
29892,
13,
462,
418,
17132,
29922,
29896,
29892,
13,
462,
418,
21749,
403,
29922,
29896,
29892,
13,
462,
418,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
418,
671,
29918,
11197,
29922,
5574,
29892,
13,
462,
418,
736,
29918,
1457,
627,
29922,
8824,
29892,
13,
462,
418,
5039,
403,
29922,
5574,
1125,
13,
1678,
9995,
13,
268,
29941,
29916,
29941,
1873,
310,
278,
758,
29899,
11236,
630,
26851,
2908,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
17132,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
349,
4676,
995,
363,
26851,
7546,
29889,
13,
1678,
21749,
403,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
360,
8634,
995,
363,
26851,
7546,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
671,
29918,
11197,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
671,
350,
905,
29940,
555,
7546,
29889,
13,
1678,
736,
29918,
1457,
627,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
736,
758,
29899,
11236,
362,
29889,
13,
1678,
5039,
403,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
5039,
403,
278,
26851,
2908,
29889,
13,
1678,
9995,
13,
1678,
736,
4721,
1168,
29894,
7445,
29898,
13,
4706,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
4706,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
4706,
413,
2311,
29922,
29941,
29892,
13,
4706,
380,
2426,
29922,
303,
2426,
29892,
13,
4706,
17132,
29922,
8305,
29892,
13,
4706,
21749,
403,
29922,
29881,
309,
403,
29892,
13,
4706,
671,
29918,
29890,
3173,
29922,
1509,
29918,
29890,
3173,
29892,
13,
4706,
671,
29918,
11197,
29922,
1509,
29918,
11197,
29892,
13,
4706,
736,
29918,
1457,
627,
29922,
2457,
29918,
1457,
627,
29892,
13,
4706,
5039,
403,
29922,
11236,
403,
29897,
13,
13,
13,
1990,
897,
20580,
7445,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
897,
535,
4068,
2908,
411,
9853,
4226,
2133,
322,
26229,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
413,
2311,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
1281,
4068,
3474,
2159,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
624,
2426,
310,
278,
316,
535,
4068,
29889,
13,
1678,
17132,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
349,
4676,
995,
363,
316,
535,
4068,
7546,
29889,
13,
1678,
21749,
403,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
360,
8634,
995,
363,
316,
535,
4068,
7546,
29889,
13,
1678,
6471,
584,
938,
29892,
2322,
29871,
29896,
13,
4706,
9681,
310,
6471,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
671,
29918,
11197,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
671,
350,
905,
29940,
555,
7546,
29889,
13,
1678,
289,
29876,
29918,
8961,
584,
5785,
29892,
2322,
29871,
29896,
29872,
29899,
29945,
13,
4706,
18285,
5785,
2715,
304,
20162,
297,
350,
905,
6056,
29889,
13,
1678,
26229,
584,
740,
470,
851,
470,
6213,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
470,
1024,
310,
26229,
740,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
297,
29918,
305,
12629,
29892,
13,
462,
714,
29918,
305,
12629,
29892,
13,
462,
413,
2311,
29892,
13,
462,
380,
2426,
29892,
13,
462,
17132,
29892,
13,
462,
21749,
403,
29922,
29896,
29892,
13,
462,
6471,
29922,
29896,
29892,
13,
462,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
671,
29918,
11197,
29922,
5574,
29892,
13,
462,
289,
29876,
29918,
8961,
29922,
29896,
29872,
29899,
29945,
29892,
13,
462,
26229,
7607,
2892,
29901,
383,
29889,
2674,
29884,
511,
13,
462,
3579,
19290,
1125,
13,
4706,
2428,
29898,
2772,
20580,
7445,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
11236,
403,
353,
313,
11236,
362,
338,
451,
6213,
29897,
13,
4706,
1583,
29889,
1509,
29918,
11197,
353,
671,
29918,
11197,
13,
13,
4706,
411,
1583,
29889,
2344,
29918,
6078,
7295,
13,
9651,
1583,
29889,
20580,
353,
365,
29889,
2772,
535,
4068,
29906,
29928,
29898,
13,
18884,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
18884,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
18884,
413,
2311,
29922,
2039,
675,
29892,
13,
18884,
380,
2426,
29922,
303,
2426,
29892,
13,
18884,
17132,
29922,
8305,
29892,
13,
18884,
22182,
3173,
7607,
1333,
671,
29918,
29890,
3173,
511,
13,
18884,
21749,
403,
29922,
29881,
309,
403,
29892,
13,
18884,
6471,
29922,
13155,
29897,
13,
9651,
565,
1583,
29889,
1509,
29918,
11197,
29901,
13,
18884,
1583,
29889,
11197,
353,
365,
29889,
23145,
19077,
2133,
29898,
13,
462,
1678,
2159,
29922,
449,
29918,
305,
12629,
29892,
13,
462,
1678,
321,
567,
29922,
11197,
29918,
8961,
29897,
13,
9651,
565,
1583,
29889,
11236,
403,
29901,
13,
18884,
1583,
29889,
11236,
353,
679,
29918,
11236,
362,
29918,
13148,
29898,
11236,
362,
29897,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
921,
353,
1583,
29889,
20580,
29898,
29916,
29897,
13,
4706,
565,
1583,
29889,
1509,
29918,
11197,
29901,
13,
9651,
921,
353,
1583,
29889,
11197,
29898,
29916,
29897,
13,
4706,
565,
1583,
29889,
11236,
403,
29901,
13,
9651,
921,
353,
1583,
29889,
11236,
29898,
29916,
29897,
13,
4706,
736,
921,
13,
13,
13,
1753,
8242,
29918,
845,
21897,
29898,
29916,
29892,
13,
462,
1678,
6471,
1125,
13,
1678,
9995,
13,
1678,
17368,
528,
21897,
5858,
515,
525,
2713,
21897,
6779,
29901,
530,
7338,
1745,
873,
382,
4543,
1281,
4068,
284,
2448,
3631,
8527,
363,
21600,
9481,
1575,
5501,
13,
1678,
2045,
597,
279,
26560,
29889,
990,
29914,
6897,
29914,
29896,
29955,
29900,
29955,
29889,
29900,
29896,
29900,
29947,
29941,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
921,
584,
521,
4008,
29889,
16174,
470,
12655,
29889,
299,
2378,
470,
18002,
29891,
29889,
299,
2378,
13,
4706,
10567,
2286,
29889,
13,
1678,
6471,
584,
938,
13,
4706,
9681,
310,
6471,
29889,
13,
13,
1678,
16969,
29901,
13,
1678,
448,
22158,
13,
1678,
521,
4008,
29889,
16174,
470,
12655,
29889,
299,
2378,
470,
18002,
29891,
29889,
299,
2378,
13,
4706,
7867,
287,
2286,
29889,
13,
1678,
9995,
13,
1678,
9853,
29892,
18196,
29892,
3171,
29892,
2920,
353,
921,
29889,
12181,
13,
1678,
18196,
29918,
546,
29918,
2972,
353,
18196,
849,
6471,
13,
1678,
921,
353,
383,
29889,
690,
14443,
29898,
29916,
29892,
8267,
7607,
16175,
29892,
6471,
29892,
18196,
29918,
546,
29918,
2972,
29892,
3171,
29892,
2920,
876,
13,
1678,
921,
353,
383,
29889,
26276,
1165,
267,
29898,
29916,
29892,
9685,
29896,
29922,
29896,
29892,
9685,
29906,
29922,
29906,
29897,
13,
1678,
921,
353,
383,
29889,
690,
14443,
29898,
29916,
29892,
8267,
7607,
16175,
29892,
18196,
29892,
3171,
29892,
2920,
876,
13,
1678,
736,
921,
13,
13,
13,
1990,
17368,
2713,
21897,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
17368,
528,
21897,
7546,
29889,
910,
338,
263,
14476,
975,
278,
1021,
5858,
29889,
739,
338,
8688,
304,
4078,
278,
1353,
310,
6471,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
18196,
584,
938,
13,
4706,
9681,
310,
18196,
29889,
13,
1678,
6471,
584,
938,
13,
4706,
9681,
310,
6471,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
18196,
29892,
13,
462,
6471,
1125,
13,
4706,
2428,
29898,
13599,
2713,
21897,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
4974,
313,
305,
12629,
1273,
6471,
1275,
29871,
29900,
29897,
13,
4706,
1583,
29889,
13155,
353,
6471,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
736,
8242,
29918,
845,
21897,
29898,
29916,
29892,
1583,
29889,
13155,
29897,
13,
13,
13,
1753,
8242,
29918,
845,
21897,
29906,
29898,
29916,
29892,
13,
462,
268,
6471,
1125,
13,
1678,
9995,
13,
1678,
17368,
528,
21897,
5858,
515,
525,
2713,
21897,
6779,
29901,
530,
7338,
1745,
873,
382,
4543,
1281,
4068,
284,
2448,
3631,
8527,
363,
21600,
9481,
1575,
5501,
13,
1678,
2045,
597,
279,
26560,
29889,
990,
29914,
6897,
29914,
29896,
29955,
29900,
29955,
29889,
29900,
29896,
29900,
29947,
29941,
29889,
450,
8671,
1873,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
921,
584,
521,
4008,
29889,
16174,
470,
12655,
29889,
299,
2378,
470,
18002,
29891,
29889,
299,
2378,
13,
4706,
10567,
2286,
29889,
13,
1678,
6471,
584,
938,
13,
4706,
9681,
310,
6471,
29889,
13,
13,
1678,
16969,
29901,
13,
1678,
448,
22158,
13,
1678,
521,
4008,
29889,
16174,
470,
12655,
29889,
299,
2378,
470,
18002,
29891,
29889,
299,
2378,
13,
4706,
7867,
287,
2286,
29889,
13,
1678,
9995,
13,
1678,
9853,
29892,
18196,
29892,
3171,
29892,
2920,
353,
921,
29889,
12181,
13,
1678,
18196,
29918,
546,
29918,
2972,
353,
18196,
849,
6471,
13,
1678,
921,
353,
383,
29889,
690,
14443,
29898,
29916,
29892,
8267,
7607,
16175,
29892,
18196,
29918,
546,
29918,
2972,
29892,
6471,
29892,
3171,
29892,
2920,
876,
13,
1678,
921,
353,
383,
29889,
26276,
1165,
267,
29898,
29916,
29892,
9685,
29896,
29922,
29896,
29892,
9685,
29906,
29922,
29906,
29897,
13,
1678,
921,
353,
383,
29889,
690,
14443,
29898,
29916,
29892,
8267,
7607,
16175,
29892,
18196,
29892,
3171,
29892,
2920,
876,
13,
1678,
736,
921,
13,
13,
13,
1990,
17368,
2713,
21897,
29906,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
17368,
528,
21897,
7546,
29889,
910,
338,
263,
14476,
975,
278,
1021,
5858,
29889,
739,
338,
8688,
304,
4078,
278,
1353,
310,
6471,
29889,
13,
1678,
450,
8671,
1873,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
18196,
584,
938,
13,
4706,
9681,
310,
18196,
29889,
13,
1678,
6471,
584,
938,
13,
4706,
9681,
310,
6471,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
18196,
29892,
13,
462,
6471,
1125,
13,
4706,
2428,
29898,
13599,
2713,
21897,
29906,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
4974,
313,
305,
12629,
1273,
6471,
1275,
29871,
29900,
29897,
13,
4706,
1583,
29889,
13155,
353,
6471,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
736,
8242,
29918,
845,
21897,
29906,
29898,
29916,
29892,
1583,
29889,
13155,
29897,
13,
13,
13,
1990,
3725,
7445,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
317,
802,
29872,
911,
29899,
392,
29899,
1252,
29883,
7018,
2908,
515,
525,
29903,
802,
29872,
911,
29899,
392,
29899,
1252,
29883,
7018,
8527,
29879,
5501,
2045,
597,
279,
26560,
29889,
990,
29914,
6897,
29914,
29896,
29955,
29900,
29929,
29889,
29900,
29896,
29945,
29900,
29955,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
18196,
584,
938,
13,
4706,
9681,
310,
18196,
29889,
13,
1678,
20376,
584,
938,
29892,
2322,
29871,
29896,
29953,
13,
4706,
317,
802,
29872,
911,
20376,
995,
29889,
13,
1678,
7145,
29918,
305,
12629,
584,
938,
470,
6213,
29892,
2322,
6213,
13,
4706,
9681,
310,
7256,
18196,
29889,
13,
1678,
4513,
29918,
6563,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
304,
4513,
7256,
8242,
1353,
313,
5675,
8572,
1821,
491,
29871,
29947,
467,
13,
1678,
671,
29918,
20580,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
26851,
284,
15359,
2012,
310,
8072,
29899,
18045,
6743,
29889,
13,
1678,
26229,
584,
740,
470,
851,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
1156,
278,
937,
26851,
29889,
13,
1678,
714,
29918,
11236,
362,
584,
740,
470,
851,
29892,
2322,
383,
29889,
18816,
29885,
3398,
13,
4706,
21775,
362,
740,
1156,
278,
1833,
26851,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
18196,
29892,
13,
462,
20376,
29922,
29896,
29953,
29892,
13,
462,
7145,
29918,
305,
12629,
29922,
8516,
29892,
13,
462,
4513,
29918,
6563,
29922,
8824,
29892,
13,
462,
671,
29918,
20580,
29922,
5574,
29892,
13,
462,
7145,
29918,
11236,
362,
7607,
2892,
29901,
383,
29889,
2674,
29884,
511,
13,
462,
714,
29918,
11236,
362,
7607,
2892,
29901,
383,
29889,
18816,
29885,
3398,
22164,
13,
4706,
2428,
29898,
1660,
7445,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
1509,
29918,
20580,
353,
671,
29918,
20580,
13,
4706,
565,
7145,
29918,
305,
12629,
338,
6213,
29901,
13,
9651,
7145,
29918,
305,
12629,
353,
18196,
849,
20376,
565,
451,
4513,
29918,
6563,
1683,
4513,
29918,
305,
12629,
29898,
7411,
29898,
305,
12629,
29897,
847,
20376,
29897,
13,
13,
4706,
411,
1583,
29889,
2344,
29918,
6078,
7295,
13,
9651,
565,
671,
29918,
20580,
29901,
13,
18884,
1583,
29889,
20580,
29896,
353,
7602,
29896,
29916,
29896,
29898,
13,
462,
1678,
297,
29918,
305,
12629,
29922,
305,
12629,
29892,
13,
462,
1678,
714,
29918,
305,
12629,
29922,
6563,
29918,
305,
12629,
29892,
13,
462,
1678,
671,
29918,
29890,
3173,
29922,
5574,
29897,
13,
9651,
1683,
29901,
13,
18884,
1583,
29889,
13801,
29896,
353,
365,
29889,
12697,
29898,
13,
462,
1678,
297,
29918,
2311,
29922,
305,
12629,
29892,
13,
462,
1678,
714,
29918,
2311,
29922,
6563,
29918,
305,
12629,
29897,
13,
9651,
1583,
29889,
11236,
353,
679,
29918,
11236,
362,
29918,
13148,
29898,
6563,
29918,
11236,
362,
29897,
13,
9651,
565,
671,
29918,
20580,
29901,
13,
18884,
1583,
29889,
20580,
29906,
353,
7602,
29896,
29916,
29896,
29898,
13,
462,
1678,
297,
29918,
305,
12629,
29922,
6563,
29918,
305,
12629,
29892,
13,
462,
1678,
714,
29918,
305,
12629,
29922,
305,
12629,
29892,
13,
462,
1678,
671,
29918,
29890,
3173,
29922,
5574,
29897,
13,
9651,
1683,
29901,
13,
18884,
1583,
29889,
13801,
29906,
353,
365,
29889,
12697,
29898,
13,
462,
1678,
297,
29918,
2311,
29922,
6563,
29918,
305,
12629,
29892,
13,
462,
1678,
714,
29918,
2311,
29922,
305,
12629,
29897,
13,
9651,
1583,
29889,
18816,
29885,
3398,
353,
679,
29918,
11236,
362,
29918,
13148,
29898,
449,
29918,
11236,
362,
29897,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
281,
353,
383,
29889,
12483,
482,
29918,
10109,
292,
29918,
29906,
29881,
29898,
29916,
29892,
413,
2311,
29922,
29916,
29889,
12181,
29961,
29906,
29901,
2314,
13,
4706,
565,
451,
1583,
29889,
1509,
29918,
20580,
29901,
13,
9651,
281,
353,
383,
29889,
690,
14443,
29898,
29893,
29892,
8267,
7607,
29893,
29889,
12181,
29961,
29900,
1402,
448,
29896,
876,
13,
4706,
281,
353,
1583,
29889,
20580,
29896,
29898,
29893,
29897,
565,
1583,
29889,
1509,
29918,
20580,
1683,
1583,
29889,
13801,
29896,
29898,
29893,
29897,
13,
4706,
281,
353,
1583,
29889,
11236,
29898,
29893,
29897,
13,
4706,
281,
353,
1583,
29889,
20580,
29906,
29898,
29893,
29897,
565,
1583,
29889,
1509,
29918,
20580,
1683,
1583,
29889,
13801,
29906,
29898,
29893,
29897,
13,
4706,
281,
353,
1583,
29889,
18816,
29885,
3398,
29898,
29893,
29897,
13,
4706,
565,
451,
1583,
29889,
1509,
29918,
20580,
29901,
13,
9651,
281,
353,
383,
29889,
18837,
29918,
6229,
29879,
29898,
29943,
29889,
18837,
29918,
6229,
29879,
29898,
29893,
29892,
9685,
29922,
29906,
511,
9685,
29922,
29941,
29897,
13,
4706,
921,
353,
921,
334,
281,
13,
4706,
736,
921,
13,
13,
13,
1990,
317,
2882,
908,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
26178,
29899,
4165,
2509,
2908,
515,
525,
1666,
8139,
855,
29901,
26178,
29899,
4165,
2509,
8527,
29879,
5501,
2045,
597,
279,
26560,
29889,
990,
29914,
6897,
29914,
29906,
29900,
29900,
29946,
29889,
29900,
29947,
29929,
29945,
29945,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
6471,
584,
938,
13,
4706,
9681,
310,
8242,
6471,
313,
7543,
979,
537,
29892,
1728,
2971,
861,
467,
13,
1678,
2971,
861,
584,
938,
13,
4706,
9681,
310,
8536,
1169,
2629,
263,
21008,
2318,
29889,
13,
1678,
20376,
584,
938,
29892,
2322,
29871,
29946,
13,
4706,
317,
802,
29872,
911,
20376,
995,
29889,
13,
1678,
1375,
29918,
305,
12629,
584,
938,
29892,
2322,
29871,
29941,
29906,
13,
4706,
3080,
3039,
1353,
310,
269,
802,
6096,
287,
18196,
29889,
13,
1678,
671,
29918,
20580,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
26851,
284,
15359,
2012,
310,
8072,
29899,
18045,
6743,
29889,
13,
1678,
289,
29876,
29918,
8961,
584,
5785,
29892,
2322,
29871,
29896,
29872,
29899,
29945,
13,
4706,
18285,
5785,
2715,
304,
20162,
297,
350,
905,
6056,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
714,
29918,
305,
12629,
29892,
13,
462,
6471,
29892,
13,
462,
2971,
861,
29892,
13,
462,
20376,
29922,
29946,
29892,
13,
462,
1375,
29918,
305,
12629,
29922,
29941,
29906,
29892,
13,
462,
671,
29918,
20580,
29922,
5574,
29892,
13,
462,
289,
29876,
29918,
8961,
29922,
29896,
29872,
29899,
29945,
1125,
13,
4706,
2428,
29898,
29903,
2882,
908,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
13155,
353,
6471,
13,
4706,
1583,
29889,
3665,
861,
353,
2971,
861,
13,
4706,
1583,
29889,
1509,
29918,
20580,
353,
671,
29918,
20580,
13,
4706,
297,
29918,
305,
12629,
353,
714,
29918,
305,
12629,
334,
2971,
861,
13,
4706,
7145,
29918,
305,
12629,
353,
4236,
29898,
262,
29918,
305,
12629,
849,
20376,
29892,
1375,
29918,
305,
12629,
29897,
13,
13,
4706,
411,
1583,
29889,
2344,
29918,
6078,
7295,
13,
9651,
565,
671,
29918,
20580,
29901,
13,
18884,
1583,
29889,
20580,
29896,
353,
7602,
29896,
29916,
29896,
29898,
13,
462,
1678,
297,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
462,
1678,
714,
29918,
305,
12629,
29922,
6563,
29918,
305,
12629,
29892,
13,
462,
1678,
671,
29918,
29890,
3173,
29922,
5574,
29897,
13,
9651,
1683,
29901,
13,
18884,
1583,
29889,
13801,
29896,
353,
365,
29889,
12697,
29898,
13,
462,
1678,
297,
29918,
2311,
29922,
449,
29918,
305,
12629,
29892,
13,
462,
1678,
714,
29918,
2311,
29922,
6563,
29918,
305,
12629,
29897,
13,
9651,
1583,
29889,
11197,
353,
365,
29889,
23145,
19077,
2133,
29898,
13,
18884,
2159,
29922,
6563,
29918,
305,
12629,
29892,
13,
18884,
321,
567,
29922,
11197,
29918,
8961,
29897,
13,
9651,
1583,
29889,
11236,
353,
383,
29889,
2674,
29884,
13,
9651,
565,
671,
29918,
20580,
29901,
13,
18884,
1583,
29889,
20580,
29906,
353,
7602,
29896,
29916,
29896,
29898,
13,
462,
1678,
297,
29918,
305,
12629,
29922,
6563,
29918,
305,
12629,
29892,
13,
462,
1678,
714,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
462,
1678,
671,
29918,
29890,
3173,
29922,
5574,
29897,
13,
9651,
1683,
29901,
13,
18884,
1583,
29889,
13801,
29906,
353,
365,
29889,
12697,
29898,
13,
462,
1678,
297,
29918,
2311,
29922,
6563,
29918,
305,
12629,
29892,
13,
462,
1678,
714,
29918,
2311,
29922,
262,
29918,
305,
12629,
29897,
13,
9651,
1583,
29889,
2695,
3317,
353,
7687,
29898,
13,
18884,
383,
29889,
2695,
3317,
29892,
13,
18884,
9685,
29922,
29896,
29897,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
9853,
29892,
18196,
29892,
3171,
29892,
2920,
353,
921,
29889,
12181,
13,
4706,
921,
353,
383,
29889,
690,
14443,
29898,
29916,
29892,
8267,
7607,
16175,
29892,
1583,
29889,
3665,
861,
29892,
18196,
849,
1583,
29889,
3665,
861,
29892,
3171,
29892,
2920,
876,
13,
4706,
281,
353,
383,
29889,
2083,
29898,
29916,
29892,
9685,
29922,
29896,
29897,
13,
4706,
281,
353,
383,
29889,
12483,
482,
29918,
10109,
292,
29918,
29906,
29881,
29898,
29893,
29892,
413,
2311,
29922,
29893,
29889,
12181,
29961,
29906,
29901,
2314,
13,
4706,
565,
451,
1583,
29889,
1509,
29918,
20580,
29901,
13,
9651,
281,
353,
383,
29889,
690,
14443,
29898,
29893,
29892,
8267,
7607,
29893,
29889,
12181,
29961,
29900,
1402,
448,
29896,
876,
13,
4706,
281,
353,
1583,
29889,
20580,
29896,
29898,
29893,
29897,
565,
1583,
29889,
1509,
29918,
20580,
1683,
1583,
29889,
13801,
29896,
29898,
29893,
29897,
13,
4706,
281,
353,
1583,
29889,
11197,
29898,
29893,
29897,
13,
4706,
281,
353,
1583,
29889,
11236,
29898,
29893,
29897,
13,
4706,
281,
353,
1583,
29889,
20580,
29906,
29898,
29893,
29897,
565,
1583,
29889,
1509,
29918,
20580,
1683,
1583,
29889,
13801,
29906,
29898,
29893,
29897,
13,
4706,
281,
353,
383,
29889,
690,
14443,
29898,
29893,
29892,
8267,
7607,
16175,
29892,
1583,
29889,
13155,
29892,
1583,
29889,
3665,
861,
29892,
448,
29896,
876,
13,
4706,
281,
353,
383,
29889,
26276,
1165,
267,
29898,
29893,
29892,
9685,
29896,
29922,
29896,
29892,
9685,
29906,
29922,
29906,
29897,
13,
4706,
281,
353,
1583,
29889,
2695,
3317,
29898,
29893,
29897,
13,
4706,
281,
353,
383,
29889,
690,
14443,
29898,
29893,
29892,
8267,
7607,
16175,
29892,
1583,
29889,
3665,
861,
29892,
448,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
876,
13,
4706,
921,
353,
921,
334,
281,
13,
4706,
921,
353,
383,
29889,
2083,
29898,
29916,
29892,
9685,
29922,
29896,
29897,
13,
4706,
736,
921,
13,
13,
13,
1990,
16698,
1168,
29894,
7445,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
26178,
29899,
4165,
2509,
26851,
2908,
515,
525,
1666,
8139,
855,
29901,
26178,
29899,
4165,
2509,
8527,
29879,
5501,
2045,
597,
279,
26560,
29889,
990,
29914,
6897,
29914,
29906,
29900,
29900,
29946,
29889,
29900,
29947,
29929,
29945,
29945,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
413,
2311,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
1281,
4068,
3474,
2159,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
17132,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
13,
4706,
349,
4676,
995,
363,
26851,
7546,
29889,
13,
1678,
21749,
403,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
360,
8634,
995,
363,
26851,
7546,
29889,
13,
1678,
6471,
584,
938,
29892,
2322,
29871,
29896,
13,
4706,
9681,
310,
6471,
29889,
13,
1678,
671,
29918,
29890,
3173,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
278,
7546,
3913,
263,
24003,
4608,
29889,
13,
1678,
671,
29918,
11197,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
671,
350,
905,
29940,
555,
7546,
29889,
13,
1678,
289,
29876,
29918,
8961,
584,
5785,
29892,
2322,
29871,
29896,
29872,
29899,
29945,
13,
4706,
18285,
5785,
2715,
304,
20162,
297,
350,
905,
6056,
29889,
13,
1678,
26229,
584,
740,
470,
851,
470,
6213,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
470,
1024,
310,
26229,
740,
29889,
13,
1678,
2971,
861,
584,
938,
29892,
2322,
29871,
29906,
13,
4706,
9681,
310,
8536,
1169,
2629,
263,
21008,
2318,
29889,
13,
1678,
20376,
584,
938,
29892,
2322,
29871,
29946,
13,
4706,
317,
802,
29872,
911,
20376,
995,
29889,
13,
1678,
1375,
29918,
305,
12629,
584,
938,
29892,
2322,
29871,
29941,
29906,
13,
4706,
3080,
3039,
1353,
310,
269,
802,
6096,
287,
18196,
29889,
13,
1678,
671,
29918,
20580,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
26851,
284,
15359,
2012,
310,
8072,
29899,
18045,
6743,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
297,
29918,
305,
12629,
29892,
13,
462,
714,
29918,
305,
12629,
29892,
13,
462,
413,
2311,
29892,
13,
462,
380,
2426,
29892,
13,
462,
17132,
29892,
13,
462,
21749,
403,
29922,
29896,
29892,
13,
462,
6471,
29922,
29896,
29892,
13,
462,
671,
29918,
29890,
3173,
29922,
8824,
29892,
13,
462,
671,
29918,
11197,
29922,
5574,
29892,
13,
462,
289,
29876,
29918,
8961,
29922,
29896,
29872,
29899,
29945,
29892,
13,
462,
26229,
7607,
2892,
29901,
383,
29889,
2674,
29884,
511,
13,
462,
2971,
861,
29922,
29906,
29892,
13,
462,
20376,
29922,
29946,
29892,
13,
462,
1375,
29918,
305,
12629,
29922,
29941,
29906,
29892,
13,
462,
671,
29918,
20580,
29922,
5574,
1125,
13,
4706,
2428,
29898,
8132,
1168,
29894,
7445,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
411,
1583,
29889,
2344,
29918,
6078,
7295,
13,
9651,
1583,
29889,
20580,
353,
1281,
29894,
7445,
29898,
13,
18884,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
18884,
714,
29918,
305,
12629,
7607,
449,
29918,
305,
12629,
334,
2971,
861,
511,
13,
18884,
413,
2311,
29922,
2039,
675,
29892,
13,
18884,
380,
2426,
29922,
303,
2426,
29892,
13,
18884,
17132,
29922,
8305,
29892,
13,
18884,
21749,
403,
29922,
29881,
309,
403,
29892,
13,
18884,
6471,
7607,
13155,
334,
2971,
861,
511,
13,
18884,
671,
29918,
29890,
3173,
29922,
1509,
29918,
29890,
3173,
29892,
13,
18884,
671,
29918,
11197,
29922,
1509,
29918,
11197,
29892,
13,
18884,
289,
29876,
29918,
8961,
29922,
11197,
29918,
8961,
29892,
13,
18884,
26229,
29922,
11236,
362,
29897,
13,
9651,
1583,
29889,
1131,
353,
317,
2882,
908,
29898,
13,
18884,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
18884,
6471,
29922,
13155,
29892,
13,
18884,
2971,
861,
29922,
3665,
861,
29892,
13,
18884,
20376,
29922,
9313,
428,
29892,
13,
18884,
1375,
29918,
305,
12629,
29922,
1195,
29918,
305,
12629,
29892,
13,
18884,
671,
29918,
20580,
29922,
1509,
29918,
20580,
29892,
13,
18884,
289,
29876,
29918,
8961,
29922,
11197,
29918,
8961,
29897,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
921,
353,
1583,
29889,
20580,
29898,
29916,
29897,
13,
4706,
921,
353,
1583,
29889,
1131,
29898,
29916,
29897,
13,
4706,
736,
921,
13,
13,
13,
1753,
872,
20580,
29941,
29916,
29941,
29918,
1271,
29898,
262,
29918,
305,
12629,
29892,
13,
462,
1678,
714,
29918,
305,
12629,
29892,
13,
462,
1678,
380,
2426,
29922,
29896,
29892,
13,
462,
1678,
17132,
29922,
29896,
29892,
13,
462,
1678,
3579,
19290,
1125,
13,
1678,
9995,
13,
268,
29941,
29916,
29941,
1873,
310,
278,
26178,
29899,
4165,
2509,
26851,
2908,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
380,
2426,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
624,
2426,
310,
278,
26851,
29889,
13,
1678,
17132,
584,
938,
470,
18761,
29914,
1761,
310,
29871,
29906,
938,
29892,
2322,
29871,
29896,
13,
4706,
349,
4676,
995,
363,
26851,
7546,
29889,
13,
1678,
9995,
13,
1678,
736,
16698,
1168,
29894,
7445,
29898,
13,
4706,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
4706,
714,
29918,
305,
12629,
29922,
449,
29918,
305,
12629,
29892,
13,
4706,
413,
2311,
29922,
29941,
29892,
13,
4706,
380,
2426,
29922,
303,
2426,
29892,
13,
4706,
17132,
29922,
8305,
29892,
13,
4706,
3579,
19290,
29897,
13,
13,
13,
1990,
349,
15711,
2713,
21897,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
349,
15711,
29899,
845,
21897,
5858,
515,
525,
21713,
29899,
2481,
16740,
7084,
322,
13987,
5670,
29899,
12375,
918,
5293,
385,
382,
4543,
3323,
29899,
29637,
13,
1678,
1281,
4068,
284,
2448,
3631,
8527,
5501,
2045,
597,
279,
26560,
29889,
990,
29914,
6897,
29914,
29896,
29953,
29900,
29929,
29889,
29900,
29945,
29896,
29945,
29947,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
6287,
29918,
19790,
584,
938,
13,
4706,
9683,
666,
4926,
363,
18652,
2159,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
6287,
29918,
19790,
29892,
13,
462,
3579,
19290,
1125,
13,
4706,
2428,
29898,
29637,
2713,
21897,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
7052,
29918,
19790,
353,
6287,
29918,
19790,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
285,
29896,
353,
1583,
29889,
7052,
29918,
19790,
13,
4706,
285,
29906,
353,
1583,
29889,
7052,
29918,
19790,
13,
13,
4706,
9853,
29892,
18196,
29892,
3171,
29892,
2920,
353,
921,
29889,
12181,
13,
13,
4706,
4974,
313,
305,
12629,
1273,
285,
29896,
1273,
285,
29906,
1275,
29871,
29900,
29897,
13,
4706,
716,
29918,
305,
12629,
353,
18196,
849,
285,
29896,
849,
285,
29906,
13,
13,
4706,
921,
353,
383,
29889,
690,
14443,
29898,
29916,
29892,
8267,
7607,
16175,
29892,
716,
29918,
305,
12629,
29892,
285,
29896,
334,
285,
29906,
29892,
3171,
29892,
2920,
876,
13,
4706,
921,
353,
383,
29889,
690,
14443,
29898,
29916,
29892,
8267,
7607,
16175,
29892,
716,
29918,
305,
12629,
29892,
285,
29896,
29892,
285,
29906,
29892,
3171,
29892,
2920,
876,
13,
4706,
921,
353,
383,
29889,
3286,
4220,
29898,
29916,
29892,
27815,
7607,
29900,
29892,
29871,
29896,
29892,
29871,
29946,
29892,
29871,
29906,
29892,
29871,
29945,
29892,
29871,
29941,
876,
13,
4706,
921,
353,
383,
29889,
690,
14443,
29898,
29916,
29892,
8267,
7607,
16175,
29892,
716,
29918,
305,
12629,
29892,
3171,
334,
285,
29896,
29892,
2920,
334,
285,
29906,
876,
13,
13,
4706,
736,
921,
13,
13,
13,
1990,
29630,
7445,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
360,
1947,
501,
567,
314,
10335,
1281,
4068,
313,
14849,
29907,
29897,
2908,
515,
525,
29177,
11235,
1281,
4068,
363,
9444,
7716,
6667,
358,
362,
5501,
13,
1678,
2045,
597,
279,
26560,
29889,
990,
29914,
6897,
29914,
29896,
29955,
29900,
29906,
29889,
29900,
29947,
29945,
29900,
29906,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
714,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1962,
18196,
29889,
13,
1678,
6287,
29918,
19790,
584,
938,
13,
4706,
9683,
666,
4926,
363,
18652,
2159,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
297,
29918,
305,
12629,
29892,
13,
462,
714,
29918,
305,
12629,
29892,
13,
462,
6287,
29918,
19790,
29892,
13,
462,
3579,
19290,
1125,
13,
4706,
2428,
29898,
29928,
1682,
7445,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
7145,
29918,
305,
12629,
353,
313,
7052,
29918,
19790,
334,
6287,
29918,
19790,
29897,
334,
714,
29918,
305,
12629,
13,
13,
4706,
411,
1583,
29889,
2344,
29918,
6078,
7295,
13,
9651,
1583,
29889,
20580,
353,
7602,
29941,
29916,
29941,
29918,
1271,
29898,
13,
18884,
297,
29918,
305,
12629,
29922,
262,
29918,
305,
12629,
29892,
13,
18884,
714,
29918,
305,
12629,
29922,
6563,
29918,
305,
12629,
29897,
13,
9651,
1583,
29889,
29886,
861,
29918,
845,
21897,
353,
349,
15711,
2713,
21897,
29898,
7052,
29918,
19790,
29922,
7052,
29918,
19790,
29897,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
921,
353,
1583,
29889,
20580,
29898,
29916,
29897,
13,
4706,
921,
353,
1583,
29889,
29886,
861,
29918,
845,
21897,
29898,
29916,
29897,
13,
4706,
736,
921,
13,
13,
13,
1990,
12545,
16941,
2556,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
319,
8617,
2556,
9704,
393,
508,
367,
1304,
2012,
310,
922,
339,
2556,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
2428,
29898,
15427,
16941,
2556,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
13148,
29918,
7039,
353,
5159,
13,
13,
1678,
822,
4770,
842,
5552,
12035,
1311,
29892,
1024,
29892,
995,
1125,
13,
4706,
2428,
29898,
15427,
16941,
2556,
29892,
1583,
467,
1649,
842,
5552,
12035,
978,
29892,
995,
29897,
13,
4706,
565,
1583,
29889,
2541,
262,
29918,
2344,
29918,
6078,
322,
1246,
519,
29898,
1767,
1125,
13,
9651,
1583,
29889,
13148,
29918,
7039,
29889,
4397,
29898,
978,
29897,
13,
13,
1678,
822,
4770,
6144,
5552,
12035,
1311,
29892,
1024,
1125,
13,
4706,
2428,
29898,
15427,
16941,
2556,
29892,
1583,
467,
1649,
6144,
5552,
12035,
978,
29897,
13,
4706,
1018,
29901,
13,
9651,
1583,
29889,
13148,
29918,
7039,
29889,
5992,
29898,
978,
29897,
13,
4706,
5174,
7865,
2392,
29901,
13,
9651,
1209,
13,
13,
1678,
822,
4770,
2435,
12035,
1311,
1125,
13,
4706,
736,
7431,
29898,
1311,
29889,
13148,
29918,
7039,
29897,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
363,
1024,
297,
1583,
29889,
13148,
29918,
7039,
29901,
13,
9651,
921,
353,
1583,
29961,
978,
850,
29916,
29897,
13,
4706,
736,
921,
13,
13,
1678,
822,
560,
29898,
1311,
29892,
2380,
1125,
13,
4706,
736,
1583,
29961,
1311,
29889,
13148,
29918,
7039,
29961,
2248,
5262,
13,
13,
13,
1990,
360,
950,
2605,
16941,
2556,
29898,
15427,
16941,
2556,
1125,
13,
1678,
9995,
13,
1678,
319,
8617,
2556,
5639,
363,
10930,
411,
14581,
10970,
29914,
4905,
29879,
29889,
13,
1678,
15658,
29879,
674,
367,
8283,
297,
278,
1797,
896,
526,
2715,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
736,
29918,
10184,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
736,
1023,
1962,
1156,
8225,
29889,
13,
1678,
937,
29918,
536,
19016,
584,
938,
29892,
2322,
29871,
29900,
13,
4706,
9681,
310,
278,
937,
10930,
411,
2323,
1881,
29914,
4905,
29889,
13,
1678,
1833,
29918,
536,
19016,
584,
938,
29892,
2322,
29871,
29900,
13,
4706,
9681,
310,
278,
2186,
10930,
411,
2323,
1881,
29914,
4905,
29889,
13,
1678,
14581,
29918,
2084,
29918,
816,
2004,
584,
740,
13,
4706,
1102,
2004,
310,
14581,
2224,
2933,
363,
263,
2908,
29889,
13,
1678,
14581,
29918,
2084,
29918,
816,
2004,
29918,
536,
979,
584,
740,
13,
4706,
1102,
2004,
310,
14581,
2224,
2933,
363,
385,
4356,
979,
2908,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
736,
29918,
10184,
29922,
5574,
29892,
13,
462,
937,
29918,
536,
19016,
29922,
29900,
29892,
13,
462,
1833,
29918,
536,
19016,
29922,
29900,
29892,
13,
462,
14581,
29918,
2084,
29918,
816,
2004,
7607,
2892,
2908,
29892,
921,
29896,
29892,
921,
29906,
29901,
2908,
29898,
29916,
29896,
29892,
921,
29906,
8243,
13,
462,
14581,
29918,
2084,
29918,
816,
2004,
29918,
536,
979,
7607,
2892,
2908,
29892,
921,
29896,
29892,
921,
29906,
29901,
313,
1271,
29898,
29916,
29896,
511,
921,
29906,
876,
1125,
13,
4706,
2428,
29898,
29928,
950,
2605,
16941,
2556,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
2457,
29918,
10184,
353,
736,
29918,
10184,
13,
4706,
1583,
29889,
4102,
29918,
536,
19016,
353,
937,
29918,
536,
19016,
13,
4706,
1583,
29889,
4230,
29918,
536,
19016,
353,
1833,
29918,
536,
19016,
13,
4706,
1583,
29889,
700,
284,
29918,
2084,
29918,
816,
2004,
353,
14581,
29918,
2084,
29918,
816,
2004,
13,
4706,
1583,
29889,
700,
284,
29918,
2084,
29918,
816,
2004,
29918,
536,
979,
353,
14581,
29918,
2084,
29918,
816,
2004,
29918,
536,
979,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
29896,
29892,
921,
29906,
29922,
8516,
1125,
13,
4706,
3309,
353,
7431,
29898,
1311,
29889,
13148,
29918,
7039,
29897,
13,
4706,
363,
474,
29892,
2908,
29918,
978,
297,
26985,
29898,
1311,
29889,
13148,
29918,
7039,
1125,
13,
9651,
2908,
353,
1583,
29961,
1271,
29918,
978,
29962,
13,
9651,
565,
313,
29875,
529,
1583,
29889,
4102,
29918,
536,
19016,
29897,
470,
313,
29875,
6736,
3309,
448,
1583,
29889,
4230,
29918,
536,
19016,
1125,
13,
18884,
921,
29896,
29892,
921,
29906,
353,
1583,
29889,
700,
284,
29918,
2084,
29918,
816,
2004,
29918,
536,
979,
29898,
1271,
29892,
921,
29896,
29892,
921,
29906,
29897,
13,
9651,
1683,
29901,
13,
18884,
921,
29896,
29892,
921,
29906,
353,
1583,
29889,
700,
284,
29918,
2084,
29918,
816,
2004,
29898,
1271,
29892,
921,
29896,
29892,
921,
29906,
29897,
13,
4706,
565,
1583,
29889,
2457,
29918,
10184,
29901,
13,
9651,
736,
921,
29896,
29892,
921,
29906,
13,
4706,
1683,
29901,
13,
9651,
736,
921,
29896,
13,
13,
13,
1990,
1281,
3784,
29898,
15427,
16941,
2556,
1125,
13,
1678,
9995,
13,
1678,
319,
5639,
363,
16125,
362,
310,
10585,
373,
278,
2967,
310,
278,
8617,
2556,
5639,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
9685,
584,
938,
29892,
2322,
29871,
29896,
13,
4706,
450,
9685,
373,
607,
304,
16125,
403,
278,
14391,
29889,
13,
1678,
5096,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
304,
16125,
403,
25187,
943,
3412,
263,
716,
9927,
29889,
13,
1678,
10366,
29918,
1853,
584,
851,
29892,
2322,
6213,
13,
4706,
5167,
310,
5443,
2778,
3460,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
9685,
29922,
29896,
29892,
13,
462,
5096,
29922,
8824,
29892,
13,
462,
10366,
29918,
1853,
29922,
8516,
1125,
13,
4706,
2428,
29898,
1168,
3784,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
4974,
313,
14634,
29918,
1853,
338,
6213,
29897,
470,
313,
14634,
29918,
1853,
297,
6796,
4117,
613,
376,
1429,
613,
376,
2083,
20068,
13,
4706,
1583,
29889,
8990,
353,
9685,
13,
4706,
565,
10366,
29918,
1853,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
14634,
29918,
1853,
353,
10366,
29918,
1853,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
14634,
29918,
1853,
353,
376,
1429,
29908,
565,
5096,
1683,
376,
4117,
29908,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
714,
353,
5159,
13,
4706,
363,
1024,
297,
1583,
29889,
13148,
29918,
7039,
29901,
13,
9651,
714,
29889,
4397,
29898,
1311,
29961,
978,
850,
29916,
876,
13,
4706,
565,
1583,
29889,
14634,
29918,
1853,
1275,
376,
1429,
1115,
13,
9651,
714,
353,
383,
29889,
1429,
29898,
23583,
29898,
449,
511,
9685,
29922,
1311,
29889,
8990,
29897,
13,
4706,
25342,
1583,
29889,
14634,
29918,
1853,
1275,
376,
4117,
1115,
13,
9651,
714,
353,
383,
29889,
17685,
29898,
23583,
29898,
449,
511,
9685,
29922,
1311,
29889,
8990,
29897,
13,
4706,
25342,
1583,
29889,
14634,
29918,
1853,
1275,
376,
2083,
1115,
13,
9651,
714,
353,
383,
29889,
2083,
29898,
29943,
29889,
1429,
29898,
23583,
29898,
449,
511,
9685,
29922,
1311,
29889,
8990,
511,
1583,
29889,
8990,
29897,
13,
4706,
1683,
29901,
13,
9651,
12020,
2216,
1888,
2037,
287,
2392,
580,
13,
4706,
736,
714,
13,
13,
13,
1990,
922,
339,
2556,
1168,
3784,
29898,
15427,
16941,
2556,
1125,
13,
1678,
9995,
13,
1678,
319,
8617,
2556,
5639,
411,
16125,
630,
14391,
29889,
13,
1678,
15658,
29879,
674,
367,
8283,
297,
278,
1797,
896,
526,
2715,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
9685,
584,
938,
29892,
2322,
29871,
29896,
13,
4706,
450,
9685,
373,
607,
304,
16125,
403,
278,
14391,
29889,
13,
1678,
5096,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
304,
16125,
403,
25187,
943,
3412,
263,
716,
9927,
29889,
13,
1678,
6635,
29918,
2080,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
16125,
403,
1881,
12489,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
9685,
29922,
29896,
29892,
13,
462,
5096,
29922,
8824,
29892,
13,
462,
6635,
29918,
2080,
29922,
5574,
1125,
13,
4706,
2428,
29898,
16941,
2556,
1168,
3784,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
8990,
353,
9685,
13,
4706,
1583,
29889,
1429,
353,
5096,
13,
4706,
1583,
29889,
4117,
29918,
2080,
353,
6635,
29918,
2080,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
714,
353,
518,
29916,
29962,
565,
1583,
29889,
4117,
29918,
2080,
1683,
5159,
13,
4706,
363,
1024,
297,
1583,
29889,
13148,
29918,
7039,
29901,
13,
9651,
921,
353,
1583,
29961,
978,
850,
29916,
29897,
13,
9651,
714,
29889,
4397,
29898,
29916,
29897,
13,
4706,
565,
1583,
29889,
1429,
29901,
13,
9651,
714,
353,
383,
29889,
1429,
29898,
23583,
29898,
449,
511,
9685,
29922,
1311,
29889,
8990,
29897,
13,
4706,
1683,
29901,
13,
9651,
714,
353,
383,
29889,
17685,
29898,
23583,
29898,
449,
511,
9685,
29922,
1311,
29889,
8990,
29897,
13,
4706,
736,
714,
13,
13,
13,
1990,
12662,
300,
2200,
16941,
2556,
29898,
15427,
16941,
2556,
1125,
13,
1678,
9995,
13,
1678,
319,
8617,
2556,
5639,
363,
10585,
411,
4128,
29889,
13,
1678,
15658,
29879,
674,
367,
8283,
297,
278,
1797,
896,
526,
2715,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
2428,
29898,
4736,
300,
2200,
16941,
2556,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
29892,
3579,
19290,
1125,
13,
4706,
363,
1024,
297,
1583,
29889,
13148,
29918,
7039,
29901,
13,
9651,
921,
353,
1583,
29961,
978,
850,
29916,
29892,
3579,
19290,
29897,
13,
4706,
736,
921,
13,
13,
13,
1990,
12662,
300,
2200,
1168,
3784,
29898,
15427,
16941,
2556,
1125,
13,
1678,
9995,
13,
1678,
319,
5639,
363,
16125,
362,
310,
10585,
373,
278,
2967,
310,
278,
8617,
2556,
5639,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
9685,
584,
938,
29892,
2322,
29871,
29896,
13,
4706,
450,
9685,
373,
607,
304,
16125,
403,
278,
14391,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
9685,
29922,
29896,
1125,
13,
4706,
2428,
29898,
4736,
300,
2200,
1168,
3784,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
8990,
353,
9685,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
29892,
3579,
19290,
1125,
13,
4706,
714,
353,
5159,
13,
4706,
363,
1024,
297,
1583,
29889,
13148,
29918,
7039,
29901,
13,
9651,
714,
29889,
4397,
29898,
1311,
29961,
978,
850,
29916,
29892,
3579,
19290,
876,
13,
4706,
714,
353,
383,
29889,
17685,
29898,
23583,
29898,
449,
511,
9685,
29922,
1311,
29889,
8990,
29897,
13,
4706,
736,
714,
13,
13,
13,
1990,
379,
18041,
605,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
319,
7234,
29050,
2908,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
1623,
29918,
11762,
584,
12545,
16941,
2556,
13,
4706,
9943,
10585,
408,
8617,
2556,
29889,
13,
1678,
701,
29918,
11762,
584,
12545,
16941,
2556,
13,
4706,
5020,
10585,
408,
8617,
2556,
29889,
13,
1678,
14383,
29918,
11762,
584,
12545,
16941,
2556,
13,
4706,
4971,
666,
3957,
10585,
408,
8617,
2556,
29889,
13,
1678,
10366,
29918,
1853,
584,
851,
29892,
2322,
525,
1202,
29915,
13,
4706,
5167,
310,
16125,
362,
310,
701,
322,
14383,
14391,
29889,
13,
1678,
736,
29918,
4102,
29918,
11014,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
736,
278,
937,
14383,
3957,
1962,
29889,
501,
8485,
297,
2538,
4165,
6779,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
1623,
29918,
11762,
29892,
13,
462,
701,
29918,
11762,
29892,
13,
462,
14383,
29918,
11762,
29892,
13,
462,
10366,
29918,
1853,
543,
1202,
613,
13,
462,
736,
29918,
4102,
29918,
11014,
29922,
8824,
1125,
13,
4706,
2428,
29898,
29950,
18041,
605,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
19488,
353,
7431,
29898,
3204,
29918,
11762,
29897,
13,
4706,
4974,
313,
14634,
29918,
1853,
297,
6796,
4117,
613,
376,
1202,
20068,
13,
4706,
4974,
313,
2435,
29898,
786,
29918,
11762,
29897,
1275,
1583,
29889,
19488,
29897,
13,
4706,
4974,
313,
2435,
29898,
11014,
29918,
11762,
29897,
297,
313,
1311,
29889,
19488,
29892,
1583,
29889,
19488,
718,
29871,
29896,
876,
13,
4706,
1583,
29889,
14634,
29918,
1853,
353,
10366,
29918,
1853,
13,
4706,
1583,
29889,
2457,
29918,
4102,
29918,
11014,
353,
736,
29918,
4102,
29918,
11014,
13,
4706,
1583,
29889,
17833,
29918,
11014,
353,
313,
2435,
29898,
11014,
29918,
11762,
29897,
1275,
1583,
29889,
19488,
718,
29871,
29896,
29897,
13,
13,
4706,
411,
1583,
29889,
2344,
29918,
6078,
7295,
13,
9651,
1583,
29889,
3204,
29918,
11762,
353,
1623,
29918,
11762,
13,
9651,
1583,
29889,
786,
29918,
11762,
353,
701,
29918,
11762,
13,
9651,
1583,
29889,
11014,
29918,
11762,
353,
14383,
29918,
11762,
13,
13,
1678,
822,
903,
14634,
29898,
1311,
29892,
921,
29892,
343,
1125,
13,
4706,
565,
343,
338,
451,
6213,
29901,
13,
9651,
565,
1583,
29889,
14634,
29918,
1853,
1275,
376,
4117,
1115,
13,
18884,
921,
353,
383,
29889,
17685,
3552,
29916,
29892,
343,
511,
9685,
29922,
29896,
29897,
13,
9651,
25342,
1583,
29889,
14634,
29918,
1853,
1275,
376,
1202,
1115,
13,
18884,
921,
353,
921,
718,
343,
13,
4706,
736,
921,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
343,
353,
6213,
13,
4706,
1623,
29918,
17718,
353,
518,
29916,
29962,
13,
4706,
363,
1623,
29918,
5453,
29918,
978,
297,
1583,
29889,
3204,
29918,
11762,
29889,
13148,
29918,
7039,
29901,
13,
9651,
1623,
29918,
5453,
353,
1583,
29889,
3204,
29918,
11762,
29961,
3204,
29918,
5453,
29918,
978,
29962,
13,
9651,
921,
353,
1623,
29918,
5453,
29898,
29916,
29897,
13,
9651,
1623,
29918,
17718,
29889,
4397,
29898,
29916,
29897,
13,
4706,
363,
474,
297,
3464,
29898,
2435,
29898,
3204,
29918,
17718,
22164,
13,
9651,
565,
474,
2804,
29871,
29900,
29901,
13,
18884,
343,
353,
1623,
29918,
17718,
29961,
1311,
29889,
19488,
448,
474,
29962,
13,
18884,
14383,
29918,
5453,
353,
1583,
29889,
11014,
29918,
11762,
29889,
295,
29898,
1311,
29889,
19488,
448,
474,
29897,
13,
18884,
343,
353,
14383,
29918,
5453,
29898,
29891,
29897,
13,
18884,
921,
353,
1583,
3032,
14634,
29898,
29916,
29892,
343,
29897,
13,
9651,
565,
474,
2804,
7431,
29898,
3204,
29918,
17718,
29897,
448,
29871,
29896,
29901,
13,
18884,
565,
313,
29875,
1275,
29871,
29900,
29897,
322,
1583,
29889,
17833,
29918,
11014,
29901,
13,
462,
1678,
14383,
29918,
5453,
353,
1583,
29889,
11014,
29918,
11762,
29889,
295,
29898,
1311,
29889,
19488,
29897,
13,
462,
1678,
921,
353,
14383,
29918,
5453,
29898,
29916,
29897,
13,
18884,
701,
29918,
5453,
353,
1583,
29889,
786,
29918,
11762,
29889,
295,
29898,
1311,
29889,
19488,
448,
29871,
29896,
448,
474,
29897,
13,
18884,
921,
353,
701,
29918,
5453,
29898,
29916,
29897,
13,
4706,
565,
1583,
29889,
2457,
29918,
4102,
29918,
11014,
29901,
13,
9651,
736,
921,
29892,
343,
13,
4706,
1683,
29901,
13,
9651,
736,
921,
13,
13,
13,
1990,
22948,
339,
616,
357,
284,
29950,
18041,
605,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
319,
3999,
339,
616,
357,
284,
7234,
29050,
2908,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
1623,
29896,
29918,
11762,
584,
12545,
16941,
2556,
13,
4706,
450,
937,
1623,
10585,
408,
8617,
2556,
29889,
13,
1678,
14383,
29896,
29918,
11762,
584,
12545,
16941,
2556,
13,
4706,
450,
937,
14383,
3957,
10585,
408,
8617,
2556,
29889,
13,
1678,
701,
29918,
11762,
584,
12545,
16941,
2556,
13,
4706,
5020,
10585,
408,
8617,
2556,
29889,
13,
1678,
14383,
29906,
29918,
11762,
584,
12545,
16941,
2556,
13,
4706,
450,
1473,
14383,
3957,
10585,
408,
8617,
2556,
29889,
13,
1678,
1623,
29906,
29918,
11762,
584,
12545,
16941,
2556,
13,
4706,
450,
1473,
1623,
10585,
408,
8617,
2556,
29889,
13,
1678,
10366,
29918,
1853,
584,
851,
29892,
2322,
525,
4117,
29915,
13,
4706,
5167,
310,
16125,
362,
310,
701,
322,
14383,
14391,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
1623,
29896,
29918,
11762,
29892,
13,
462,
14383,
29896,
29918,
11762,
29892,
13,
462,
701,
29918,
11762,
29892,
13,
462,
14383,
29906,
29918,
11762,
29892,
13,
462,
1623,
29906,
29918,
11762,
29892,
13,
462,
10366,
29918,
1853,
543,
4117,
29908,
1125,
13,
4706,
2428,
29898,
29903,
267,
339,
616,
357,
284,
29950,
18041,
605,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
4974,
313,
2435,
29898,
3204,
29896,
29918,
11762,
29897,
1275,
7431,
29898,
786,
29918,
11762,
876,
13,
4706,
4974,
313,
2435,
29898,
3204,
29896,
29918,
11762,
29897,
1275,
7431,
29898,
3204,
29906,
29918,
11762,
876,
13,
4706,
4974,
313,
2435,
29898,
11014,
29896,
29918,
11762,
29897,
1275,
7431,
29898,
11014,
29906,
29918,
11762,
876,
13,
4706,
4974,
313,
2435,
29898,
3204,
29896,
29918,
11762,
29897,
1275,
7431,
29898,
11014,
29896,
29918,
11762,
29897,
448,
29871,
29896,
29897,
13,
4706,
4974,
313,
14634,
29918,
1853,
297,
6796,
4117,
613,
376,
1202,
20068,
13,
4706,
1583,
29889,
14634,
29918,
1853,
353,
10366,
29918,
1853,
13,
4706,
1583,
29889,
19488,
353,
7431,
29898,
3204,
29896,
29918,
11762,
29897,
13,
13,
4706,
411,
1583,
29889,
2344,
29918,
6078,
7295,
13,
9651,
1583,
29889,
3204,
29896,
29918,
11762,
353,
1623,
29896,
29918,
11762,
13,
9651,
1583,
29889,
11014,
29896,
29918,
11762,
353,
14383,
29896,
29918,
11762,
13,
9651,
1583,
29889,
786,
29918,
11762,
353,
701,
29918,
11762,
13,
9651,
1583,
29889,
11014,
29906,
29918,
11762,
353,
14383,
29906,
29918,
11762,
13,
9651,
1583,
29889,
3204,
29906,
29918,
11762,
353,
1623,
29906,
29918,
11762,
13,
13,
1678,
822,
903,
14634,
29898,
1311,
29892,
921,
29892,
343,
1125,
13,
4706,
565,
343,
338,
451,
6213,
29901,
13,
9651,
565,
1583,
29889,
14634,
29918,
1853,
1275,
376,
4117,
1115,
13,
18884,
921,
353,
383,
29889,
17685,
3552,
29916,
29892,
343,
511,
9685,
29922,
29896,
29897,
13,
9651,
25342,
1583,
29889,
14634,
29918,
1853,
1275,
376,
1202,
1115,
13,
18884,
921,
353,
921,
718,
343,
13,
4706,
736,
921,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
343,
353,
1583,
29889,
11014,
29896,
29918,
11762,
29961,
1311,
29889,
11014,
29896,
29918,
11762,
29889,
13148,
29918,
7039,
29961,
29900,
29962,
850,
29916,
29897,
13,
4706,
14383,
29896,
29918,
17718,
353,
518,
29891,
29962,
13,
4706,
363,
474,
297,
3464,
29898,
1311,
29889,
19488,
1125,
13,
9651,
921,
353,
1583,
29889,
3204,
29896,
29918,
11762,
29961,
1311,
29889,
3204,
29896,
29918,
11762,
29889,
13148,
29918,
7039,
29961,
29875,
29962,
850,
29916,
29897,
13,
9651,
343,
353,
1583,
29889,
11014,
29896,
29918,
11762,
29961,
1311,
29889,
11014,
29896,
29918,
11762,
29889,
13148,
29918,
7039,
29961,
29875,
718,
29871,
29896,
29962,
850,
29916,
29897,
13,
9651,
14383,
29896,
29918,
17718,
29889,
4397,
29898,
29891,
29897,
13,
4706,
921,
353,
14383,
29896,
29918,
17718,
29961,
1311,
29889,
19488,
29962,
13,
4706,
343,
353,
1583,
29889,
11014,
29906,
29918,
11762,
29961,
1311,
29889,
11014,
29906,
29918,
11762,
29889,
13148,
29918,
7039,
29961,
29900,
29962,
850,
29916,
29897,
13,
4706,
14383,
29906,
29918,
17718,
353,
518,
29891,
29962,
13,
4706,
363,
474,
297,
3464,
29898,
1311,
29889,
19488,
1125,
13,
9651,
921,
353,
1583,
29889,
786,
29918,
11762,
29961,
1311,
29889,
786,
29918,
11762,
29889,
13148,
29918,
7039,
29961,
29875,
29962,
850,
29916,
29897,
13,
9651,
343,
353,
14383,
29896,
29918,
17718,
29961,
1311,
29889,
19488,
448,
29871,
29896,
448,
474,
29962,
13,
9651,
921,
353,
1583,
3032,
14634,
29898,
29916,
29892,
343,
29897,
13,
9651,
343,
353,
1583,
29889,
11014,
29906,
29918,
11762,
29961,
1311,
29889,
11014,
29906,
29918,
11762,
29889,
13148,
29918,
7039,
29961,
29875,
718,
29871,
29896,
29962,
850,
29916,
29897,
13,
9651,
14383,
29906,
29918,
17718,
29889,
4397,
29898,
29891,
29897,
13,
4706,
921,
353,
1583,
29889,
11014,
29906,
29918,
11762,
29961,
1311,
29889,
11014,
29906,
29918,
11762,
29889,
13148,
29918,
7039,
29961,
1311,
29889,
19488,
29962,
850,
29916,
29897,
13,
4706,
363,
474,
297,
3464,
29898,
1311,
29889,
19488,
1125,
13,
9651,
921,
353,
1583,
29889,
3204,
29906,
29918,
11762,
29961,
1311,
29889,
3204,
29906,
29918,
11762,
29889,
13148,
29918,
7039,
29961,
29875,
29962,
850,
29916,
29897,
13,
9651,
343,
353,
14383,
29906,
29918,
17718,
29961,
1311,
29889,
19488,
448,
29871,
29896,
448,
474,
29962,
13,
9651,
921,
353,
1583,
3032,
14634,
29898,
29916,
29892,
343,
29897,
13,
4706,
736,
921,
13,
13,
13,
1990,
14974,
6466,
16941,
2556,
29898,
15427,
16941,
2556,
1125,
13,
1678,
9995,
13,
1678,
319,
8617,
2556,
5639,
411,
2999,
14391,
29889,
13,
1678,
15658,
29879,
674,
367,
8283,
297,
278,
1797,
896,
526,
2715,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
2473,
29918,
4905,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
736,
2999,
1962,
29889,
13,
1678,
14581,
29918,
4905,
584,
6120,
29892,
2322,
7700,
13,
4706,
26460,
304,
736,
14581,
1962,
29889,
13,
1678,
736,
29918,
4230,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
363,
455,
29890,
368,
736,
1833,
995,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
2473,
29918,
4905,
29922,
5574,
29892,
13,
462,
14581,
29918,
4905,
29922,
8824,
29892,
13,
462,
736,
29918,
4230,
29922,
5574,
1125,
13,
4706,
2428,
29898,
15329,
6466,
16941,
2556,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
1583,
29889,
9910,
29918,
4905,
353,
2473,
29918,
4905,
13,
4706,
1583,
29889,
700,
284,
29918,
4905,
353,
14581,
29918,
4905,
13,
4706,
1583,
29889,
2457,
29918,
4230,
353,
736,
29918,
4230,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
714,
29879,
353,
5159,
13,
4706,
363,
1024,
297,
1583,
29889,
13148,
29918,
7039,
29901,
13,
9651,
2908,
353,
1583,
29961,
978,
29962,
13,
9651,
921,
353,
2908,
29898,
29916,
29897,
13,
9651,
565,
756,
5552,
29898,
1271,
29892,
376,
1867,
29918,
4905,
1159,
322,
2908,
29889,
1867,
29918,
4905,
29901,
13,
18884,
714,
29879,
29889,
4397,
29898,
29916,
29897,
13,
9651,
25342,
756,
5552,
29898,
1271,
29892,
376,
1867,
29918,
4905,
29906,
1159,
322,
2908,
29889,
1867,
29918,
4905,
29906,
29901,
13,
18884,
4974,
313,
1853,
29898,
29916,
29897,
1275,
18761,
29897,
13,
18884,
714,
29879,
29889,
21843,
29898,
29916,
29961,
29896,
2314,
13,
18884,
921,
353,
921,
29961,
29900,
29962,
13,
4706,
565,
1583,
29889,
9910,
29918,
4905,
29901,
13,
9651,
736,
518,
29916,
29962,
718,
714,
29879,
565,
1583,
29889,
2457,
29918,
4230,
1683,
714,
29879,
13,
4706,
25342,
1583,
29889,
700,
284,
29918,
4905,
29901,
13,
9651,
736,
921,
29892,
714,
29879,
13,
4706,
1683,
29901,
13,
9651,
736,
921,
13,
13,
13,
1990,
1459,
6553,
1168,
2764,
296,
29898,
15427,
16941,
2556,
1125,
13,
1678,
9995,
13,
1678,
319,
8617,
2556,
5639,
411,
2999,
10970,
322,
2323,
29914,
20787,
14391,
29889,
13,
1678,
3382,
2540,
674,
367,
8283,
297,
278,
1797,
896,
526,
2715,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
9685,
584,
938,
29892,
2322,
29871,
29896,
13,
4706,
450,
9685,
373,
607,
304,
16125,
403,
278,
14391,
29889,
13,
1678,
10366,
29918,
1853,
584,
851,
29892,
2322,
525,
1761,
29915,
13,
4706,
5167,
310,
5443,
2778,
3460,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
9685,
29922,
29896,
29892,
13,
462,
10366,
29918,
1853,
543,
1761,
29908,
1125,
13,
4706,
2428,
29898,
2177,
6553,
1168,
2764,
296,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
4974,
313,
14634,
29918,
1853,
338,
6213,
29897,
470,
313,
14634,
29918,
1853,
297,
6796,
1761,
613,
376,
4117,
613,
376,
1429,
613,
376,
2083,
20068,
13,
4706,
1583,
29889,
8990,
353,
9685,
13,
4706,
1583,
29889,
14634,
29918,
1853,
353,
10366,
29918,
1853,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
714,
353,
5159,
13,
4706,
363,
1024,
29892,
921,
29875,
297,
14319,
29898,
1311,
29889,
13148,
29918,
7039,
29892,
921,
1125,
13,
9651,
714,
29889,
4397,
29898,
1311,
29961,
978,
850,
5389,
876,
13,
4706,
565,
1583,
29889,
14634,
29918,
1853,
1275,
376,
1761,
1115,
13,
9651,
1209,
13,
4706,
25342,
1583,
29889,
14634,
29918,
1853,
1275,
376,
1429,
1115,
13,
9651,
714,
353,
383,
29889,
1429,
29898,
23583,
29898,
449,
511,
9685,
29922,
1311,
29889,
8990,
29897,
13,
4706,
25342,
1583,
29889,
14634,
29918,
1853,
1275,
376,
4117,
1115,
13,
9651,
714,
353,
383,
29889,
17685,
29898,
23583,
29898,
449,
511,
9685,
29922,
1311,
29889,
8990,
29897,
13,
4706,
25342,
1583,
29889,
14634,
29918,
1853,
1275,
376,
2083,
1115,
13,
9651,
714,
353,
383,
29889,
2083,
29898,
29943,
29889,
1429,
29898,
23583,
29898,
449,
511,
9685,
29922,
1311,
29889,
8990,
511,
1583,
29889,
8990,
29897,
13,
4706,
1683,
29901,
13,
9651,
12020,
2216,
1888,
2037,
287,
2392,
580,
13,
4706,
736,
714,
13,
13,
13,
1990,
360,
950,
2605,
2177,
6553,
1168,
2764,
296,
29898,
15427,
16941,
2556,
1125,
13,
1678,
9995,
13,
1678,
319,
8617,
2556,
5639,
411,
2999,
14581,
29899,
2084,
10970,
322,
2323,
29914,
20787,
14391,
29889,
13,
1678,
3382,
2540,
674,
367,
8283,
297,
278,
1797,
896,
526,
2715,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
9685,
584,
938,
29892,
2322,
29871,
29896,
13,
4706,
450,
9685,
373,
607,
304,
16125,
403,
278,
14391,
29889,
13,
1678,
10366,
29918,
1853,
584,
851,
29892,
2322,
525,
1761,
29915,
13,
4706,
5167,
310,
5443,
2778,
3460,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
9685,
29922,
29896,
29892,
13,
462,
10366,
29918,
1853,
543,
1761,
29908,
1125,
13,
4706,
2428,
29898,
29928,
950,
2605,
2177,
6553,
1168,
2764,
296,
29892,
1583,
467,
1649,
2344,
1649,
580,
13,
4706,
4974,
313,
14634,
29918,
1853,
338,
6213,
29897,
470,
313,
14634,
29918,
1853,
297,
6796,
1761,
613,
376,
4117,
613,
376,
1429,
613,
376,
2083,
20068,
13,
4706,
1583,
29889,
8990,
353,
9685,
13,
4706,
1583,
29889,
14634,
29918,
1853,
353,
10366,
29918,
1853,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
29896,
29892,
921,
29906,
1125,
13,
4706,
921,
29896,
29918,
449,
353,
5159,
13,
4706,
921,
29906,
29918,
449,
353,
5159,
13,
4706,
363,
1024,
29892,
921,
29896,
29875,
29892,
921,
29906,
29875,
297,
14319,
29898,
1311,
29889,
13148,
29918,
7039,
29892,
921,
29896,
29892,
921,
29906,
1125,
13,
9651,
343,
29896,
29875,
29892,
343,
29906,
29875,
353,
1583,
29961,
978,
850,
29916,
29896,
29875,
29892,
921,
29906,
29875,
29897,
13,
9651,
921,
29896,
29918,
449,
29889,
4397,
29898,
29891,
29896,
29875,
29897,
13,
9651,
921,
29906,
29918,
449,
29889,
4397,
29898,
29891,
29906,
29875,
29897,
13,
4706,
565,
1583,
29889,
14634,
29918,
1853,
1275,
376,
1761,
1115,
13,
9651,
1209,
13,
4706,
25342,
1583,
29889,
14634,
29918,
1853,
1275,
376,
1429,
1115,
13,
9651,
921,
29896,
29918,
449,
353,
383,
29889,
1429,
29898,
23583,
29898,
29916,
29896,
29918,
449,
511,
9685,
29922,
1311,
29889,
8990,
29897,
13,
9651,
921,
29906,
29918,
449,
353,
383,
29889,
1429,
29898,
23583,
29898,
29916,
29906,
29918,
449,
511,
9685,
29922,
1311,
29889,
8990,
29897,
13,
4706,
25342,
1583,
29889,
14634,
29918,
1853,
1275,
376,
4117,
1115,
13,
9651,
921,
29896,
29918,
449,
353,
383,
29889,
17685,
29898,
23583,
29898,
29916,
29896,
29918,
449,
511,
9685,
29922,
1311,
29889,
8990,
29897,
13,
9651,
921,
29906,
29918,
449,
353,
383,
29889,
17685,
29898,
23583,
29898,
29916,
29906,
29918,
449,
511,
9685,
29922,
1311,
29889,
8990,
29897,
13,
4706,
25342,
1583,
29889,
14634,
29918,
1853,
1275,
376,
2083,
1115,
13,
9651,
921,
29896,
29918,
449,
353,
383,
29889,
2083,
29898,
29943,
29889,
1429,
29898,
23583,
29898,
29916,
29896,
29918,
449,
511,
9685,
29922,
1311,
29889,
8990,
511,
1583,
29889,
8990,
29897,
13,
9651,
921,
29906,
29918,
449,
353,
383,
29889,
2083,
29898,
29943,
29889,
1429,
29898,
23583,
29898,
29916,
29906,
29918,
449,
511,
9685,
29922,
1311,
29889,
8990,
511,
1583,
29889,
8990,
29897,
13,
4706,
1683,
29901,
13,
9651,
12020,
2216,
1888,
2037,
287,
2392,
580,
13,
4706,
736,
921,
29896,
29918,
449,
29892,
921,
29906,
29918,
449,
13,
13,
13,
1990,
2379,
8606,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
12545,
1652,
8606,
2908,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
736,
921,
29889,
690,
14443,
29898,
29916,
29889,
12181,
29961,
29900,
1402,
448,
29896,
29897,
13,
13,
13,
1990,
23255,
415,
573,
12810,
29887,
11426,
29906,
29928,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
12545,
7744,
573,
6588,
11565,
292,
2908,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
736,
383,
29889,
12483,
482,
29918,
10109,
292,
29918,
29906,
29881,
29898,
29916,
29892,
413,
2311,
29922,
29916,
29889,
12181,
29961,
29906,
29901,
2314,
13,
13,
13,
1990,
5655,
21786,
362,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
21775,
362,
2908,
411,
758,
2576,
3821,
9853,
4226,
2133,
29889,
739,
29915,
29879,
1304,
491,
3528,
408,
278,
2186,
2908,
297,
4721,
1666,
6779,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
297,
29918,
305,
12629,
584,
938,
13,
4706,
9681,
310,
1881,
18196,
29889,
13,
1678,
289,
29876,
29918,
8961,
584,
5785,
29892,
2322,
29871,
29896,
29872,
29899,
29945,
13,
4706,
18285,
5785,
2715,
304,
20162,
297,
350,
905,
6056,
29889,
13,
1678,
26229,
584,
740,
470,
851,
470,
6213,
29892,
2322,
383,
29889,
2674,
29884,
13,
4706,
21775,
362,
740,
470,
1024,
310,
26229,
740,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
297,
29918,
305,
12629,
29892,
13,
462,
289,
29876,
29918,
8961,
29922,
29896,
29872,
29899,
29945,
29892,
13,
462,
26229,
7607,
2892,
29901,
383,
29889,
2674,
29884,
511,
13,
462,
3579,
19290,
1125,
13,
4706,
2428,
29898,
29940,
555,
21786,
362,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
411,
1583,
29889,
2344,
29918,
6078,
7295,
13,
9651,
1583,
29889,
11197,
353,
365,
29889,
23145,
19077,
2133,
29898,
13,
18884,
2159,
29922,
262,
29918,
305,
12629,
29892,
13,
18884,
321,
567,
29922,
11197,
29918,
8961,
29897,
13,
9651,
1583,
29889,
11236,
353,
679,
29918,
11236,
362,
29918,
13148,
29898,
11236,
362,
29897,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
921,
353,
1583,
29889,
11197,
29898,
29916,
29897,
13,
4706,
921,
353,
1583,
29889,
11236,
29898,
29916,
29897,
13,
4706,
736,
921,
13,
13,
13,
1990,
4124,
3733,
362,
7445,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
4124,
3733,
362,
2908,
29889,
13,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
6287,
29918,
19790,
584,
938,
13,
4706,
9683,
666,
4926,
363,
18652,
2159,
29889,
13,
1678,
714,
29918,
2311,
584,
18761,
310,
29871,
29906,
938,
29892,
2322,
6213,
13,
4706,
1706,
15238,
2159,
310,
278,
1962,
12489,
363,
278,
13181,
457,
279,
29694,
5858,
29889,
13,
1678,
701,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
24081,
981,
470,
1623,
11249,
29889,
13,
1678,
4464,
584,
851,
29892,
2322,
525,
18152,
457,
279,
29915,
13,
4706,
29068,
1304,
363,
24081,
314,
10335,
29889,
13,
1678,
7595,
29918,
29883,
1398,
414,
584,
6120,
29892,
2322,
5852,
13,
4706,
26460,
304,
7595,
278,
11155,
17036,
310,
278,
1881,
322,
1962,
25187,
943,
29889,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
6287,
29918,
19790,
29892,
13,
462,
714,
29918,
2311,
29922,
8516,
29892,
13,
462,
701,
29922,
5574,
29892,
13,
462,
4464,
543,
18152,
457,
279,
613,
13,
462,
7595,
29918,
29883,
1398,
414,
29922,
5574,
29892,
13,
462,
3579,
19290,
1125,
13,
4706,
2428,
29898,
4074,
3733,
362,
7445,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
4706,
1583,
29889,
7052,
29918,
19790,
353,
6287,
29918,
19790,
13,
4706,
1583,
29889,
449,
29918,
2311,
353,
714,
29918,
2311,
13,
4706,
1583,
29889,
786,
353,
701,
13,
4706,
1583,
29889,
8513,
353,
4464,
13,
4706,
1583,
29889,
2520,
29918,
29883,
1398,
414,
353,
7595,
29918,
29883,
1398,
414,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
29892,
2159,
29922,
8516,
1125,
13,
4706,
714,
29918,
2311,
353,
1583,
29889,
28667,
29918,
449,
29918,
2311,
29898,
29916,
29897,
565,
2159,
338,
6213,
1683,
2159,
13,
4706,
736,
383,
29889,
21476,
29918,
8346,
29898,
29916,
29892,
1962,
29918,
12181,
29922,
449,
29918,
2311,
29892,
4464,
29922,
1311,
29889,
8513,
29892,
7595,
29918,
29883,
1398,
414,
29922,
1311,
29889,
2520,
29918,
29883,
1398,
414,
29897,
13,
13,
1678,
822,
22235,
29918,
449,
29918,
2311,
29898,
1311,
29892,
921,
1125,
13,
4706,
565,
1583,
29889,
449,
29918,
2311,
338,
451,
6213,
29901,
13,
9651,
736,
1583,
29889,
449,
29918,
2311,
13,
4706,
565,
1583,
29889,
786,
29901,
13,
9651,
736,
18761,
29898,
29879,
334,
1583,
29889,
7052,
29918,
19790,
363,
269,
297,
921,
29889,
12181,
29961,
29906,
29901,
2314,
13,
4706,
1683,
29901,
13,
9651,
736,
18761,
29898,
29879,
849,
1583,
29889,
7052,
29918,
19790,
363,
269,
297,
921,
29889,
12181,
29961,
29906,
29901,
2314,
13,
13,
13,
1990,
940,
271,
1958,
7976,
6362,
7445,
29898,
14688,
1125,
13,
1678,
9995,
13,
1678,
940,
271,
1958,
7472,
1439,
3019,
2908,
313,
1454,
5199,
18593,
23248,
3414,
467,
13,
1678,
9995,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
3579,
19290,
1125,
13,
4706,
2428,
29898,
3868,
271,
1958,
7976,
6362,
7445,
29892,
1583,
467,
1649,
2344,
12035,
1068,
19290,
29897,
13,
13,
1678,
822,
4770,
4804,
12035,
1311,
29892,
921,
1125,
13,
4706,
12871,
1958,
353,
921,
13,
4706,
4608,
29918,
6229,
353,
29871,
29906,
13,
4706,
9853,
353,
12871,
1958,
29889,
12181,
29961,
29900,
29962,
13,
4706,
18196,
353,
12871,
1958,
29889,
12181,
29961,
29896,
29962,
13,
4706,
297,
29918,
2311,
353,
921,
29889,
12181,
29961,
29906,
17531,
13,
4706,
12871,
1958,
29918,
8111,
353,
383,
29889,
690,
14443,
29898,
354,
271,
1958,
29892,
8267,
7607,
16175,
29892,
18196,
29892,
448,
29896,
876,
13,
4706,
16285,
353,
383,
29889,
4384,
29898,
29943,
29889,
18837,
29918,
6229,
29879,
29898,
29943,
29889,
1191,
3317,
29898,
354,
271,
1958,
29918,
8111,
29892,
9685,
29922,
8111,
29918,
6229,
511,
9685,
29922,
8111,
29918,
6229,
511,
7442,
29889,
7411,
29941,
29906,
29897,
13,
4706,
19435,
353,
383,
29889,
3317,
29898,
354,
271,
1958,
29918,
8111,
29892,
9685,
29922,
8111,
29918,
6229,
29892,
3013,
6229,
29879,
29922,
5574,
29897,
13,
4706,
19435,
29918,
13168,
353,
313,
1557,
2361,
29889,
2378,
1405,
29871,
29900,
29889,
29900,
467,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
29897,
13,
4706,
282,
1372,
29918,
29916,
353,
313,
513,
1575,
29889,
2378,
1273,
297,
29918,
2311,
29961,
29896,
2314,
334,
19435,
29918,
13168,
13,
4706,
282,
1372,
29918,
29891,
353,
313,
513,
1575,
29889,
2378,
849,
297,
29918,
2311,
29961,
29896,
2314,
334,
19435,
29918,
13168,
13,
4706,
282,
1372,
353,
383,
29889,
17685,
3552,
16485,
29918,
29916,
29892,
282,
1372,
29918,
29891,
29892,
19435,
511,
9685,
29922,
8111,
29918,
6229,
467,
2378,
13,
4706,
363,
289,
297,
3464,
29898,
16175,
1125,
13,
9651,
363,
413,
297,
3464,
29898,
305,
12629,
1125,
13,
18884,
298,
29885,
353,
12871,
1958,
29961,
29890,
29892,
413,
29892,
584,
29892,
584,
1822,
2378,
13,
18884,
282,
29916,
353,
938,
29898,
16485,
29918,
29916,
29961,
29890,
29892,
413,
2314,
13,
18884,
11451,
353,
938,
29898,
16485,
29918,
29891,
29961,
29890,
29892,
413,
2314,
13,
18884,
565,
313,
29900,
529,
282,
29916,
529,
297,
29918,
2311,
29961,
29896,
29962,
448,
29871,
29896,
29897,
322,
313,
29900,
529,
11451,
529,
297,
29918,
2311,
29961,
29900,
29962,
448,
29871,
29896,
1125,
13,
462,
1678,
282,
1372,
29961,
29890,
29892,
413,
29892,
29871,
29900,
29962,
4619,
7442,
29889,
4530,
29898,
7184,
29961,
2272,
29892,
282,
29916,
718,
29871,
29896,
29962,
448,
298,
29885,
29961,
2272,
29892,
282,
29916,
448,
29871,
29896,
2314,
334,
29871,
29900,
29889,
29906,
29945,
13,
462,
1678,
282,
1372,
29961,
29890,
29892,
413,
29892,
29871,
29896,
29962,
4619,
7442,
29889,
4530,
29898,
7184,
29961,
2272,
718,
29871,
29896,
29892,
282,
29916,
29962,
448,
298,
29885,
29961,
2272,
448,
29871,
29896,
29892,
282,
29916,
2314,
334,
29871,
29900,
29889,
29906,
29945,
13,
4706,
736,
282,
1372,
13,
2
] |
dasem/data.py | fronovics/AI_playground | 18 | 63033 | <reponame>fronovics/AI_playground
"""Data.
Functions to read datasets from the data subdirectory.
"""
from os.path import join, split
from pandas import read_csv
def four_words():
"""Read and return four words odd-one-out dataset.
Returns
-------
>>> df = four_words()
>>> df.ix[0, 'word4'] == 'stol'
True
"""
filename = join(split(__file__)[0], 'data', 'four_words.csv')
df = read_csv(filename, encoding='utf-8')
return df
def verbal_analogies():
"""Read and return verbal analogies dataset.
Returns
-------
df : pandas.DataFrame
Dataframe with verbal analogies.
Examples
--------
>>> df = verbal_analogies()
>>> df.ix[0, :].tolist() == ['mand', 'kvinde', 'dreng', 'pige']
True
"""
filename = join(split(__file__)[0], 'data', 'verbal_analogies.csv')
df = read_csv(filename, encoding='utf-8')
return df
def wordsim353(include_problems=False):
"""Read and return wordsim353 dataset.
Parameters
----------
include_problems : bool, optional
Indicator for whether rows with problematic translations
between Danish and English should be returned [default: False].
Returns
-------
df : pandas.DataFrame
Dataframe with Danish wordsim353 data.
Examples
--------
>>> df = wordsim353(include_problems=True)
>>> df.shape
(353, 6)
References
----------
The WordSimilarity-353 Test Collection,
http://www.cs.technion.ac.il/~gabr/resources/data/wordsim353/
"""
filename = join(split(__file__)[0], 'data', 'wordsim353-da',
'combined.csv')
df = read_csv(filename, encoding='utf-8')
if not include_problems:
df = df[df.Problem != 1]
return df
| [
1,
529,
276,
1112,
420,
29958,
1341,
265,
586,
1199,
29914,
23869,
29918,
1456,
2057,
13,
15945,
29908,
1469,
29889,
13,
13,
6678,
29879,
304,
1303,
20035,
515,
278,
848,
1014,
12322,
29889,
13,
13,
15945,
29908,
13,
13,
3166,
2897,
29889,
2084,
1053,
5988,
29892,
6219,
13,
13,
3166,
11701,
1053,
1303,
29918,
7638,
13,
13,
13,
1753,
3023,
29918,
9303,
7295,
13,
1678,
9995,
6359,
322,
736,
3023,
3838,
7736,
29899,
650,
29899,
449,
8783,
29889,
13,
13,
1678,
16969,
13,
1678,
448,
22158,
13,
1678,
8653,
4489,
353,
3023,
29918,
9303,
580,
13,
1678,
8653,
4489,
29889,
861,
29961,
29900,
29892,
525,
1742,
29946,
2033,
1275,
525,
303,
324,
29915,
13,
1678,
5852,
13,
13,
1678,
9995,
13,
1678,
10422,
353,
5988,
29898,
5451,
22168,
1445,
1649,
9601,
29900,
1402,
525,
1272,
742,
525,
17823,
29918,
9303,
29889,
7638,
1495,
13,
1678,
4489,
353,
1303,
29918,
7638,
29898,
9507,
29892,
8025,
2433,
9420,
29899,
29947,
1495,
13,
1678,
736,
4489,
13,
13,
13,
1753,
1147,
5521,
29918,
7054,
468,
583,
7295,
13,
1678,
9995,
6359,
322,
736,
1147,
5521,
15690,
583,
8783,
29889,
13,
13,
1678,
16969,
13,
1678,
448,
22158,
13,
1678,
4489,
584,
11701,
29889,
17271,
13,
4706,
3630,
2557,
411,
1147,
5521,
15690,
583,
29889,
13,
13,
1678,
1222,
9422,
13,
1678,
448,
26589,
13,
1678,
8653,
4489,
353,
1147,
5521,
29918,
7054,
468,
583,
580,
13,
1678,
8653,
4489,
29889,
861,
29961,
29900,
29892,
584,
1822,
25027,
391,
580,
1275,
6024,
29885,
392,
742,
525,
29895,
3845,
311,
742,
525,
7707,
996,
742,
525,
29886,
2231,
2033,
13,
1678,
5852,
13,
13,
1678,
9995,
13,
1678,
10422,
353,
5988,
29898,
5451,
22168,
1445,
1649,
9601,
29900,
1402,
525,
1272,
742,
525,
369,
5521,
29918,
7054,
468,
583,
29889,
7638,
1495,
13,
1678,
4489,
353,
1303,
29918,
7638,
29898,
9507,
29892,
8025,
2433,
9420,
29899,
29947,
1495,
13,
1678,
736,
4489,
13,
13,
13,
1753,
1734,
3601,
29941,
29945,
29941,
29898,
2856,
29918,
17199,
29879,
29922,
8824,
1125,
13,
1678,
9995,
6359,
322,
736,
1734,
3601,
29941,
29945,
29941,
8783,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
3160,
29918,
17199,
29879,
584,
6120,
29892,
13136,
13,
4706,
1894,
20485,
363,
3692,
4206,
411,
1108,
2454,
5578,
800,
13,
4706,
1546,
3951,
728,
322,
4223,
881,
367,
4133,
518,
4381,
29901,
7700,
1822,
13,
13,
1678,
16969,
13,
1678,
448,
22158,
13,
1678,
4489,
584,
11701,
29889,
17271,
13,
4706,
3630,
2557,
411,
3951,
728,
1734,
3601,
29941,
29945,
29941,
848,
29889,
13,
13,
1678,
1222,
9422,
13,
1678,
448,
26589,
13,
1678,
8653,
4489,
353,
1734,
3601,
29941,
29945,
29941,
29898,
2856,
29918,
17199,
29879,
29922,
5574,
29897,
13,
1678,
8653,
4489,
29889,
12181,
13,
1678,
313,
29941,
29945,
29941,
29892,
29871,
29953,
29897,
13,
13,
1678,
28318,
13,
1678,
448,
1378,
29899,
13,
1678,
450,
10803,
8942,
2327,
537,
29899,
29941,
29945,
29941,
4321,
14348,
29892,
13,
1678,
1732,
597,
1636,
29889,
2395,
29889,
21695,
291,
29889,
562,
29889,
309,
24629,
29887,
370,
29878,
29914,
13237,
29914,
1272,
29914,
1742,
3601,
29941,
29945,
29941,
29914,
13,
13,
1678,
9995,
13,
1678,
10422,
353,
5988,
29898,
5451,
22168,
1445,
1649,
9601,
29900,
1402,
525,
1272,
742,
525,
1742,
3601,
29941,
29945,
29941,
29899,
1388,
742,
13,
462,
1678,
525,
17743,
1312,
29889,
7638,
1495,
13,
1678,
4489,
353,
1303,
29918,
7638,
29898,
9507,
29892,
8025,
2433,
9420,
29899,
29947,
1495,
13,
13,
1678,
565,
451,
3160,
29918,
17199,
29879,
29901,
13,
4706,
4489,
353,
4489,
29961,
2176,
29889,
26604,
2804,
29871,
29896,
29962,
13,
13,
1678,
736,
4489,
13,
2
] |
src/graphics/font.py | JacobLondon/pyngine | 0 | 107910 | import pygame
class Font(object):
"""@brief Hold a set of fonts and allow for user defined fonts.
"""
def __init__(self, font, scale):
pygame.font.init()
# details about the font created
self.name = font
# scale is the ratio of screen width / number of grids wide the screen is
self.scale = scale
# make a set of font point sizes for built in components to use
self.set = {}
# default fonts
self.set['small'] = self.named_font(10)
self.set['standard'] = self.named_font(20)
self.set['large'] = self.named_font(40)
def __setitem__(self, key, val):
"""@brief Add user defined fonts.
"""
self.set[key] = val
def __getitem__(self, key):
"""@brief Get set fonts.
"""
return self.set[key]
def named_font(self, point):
"""@brief Create a font from the specified name.
"""
return Font.create(self.name, point * self.scale)
@staticmethod
def create(font_name, point):
"""@brief Simplify creating a font.
"""
return pygame.font.SysFont(font_name, int(point))
| [
1,
1053,
22028,
13,
13,
1990,
10928,
29898,
3318,
1125,
13,
1678,
9995,
29992,
1182,
2575,
21771,
263,
731,
310,
23849,
322,
2758,
363,
1404,
3342,
23849,
29889,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4079,
29892,
6287,
1125,
13,
13,
4706,
22028,
29889,
5657,
29889,
2344,
580,
13,
13,
4706,
396,
4902,
1048,
278,
4079,
2825,
13,
4706,
1583,
29889,
978,
353,
4079,
13,
4706,
396,
6287,
338,
278,
11959,
310,
4315,
2920,
847,
1353,
310,
867,
4841,
9377,
278,
4315,
338,
13,
4706,
1583,
29889,
7052,
353,
6287,
13,
13,
4706,
396,
1207,
263,
731,
310,
4079,
1298,
15786,
363,
4240,
297,
7117,
304,
671,
13,
4706,
1583,
29889,
842,
353,
6571,
13,
4706,
396,
2322,
23849,
13,
4706,
1583,
29889,
842,
1839,
9278,
2033,
353,
1583,
29889,
17514,
29918,
5657,
29898,
29896,
29900,
29897,
13,
4706,
1583,
29889,
842,
1839,
15770,
2033,
353,
1583,
29889,
17514,
29918,
5657,
29898,
29906,
29900,
29897,
13,
4706,
1583,
29889,
842,
1839,
16961,
2033,
353,
1583,
29889,
17514,
29918,
5657,
29898,
29946,
29900,
29897,
13,
13,
1678,
822,
4770,
842,
667,
12035,
1311,
29892,
1820,
29892,
659,
1125,
13,
4706,
9995,
29992,
1182,
2575,
3462,
1404,
3342,
23849,
29889,
13,
4706,
9995,
13,
4706,
1583,
29889,
842,
29961,
1989,
29962,
353,
659,
13,
13,
1678,
822,
4770,
657,
667,
12035,
1311,
29892,
1820,
1125,
13,
4706,
9995,
29992,
1182,
2575,
3617,
731,
23849,
29889,
13,
4706,
9995,
13,
4706,
736,
1583,
29889,
842,
29961,
1989,
29962,
13,
13,
1678,
822,
4257,
29918,
5657,
29898,
1311,
29892,
1298,
1125,
13,
4706,
9995,
29992,
1182,
2575,
6204,
263,
4079,
515,
278,
6790,
1024,
29889,
13,
4706,
9995,
13,
4706,
736,
10928,
29889,
3258,
29898,
1311,
29889,
978,
29892,
1298,
334,
1583,
29889,
7052,
29897,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
1653,
29898,
5657,
29918,
978,
29892,
1298,
1125,
13,
4706,
9995,
29992,
1182,
2575,
3439,
572,
1598,
4969,
263,
4079,
29889,
13,
4706,
9995,
13,
4706,
736,
22028,
29889,
5657,
29889,
29903,
952,
9824,
29898,
5657,
29918,
978,
29892,
938,
29898,
3149,
876,
13,
2
] |
pinochle/Game.py | Atrus619/DeckOfCards | 1 | 23219 | <reponame>Atrus619/DeckOfCards
from pinochle.State import State
from classes.Deck import Deck
from classes.Hand import Hand
from pinochle.MeldUtil import MeldUtil
from pinochle.Meld import Meld
from pinochle.Trick import Trick
from pinochle.MeldTuple import MeldTuple
from util.Constants import Constants as cs
from util.util import print_divider
from copy import deepcopy
import random
import numpy as np
import util.state_logger as sl
import logging
from config import Config as cfg
import pinochle.card_util as cu
import time
import pandas as pd
from util.Vectors import Vectors as vs
logging.basicConfig(format='%(levelname)s:%(message)s', level=cfg.logging_level)
# pinochle rules: https://www.pagat.com/marriage/pin2hand.html
class Game:
def __init__(self, name, players, run_id="42069", current_cycle=None, human_test=False, config=cfg):
# Setting run_id = None results in no records being saved to database
self.run_id = run_id
self.name = name.upper()
self.players = players # This is a list
self.number_of_players = len(self.players)
self.dealer = players[0]
self.trump_card = None
self.trump = None
self.priority = random.randint(0, 1)
self.meld_util = None
self.current_cycle = current_cycle # To determine the current value of epsilon
self.human_test = human_test
self.config = config
self.exp_df = pd.DataFrame(columns=['agent_id', 'opponent_id', 'run_id', 'vector', 'action', 'next_vector',
'reward', 'meld_action'])
self.last_meld_state = None
if self.name == cs.PINOCHLE:
self.deck = Deck("pinochle")
else:
self.deck = Deck()
self.hands = {}
self.melds = {}
self.scores = {}
self.meldedCards = {}
self.discard_pile = Hand()
self.player_inter_trick_history = {} # One entry per player, each entry is a tuple containing (prior_state, row_id entry in initial db update)
for player in self.players:
self.hands[player] = Hand()
self.melds[player] = Meld()
self.scores[player] = [0]
self.meldedCards[player] = {}
def create_state(self, played_card=None):
return State(self, played_card)
def deal(self):
for i in range(12):
for player in self.players:
self.hands[player].add_cards(self.deck.pull_top_cards(1))
self.trump_card = self.deck.pull_top_cards(1)[0]
self.trump = self.trump_card.suit
self.meld_util = MeldUtil(self.trump)
# Expected card input: VALUE,SUIT. Example: Hindex
# H = hand, M = meld
def collect_trick_cards(self, player, state):
if type(player).__name__ == 'Human':
trick_input = player.get_action(state, msg=player.name + " select card for trick:")
else: # Bot
if self.human_test:
logging.debug("Model hand before action:")
state.convert_to_human_readable_format(player)
trick_index, meld_index = player.get_action(state, self, current_cycle=self.current_cycle, is_trick=True)
trick_input, _ = player.convert_model_output(trick_index=trick_index, meld_index=meld_index, game=self, is_trick=True)
source = trick_input[0]
index = int(trick_input[1:])
if source == "H":
card_input = self.hands[player].cards[index]
card = self.hands[player].pull_card(card_input)
elif source == "M":
mt = self.melds[player].pull_melded_card(self.melds[player].melded_cards[index])
card = mt.card
print_divider()
logging.debug("Player " + player.name + " plays: " + str(card)) # TODO: Fix this later (possible NULL)
return card
def collect_meld_cards(self, player, state, limit=12):
"""
Collecting cards for meld scoring from player who won trick
:param player: Player we are collecting from
:param state: Current state of game
:param limit: Maximum number of cards that can be collected
:return: list of MeldTuples and whether the interaction was valid (boolean)
"""
first_hand_card = True
valid = True
original_hand_cards = deepcopy(self.hands[player])
original_meld_cards = deepcopy(self.melds[player])
collected_hand_cards = []
collected_meld_cards = []
score = 0
meld_class = None
combo_name = None
if type(player).__name__ == 'Human':
while len(collected_hand_cards) + len(collected_meld_cards) < limit:
if first_hand_card:
print_divider()
logging.debug("For meld please select first card from hand.")
user_input = player.get_action(state, msg=player.name + " select card, type 'Y' to exit:")
if user_input == 'Y':
break
source = user_input[0]
index = int(user_input[1:])
if first_hand_card:
if source != "H":
print_divider()
logging.debug("In case of meld, please select first card from hand.")
continue
first_hand_card = False
if source == "H":
card_input = self.hands[player].cards[index]
card = self.hands[player].pull_card(card_input)
collected_hand_cards.append(card)
elif source == "M":
mt = self.melds[player].pull_melded_card(self.melds[player].melded_cards[index])
collected_meld_cards.append(mt)
# Combine collected hand and meld card lists for score calculation
collected_cards = collected_hand_cards + [mt.card for mt in collected_meld_cards]
if len(collected_cards) > 0:
score, meld_class, combo_name = self.meld_util.calculate_score(collected_cards)
if score == 0:
valid = False
else:
for mt in collected_meld_cards:
original_meld_class = mt.meld_class
if original_meld_class == meld_class:
original_meld_score = mt.score
if original_meld_score <= score:
valid = False
break
if not valid:
self.hands[player] = original_hand_cards
self.melds[player] = original_meld_cards
else: # Bot
valid = True
trick_action, meld_action = player.get_action(state, self, current_cycle=self.current_cycle, is_trick=False)
if meld_action == vs.MELD_COMBINATIONS_ONE_HOT_VECTOR.__len__():
# model chose to pass melding
return [], valid
score, meld_class, combo_name, collected_cards = \
player.convert_model_output(trick_index=trick_action, meld_index=meld_action, game=self, is_trick=False)
return [MeldTuple(card, combo_name, meld_class, score) for card in collected_cards], valid
def play_trick(self):
"""
priority: 0 or 1 for index in player list
:return: index of winner (priority for next trick)
"""
print_divider()
logging.debug(f'Phase 1\tTrick #{12 - len(self.deck)//2}\t{len(self.deck)} card{"s" if len(self.deck) > 1 else ""} remaining in deck')
trick_start_state = self.create_state()
trick = Trick(self.players, self.trump)
# Determine which player goes first based on priority arg
""" !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# TRICK PLAYER LIST IS NOT ALWAYS THE SAME AS THE GAME PLAYER LIST
# THEY COULD BE IN DIFFERENT ORDER
"""
player_order = list(self.players)
player_1 = player_order.pop(self.priority)
player_2 = player_order[0]
trick_player_list = [player_1, player_2]
# Collect card for trick from each player based on order
card_1 = self.collect_trick_cards(player_1, trick_start_state) # Collect card from first player based on priority
if self.human_test:
time.sleep(cfg.human_test_pause_length)
# Recording the first card that was played
first_move_state = self.create_state(card_1)
if self.human_test and 'get_Qs' in dir(self.players[0].model):
print_divider()
bot_state = trick_start_state if self.players[0] == player_1 else first_move_state
human_state = trick_start_state if self.players[1] == player_1 else first_move_state
logging.debug(self.players[0].model.get_Qs(player=self.players[0], player_state=bot_state, opponent=self.players[1], opponent_state=human_state))
if self.players[0] in self.player_inter_trick_history and self.run_id is not None: # Don't update on first trick of game
p1_update_dict = {'player': player_1, 'state_1': self.player_inter_trick_history[player_1][0],
'state_2': trick_start_state, 'row_id': self.player_inter_trick_history[player_1][1]}
p2_update_dict = {'player': player_2, 'state_1': self.player_inter_trick_history[player_2][0],
'state_2': first_move_state, 'row_id': self.player_inter_trick_history[player_2][1]}
self.exp_df = sl.update_state(df=self.exp_df, p1=p1_update_dict, p2=p2_update_dict, win_reward=self.config.win_reward)
card_2 = self.collect_trick_cards(player_2, first_move_state) # Collect card from second player based on priority
if self.human_test:
time.sleep(cfg.human_test_pause_length)
print_divider()
logging.debug("LETS GET READY TO RUMBLE!!!!!!!!!!!!!!!!!!!!!!!")
logging.debug("Card 1: " + str(card_1))
logging.debug("Card 2: " + str(card_2))
if self.human_test:
time.sleep(cfg.human_test_pause_length)
# Determine winner of trick based on collected cards
result = cu.compare_cards(self.trump, card_1, card_2)
print_divider()
logging.debug("VICTOR : " + str(player_1.name if result == 0 else player_2.name))
if self.human_test:
time.sleep(cfg.human_test_pause_length)
# Separate winner and loser for scoring, melding, and next hand
winner = trick_player_list.pop(result)
loser = trick_player_list[0]
# Winner draws a card from the stock, followed by the loser drawing a card from the stock
# TODO: Come back here and allow winner to choose when down to last 2 cards (optional af)
self.hands[winner].add_cards(self.deck.pull_top_cards(1))
if len(self.deck) == 0:
self.hands[loser].add_cards(self.trump_card)
else:
self.hands[loser].add_cards(self.deck.pull_top_cards(1))
# Winner can now meld if they so choose
print_divider()
logging.debug(winner.name + " select cards for meld:")
# Verify that meld is valid. If meld is invalid, force the user to retry.
self.last_meld_state = self.create_state()
mt_list = []
# no melding in this version
while 1:
mt_list, valid = self.collect_meld_cards(winner, self.last_meld_state)
if valid:
break
else:
print_divider()
logging.debug("Invalid combination submitted, please try again.")
# Update scores
if len(mt_list) == 0: # No cards melded, so score is 0
meld_score = 0
else:
meld_score = mt_list[0].score # Score is the same for all MeldTuples in mt_list
trick_score = trick.calculate_trick_score(card_1, card_2)
total_score = meld_score + trick_score
self.discard_pile.add_cards([card_1, card_2])
# log states and actions, player order = TRICK ORDER
if self.run_id is not None:
p1_dict = {'player': player_1, 'state': trick_start_state, 'card': card_1}
p2_dict = {'player': player_2, 'state': first_move_state, 'card': card_2}
meld_dict = {'player': winner, 'meld': mt_list}
self.exp_df, self.player_inter_trick_history = \
sl.log_state(df=self.exp_df, p1=p1_dict, p2=p2_dict, meld=meld_dict,
run_id=self.run_id, history=self.player_inter_trick_history)
self.scores[winner].append(self.scores[winner][-1] + total_score)
self.scores[loser].append(self.scores[loser][-1])
# Update winner's meld
for mt in mt_list:
self.melds[winner].add_melded_card(mt)
# set new priority
self.priority = self.players.index(winner)
def play(self):
while len(self.deck) > 0:
self.play_trick()
final_scores = [self.scores[player][-1] for player in self.players]
winner_index = np.argmax(final_scores)
if self.run_id is not None:
# GAME ORDER (because it doesn't matter here)
end_game_state = self.create_state()
p1_update_dict = {'player': self.players[0], 'state_1': self.player_inter_trick_history[self.players[0]][0], 'state_2': end_game_state,
'row_id': self.player_inter_trick_history[self.players[0]][1]}
p2_update_dict = {'player': self.players[1], 'state_1': self.player_inter_trick_history[self.players[1]][0], 'state_2': end_game_state,
'row_id': self.player_inter_trick_history[self.players[1]][1]}
self.exp_df = sl.update_state(df=self.exp_df, p1=p1_update_dict, p2=p2_update_dict, winner=self.players[winner_index], win_reward=self.config.win_reward,
final_trick_winner=self.players[self.priority])
self.exp_df = sl.log_final_meld(df=self.exp_df, meld_state=self.last_meld_state, history=self.player_inter_trick_history,
final_trick_winner=self.players[self.priority], end_game_state=end_game_state, run_id=self.run_id,
winner=self.players[winner_index], win_reward=self.config.win_reward)
print_divider()
logging.debug("Winner: " + str(self.players[winner_index]) + "\tScore: " + str(final_scores[winner_index]))
logging.debug(
"Loser: " + str(self.players[1 - winner_index]) + "\tScore: " + str(final_scores[1 - winner_index]))
return winner_index, None if self.run_id is None else self.exp_df
| [
1,
529,
276,
1112,
420,
29958,
29909,
509,
375,
29953,
29896,
29929,
29914,
2772,
384,
2776,
29907,
3163,
13,
3166,
282,
1789,
305,
280,
29889,
2792,
1053,
4306,
13,
3166,
4413,
29889,
2772,
384,
1053,
897,
384,
13,
3166,
4413,
29889,
3481,
1053,
5166,
13,
3166,
282,
1789,
305,
280,
29889,
29924,
2495,
7270,
1053,
341,
2495,
7270,
13,
3166,
282,
1789,
305,
280,
29889,
29924,
2495,
1053,
341,
2495,
13,
3166,
282,
1789,
305,
280,
29889,
2308,
860,
1053,
1605,
860,
13,
3166,
282,
1789,
305,
280,
29889,
29924,
2495,
23215,
552,
1053,
341,
2495,
23215,
552,
13,
3166,
3667,
29889,
26570,
1053,
5798,
1934,
408,
5939,
13,
3166,
3667,
29889,
4422,
1053,
1596,
29918,
4563,
1241,
13,
3166,
3509,
1053,
6483,
8552,
13,
5215,
4036,
13,
5215,
12655,
408,
7442,
13,
5215,
3667,
29889,
3859,
29918,
21707,
408,
2243,
13,
5215,
12183,
13,
3166,
2295,
1053,
12782,
408,
274,
16434,
13,
5215,
282,
1789,
305,
280,
29889,
7543,
29918,
4422,
408,
2723,
13,
5215,
931,
13,
5215,
11701,
408,
10518,
13,
3166,
3667,
29889,
29963,
11142,
1053,
478,
11142,
408,
7186,
13,
13,
21027,
29889,
16121,
3991,
29898,
4830,
2433,
29995,
29898,
5563,
978,
29897,
29879,
16664,
29898,
4906,
29897,
29879,
742,
3233,
29922,
16859,
29889,
21027,
29918,
5563,
29897,
13,
13,
13,
29937,
282,
1789,
305,
280,
6865,
29901,
2045,
597,
1636,
29889,
13573,
271,
29889,
510,
29914,
3034,
9081,
29914,
12687,
29906,
3179,
29889,
1420,
13,
1990,
8448,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
29892,
10769,
29892,
1065,
29918,
333,
543,
29946,
29906,
29900,
29953,
29929,
613,
1857,
29918,
23090,
29922,
8516,
29892,
5199,
29918,
1688,
29922,
8824,
29892,
2295,
29922,
16859,
1125,
13,
4706,
396,
21605,
1065,
29918,
333,
353,
6213,
2582,
297,
694,
6475,
1641,
7160,
304,
2566,
13,
4706,
1583,
29889,
3389,
29918,
333,
353,
1065,
29918,
333,
13,
4706,
1583,
29889,
978,
353,
1024,
29889,
21064,
580,
13,
4706,
1583,
29889,
1456,
414,
353,
10769,
29871,
396,
910,
338,
263,
1051,
13,
4706,
1583,
29889,
4537,
29918,
974,
29918,
1456,
414,
353,
7431,
29898,
1311,
29889,
1456,
414,
29897,
13,
4706,
1583,
29889,
311,
18362,
353,
10769,
29961,
29900,
29962,
13,
4706,
1583,
29889,
509,
3427,
29918,
7543,
353,
6213,
13,
4706,
1583,
29889,
509,
3427,
353,
6213,
13,
4706,
1583,
29889,
29886,
21766,
353,
4036,
29889,
9502,
524,
29898,
29900,
29892,
29871,
29896,
29897,
13,
4706,
1583,
29889,
29885,
2495,
29918,
4422,
353,
6213,
13,
4706,
1583,
29889,
3784,
29918,
23090,
353,
1857,
29918,
23090,
29871,
396,
1763,
8161,
278,
1857,
995,
310,
321,
3232,
13,
4706,
1583,
29889,
26029,
29918,
1688,
353,
5199,
29918,
1688,
13,
4706,
1583,
29889,
2917,
353,
2295,
13,
4706,
1583,
29889,
4548,
29918,
2176,
353,
10518,
29889,
17271,
29898,
13099,
29922,
1839,
14748,
29918,
333,
742,
525,
9354,
265,
296,
29918,
333,
742,
525,
3389,
29918,
333,
742,
525,
8111,
742,
525,
2467,
742,
525,
4622,
29918,
8111,
742,
13,
462,
462,
9651,
525,
276,
1328,
742,
525,
29885,
2495,
29918,
2467,
11287,
13,
4706,
1583,
29889,
4230,
29918,
29885,
2495,
29918,
3859,
353,
6213,
13,
13,
4706,
565,
1583,
29889,
978,
1275,
5939,
29889,
29925,
1177,
29949,
3210,
1307,
29901,
13,
9651,
1583,
29889,
16565,
353,
897,
384,
703,
29886,
1789,
305,
280,
1159,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
16565,
353,
897,
384,
580,
13,
13,
4706,
1583,
29889,
3179,
29879,
353,
6571,
13,
4706,
1583,
29889,
29885,
2495,
29879,
353,
6571,
13,
4706,
1583,
29889,
1557,
2361,
353,
6571,
13,
4706,
1583,
29889,
29885,
2495,
287,
29907,
3163,
353,
6571,
13,
4706,
1583,
29889,
2218,
7543,
29918,
29886,
488,
353,
5166,
580,
13,
13,
4706,
1583,
29889,
9106,
29918,
1639,
29918,
509,
860,
29918,
18434,
353,
6571,
29871,
396,
3118,
6251,
639,
4847,
29892,
1269,
6251,
338,
263,
18761,
6943,
313,
29886,
13479,
29918,
3859,
29892,
1948,
29918,
333,
6251,
297,
2847,
4833,
2767,
29897,
13,
13,
4706,
363,
4847,
297,
1583,
29889,
1456,
414,
29901,
13,
9651,
1583,
29889,
3179,
29879,
29961,
9106,
29962,
353,
5166,
580,
13,
9651,
1583,
29889,
29885,
2495,
29879,
29961,
9106,
29962,
353,
341,
2495,
580,
13,
9651,
1583,
29889,
1557,
2361,
29961,
9106,
29962,
353,
518,
29900,
29962,
13,
9651,
1583,
29889,
29885,
2495,
287,
29907,
3163,
29961,
9106,
29962,
353,
6571,
13,
13,
1678,
822,
1653,
29918,
3859,
29898,
1311,
29892,
5318,
29918,
7543,
29922,
8516,
1125,
13,
4706,
736,
4306,
29898,
1311,
29892,
5318,
29918,
7543,
29897,
13,
13,
1678,
822,
5376,
29898,
1311,
1125,
13,
4706,
363,
474,
297,
3464,
29898,
29896,
29906,
1125,
13,
9651,
363,
4847,
297,
1583,
29889,
1456,
414,
29901,
13,
18884,
1583,
29889,
3179,
29879,
29961,
9106,
1822,
1202,
29918,
28160,
29898,
1311,
29889,
16565,
29889,
26746,
29918,
3332,
29918,
28160,
29898,
29896,
876,
13,
13,
4706,
1583,
29889,
509,
3427,
29918,
7543,
353,
1583,
29889,
16565,
29889,
26746,
29918,
3332,
29918,
28160,
29898,
29896,
9601,
29900,
29962,
13,
4706,
1583,
29889,
509,
3427,
353,
1583,
29889,
509,
3427,
29918,
7543,
29889,
29658,
13,
4706,
1583,
29889,
29885,
2495,
29918,
4422,
353,
341,
2495,
7270,
29898,
1311,
29889,
509,
3427,
29897,
13,
13,
1678,
396,
1222,
6021,
5881,
1881,
29901,
12599,
4462,
29892,
14605,
1806,
29889,
8741,
29901,
379,
2248,
13,
1678,
396,
379,
353,
1361,
29892,
341,
353,
286,
2495,
13,
1678,
822,
6314,
29918,
509,
860,
29918,
28160,
29898,
1311,
29892,
4847,
29892,
2106,
1125,
13,
4706,
565,
1134,
29898,
9106,
467,
1649,
978,
1649,
1275,
525,
29950,
7889,
2396,
13,
9651,
8938,
29918,
2080,
353,
4847,
29889,
657,
29918,
2467,
29898,
3859,
29892,
10191,
29922,
9106,
29889,
978,
718,
376,
1831,
5881,
363,
8938,
29901,
1159,
13,
4706,
1683,
29901,
29871,
396,
11273,
13,
9651,
565,
1583,
29889,
26029,
29918,
1688,
29901,
13,
18884,
12183,
29889,
8382,
703,
3195,
1361,
1434,
3158,
29901,
1159,
13,
18884,
2106,
29889,
13441,
29918,
517,
29918,
26029,
29918,
949,
519,
29918,
4830,
29898,
9106,
29897,
13,
13,
9651,
8938,
29918,
2248,
29892,
286,
2495,
29918,
2248,
353,
4847,
29889,
657,
29918,
2467,
29898,
3859,
29892,
1583,
29892,
1857,
29918,
23090,
29922,
1311,
29889,
3784,
29918,
23090,
29892,
338,
29918,
509,
860,
29922,
5574,
29897,
13,
9651,
8938,
29918,
2080,
29892,
903,
353,
4847,
29889,
13441,
29918,
4299,
29918,
4905,
29898,
509,
860,
29918,
2248,
29922,
509,
860,
29918,
2248,
29892,
286,
2495,
29918,
2248,
29922,
29885,
2495,
29918,
2248,
29892,
3748,
29922,
1311,
29892,
338,
29918,
509,
860,
29922,
5574,
29897,
13,
4706,
2752,
353,
8938,
29918,
2080,
29961,
29900,
29962,
13,
4706,
2380,
353,
938,
29898,
509,
860,
29918,
2080,
29961,
29896,
29901,
2314,
13,
13,
4706,
565,
2752,
1275,
376,
29950,
1115,
13,
9651,
5881,
29918,
2080,
353,
1583,
29889,
3179,
29879,
29961,
9106,
1822,
28160,
29961,
2248,
29962,
13,
9651,
5881,
353,
1583,
29889,
3179,
29879,
29961,
9106,
1822,
26746,
29918,
7543,
29898,
7543,
29918,
2080,
29897,
13,
4706,
25342,
2752,
1275,
376,
29924,
1115,
13,
9651,
286,
29873,
353,
1583,
29889,
29885,
2495,
29879,
29961,
9106,
1822,
26746,
29918,
29885,
2495,
287,
29918,
7543,
29898,
1311,
29889,
29885,
2495,
29879,
29961,
9106,
1822,
29885,
2495,
287,
29918,
28160,
29961,
2248,
2314,
13,
9651,
5881,
353,
286,
29873,
29889,
7543,
13,
13,
4706,
1596,
29918,
4563,
1241,
580,
13,
4706,
12183,
29889,
8382,
703,
9075,
376,
718,
4847,
29889,
978,
718,
376,
13582,
29901,
376,
718,
851,
29898,
7543,
876,
29871,
396,
14402,
29901,
24778,
445,
2678,
313,
27338,
4265,
29897,
13,
4706,
736,
5881,
13,
13,
1678,
822,
6314,
29918,
29885,
2495,
29918,
28160,
29898,
1311,
29892,
4847,
29892,
2106,
29892,
4046,
29922,
29896,
29906,
1125,
13,
13,
4706,
9995,
13,
4706,
24930,
292,
15889,
363,
286,
2495,
26654,
515,
4847,
1058,
2113,
8938,
13,
4706,
584,
3207,
4847,
29901,
14574,
591,
526,
6314,
292,
515,
13,
4706,
584,
3207,
2106,
29901,
9626,
2106,
310,
3748,
13,
4706,
584,
3207,
4046,
29901,
5918,
12539,
1353,
310,
15889,
393,
508,
367,
16531,
13,
4706,
584,
2457,
29901,
1051,
310,
341,
2495,
23215,
2701,
322,
3692,
278,
14881,
471,
2854,
313,
20054,
29897,
13,
4706,
9995,
13,
4706,
937,
29918,
3179,
29918,
7543,
353,
5852,
13,
4706,
2854,
353,
5852,
13,
4706,
2441,
29918,
3179,
29918,
28160,
353,
6483,
8552,
29898,
1311,
29889,
3179,
29879,
29961,
9106,
2314,
13,
4706,
2441,
29918,
29885,
2495,
29918,
28160,
353,
6483,
8552,
29898,
1311,
29889,
29885,
2495,
29879,
29961,
9106,
2314,
13,
4706,
16531,
29918,
3179,
29918,
28160,
353,
5159,
13,
4706,
16531,
29918,
29885,
2495,
29918,
28160,
353,
5159,
13,
4706,
8158,
353,
29871,
29900,
13,
4706,
286,
2495,
29918,
1990,
353,
6213,
13,
4706,
419,
833,
29918,
978,
353,
6213,
13,
13,
4706,
565,
1134,
29898,
9106,
467,
1649,
978,
1649,
1275,
525,
29950,
7889,
2396,
13,
9651,
1550,
7431,
29898,
15914,
287,
29918,
3179,
29918,
28160,
29897,
718,
7431,
29898,
15914,
287,
29918,
29885,
2495,
29918,
28160,
29897,
529,
4046,
29901,
13,
18884,
565,
937,
29918,
3179,
29918,
7543,
29901,
13,
462,
1678,
1596,
29918,
4563,
1241,
580,
13,
462,
1678,
12183,
29889,
8382,
703,
2831,
286,
2495,
3113,
1831,
937,
5881,
515,
1361,
23157,
13,
13,
18884,
1404,
29918,
2080,
353,
4847,
29889,
657,
29918,
2467,
29898,
3859,
29892,
10191,
29922,
9106,
29889,
978,
718,
376,
1831,
5881,
29892,
1134,
525,
29979,
29915,
304,
6876,
29901,
1159,
13,
13,
18884,
565,
1404,
29918,
2080,
1275,
525,
29979,
2396,
13,
462,
1678,
2867,
13,
13,
18884,
2752,
353,
1404,
29918,
2080,
29961,
29900,
29962,
13,
18884,
2380,
353,
938,
29898,
1792,
29918,
2080,
29961,
29896,
29901,
2314,
13,
13,
18884,
565,
937,
29918,
3179,
29918,
7543,
29901,
13,
462,
1678,
565,
2752,
2804,
376,
29950,
1115,
13,
462,
4706,
1596,
29918,
4563,
1241,
580,
13,
462,
4706,
12183,
29889,
8382,
703,
797,
1206,
310,
286,
2495,
29892,
3113,
1831,
937,
5881,
515,
1361,
23157,
13,
462,
4706,
6773,
13,
13,
462,
1678,
937,
29918,
3179,
29918,
7543,
353,
7700,
13,
13,
18884,
565,
2752,
1275,
376,
29950,
1115,
13,
462,
1678,
5881,
29918,
2080,
353,
1583,
29889,
3179,
29879,
29961,
9106,
1822,
28160,
29961,
2248,
29962,
13,
462,
1678,
5881,
353,
1583,
29889,
3179,
29879,
29961,
9106,
1822,
26746,
29918,
7543,
29898,
7543,
29918,
2080,
29897,
13,
462,
1678,
16531,
29918,
3179,
29918,
28160,
29889,
4397,
29898,
7543,
29897,
13,
18884,
25342,
2752,
1275,
376,
29924,
1115,
13,
462,
1678,
286,
29873,
353,
1583,
29889,
29885,
2495,
29879,
29961,
9106,
1822,
26746,
29918,
29885,
2495,
287,
29918,
7543,
29898,
1311,
29889,
29885,
2495,
29879,
29961,
9106,
1822,
29885,
2495,
287,
29918,
28160,
29961,
2248,
2314,
13,
462,
1678,
16531,
29918,
29885,
2495,
29918,
28160,
29889,
4397,
29898,
4378,
29897,
13,
13,
9651,
396,
422,
26062,
16531,
1361,
322,
286,
2495,
5881,
8857,
363,
8158,
13944,
13,
9651,
16531,
29918,
28160,
353,
16531,
29918,
3179,
29918,
28160,
718,
518,
4378,
29889,
7543,
363,
286,
29873,
297,
16531,
29918,
29885,
2495,
29918,
28160,
29962,
13,
13,
9651,
565,
7431,
29898,
15914,
287,
29918,
28160,
29897,
1405,
29871,
29900,
29901,
13,
18884,
8158,
29892,
286,
2495,
29918,
1990,
29892,
419,
833,
29918,
978,
353,
1583,
29889,
29885,
2495,
29918,
4422,
29889,
15807,
403,
29918,
13628,
29898,
15914,
287,
29918,
28160,
29897,
13,
13,
18884,
565,
8158,
1275,
29871,
29900,
29901,
13,
462,
1678,
2854,
353,
7700,
13,
18884,
1683,
29901,
13,
462,
1678,
363,
286,
29873,
297,
16531,
29918,
29885,
2495,
29918,
28160,
29901,
13,
462,
4706,
2441,
29918,
29885,
2495,
29918,
1990,
353,
286,
29873,
29889,
29885,
2495,
29918,
1990,
13,
462,
4706,
565,
2441,
29918,
29885,
2495,
29918,
1990,
1275,
286,
2495,
29918,
1990,
29901,
13,
462,
9651,
2441,
29918,
29885,
2495,
29918,
13628,
353,
286,
29873,
29889,
13628,
13,
462,
9651,
565,
2441,
29918,
29885,
2495,
29918,
13628,
5277,
8158,
29901,
13,
462,
18884,
2854,
353,
7700,
13,
462,
18884,
2867,
13,
18884,
565,
451,
2854,
29901,
13,
462,
1678,
1583,
29889,
3179,
29879,
29961,
9106,
29962,
353,
2441,
29918,
3179,
29918,
28160,
13,
462,
1678,
1583,
29889,
29885,
2495,
29879,
29961,
9106,
29962,
353,
2441,
29918,
29885,
2495,
29918,
28160,
13,
4706,
1683,
29901,
29871,
396,
11273,
13,
9651,
2854,
353,
5852,
13,
9651,
8938,
29918,
2467,
29892,
286,
2495,
29918,
2467,
353,
4847,
29889,
657,
29918,
2467,
29898,
3859,
29892,
1583,
29892,
1857,
29918,
23090,
29922,
1311,
29889,
3784,
29918,
23090,
29892,
338,
29918,
509,
860,
29922,
8824,
29897,
13,
13,
9651,
565,
286,
2495,
29918,
2467,
1275,
7186,
29889,
2303,
10249,
29918,
3217,
9486,
1177,
8098,
29903,
29918,
12413,
29918,
29950,
2891,
29918,
12064,
1783,
1955,
17255,
2435,
1649,
7295,
13,
18884,
396,
1904,
12784,
304,
1209,
286,
2495,
292,
13,
18884,
736,
19997,
2854,
13,
13,
9651,
8158,
29892,
286,
2495,
29918,
1990,
29892,
419,
833,
29918,
978,
29892,
16531,
29918,
28160,
353,
320,
13,
18884,
4847,
29889,
13441,
29918,
4299,
29918,
4905,
29898,
509,
860,
29918,
2248,
29922,
509,
860,
29918,
2467,
29892,
286,
2495,
29918,
2248,
29922,
29885,
2495,
29918,
2467,
29892,
3748,
29922,
1311,
29892,
338,
29918,
509,
860,
29922,
8824,
29897,
13,
13,
4706,
736,
518,
29924,
2495,
23215,
552,
29898,
7543,
29892,
419,
833,
29918,
978,
29892,
286,
2495,
29918,
1990,
29892,
8158,
29897,
363,
5881,
297,
16531,
29918,
28160,
1402,
2854,
13,
13,
1678,
822,
1708,
29918,
509,
860,
29898,
1311,
1125,
13,
4706,
9995,
13,
4706,
20136,
29901,
29871,
29900,
470,
29871,
29896,
363,
2380,
297,
4847,
1051,
13,
4706,
584,
2457,
29901,
2380,
310,
19576,
313,
29886,
21766,
363,
2446,
8938,
29897,
13,
4706,
9995,
13,
4706,
1596,
29918,
4563,
1241,
580,
13,
4706,
12183,
29889,
8382,
29898,
29888,
29915,
4819,
559,
29871,
29896,
29905,
29873,
2308,
860,
24037,
29896,
29906,
448,
7431,
29898,
1311,
29889,
16565,
29897,
458,
29906,
1012,
29873,
29912,
2435,
29898,
1311,
29889,
16565,
2915,
5881,
6377,
29879,
29908,
565,
7431,
29898,
1311,
29889,
16565,
29897,
1405,
29871,
29896,
1683,
5124,
29913,
9886,
297,
19810,
1495,
13,
13,
4706,
8938,
29918,
2962,
29918,
3859,
353,
1583,
29889,
3258,
29918,
3859,
580,
13,
13,
4706,
8938,
353,
1605,
860,
29898,
1311,
29889,
1456,
414,
29892,
1583,
29889,
509,
3427,
29897,
13,
13,
4706,
396,
5953,
837,
457,
607,
4847,
5771,
937,
2729,
373,
20136,
1852,
13,
4706,
9995,
1738,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
13,
4706,
396,
10014,
2965,
29968,
349,
18799,
1001,
365,
9047,
8519,
6058,
14445,
12982,
21554,
6093,
16698,
2303,
3339,
6093,
402,
25797,
349,
18799,
1001,
365,
9047,
13,
4706,
396,
6093,
29979,
4810,
29965,
10249,
20700,
2672,
22471,
28483,
3919,
15606,
13,
4706,
9995,
13,
4706,
4847,
29918,
2098,
353,
1051,
29898,
1311,
29889,
1456,
414,
29897,
13,
4706,
4847,
29918,
29896,
353,
4847,
29918,
2098,
29889,
7323,
29898,
1311,
29889,
29886,
21766,
29897,
13,
4706,
4847,
29918,
29906,
353,
4847,
29918,
2098,
29961,
29900,
29962,
13,
4706,
8938,
29918,
9106,
29918,
1761,
353,
518,
9106,
29918,
29896,
29892,
4847,
29918,
29906,
29962,
13,
13,
4706,
396,
24930,
5881,
363,
8938,
515,
1269,
4847,
2729,
373,
1797,
13,
4706,
5881,
29918,
29896,
353,
1583,
29889,
15914,
29918,
509,
860,
29918,
28160,
29898,
9106,
29918,
29896,
29892,
8938,
29918,
2962,
29918,
3859,
29897,
29871,
396,
24930,
5881,
515,
937,
4847,
2729,
373,
20136,
13,
13,
4706,
565,
1583,
29889,
26029,
29918,
1688,
29901,
13,
9651,
931,
29889,
17059,
29898,
16859,
29889,
26029,
29918,
1688,
29918,
29886,
1071,
29918,
2848,
29897,
13,
13,
4706,
396,
3599,
3278,
278,
937,
5881,
393,
471,
5318,
13,
4706,
937,
29918,
11631,
29918,
3859,
353,
1583,
29889,
3258,
29918,
3859,
29898,
7543,
29918,
29896,
29897,
13,
13,
4706,
565,
1583,
29889,
26029,
29918,
1688,
322,
525,
657,
29918,
29984,
29879,
29915,
297,
4516,
29898,
1311,
29889,
1456,
414,
29961,
29900,
1822,
4299,
1125,
13,
9651,
1596,
29918,
4563,
1241,
580,
13,
9651,
9225,
29918,
3859,
353,
8938,
29918,
2962,
29918,
3859,
565,
1583,
29889,
1456,
414,
29961,
29900,
29962,
1275,
4847,
29918,
29896,
1683,
937,
29918,
11631,
29918,
3859,
13,
9651,
5199,
29918,
3859,
353,
8938,
29918,
2962,
29918,
3859,
565,
1583,
29889,
1456,
414,
29961,
29896,
29962,
1275,
4847,
29918,
29896,
1683,
937,
29918,
11631,
29918,
3859,
13,
9651,
12183,
29889,
8382,
29898,
1311,
29889,
1456,
414,
29961,
29900,
1822,
4299,
29889,
657,
29918,
29984,
29879,
29898,
9106,
29922,
1311,
29889,
1456,
414,
29961,
29900,
1402,
4847,
29918,
3859,
29922,
7451,
29918,
3859,
29892,
23995,
296,
29922,
1311,
29889,
1456,
414,
29961,
29896,
1402,
23995,
296,
29918,
3859,
29922,
26029,
29918,
3859,
876,
13,
13,
4706,
565,
1583,
29889,
1456,
414,
29961,
29900,
29962,
297,
1583,
29889,
9106,
29918,
1639,
29918,
509,
860,
29918,
18434,
322,
1583,
29889,
3389,
29918,
333,
338,
451,
6213,
29901,
29871,
396,
3872,
29915,
29873,
2767,
373,
937,
8938,
310,
3748,
13,
9651,
282,
29896,
29918,
5504,
29918,
8977,
353,
11117,
9106,
2396,
4847,
29918,
29896,
29892,
525,
3859,
29918,
29896,
2396,
1583,
29889,
9106,
29918,
1639,
29918,
509,
860,
29918,
18434,
29961,
9106,
29918,
29896,
3816,
29900,
1402,
13,
462,
795,
525,
3859,
29918,
29906,
2396,
8938,
29918,
2962,
29918,
3859,
29892,
525,
798,
29918,
333,
2396,
1583,
29889,
9106,
29918,
1639,
29918,
509,
860,
29918,
18434,
29961,
9106,
29918,
29896,
3816,
29896,
12258,
13,
9651,
282,
29906,
29918,
5504,
29918,
8977,
353,
11117,
9106,
2396,
4847,
29918,
29906,
29892,
525,
3859,
29918,
29896,
2396,
1583,
29889,
9106,
29918,
1639,
29918,
509,
860,
29918,
18434,
29961,
9106,
29918,
29906,
3816,
29900,
1402,
13,
462,
795,
525,
3859,
29918,
29906,
2396,
937,
29918,
11631,
29918,
3859,
29892,
525,
798,
29918,
333,
2396,
1583,
29889,
9106,
29918,
1639,
29918,
509,
860,
29918,
18434,
29961,
9106,
29918,
29906,
3816,
29896,
12258,
13,
9651,
1583,
29889,
4548,
29918,
2176,
353,
2243,
29889,
5504,
29918,
3859,
29898,
2176,
29922,
1311,
29889,
4548,
29918,
2176,
29892,
282,
29896,
29922,
29886,
29896,
29918,
5504,
29918,
8977,
29892,
282,
29906,
29922,
29886,
29906,
29918,
5504,
29918,
8977,
29892,
5401,
29918,
276,
1328,
29922,
1311,
29889,
2917,
29889,
5080,
29918,
276,
1328,
29897,
13,
13,
4706,
5881,
29918,
29906,
353,
1583,
29889,
15914,
29918,
509,
860,
29918,
28160,
29898,
9106,
29918,
29906,
29892,
937,
29918,
11631,
29918,
3859,
29897,
29871,
396,
24930,
5881,
515,
1473,
4847,
2729,
373,
20136,
13,
13,
4706,
565,
1583,
29889,
26029,
29918,
1688,
29901,
13,
9651,
931,
29889,
17059,
29898,
16859,
29889,
26029,
29918,
1688,
29918,
29886,
1071,
29918,
2848,
29897,
13,
13,
4706,
1596,
29918,
4563,
1241,
580,
13,
4706,
12183,
29889,
8382,
703,
1307,
9375,
12354,
5195,
3035,
29979,
7495,
390,
5005,
29933,
1307,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
6824,
21004,
1159,
13,
4706,
12183,
29889,
8382,
703,
13200,
29871,
29896,
29901,
376,
718,
851,
29898,
7543,
29918,
29896,
876,
13,
4706,
12183,
29889,
8382,
703,
13200,
29871,
29906,
29901,
376,
718,
851,
29898,
7543,
29918,
29906,
876,
13,
13,
4706,
565,
1583,
29889,
26029,
29918,
1688,
29901,
13,
9651,
931,
29889,
17059,
29898,
16859,
29889,
26029,
29918,
1688,
29918,
29886,
1071,
29918,
2848,
29897,
13,
13,
4706,
396,
5953,
837,
457,
19576,
310,
8938,
2729,
373,
16531,
15889,
13,
4706,
1121,
353,
2723,
29889,
18307,
29918,
28160,
29898,
1311,
29889,
509,
3427,
29892,
5881,
29918,
29896,
29892,
5881,
29918,
29906,
29897,
13,
4706,
1596,
29918,
4563,
1241,
580,
13,
4706,
12183,
29889,
8382,
703,
18118,
1783,
1955,
584,
376,
718,
851,
29898,
9106,
29918,
29896,
29889,
978,
565,
1121,
1275,
29871,
29900,
1683,
4847,
29918,
29906,
29889,
978,
876,
13,
13,
4706,
565,
1583,
29889,
26029,
29918,
1688,
29901,
13,
9651,
931,
29889,
17059,
29898,
16859,
29889,
26029,
29918,
1688,
29918,
29886,
1071,
29918,
2848,
29897,
13,
13,
4706,
396,
922,
862,
403,
19576,
322,
1232,
261,
363,
26654,
29892,
286,
2495,
292,
29892,
322,
2446,
1361,
13,
4706,
19576,
353,
8938,
29918,
9106,
29918,
1761,
29889,
7323,
29898,
2914,
29897,
13,
4706,
1232,
261,
353,
8938,
29918,
9106,
29918,
1761,
29961,
29900,
29962,
13,
13,
4706,
396,
399,
3993,
4216,
29879,
263,
5881,
515,
278,
10961,
29892,
5643,
491,
278,
1232,
261,
11580,
263,
5881,
515,
278,
10961,
13,
4706,
396,
14402,
29901,
16760,
1250,
1244,
322,
2758,
19576,
304,
6755,
746,
1623,
304,
1833,
29871,
29906,
15889,
313,
25253,
2511,
29897,
13,
4706,
1583,
29889,
3179,
29879,
29961,
29893,
3993,
1822,
1202,
29918,
28160,
29898,
1311,
29889,
16565,
29889,
26746,
29918,
3332,
29918,
28160,
29898,
29896,
876,
13,
4706,
565,
7431,
29898,
1311,
29889,
16565,
29897,
1275,
29871,
29900,
29901,
13,
9651,
1583,
29889,
3179,
29879,
29961,
5409,
261,
1822,
1202,
29918,
28160,
29898,
1311,
29889,
509,
3427,
29918,
7543,
29897,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
3179,
29879,
29961,
5409,
261,
1822,
1202,
29918,
28160,
29898,
1311,
29889,
16565,
29889,
26746,
29918,
3332,
29918,
28160,
29898,
29896,
876,
13,
13,
4706,
396,
399,
3993,
508,
1286,
286,
2495,
565,
896,
577,
6755,
13,
4706,
1596,
29918,
4563,
1241,
580,
13,
4706,
12183,
29889,
8382,
29898,
29893,
3993,
29889,
978,
718,
376,
1831,
15889,
363,
286,
2495,
29901,
1159,
13,
13,
4706,
396,
1798,
1598,
393,
286,
2495,
338,
2854,
29889,
960,
286,
2495,
338,
8340,
29892,
4889,
278,
1404,
304,
337,
2202,
29889,
13,
4706,
1583,
29889,
4230,
29918,
29885,
2495,
29918,
3859,
353,
1583,
29889,
3258,
29918,
3859,
580,
13,
4706,
286,
29873,
29918,
1761,
353,
5159,
13,
4706,
396,
694,
286,
2495,
292,
297,
445,
1873,
13,
4706,
1550,
29871,
29896,
29901,
13,
9651,
286,
29873,
29918,
1761,
29892,
2854,
353,
1583,
29889,
15914,
29918,
29885,
2495,
29918,
28160,
29898,
29893,
3993,
29892,
1583,
29889,
4230,
29918,
29885,
2495,
29918,
3859,
29897,
13,
9651,
565,
2854,
29901,
13,
18884,
2867,
13,
9651,
1683,
29901,
13,
18884,
1596,
29918,
4563,
1241,
580,
13,
18884,
12183,
29889,
8382,
703,
13919,
10296,
18397,
29892,
3113,
1018,
1449,
23157,
13,
13,
4706,
396,
10318,
19435,
13,
4706,
565,
7431,
29898,
4378,
29918,
1761,
29897,
1275,
29871,
29900,
29901,
29871,
396,
1939,
15889,
286,
2495,
287,
29892,
577,
8158,
338,
29871,
29900,
13,
9651,
286,
2495,
29918,
13628,
353,
29871,
29900,
13,
4706,
1683,
29901,
13,
9651,
286,
2495,
29918,
13628,
353,
286,
29873,
29918,
1761,
29961,
29900,
1822,
13628,
29871,
396,
2522,
487,
338,
278,
1021,
363,
599,
341,
2495,
23215,
2701,
297,
286,
29873,
29918,
1761,
13,
4706,
8938,
29918,
13628,
353,
8938,
29889,
15807,
403,
29918,
509,
860,
29918,
13628,
29898,
7543,
29918,
29896,
29892,
5881,
29918,
29906,
29897,
13,
4706,
3001,
29918,
13628,
353,
286,
2495,
29918,
13628,
718,
8938,
29918,
13628,
13,
13,
4706,
1583,
29889,
2218,
7543,
29918,
29886,
488,
29889,
1202,
29918,
28160,
4197,
7543,
29918,
29896,
29892,
5881,
29918,
29906,
2314,
13,
13,
4706,
396,
1480,
5922,
322,
8820,
29892,
4847,
1797,
353,
10014,
2965,
29968,
15606,
13,
4706,
565,
1583,
29889,
3389,
29918,
333,
338,
451,
6213,
29901,
13,
9651,
282,
29896,
29918,
8977,
353,
11117,
9106,
2396,
4847,
29918,
29896,
29892,
525,
3859,
2396,
8938,
29918,
2962,
29918,
3859,
29892,
525,
7543,
2396,
5881,
29918,
29896,
29913,
13,
9651,
282,
29906,
29918,
8977,
353,
11117,
9106,
2396,
4847,
29918,
29906,
29892,
525,
3859,
2396,
937,
29918,
11631,
29918,
3859,
29892,
525,
7543,
2396,
5881,
29918,
29906,
29913,
13,
9651,
286,
2495,
29918,
8977,
353,
11117,
9106,
2396,
19576,
29892,
525,
29885,
2495,
2396,
286,
29873,
29918,
1761,
29913,
13,
9651,
1583,
29889,
4548,
29918,
2176,
29892,
1583,
29889,
9106,
29918,
1639,
29918,
509,
860,
29918,
18434,
353,
320,
13,
18884,
2243,
29889,
1188,
29918,
3859,
29898,
2176,
29922,
1311,
29889,
4548,
29918,
2176,
29892,
282,
29896,
29922,
29886,
29896,
29918,
8977,
29892,
282,
29906,
29922,
29886,
29906,
29918,
8977,
29892,
286,
2495,
29922,
29885,
2495,
29918,
8977,
29892,
13,
462,
632,
1065,
29918,
333,
29922,
1311,
29889,
3389,
29918,
333,
29892,
4955,
29922,
1311,
29889,
9106,
29918,
1639,
29918,
509,
860,
29918,
18434,
29897,
13,
13,
4706,
1583,
29889,
1557,
2361,
29961,
29893,
3993,
1822,
4397,
29898,
1311,
29889,
1557,
2361,
29961,
29893,
3993,
3816,
29899,
29896,
29962,
718,
3001,
29918,
13628,
29897,
13,
4706,
1583,
29889,
1557,
2361,
29961,
5409,
261,
1822,
4397,
29898,
1311,
29889,
1557,
2361,
29961,
5409,
261,
3816,
29899,
29896,
2314,
13,
13,
4706,
396,
10318,
19576,
29915,
29879,
286,
2495,
13,
4706,
363,
286,
29873,
297,
286,
29873,
29918,
1761,
29901,
13,
9651,
1583,
29889,
29885,
2495,
29879,
29961,
29893,
3993,
1822,
1202,
29918,
29885,
2495,
287,
29918,
7543,
29898,
4378,
29897,
13,
13,
4706,
396,
731,
716,
20136,
13,
4706,
1583,
29889,
29886,
21766,
353,
1583,
29889,
1456,
414,
29889,
2248,
29898,
29893,
3993,
29897,
13,
13,
1678,
822,
1708,
29898,
1311,
1125,
13,
4706,
1550,
7431,
29898,
1311,
29889,
16565,
29897,
1405,
29871,
29900,
29901,
13,
9651,
1583,
29889,
1456,
29918,
509,
860,
580,
13,
13,
4706,
2186,
29918,
1557,
2361,
353,
518,
1311,
29889,
1557,
2361,
29961,
9106,
3816,
29899,
29896,
29962,
363,
4847,
297,
1583,
29889,
1456,
414,
29962,
13,
4706,
19576,
29918,
2248,
353,
7442,
29889,
1191,
3317,
29898,
8394,
29918,
1557,
2361,
29897,
13,
13,
4706,
565,
1583,
29889,
3389,
29918,
333,
338,
451,
6213,
29901,
13,
9651,
396,
402,
25797,
15606,
313,
18103,
372,
1838,
29915,
29873,
4383,
1244,
29897,
13,
9651,
1095,
29918,
11802,
29918,
3859,
353,
1583,
29889,
3258,
29918,
3859,
580,
13,
9651,
282,
29896,
29918,
5504,
29918,
8977,
353,
11117,
9106,
2396,
1583,
29889,
1456,
414,
29961,
29900,
1402,
525,
3859,
29918,
29896,
2396,
1583,
29889,
9106,
29918,
1639,
29918,
509,
860,
29918,
18434,
29961,
1311,
29889,
1456,
414,
29961,
29900,
29962,
3816,
29900,
1402,
525,
3859,
29918,
29906,
2396,
1095,
29918,
11802,
29918,
3859,
29892,
13,
462,
795,
525,
798,
29918,
333,
2396,
1583,
29889,
9106,
29918,
1639,
29918,
509,
860,
29918,
18434,
29961,
1311,
29889,
1456,
414,
29961,
29900,
29962,
3816,
29896,
12258,
13,
9651,
282,
29906,
29918,
5504,
29918,
8977,
353,
11117,
9106,
2396,
1583,
29889,
1456,
414,
29961,
29896,
1402,
525,
3859,
29918,
29896,
2396,
1583,
29889,
9106,
29918,
1639,
29918,
509,
860,
29918,
18434,
29961,
1311,
29889,
1456,
414,
29961,
29896,
29962,
3816,
29900,
1402,
525,
3859,
29918,
29906,
2396,
1095,
29918,
11802,
29918,
3859,
29892,
13,
462,
795,
525,
798,
29918,
333,
2396,
1583,
29889,
9106,
29918,
1639,
29918,
509,
860,
29918,
18434,
29961,
1311,
29889,
1456,
414,
29961,
29896,
29962,
3816,
29896,
12258,
13,
13,
9651,
1583,
29889,
4548,
29918,
2176,
353,
2243,
29889,
5504,
29918,
3859,
29898,
2176,
29922,
1311,
29889,
4548,
29918,
2176,
29892,
282,
29896,
29922,
29886,
29896,
29918,
5504,
29918,
8977,
29892,
282,
29906,
29922,
29886,
29906,
29918,
5504,
29918,
8977,
29892,
19576,
29922,
1311,
29889,
1456,
414,
29961,
29893,
3993,
29918,
2248,
1402,
5401,
29918,
276,
1328,
29922,
1311,
29889,
2917,
29889,
5080,
29918,
276,
1328,
29892,
13,
462,
462,
3986,
2186,
29918,
509,
860,
29918,
29893,
3993,
29922,
1311,
29889,
1456,
414,
29961,
1311,
29889,
29886,
21766,
2314,
13,
9651,
1583,
29889,
4548,
29918,
2176,
353,
2243,
29889,
1188,
29918,
8394,
29918,
29885,
2495,
29898,
2176,
29922,
1311,
29889,
4548,
29918,
2176,
29892,
286,
2495,
29918,
3859,
29922,
1311,
29889,
4230,
29918,
29885,
2495,
29918,
3859,
29892,
4955,
29922,
1311,
29889,
9106,
29918,
1639,
29918,
509,
860,
29918,
18434,
29892,
13,
462,
462,
9651,
2186,
29918,
509,
860,
29918,
29893,
3993,
29922,
1311,
29889,
1456,
414,
29961,
1311,
29889,
29886,
21766,
1402,
1095,
29918,
11802,
29918,
3859,
29922,
355,
29918,
11802,
29918,
3859,
29892,
1065,
29918,
333,
29922,
1311,
29889,
3389,
29918,
333,
29892,
13,
462,
462,
9651,
19576,
29922,
1311,
29889,
1456,
414,
29961,
29893,
3993,
29918,
2248,
1402,
5401,
29918,
276,
1328,
29922,
1311,
29889,
2917,
29889,
5080,
29918,
276,
1328,
29897,
13,
13,
4706,
1596,
29918,
4563,
1241,
580,
13,
4706,
12183,
29889,
8382,
703,
29956,
3993,
29901,
376,
718,
851,
29898,
1311,
29889,
1456,
414,
29961,
29893,
3993,
29918,
2248,
2314,
718,
6634,
29873,
20097,
29901,
376,
718,
851,
29898,
8394,
29918,
1557,
2361,
29961,
29893,
3993,
29918,
2248,
12622,
13,
4706,
12183,
29889,
8382,
29898,
13,
9651,
376,
29931,
22969,
29901,
376,
718,
851,
29898,
1311,
29889,
1456,
414,
29961,
29896,
448,
19576,
29918,
2248,
2314,
718,
6634,
29873,
20097,
29901,
376,
718,
851,
29898,
8394,
29918,
1557,
2361,
29961,
29896,
448,
19576,
29918,
2248,
12622,
13,
4706,
736,
19576,
29918,
2248,
29892,
6213,
565,
1583,
29889,
3389,
29918,
333,
338,
6213,
1683,
1583,
29889,
4548,
29918,
2176,
13,
2
] |
fundamentals/15-advance-objects-and-data-structures/5-advance-lists.py | davidokun/Python | 0 | 46298 | <filename>fundamentals/15-advance-objects-and-data-structures/5-advance-lists.py
# Advance Lists
my_list = [1, 2, 3]
# Add element
print('\n# Add element\n')
my_list.append(4)
my_list.append(4)
print(my_list)
# Count element's occurrences
print('\n# Count element\'s occurrences\n')
print(f'2 = {my_list.count(2)}')
print(f'4 = {my_list.count(4)}')
print(f'5 = {my_list.count(5)}')
# Extend
print('\n# Extend\n')
x = [1, 2, 3]
x.append([4, 5])
print(f'Use append = {x}')
x = [1, 2, 3]
x.extend([4, 5])
print(f'Use Extend = {x}')
# Index
print('\n# Index\n')
print(f'List = {my_list}')
print(f'Index of 2 = {my_list.index(2)}')
print(f'Index of 4 = {my_list.index(4)}')
# Insert
print('\n# Insert\n')
print(f'List = {my_list}')
my_list.insert(2, 'Inserted')
print(f'After insert in pos 2 = {my_list}')
| [
1,
529,
9507,
29958,
27159,
1166,
1338,
29914,
29896,
29945,
29899,
17263,
749,
29899,
12650,
29899,
392,
29899,
1272,
29899,
4984,
1973,
29914,
29945,
29899,
17263,
749,
29899,
21513,
29889,
2272,
13,
29937,
25215,
749,
2391,
29879,
13,
1357,
29918,
1761,
353,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29962,
13,
13,
29937,
3462,
1543,
13,
2158,
28909,
29876,
29937,
3462,
1543,
29905,
29876,
1495,
13,
13,
1357,
29918,
1761,
29889,
4397,
29898,
29946,
29897,
13,
1357,
29918,
1761,
29889,
4397,
29898,
29946,
29897,
13,
2158,
29898,
1357,
29918,
1761,
29897,
13,
13,
29937,
3917,
1543,
29915,
29879,
13920,
2063,
13,
2158,
28909,
29876,
29937,
3917,
1543,
20333,
29879,
13920,
2063,
29905,
29876,
1495,
13,
2158,
29898,
29888,
29915,
29906,
353,
426,
1357,
29918,
1761,
29889,
2798,
29898,
29906,
2915,
1495,
13,
2158,
29898,
29888,
29915,
29946,
353,
426,
1357,
29918,
1761,
29889,
2798,
29898,
29946,
2915,
1495,
13,
2158,
29898,
29888,
29915,
29945,
353,
426,
1357,
29918,
1761,
29889,
2798,
29898,
29945,
2915,
1495,
13,
13,
13,
29937,
7338,
355,
13,
2158,
28909,
29876,
29937,
7338,
355,
29905,
29876,
1495,
13,
29916,
353,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29962,
13,
29916,
29889,
4397,
4197,
29946,
29892,
29871,
29945,
2314,
13,
2158,
29898,
29888,
29915,
11403,
9773,
353,
426,
29916,
29913,
1495,
13,
13,
29916,
353,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29962,
13,
29916,
29889,
21843,
4197,
29946,
29892,
29871,
29945,
2314,
13,
2158,
29898,
29888,
29915,
11403,
7338,
355,
353,
426,
29916,
29913,
1495,
13,
13,
29937,
11374,
13,
2158,
28909,
29876,
29937,
11374,
29905,
29876,
1495,
13,
2158,
29898,
29888,
29915,
1293,
353,
426,
1357,
29918,
1761,
29913,
1495,
13,
2158,
29898,
29888,
29915,
3220,
310,
29871,
29906,
353,
426,
1357,
29918,
1761,
29889,
2248,
29898,
29906,
2915,
1495,
13,
2158,
29898,
29888,
29915,
3220,
310,
29871,
29946,
353,
426,
1357,
29918,
1761,
29889,
2248,
29898,
29946,
2915,
1495,
13,
13,
29937,
24505,
13,
2158,
28909,
29876,
29937,
24505,
29905,
29876,
1495,
13,
2158,
29898,
29888,
29915,
1293,
353,
426,
1357,
29918,
1761,
29913,
1495,
13,
1357,
29918,
1761,
29889,
7851,
29898,
29906,
29892,
525,
17491,
287,
1495,
13,
2158,
29898,
29888,
29915,
13555,
4635,
297,
926,
29871,
29906,
353,
426,
1357,
29918,
1761,
29913,
1495,
13,
2
] |
neon/params/tests/test_val_init.py | zhenglab/neon | 0 | 82262 | <reponame>zhenglab/neon
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2014 Nervana Systems Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ----------------------------------------------------------------------------
import math
from neon.backends.cpu import CPU
from neon.params.val_init import (UniformValGen, AutoUniformValGen,
GaussianValGen, NormalValGen,
SparseEigenValGen, NodeNormalizedValGen)
class TestValInit(object):
def __init__(self):
# this code gets called prior to each test
self.be = CPU()
def test_uni_basics(self):
uni = UniformValGen(backend=self.be)
assert str(uni) == ("UniformValGen utilizing CPU backend\n\t"
"low: 0.0, high: 1.0")
def test_uni_gen(self):
uni = UniformValGen(backend=self.be)
res = uni.generate(shape=[1, 1])
assert res.shape == (1, 1)
out = self.be.empty((1, 1))
self.be.min(res, axes=None, out=out)
assert out.asnumpyarray() >= 0.0
self.be.max(res, axes=None, out=out)
assert out.asnumpyarray() < 1.0
def test_uni_params(self):
low = -5.5
high = 10.2
uni = UniformValGen(backend=self.be, low=low, high=high)
assert str(uni) == ("UniformValGen utilizing CPU backend\n\t"
"low: {low}, high: {high}".format(low=low,
high=high))
res = uni.generate(shape=[4, 4])
assert res.shape == (4, 4)
out = self.be.empty((1, 1))
self.be.min(res, axes=None, out=out)
assert out.asnumpyarray() >= low
self.be.max(res, axes=None, out=out)
assert out.asnumpyarray() < high
def test_autouni_gen(self):
autouni = AutoUniformValGen(backend=self.be, relu=True)
assert autouni.relu is True
assert str(autouni) == ("AutoUniformValGen utilizing CPU backend\n\t"
"low: nan, high: nan")
res = autouni.generate([3, 3])
assert res.shape == (3, 3)
out = self.be.empty((1, 1))
self.be.min(res, axes=None, out=out)
expected_val = math.sqrt(2) * (1.0 / math.sqrt(3))
assert out.asnumpyarray() >= - expected_val
self.be.max(res, axes=None, out=out)
assert out.asnumpyarray() < expected_val
def test_gaussian_gen(self):
loc = 5
scale = 2.0
gauss = GaussianValGen(backend=self.be, loc=loc, scale=scale)
assert str(gauss) == ("GaussianValGen utilizing CPU backend\n\t"
"loc: {}, scale: {}".format(loc, scale))
res = gauss.generate([5, 10])
assert res.shape == (5, 10)
# TODO: test distribution of vals to ensure ~gaussian dist
def test_normal_gen(self):
loc = -2.5
scale = 3.0
gauss = NormalValGen(backend=self.be, loc=loc, scale=scale)
assert str(gauss) == ("GaussianValGen utilizing CPU backend\n\t"
"loc: {}, scale: {}".format(loc, scale))
res = gauss.generate([9, 3])
assert res.shape == (9, 3)
# TODO: test distribution of vals to ensure ~gaussian dist
def test_sparseeig_gen(self):
sparseness = 10
eigenvalue = 3.1
eig = SparseEigenValGen(backend=self.be, sparseness=sparseness,
eigenvalue=eigenvalue)
assert str(eig) == ("SparseEigenValGen utilizing CPU backend\n\t"
"sparseness: {}, eigenvalue: "
"{}".format(sparseness, eigenvalue))
res = eig.generate([20, 20])
assert res.shape == (20, 20)
# TODO: test distribution of vals
def test_nodenorm_gen(self):
scale = 3.0
nodenorm = NodeNormalizedValGen(backend=self.be, scale=scale)
assert str(nodenorm) == ("NodeNormalizedValGen utilizing CPU backend"
"\n\tscale: {}".format(scale))
res = nodenorm.generate([8, 9])
assert res.shape == (8, 9)
out = self.be.empty((1, 1))
self.be.min(res, axes=None, out=out)
expected_val = scale * math.sqrt(6) / math.sqrt(8 + 9.)
assert out.asnumpyarray() >= - expected_val
self.be.max(res, axes=None, out=out)
assert out.asnumpyarray() < expected_val
| [
1,
529,
276,
1112,
420,
29958,
17599,
6180,
370,
29914,
484,
265,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
2683,
2683,
2683,
2683,
1378,
5634,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29946,
405,
6972,
1648,
23985,
9266,
29889,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
29937,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
418,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
29937,
13,
29937,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
29937,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
13,
29937,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
27028,
1090,
278,
19245,
29889,
13,
29937,
448,
2683,
2683,
2683,
2683,
1378,
5634,
13,
13,
5215,
5844,
13,
13,
3166,
452,
265,
29889,
1627,
1975,
29889,
21970,
1053,
10808,
13,
3166,
452,
265,
29889,
7529,
29889,
791,
29918,
2344,
1053,
313,
2525,
5560,
1440,
15462,
29892,
11133,
2525,
5560,
1440,
15462,
29892,
13,
462,
462,
29871,
22477,
1440,
15462,
29892,
21981,
1440,
15462,
29892,
13,
462,
462,
29871,
317,
5510,
29923,
2101,
1440,
15462,
29892,
9071,
19077,
1891,
1440,
15462,
29897,
13,
13,
13,
1990,
4321,
1440,
6644,
29898,
3318,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
396,
445,
775,
4947,
2000,
7536,
304,
1269,
1243,
13,
4706,
1583,
29889,
915,
353,
10808,
580,
13,
13,
1678,
822,
1243,
29918,
3909,
29918,
6500,
1199,
29898,
1311,
1125,
13,
4706,
443,
29875,
353,
853,
5560,
1440,
15462,
29898,
27852,
29922,
1311,
29889,
915,
29897,
13,
4706,
4974,
851,
29898,
3909,
29897,
1275,
4852,
2525,
5560,
1440,
15462,
3667,
5281,
10808,
14998,
29905,
29876,
29905,
29873,
29908,
13,
462,
9651,
376,
677,
29901,
29871,
29900,
29889,
29900,
29892,
1880,
29901,
29871,
29896,
29889,
29900,
1159,
13,
13,
1678,
822,
1243,
29918,
3909,
29918,
1885,
29898,
1311,
1125,
13,
4706,
443,
29875,
353,
853,
5560,
1440,
15462,
29898,
27852,
29922,
1311,
29889,
915,
29897,
13,
4706,
620,
353,
443,
29875,
29889,
17158,
29898,
12181,
11759,
29896,
29892,
29871,
29896,
2314,
13,
4706,
4974,
620,
29889,
12181,
1275,
313,
29896,
29892,
29871,
29896,
29897,
13,
4706,
714,
353,
1583,
29889,
915,
29889,
6310,
3552,
29896,
29892,
29871,
29896,
876,
13,
4706,
1583,
29889,
915,
29889,
1195,
29898,
690,
29892,
27815,
29922,
8516,
29892,
714,
29922,
449,
29897,
13,
4706,
4974,
714,
29889,
294,
23749,
2378,
580,
6736,
29871,
29900,
29889,
29900,
13,
4706,
1583,
29889,
915,
29889,
3317,
29898,
690,
29892,
27815,
29922,
8516,
29892,
714,
29922,
449,
29897,
13,
4706,
4974,
714,
29889,
294,
23749,
2378,
580,
529,
29871,
29896,
29889,
29900,
13,
13,
1678,
822,
1243,
29918,
3909,
29918,
7529,
29898,
1311,
1125,
13,
4706,
4482,
353,
448,
29945,
29889,
29945,
13,
4706,
1880,
353,
29871,
29896,
29900,
29889,
29906,
13,
4706,
443,
29875,
353,
853,
5560,
1440,
15462,
29898,
27852,
29922,
1311,
29889,
915,
29892,
4482,
29922,
677,
29892,
1880,
29922,
9812,
29897,
13,
4706,
4974,
851,
29898,
3909,
29897,
1275,
4852,
2525,
5560,
1440,
15462,
3667,
5281,
10808,
14998,
29905,
29876,
29905,
29873,
29908,
13,
462,
9651,
376,
677,
29901,
426,
677,
1118,
1880,
29901,
426,
9812,
29913,
1642,
4830,
29898,
677,
29922,
677,
29892,
13,
462,
462,
462,
795,
1880,
29922,
9812,
876,
13,
4706,
620,
353,
443,
29875,
29889,
17158,
29898,
12181,
11759,
29946,
29892,
29871,
29946,
2314,
13,
4706,
4974,
620,
29889,
12181,
1275,
313,
29946,
29892,
29871,
29946,
29897,
13,
4706,
714,
353,
1583,
29889,
915,
29889,
6310,
3552,
29896,
29892,
29871,
29896,
876,
13,
4706,
1583,
29889,
915,
29889,
1195,
29898,
690,
29892,
27815,
29922,
8516,
29892,
714,
29922,
449,
29897,
13,
4706,
4974,
714,
29889,
294,
23749,
2378,
580,
6736,
4482,
13,
4706,
1583,
29889,
915,
29889,
3317,
29898,
690,
29892,
27815,
29922,
8516,
29892,
714,
29922,
449,
29897,
13,
4706,
4974,
714,
29889,
294,
23749,
2378,
580,
529,
1880,
13,
13,
1678,
822,
1243,
29918,
1300,
283,
1240,
29918,
1885,
29898,
1311,
1125,
13,
4706,
1120,
283,
1240,
353,
11133,
2525,
5560,
1440,
15462,
29898,
27852,
29922,
1311,
29889,
915,
29892,
1104,
29884,
29922,
5574,
29897,
13,
4706,
4974,
1120,
283,
1240,
29889,
2674,
29884,
338,
5852,
13,
4706,
4974,
851,
29898,
1300,
283,
1240,
29897,
1275,
4852,
12300,
2525,
5560,
1440,
15462,
3667,
5281,
10808,
14998,
29905,
29876,
29905,
29873,
29908,
13,
462,
18884,
376,
677,
29901,
23432,
29892,
1880,
29901,
23432,
1159,
13,
4706,
620,
353,
1120,
283,
1240,
29889,
17158,
4197,
29941,
29892,
29871,
29941,
2314,
13,
4706,
4974,
620,
29889,
12181,
1275,
313,
29941,
29892,
29871,
29941,
29897,
13,
4706,
714,
353,
1583,
29889,
915,
29889,
6310,
3552,
29896,
29892,
29871,
29896,
876,
13,
4706,
1583,
29889,
915,
29889,
1195,
29898,
690,
29892,
27815,
29922,
8516,
29892,
714,
29922,
449,
29897,
13,
4706,
3806,
29918,
791,
353,
5844,
29889,
3676,
29898,
29906,
29897,
334,
313,
29896,
29889,
29900,
847,
5844,
29889,
3676,
29898,
29941,
876,
13,
4706,
4974,
714,
29889,
294,
23749,
2378,
580,
6736,
448,
3806,
29918,
791,
13,
4706,
1583,
29889,
915,
29889,
3317,
29898,
690,
29892,
27815,
29922,
8516,
29892,
714,
29922,
449,
29897,
13,
4706,
4974,
714,
29889,
294,
23749,
2378,
580,
529,
3806,
29918,
791,
13,
13,
1678,
822,
1243,
29918,
29887,
17019,
29918,
1885,
29898,
1311,
1125,
13,
4706,
1180,
353,
29871,
29945,
13,
4706,
6287,
353,
29871,
29906,
29889,
29900,
13,
4706,
330,
11214,
353,
22477,
1440,
15462,
29898,
27852,
29922,
1311,
29889,
915,
29892,
1180,
29922,
2029,
29892,
6287,
29922,
7052,
29897,
13,
4706,
4974,
851,
29898,
29887,
11214,
29897,
1275,
4852,
29954,
17019,
1440,
15462,
3667,
5281,
10808,
14998,
29905,
29876,
29905,
29873,
29908,
13,
462,
795,
376,
2029,
29901,
24335,
6287,
29901,
6571,
1642,
4830,
29898,
2029,
29892,
6287,
876,
13,
4706,
620,
353,
330,
11214,
29889,
17158,
4197,
29945,
29892,
29871,
29896,
29900,
2314,
13,
4706,
4974,
620,
29889,
12181,
1275,
313,
29945,
29892,
29871,
29896,
29900,
29897,
13,
4706,
396,
14402,
29901,
1243,
4978,
310,
659,
29879,
304,
9801,
3695,
29887,
17019,
1320,
13,
13,
1678,
822,
1243,
29918,
8945,
29918,
1885,
29898,
1311,
1125,
13,
4706,
1180,
353,
448,
29906,
29889,
29945,
13,
4706,
6287,
353,
29871,
29941,
29889,
29900,
13,
4706,
330,
11214,
353,
21981,
1440,
15462,
29898,
27852,
29922,
1311,
29889,
915,
29892,
1180,
29922,
2029,
29892,
6287,
29922,
7052,
29897,
13,
4706,
4974,
851,
29898,
29887,
11214,
29897,
1275,
4852,
29954,
17019,
1440,
15462,
3667,
5281,
10808,
14998,
29905,
29876,
29905,
29873,
29908,
13,
462,
795,
376,
2029,
29901,
24335,
6287,
29901,
6571,
1642,
4830,
29898,
2029,
29892,
6287,
876,
13,
4706,
620,
353,
330,
11214,
29889,
17158,
4197,
29929,
29892,
29871,
29941,
2314,
13,
4706,
4974,
620,
29889,
12181,
1275,
313,
29929,
29892,
29871,
29941,
29897,
13,
4706,
396,
14402,
29901,
1243,
4978,
310,
659,
29879,
304,
9801,
3695,
29887,
17019,
1320,
13,
13,
1678,
822,
1243,
29918,
29879,
862,
4149,
335,
29918,
1885,
29898,
1311,
1125,
13,
4706,
805,
1503,
18543,
353,
29871,
29896,
29900,
13,
4706,
7388,
1767,
353,
29871,
29941,
29889,
29896,
13,
4706,
15761,
353,
317,
5510,
29923,
2101,
1440,
15462,
29898,
27852,
29922,
1311,
29889,
915,
29892,
805,
1503,
18543,
29922,
29879,
862,
4881,
404,
29892,
13,
462,
18884,
7388,
1767,
29922,
29872,
2101,
1767,
29897,
13,
4706,
4974,
851,
29898,
29872,
335,
29897,
1275,
4852,
29903,
5510,
29923,
2101,
1440,
15462,
3667,
5281,
10808,
14998,
29905,
29876,
29905,
29873,
29908,
13,
462,
9651,
376,
29879,
862,
4881,
404,
29901,
24335,
7388,
1767,
29901,
376,
13,
462,
9651,
376,
8875,
1642,
4830,
29898,
29879,
862,
4881,
404,
29892,
7388,
1767,
876,
13,
4706,
620,
353,
15761,
29889,
17158,
4197,
29906,
29900,
29892,
29871,
29906,
29900,
2314,
13,
4706,
4974,
620,
29889,
12181,
1275,
313,
29906,
29900,
29892,
29871,
29906,
29900,
29897,
13,
4706,
396,
14402,
29901,
1243,
4978,
310,
659,
29879,
13,
13,
1678,
822,
1243,
29918,
29876,
13183,
555,
29918,
1885,
29898,
1311,
1125,
13,
4706,
6287,
353,
29871,
29941,
29889,
29900,
13,
4706,
302,
13183,
555,
353,
9071,
19077,
1891,
1440,
15462,
29898,
27852,
29922,
1311,
29889,
915,
29892,
6287,
29922,
7052,
29897,
13,
4706,
4974,
851,
29898,
29876,
13183,
555,
29897,
1275,
4852,
4247,
19077,
1891,
1440,
15462,
3667,
5281,
10808,
14998,
29908,
13,
462,
462,
6634,
29876,
29905,
1372,
29883,
744,
29901,
6571,
1642,
4830,
29898,
7052,
876,
13,
4706,
620,
353,
302,
13183,
555,
29889,
17158,
4197,
29947,
29892,
29871,
29929,
2314,
13,
4706,
4974,
620,
29889,
12181,
1275,
313,
29947,
29892,
29871,
29929,
29897,
13,
4706,
714,
353,
1583,
29889,
915,
29889,
6310,
3552,
29896,
29892,
29871,
29896,
876,
13,
4706,
1583,
29889,
915,
29889,
1195,
29898,
690,
29892,
27815,
29922,
8516,
29892,
714,
29922,
449,
29897,
13,
4706,
3806,
29918,
791,
353,
6287,
334,
5844,
29889,
3676,
29898,
29953,
29897,
847,
5844,
29889,
3676,
29898,
29947,
718,
29871,
29929,
1846,
13,
4706,
4974,
714,
29889,
294,
23749,
2378,
580,
6736,
448,
3806,
29918,
791,
13,
4706,
1583,
29889,
915,
29889,
3317,
29898,
690,
29892,
27815,
29922,
8516,
29892,
714,
29922,
449,
29897,
13,
4706,
4974,
714,
29889,
294,
23749,
2378,
580,
529,
3806,
29918,
791,
13,
2
] |
Chapter14/c14_11_rainbow_callMaxOn2_viaSimulation.py | John-ye666/Python-for-Finance-Second-Edition | 236 | 30759 | """
Name : c14_11_rainbow_callMaxOn2_viaSimulation.py
Book : Python for Finance (2nd ed.)
Publisher: Packt Publishing Ltd.
Author : <NAME>
Date : 6/6/2017
email : <EMAIL>
<EMAIL>
"""
import scipy as sp
from scipy import zeros, sqrt, shape
#
sp.random.seed(123) # fix our random numbers
s1=100. # stock price 1
s2=95. # stock price 2
k=102.0 # exercise price
T=8./12. # maturity in years
r=0.08 # risk-free rate
rho=0.75 # correlation between 2
sigma1=0.15 # volatility for stock 1
sigma2=0.20 # volatility for stock 1
nSteps=100. # number of steps
nSimulation=1000 # number of simulations
#
# step 1: generate correlated random number
dt =T/nSteps
call = sp.zeros([nSimulation], dtype=float)
x = range(0, int(nSteps), 1)
#
# step 2: call call prices
for j in range(0, nSimulation):
x1=sp.random.normal(size=nSimulation)
x2=sp.random.normal(size=nSimulation)
y1=x1
y2=rho*x1+sp.sqrt(1-rho**2)*x2
sT1=s1
sT2=s2
for i in x[:-1]:
e1=y1[i]
e2=y2[i]
sT1*=sp.exp((r-0.5*sigma1**2)*dt+sigma1*e1*sqrt(dt))
sT2*=sp.exp((r-0.5*sigma2**2)*dt+sigma2*e2*sqrt(dt))
minOf2=min(sT1,sT2)
call[j]=max(minOf2-k,0)
#
# Step 3: summation and discount back
call=sp.mean(call)*sp.exp(-r*T)
print('Rainbow call on minimum of 2 assets = ', round(call,3))
| [
1,
9995,
13,
29871,
4408,
268,
584,
274,
29896,
29946,
29918,
29896,
29896,
29918,
6038,
17729,
29918,
4804,
7976,
2951,
29906,
29918,
6071,
8942,
2785,
29889,
2272,
13,
29871,
6726,
268,
584,
5132,
363,
4231,
749,
313,
29906,
299,
1226,
1846,
13,
29871,
12904,
261,
29901,
18744,
29873,
19088,
19806,
29889,
29871,
13,
29871,
13361,
259,
584,
529,
5813,
29958,
13,
29871,
4712,
268,
584,
29871,
29953,
29914,
29953,
29914,
29906,
29900,
29896,
29955,
13,
29871,
4876,
1678,
584,
529,
26862,
6227,
29958,
13,
632,
529,
26862,
6227,
29958,
13,
15945,
29908,
13,
13,
5215,
4560,
2272,
408,
805,
29871,
13,
3166,
4560,
2272,
1053,
24786,
29892,
18074,
2273,
29892,
8267,
29871,
13,
29937,
13,
1028,
29889,
8172,
29889,
26776,
29898,
29896,
29906,
29941,
29897,
29871,
396,
2329,
1749,
4036,
3694,
13,
29879,
29896,
29922,
29896,
29900,
29900,
29889,
795,
396,
10961,
8666,
29871,
29896,
29871,
13,
29879,
29906,
29922,
29929,
29945,
29889,
1669,
396,
10961,
8666,
29871,
29906,
13,
29895,
29922,
29896,
29900,
29906,
29889,
29900,
795,
396,
15058,
8666,
13,
29911,
29922,
29947,
6904,
29896,
29906,
29889,
632,
396,
286,
1337,
537,
297,
2440,
13,
29878,
29922,
29900,
29889,
29900,
29947,
1669,
396,
12045,
29899,
9021,
6554,
13,
4650,
29922,
29900,
29889,
29955,
29945,
632,
396,
19869,
1546,
29871,
29906,
13,
3754,
29896,
29922,
29900,
29889,
29896,
29945,
3986,
396,
1700,
271,
1793,
363,
10961,
29871,
29896,
13,
3754,
29906,
29922,
29900,
29889,
29906,
29900,
3986,
396,
1700,
271,
1793,
363,
10961,
29871,
29896,
13,
29876,
7789,
567,
29922,
29896,
29900,
29900,
29889,
3986,
396,
1353,
310,
6576,
29871,
13,
29876,
8942,
2785,
29922,
29896,
29900,
29900,
29900,
268,
396,
1353,
310,
23876,
29871,
13,
29937,
13,
29937,
4331,
29871,
29896,
29901,
5706,
8855,
630,
4036,
1353,
13,
6008,
353,
29911,
29914,
29876,
7789,
567,
29871,
13,
4804,
353,
805,
29889,
3298,
359,
4197,
29876,
8942,
2785,
1402,
26688,
29922,
7411,
29897,
29871,
13,
29916,
353,
3464,
29898,
29900,
29892,
938,
29898,
29876,
7789,
567,
511,
29871,
29896,
29897,
29871,
13,
29937,
13,
29937,
4331,
29871,
29906,
29901,
1246,
1246,
26094,
29871,
13,
1454,
432,
297,
3464,
29898,
29900,
29892,
302,
8942,
2785,
1125,
29871,
13,
1678,
921,
29896,
29922,
1028,
29889,
8172,
29889,
8945,
29898,
2311,
29922,
29876,
8942,
2785,
29897,
13,
1678,
921,
29906,
29922,
1028,
29889,
8172,
29889,
8945,
29898,
2311,
29922,
29876,
8942,
2785,
29897,
13,
1678,
343,
29896,
29922,
29916,
29896,
13,
1678,
343,
29906,
29922,
4650,
29930,
29916,
29896,
29974,
1028,
29889,
3676,
29898,
29896,
29899,
4650,
1068,
29906,
11877,
29916,
29906,
13,
1678,
269,
29911,
29896,
29922,
29879,
29896,
13,
1678,
269,
29911,
29906,
29922,
29879,
29906,
29871,
13,
1678,
363,
474,
297,
921,
7503,
29899,
29896,
5387,
29871,
13,
4706,
321,
29896,
29922,
29891,
29896,
29961,
29875,
29962,
13,
4706,
321,
29906,
29922,
29891,
29906,
29961,
29875,
29962,
13,
4706,
269,
29911,
29896,
29930,
29922,
1028,
29889,
4548,
3552,
29878,
29899,
29900,
29889,
29945,
29930,
3754,
29896,
1068,
29906,
11877,
6008,
29974,
3754,
29896,
29930,
29872,
29896,
29930,
3676,
29898,
6008,
876,
29871,
13,
4706,
269,
29911,
29906,
29930,
29922,
1028,
29889,
4548,
3552,
29878,
29899,
29900,
29889,
29945,
29930,
3754,
29906,
1068,
29906,
11877,
6008,
29974,
3754,
29906,
29930,
29872,
29906,
29930,
3676,
29898,
6008,
876,
29871,
13,
4706,
1375,
2776,
29906,
29922,
1195,
29898,
29879,
29911,
29896,
29892,
29879,
29911,
29906,
29897,
13,
4706,
1246,
29961,
29926,
13192,
3317,
29898,
1195,
2776,
29906,
29899,
29895,
29892,
29900,
29897,
29871,
13,
29937,
13,
29937,
16696,
29871,
29941,
29901,
22792,
362,
322,
2313,
792,
1250,
29871,
13,
4804,
29922,
1028,
29889,
12676,
29898,
4804,
11877,
1028,
29889,
4548,
6278,
29878,
29930,
29911,
29897,
29871,
13,
2158,
877,
29934,
475,
17729,
1246,
373,
9212,
310,
29871,
29906,
21608,
353,
13420,
4513,
29898,
4804,
29892,
29941,
876,
13,
13,
13,
13,
2
] |
python/tests/test_observation.py | lascavana/ecole | 0 | 50001 | <gh_stars>0
"""Test Ecole observation functions in Python.
Most observation functions are written in Ecole C++ library.
This is where the logic should be tested.
Here,
- Some tests automatically run the same assertions on all functions;
- Other tests that observation returned form observation functions are bound to the correct types.
"""
import unittest.mock as mock
import numpy as np
import ecole.observation as O
def test_TupleFunction(model):
"""Dispach calls and pack the result in a tuple."""
obs_func1, obs_func2 = mock.MagicMock(), mock.MagicMock()
tuple_obs_func = O.TupleFunction(obs_func1, obs_func2)
tuple_obs_func.reset(model)
obs_func1.reset.assert_called_once_with(model)
obs_func2.reset.assert_called_once_with(model)
obs_func1.obtain_observation.return_value = "something"
obs_func2.obtain_observation.return_value = "else"
obs = tuple_obs_func.obtain_observation(model)
assert obs == ("something", "else")
def test_DictFunction(model):
"""Dispach calls and pack the result in a dict."""
obs_func1, obs_func2 = mock.MagicMock(), mock.MagicMock()
dict_obs_func = O.DictFunction(name1=obs_func1, name2=obs_func2)
dict_obs_func.reset(model)
obs_func1.reset.assert_called_once_with(model)
obs_func2.reset.assert_called_once_with(model)
obs_func1.obtain_observation.return_value = "something"
obs_func2.obtain_observation.return_value = "else"
obs = dict_obs_func.obtain_observation(model)
assert obs == {"name1": "something", "name2": "else"}
def pytest_generate_tests(metafunc):
"""Parametrize the `observation_function` fixture.
Add observation functions here to have them automatically run all the tests that take
`observation_function` as input.
"""
if "observation_function" in metafunc.fixturenames:
all_observation_functions = (
O.Nothing(),
O.NodeBipartite(),
O.StrongBranchingScores(True),
O.StrongBranchingScores(False),
)
metafunc.parametrize("observation_function", all_observation_functions)
def test_default_init(observation_function):
"""Construct with default arguments."""
type(observation_function)()
def test_reset(observation_function, solving_model):
"""Successive calls to reset."""
observation_function.reset(solving_model)
observation_function.reset(solving_model)
def test_obtain_observation(observation_function, solving_model):
"""Obtain observation."""
observation_function.reset(solving_model)
observation_function.obtain_observation(solving_model)
def make_obs(obs_func, model):
obs_func.reset(model)
return obs_func.obtain_observation(model)
def assert_array(arr, ndim=1, non_empty=True, dtype=np.double):
assert isinstance(arr, np.ndarray)
assert arr.ndim == ndim
assert (not non_empty) or (arr.size > 0)
assert arr.dtype == dtype
def test_Nothing_observation(model):
"""Observation of Nothing is None."""
assert make_obs(O.Nothing(), model) is None
def test_NodeBipartite_observation(solving_model):
"""Observation of NodeBipartite is a type with array attributes."""
obs = make_obs(O.NodeBipartite(), solving_model)
assert isinstance(obs, O.NodeBipartiteObs)
assert_array(obs.column_features, ndim=2)
assert_array(obs.row_features, ndim=2)
assert_array(obs.edge_features.values)
assert_array(obs.edge_features.indices, ndim=2, dtype=np.uint64)
def test_StrongBranchingScores_observation(solving_model):
"""Observation of StrongBranchingScores is a numpy array."""
obs = make_obs(O.StrongBranchingScores(), solving_model)
assert_array(obs)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
3057,
382,
10936,
15500,
3168,
297,
5132,
29889,
13,
13,
29924,
520,
15500,
3168,
526,
3971,
297,
382,
10936,
315,
1817,
3489,
29889,
13,
4013,
338,
988,
278,
5900,
881,
367,
9528,
29889,
13,
10605,
29892,
13,
29871,
448,
3834,
6987,
6336,
1065,
278,
1021,
4974,
1080,
373,
599,
3168,
29936,
13,
29871,
448,
5901,
6987,
393,
15500,
4133,
883,
15500,
3168,
526,
3216,
304,
278,
1959,
4072,
29889,
13,
15945,
29908,
13,
13,
5215,
443,
27958,
29889,
17640,
408,
11187,
13,
13,
5215,
12655,
408,
7442,
13,
13,
5215,
321,
10936,
29889,
26739,
362,
408,
438,
13,
13,
13,
1753,
1243,
29918,
23215,
552,
6678,
29898,
4299,
1125,
13,
1678,
9995,
4205,
29886,
496,
5717,
322,
4870,
278,
1121,
297,
263,
18761,
1213,
15945,
13,
1678,
20881,
29918,
9891,
29896,
29892,
20881,
29918,
9891,
29906,
353,
11187,
29889,
19095,
293,
18680,
3285,
11187,
29889,
19095,
293,
18680,
580,
13,
1678,
18761,
29918,
26290,
29918,
9891,
353,
438,
29889,
23215,
552,
6678,
29898,
26290,
29918,
9891,
29896,
29892,
20881,
29918,
9891,
29906,
29897,
13,
13,
1678,
18761,
29918,
26290,
29918,
9891,
29889,
12071,
29898,
4299,
29897,
13,
1678,
20881,
29918,
9891,
29896,
29889,
12071,
29889,
9294,
29918,
13998,
29918,
10646,
29918,
2541,
29898,
4299,
29897,
13,
1678,
20881,
29918,
9891,
29906,
29889,
12071,
29889,
9294,
29918,
13998,
29918,
10646,
29918,
2541,
29898,
4299,
29897,
13,
13,
1678,
20881,
29918,
9891,
29896,
29889,
711,
2408,
29918,
26739,
362,
29889,
2457,
29918,
1767,
353,
376,
14481,
29908,
13,
1678,
20881,
29918,
9891,
29906,
29889,
711,
2408,
29918,
26739,
362,
29889,
2457,
29918,
1767,
353,
376,
2870,
29908,
13,
1678,
20881,
353,
18761,
29918,
26290,
29918,
9891,
29889,
711,
2408,
29918,
26739,
362,
29898,
4299,
29897,
13,
1678,
4974,
20881,
1275,
4852,
14481,
613,
376,
2870,
1159,
13,
13,
13,
1753,
1243,
29918,
21533,
6678,
29898,
4299,
1125,
13,
1678,
9995,
4205,
29886,
496,
5717,
322,
4870,
278,
1121,
297,
263,
9657,
1213,
15945,
13,
1678,
20881,
29918,
9891,
29896,
29892,
20881,
29918,
9891,
29906,
353,
11187,
29889,
19095,
293,
18680,
3285,
11187,
29889,
19095,
293,
18680,
580,
13,
1678,
9657,
29918,
26290,
29918,
9891,
353,
438,
29889,
21533,
6678,
29898,
978,
29896,
29922,
26290,
29918,
9891,
29896,
29892,
1024,
29906,
29922,
26290,
29918,
9891,
29906,
29897,
13,
13,
1678,
9657,
29918,
26290,
29918,
9891,
29889,
12071,
29898,
4299,
29897,
13,
1678,
20881,
29918,
9891,
29896,
29889,
12071,
29889,
9294,
29918,
13998,
29918,
10646,
29918,
2541,
29898,
4299,
29897,
13,
1678,
20881,
29918,
9891,
29906,
29889,
12071,
29889,
9294,
29918,
13998,
29918,
10646,
29918,
2541,
29898,
4299,
29897,
13,
13,
1678,
20881,
29918,
9891,
29896,
29889,
711,
2408,
29918,
26739,
362,
29889,
2457,
29918,
1767,
353,
376,
14481,
29908,
13,
1678,
20881,
29918,
9891,
29906,
29889,
711,
2408,
29918,
26739,
362,
29889,
2457,
29918,
1767,
353,
376,
2870,
29908,
13,
1678,
20881,
353,
9657,
29918,
26290,
29918,
9891,
29889,
711,
2408,
29918,
26739,
362,
29898,
4299,
29897,
13,
1678,
4974,
20881,
1275,
8853,
978,
29896,
1115,
376,
14481,
613,
376,
978,
29906,
1115,
376,
2870,
9092,
13,
13,
13,
1753,
11451,
1688,
29918,
17158,
29918,
21150,
29898,
7299,
9891,
1125,
13,
1678,
9995,
4736,
300,
374,
911,
278,
421,
26739,
362,
29918,
2220,
29952,
5713,
15546,
29889,
13,
13,
1678,
3462,
15500,
3168,
1244,
304,
505,
963,
6336,
1065,
599,
278,
6987,
393,
2125,
13,
1678,
421,
26739,
362,
29918,
2220,
29952,
408,
1881,
29889,
13,
1678,
9995,
13,
1678,
565,
376,
26739,
362,
29918,
2220,
29908,
297,
12700,
9891,
29889,
7241,
486,
10732,
1280,
29901,
13,
4706,
599,
29918,
26739,
362,
29918,
12171,
353,
313,
13,
9651,
438,
29889,
26521,
3285,
13,
9651,
438,
29889,
4247,
29933,
27494,
568,
3285,
13,
9651,
438,
29889,
5015,
549,
29933,
4014,
292,
4421,
2361,
29898,
5574,
511,
13,
9651,
438,
29889,
5015,
549,
29933,
4014,
292,
4421,
2361,
29898,
8824,
511,
13,
4706,
1723,
13,
4706,
12700,
9891,
29889,
3207,
300,
374,
911,
703,
26739,
362,
29918,
2220,
613,
599,
29918,
26739,
362,
29918,
12171,
29897,
13,
13,
13,
1753,
1243,
29918,
4381,
29918,
2344,
29898,
26739,
362,
29918,
2220,
1125,
13,
1678,
9995,
1168,
4984,
411,
2322,
6273,
1213,
15945,
13,
1678,
1134,
29898,
26739,
362,
29918,
2220,
29897,
580,
13,
13,
13,
1753,
1243,
29918,
12071,
29898,
26739,
362,
29918,
2220,
29892,
17069,
29918,
4299,
1125,
13,
1678,
9995,
14191,
573,
5717,
304,
10092,
1213,
15945,
13,
1678,
15500,
29918,
2220,
29889,
12071,
29898,
2929,
1747,
29918,
4299,
29897,
13,
1678,
15500,
29918,
2220,
29889,
12071,
29898,
2929,
1747,
29918,
4299,
29897,
13,
13,
13,
1753,
1243,
29918,
711,
2408,
29918,
26739,
362,
29898,
26739,
362,
29918,
2220,
29892,
17069,
29918,
4299,
1125,
13,
1678,
9995,
6039,
2408,
15500,
1213,
15945,
13,
1678,
15500,
29918,
2220,
29889,
12071,
29898,
2929,
1747,
29918,
4299,
29897,
13,
1678,
15500,
29918,
2220,
29889,
711,
2408,
29918,
26739,
362,
29898,
2929,
1747,
29918,
4299,
29897,
13,
13,
13,
1753,
1207,
29918,
26290,
29898,
26290,
29918,
9891,
29892,
1904,
1125,
13,
1678,
20881,
29918,
9891,
29889,
12071,
29898,
4299,
29897,
13,
1678,
736,
20881,
29918,
9891,
29889,
711,
2408,
29918,
26739,
362,
29898,
4299,
29897,
13,
13,
13,
1753,
4974,
29918,
2378,
29898,
2749,
29892,
29871,
299,
326,
29922,
29896,
29892,
1661,
29918,
6310,
29922,
5574,
29892,
26688,
29922,
9302,
29889,
8896,
1125,
13,
1678,
4974,
338,
8758,
29898,
2749,
29892,
7442,
29889,
299,
2378,
29897,
13,
1678,
4974,
3948,
29889,
299,
326,
1275,
29871,
299,
326,
13,
1678,
4974,
313,
1333,
1661,
29918,
6310,
29897,
470,
313,
2749,
29889,
2311,
1405,
29871,
29900,
29897,
13,
1678,
4974,
3948,
29889,
29881,
1853,
1275,
26688,
13,
13,
13,
1753,
1243,
29918,
26521,
29918,
26739,
362,
29898,
4299,
1125,
13,
1678,
9995,
6039,
2140,
362,
310,
9531,
338,
6213,
1213,
15945,
13,
1678,
4974,
1207,
29918,
26290,
29898,
29949,
29889,
26521,
3285,
1904,
29897,
338,
6213,
13,
13,
13,
1753,
1243,
29918,
4247,
29933,
27494,
568,
29918,
26739,
362,
29898,
2929,
1747,
29918,
4299,
1125,
13,
1678,
9995,
6039,
2140,
362,
310,
9071,
29933,
27494,
568,
338,
263,
1134,
411,
1409,
8393,
1213,
15945,
13,
1678,
20881,
353,
1207,
29918,
26290,
29898,
29949,
29889,
4247,
29933,
27494,
568,
3285,
17069,
29918,
4299,
29897,
13,
1678,
4974,
338,
8758,
29898,
26290,
29892,
438,
29889,
4247,
29933,
27494,
568,
29949,
5824,
29897,
13,
1678,
4974,
29918,
2378,
29898,
26290,
29889,
4914,
29918,
22100,
29892,
29871,
299,
326,
29922,
29906,
29897,
13,
1678,
4974,
29918,
2378,
29898,
26290,
29889,
798,
29918,
22100,
29892,
29871,
299,
326,
29922,
29906,
29897,
13,
1678,
4974,
29918,
2378,
29898,
26290,
29889,
12864,
29918,
22100,
29889,
5975,
29897,
13,
1678,
4974,
29918,
2378,
29898,
26290,
29889,
12864,
29918,
22100,
29889,
513,
1575,
29892,
29871,
299,
326,
29922,
29906,
29892,
26688,
29922,
9302,
29889,
13470,
29953,
29946,
29897,
13,
13,
13,
1753,
1243,
29918,
5015,
549,
29933,
4014,
292,
4421,
2361,
29918,
26739,
362,
29898,
2929,
1747,
29918,
4299,
1125,
13,
1678,
9995,
6039,
2140,
362,
310,
3767,
549,
29933,
4014,
292,
4421,
2361,
338,
263,
12655,
1409,
1213,
15945,
13,
1678,
20881,
353,
1207,
29918,
26290,
29898,
29949,
29889,
5015,
549,
29933,
4014,
292,
4421,
2361,
3285,
17069,
29918,
4299,
29897,
13,
1678,
4974,
29918,
2378,
29898,
26290,
29897,
13,
2
] |
src/algorithm/__init__.py | ShogoAkiyama/metaworld.pytorch | 0 | 21064 | <filename>src/algorithm/__init__.py
from .sac import SAC
from .eval import EvalAlgorithm
| [
1,
529,
9507,
29958,
4351,
29914,
20567,
29914,
1649,
2344,
26914,
2272,
13,
3166,
869,
29879,
562,
1053,
317,
2477,
13,
3166,
869,
14513,
1053,
382,
791,
22461,
4540,
13,
2
] |
ozone-framework-python-server/people/urls.py | aamduka/ozone | 6 | 33646 | from django.urls import path
from rest_framework import routers
from .administration.views import AdministrationOfUserAPIView
from .views import PersonDetailView, PersonDashboardsWidgetsView, PersonWidgetDefinitionViewSet, PersonStackViewset
router = routers.SimpleRouter()
router.register(r'admin/users', AdministrationOfUserAPIView)
router.register(r'admin/users-widgets', PersonWidgetDefinitionViewSet, base_name='admin_users-widgets')
urlpatterns = [
path('me/', PersonDetailView.as_view(), name='user-detail'),
path('me/dashboards-widgets/', PersonDashboardsWidgetsView.as_view(), name='user-widgets-dashboards-detail'),
path('admin/users-stacks/', PersonStackViewset.as_view(), name='admin_users-stacks')
]
urlpatterns += router.urls
| [
1,
515,
9557,
29889,
26045,
1053,
2224,
13,
3166,
1791,
29918,
4468,
1053,
16053,
2153,
13,
3166,
869,
6406,
8306,
29889,
7406,
1053,
23303,
2776,
2659,
8787,
1043,
13,
3166,
869,
7406,
1053,
5196,
16570,
1043,
29892,
5196,
29928,
1161,
24691,
8801,
29879,
1043,
29892,
5196,
8801,
14683,
1043,
2697,
29892,
5196,
7264,
1043,
842,
13,
13,
13,
15140,
353,
16053,
2153,
29889,
15427,
23971,
580,
13,
15140,
29889,
9573,
29898,
29878,
29915,
6406,
29914,
7193,
742,
23303,
2776,
2659,
8787,
1043,
29897,
13,
15140,
29889,
9573,
29898,
29878,
29915,
6406,
29914,
7193,
29899,
8030,
29879,
742,
5196,
8801,
14683,
1043,
2697,
29892,
2967,
29918,
978,
2433,
6406,
29918,
7193,
29899,
8030,
29879,
1495,
13,
13,
2271,
11037,
29879,
353,
518,
13,
1678,
2224,
877,
1004,
29914,
742,
5196,
16570,
1043,
29889,
294,
29918,
1493,
3285,
1024,
2433,
1792,
29899,
16432,
5477,
13,
1678,
2224,
877,
1004,
29914,
14592,
24691,
29899,
8030,
29879,
29914,
742,
5196,
29928,
1161,
24691,
8801,
29879,
1043,
29889,
294,
29918,
1493,
3285,
1024,
2433,
1792,
29899,
8030,
29879,
29899,
14592,
24691,
29899,
16432,
5477,
13,
1678,
2224,
877,
6406,
29914,
7193,
29899,
1429,
29879,
29914,
742,
5196,
7264,
1043,
842,
29889,
294,
29918,
1493,
3285,
1024,
2433,
6406,
29918,
7193,
29899,
1429,
29879,
1495,
13,
29962,
13,
13,
2271,
11037,
29879,
4619,
12876,
29889,
26045,
13,
2
] |
lathermail/default_settings.py | reclosedev/lathermail | 13 | 1601483 | <reponame>reclosedev/lathermail
import os
DB_URI = "sqlite:///" + os.path.expanduser("~/.lathermail.db")
DEBUG_MODE = False
SMTP_HOST = "127.0.0.1"
SMTP_PORT = 2525
API_HOST = "127.0.0.1"
API_PORT = 5000
SQLITE_FAST_SAVE = True
SQLALCHEMY_TRACK_MODIFICATIONS = False
| [
1,
529,
276,
1112,
420,
29958,
276,
15603,
5750,
29914,
29880,
1624,
2549,
13,
5215,
2897,
13,
13,
13,
4051,
29918,
15551,
353,
376,
22793,
597,
12975,
718,
2897,
29889,
2084,
29889,
18837,
1792,
703,
30022,
6294,
29880,
1624,
2549,
29889,
2585,
1159,
13,
18525,
29918,
20387,
353,
7700,
13,
17061,
3557,
29918,
20832,
353,
376,
29896,
29906,
29955,
29889,
29900,
29889,
29900,
29889,
29896,
29908,
13,
17061,
3557,
29918,
15082,
353,
29871,
29906,
29945,
29906,
29945,
13,
8787,
29918,
20832,
353,
376,
29896,
29906,
29955,
29889,
29900,
29889,
29900,
29889,
29896,
29908,
13,
8787,
29918,
15082,
353,
29871,
29945,
29900,
29900,
29900,
13,
4176,
9094,
29918,
4519,
1254,
29918,
29903,
7520,
29923,
353,
5852,
13,
4176,
1964,
3210,
12665,
29979,
29918,
5659,
11375,
29918,
6720,
4571,
29943,
28541,
29903,
353,
7700,
13,
2
] |
acquisitions/providers/fake_agency.py | 18F/acqstackdb | 2 | 91553 | <filename>acquisitions/providers/fake_agency.py<gh_stars>1-10
import random
from faker.providers import BaseProvider
class AgencyProvider(BaseProvider):
agency_parts = (
(
"Department of", "Office of", "Bureau of",
),
(
"the Interior", "Administrating", "Hats", "Management", "Labor",
"Finance", "Departments", "Flying"
)
)
big_agency_start = (
"Department of", "Office of", "Bureau of",
)
big_agency_end = (
"Administration", "Agency",
)
medium_agency_end = (
"Division", "Section",
)
small_agency_end = (
"Region", "Office", "Room",
)
extra_parts = (
"Synergy", "Failure", "High-Profile Success", "First Aid", "Gravy",
"Sandwiches", "Wine", "Budget", "Style"
)
def agency(self, size="large"):
result = []
for part in self.agency_parts:
result.append(self.random_element(part))
if random.randint(0, 100) > 70:
result.append("and")
result.append(self.random_element(self.extra_parts))
return " ".join(result)
| [
1,
529,
9507,
29958,
562,
7680,
2187,
29914,
771,
29454,
29914,
29888,
1296,
29918,
351,
3819,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
4036,
13,
3166,
285,
5790,
29889,
771,
29454,
1053,
7399,
6980,
13,
13,
13,
1990,
29353,
6980,
29898,
5160,
6980,
1125,
13,
1678,
946,
3819,
29918,
20895,
353,
313,
13,
4706,
313,
13,
9651,
376,
8498,
442,
358,
310,
613,
376,
27247,
310,
613,
376,
29933,
13411,
310,
613,
13,
4706,
10353,
13,
4706,
313,
13,
9651,
376,
1552,
4124,
1611,
613,
376,
12754,
2132,
1218,
613,
376,
29950,
1446,
613,
376,
27107,
613,
376,
29931,
3717,
613,
13,
9651,
376,
12881,
749,
613,
376,
8498,
442,
1860,
613,
376,
29943,
5890,
29908,
13,
4706,
1723,
13,
1678,
1723,
13,
13,
1678,
4802,
29918,
351,
3819,
29918,
2962,
353,
313,
13,
4706,
376,
8498,
442,
358,
310,
613,
376,
27247,
310,
613,
376,
29933,
13411,
310,
613,
13,
1678,
1723,
13,
13,
1678,
4802,
29918,
351,
3819,
29918,
355,
353,
313,
13,
4706,
376,
12754,
8306,
613,
376,
29909,
14703,
613,
13,
1678,
1723,
13,
13,
1678,
18350,
29918,
351,
3819,
29918,
355,
353,
313,
13,
4706,
376,
12596,
2459,
613,
376,
13438,
613,
13,
1678,
1723,
13,
13,
1678,
2319,
29918,
351,
3819,
29918,
355,
353,
313,
13,
4706,
376,
18457,
613,
376,
27247,
613,
376,
9588,
290,
613,
13,
1678,
1723,
13,
13,
1678,
4805,
29918,
20895,
353,
313,
13,
4706,
376,
29216,
261,
1927,
613,
376,
24155,
613,
376,
16382,
29899,
13909,
21397,
613,
376,
6730,
319,
333,
613,
376,
29954,
5705,
29891,
613,
13,
4706,
376,
29903,
392,
16416,
267,
613,
376,
29956,
457,
613,
376,
29933,
566,
657,
613,
376,
5568,
29908,
13,
1678,
1723,
13,
13,
1678,
822,
946,
3819,
29898,
1311,
29892,
2159,
543,
16961,
29908,
1125,
13,
4706,
1121,
353,
5159,
13,
4706,
363,
760,
297,
1583,
29889,
351,
3819,
29918,
20895,
29901,
13,
9651,
1121,
29889,
4397,
29898,
1311,
29889,
8172,
29918,
5029,
29898,
1595,
876,
13,
4706,
565,
4036,
29889,
9502,
524,
29898,
29900,
29892,
29871,
29896,
29900,
29900,
29897,
1405,
29871,
29955,
29900,
29901,
13,
9651,
1121,
29889,
4397,
703,
392,
1159,
13,
9651,
1121,
29889,
4397,
29898,
1311,
29889,
8172,
29918,
5029,
29898,
1311,
29889,
17833,
29918,
20895,
876,
13,
13,
4706,
736,
376,
11393,
7122,
29898,
2914,
29897,
13,
2
] |
main.py | pepetox/gae-angular-materialize | 1 | 13043 | <reponame>pepetox/gae-angular-materialize
# Copyright 2013 Google, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import json
import modelCourse as model
import webapp2
from google.appengine.api import users
def AsDict(course):
return {
'key': course.key.urlsafe(),
'author': course.author.email(),
'name': course.name,
'description': course.description,
'lang': course.lang,
'date': course.date.strftime("%B %d, %Y")
}
class RestHandler(webapp2.RequestHandler):
def dispatch(self):
# time.sleep(1)
if (users.get_current_user().email() == '<EMAIL>') | (users.get_current_user().email() == '<EMAIL>'):
super(RestHandler, self).dispatch()
else:
self.abort(402)
def SendJson(self, r):
self.response.headers['content-type'] = 'text/plain'
self.response.write(json.dumps(r))
class QueryHandler(RestHandler):
def get(self):
courses = model.All()
r = [AsDict(course) for course in courses]
self.SendJson(r)
class UpdateHandler(RestHandler):
def post(self):
r = json.loads(self.request.body)
guest = model.Update(r['key'], r['name'], r['description'], r['lang'])
r = AsDict(guest)
self.SendJson(r)
class InsertHandler(RestHandler):
def post(self):
r = json.loads(self.request.body)
course = model.Insert(r['name'], r['description'], r['lang'])
r = AsDict(course)
self.SendJson(r)
class DeleteHandler(RestHandler):
def post(self):
r = json.loads(self.request.body)
model.Delete(r['key'])
class GetUser(RestHandler):
def get(self):
user = users.get_current_user()
if user:
email = user.email()
url = users.create_logout_url(self.request.uri)
url_linktext = 'Logout'
else:
email = ''
url = users.create_login_url(self.request.uri)
url_linktext = 'Login'
r = {'user': email, 'url': url, 'url_linktext': url_linktext}
self.SendJson(r)
APP = webapp2.WSGIApplication([
('/rest/query', QueryHandler),
('/rest/insert', InsertHandler),
('/rest/delete', DeleteHandler),
('/rest/update', UpdateHandler),
('/rest/user', GetUser),
], debug=True)
| [
1,
529,
276,
1112,
420,
29958,
412,
10963,
2251,
29914,
3249,
29872,
29899,
6825,
29899,
15388,
675,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29941,
5087,
29892,
9266,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
13,
29937,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
13,
29937,
887,
1122,
4017,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
632,
1732,
597,
1636,
29889,
4288,
29889,
990,
29914,
506,
11259,
29914,
27888,
1430,
1660,
29899,
29906,
29889,
29900,
13,
29937,
13,
29937,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
13,
29937,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
13,
29937,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
27028,
1090,
278,
19245,
29889,
13,
13,
5215,
4390,
13,
13,
5215,
1904,
29907,
10242,
408,
1904,
13,
13,
5215,
1856,
932,
29906,
13,
3166,
5386,
29889,
932,
10599,
29889,
2754,
1053,
4160,
13,
13,
1753,
1094,
21533,
29898,
15775,
1125,
13,
268,
13,
1678,
736,
426,
13,
308,
13,
4706,
525,
1989,
2396,
3236,
29889,
1989,
29889,
2271,
11177,
3285,
13,
4706,
525,
8921,
2396,
3236,
29889,
8921,
29889,
5269,
3285,
13,
4706,
525,
978,
2396,
3236,
29889,
978,
29892,
13,
4706,
525,
8216,
2396,
3236,
29889,
8216,
29892,
13,
4706,
525,
3893,
2396,
3236,
29889,
3893,
29892,
13,
4706,
525,
1256,
2396,
3236,
29889,
1256,
29889,
710,
615,
603,
11702,
29933,
1273,
29881,
29892,
1273,
29979,
1159,
13,
13,
1678,
500,
13,
13,
13,
1990,
11654,
4598,
29898,
2676,
932,
29906,
29889,
3089,
4598,
1125,
13,
13,
1678,
822,
13916,
29898,
1311,
1125,
13,
4706,
396,
931,
29889,
17059,
29898,
29896,
29897,
13,
4706,
565,
313,
7193,
29889,
657,
29918,
3784,
29918,
1792,
2141,
5269,
580,
1275,
12801,
26862,
6227,
29958,
1495,
891,
313,
7193,
29889,
657,
29918,
3784,
29918,
1792,
2141,
5269,
580,
1275,
12801,
26862,
6227,
16299,
1125,
13,
9651,
2428,
29898,
15078,
4598,
29892,
1583,
467,
13369,
580,
13,
4706,
1683,
29901,
13,
13,
9651,
1583,
29889,
370,
441,
29898,
29946,
29900,
29906,
29897,
13,
308,
13,
13,
1678,
822,
15076,
8148,
29898,
1311,
29892,
364,
1125,
13,
4706,
1583,
29889,
5327,
29889,
13662,
1839,
3051,
29899,
1853,
2033,
353,
525,
726,
29914,
24595,
29915,
13,
4706,
1583,
29889,
5327,
29889,
3539,
29898,
3126,
29889,
29881,
17204,
29898,
29878,
876,
13,
13,
13,
1990,
13641,
4598,
29898,
15078,
4598,
1125,
13,
13,
1678,
822,
679,
29898,
1311,
1125,
13,
4706,
21888,
353,
1904,
29889,
3596,
580,
13,
4706,
364,
353,
518,
2887,
21533,
29898,
15775,
29897,
363,
3236,
297,
21888,
29962,
13,
4706,
1583,
29889,
12600,
8148,
29898,
29878,
29897,
13,
13,
13,
1990,
10318,
4598,
29898,
15078,
4598,
1125,
13,
13,
1678,
822,
1400,
29898,
1311,
1125,
13,
4706,
364,
353,
4390,
29889,
18132,
29898,
1311,
29889,
3827,
29889,
2587,
29897,
13,
4706,
17838,
353,
1904,
29889,
6422,
29898,
29878,
1839,
1989,
7464,
364,
1839,
978,
7464,
364,
1839,
8216,
7464,
364,
1839,
3893,
11287,
13,
4706,
364,
353,
1094,
21533,
29898,
2543,
342,
29897,
13,
4706,
1583,
29889,
12600,
8148,
29898,
29878,
29897,
13,
13,
13,
1990,
24505,
4598,
29898,
15078,
4598,
1125,
13,
13,
1678,
822,
1400,
29898,
1311,
1125,
13,
4706,
364,
353,
4390,
29889,
18132,
29898,
1311,
29889,
3827,
29889,
2587,
29897,
13,
4706,
3236,
353,
1904,
29889,
17491,
29898,
29878,
1839,
978,
7464,
364,
1839,
8216,
7464,
364,
1839,
3893,
11287,
13,
4706,
364,
353,
1094,
21533,
29898,
15775,
29897,
13,
4706,
1583,
29889,
12600,
8148,
29898,
29878,
29897,
13,
13,
13,
1990,
21267,
4598,
29898,
15078,
4598,
1125,
13,
13,
1678,
822,
1400,
29898,
1311,
1125,
13,
4706,
364,
353,
4390,
29889,
18132,
29898,
1311,
29889,
3827,
29889,
2587,
29897,
13,
4706,
1904,
29889,
12498,
29898,
29878,
1839,
1989,
11287,
13,
13,
1990,
3617,
2659,
29898,
15078,
4598,
1125,
13,
13,
1678,
822,
679,
29898,
1311,
1125,
13,
4706,
1404,
353,
4160,
29889,
657,
29918,
3784,
29918,
1792,
580,
13,
4706,
565,
1404,
29901,
13,
9651,
4876,
353,
1404,
29889,
5269,
580,
13,
9651,
3142,
353,
4160,
29889,
3258,
29918,
1188,
449,
29918,
2271,
29898,
1311,
29889,
3827,
29889,
5338,
29897,
13,
9651,
3142,
29918,
2324,
726,
353,
525,
3403,
449,
29915,
13,
4706,
1683,
29901,
13,
9651,
4876,
353,
6629,
13,
9651,
3142,
353,
4160,
29889,
3258,
29918,
7507,
29918,
2271,
29898,
1311,
29889,
3827,
29889,
5338,
29897,
13,
9651,
3142,
29918,
2324,
726,
353,
525,
11049,
29915,
13,
4706,
364,
353,
11117,
1792,
2396,
4876,
29892,
525,
2271,
2396,
3142,
29892,
525,
2271,
29918,
2324,
726,
2396,
3142,
29918,
2324,
726,
29913,
13,
4706,
1583,
29889,
12600,
8148,
29898,
29878,
29897,
13,
13,
20576,
353,
1856,
932,
29906,
29889,
7811,
29954,
29902,
4873,
4197,
13,
1678,
6702,
29914,
5060,
29914,
1972,
742,
13641,
4598,
511,
13,
1678,
6702,
29914,
5060,
29914,
7851,
742,
24505,
4598,
511,
13,
1678,
6702,
29914,
5060,
29914,
8143,
742,
21267,
4598,
511,
13,
1678,
6702,
29914,
5060,
29914,
5504,
742,
10318,
4598,
511,
13,
1678,
6702,
29914,
5060,
29914,
1792,
742,
3617,
2659,
511,
13,
1402,
4744,
29922,
5574,
29897,
13,
2
] |
apiclient_pydantic/__init__.py | ljnsn/api-client-pydantic | 0 | 1600950 | from .serializers import (
ParamsSerializer,
ResponseSerializer,
params_serializer,
response_serializer,
serialize,
serialize_all_methods,
serialize_request,
serialize_response,
)
__all__ = (
'params_serializer',
'ParamsSerializer',
'response_serializer',
'ResponseSerializer',
'serialize',
'serialize_all_methods',
'serialize_request',
'serialize_response',
)
| [
1,
515,
869,
15550,
19427,
1053,
313,
13,
1678,
1459,
2232,
17679,
29892,
13,
1678,
13291,
17679,
29892,
13,
1678,
8636,
29918,
15550,
3950,
29892,
13,
1678,
2933,
29918,
15550,
3950,
29892,
13,
1678,
28755,
29892,
13,
1678,
28755,
29918,
497,
29918,
23515,
29892,
13,
1678,
28755,
29918,
3827,
29892,
13,
1678,
28755,
29918,
5327,
29892,
13,
29897,
13,
13,
1649,
497,
1649,
353,
313,
13,
1678,
525,
7529,
29918,
15550,
3950,
742,
13,
1678,
525,
9629,
17679,
742,
13,
1678,
525,
5327,
29918,
15550,
3950,
742,
13,
1678,
525,
5103,
17679,
742,
13,
1678,
525,
643,
6646,
742,
13,
1678,
525,
643,
6646,
29918,
497,
29918,
23515,
742,
13,
1678,
525,
643,
6646,
29918,
3827,
742,
13,
1678,
525,
643,
6646,
29918,
5327,
742,
13,
29897,
13,
2
] |
src/driver.py | 01mu/gamefaqs-scraper | 1 | 38050 | #
# gamefaqs-scraper
# github.com/01mu
#
from gamefaqs_scraper import GFSBoard
from gamefaqs_scraper import GFSThread
board = GFSBoard()
board.get_site('234547-super-smash-bros-ultimate', 0)
threads = board.find()
print("Pages: " + str(board.max_page) + "\n")
for i in range(len(threads)):
print(threads[i].title + "\n" + threads[i].author + "\n" + threads[i].last
+ "\n" + threads[i].replies + "\n" + threads[i].link + "\n")
'''
thread = GFSThread()
thread.get_site('234547-super-smash-bros-ultimate/77126753', 0)
posts = thread.find()
print("Pages: " + str(thread.max_page) + "\n")
for i in range(len(posts)):
print(posts[i].author + "\n" + posts[i].date + "\n" + posts[i].body + "\n")
'''
| [
1,
396,
13,
29937,
3748,
5444,
29939,
29879,
29899,
1557,
336,
546,
13,
29937,
18546,
29889,
510,
29914,
29900,
29896,
2589,
13,
29937,
13,
13,
3166,
3748,
5444,
29939,
29879,
29918,
1557,
336,
546,
1053,
402,
29943,
1744,
29877,
538,
13,
3166,
3748,
5444,
29939,
29879,
29918,
1557,
336,
546,
1053,
402,
29943,
1254,
29882,
949,
13,
13,
3377,
353,
402,
29943,
1744,
29877,
538,
580,
13,
3377,
29889,
657,
29918,
2746,
877,
29906,
29941,
29946,
29945,
29946,
29955,
29899,
9136,
29899,
3844,
1161,
29899,
29890,
1883,
29899,
499,
6490,
742,
29871,
29900,
29897,
13,
28993,
353,
7613,
29889,
2886,
580,
13,
13,
2158,
703,
27514,
29901,
376,
718,
851,
29898,
3377,
29889,
3317,
29918,
3488,
29897,
718,
6634,
29876,
1159,
13,
13,
1454,
474,
297,
3464,
29898,
2435,
29898,
28993,
22164,
13,
1678,
1596,
29898,
28993,
29961,
29875,
1822,
3257,
718,
6634,
29876,
29908,
718,
9717,
29961,
29875,
1822,
8921,
718,
6634,
29876,
29908,
718,
9717,
29961,
29875,
1822,
4230,
13,
4706,
718,
6634,
29876,
29908,
718,
9717,
29961,
29875,
1822,
3445,
3687,
718,
6634,
29876,
29908,
718,
9717,
29961,
29875,
1822,
2324,
718,
6634,
29876,
1159,
13,
13,
12008,
13,
7097,
353,
402,
29943,
1254,
29882,
949,
580,
13,
7097,
29889,
657,
29918,
2746,
877,
29906,
29941,
29946,
29945,
29946,
29955,
29899,
9136,
29899,
3844,
1161,
29899,
29890,
1883,
29899,
499,
6490,
29914,
29955,
29955,
29896,
29906,
29953,
29955,
29945,
29941,
742,
29871,
29900,
29897,
13,
13,
14080,
353,
3244,
29889,
2886,
580,
13,
13,
2158,
703,
27514,
29901,
376,
718,
851,
29898,
7097,
29889,
3317,
29918,
3488,
29897,
718,
6634,
29876,
1159,
13,
13,
1454,
474,
297,
3464,
29898,
2435,
29898,
14080,
22164,
13,
1678,
1596,
29898,
14080,
29961,
29875,
1822,
8921,
718,
6634,
29876,
29908,
718,
11803,
29961,
29875,
1822,
1256,
718,
6634,
29876,
29908,
718,
11803,
29961,
29875,
1822,
2587,
718,
6634,
29876,
1159,
13,
12008,
13,
2
] |
LeetCode/0101. Symmetric Tree.py | null-kryptonian/ProblemSolving | 1 | 80328 | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def isMirror(self, r1: TreeNode, r2: TreeNode) -> bool:
if r1 == None and r2 == None:
return True
if r1 == None or r2 == None:
return False
return (r1.val == r2.val) and self.isMirror(r1.left, r2.right) and self.isMirror(r1.right, r2.left)
def isSymmetric(self, root: TreeNode) -> bool:
return self.isMirror(root, root)
| [
1,
396,
21940,
363,
263,
7581,
5447,
2943,
29889,
13,
29937,
770,
15472,
4247,
29901,
13,
29937,
268,
822,
4770,
2344,
12035,
1311,
29892,
659,
29922,
29900,
29892,
2175,
29922,
8516,
29892,
1492,
29922,
8516,
1125,
13,
29937,
308,
1583,
29889,
791,
353,
659,
13,
29937,
308,
1583,
29889,
1563,
353,
2175,
13,
29937,
308,
1583,
29889,
1266,
353,
1492,
13,
1990,
24380,
29901,
13,
1678,
822,
338,
29924,
381,
729,
29898,
1311,
29892,
364,
29896,
29901,
15472,
4247,
29892,
364,
29906,
29901,
15472,
4247,
29897,
1599,
6120,
29901,
13,
4706,
565,
364,
29896,
1275,
6213,
322,
364,
29906,
1275,
6213,
29901,
13,
9651,
736,
5852,
13,
4706,
565,
364,
29896,
1275,
6213,
470,
364,
29906,
1275,
6213,
29901,
13,
9651,
736,
7700,
13,
308,
13,
4706,
736,
313,
29878,
29896,
29889,
791,
1275,
364,
29906,
29889,
791,
29897,
322,
1583,
29889,
275,
29924,
381,
729,
29898,
29878,
29896,
29889,
1563,
29892,
364,
29906,
29889,
1266,
29897,
322,
1583,
29889,
275,
29924,
381,
729,
29898,
29878,
29896,
29889,
1266,
29892,
364,
29906,
29889,
1563,
29897,
13,
308,
13,
1678,
822,
338,
25548,
16414,
29898,
1311,
29892,
3876,
29901,
15472,
4247,
29897,
1599,
6120,
29901,
13,
4706,
736,
1583,
29889,
275,
29924,
381,
729,
29898,
4632,
29892,
3876,
29897,
13,
308,
2
] |
utils/__init__.py | ilvar/lotien | 0 | 56466 | <gh_stars>0
from django.conf import settings
from django.core.files.storage import get_storage_class
thumbnail_storage = get_storage_class(settings.DEFAULT_FILE_STORAGE)()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
3221,
29889,
5325,
29889,
12925,
1053,
679,
29918,
12925,
29918,
1990,
13,
13,
386,
21145,
29918,
12925,
353,
679,
29918,
12925,
29918,
1990,
29898,
11027,
29889,
23397,
29918,
7724,
29918,
1254,
1955,
10461,
29897,
580,
13,
2
] |
mosqito/functions/sharpness/comp_sharpness.py | JosemaAlvarez/MoSQITo | 0 | 137793 | <reponame>JosemaAlvarez/MoSQITo
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 16 10:00:50 2020
@author: wantysal
"""
import sys
sys.path.append('../..')
# Standard library import
import numpy as np
# Local imports
from mosqito.functions.loudness_zwicker.comp_loudness import comp_loudness
from mosqito.functions.sharpness.sharpness_aures import comp_sharpness_aures
from mosqito.functions.sharpness.sharpness_din import comp_sharpness_din
from mosqito.functions.sharpness.sharpness_bismarck import comp_sharpness_bismarck
from mosqito.functions.sharpness.sharpness_fastl import comp_sharpness_fastl
def comp_sharpness(is_stationary, signal, fs, method='din', skip=0):
""" Acoustic sharpness calculation according to different methods:
Aures, <NAME>, DIN 45692, Fastl
Parameters:
----------
is_stationary: boolean
True if the signal is stationary, false if it is time varying
signal: numpy.array
time history values
fs: integer
sampling frequency
method: string
'din' by default,'aures', 'bismarck','fastl'
skip : float
number of second to be cut at the beginning of the analysis
Outputs
------
S : float
sharpness value
"""
if method!= 'din' and method!='aures' and method !='fastl' and method != 'bismarck' :
raise ValueError("ERROR: method must be 'din', 'aures', 'bismarck', 'fastl'")
loudness = comp_loudness(is_stationary, signal, fs)
if method == 'din':
S = comp_sharpness_din(loudness['values'], loudness['specific values'], is_stationary )
elif method == 'aures':
S = comp_sharpness_aures(loudness['values'], loudness['specific values'], is_stationary )
elif method == 'bismarck':
S = comp_sharpness_bismarck(loudness['values'], loudness['specific values'], is_stationary )
elif method == 'fastl':
S = comp_sharpness_fastl(loudness['values'], loudness['specific values'], is_stationary )
if is_stationary == False:
# Cut transient effect
time = np.linspace(0, len(signal/fs, len(S)))
cut_index = np.argmin(np.abs(time - skip))
S = S[cut_index:]
output = {
"name" : "sharpness",
"method" : method,
"values" : S,
"skip" : skip
}
return output | [
1,
529,
276,
1112,
420,
29958,
29967,
359,
2603,
2499,
5280,
29920,
29914,
22638,
29903,
29984,
29902,
1762,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
20399,
373,
2598,
2864,
29871,
29896,
29953,
29871,
29896,
29900,
29901,
29900,
29900,
29901,
29945,
29900,
29871,
29906,
29900,
29906,
29900,
13,
13,
29992,
8921,
29901,
864,
952,
284,
13,
15945,
29908,
13,
13,
5215,
10876,
13,
9675,
29889,
2084,
29889,
4397,
877,
6995,
636,
1495,
13,
13,
29937,
10117,
3489,
1053,
13,
5215,
12655,
408,
7442,
13,
13,
29937,
9959,
24802,
13,
3166,
19767,
29939,
2049,
29889,
12171,
29889,
29880,
2736,
2264,
29918,
7659,
6541,
29889,
2388,
29918,
29880,
2736,
2264,
1053,
752,
29918,
29880,
2736,
2264,
13,
3166,
19767,
29939,
2049,
29889,
12171,
29889,
22064,
2264,
29889,
22064,
2264,
29918,
29874,
1973,
1053,
752,
29918,
22064,
2264,
29918,
29874,
1973,
13,
3166,
19767,
29939,
2049,
29889,
12171,
29889,
22064,
2264,
29889,
22064,
2264,
29918,
24581,
1053,
752,
29918,
22064,
2264,
29918,
24581,
13,
3166,
19767,
29939,
2049,
29889,
12171,
29889,
22064,
2264,
29889,
22064,
2264,
29918,
29890,
1608,
279,
384,
1053,
752,
29918,
22064,
2264,
29918,
29890,
1608,
279,
384,
13,
3166,
19767,
29939,
2049,
29889,
12171,
29889,
22064,
2264,
29889,
22064,
2264,
29918,
11255,
29880,
1053,
752,
29918,
22064,
2264,
29918,
11255,
29880,
13,
13,
13,
1753,
752,
29918,
22064,
2264,
29898,
275,
29918,
19569,
653,
29892,
7182,
29892,
18920,
29892,
1158,
2433,
24581,
742,
14383,
29922,
29900,
1125,
13,
1678,
9995,
7255,
18291,
293,
15301,
2264,
13944,
5034,
304,
1422,
3519,
29901,
13,
4706,
319,
1973,
29892,
529,
5813,
10202,
360,
1177,
29871,
29946,
29945,
29953,
29929,
29906,
29892,
23786,
29880,
13,
29871,
13,
1678,
12662,
2699,
29901,
13,
1678,
448,
1378,
29899,
13,
1678,
338,
29918,
19569,
653,
29901,
7223,
13,
4706,
5852,
565,
278,
7182,
338,
5073,
653,
29892,
2089,
565,
372,
338,
931,
24099,
13,
1678,
7182,
29901,
12655,
29889,
2378,
13,
4706,
931,
4955,
1819,
13,
1678,
18920,
29901,
6043,
13,
4706,
23460,
10868,
13,
1678,
1158,
29901,
1347,
13,
4706,
525,
24581,
29915,
491,
2322,
5501,
29874,
1973,
742,
525,
29890,
1608,
279,
384,
3788,
11255,
29880,
29915,
13,
1678,
14383,
584,
5785,
13,
4706,
1353,
310,
1473,
304,
367,
5700,
472,
278,
6763,
310,
278,
7418,
13,
308,
13,
1678,
10604,
29879,
13,
1678,
448,
23648,
13,
1678,
317,
584,
5785,
13,
1678,
15301,
2264,
995,
13,
462,
4706,
13,
1678,
9995,
13,
268,
13,
1678,
565,
1158,
19216,
525,
24581,
29915,
322,
1158,
29991,
2433,
29874,
1973,
29915,
322,
1158,
1738,
2433,
11255,
29880,
29915,
322,
1158,
2804,
525,
29890,
1608,
279,
384,
29915,
584,
13,
4706,
12020,
7865,
2392,
703,
11432,
29901,
1158,
1818,
367,
525,
24581,
742,
525,
29874,
1973,
742,
525,
29890,
1608,
279,
384,
742,
525,
11255,
29880,
29915,
1159,
13,
13,
1678,
22526,
2264,
353,
752,
29918,
29880,
2736,
2264,
29898,
275,
29918,
19569,
653,
29892,
7182,
29892,
18920,
29897,
13,
268,
13,
1678,
565,
1158,
1275,
525,
24581,
2396,
13,
4706,
317,
353,
752,
29918,
22064,
2264,
29918,
24581,
29898,
29880,
2736,
2264,
1839,
5975,
7464,
22526,
2264,
1839,
14940,
1819,
7464,
338,
29918,
19569,
653,
1723,
539,
13,
13,
1678,
25342,
1158,
1275,
525,
29874,
1973,
2396,
13,
4706,
317,
353,
752,
29918,
22064,
2264,
29918,
29874,
1973,
29898,
29880,
2736,
2264,
1839,
5975,
7464,
22526,
2264,
1839,
14940,
1819,
7464,
338,
29918,
19569,
653,
1723,
29871,
13,
13,
1678,
25342,
1158,
1275,
525,
29890,
1608,
279,
384,
2396,
13,
4706,
317,
353,
752,
29918,
22064,
2264,
29918,
29890,
1608,
279,
384,
29898,
29880,
2736,
2264,
1839,
5975,
7464,
22526,
2264,
1839,
14940,
1819,
7464,
338,
29918,
19569,
653,
1723,
1678,
13,
462,
29871,
13,
1678,
25342,
1158,
1275,
525,
11255,
29880,
2396,
13,
4706,
317,
353,
752,
29918,
22064,
2264,
29918,
11255,
29880,
29898,
29880,
2736,
2264,
1839,
5975,
7464,
22526,
2264,
1839,
14940,
1819,
7464,
338,
29918,
19569,
653,
1723,
29871,
13,
418,
13,
1678,
565,
338,
29918,
19569,
653,
1275,
7700,
29901,
13,
1678,
396,
315,
329,
1301,
993,
2779,
13,
4706,
931,
353,
7442,
29889,
1915,
3493,
29898,
29900,
29892,
7431,
29898,
25436,
29914,
5847,
29892,
7431,
29898,
29903,
4961,
13,
4706,
5700,
29918,
2248,
353,
7442,
29889,
1191,
1195,
29898,
9302,
29889,
6897,
29898,
2230,
448,
14383,
876,
13,
4706,
317,
353,
317,
29961,
7582,
29918,
2248,
17531,
13,
268,
13,
1678,
1962,
353,
426,
13,
4706,
376,
978,
29908,
584,
376,
22064,
2264,
613,
13,
4706,
376,
5696,
29908,
584,
1158,
29892,
13,
4706,
376,
5975,
29908,
584,
317,
29892,
13,
4706,
376,
11014,
29908,
584,
14383,
13,
9651,
500,
13,
268,
13,
1678,
736,
1962,
2
] |
color/closest_term_colors.py | nixprime/jhome | 0 | 121970 | <reponame>nixprime/jhome
#!/usr/bin/env python
from __future__ import print_function
import fileinput
import math
import re
import jcolor
CTERM_LAB = {code: jcolor.TERM256_RGB[code].to_xyz().to_lab()
for code in xrange(16, 256)}
def color_dist(x_lab, y_lab):
dl = x_lab.L - y_lab.L
da = x_lab.a - y_lab.a
db = x_lab.b - y_lab.b
return math.sqrt(dl*dl + da*da + db*db)
def closest_term_color(srgb):
lab = srgb.to_xyz().to_lab()
closest_code = 16
closest_dist = color_dist(lab, CTERM_LAB[16])
for code in xrange(17, 256):
dist = color_dist(lab, CTERM_LAB[code])
if dist < closest_dist:
closest_code = code
closest_dist = dist
return closest_code
if __name__ == "__main__":
hex_str_re = re.compile(r"#[0-9a-fA-F]{6}")
for line in fileinput.input():
for hex_str in hex_str_re.findall(line):
code = closest_term_color(jcolor.sRGBColor.from_str(hex_str))
print("%s => %d (%s)" % (
hex_str, code, str(jcolor.TERM256_RGB[code])))
| [
1,
529,
276,
1112,
420,
29958,
29876,
861,
10080,
29914,
29926,
5184,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
13,
5215,
934,
2080,
13,
5215,
5844,
13,
5215,
337,
13,
13,
5215,
432,
2780,
13,
13,
1783,
1001,
29924,
29918,
24461,
353,
426,
401,
29901,
432,
2780,
29889,
4945,
29924,
29906,
29945,
29953,
29918,
28212,
29961,
401,
1822,
517,
29918,
20230,
2141,
517,
29918,
8205,
580,
13,
632,
363,
775,
297,
921,
3881,
29898,
29896,
29953,
29892,
29871,
29906,
29945,
29953,
2915,
13,
13,
1753,
2927,
29918,
5721,
29898,
29916,
29918,
8205,
29892,
343,
29918,
8205,
1125,
13,
1678,
270,
29880,
353,
921,
29918,
8205,
29889,
29931,
448,
343,
29918,
8205,
29889,
29931,
13,
1678,
1146,
353,
921,
29918,
8205,
29889,
29874,
448,
343,
29918,
8205,
29889,
29874,
13,
1678,
4833,
353,
921,
29918,
8205,
29889,
29890,
448,
343,
29918,
8205,
29889,
29890,
13,
1678,
736,
5844,
29889,
3676,
29898,
11671,
29930,
11671,
718,
1146,
29930,
1388,
718,
4833,
29930,
2585,
29897,
13,
13,
1753,
21438,
29918,
8489,
29918,
2780,
29898,
29879,
23973,
1125,
13,
1678,
9775,
353,
269,
23973,
29889,
517,
29918,
20230,
2141,
517,
29918,
8205,
580,
13,
1678,
21438,
29918,
401,
353,
29871,
29896,
29953,
13,
1678,
21438,
29918,
5721,
353,
2927,
29918,
5721,
29898,
8205,
29892,
315,
4945,
29924,
29918,
24461,
29961,
29896,
29953,
2314,
13,
1678,
363,
775,
297,
921,
3881,
29898,
29896,
29955,
29892,
29871,
29906,
29945,
29953,
1125,
13,
4706,
1320,
353,
2927,
29918,
5721,
29898,
8205,
29892,
315,
4945,
29924,
29918,
24461,
29961,
401,
2314,
13,
4706,
565,
1320,
529,
21438,
29918,
5721,
29901,
13,
9651,
21438,
29918,
401,
353,
775,
13,
9651,
21438,
29918,
5721,
353,
1320,
13,
1678,
736,
21438,
29918,
401,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
15090,
29918,
710,
29918,
276,
353,
337,
29889,
12198,
29898,
29878,
29908,
29937,
29961,
29900,
29899,
29929,
29874,
29899,
29888,
29909,
29899,
29943,
3199,
29953,
27195,
13,
1678,
363,
1196,
297,
934,
2080,
29889,
2080,
7295,
13,
4706,
363,
15090,
29918,
710,
297,
15090,
29918,
710,
29918,
276,
29889,
2886,
497,
29898,
1220,
1125,
13,
9651,
775,
353,
21438,
29918,
8489,
29918,
2780,
29898,
29926,
2780,
29889,
29879,
28212,
3306,
29889,
3166,
29918,
710,
29898,
20970,
29918,
710,
876,
13,
9651,
1596,
11702,
29879,
1149,
1273,
29881,
313,
29995,
29879,
5513,
1273,
313,
13,
462,
1678,
15090,
29918,
710,
29892,
775,
29892,
851,
29898,
29926,
2780,
29889,
4945,
29924,
29906,
29945,
29953,
29918,
28212,
29961,
401,
29962,
4961,
13,
13,
2
] |
.mypy/type_coverage.py | MatthewWilkes/pyramid-realworld-example-app | 0 | 141574 | <gh_stars>0
"""Verify that minimum type coverage is reached."""
from pathlib import Path
import argparse
import sys
def main(argv=sys.argv) -> None: # pragma: no cover
"""Run type coverage check."""
parser = argparse.ArgumentParser(
usage=("python type_coverage.py coverage=80 file=typecov/linecount.txt \n")
)
parser.add_argument(
"coverage",
type=float,
metavar="<coverage>",
help="Minimum required type coverage.",
)
parser.add_argument(
"file",
type=str,
metavar="<file>",
help="File with line count type coverage report.",
)
args = parser.parse_args()
report = Path(args.file)
min_coverage = args.coverage
if not report.is_file():
sys.stdout.write(f"ERROR Line count report file not found on: {report}\n")
sys.exit(1)
with open(report) as f:
coverage_summary = f.readline()
if not coverage_summary:
sys.stdout.write(f"ERROR Line count report file {report} is empty.\n")
sys.exit(1)
values = coverage_summary.split()
coverage = int(values[0]) / int(values[1]) * 100
if coverage >= min_coverage:
sys.stdout.write(f"Total coverage: {coverage}%\n")
sys.exit(0)
else:
sys.stdout.write(
f"FAIL Required type coverage of {min_coverage}% not reached. Total coverage: {coverage}%\n"
)
sys.exit(1)
if __name__ == "__main__":
main()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
15945,
29908,
6565,
1598,
393,
9212,
1134,
23746,
338,
7450,
1213,
15945,
13,
13,
3166,
2224,
1982,
1053,
10802,
13,
13,
5215,
1852,
5510,
13,
5215,
10876,
13,
13,
13,
1753,
1667,
29898,
19218,
29922,
9675,
29889,
19218,
29897,
1599,
6213,
29901,
29871,
396,
282,
23929,
29901,
694,
4612,
13,
1678,
9995,
6558,
1134,
23746,
1423,
1213,
15945,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
29898,
13,
4706,
8744,
29922,
703,
4691,
1134,
29918,
11911,
482,
29889,
2272,
23746,
29922,
29947,
29900,
934,
29922,
1853,
24542,
29914,
1220,
2798,
29889,
3945,
320,
29876,
1159,
13,
1678,
1723,
13,
1678,
13812,
29889,
1202,
29918,
23516,
29898,
13,
4706,
376,
11911,
482,
613,
13,
4706,
1134,
29922,
7411,
29892,
13,
4706,
1539,
485,
279,
543,
29966,
11911,
482,
28341,
13,
4706,
1371,
543,
8140,
12539,
3734,
1134,
23746,
19602,
13,
1678,
1723,
13,
1678,
13812,
29889,
1202,
29918,
23516,
29898,
13,
4706,
376,
1445,
613,
13,
4706,
1134,
29922,
710,
29892,
13,
4706,
1539,
485,
279,
543,
29966,
1445,
28341,
13,
4706,
1371,
543,
2283,
411,
1196,
2302,
1134,
23746,
3461,
19602,
13,
1678,
1723,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
1678,
3461,
353,
10802,
29898,
5085,
29889,
1445,
29897,
13,
1678,
1375,
29918,
11911,
482,
353,
6389,
29889,
11911,
482,
13,
1678,
565,
451,
3461,
29889,
275,
29918,
1445,
7295,
13,
4706,
10876,
29889,
25393,
29889,
3539,
29898,
29888,
29908,
11432,
7407,
2302,
3461,
934,
451,
1476,
373,
29901,
426,
12276,
1012,
29876,
1159,
13,
4706,
10876,
29889,
13322,
29898,
29896,
29897,
13,
1678,
411,
1722,
29898,
12276,
29897,
408,
285,
29901,
13,
4706,
23746,
29918,
7727,
353,
285,
29889,
949,
1220,
580,
13,
1678,
565,
451,
23746,
29918,
7727,
29901,
13,
4706,
10876,
29889,
25393,
29889,
3539,
29898,
29888,
29908,
11432,
7407,
2302,
3461,
934,
426,
12276,
29913,
338,
4069,
7790,
29876,
1159,
13,
4706,
10876,
29889,
13322,
29898,
29896,
29897,
13,
1678,
1819,
353,
23746,
29918,
7727,
29889,
5451,
580,
13,
1678,
23746,
353,
938,
29898,
5975,
29961,
29900,
2314,
847,
938,
29898,
5975,
29961,
29896,
2314,
334,
29871,
29896,
29900,
29900,
13,
13,
1678,
565,
23746,
6736,
1375,
29918,
11911,
482,
29901,
13,
4706,
10876,
29889,
25393,
29889,
3539,
29898,
29888,
29908,
11536,
23746,
29901,
426,
11911,
482,
10560,
29905,
29876,
1159,
13,
4706,
10876,
29889,
13322,
29898,
29900,
29897,
13,
1678,
1683,
29901,
13,
4706,
10876,
29889,
25393,
29889,
3539,
29898,
13,
9651,
285,
29908,
4519,
6227,
830,
5958,
1134,
23746,
310,
426,
1195,
29918,
11911,
482,
10560,
451,
7450,
29889,
14990,
23746,
29901,
426,
11911,
482,
10560,
29905,
29876,
29908,
13,
4706,
1723,
13,
4706,
10876,
29889,
13322,
29898,
29896,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1667,
580,
13,
2
] |
Subsets and Splits