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
|
---|---|---|---|---|---|
ekmap_core/qgs_symbology_parser/categories_symbol_parser.py | eKMap/ekmap-publisher-for-qgis | 4 | 173321 | from .symbology_parser import SymbologyParser
class CategoriesSymbolParser(SymbologyParser):
def parse(self, renderer, exporter):
styles = []
selectedProperty = renderer.classAttribute()
# Find else conditions:
otherValues = self.__getDetailOtherValues(renderer.dump())
elseFilter = self.__buildElseFilter(selectedProperty, otherValues)
pointDict = {}
pointFallback = ''
for category in renderer.categories():
# Check active
if not category.renderState():
continue
symbol = category.symbol()
styleLayers = self._wrapSymbolLayer(symbol, exporter)
# Get filter
currentFilter = self.__getFilter(selectedProperty, category)
# for styleLayer in styleLayers:
# styleLayer['layout']['visibility'] = 'visible'
if symbol.type() != 0: # Is LINE or POLYGON
if currentFilter is None:
currentFilter = elseFilter
# Apply filter for layers
for styleLayer in styleLayers:
styleLayer['filter'] = currentFilter
styles.extend(styleLayers)
else: # POINT
key = self.__extractIconKey(styleLayers)
if currentFilter is None:
pointFallback = key
else:
pointDict[key] = currentFilter
pointStyle = self.__parsePoint(pointDict, pointFallback)
if pointStyle is not None:
styles.append(pointStyle)
return styles
def __getDetailOtherValues(self, dump):
categoryDumps = dump.split('\n')
otherValues = []
for categoryDump in categoryDumps:
lineSplit = categoryDump.split('::')
if len(lineSplit) > 1 and lineSplit[0] != '':
otherValues.append(lineSplit[0])
return otherValues
def __buildElseFilter(self, selectedProperty, otherValues):
return [
"!",
[
"in",
[
"get",
selectedProperty
],
[
"literal",
otherValues
]
]
]
def __parseFilter(self, selectedProperty, value):
return [
"==",
[
"get",
selectedProperty,
],
value
]
def __getFilter(self, selectedProperty, category):
dummyInfos = category.dump().split('::')
if dummyInfos[0] != '':
return self.__parseFilter(selectedProperty, category.value())
else:
return None
def __extractIconKey(self, styleLayers):
# In case Symbol Icon, there is only one styleLayer
if len(styleLayers) > 0:
styleLayer = styleLayers[0]
key = styleLayer['layout']['icon-image']
return key
else:
return None
def __parsePoint(self, pointDict, pointDefault):
if len(pointDict) == 0:
return None
else:
case = []
case.append('case')
for key in pointDict:
case.append(pointDict[key]) # condition
case.append(key) # image name
case.append(pointDefault)
return {
'type': 'symbol',
'layout': {
'icon-image': case
}
} | [
1,
515,
869,
11967,
29890,
3002,
29918,
16680,
1053,
10667,
29890,
3002,
11726,
13,
13,
1990,
315,
14404,
14730,
11726,
29898,
25548,
29890,
3002,
11726,
1125,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
4050,
261,
29892,
1518,
9555,
1125,
13,
4706,
11949,
353,
5159,
13,
4706,
4629,
4854,
353,
4050,
261,
29889,
1990,
6708,
580,
13,
13,
4706,
396,
10987,
1683,
5855,
29901,
13,
4706,
916,
9065,
353,
1583,
17255,
657,
16570,
16107,
9065,
29898,
9482,
261,
29889,
15070,
3101,
13,
4706,
1683,
5072,
353,
1583,
17255,
4282,
27406,
5072,
29898,
8391,
4854,
29892,
916,
9065,
29897,
13,
13,
4706,
1298,
21533,
353,
6571,
13,
4706,
1298,
29943,
497,
1627,
353,
6629,
13,
4706,
363,
7663,
297,
4050,
261,
29889,
20683,
7295,
13,
9651,
396,
5399,
6136,
13,
9651,
565,
451,
7663,
29889,
9482,
2792,
7295,
13,
18884,
6773,
13,
13,
9651,
5829,
353,
7663,
29889,
18098,
580,
13,
9651,
3114,
29931,
388,
414,
353,
1583,
3032,
6312,
14730,
14420,
29898,
18098,
29892,
1518,
9555,
29897,
13,
9651,
396,
3617,
4175,
13,
9651,
1857,
5072,
353,
1583,
17255,
657,
5072,
29898,
8391,
4854,
29892,
7663,
29897,
13,
632,
13,
9651,
396,
363,
3114,
14420,
297,
3114,
29931,
388,
414,
29901,
13,
9651,
396,
268,
3114,
14420,
1839,
2680,
16215,
28814,
2033,
353,
525,
12872,
29915,
13,
13,
9651,
565,
5829,
29889,
1853,
580,
2804,
29871,
29900,
29901,
396,
1317,
365,
8895,
470,
349,
5607,
29979,
29954,
1164,
13,
18884,
565,
1857,
5072,
338,
6213,
29901,
13,
462,
1678,
1857,
5072,
353,
1683,
5072,
13,
18884,
396,
2401,
368,
4175,
363,
15359,
13,
18884,
363,
3114,
14420,
297,
3114,
29931,
388,
414,
29901,
13,
462,
1678,
3114,
14420,
1839,
4572,
2033,
353,
1857,
5072,
13,
18884,
11949,
29889,
21843,
29898,
3293,
29931,
388,
414,
29897,
29871,
13,
9651,
1683,
29901,
396,
349,
6992,
29911,
13,
18884,
1820,
353,
1583,
17255,
21111,
12492,
2558,
29898,
3293,
29931,
388,
414,
29897,
13,
18884,
565,
1857,
5072,
338,
6213,
29901,
13,
462,
1678,
1298,
29943,
497,
1627,
353,
1820,
13,
18884,
1683,
29901,
13,
462,
1678,
1298,
21533,
29961,
1989,
29962,
353,
1857,
5072,
13,
4706,
1298,
5568,
353,
1583,
17255,
5510,
5228,
29898,
3149,
21533,
29892,
1298,
29943,
497,
1627,
29897,
13,
4706,
565,
1298,
5568,
338,
451,
6213,
29901,
13,
9651,
11949,
29889,
4397,
29898,
3149,
5568,
29897,
13,
4706,
736,
11949,
13,
13,
1678,
822,
4770,
657,
16570,
16107,
9065,
29898,
1311,
29892,
16766,
1125,
13,
4706,
7663,
29928,
17204,
353,
16766,
29889,
5451,
28909,
29876,
1495,
13,
4706,
916,
9065,
353,
5159,
13,
4706,
363,
7663,
29928,
3427,
297,
7663,
29928,
17204,
29901,
13,
9651,
1196,
18772,
353,
7663,
29928,
3427,
29889,
5451,
877,
1057,
1495,
13,
9651,
565,
7431,
29898,
1220,
18772,
29897,
1405,
29871,
29896,
322,
1196,
18772,
29961,
29900,
29962,
2804,
525,
2396,
13,
18884,
916,
9065,
29889,
4397,
29898,
1220,
18772,
29961,
29900,
2314,
13,
4706,
736,
916,
9065,
13,
13,
1678,
822,
4770,
4282,
27406,
5072,
29898,
1311,
29892,
4629,
4854,
29892,
916,
9065,
1125,
13,
4706,
736,
518,
13,
9651,
376,
29991,
613,
13,
9651,
518,
13,
18884,
376,
262,
613,
13,
18884,
518,
13,
462,
1678,
376,
657,
613,
13,
462,
1678,
4629,
4854,
13,
18884,
21251,
13,
18884,
518,
13,
462,
1678,
376,
20889,
284,
613,
13,
462,
1678,
916,
9065,
13,
18884,
4514,
13,
9651,
4514,
13,
4706,
4514,
13,
13,
1678,
822,
4770,
5510,
5072,
29898,
1311,
29892,
4629,
4854,
29892,
995,
1125,
13,
4706,
736,
518,
13,
18884,
376,
26359,
29892,
13,
18884,
518,
13,
462,
1678,
376,
657,
613,
13,
462,
1678,
4629,
4854,
29892,
13,
18884,
21251,
13,
18884,
995,
13,
9651,
4514,
13,
13,
1678,
822,
4770,
657,
5072,
29898,
1311,
29892,
4629,
4854,
29892,
7663,
1125,
13,
4706,
20254,
25433,
359,
353,
7663,
29889,
15070,
2141,
5451,
877,
1057,
1495,
13,
4706,
565,
20254,
25433,
359,
29961,
29900,
29962,
2804,
525,
2396,
13,
9651,
736,
1583,
17255,
5510,
5072,
29898,
8391,
4854,
29892,
7663,
29889,
1767,
3101,
13,
4706,
1683,
29901,
13,
9651,
736,
6213,
13,
13,
1678,
822,
4770,
21111,
12492,
2558,
29898,
1311,
29892,
3114,
29931,
388,
414,
1125,
13,
4706,
396,
512,
1206,
23858,
26816,
29892,
727,
338,
871,
697,
3114,
14420,
13,
4706,
565,
7431,
29898,
3293,
29931,
388,
414,
29897,
1405,
29871,
29900,
29901,
13,
9651,
3114,
14420,
353,
3114,
29931,
388,
414,
29961,
29900,
29962,
13,
9651,
1820,
353,
3114,
14420,
1839,
2680,
16215,
4144,
29899,
3027,
2033,
13,
9651,
736,
1820,
13,
4706,
1683,
29901,
13,
9651,
736,
6213,
13,
13,
1678,
822,
4770,
5510,
5228,
29898,
1311,
29892,
1298,
21533,
29892,
1298,
4592,
1125,
13,
4706,
565,
7431,
29898,
3149,
21533,
29897,
1275,
29871,
29900,
29901,
13,
9651,
736,
6213,
13,
4706,
1683,
29901,
13,
9651,
1206,
353,
5159,
13,
9651,
1206,
29889,
4397,
877,
4878,
1495,
13,
9651,
363,
1820,
297,
1298,
21533,
29901,
13,
18884,
1206,
29889,
4397,
29898,
3149,
21533,
29961,
1989,
2314,
396,
4195,
13,
18884,
1206,
29889,
4397,
29898,
1989,
29897,
396,
1967,
1024,
13,
9651,
1206,
29889,
4397,
29898,
3149,
4592,
29897,
13,
9651,
736,
426,
13,
18884,
525,
1853,
2396,
525,
18098,
742,
13,
18884,
525,
2680,
2396,
426,
13,
462,
1678,
525,
4144,
29899,
3027,
2396,
1206,
13,
18884,
500,
13,
9651,
500,
2
] |
demos/instance_occlsegm/examples/synthetic2d/legacy/train_mrcnn.py | pazeshun/jsk_apc | 0 | 148928 | <reponame>pazeshun/jsk_apc
#!/usr/bin/env python
from __future__ import division
import argparse
import datetime
import os
import os.path as osp
import random
import socket
os.environ['MPLBACKEND'] = 'Agg' # NOQA
# import cv2 # FIXME: cv2 should be imported first to avoid segfault.
import chainer
from chainer import training
from chainer.training import extensions
import fcn
import numpy as np
import chainer_mask_rcnn as mrcnn
import contrib
here = osp.dirname(osp.abspath(__file__))
class MaskRcnnDataset(chainer.dataset.DatasetMixin):
def __init__(self, dataset):
self._dataset = dataset
self.fg_class_names = dataset.class_names[1:]
def __len__(self):
return len(self._dataset)
def get_example(self, i):
img, bboxes, labels, lbls = self._dataset.get_example(i)
bboxes = bboxes.astype(np.float32, copy=False)
labels = labels.astype(np.int32, copy=False)
labels -= 1 # 0: background -> 0: object_0
masks = (lbls == 1).astype(np.int32, copy=False)
return img, bboxes, labels, masks
def main():
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('dataset', choices=['real', 'synthetic'],
help='The dataset.')
parser.add_argument('--model', '-m',
choices=['vgg16', 'resnet50', 'resnet101'],
default='resnet50', help='Base model of Mask R-CNN.')
parser.add_argument('--pooling-func', '-pf',
choices=['pooling', 'align', 'resize'],
default='align', help='Pooling function.')
parser.add_argument('--gpu', '-g', type=int, help='GPU id.')
parser.add_argument('--multi-node', '-mn', action='store_true',
help='use multi node')
parser.add_argument('--max-epoch', type=float,
help='Epoch (default: 12.17)')
args = parser.parse_args()
if args.multi_node:
import chainermn
comm = chainermn.create_communicator('hierarchical')
device = comm.intra_rank
args.n_node = comm.inter_size
args.n_gpu = comm.size
chainer.cuda.get_device_from_id(device).use()
else:
args.n_node = 1
args.n_gpu = 1
chainer.cuda.get_device_from_id(args.gpu).use()
device = args.gpu
args.seed = 0
now = datetime.datetime.now()
args.timestamp = now.isoformat()
args.out = osp.join(here, 'logs/train_mrcnn',
now.strftime('%Y%m%d_%H%M%S'))
# 0.00125 * 8 = 0.01 in original
args.batch_size = 1 * args.n_gpu
args.lr = 0.00125 * args.batch_size
args.weight_decay = 0.0001
if args.max_epoch is None:
# (180e3 * 8) / len(coco_trainval)
args.max_epoch = (180e3 * 8) / 118287
# lr / 10 at 120k iteration with
# 160k iteration * 16 batchsize in original
args.step_size = [(120e3 / 180e3) * args.max_epoch,
(160e3 / 180e3) * args.max_epoch]
random.seed(args.seed)
np.random.seed(args.seed)
# Default Config
min_size = 600
max_size = 1000
anchor_scales = [4, 8, 16, 32]
proposal_creator_params = dict(
n_train_pre_nms=12000,
n_train_post_nms=2000,
n_test_pre_nms=6000,
n_test_post_nms=1000,
min_size=0,
)
# if args.dataset == 'voc':
# train_data = mrcnn.datasets.SBDInstanceSeg('train')
# test_data = mrcnn.datasets.VOC2012InstanceSeg('val')
# elif args.dataset == 'coco':
# train_data = chainer.datasets.ConcatenatedDataset(
# mrcnn.datasets.CocoInstanceSeg('train'),
# mrcnn.datasets.CocoInstanceSeg('valminusminival'),
# )
# test_data = mrcnn.datasets.CocoInstanceSeg('minival')
# train_data.class_names = test_data.class_names
# min_size = 800
# max_size = 1333
# else:
# raise ValueError
# instance_class_names = train_data.class_names[1:]
# train_data = mrcnn.datasets.MaskRcnnDataset(train_data)
# test_data = mrcnn.datasets.MaskRcnnDataset(test_data)
if args.dataset == 'real':
train_data = contrib.datasets.ARC2017RealInstancesDataset(
'train', aug='standard')
elif args.dataset == 'synthetic':
train_data = contrib.datasets.ARC2017SyntheticInstancesDataset(
do_aug=True, aug_level='all')
else:
raise ValueError
test_data = contrib.datasets.ARC2017RealInstancesDataset('test')
instance_class_names = train_data.class_names[1:]
train_data = MaskRcnnDataset(train_data)
test_data = MaskRcnnDataset(test_data)
if args.pooling_func == 'align':
pooling_func = mrcnn.functions.roi_align_2d
elif args.pooling_func == 'pooling':
pooling_func = chainer.functions.roi_pooling_2d
elif args.pooling_func == 'resize':
pooling_func = mrcnn.functions.crop_and_resize
else:
raise ValueError
if args.model == 'vgg16':
mask_rcnn = mrcnn.models.MaskRCNNVGG16(
n_fg_class=len(instance_class_names),
pretrained_model='imagenet',
pooling_func=pooling_func,
anchor_scales=anchor_scales,
proposal_creator_params=proposal_creator_params,
min_size=min_size,
max_size=max_size)
elif args.model in ['resnet50', 'resnet101']:
n_layers = int(args.model.lstrip('resnet'))
mask_rcnn = mrcnn.models.MaskRCNNResNet(
n_layers=n_layers,
n_fg_class=len(instance_class_names),
pretrained_model='imagenet',
pooling_func=pooling_func,
anchor_scales=anchor_scales,
proposal_creator_params=proposal_creator_params,
min_size=min_size,
max_size=max_size)
else:
raise ValueError
mask_rcnn.use_preset('evaluate')
model = mrcnn.models.MaskRCNNTrainChain(
mask_rcnn,
proposal_target_creator=mrcnn.utils.ProposalTargetCreator(
n_sample=512),
)
if args.multi_node or args.gpu >= 0:
model.to_gpu()
optimizer = chainer.optimizers.MomentumSGD(lr=args.lr, momentum=0.9)
if args.multi_node:
optimizer = chainermn.create_multi_node_optimizer(optimizer, comm)
optimizer.setup(model)
optimizer.add_hook(chainer.optimizer.WeightDecay(rate=args.weight_decay))
if args.model in ['resnet50', 'resnet101']:
model.mask_rcnn.extractor.mode = 'res3+'
mask_rcnn.extractor.conv1.disable_update()
mask_rcnn.extractor.bn1.disable_update()
mask_rcnn.extractor.res2.disable_update()
train_data = chainer.datasets.TransformDataset(
train_data, mrcnn.datasets.MaskRCNNTransform(mask_rcnn))
test_data = chainer.datasets.TransformDataset(
test_data, mrcnn.datasets.MaskRCNNTransform(mask_rcnn, train=False))
if args.multi_node:
if comm.rank != 0:
train_data = None
test_data = None
train_data = chainermn.scatter_dataset(train_data, comm, shuffle=True)
test_data = chainermn.scatter_dataset(test_data, comm)
train_iter = chainer.iterators.MultiprocessIterator(
train_data, batch_size=1, n_prefetch=4, shared_mem=10 ** 8)
test_iter = chainer.iterators.MultiprocessIterator(
test_data, batch_size=1, n_prefetch=4, shared_mem=10 ** 8,
repeat=False, shuffle=False)
updater = chainer.training.updater.StandardUpdater(
train_iter, optimizer, device=device,
converter=mrcnn.datasets.concat_examples)
trainer = training.Trainer(
updater, (args.max_epoch, 'epoch'), out=args.out)
trainer.extend(
extensions.ExponentialShift('lr', 0.1),
trigger=training.triggers.ManualScheduleTrigger(
args.step_size, 'epoch'))
eval_interval = 1, 'epoch'
log_interval = 20, 'iteration'
plot_interval = 0.1, 'epoch'
print_interval = 20, 'iteration'
evaluator = mrcnn.extensions.InstanceSegmentationVOCEvaluator(
test_iter, model.mask_rcnn, device=device,
use_07_metric=True, label_names=instance_class_names)
if args.multi_node:
evaluator = chainermn.create_multi_node_evaluator(evaluator, comm)
trainer.extend(evaluator, trigger=eval_interval)
if not args.multi_node or comm.rank == 0:
trainer.extend(
extensions.snapshot_object(model.mask_rcnn, 'snapshot_model.npz'),
trigger=training.triggers.MaxValueTrigger(
'validation/main/map', eval_interval))
args.git_hash = mrcnn.utils.git_hash()
args.hostname = socket.gethostname()
trainer.extend(fcn.extensions.ParamsReport(args.__dict__))
trainer.extend(
mrcnn.extensions.InstanceSegmentationVisReport(
test_iter, model.mask_rcnn,
label_names=instance_class_names),
trigger=eval_interval)
trainer.extend(chainer.training.extensions.observe_lr(),
trigger=log_interval)
trainer.extend(extensions.LogReport(trigger=log_interval))
trainer.extend(extensions.PrintReport(
['iteration', 'epoch', 'elapsed_time', 'lr',
'main/loss',
'main/roi_loc_loss',
'main/roi_cls_loss',
'main/roi_mask_loss',
'main/rpn_loc_loss',
'main/rpn_cls_loss',
'validation/main/map']), trigger=print_interval)
trainer.extend(extensions.ProgressBar(update_interval=10))
# plot
assert extensions.PlotReport.available()
trainer.extend(
extensions.PlotReport([
'main/loss',
'main/roi_loc_loss',
'main/roi_cls_loss',
'main/roi_mask_loss',
'main/rpn_loc_loss',
'main/rpn_cls_loss',
], file_name='loss.png', trigger=plot_interval),
trigger=plot_interval,
)
trainer.extend(
extensions.PlotReport(
['validation/main/map'],
file_name='accuracy.png', trigger=plot_interval
),
trigger=eval_interval,
)
trainer.extend(extensions.dump_graph('main/loss'))
trainer.run()
if __name__ == '__main__':
main()
| [
1,
529,
276,
1112,
420,
29958,
29886,
834,
12094,
348,
29914,
29926,
808,
29918,
481,
29883,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
13,
13,
5215,
1852,
5510,
13,
5215,
12865,
13,
5215,
2897,
13,
5215,
2897,
29889,
2084,
408,
288,
1028,
13,
5215,
4036,
13,
5215,
9909,
13,
13,
359,
29889,
21813,
1839,
3580,
29931,
29933,
11375,
11794,
2033,
353,
525,
29909,
1505,
29915,
29871,
396,
11698,
29984,
29909,
13,
13,
29937,
1053,
13850,
29906,
29871,
396,
383,
6415,
2303,
29901,
13850,
29906,
881,
367,
19673,
937,
304,
4772,
2377,
27934,
29889,
13,
13,
5215,
521,
4008,
13,
3166,
521,
4008,
1053,
6694,
13,
3166,
521,
4008,
29889,
26495,
1053,
17752,
13,
5215,
285,
18038,
13,
5215,
12655,
408,
7442,
13,
13,
5215,
521,
4008,
29918,
13168,
29918,
2214,
15755,
408,
286,
2214,
15755,
13,
13,
5215,
17737,
13,
13,
13,
4150,
353,
288,
1028,
29889,
25721,
29898,
4705,
29889,
370,
1028,
493,
22168,
1445,
1649,
876,
13,
13,
13,
1990,
341,
1278,
29934,
29883,
15755,
16390,
24541,
29898,
305,
4008,
29889,
24713,
29889,
16390,
24541,
29924,
861,
262,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
8783,
1125,
13,
4706,
1583,
3032,
24713,
353,
8783,
13,
4706,
1583,
29889,
16434,
29918,
1990,
29918,
7039,
353,
8783,
29889,
1990,
29918,
7039,
29961,
29896,
17531,
13,
13,
1678,
822,
4770,
2435,
12035,
1311,
1125,
13,
4706,
736,
7431,
29898,
1311,
3032,
24713,
29897,
13,
13,
1678,
822,
679,
29918,
4773,
29898,
1311,
29892,
474,
1125,
13,
4706,
10153,
29892,
289,
1884,
267,
29892,
11073,
29892,
301,
2204,
29879,
353,
1583,
3032,
24713,
29889,
657,
29918,
4773,
29898,
29875,
29897,
13,
4706,
289,
1884,
267,
353,
289,
1884,
267,
29889,
579,
668,
29898,
9302,
29889,
7411,
29941,
29906,
29892,
3509,
29922,
8824,
29897,
13,
4706,
11073,
353,
11073,
29889,
579,
668,
29898,
9302,
29889,
524,
29941,
29906,
29892,
3509,
29922,
8824,
29897,
13,
4706,
11073,
22361,
29871,
29896,
29871,
396,
29871,
29900,
29901,
3239,
1599,
29871,
29900,
29901,
1203,
29918,
29900,
13,
4706,
11105,
29879,
353,
313,
26648,
29879,
1275,
29871,
29896,
467,
579,
668,
29898,
9302,
29889,
524,
29941,
29906,
29892,
3509,
29922,
8824,
29897,
13,
4706,
736,
10153,
29892,
289,
1884,
267,
29892,
11073,
29892,
11105,
29879,
13,
13,
13,
1753,
1667,
7295,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
29898,
13,
4706,
883,
2620,
29918,
1990,
29922,
1191,
5510,
29889,
15730,
24863,
29648,
18522,
29897,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
24713,
742,
19995,
29922,
1839,
6370,
742,
525,
19274,
386,
7492,
7464,
13,
462,
4706,
1371,
2433,
1576,
8783,
29889,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
4299,
742,
17411,
29885,
742,
13,
462,
4706,
19995,
29922,
1839,
29894,
1505,
29896,
29953,
742,
525,
690,
1212,
29945,
29900,
742,
525,
690,
1212,
29896,
29900,
29896,
7464,
13,
462,
4706,
2322,
2433,
690,
1212,
29945,
29900,
742,
1371,
2433,
5160,
1904,
310,
341,
1278,
390,
29899,
29907,
10262,
29889,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
10109,
292,
29899,
9891,
742,
17411,
7810,
742,
13,
462,
4706,
19995,
29922,
1839,
10109,
292,
742,
525,
2520,
742,
525,
21476,
7464,
13,
462,
4706,
2322,
2433,
2520,
742,
1371,
2433,
11426,
292,
740,
29889,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
29887,
3746,
742,
17411,
29887,
742,
1134,
29922,
524,
29892,
1371,
2433,
29954,
7056,
1178,
29889,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
9910,
29899,
3177,
742,
17411,
23521,
742,
3158,
2433,
8899,
29918,
3009,
742,
13,
462,
4706,
1371,
2433,
1509,
2473,
2943,
1495,
13,
1678,
13812,
29889,
1202,
29918,
23516,
877,
489,
3317,
29899,
1022,
2878,
742,
1134,
29922,
7411,
29892,
13,
462,
4706,
1371,
2433,
29923,
1129,
305,
313,
4381,
29901,
29871,
29896,
29906,
29889,
29896,
29955,
29897,
1495,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
13,
1678,
565,
6389,
29889,
9910,
29918,
3177,
29901,
13,
4706,
1053,
9704,
837,
29876,
13,
4706,
844,
353,
9704,
837,
29876,
29889,
3258,
29918,
27820,
1061,
877,
29882,
631,
1279,
936,
1495,
13,
4706,
4742,
353,
844,
29889,
524,
336,
29918,
10003,
13,
13,
4706,
6389,
29889,
29876,
29918,
3177,
353,
844,
29889,
1639,
29918,
2311,
13,
4706,
6389,
29889,
29876,
29918,
29887,
3746,
353,
844,
29889,
2311,
13,
4706,
521,
4008,
29889,
29883,
6191,
29889,
657,
29918,
10141,
29918,
3166,
29918,
333,
29898,
10141,
467,
1509,
580,
13,
1678,
1683,
29901,
13,
4706,
6389,
29889,
29876,
29918,
3177,
353,
29871,
29896,
13,
4706,
6389,
29889,
29876,
29918,
29887,
3746,
353,
29871,
29896,
13,
4706,
521,
4008,
29889,
29883,
6191,
29889,
657,
29918,
10141,
29918,
3166,
29918,
333,
29898,
5085,
29889,
29887,
3746,
467,
1509,
580,
13,
4706,
4742,
353,
6389,
29889,
29887,
3746,
13,
13,
1678,
6389,
29889,
26776,
353,
29871,
29900,
13,
1678,
1286,
353,
12865,
29889,
12673,
29889,
3707,
580,
13,
1678,
6389,
29889,
16394,
353,
1286,
29889,
10718,
4830,
580,
13,
1678,
6389,
29889,
449,
353,
288,
1028,
29889,
7122,
29898,
4150,
29892,
525,
20756,
29914,
14968,
29918,
29885,
2214,
15755,
742,
13,
462,
4706,
1286,
29889,
710,
615,
603,
877,
29995,
29979,
29995,
29885,
29995,
29881,
29918,
29995,
29950,
29995,
29924,
29995,
29903,
8785,
13,
13,
1678,
396,
29871,
29900,
29889,
29900,
29900,
29896,
29906,
29945,
334,
29871,
29947,
353,
29871,
29900,
29889,
29900,
29896,
29871,
297,
2441,
13,
1678,
6389,
29889,
16175,
29918,
2311,
353,
29871,
29896,
334,
6389,
29889,
29876,
29918,
29887,
3746,
13,
1678,
6389,
29889,
29212,
353,
29871,
29900,
29889,
29900,
29900,
29896,
29906,
29945,
334,
6389,
29889,
16175,
29918,
2311,
13,
1678,
6389,
29889,
7915,
29918,
7099,
388,
353,
29871,
29900,
29889,
29900,
29900,
29900,
29896,
13,
13,
1678,
565,
6389,
29889,
3317,
29918,
1022,
2878,
338,
6213,
29901,
13,
4706,
396,
313,
29896,
29947,
29900,
29872,
29941,
334,
29871,
29947,
29897,
847,
7431,
29898,
29883,
6235,
29918,
14968,
791,
29897,
13,
4706,
6389,
29889,
3317,
29918,
1022,
2878,
353,
313,
29896,
29947,
29900,
29872,
29941,
334,
29871,
29947,
29897,
847,
29871,
29896,
29896,
29947,
29906,
29947,
29955,
13,
1678,
396,
301,
29878,
847,
29871,
29896,
29900,
472,
29871,
29896,
29906,
29900,
29895,
12541,
411,
13,
1678,
396,
29871,
29896,
29953,
29900,
29895,
12541,
334,
29871,
29896,
29953,
9853,
2311,
297,
2441,
13,
1678,
6389,
29889,
10568,
29918,
2311,
353,
17288,
29896,
29906,
29900,
29872,
29941,
847,
29871,
29896,
29947,
29900,
29872,
29941,
29897,
334,
6389,
29889,
3317,
29918,
1022,
2878,
29892,
13,
462,
418,
313,
29896,
29953,
29900,
29872,
29941,
847,
29871,
29896,
29947,
29900,
29872,
29941,
29897,
334,
6389,
29889,
3317,
29918,
1022,
2878,
29962,
13,
13,
1678,
4036,
29889,
26776,
29898,
5085,
29889,
26776,
29897,
13,
1678,
7442,
29889,
8172,
29889,
26776,
29898,
5085,
29889,
26776,
29897,
13,
13,
1678,
396,
13109,
12782,
13,
1678,
1375,
29918,
2311,
353,
29871,
29953,
29900,
29900,
13,
1678,
4236,
29918,
2311,
353,
29871,
29896,
29900,
29900,
29900,
13,
1678,
17360,
29918,
19529,
267,
353,
518,
29946,
29892,
29871,
29947,
29892,
29871,
29896,
29953,
29892,
29871,
29941,
29906,
29962,
13,
1678,
24963,
29918,
1037,
1061,
29918,
7529,
353,
9657,
29898,
13,
4706,
302,
29918,
14968,
29918,
1457,
29918,
29876,
1516,
29922,
29896,
29906,
29900,
29900,
29900,
29892,
13,
4706,
302,
29918,
14968,
29918,
2490,
29918,
29876,
1516,
29922,
29906,
29900,
29900,
29900,
29892,
13,
4706,
302,
29918,
1688,
29918,
1457,
29918,
29876,
1516,
29922,
29953,
29900,
29900,
29900,
29892,
13,
4706,
302,
29918,
1688,
29918,
2490,
29918,
29876,
1516,
29922,
29896,
29900,
29900,
29900,
29892,
13,
4706,
1375,
29918,
2311,
29922,
29900,
29892,
13,
1678,
1723,
13,
13,
1678,
396,
565,
6389,
29889,
24713,
1275,
525,
29894,
542,
2396,
13,
1678,
396,
268,
7945,
29918,
1272,
353,
286,
2214,
15755,
29889,
14538,
1691,
29889,
1744,
29928,
4998,
17669,
877,
14968,
1495,
13,
1678,
396,
268,
1243,
29918,
1272,
353,
286,
2214,
15755,
29889,
14538,
1691,
29889,
29963,
20166,
29906,
29900,
29896,
29906,
4998,
17669,
877,
791,
1495,
13,
1678,
396,
25342,
6389,
29889,
24713,
1275,
525,
29883,
6235,
2396,
13,
1678,
396,
268,
7945,
29918,
1272,
353,
521,
4008,
29889,
14538,
1691,
29889,
1168,
29883,
2579,
630,
16390,
24541,
29898,
13,
1678,
396,
308,
286,
2214,
15755,
29889,
14538,
1691,
29889,
29907,
6235,
4998,
17669,
877,
14968,
5477,
13,
1678,
396,
308,
286,
2214,
15755,
29889,
14538,
1691,
29889,
29907,
6235,
4998,
17669,
877,
791,
12254,
1195,
2561,
5477,
13,
1678,
396,
268,
1723,
13,
1678,
396,
268,
1243,
29918,
1272,
353,
286,
2214,
15755,
29889,
14538,
1691,
29889,
29907,
6235,
4998,
17669,
877,
1195,
2561,
1495,
13,
1678,
396,
268,
7945,
29918,
1272,
29889,
1990,
29918,
7039,
353,
1243,
29918,
1272,
29889,
1990,
29918,
7039,
13,
1678,
396,
268,
1375,
29918,
2311,
353,
29871,
29947,
29900,
29900,
13,
1678,
396,
268,
4236,
29918,
2311,
353,
29871,
29896,
29941,
29941,
29941,
13,
1678,
396,
1683,
29901,
13,
1678,
396,
268,
12020,
7865,
2392,
13,
1678,
396,
2777,
29918,
1990,
29918,
7039,
353,
7945,
29918,
1272,
29889,
1990,
29918,
7039,
29961,
29896,
17531,
13,
1678,
396,
7945,
29918,
1272,
353,
286,
2214,
15755,
29889,
14538,
1691,
29889,
19832,
29934,
29883,
15755,
16390,
24541,
29898,
14968,
29918,
1272,
29897,
13,
1678,
396,
1243,
29918,
1272,
353,
286,
2214,
15755,
29889,
14538,
1691,
29889,
19832,
29934,
29883,
15755,
16390,
24541,
29898,
1688,
29918,
1272,
29897,
13,
13,
1678,
565,
6389,
29889,
24713,
1275,
525,
6370,
2396,
13,
4706,
7945,
29918,
1272,
353,
17737,
29889,
14538,
1691,
29889,
1718,
29907,
29906,
29900,
29896,
29955,
21713,
3379,
2925,
16390,
24541,
29898,
13,
9651,
525,
14968,
742,
11307,
2433,
15770,
1495,
13,
1678,
25342,
6389,
29889,
24713,
1275,
525,
19274,
386,
7492,
2396,
13,
4706,
7945,
29918,
1272,
353,
17737,
29889,
14538,
1691,
29889,
1718,
29907,
29906,
29900,
29896,
29955,
29216,
386,
7492,
3379,
2925,
16390,
24541,
29898,
13,
9651,
437,
29918,
2987,
29922,
5574,
29892,
11307,
29918,
5563,
2433,
497,
1495,
13,
1678,
1683,
29901,
13,
4706,
12020,
7865,
2392,
13,
1678,
1243,
29918,
1272,
353,
17737,
29889,
14538,
1691,
29889,
1718,
29907,
29906,
29900,
29896,
29955,
21713,
3379,
2925,
16390,
24541,
877,
1688,
1495,
13,
1678,
2777,
29918,
1990,
29918,
7039,
353,
7945,
29918,
1272,
29889,
1990,
29918,
7039,
29961,
29896,
17531,
13,
1678,
7945,
29918,
1272,
353,
341,
1278,
29934,
29883,
15755,
16390,
24541,
29898,
14968,
29918,
1272,
29897,
13,
1678,
1243,
29918,
1272,
353,
341,
1278,
29934,
29883,
15755,
16390,
24541,
29898,
1688,
29918,
1272,
29897,
13,
13,
1678,
565,
6389,
29889,
10109,
292,
29918,
9891,
1275,
525,
2520,
2396,
13,
4706,
11565,
292,
29918,
9891,
353,
286,
2214,
15755,
29889,
12171,
29889,
307,
29875,
29918,
2520,
29918,
29906,
29881,
13,
1678,
25342,
6389,
29889,
10109,
292,
29918,
9891,
1275,
525,
10109,
292,
2396,
13,
4706,
11565,
292,
29918,
9891,
353,
521,
4008,
29889,
12171,
29889,
307,
29875,
29918,
10109,
292,
29918,
29906,
29881,
13,
1678,
25342,
6389,
29889,
10109,
292,
29918,
9891,
1275,
525,
21476,
2396,
13,
4706,
11565,
292,
29918,
9891,
353,
286,
2214,
15755,
29889,
12171,
29889,
29883,
1336,
29918,
392,
29918,
21476,
13,
1678,
1683,
29901,
13,
4706,
12020,
7865,
2392,
13,
13,
1678,
565,
6389,
29889,
4299,
1275,
525,
29894,
1505,
29896,
29953,
2396,
13,
4706,
11105,
29918,
2214,
15755,
353,
286,
2214,
15755,
29889,
9794,
29889,
19832,
10363,
10262,
29963,
26788,
29896,
29953,
29898,
13,
9651,
302,
29918,
16434,
29918,
1990,
29922,
2435,
29898,
8758,
29918,
1990,
29918,
7039,
511,
13,
9651,
758,
3018,
1312,
29918,
4299,
2433,
326,
5370,
300,
742,
13,
9651,
11565,
292,
29918,
9891,
29922,
10109,
292,
29918,
9891,
29892,
13,
9651,
17360,
29918,
19529,
267,
29922,
25367,
29918,
19529,
267,
29892,
13,
9651,
24963,
29918,
1037,
1061,
29918,
7529,
29922,
771,
1066,
284,
29918,
1037,
1061,
29918,
7529,
29892,
13,
9651,
1375,
29918,
2311,
29922,
1195,
29918,
2311,
29892,
13,
9651,
4236,
29918,
2311,
29922,
3317,
29918,
2311,
29897,
13,
1678,
25342,
6389,
29889,
4299,
297,
6024,
690,
1212,
29945,
29900,
742,
525,
690,
1212,
29896,
29900,
29896,
2033,
29901,
13,
4706,
302,
29918,
29277,
353,
938,
29898,
5085,
29889,
4299,
29889,
29880,
17010,
877,
690,
1212,
8785,
13,
4706,
11105,
29918,
2214,
15755,
353,
286,
2214,
15755,
29889,
9794,
29889,
19832,
10363,
10262,
1666,
6779,
29898,
13,
9651,
302,
29918,
29277,
29922,
29876,
29918,
29277,
29892,
13,
9651,
302,
29918,
16434,
29918,
1990,
29922,
2435,
29898,
8758,
29918,
1990,
29918,
7039,
511,
13,
9651,
758,
3018,
1312,
29918,
4299,
2433,
326,
5370,
300,
742,
13,
9651,
11565,
292,
29918,
9891,
29922,
10109,
292,
29918,
9891,
29892,
13,
9651,
17360,
29918,
19529,
267,
29922,
25367,
29918,
19529,
267,
29892,
13,
9651,
24963,
29918,
1037,
1061,
29918,
7529,
29922,
771,
1066,
284,
29918,
1037,
1061,
29918,
7529,
29892,
13,
9651,
1375,
29918,
2311,
29922,
1195,
29918,
2311,
29892,
13,
9651,
4236,
29918,
2311,
29922,
3317,
29918,
2311,
29897,
13,
1678,
1683,
29901,
13,
4706,
12020,
7865,
2392,
13,
1678,
11105,
29918,
2214,
15755,
29889,
1509,
29918,
4569,
300,
877,
24219,
403,
1495,
13,
1678,
1904,
353,
286,
2214,
15755,
29889,
9794,
29889,
19832,
10363,
10262,
5323,
262,
14688,
29898,
13,
4706,
11105,
29918,
2214,
15755,
29892,
13,
4706,
24963,
29918,
5182,
29918,
1037,
1061,
29922,
29885,
2214,
15755,
29889,
13239,
29889,
1184,
1066,
284,
8667,
9832,
1061,
29898,
13,
9651,
302,
29918,
11249,
29922,
29945,
29896,
29906,
511,
13,
1678,
1723,
13,
1678,
565,
6389,
29889,
9910,
29918,
3177,
470,
6389,
29889,
29887,
3746,
6736,
29871,
29900,
29901,
13,
4706,
1904,
29889,
517,
29918,
29887,
3746,
580,
13,
13,
1678,
5994,
3950,
353,
521,
4008,
29889,
20640,
19427,
29889,
29924,
2932,
398,
26016,
29928,
29898,
29212,
29922,
5085,
29889,
29212,
29892,
19399,
29922,
29900,
29889,
29929,
29897,
13,
1678,
565,
6389,
29889,
9910,
29918,
3177,
29901,
13,
4706,
5994,
3950,
353,
9704,
837,
29876,
29889,
3258,
29918,
9910,
29918,
3177,
29918,
20640,
3950,
29898,
20640,
3950,
29892,
844,
29897,
13,
1678,
5994,
3950,
29889,
14669,
29898,
4299,
29897,
13,
1678,
5994,
3950,
29889,
1202,
29918,
20849,
29898,
305,
4008,
29889,
20640,
3950,
29889,
22676,
6185,
388,
29898,
10492,
29922,
5085,
29889,
7915,
29918,
7099,
388,
876,
13,
13,
1678,
565,
6389,
29889,
4299,
297,
6024,
690,
1212,
29945,
29900,
742,
525,
690,
1212,
29896,
29900,
29896,
2033,
29901,
13,
4706,
1904,
29889,
13168,
29918,
2214,
15755,
29889,
21111,
272,
29889,
8513,
353,
525,
690,
29941,
23097,
13,
4706,
11105,
29918,
2214,
15755,
29889,
21111,
272,
29889,
20580,
29896,
29889,
20472,
29918,
5504,
580,
13,
4706,
11105,
29918,
2214,
15755,
29889,
21111,
272,
29889,
11197,
29896,
29889,
20472,
29918,
5504,
580,
13,
4706,
11105,
29918,
2214,
15755,
29889,
21111,
272,
29889,
690,
29906,
29889,
20472,
29918,
5504,
580,
13,
13,
1678,
7945,
29918,
1272,
353,
521,
4008,
29889,
14538,
1691,
29889,
13372,
16390,
24541,
29898,
13,
4706,
7945,
29918,
1272,
29892,
286,
2214,
15755,
29889,
14538,
1691,
29889,
19832,
10363,
10262,
13372,
29898,
13168,
29918,
2214,
15755,
876,
13,
1678,
1243,
29918,
1272,
353,
521,
4008,
29889,
14538,
1691,
29889,
13372,
16390,
24541,
29898,
13,
4706,
1243,
29918,
1272,
29892,
286,
2214,
15755,
29889,
14538,
1691,
29889,
19832,
10363,
10262,
13372,
29898,
13168,
29918,
2214,
15755,
29892,
7945,
29922,
8824,
876,
13,
1678,
565,
6389,
29889,
9910,
29918,
3177,
29901,
13,
4706,
565,
844,
29889,
10003,
2804,
29871,
29900,
29901,
13,
9651,
7945,
29918,
1272,
353,
6213,
13,
9651,
1243,
29918,
1272,
353,
6213,
13,
4706,
7945,
29918,
1272,
353,
9704,
837,
29876,
29889,
1557,
2620,
29918,
24713,
29898,
14968,
29918,
1272,
29892,
844,
29892,
528,
21897,
29922,
5574,
29897,
13,
4706,
1243,
29918,
1272,
353,
9704,
837,
29876,
29889,
1557,
2620,
29918,
24713,
29898,
1688,
29918,
1272,
29892,
844,
29897,
13,
13,
1678,
7945,
29918,
1524,
353,
521,
4008,
29889,
1524,
4097,
29889,
6857,
666,
307,
985,
20277,
29898,
13,
4706,
7945,
29918,
1272,
29892,
9853,
29918,
2311,
29922,
29896,
29892,
302,
29918,
29886,
999,
3486,
29922,
29946,
29892,
7258,
29918,
6954,
29922,
29896,
29900,
3579,
29871,
29947,
29897,
13,
1678,
1243,
29918,
1524,
353,
521,
4008,
29889,
1524,
4097,
29889,
6857,
666,
307,
985,
20277,
29898,
13,
4706,
1243,
29918,
1272,
29892,
9853,
29918,
2311,
29922,
29896,
29892,
302,
29918,
29886,
999,
3486,
29922,
29946,
29892,
7258,
29918,
6954,
29922,
29896,
29900,
3579,
29871,
29947,
29892,
13,
4706,
12312,
29922,
8824,
29892,
528,
21897,
29922,
8824,
29897,
13,
13,
1678,
3329,
1008,
353,
521,
4008,
29889,
26495,
29889,
786,
29881,
1008,
29889,
15449,
3373,
29881,
1008,
29898,
13,
4706,
7945,
29918,
1524,
29892,
5994,
3950,
29892,
4742,
29922,
10141,
29892,
13,
4706,
29105,
29922,
29885,
2214,
15755,
29889,
14538,
1691,
29889,
17685,
29918,
19057,
29897,
13,
13,
1678,
1020,
4983,
353,
6694,
29889,
5323,
4983,
29898,
13,
4706,
3329,
1008,
29892,
313,
5085,
29889,
3317,
29918,
1022,
2878,
29892,
525,
1022,
2878,
5477,
714,
29922,
5085,
29889,
449,
29897,
13,
13,
1678,
1020,
4983,
29889,
21843,
29898,
13,
4706,
17752,
29889,
1252,
1112,
2556,
29657,
877,
29212,
742,
29871,
29900,
29889,
29896,
511,
13,
4706,
7135,
29922,
26495,
29889,
509,
335,
5743,
29889,
2517,
950,
4504,
11272,
20211,
29898,
13,
9651,
6389,
29889,
10568,
29918,
2311,
29892,
525,
1022,
2878,
8785,
13,
13,
1678,
19745,
29918,
19207,
353,
29871,
29896,
29892,
525,
1022,
2878,
29915,
13,
1678,
1480,
29918,
19207,
353,
29871,
29906,
29900,
29892,
525,
1524,
362,
29915,
13,
1678,
6492,
29918,
19207,
353,
29871,
29900,
29889,
29896,
29892,
525,
1022,
2878,
29915,
13,
1678,
1596,
29918,
19207,
353,
29871,
29906,
29900,
29892,
525,
1524,
362,
29915,
13,
13,
1678,
6161,
1061,
353,
286,
2214,
15755,
29889,
24299,
29889,
4998,
17669,
358,
362,
24898,
4741,
4387,
1061,
29898,
13,
4706,
1243,
29918,
1524,
29892,
1904,
29889,
13168,
29918,
2214,
15755,
29892,
4742,
29922,
10141,
29892,
13,
4706,
671,
29918,
29900,
29955,
29918,
16414,
29922,
5574,
29892,
3858,
29918,
7039,
29922,
8758,
29918,
1990,
29918,
7039,
29897,
13,
1678,
565,
6389,
29889,
9910,
29918,
3177,
29901,
13,
4706,
6161,
1061,
353,
9704,
837,
29876,
29889,
3258,
29918,
9910,
29918,
3177,
29918,
24219,
1061,
29898,
24219,
1061,
29892,
844,
29897,
13,
1678,
1020,
4983,
29889,
21843,
29898,
24219,
1061,
29892,
7135,
29922,
14513,
29918,
19207,
29897,
13,
13,
1678,
565,
451,
6389,
29889,
9910,
29918,
3177,
470,
844,
29889,
10003,
1275,
29871,
29900,
29901,
13,
4706,
1020,
4983,
29889,
21843,
29898,
13,
9651,
17752,
29889,
29879,
14551,
29918,
3318,
29898,
4299,
29889,
13168,
29918,
2214,
15755,
29892,
525,
29879,
14551,
29918,
4299,
29889,
9302,
29920,
5477,
13,
9651,
7135,
29922,
26495,
29889,
509,
335,
5743,
29889,
7976,
1917,
20211,
29898,
13,
18884,
525,
18157,
29914,
3396,
29914,
1958,
742,
19745,
29918,
19207,
876,
13,
4706,
6389,
29889,
5559,
29918,
8568,
353,
286,
2214,
15755,
29889,
13239,
29889,
5559,
29918,
8568,
580,
13,
4706,
6389,
29889,
28988,
353,
9909,
29889,
29887,
621,
520,
978,
580,
13,
4706,
1020,
4983,
29889,
21843,
29898,
13801,
29876,
29889,
24299,
29889,
9629,
13020,
29898,
5085,
17255,
8977,
1649,
876,
13,
4706,
1020,
4983,
29889,
21843,
29898,
13,
9651,
286,
2214,
15755,
29889,
24299,
29889,
4998,
17669,
358,
362,
6116,
13020,
29898,
13,
18884,
1243,
29918,
1524,
29892,
1904,
29889,
13168,
29918,
2214,
15755,
29892,
13,
18884,
3858,
29918,
7039,
29922,
8758,
29918,
1990,
29918,
7039,
511,
13,
9651,
7135,
29922,
14513,
29918,
19207,
29897,
13,
4706,
1020,
4983,
29889,
21843,
29898,
305,
4008,
29889,
26495,
29889,
24299,
29889,
711,
16349,
29918,
29212,
3285,
13,
462,
539,
7135,
29922,
1188,
29918,
19207,
29897,
13,
4706,
1020,
4983,
29889,
21843,
29898,
24299,
29889,
3403,
13020,
29898,
21001,
29922,
1188,
29918,
19207,
876,
13,
4706,
1020,
4983,
29889,
21843,
29898,
24299,
29889,
11816,
13020,
29898,
13,
9651,
6024,
1524,
362,
742,
525,
1022,
2878,
742,
525,
295,
28170,
29918,
2230,
742,
525,
29212,
742,
13,
632,
525,
3396,
29914,
6758,
742,
13,
632,
525,
3396,
29914,
307,
29875,
29918,
2029,
29918,
6758,
742,
13,
632,
525,
3396,
29914,
307,
29875,
29918,
25932,
29918,
6758,
742,
13,
632,
525,
3396,
29914,
307,
29875,
29918,
13168,
29918,
6758,
742,
13,
632,
525,
3396,
29914,
19080,
29876,
29918,
2029,
29918,
6758,
742,
13,
632,
525,
3396,
29914,
19080,
29876,
29918,
25932,
29918,
6758,
742,
13,
632,
525,
18157,
29914,
3396,
29914,
1958,
2033,
511,
7135,
29922,
2158,
29918,
19207,
29897,
13,
4706,
1020,
4983,
29889,
21843,
29898,
24299,
29889,
14470,
4297,
29898,
5504,
29918,
19207,
29922,
29896,
29900,
876,
13,
13,
4706,
396,
6492,
13,
4706,
4974,
17752,
29889,
20867,
13020,
29889,
16515,
580,
13,
4706,
1020,
4983,
29889,
21843,
29898,
13,
9651,
17752,
29889,
20867,
13020,
4197,
13,
18884,
525,
3396,
29914,
6758,
742,
13,
18884,
525,
3396,
29914,
307,
29875,
29918,
2029,
29918,
6758,
742,
13,
18884,
525,
3396,
29914,
307,
29875,
29918,
25932,
29918,
6758,
742,
13,
18884,
525,
3396,
29914,
307,
29875,
29918,
13168,
29918,
6758,
742,
13,
18884,
525,
3396,
29914,
19080,
29876,
29918,
2029,
29918,
6758,
742,
13,
18884,
525,
3396,
29914,
19080,
29876,
29918,
25932,
29918,
6758,
742,
13,
9651,
21251,
934,
29918,
978,
2433,
6758,
29889,
2732,
742,
7135,
29922,
5317,
29918,
19207,
511,
13,
9651,
7135,
29922,
5317,
29918,
19207,
29892,
13,
4706,
1723,
13,
4706,
1020,
4983,
29889,
21843,
29898,
13,
9651,
17752,
29889,
20867,
13020,
29898,
13,
18884,
6024,
18157,
29914,
3396,
29914,
1958,
7464,
13,
18884,
934,
29918,
978,
2433,
562,
2764,
4135,
29889,
2732,
742,
7135,
29922,
5317,
29918,
19207,
13,
9651,
10353,
13,
9651,
7135,
29922,
14513,
29918,
19207,
29892,
13,
4706,
1723,
13,
13,
4706,
1020,
4983,
29889,
21843,
29898,
24299,
29889,
15070,
29918,
4262,
877,
3396,
29914,
6758,
8785,
13,
13,
1678,
1020,
4983,
29889,
3389,
580,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1667,
580,
13,
2
] |
sb/base/sb_config.py | xyhuangjinfu/pytools | 0 | 1613346 | import json
import os
class SBConfig:
def __init__(self):
config_file_path = os.path.split(os.path.realpath(__file__))[0] + '/sb_config.json'
f = open(config_file_path)
self.config = json.load(f)
if __name__ == '__main__':
print(os.path.split(os.path.realpath(__file__))[0])
| [
1,
1053,
4390,
13,
5215,
2897,
13,
13,
13,
1990,
317,
29933,
3991,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
2295,
29918,
1445,
29918,
2084,
353,
2897,
29889,
2084,
29889,
5451,
29898,
359,
29889,
2084,
29889,
6370,
2084,
22168,
1445,
1649,
876,
29961,
29900,
29962,
718,
8207,
20778,
29918,
2917,
29889,
3126,
29915,
13,
4706,
285,
353,
1722,
29898,
2917,
29918,
1445,
29918,
2084,
29897,
13,
4706,
1583,
29889,
2917,
353,
4390,
29889,
1359,
29898,
29888,
29897,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1596,
29898,
359,
29889,
2084,
29889,
5451,
29898,
359,
29889,
2084,
29889,
6370,
2084,
22168,
1445,
1649,
876,
29961,
29900,
2314,
13,
2
] |
ClassFiles/OOP/Encapsulation.py | minefarmer/Comprehensive-Python | 0 | 100893 | <reponame>minefarmer/Comprehensive-Python
''' Encapsulation : Part 1
Encapsulation is the process of restricting access to methods and variables in a class in order to prevent direct data modification so that it prevents accidental data modification.
Encapsulation basically allows the internal representation of an object to be hidden from the view outside of the objects definition.
Public methods and variables can be accessed from anywhere within the program.
Private methods and variables are accessible from their own class.
Double underscore prefix before object name makes it private'
Encapsulation Part 2: 40
Encapsulation Part: 3 70
'''
# class Cars:
# def __init__(self,speed, color):
# self.speed = speed
# self.color = color
# def set_speed(self,value):
# self.speed = value
# def get_speed(self):
# return self.speed
# Encapsulation Part 2: 40
# class Cars:
# def __init__(self,speed, color):
# self.speed = speed
# self.color = color
# def set_speed(self,value):
# self.speed = value
# def get_speed(self):
# return self.speed
# ford = Cars(250,"green")
# nissan = Cars(300,"red")
# toyota = Cars(350, "blue")
# # ford.set_speed(450) # If I wanted to chang he value of the speed after the instantiantion, I can do that by using the name of the instance and the method.
# ford.speed = 500 # I can also access the speed variable directly without the method and change the value. I'm able to do this because there is no encapsulation in place.
# print(ford.get_speed()) # 500
# print(ford) # <__main__.Cars object at 0x000002AA04FC60A0>
# print(ford.color) # green
# Encapsulation Part: 3 70
class Cars:
def __init__(self,speed, color):
self.__speed = speed # The double underscore makes the variable 'speed' private. It is now difficult to change the value of the variable directly from outside the methods in the class.
self.__color = color
def set_speed(self,value):
self.__speed = value
def get_speed(self):
return self.__speed
ford = Cars(250,"green")
nissan = Cars(300,"red")
toyota = Cars(350, "blue")
# ford.set_speed(450) # If I wanted to chang he value of the speed after the instantiantion, I can do that by using the name of the instance and the method.
ford.speed = 500 # I can also access the speed variable directly without the method and change the value. I'm able to do this because there is no encapsulation in place.
# print(ford.get_speed()) # 250
# print(ford) # <__main__.Cars object at 0x000002AA04FC60A0>
# # print(ford.color) # Traceback (most recent call last):
# # # File "/home/rich/CarlsHub/Comprehensive-Python/ClassFiles/OOP/Encapsulation.py", line 92, in <module>
# # # print(ford.color) # green
# # # AttributeError: 'Cars' object has no attribute 'color'
# print(ford.__color)
print(ford.get_speed()) # 250
print(ford.__color) # Traceback (most recent call last):
# File "/home/rich/CarlsHub/Comprehensive-Python/ClassFiles/OOP/Encapsulation.py", line 100, in <module>
# print(ford.__color) # <__main__.Cars object at 0x000002AA04FC60A0>
# AttributeError: 'Cars' object has no attribute '__color'
| [
1,
529,
276,
1112,
420,
29958,
24669,
15641,
1050,
29914,
1523,
1457,
29882,
6270,
29899,
11980,
13,
12008,
462,
11346,
2547,
2785,
584,
3455,
29871,
29896,
13,
8566,
2547,
2785,
338,
278,
1889,
310,
9250,
292,
2130,
304,
3519,
322,
3651,
297,
263,
770,
297,
1797,
304,
5557,
1513,
848,
21733,
577,
393,
372,
28057,
11423,
284,
848,
21733,
29889,
13,
8566,
2547,
2785,
8830,
6511,
278,
7463,
8954,
310,
385,
1203,
304,
367,
7934,
515,
278,
1776,
5377,
310,
278,
3618,
5023,
29889,
13,
19858,
3519,
322,
3651,
508,
367,
20592,
515,
12214,
2629,
278,
1824,
29889,
13,
25207,
3519,
322,
3651,
526,
15579,
515,
1009,
1914,
770,
29889,
13,
11843,
23400,
3221,
10944,
1434,
1203,
1024,
3732,
372,
2024,
29915,
13,
13,
965,
11346,
2547,
2785,
3455,
29871,
29906,
29901,
418,
29946,
29900,
13,
13,
965,
11346,
2547,
2785,
3455,
29901,
29871,
29941,
418,
29955,
29900,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
12008,
13,
29937,
770,
315,
1503,
29901,
13,
29937,
268,
822,
4770,
2344,
12035,
1311,
29892,
19322,
29892,
2927,
1125,
13,
29937,
308,
1583,
29889,
19322,
353,
6210,
13,
29937,
308,
1583,
29889,
2780,
353,
2927,
13,
13,
29937,
268,
822,
731,
29918,
19322,
29898,
1311,
29892,
1767,
1125,
13,
29937,
308,
1583,
29889,
19322,
353,
995,
13,
268,
13,
29937,
268,
822,
679,
29918,
19322,
29898,
1311,
1125,
13,
29937,
308,
736,
1583,
29889,
19322,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
29937,
965,
11346,
2547,
2785,
3455,
29871,
29906,
29901,
418,
29946,
29900,
13,
29937,
770,
315,
1503,
29901,
13,
29937,
268,
822,
4770,
2344,
12035,
1311,
29892,
19322,
29892,
2927,
1125,
13,
29937,
308,
1583,
29889,
19322,
353,
6210,
13,
29937,
308,
1583,
29889,
2780,
353,
2927,
13,
13,
29937,
268,
822,
731,
29918,
19322,
29898,
1311,
29892,
1767,
1125,
13,
29937,
308,
1583,
29889,
19322,
353,
995,
13,
268,
13,
29937,
268,
822,
679,
29918,
19322,
29898,
1311,
1125,
13,
29937,
308,
736,
1583,
29889,
19322,
13,
13,
29937,
25779,
353,
315,
1503,
29898,
29906,
29945,
29900,
1699,
12692,
1159,
13,
29937,
302,
790,
273,
353,
315,
1503,
29898,
29941,
29900,
29900,
1699,
1127,
1159,
13,
29937,
304,
29891,
4616,
353,
315,
1503,
29898,
29941,
29945,
29900,
29892,
376,
9539,
1159,
13,
13,
29937,
396,
25779,
29889,
842,
29918,
19322,
29898,
29946,
29945,
29900,
29897,
29871,
396,
960,
306,
5131,
304,
1874,
540,
995,
310,
278,
6210,
1156,
278,
13213,
424,
291,
29892,
306,
508,
437,
393,
491,
773,
278,
1024,
310,
278,
2777,
322,
278,
1158,
29889,
13,
13,
29937,
25779,
29889,
19322,
353,
29871,
29945,
29900,
29900,
29871,
396,
29871,
306,
508,
884,
2130,
278,
6210,
2286,
4153,
1728,
278,
1158,
322,
1735,
278,
995,
29889,
306,
29915,
29885,
2221,
304,
437,
445,
1363,
727,
338,
694,
2094,
2547,
2785,
297,
2058,
29889,
13,
13,
29937,
1596,
29898,
4006,
29889,
657,
29918,
19322,
3101,
29871,
396,
29871,
29945,
29900,
29900,
13,
29937,
1596,
29898,
4006,
29897,
29871,
396,
529,
1649,
3396,
26914,
29907,
1503,
1203,
472,
29871,
29900,
29916,
29900,
29900,
29900,
29900,
29900,
29906,
6344,
29900,
29946,
8610,
29953,
29900,
29909,
29900,
29958,
13,
29937,
1596,
29898,
4006,
29889,
2780,
29897,
29871,
396,
7933,
13,
13,
13,
13,
13,
13,
13,
13,
29937,
965,
11346,
2547,
2785,
3455,
29901,
29871,
29941,
418,
29955,
29900,
13,
1990,
315,
1503,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
19322,
29892,
2927,
1125,
13,
4706,
1583,
17255,
19322,
353,
6210,
1678,
396,
450,
3765,
23400,
3221,
3732,
278,
2286,
525,
19322,
29915,
2024,
29889,
739,
338,
1286,
5189,
304,
1735,
278,
995,
310,
278,
2286,
4153,
515,
5377,
278,
3519,
297,
278,
770,
29889,
13,
4706,
1583,
17255,
2780,
353,
2927,
13,
13,
1678,
822,
731,
29918,
19322,
29898,
1311,
29892,
1767,
1125,
13,
4706,
1583,
17255,
19322,
353,
995,
13,
268,
13,
1678,
822,
679,
29918,
19322,
29898,
1311,
1125,
13,
4706,
736,
1583,
17255,
19322,
13,
13,
4006,
353,
315,
1503,
29898,
29906,
29945,
29900,
1699,
12692,
1159,
13,
29876,
790,
273,
353,
315,
1503,
29898,
29941,
29900,
29900,
1699,
1127,
1159,
13,
517,
29891,
4616,
353,
315,
1503,
29898,
29941,
29945,
29900,
29892,
376,
9539,
1159,
13,
13,
29937,
25779,
29889,
842,
29918,
19322,
29898,
29946,
29945,
29900,
29897,
29871,
396,
960,
306,
5131,
304,
1874,
540,
995,
310,
278,
6210,
1156,
278,
13213,
424,
291,
29892,
306,
508,
437,
393,
491,
773,
278,
1024,
310,
278,
2777,
322,
278,
1158,
29889,
13,
13,
4006,
29889,
19322,
353,
29871,
29945,
29900,
29900,
29871,
396,
29871,
306,
508,
884,
2130,
278,
6210,
2286,
4153,
1728,
278,
1158,
322,
1735,
278,
995,
29889,
306,
29915,
29885,
2221,
304,
437,
445,
1363,
727,
338,
694,
2094,
2547,
2785,
297,
2058,
29889,
13,
13,
29937,
1596,
29898,
4006,
29889,
657,
29918,
19322,
3101,
29871,
396,
29871,
29906,
29945,
29900,
13,
29937,
1596,
29898,
4006,
29897,
29871,
396,
529,
1649,
3396,
26914,
29907,
1503,
1203,
472,
29871,
29900,
29916,
29900,
29900,
29900,
29900,
29900,
29906,
6344,
29900,
29946,
8610,
29953,
29900,
29909,
29900,
29958,
13,
29937,
396,
1596,
29898,
4006,
29889,
2780,
29897,
29871,
396,
29243,
313,
3242,
7786,
1246,
1833,
1125,
13,
29937,
396,
462,
268,
396,
3497,
5591,
5184,
29914,
4018,
29914,
8179,
3137,
16046,
29914,
1523,
1457,
29882,
6270,
29899,
11980,
29914,
2385,
10547,
29914,
29949,
4590,
29914,
8566,
2547,
2785,
29889,
2272,
613,
1196,
29871,
29929,
29906,
29892,
297,
529,
5453,
29958,
13,
29937,
396,
462,
268,
396,
268,
1596,
29898,
4006,
29889,
2780,
29897,
29871,
396,
7933,
13,
29937,
396,
462,
268,
396,
23833,
2392,
29901,
525,
29907,
1503,
29915,
1203,
756,
694,
5352,
525,
2780,
29915,
13,
29937,
1596,
29898,
4006,
17255,
2780,
29897,
13,
13,
13,
2158,
29898,
4006,
29889,
657,
29918,
19322,
3101,
29871,
396,
29871,
29906,
29945,
29900,
13,
2158,
29898,
4006,
17255,
2780,
29897,
29871,
396,
29243,
313,
3242,
7786,
1246,
1833,
1125,
13,
462,
1678,
396,
3497,
5591,
5184,
29914,
4018,
29914,
8179,
3137,
16046,
29914,
1523,
1457,
29882,
6270,
29899,
11980,
29914,
2385,
10547,
29914,
29949,
4590,
29914,
8566,
2547,
2785,
29889,
2272,
613,
1196,
29871,
29896,
29900,
29900,
29892,
297,
529,
5453,
29958,
13,
462,
1678,
396,
268,
1596,
29898,
4006,
17255,
2780,
29897,
29871,
396,
529,
1649,
3396,
26914,
29907,
1503,
1203,
472,
29871,
29900,
29916,
29900,
29900,
29900,
29900,
29900,
29906,
6344,
29900,
29946,
8610,
29953,
29900,
29909,
29900,
29958,
13,
462,
1678,
396,
23833,
2392,
29901,
525,
29907,
1503,
29915,
1203,
756,
694,
5352,
525,
1649,
2780,
29915,
13,
2
] |
onmt/Utils.py | KTH1234/deep_summ | 0 | 49209 | <filename>onmt/Utils.py<gh_stars>0
import torch
from torch.autograd import Variable
def aeq(*args):
"""
Assert all arguments have the same value
"""
arguments = (arg for arg in args)
first = next(arguments)
assert all(arg == first for arg in arguments), \
"Not all arguments have the same value: " + str(args)
def sequence_mask(lengths, max_len=None):
"""
Creates a boolean mask from sequence lengths.
"""
batch_size = lengths.numel()
max_len = max_len or lengths.max()
return (torch.arange(0, max_len)
.type_as(lengths)
.repeat(batch_size, 1)
.lt(lengths.unsqueeze(1)))
def use_gpu(opt):
return (hasattr(opt, 'gpuid') and len(opt.gpuid) > 0) or \
(hasattr(opt, 'gpu') and opt.gpu > -1)
def pad(tensor, length, pad_index=1):
if isinstance(tensor, Variable):
var = tensor
if length > var.size(0):
return torch.cat([var,
Variable(pad_index * torch.ones(length - var.size(0), *var.size()[1:])).cuda().type_as(var)])
else:
return var
else:
if length > tensor.size(0):
return torch.cat([tensor,
pad_index * torch.ones(length - tensor.size(0), *tensor.size()[1:]).cuda()])
else:
return tensor | [
1,
529,
9507,
29958,
265,
4378,
29914,
12177,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
4842,
305,
13,
3166,
4842,
305,
29889,
1300,
468,
3665,
1053,
28736,
13,
13,
1753,
263,
1837,
10456,
5085,
1125,
13,
1678,
9995,
13,
1678,
16499,
599,
6273,
505,
278,
1021,
995,
13,
1678,
9995,
13,
1678,
6273,
353,
313,
1191,
363,
1852,
297,
6389,
29897,
13,
1678,
937,
353,
2446,
29898,
25699,
29897,
13,
1678,
4974,
599,
29898,
1191,
1275,
937,
363,
1852,
297,
6273,
511,
320,
13,
4706,
376,
3664,
599,
6273,
505,
278,
1021,
995,
29901,
376,
718,
851,
29898,
5085,
29897,
13,
13,
13,
1753,
5665,
29918,
13168,
29898,
2848,
29879,
29892,
4236,
29918,
2435,
29922,
8516,
1125,
13,
1678,
9995,
13,
1678,
6760,
1078,
263,
7223,
11105,
515,
5665,
27497,
29889,
13,
1678,
9995,
13,
1678,
9853,
29918,
2311,
353,
27497,
29889,
1949,
295,
580,
13,
1678,
4236,
29918,
2435,
353,
4236,
29918,
2435,
470,
27497,
29889,
3317,
580,
13,
1678,
736,
313,
7345,
305,
29889,
279,
927,
29898,
29900,
29892,
4236,
29918,
2435,
29897,
13,
9651,
869,
1853,
29918,
294,
29898,
2848,
29879,
29897,
13,
9651,
869,
14358,
29898,
16175,
29918,
2311,
29892,
29871,
29896,
29897,
13,
9651,
869,
1896,
29898,
2848,
29879,
29889,
6948,
802,
29872,
911,
29898,
29896,
4961,
13,
13,
13,
1753,
671,
29918,
29887,
3746,
29898,
3670,
1125,
13,
1678,
736,
313,
5349,
5552,
29898,
3670,
29892,
525,
29887,
3746,
333,
1495,
322,
7431,
29898,
3670,
29889,
29887,
3746,
333,
29897,
1405,
29871,
29900,
29897,
470,
320,
13,
4706,
313,
5349,
5552,
29898,
3670,
29892,
525,
29887,
3746,
1495,
322,
3523,
29889,
29887,
3746,
1405,
448,
29896,
29897,
13,
13,
1753,
17132,
29898,
20158,
29892,
3309,
29892,
17132,
29918,
2248,
29922,
29896,
1125,
13,
1678,
565,
338,
8758,
29898,
20158,
29892,
28736,
1125,
13,
4706,
722,
353,
12489,
13,
4706,
565,
3309,
1405,
722,
29889,
2311,
29898,
29900,
1125,
13,
9651,
736,
4842,
305,
29889,
4117,
4197,
1707,
29892,
13,
18884,
28736,
29898,
8305,
29918,
2248,
334,
4842,
305,
29889,
2873,
29898,
2848,
448,
722,
29889,
2311,
29898,
29900,
511,
334,
1707,
29889,
2311,
580,
29961,
29896,
29901,
2314,
467,
29883,
6191,
2141,
1853,
29918,
294,
29898,
1707,
29897,
2314,
13,
4706,
1683,
29901,
13,
9651,
736,
722,
13,
1678,
1683,
29901,
13,
4706,
565,
3309,
1405,
12489,
29889,
2311,
29898,
29900,
1125,
13,
9651,
736,
4842,
305,
29889,
4117,
4197,
20158,
29892,
13,
462,
462,
29871,
17132,
29918,
2248,
334,
4842,
305,
29889,
2873,
29898,
2848,
448,
12489,
29889,
2311,
29898,
29900,
511,
334,
20158,
29889,
2311,
580,
29961,
29896,
29901,
14664,
29883,
6191,
580,
2314,
13,
4706,
1683,
29901,
13,
9651,
736,
12489,
539,
2
] |
python/worldkit/placer.py | Angew/WorldKit | 0 | 118329 | <reponame>Angew/WorldKit
import math
import pyglet
import random
import sys
import xml.etree.ElementTree as xmltree
class Point:
components = ('x', 'y')
dimension = 2
eps = 1e-6
def __init__(self, *args, **kwargs):
data = [0.0] * 2
for i in range(min(len(args), self.dimension)):
data[i] = args[i]
for c, v in kwargs.items():
data[components.index(c)] = v
self._data = tuple(data)
def isClose(self, rhs):
return self.close(self, rhs)
@classmethod
def close(Self, lhs, rhs):
if isinstance(lhs, Self) and isinstance(rhs, Self):
return all(map(lambda l, r: Self.close(l, r), lhs._data, rhs._data))
else:
return abs(lhs - rhs) < Self.eps
def normalisation(self, onZero = None):
norm = self.size()
if self.close(norm, 0.0):
if onZero is not None:
normalised = onZero
norm = 0.0
else:
raise ValueError("Zero-length vector cannot be normalised.")
else:
normalised = self / norm
return normalised, norm
def size(self):
return math.sqrt(self.size2())
def size2(self):
return sum([v ** 2 for v in self._data])
def __add__(self, rhs):
return Point(*map(lambda l, r: l + r, self._data, rhs._data))
def __eq__(self, rhs):
return all(map(lambda l, r: l == r, self._data, rhs._data))
def __mul__(self, rhs):
return Point(*map(lambda v: v * rhs, self._data))
def __rmul__(self, lhs):
return self * lhs
def __sub__(self, rhs):
return Point(*map(lambda l, r: l - r, self._data, rhs._data))
def __truediv__(self, rhs):
return Point(*map(lambda v: v / rhs, self._data))
# class Point:
# def __init__(self, x = 0.0, y = 0.0):
# self.x = x
# self.y = y
# def __getitem__(self, index):
# return getattr(self, self._attrName(index))
# def __setitem__(self, index, value):
# return setattr(self, self._attrName(index), value)
# def __add__(lhs, rhs):
# return Point(
# lhs.x + rhs.x,
# lhs.y + rhs.y
# )
# def __sub__(lhs, rhs):
# return Point(
# lhs.x - rhs.x,
# lhs.y - rhs.y
# )
# @staticmethod
# def _attrName(index);
# return {
# 0: 'x', 'x': 'x',
# 1: 'y', 'y': 'y'
# }[index]
class PlacerConfig:
class Village:
def __init__(self, node):
self.count = int(node.get('count', 1))
self.force = float(node.find('force').text)
def __init__(self, filePath):
root = xmltree.parse(filePath).getroot()
area = root.find('area')
self.areaRadius = float(area.find('radius').text)
self.villages = [Village(village) for village in root.findall('village')]
class Placer:
class Village:
def __init__(self, config):
self.force = config.force
self.position = None
def __init__(self, config):
self.areaRadius = config.areaRadius
self.villages = []
for v in config.villages:
self.villages.extend(createVillages(v))
for v in self.villages:
self.initialiseVillagePosition(v)
def run(self):
window = pyglet.window.Window(
caption = "WorldKit:Placer",
width = 512,
height = 512,
resizable = True
)
pyglet.clock.schedule(self.step, 1/60.0)
pyglet.app.run()
def step(self):
forces = {v : self.computeTotalForce(v) for v in self.villages}
def createVillages(self, config):
return [Village(config) for i in range(config.count)]
def initialiseVillagePosition(self, village):
if village.position is not None:
return
while True:
position = Point(
random.uniform(-self.areaRadius, self.areaRadius),
random.uniform(-self.areaRadius, self.areaRadius)
)
if self.areaContains(position):
break
village.position = position
def areaContains(self, point):
return point.size2() <= self.areaRadius ** 2
def computeTotalForce(self, subject):
force = Point()
for partner in self.villages:
if partner is subject:
continue
force += self.computeForce(source = partner, target = subject)
return force
def computeForce(self, source, target):
difference = target.position - source.position
difference, size = difference.normalisation(keepZero = True)
return difference * (self.areaRadius * 2 - size) * source.force
def printHelp(out = sys.stdout):
pass
def main(argv):
try:
arg = argv[1]
except:
arg = 'placement.xml'
if arg in {'-h', '--help'}:
printHelp()
return
Placer(PlacerConfig(argv[1])).run()
| [
1,
529,
276,
1112,
420,
29958,
2744,
9396,
29914,
14058,
13117,
13,
5215,
5844,
13,
5215,
19484,
1026,
13,
5215,
4036,
13,
5215,
10876,
13,
5215,
4903,
29889,
300,
929,
29889,
2642,
9643,
408,
4903,
8336,
13,
13,
13,
13,
1990,
8984,
29901,
13,
12,
14036,
353,
6702,
29916,
742,
525,
29891,
1495,
13,
12,
6229,
2673,
353,
29871,
29906,
13,
12,
8961,
353,
29871,
29896,
29872,
29899,
29953,
13,
13,
12,
1753,
4770,
2344,
12035,
1311,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
12,
12,
1272,
353,
518,
29900,
29889,
29900,
29962,
334,
29871,
29906,
13,
12,
12,
1454,
474,
297,
3464,
29898,
1195,
29898,
2435,
29898,
5085,
511,
1583,
29889,
6229,
2673,
22164,
13,
12,
12,
12,
1272,
29961,
29875,
29962,
353,
6389,
29961,
29875,
29962,
13,
12,
12,
1454,
274,
29892,
325,
297,
9049,
5085,
29889,
7076,
7295,
13,
12,
12,
12,
1272,
29961,
14036,
29889,
2248,
29898,
29883,
4638,
353,
325,
13,
12,
12,
1311,
3032,
1272,
353,
18761,
29898,
1272,
29897,
13,
13,
12,
1753,
338,
11123,
29898,
1311,
29892,
29365,
1125,
13,
12,
12,
2457,
1583,
29889,
5358,
29898,
1311,
29892,
29365,
29897,
13,
13,
12,
29992,
1990,
5696,
13,
12,
1753,
3802,
29898,
24313,
29892,
301,
9499,
29892,
29365,
1125,
13,
12,
12,
361,
338,
8758,
29898,
29880,
9499,
29892,
21782,
29897,
322,
338,
8758,
29898,
29878,
9499,
29892,
21782,
1125,
13,
12,
12,
12,
2457,
599,
29898,
1958,
29898,
2892,
301,
29892,
364,
29901,
21782,
29889,
5358,
29898,
29880,
29892,
364,
511,
301,
9499,
3032,
1272,
29892,
29365,
3032,
1272,
876,
13,
12,
12,
2870,
29901,
13,
12,
12,
12,
2457,
6425,
29898,
29880,
9499,
448,
29365,
29897,
529,
21782,
29889,
8961,
13,
13,
12,
1753,
4226,
4371,
29898,
1311,
29892,
373,
24214,
353,
6213,
1125,
13,
12,
12,
12324,
353,
1583,
29889,
2311,
580,
13,
12,
12,
361,
1583,
29889,
5358,
29898,
12324,
29892,
29871,
29900,
29889,
29900,
1125,
13,
12,
12,
12,
361,
373,
24214,
338,
451,
6213,
29901,
13,
12,
12,
12,
12,
8945,
3368,
353,
373,
24214,
13,
12,
12,
12,
12,
12324,
353,
29871,
29900,
29889,
29900,
13,
12,
12,
12,
2870,
29901,
13,
12,
12,
12,
12,
22692,
7865,
2392,
703,
24214,
29899,
2848,
4608,
2609,
367,
4226,
3368,
23157,
13,
12,
12,
2870,
29901,
13,
12,
12,
12,
8945,
3368,
353,
1583,
847,
6056,
13,
12,
12,
2457,
4226,
3368,
29892,
6056,
13,
13,
12,
1753,
2159,
29898,
1311,
1125,
13,
12,
12,
2457,
5844,
29889,
3676,
29898,
1311,
29889,
2311,
29906,
3101,
13,
13,
12,
1753,
2159,
29906,
29898,
1311,
1125,
13,
12,
12,
2457,
2533,
4197,
29894,
3579,
29871,
29906,
363,
325,
297,
1583,
3032,
1272,
2314,
13,
13,
12,
1753,
4770,
1202,
12035,
1311,
29892,
29365,
1125,
13,
12,
12,
2457,
8984,
10456,
1958,
29898,
2892,
301,
29892,
364,
29901,
301,
718,
364,
29892,
1583,
3032,
1272,
29892,
29365,
3032,
1272,
876,
13,
13,
12,
1753,
4770,
1837,
12035,
1311,
29892,
29365,
1125,
13,
12,
12,
2457,
599,
29898,
1958,
29898,
2892,
301,
29892,
364,
29901,
301,
1275,
364,
29892,
1583,
3032,
1272,
29892,
29365,
3032,
1272,
876,
13,
13,
12,
1753,
4770,
16109,
12035,
1311,
29892,
29365,
1125,
13,
12,
12,
2457,
8984,
10456,
1958,
29898,
2892,
325,
29901,
325,
334,
29365,
29892,
1583,
3032,
1272,
876,
13,
13,
12,
1753,
4770,
1758,
352,
12035,
1311,
29892,
301,
9499,
1125,
13,
12,
12,
2457,
1583,
334,
301,
9499,
13,
13,
12,
1753,
4770,
1491,
12035,
1311,
29892,
29365,
1125,
13,
12,
12,
2457,
8984,
10456,
1958,
29898,
2892,
301,
29892,
364,
29901,
301,
448,
364,
29892,
1583,
3032,
1272,
29892,
29365,
3032,
1272,
876,
13,
13,
12,
1753,
4770,
509,
6742,
440,
12035,
1311,
29892,
29365,
1125,
13,
12,
12,
2457,
8984,
10456,
1958,
29898,
2892,
325,
29901,
325,
847,
29365,
29892,
1583,
3032,
1272,
876,
13,
13,
13,
13,
13,
29937,
770,
8984,
29901,
13,
12,
29937,
822,
4770,
2344,
12035,
1311,
29892,
921,
353,
29871,
29900,
29889,
29900,
29892,
343,
353,
29871,
29900,
29889,
29900,
1125,
13,
12,
12,
29937,
1583,
29889,
29916,
353,
921,
13,
12,
12,
29937,
1583,
29889,
29891,
353,
343,
13,
13,
12,
29937,
822,
4770,
657,
667,
12035,
1311,
29892,
2380,
1125,
13,
12,
12,
29937,
736,
679,
5552,
29898,
1311,
29892,
1583,
3032,
5552,
1170,
29898,
2248,
876,
13,
13,
12,
29937,
822,
4770,
842,
667,
12035,
1311,
29892,
2380,
29892,
995,
1125,
13,
12,
12,
29937,
736,
731,
5552,
29898,
1311,
29892,
1583,
3032,
5552,
1170,
29898,
2248,
511,
995,
29897,
13,
13,
12,
29937,
822,
4770,
1202,
12035,
29880,
9499,
29892,
29365,
1125,
13,
12,
12,
29937,
736,
8984,
29898,
13,
12,
12,
12,
29937,
301,
9499,
29889,
29916,
718,
29365,
29889,
29916,
29892,
13,
12,
12,
12,
29937,
301,
9499,
29889,
29891,
718,
29365,
29889,
29891,
13,
12,
12,
29937,
1723,
13,
13,
12,
29937,
822,
4770,
1491,
12035,
29880,
9499,
29892,
29365,
1125,
13,
12,
12,
29937,
736,
8984,
29898,
13,
12,
12,
12,
29937,
301,
9499,
29889,
29916,
448,
29365,
29889,
29916,
29892,
13,
12,
12,
12,
29937,
301,
9499,
29889,
29891,
448,
29365,
29889,
29891,
13,
12,
12,
29937,
1723,
13,
13,
12,
29937,
732,
7959,
5696,
13,
12,
29937,
822,
903,
5552,
1170,
29898,
2248,
416,
13,
12,
12,
29937,
736,
426,
13,
12,
12,
396,
29871,
29900,
29901,
525,
29916,
742,
525,
29916,
2396,
525,
29916,
742,
13,
12,
12,
396,
29871,
29896,
29901,
525,
29891,
742,
525,
29891,
2396,
525,
29891,
29915,
13,
12,
396,
500,
29961,
2248,
29962,
13,
13,
13,
13,
1990,
13494,
2265,
3991,
29901,
13,
12,
1990,
24720,
29901,
13,
12,
12,
1753,
4770,
2344,
12035,
1311,
29892,
2943,
1125,
13,
12,
12,
12,
1311,
29889,
2798,
353,
938,
29898,
3177,
29889,
657,
877,
2798,
742,
29871,
29896,
876,
13,
12,
12,
12,
1311,
29889,
10118,
353,
5785,
29898,
3177,
29889,
2886,
877,
10118,
2824,
726,
29897,
13,
13,
12,
1753,
4770,
2344,
12035,
1311,
29892,
934,
2605,
1125,
13,
12,
12,
4632,
353,
4903,
8336,
29889,
5510,
29898,
1445,
2605,
467,
657,
4632,
580,
13,
12,
12,
6203,
353,
3876,
29889,
2886,
877,
6203,
1495,
13,
12,
12,
1311,
29889,
6203,
20494,
353,
5785,
29898,
6203,
29889,
2886,
877,
13471,
2824,
726,
29897,
13,
12,
12,
1311,
29889,
29894,
453,
1179,
353,
518,
29963,
453,
482,
29898,
29894,
453,
482,
29897,
363,
5720,
297,
3876,
29889,
2886,
497,
877,
29894,
453,
482,
1495,
29962,
13,
13,
13,
13,
1990,
13494,
2265,
29901,
13,
12,
1990,
24720,
29901,
13,
12,
12,
1753,
4770,
2344,
12035,
1311,
29892,
2295,
1125,
13,
12,
12,
12,
1311,
29889,
10118,
353,
2295,
29889,
10118,
13,
12,
12,
12,
1311,
29889,
3283,
353,
6213,
13,
13,
12,
1753,
4770,
2344,
12035,
1311,
29892,
2295,
1125,
13,
12,
12,
1311,
29889,
6203,
20494,
353,
2295,
29889,
6203,
20494,
13,
12,
12,
1311,
29889,
29894,
453,
1179,
353,
5159,
13,
12,
12,
1454,
325,
297,
2295,
29889,
29894,
453,
1179,
29901,
13,
12,
12,
12,
1311,
29889,
29894,
453,
1179,
29889,
21843,
29898,
3258,
29963,
453,
1179,
29898,
29894,
876,
13,
12,
12,
1454,
325,
297,
1583,
29889,
29894,
453,
1179,
29901,
13,
12,
12,
12,
1311,
29889,
11228,
895,
29963,
453,
482,
8003,
29898,
29894,
29897,
13,
13,
12,
1753,
1065,
29898,
1311,
1125,
13,
12,
12,
7165,
353,
19484,
1026,
29889,
7165,
29889,
5907,
29898,
13,
12,
12,
12,
6671,
353,
376,
14058,
13117,
29901,
29925,
433,
2265,
613,
13,
12,
12,
12,
2103,
353,
29871,
29945,
29896,
29906,
29892,
13,
12,
12,
12,
3545,
353,
29871,
29945,
29896,
29906,
29892,
13,
12,
12,
12,
690,
13902,
353,
5852,
13,
12,
12,
29897,
13,
12,
12,
2272,
29887,
1026,
29889,
13058,
29889,
816,
11272,
29898,
1311,
29889,
10568,
29892,
29871,
29896,
29914,
29953,
29900,
29889,
29900,
29897,
13,
12,
12,
2272,
29887,
1026,
29889,
932,
29889,
3389,
580,
13,
13,
12,
1753,
4331,
29898,
1311,
1125,
13,
12,
12,
1454,
778,
353,
426,
29894,
584,
1583,
29889,
26017,
11536,
2831,
346,
29898,
29894,
29897,
363,
325,
297,
1583,
29889,
29894,
453,
1179,
29913,
13,
13,
12,
1753,
1653,
29963,
453,
1179,
29898,
1311,
29892,
2295,
1125,
13,
12,
12,
2457,
518,
29963,
453,
482,
29898,
2917,
29897,
363,
474,
297,
3464,
29898,
2917,
29889,
2798,
4638,
13,
13,
12,
1753,
2847,
895,
29963,
453,
482,
8003,
29898,
1311,
29892,
5720,
1125,
13,
12,
12,
361,
5720,
29889,
3283,
338,
451,
6213,
29901,
13,
12,
12,
12,
2457,
13,
12,
12,
8000,
5852,
29901,
13,
12,
12,
12,
3283,
353,
8984,
29898,
13,
12,
12,
12,
12,
8172,
29889,
29590,
6278,
1311,
29889,
6203,
20494,
29892,
1583,
29889,
6203,
20494,
511,
13,
12,
12,
12,
12,
8172,
29889,
29590,
6278,
1311,
29889,
6203,
20494,
29892,
1583,
29889,
6203,
20494,
29897,
13,
12,
12,
12,
29897,
13,
12,
12,
12,
361,
1583,
29889,
6203,
21409,
29898,
3283,
1125,
13,
12,
12,
12,
12,
8690,
13,
12,
12,
29894,
453,
482,
29889,
3283,
353,
2602,
13,
13,
12,
1753,
4038,
21409,
29898,
1311,
29892,
1298,
1125,
13,
12,
12,
2457,
1298,
29889,
2311,
29906,
580,
5277,
1583,
29889,
6203,
20494,
3579,
29871,
29906,
13,
13,
12,
1753,
10272,
11536,
2831,
346,
29898,
1311,
29892,
4967,
1125,
13,
12,
12,
10118,
353,
8984,
580,
13,
12,
12,
1454,
18096,
297,
1583,
29889,
29894,
453,
1179,
29901,
13,
12,
12,
12,
361,
18096,
338,
4967,
29901,
13,
12,
12,
12,
12,
19878,
13,
12,
12,
12,
10118,
4619,
1583,
29889,
26017,
2831,
346,
29898,
4993,
353,
18096,
29892,
3646,
353,
4967,
29897,
13,
12,
12,
2457,
4889,
13,
13,
12,
1753,
10272,
2831,
346,
29898,
1311,
29892,
2752,
29892,
3646,
1125,
13,
12,
12,
29881,
17678,
353,
3646,
29889,
3283,
448,
2752,
29889,
3283,
13,
12,
12,
29881,
17678,
29892,
2159,
353,
4328,
29889,
8945,
4371,
29898,
17462,
24214,
353,
5852,
29897,
13,
12,
12,
2457,
4328,
334,
313,
1311,
29889,
6203,
20494,
334,
29871,
29906,
448,
2159,
29897,
334,
2752,
29889,
10118,
13,
13,
13,
13,
1753,
1596,
29648,
29898,
449,
353,
10876,
29889,
25393,
1125,
13,
12,
3364,
13,
13,
13,
13,
1753,
1667,
29898,
19218,
1125,
13,
12,
2202,
29901,
13,
12,
12,
1191,
353,
1852,
29894,
29961,
29896,
29962,
13,
12,
19499,
29901,
13,
12,
12,
1191,
353,
525,
29886,
9552,
29889,
3134,
29915,
13,
12,
361,
1852,
297,
11117,
29899,
29882,
742,
525,
489,
8477,
29915,
6177,
13,
12,
12,
2158,
29648,
580,
13,
12,
12,
2457,
13,
12,
29925,
433,
2265,
29898,
29925,
433,
2265,
3991,
29898,
19218,
29961,
29896,
2314,
467,
3389,
580,
13,
2
] |
tests/gen/test_tca_multithreading.py | PontusHultkrantz/tcapy | 0 | 116683 | <reponame>PontusHultkrantz/tcapy
"""Tests more involved functionality of TCA such as multithreading (and checks computations are
the same as single threaded - note that if there are gaps in market data, there could be differences) and also if there
are multiple requests made at same time (stress testing).
Note for these tests to work we need to have properly populated databases of market/trade/order data.
Alternatively, we can use CSV files for the market and trade/order data in this test, although this will diminish
the usefulness of the stress test.
"""
from __future__ import division, print_function
__author__ = 'saeedamen' # <NAME> / <EMAIL>
#
# Copyright 2017 Cuemacro Ltd. - http//www.cuemacro.com / @cuemacro
#
# See the License for the specific language governing permissions and limitations under the License.
#
try:
from pandas.testing import assert_frame_equal
except:
from pandas.util.testing import assert_frame_equal
import pandas as pd
import os
from tcapy.util.customexceptions import *
from tcapy.conf.constants import Constants
from tcapy.util.mediator import Mediator
constants = Constants()
tcapy_version = constants.tcapy_version
from tcapy.analysis.tcaengine import TCARequest, TCAEngineImpl
########################################################################################################################
# YOU MAY NEED TO CHANGE TESTING PARAMETERS IF YOUR DATABASE DOESN'T COVER THESE DATES
start_date = '02 May 2017';
finish_date = '05 Jun 2017'
# Can try longer time periods - will make tests slower, but will make tests more exhaustive
# start_date = '01 Jan 2016'; finish_date = '01 Mar 2018'
# Stress test for TCA analysis (larger dataset more likely to see any issues)
# multithreading_start_date = '01 May 2017'; multithreading_finish_date = '20 Jul 2017'
multithreading_start_date = '01 May 2017'; multithreading_finish_date = '02 Jul 2017'
large_start_date = '01 Jan 2016';
large_finish_date = '01 Apr 2016'
market_data_store = 'arctic-ncfx'
trade_data_store = 'ms_sql_server'
ticker = 'EURUSD'
valid_ticker_list = ['EURUSD', 'GBPUSD', 'AUDSEK'] # it should return gracefully if at least 1 ticker exists
missing_ticker = 'AUDSEK'
from collections import OrderedDict
trade_order_mapping = ['trade_df', 'order_df']
# start_date = '01 Oct 2017'; finish_date = '15 Nov 2017'; ticker = 'GBPUSD'
invalid_start_date = '02 May 2000';
invalid_finish_date = '05 May 2001'
# So we are not specifically testing the database of tcapy - can instead use CSV in the test harness folder
use_trade_test_csv = False
use_market_test_csv = False
dump_csv_output = True # Can slow down testing, but is useful for debugging purposes
# Do a stress test, calling several large TCA requests in quick succession
stress_test = True
########################################################################################################################
# you can change the test_data_harness_folder to one on your own machine with real data
folder = constants.test_data_harness_folder
trade_order_mapping = constants.test_trade_order_list
trade_df_name = trade_order_mapping[0] # usually 'trade_df'
order_df_name = trade_order_mapping[1] # usually 'order_df'
eps = 10 ** -3
if use_market_test_csv:
# only contains limited amount of EURUSD and USDJPY in Apr/Jun 2017
market_data_store = os.path.join(folder, 'small_test_market_df.csv.gz')
if use_trade_test_csv:
trade_data_store = 'csv'
trade_order_mapping = OrderedDict([(trade_df_name, os.path.join(folder, 'small_test_trade_df.csv')),
(order_df_name, os.path.join(folder, 'small_test_order_df.csv'))])
else:
# define your own trade order mapping
pass
# Test will only succeed if the gen specific version is set
assert constants.tcapy_version == 'gen'
def test_multithreading_full_basic_tca():
"""Tests if the trade/order and market data is identical for multithreading versus singlethreading for detailed,
aggregated and compliance. Note that we need a running Celery server for multithreading to work (as well as the
usual SQL and Arctic databases running, if the test_csv option has not been selected). Uses a very large data sample
"""
Mediator.get_volatile_cache().clear_cache() # clear cache to ensure all test code runs!
tca_request = TCARequest(start_date=multithreading_start_date, finish_date=multithreading_finish_date,
ticker=valid_ticker_list,
trade_data_store=trade_data_store,
market_data_store=market_data_store,
trade_order_mapping=trade_order_mapping)
tca_engine = TCAEngineImpl(version=tcapy_version)
tca_type = ['aggregated', 'detailed', 'compliance']
multithreading = [True, False]
#### Checked the executed prices match with single and multithreaded cases
for t in tca_type:
dict_list = []
for m in multithreading:
Mediator.get_volatile_cache(
version=tcapy_version).clear_cache() # Clear cache to ensure all test code runs!
tca_request.use_multithreading = m
tca_request.tca_type = t
dict_list.append(tca_engine.calculate_tca(tca_request=tca_request))
print("tca_request " + t)
for k in dict_list[0].keys():
multi_df = dict_list[0][k]
single_df = dict_list[1][k]
if isinstance(single_df, pd.DataFrame) and isinstance(multi_df, pd.DataFrame):
if 'executed_price' in single_df.columns and 'executed_price' in multi_df.columns:
print("tablecomputation " + k)
exec_multi = multi_df['executed_price'].dropna()
exec_single = single_df['executed_price'].dropna()
if dump_csv_output:
df = pd.DataFrame(exec_multi)
df1 = pd.DataFrame(exec_single)
df1.columns = [x + '_single' for x in df1.columns]
df = df.join(pd.DataFrame(df1), how='outer')
df.to_csv(k + "_test.csv")
df_large = single_df.join(multi_df, lsuffix='_single', rsuffix='_multi', how='outer')
df_large.to_csv(k + "_test_full.csv")
assert all(exec_multi - exec_single < eps)
# Only check trade/orders and not any of the other DataFrames returned
if 'id' in multi_df.columns and 'id' in single_df.columns:
# check we have unique IDs (we should have unique IDs for every event_type trade (but the id's will
# be the same for placements)
id_multi = multi_df['id']
id_single = single_df['id']
assert len(id_multi.index) == len(id_multi.index)
assert len(id_multi.unique()) == len(id_single.index)
assert len(id_multi.index) == len(id_single.unique())
def test_invalid_dates_missing_data_tca():
"""Tests if the trade/order and market data is identical for multithreading versus singlethreading for detailed,
aggregated and compliance. Note that we need a running Celery server for multithreading to work (as well as the
usual SQL and Arctic databases running, if the test_csv option has not been selected). Uses a very large data sample
"""
Mediator.get_volatile_cache().clear_cache() # clear cache to ensure all test code runs!
tca_request = TCARequest(start_date=large_start_date, finish_date=large_finish_date, ticker=valid_ticker_list,
trade_data_store=trade_data_store,
market_data_store=market_data_store,
trade_order_mapping=trade_order_mapping)
tca_engine = TCAEngineImpl(version=tcapy_version)
tca_type = ['detailed', 'aggregated', 'compliance']
multithreading = [True, False]
## test invalid dates
tca_request.start_date = invalid_start_date;
tca_request.finish_date = invalid_finish_date
for t in tca_type:
for m in multithreading:
Mediator.get_volatile_cache().clear_cache() # clear cache to ensure all test code runs!
tca_request.use_multithreading = m
tca_request.tca_type = t
exception_triggered = True
try:
dict_of_df_invalid = tca_engine.calculate_tca(tca_request=tca_request)
exception_triggered = False
except DataMissingException:
assert exception_triggered
## test a single valid ticker, but missing data (only one ticker)
tca_request.start_date = start_date;
tca_request.finish_date = finish_date;
tca_request.ticker = missing_ticker
for t in tca_type:
for m in multithreading:
Mediator.get_volatile_cache(
version=tcapy_version).clear_cache() # clear cache to ensure all test code runs!
tca_request.use_multithreading = m
tca_request.tca_type = t
exception_triggered = True
try:
dict_of_df_missing_ticker = tca_engine.calculate_tca(tca_request=tca_request)
exception_triggered = False
except DataMissingException:
assert exception_triggered
def test_stress_tca():
"""Makes several large TCARequests at the same time to stress test tcapy application and also to check it works
with paralle requests (note: you may need to reduce the length of the dataset if your machine has limited amounts of RAM).
It can be possible that when deployed on the web, several users might make simultaneous requests. Note, do not use
pylibmc, and instead use python-memcached, when using memcached as a result backend. pylibmc is not thread-safe so
will come undone if you end up making parallel requests.
"""
from tcapy.util.swim import Swim
if not (stress_test):
return
# Clear cache to ensure all test code runs!
Mediator.get_volatile_cache().clear_cache()
tca_request = TCARequest(start_date=large_start_date, finish_date=large_finish_date, ticker=['All'],
dummy_market=True,
trade_data_store=trade_data_store,
market_data_store=market_data_store,
trade_order_mapping=trade_order_mapping, use_multithreading=True, tca_type='aggregated')
# Kick off several simulanteous large TCA requests
request_no = 2
tca_request_list = []
for i in range(0, request_no):
tca_request_list.append(TCARequest(tca_request=tca_request))
tca_engine = TCAEngineImpl(version=tcapy_version)
swim = Swim(parallel_library='thread')
pool = swim.create_pool(thread_no=len(tca_request_list))
result = []
for i in range(0, len(tca_request_list)):
result.append(
pool.apply_async(tca_engine.calculate_tca,
args=(tca_request_list[i],)))
output = [p.get() for p in result]
swim.close_pool(pool, True)
assert len(output) == len(tca_request_list)
# Check that several DataFrames exist in the results
for trade_order_results_df_dict in output:
assert 'trade_df' in trade_order_results_df_dict.keys()
if __name__ == '__main__':
test_multithreading_full_basic_tca()
test_invalid_dates_missing_data_tca()
test_stress_tca()
# import pytest; pytest.main()
| [
1,
529,
276,
1112,
420,
29958,
29925,
609,
375,
29950,
499,
12748,
424,
29920,
29914,
29873,
5030,
29891,
13,
15945,
29908,
24376,
901,
9701,
9863,
310,
323,
5454,
1316,
408,
1773,
389,
19715,
313,
392,
12747,
2912,
800,
526,
13,
1552,
1021,
408,
2323,
3244,
287,
448,
4443,
393,
565,
727,
526,
330,
2547,
297,
9999,
848,
29892,
727,
1033,
367,
12651,
29897,
322,
884,
565,
727,
13,
598,
2999,
7274,
1754,
472,
1021,
931,
313,
710,
404,
6724,
467,
13,
13,
9842,
363,
1438,
6987,
304,
664,
591,
817,
304,
505,
6284,
24146,
21218,
310,
9999,
29914,
3018,
311,
29914,
2098,
848,
29889,
13,
13,
2499,
725,
6703,
29892,
591,
508,
671,
16874,
2066,
363,
278,
9999,
322,
11302,
29914,
2098,
848,
297,
445,
1243,
29892,
5998,
445,
674,
22964,
728,
13,
1552,
5407,
2264,
310,
278,
22884,
1243,
29889,
13,
15945,
29908,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8542,
29892,
1596,
29918,
2220,
13,
13,
1649,
8921,
1649,
353,
525,
29879,
3660,
287,
5071,
29915,
29871,
396,
529,
5813,
29958,
847,
529,
26862,
6227,
29958,
13,
13,
29937,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29955,
10406,
331,
562,
307,
19806,
29889,
448,
1732,
458,
1636,
29889,
4979,
331,
562,
307,
29889,
510,
847,
732,
4979,
331,
562,
307,
13,
29937,
13,
29937,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
27028,
1090,
278,
19245,
29889,
13,
29937,
13,
13,
2202,
29901,
13,
1678,
515,
11701,
29889,
13424,
1053,
4974,
29918,
2557,
29918,
11745,
13,
19499,
29901,
13,
1678,
515,
11701,
29889,
4422,
29889,
13424,
1053,
4974,
29918,
2557,
29918,
11745,
13,
13,
5215,
11701,
408,
10518,
13,
5215,
2897,
13,
13,
3166,
260,
5030,
29891,
29889,
4422,
29889,
29883,
504,
608,
29916,
1441,
29879,
1053,
334,
13,
3166,
260,
5030,
29891,
29889,
5527,
29889,
3075,
1934,
1053,
5798,
1934,
13,
13,
3166,
260,
5030,
29891,
29889,
4422,
29889,
4210,
1061,
1053,
22855,
1061,
13,
13,
3075,
1934,
353,
5798,
1934,
580,
13,
29873,
5030,
29891,
29918,
3259,
353,
17727,
29889,
29873,
5030,
29891,
29918,
3259,
13,
13,
3166,
260,
5030,
29891,
29889,
15916,
29889,
29873,
1113,
10599,
1053,
323,
5454,
3089,
29892,
323,
5454,
12412,
6647,
13,
13,
13383,
13383,
13383,
13383,
13383,
13383,
13383,
7346,
13,
29937,
612,
27269,
14861,
29979,
14693,
3352,
7495,
5868,
24336,
17067,
1254,
4214,
349,
1718,
25797,
4945,
29903,
10762,
612,
22970,
27640,
27982,
11662,
2890,
29940,
29915,
29911,
4810,
5348,
6093,
1660,
27640,
2890,
13,
2962,
29918,
1256,
353,
525,
29900,
29906,
2610,
29871,
29906,
29900,
29896,
29955,
2670,
13,
4951,
728,
29918,
1256,
353,
525,
29900,
29945,
8378,
29871,
29906,
29900,
29896,
29955,
29915,
13,
13,
29937,
1815,
1018,
5520,
931,
23704,
448,
674,
1207,
6987,
20312,
29892,
541,
674,
1207,
6987,
901,
27096,
573,
13,
29937,
1369,
29918,
1256,
353,
525,
29900,
29896,
2627,
29871,
29906,
29900,
29896,
29953,
2670,
8341,
29918,
1256,
353,
525,
29900,
29896,
1085,
29871,
29906,
29900,
29896,
29947,
29915,
13,
13,
29937,
3767,
404,
1243,
363,
323,
5454,
7418,
313,
4675,
914,
8783,
901,
5517,
304,
1074,
738,
5626,
29897,
13,
29937,
1773,
389,
19715,
29918,
2962,
29918,
1256,
353,
525,
29900,
29896,
2610,
29871,
29906,
29900,
29896,
29955,
2670,
1773,
389,
19715,
29918,
4951,
728,
29918,
1256,
353,
525,
29906,
29900,
2739,
29871,
29906,
29900,
29896,
29955,
29915,
13,
4713,
389,
19715,
29918,
2962,
29918,
1256,
353,
525,
29900,
29896,
2610,
29871,
29906,
29900,
29896,
29955,
2670,
1773,
389,
19715,
29918,
4951,
728,
29918,
1256,
353,
525,
29900,
29906,
2739,
29871,
29906,
29900,
29896,
29955,
29915,
13,
16961,
29918,
2962,
29918,
1256,
353,
525,
29900,
29896,
2627,
29871,
29906,
29900,
29896,
29953,
2670,
13,
16961,
29918,
4951,
728,
29918,
1256,
353,
525,
29900,
29896,
319,
558,
29871,
29906,
29900,
29896,
29953,
29915,
13,
13,
28549,
29918,
1272,
29918,
8899,
353,
525,
279,
20009,
29899,
29876,
6854,
29916,
29915,
13,
3018,
311,
29918,
1272,
29918,
8899,
353,
525,
1516,
29918,
2850,
29918,
2974,
29915,
13,
29873,
6541,
353,
525,
29923,
4574,
3308,
29928,
29915,
13,
13,
3084,
29918,
29873,
6541,
29918,
1761,
353,
6024,
29923,
4574,
3308,
29928,
742,
525,
7210,
29925,
3308,
29928,
742,
525,
29909,
15789,
1660,
29968,
2033,
29871,
396,
372,
881,
736,
17659,
3730,
565,
472,
3203,
29871,
29896,
260,
6541,
4864,
13,
27259,
29918,
29873,
6541,
353,
525,
29909,
15789,
1660,
29968,
29915,
13,
13,
3166,
16250,
1053,
8170,
287,
21533,
13,
13,
3018,
311,
29918,
2098,
29918,
20698,
353,
6024,
3018,
311,
29918,
2176,
742,
525,
2098,
29918,
2176,
2033,
13,
13,
29937,
1369,
29918,
1256,
353,
525,
29900,
29896,
4756,
29871,
29906,
29900,
29896,
29955,
2670,
8341,
29918,
1256,
353,
525,
29896,
29945,
2864,
29871,
29906,
29900,
29896,
29955,
2670,
260,
6541,
353,
525,
7210,
29925,
3308,
29928,
29915,
13,
13,
20965,
29918,
2962,
29918,
1256,
353,
525,
29900,
29906,
2610,
29871,
29906,
29900,
29900,
29900,
2670,
13,
20965,
29918,
4951,
728,
29918,
1256,
353,
525,
29900,
29945,
2610,
29871,
29906,
29900,
29900,
29896,
29915,
13,
13,
29937,
1105,
591,
526,
451,
10816,
6724,
278,
2566,
310,
260,
5030,
29891,
448,
508,
2012,
671,
16874,
297,
278,
1243,
4023,
2264,
4138,
13,
1509,
29918,
3018,
311,
29918,
1688,
29918,
7638,
353,
7700,
13,
1509,
29918,
28549,
29918,
1688,
29918,
7638,
353,
7700,
13,
13,
15070,
29918,
7638,
29918,
4905,
353,
5852,
29871,
396,
1815,
5232,
1623,
6724,
29892,
541,
338,
5407,
363,
13490,
11976,
13,
13,
29937,
1938,
263,
22884,
1243,
29892,
5432,
3196,
2919,
323,
5454,
7274,
297,
4996,
25997,
13,
710,
404,
29918,
1688,
353,
5852,
13,
13,
13383,
13383,
13383,
13383,
13383,
13383,
13383,
7346,
13,
13,
29937,
366,
508,
1735,
278,
1243,
29918,
1272,
29918,
8222,
2264,
29918,
12083,
304,
697,
373,
596,
1914,
4933,
411,
1855,
848,
13,
12083,
353,
17727,
29889,
1688,
29918,
1272,
29918,
8222,
2264,
29918,
12083,
13,
13,
3018,
311,
29918,
2098,
29918,
20698,
353,
17727,
29889,
1688,
29918,
3018,
311,
29918,
2098,
29918,
1761,
13,
3018,
311,
29918,
2176,
29918,
978,
353,
11302,
29918,
2098,
29918,
20698,
29961,
29900,
29962,
396,
5491,
525,
3018,
311,
29918,
2176,
29915,
13,
2098,
29918,
2176,
29918,
978,
353,
11302,
29918,
2098,
29918,
20698,
29961,
29896,
29962,
396,
5491,
525,
2098,
29918,
2176,
29915,
13,
13,
8961,
353,
29871,
29896,
29900,
3579,
448,
29941,
13,
13,
361,
671,
29918,
28549,
29918,
1688,
29918,
7638,
29901,
13,
1678,
396,
871,
3743,
9078,
5253,
310,
382,
4574,
3308,
29928,
322,
3148,
29928,
29967,
20055,
297,
319,
558,
29914,
29967,
348,
29871,
29906,
29900,
29896,
29955,
13,
1678,
9999,
29918,
1272,
29918,
8899,
353,
2897,
29889,
2084,
29889,
7122,
29898,
12083,
29892,
525,
9278,
29918,
1688,
29918,
28549,
29918,
2176,
29889,
7638,
29889,
18828,
1495,
13,
13,
361,
671,
29918,
3018,
311,
29918,
1688,
29918,
7638,
29901,
13,
1678,
11302,
29918,
1272,
29918,
8899,
353,
525,
7638,
29915,
13,
13,
1678,
11302,
29918,
2098,
29918,
20698,
353,
8170,
287,
21533,
4197,
29898,
3018,
311,
29918,
2176,
29918,
978,
29892,
2897,
29889,
2084,
29889,
7122,
29898,
12083,
29892,
525,
9278,
29918,
1688,
29918,
3018,
311,
29918,
2176,
29889,
7638,
1495,
511,
13,
462,
462,
539,
313,
2098,
29918,
2176,
29918,
978,
29892,
2897,
29889,
2084,
29889,
7122,
29898,
12083,
29892,
525,
9278,
29918,
1688,
29918,
2098,
29918,
2176,
29889,
7638,
8785,
2314,
13,
13,
2870,
29901,
13,
1678,
396,
4529,
596,
1914,
11302,
1797,
10417,
13,
1678,
1209,
13,
13,
29937,
4321,
674,
871,
9269,
565,
278,
2531,
2702,
1873,
338,
731,
13,
9294,
17727,
29889,
29873,
5030,
29891,
29918,
3259,
1275,
525,
1885,
29915,
13,
13,
1753,
1243,
29918,
4713,
389,
19715,
29918,
8159,
29918,
16121,
29918,
29873,
1113,
7295,
13,
1678,
9995,
24376,
565,
278,
11302,
29914,
2098,
322,
9999,
848,
338,
13557,
363,
1773,
389,
19715,
23797,
2323,
7097,
292,
363,
13173,
29892,
13,
1678,
11404,
630,
322,
752,
13036,
29889,
3940,
393,
591,
817,
263,
2734,
14227,
708,
1923,
363,
1773,
389,
19715,
304,
664,
313,
294,
1532,
408,
278,
13,
1678,
9670,
3758,
322,
826,
20009,
21218,
2734,
29892,
565,
278,
1243,
29918,
7638,
2984,
756,
451,
1063,
4629,
467,
10783,
267,
263,
1407,
2919,
848,
4559,
13,
1678,
9995,
13,
1678,
22855,
1061,
29889,
657,
29918,
1555,
24285,
29918,
8173,
2141,
8551,
29918,
8173,
580,
29871,
396,
2821,
7090,
304,
9801,
599,
1243,
775,
6057,
29991,
13,
13,
1678,
260,
1113,
29918,
3827,
353,
323,
5454,
3089,
29898,
2962,
29918,
1256,
29922,
4713,
389,
19715,
29918,
2962,
29918,
1256,
29892,
8341,
29918,
1256,
29922,
4713,
389,
19715,
29918,
4951,
728,
29918,
1256,
29892,
13,
462,
632,
260,
6541,
29922,
3084,
29918,
29873,
6541,
29918,
1761,
29892,
13,
462,
632,
11302,
29918,
1272,
29918,
8899,
29922,
3018,
311,
29918,
1272,
29918,
8899,
29892,
13,
462,
632,
9999,
29918,
1272,
29918,
8899,
29922,
28549,
29918,
1272,
29918,
8899,
29892,
13,
462,
632,
11302,
29918,
2098,
29918,
20698,
29922,
3018,
311,
29918,
2098,
29918,
20698,
29897,
13,
13,
1678,
260,
1113,
29918,
10599,
353,
323,
5454,
12412,
6647,
29898,
3259,
29922,
29873,
5030,
29891,
29918,
3259,
29897,
13,
13,
1678,
260,
1113,
29918,
1853,
353,
6024,
26193,
630,
742,
525,
29881,
11881,
742,
525,
2388,
13036,
2033,
13,
13,
1678,
1773,
389,
19715,
353,
518,
5574,
29892,
7700,
29962,
13,
13,
1678,
3191,
5399,
287,
278,
8283,
26094,
1993,
411,
2323,
322,
1773,
389,
949,
287,
4251,
13,
1678,
363,
260,
297,
260,
1113,
29918,
1853,
29901,
13,
4706,
9657,
29918,
1761,
353,
5159,
13,
13,
4706,
363,
286,
297,
1773,
389,
19715,
29901,
13,
9651,
22855,
1061,
29889,
657,
29918,
1555,
24285,
29918,
8173,
29898,
13,
18884,
1873,
29922,
29873,
5030,
29891,
29918,
3259,
467,
8551,
29918,
8173,
580,
29871,
396,
17732,
7090,
304,
9801,
599,
1243,
775,
6057,
29991,
13,
13,
9651,
260,
1113,
29918,
3827,
29889,
1509,
29918,
4713,
389,
19715,
353,
286,
13,
9651,
260,
1113,
29918,
3827,
29889,
29873,
1113,
29918,
1853,
353,
260,
13,
9651,
9657,
29918,
1761,
29889,
4397,
29898,
29873,
1113,
29918,
10599,
29889,
15807,
403,
29918,
29873,
1113,
29898,
29873,
1113,
29918,
3827,
29922,
29873,
1113,
29918,
3827,
876,
13,
13,
4706,
1596,
703,
29873,
1113,
29918,
3827,
376,
718,
260,
29897,
13,
13,
4706,
363,
413,
297,
9657,
29918,
1761,
29961,
29900,
1822,
8149,
7295,
13,
9651,
2473,
29918,
2176,
353,
9657,
29918,
1761,
29961,
29900,
3816,
29895,
29962,
13,
9651,
2323,
29918,
2176,
353,
9657,
29918,
1761,
29961,
29896,
3816,
29895,
29962,
13,
13,
9651,
565,
338,
8758,
29898,
14369,
29918,
2176,
29892,
10518,
29889,
17271,
29897,
322,
338,
8758,
29898,
9910,
29918,
2176,
29892,
10518,
29889,
17271,
1125,
13,
18884,
565,
525,
4258,
3860,
29918,
9175,
29915,
297,
2323,
29918,
2176,
29889,
13099,
322,
525,
4258,
3860,
29918,
9175,
29915,
297,
2473,
29918,
2176,
29889,
13099,
29901,
13,
13,
462,
1678,
1596,
703,
2371,
12097,
362,
376,
718,
413,
29897,
13,
13,
462,
1678,
2279,
29918,
9910,
353,
2473,
29918,
2176,
1839,
4258,
3860,
29918,
9175,
13359,
8865,
1056,
580,
13,
462,
1678,
2279,
29918,
14369,
353,
2323,
29918,
2176,
1839,
4258,
3860,
29918,
9175,
13359,
8865,
1056,
580,
13,
13,
462,
1678,
565,
16766,
29918,
7638,
29918,
4905,
29901,
13,
462,
4706,
4489,
353,
10518,
29889,
17271,
29898,
4258,
29918,
9910,
29897,
13,
13,
462,
4706,
4489,
29896,
353,
10518,
29889,
17271,
29898,
4258,
29918,
14369,
29897,
13,
462,
4706,
4489,
29896,
29889,
13099,
353,
518,
29916,
718,
22868,
14369,
29915,
363,
921,
297,
4489,
29896,
29889,
13099,
29962,
13,
13,
462,
4706,
4489,
353,
4489,
29889,
7122,
29898,
15926,
29889,
17271,
29898,
2176,
29896,
511,
920,
2433,
5561,
1495,
13,
13,
462,
4706,
4489,
29889,
517,
29918,
7638,
29898,
29895,
718,
11119,
1688,
29889,
7638,
1159,
13,
13,
462,
4706,
4489,
29918,
16961,
353,
2323,
29918,
2176,
29889,
7122,
29898,
9910,
29918,
2176,
29892,
301,
2146,
600,
861,
2433,
29918,
14369,
742,
364,
2146,
600,
861,
2433,
29918,
9910,
742,
920,
2433,
5561,
1495,
13,
462,
4706,
4489,
29918,
16961,
29889,
517,
29918,
7638,
29898,
29895,
718,
11119,
1688,
29918,
8159,
29889,
7638,
1159,
13,
13,
462,
1678,
4974,
599,
29898,
4258,
29918,
9910,
448,
2279,
29918,
14369,
529,
321,
567,
29897,
13,
13,
462,
1678,
396,
9333,
1423,
11302,
29914,
20488,
322,
451,
738,
310,
278,
916,
3630,
14438,
1280,
4133,
13,
462,
1678,
565,
525,
333,
29915,
297,
2473,
29918,
2176,
29889,
13099,
322,
525,
333,
29915,
297,
2323,
29918,
2176,
29889,
13099,
29901,
13,
462,
4706,
396,
1423,
591,
505,
5412,
23481,
313,
705,
881,
505,
5412,
23481,
363,
1432,
1741,
29918,
1853,
11302,
313,
4187,
278,
1178,
29915,
29879,
674,
13,
462,
4706,
396,
367,
278,
1021,
363,
2174,
29883,
4110,
29897,
13,
462,
4706,
1178,
29918,
9910,
353,
2473,
29918,
2176,
1839,
333,
2033,
13,
462,
4706,
1178,
29918,
14369,
353,
2323,
29918,
2176,
1839,
333,
2033,
13,
13,
462,
4706,
4974,
7431,
29898,
333,
29918,
9910,
29889,
2248,
29897,
1275,
7431,
29898,
333,
29918,
9910,
29889,
2248,
29897,
13,
13,
462,
4706,
4974,
7431,
29898,
333,
29918,
9910,
29889,
13092,
3101,
1275,
7431,
29898,
333,
29918,
14369,
29889,
2248,
29897,
13,
462,
4706,
4974,
7431,
29898,
333,
29918,
9910,
29889,
2248,
29897,
1275,
7431,
29898,
333,
29918,
14369,
29889,
13092,
3101,
13,
13,
13,
1753,
1243,
29918,
20965,
29918,
15190,
29918,
27259,
29918,
1272,
29918,
29873,
1113,
7295,
13,
1678,
9995,
24376,
565,
278,
11302,
29914,
2098,
322,
9999,
848,
338,
13557,
363,
1773,
389,
19715,
23797,
2323,
7097,
292,
363,
13173,
29892,
13,
1678,
11404,
630,
322,
752,
13036,
29889,
3940,
393,
591,
817,
263,
2734,
14227,
708,
1923,
363,
1773,
389,
19715,
304,
664,
313,
294,
1532,
408,
278,
13,
1678,
9670,
3758,
322,
826,
20009,
21218,
2734,
29892,
565,
278,
1243,
29918,
7638,
2984,
756,
451,
1063,
4629,
467,
10783,
267,
263,
1407,
2919,
848,
4559,
13,
1678,
9995,
13,
1678,
22855,
1061,
29889,
657,
29918,
1555,
24285,
29918,
8173,
2141,
8551,
29918,
8173,
580,
29871,
396,
2821,
7090,
304,
9801,
599,
1243,
775,
6057,
29991,
13,
13,
1678,
260,
1113,
29918,
3827,
353,
323,
5454,
3089,
29898,
2962,
29918,
1256,
29922,
16961,
29918,
2962,
29918,
1256,
29892,
8341,
29918,
1256,
29922,
16961,
29918,
4951,
728,
29918,
1256,
29892,
260,
6541,
29922,
3084,
29918,
29873,
6541,
29918,
1761,
29892,
13,
462,
632,
11302,
29918,
1272,
29918,
8899,
29922,
3018,
311,
29918,
1272,
29918,
8899,
29892,
13,
462,
632,
9999,
29918,
1272,
29918,
8899,
29922,
28549,
29918,
1272,
29918,
8899,
29892,
13,
462,
632,
11302,
29918,
2098,
29918,
20698,
29922,
3018,
311,
29918,
2098,
29918,
20698,
29897,
13,
13,
1678,
260,
1113,
29918,
10599,
353,
323,
5454,
12412,
6647,
29898,
3259,
29922,
29873,
5030,
29891,
29918,
3259,
29897,
13,
13,
1678,
260,
1113,
29918,
1853,
353,
6024,
29881,
11881,
742,
525,
26193,
630,
742,
525,
2388,
13036,
2033,
13,
13,
1678,
1773,
389,
19715,
353,
518,
5574,
29892,
7700,
29962,
13,
13,
1678,
444,
1243,
8340,
10116,
13,
1678,
260,
1113,
29918,
3827,
29889,
2962,
29918,
1256,
353,
8340,
29918,
2962,
29918,
1256,
29936,
13,
1678,
260,
1113,
29918,
3827,
29889,
4951,
728,
29918,
1256,
353,
8340,
29918,
4951,
728,
29918,
1256,
13,
13,
1678,
363,
260,
297,
260,
1113,
29918,
1853,
29901,
13,
4706,
363,
286,
297,
1773,
389,
19715,
29901,
13,
9651,
22855,
1061,
29889,
657,
29918,
1555,
24285,
29918,
8173,
2141,
8551,
29918,
8173,
580,
29871,
396,
2821,
7090,
304,
9801,
599,
1243,
775,
6057,
29991,
13,
9651,
260,
1113,
29918,
3827,
29889,
1509,
29918,
4713,
389,
19715,
353,
286,
13,
9651,
260,
1113,
29918,
3827,
29889,
29873,
1113,
29918,
1853,
353,
260,
13,
13,
9651,
3682,
29918,
21001,
287,
353,
5852,
13,
13,
9651,
1018,
29901,
13,
18884,
9657,
29918,
974,
29918,
2176,
29918,
20965,
353,
260,
1113,
29918,
10599,
29889,
15807,
403,
29918,
29873,
1113,
29898,
29873,
1113,
29918,
3827,
29922,
29873,
1113,
29918,
3827,
29897,
13,
13,
18884,
3682,
29918,
21001,
287,
353,
7700,
13,
13,
9651,
5174,
3630,
18552,
292,
2451,
29901,
13,
18884,
4974,
3682,
29918,
21001,
287,
13,
13,
1678,
444,
1243,
263,
2323,
2854,
260,
6541,
29892,
541,
4567,
848,
313,
6194,
697,
260,
6541,
29897,
13,
1678,
260,
1113,
29918,
3827,
29889,
2962,
29918,
1256,
353,
1369,
29918,
1256,
29936,
13,
1678,
260,
1113,
29918,
3827,
29889,
4951,
728,
29918,
1256,
353,
8341,
29918,
1256,
29936,
13,
1678,
260,
1113,
29918,
3827,
29889,
29873,
6541,
353,
4567,
29918,
29873,
6541,
13,
13,
1678,
363,
260,
297,
260,
1113,
29918,
1853,
29901,
13,
4706,
363,
286,
297,
1773,
389,
19715,
29901,
13,
9651,
22855,
1061,
29889,
657,
29918,
1555,
24285,
29918,
8173,
29898,
13,
18884,
1873,
29922,
29873,
5030,
29891,
29918,
3259,
467,
8551,
29918,
8173,
580,
29871,
396,
2821,
7090,
304,
9801,
599,
1243,
775,
6057,
29991,
13,
9651,
260,
1113,
29918,
3827,
29889,
1509,
29918,
4713,
389,
19715,
353,
286,
13,
9651,
260,
1113,
29918,
3827,
29889,
29873,
1113,
29918,
1853,
353,
260,
13,
13,
9651,
3682,
29918,
21001,
287,
353,
5852,
13,
13,
9651,
1018,
29901,
13,
18884,
9657,
29918,
974,
29918,
2176,
29918,
27259,
29918,
29873,
6541,
353,
260,
1113,
29918,
10599,
29889,
15807,
403,
29918,
29873,
1113,
29898,
29873,
1113,
29918,
3827,
29922,
29873,
1113,
29918,
3827,
29897,
13,
13,
18884,
3682,
29918,
21001,
287,
353,
7700,
13,
13,
9651,
5174,
3630,
18552,
292,
2451,
29901,
13,
18884,
4974,
3682,
29918,
21001,
287,
13,
13,
1753,
1243,
29918,
710,
404,
29918,
29873,
1113,
7295,
13,
1678,
9995,
29924,
6926,
3196,
2919,
323,
5454,
3089,
29879,
472,
278,
1021,
931,
304,
22884,
1243,
260,
5030,
29891,
2280,
322,
884,
304,
1423,
372,
1736,
13,
1678,
411,
610,
3498,
7274,
313,
6812,
29901,
366,
1122,
817,
304,
10032,
278,
3309,
310,
278,
8783,
565,
596,
4933,
756,
9078,
26999,
310,
18113,
467,
13,
13,
1678,
739,
508,
367,
1950,
393,
746,
21168,
373,
278,
1856,
29892,
3196,
4160,
1795,
1207,
16991,
681,
7274,
29889,
3940,
29892,
437,
451,
671,
13,
1678,
11451,
1982,
14047,
29892,
322,
2012,
671,
3017,
29899,
6954,
29883,
3791,
29892,
746,
773,
2626,
29883,
3791,
408,
263,
1121,
14998,
29889,
11451,
1982,
14047,
338,
451,
3244,
29899,
11177,
577,
13,
1678,
674,
2041,
563,
650,
565,
366,
1095,
701,
3907,
8943,
7274,
29889,
13,
1678,
9995,
13,
1678,
515,
260,
5030,
29891,
29889,
4422,
29889,
2774,
326,
1053,
3925,
326,
13,
13,
1678,
565,
451,
313,
710,
404,
29918,
1688,
1125,
13,
4706,
736,
13,
13,
1678,
396,
17732,
7090,
304,
9801,
599,
1243,
775,
6057,
29991,
13,
1678,
22855,
1061,
29889,
657,
29918,
1555,
24285,
29918,
8173,
2141,
8551,
29918,
8173,
580,
13,
13,
1678,
260,
1113,
29918,
3827,
353,
323,
5454,
3089,
29898,
2962,
29918,
1256,
29922,
16961,
29918,
2962,
29918,
1256,
29892,
8341,
29918,
1256,
29922,
16961,
29918,
4951,
728,
29918,
1256,
29892,
260,
6541,
29922,
1839,
3596,
7464,
13,
462,
632,
20254,
29918,
28549,
29922,
5574,
29892,
13,
462,
632,
11302,
29918,
1272,
29918,
8899,
29922,
3018,
311,
29918,
1272,
29918,
8899,
29892,
13,
462,
632,
9999,
29918,
1272,
29918,
8899,
29922,
28549,
29918,
1272,
29918,
8899,
29892,
13,
462,
632,
11302,
29918,
2098,
29918,
20698,
29922,
3018,
311,
29918,
2098,
29918,
20698,
29892,
671,
29918,
4713,
389,
19715,
29922,
5574,
29892,
260,
1113,
29918,
1853,
2433,
26193,
630,
1495,
13,
13,
1678,
396,
476,
860,
1283,
3196,
1027,
352,
1647,
681,
2919,
323,
5454,
7274,
13,
1678,
2009,
29918,
1217,
353,
29871,
29906,
13,
13,
1678,
260,
1113,
29918,
3827,
29918,
1761,
353,
5159,
13,
13,
1678,
363,
474,
297,
3464,
29898,
29900,
29892,
2009,
29918,
1217,
1125,
13,
4706,
260,
1113,
29918,
3827,
29918,
1761,
29889,
4397,
29898,
29911,
5454,
3089,
29898,
29873,
1113,
29918,
3827,
29922,
29873,
1113,
29918,
3827,
876,
13,
13,
1678,
260,
1113,
29918,
10599,
353,
323,
5454,
12412,
6647,
29898,
3259,
29922,
29873,
5030,
29891,
29918,
3259,
29897,
13,
13,
1678,
2381,
326,
353,
3925,
326,
29898,
23482,
29918,
5258,
2433,
7097,
1495,
13,
1678,
11565,
353,
2381,
326,
29889,
3258,
29918,
10109,
29898,
7097,
29918,
1217,
29922,
2435,
29898,
29873,
1113,
29918,
3827,
29918,
1761,
876,
13,
13,
1678,
1121,
353,
5159,
13,
13,
1678,
363,
474,
297,
3464,
29898,
29900,
29892,
7431,
29898,
29873,
1113,
29918,
3827,
29918,
1761,
22164,
13,
4706,
1121,
29889,
4397,
29898,
13,
9651,
11565,
29889,
7302,
29918,
12674,
29898,
29873,
1113,
29918,
10599,
29889,
15807,
403,
29918,
29873,
1113,
29892,
13,
462,
632,
6389,
7607,
29873,
1113,
29918,
3827,
29918,
1761,
29961,
29875,
1402,
4961,
13,
13,
1678,
1962,
353,
518,
29886,
29889,
657,
580,
363,
282,
297,
1121,
29962,
13,
13,
1678,
2381,
326,
29889,
5358,
29918,
10109,
29898,
10109,
29892,
5852,
29897,
13,
13,
1678,
4974,
7431,
29898,
4905,
29897,
1275,
7431,
29898,
29873,
1113,
29918,
3827,
29918,
1761,
29897,
13,
13,
1678,
396,
5399,
393,
3196,
3630,
14438,
1280,
1863,
297,
278,
2582,
13,
1678,
363,
11302,
29918,
2098,
29918,
9902,
29918,
2176,
29918,
8977,
297,
1962,
29901,
13,
4706,
4974,
525,
3018,
311,
29918,
2176,
29915,
297,
11302,
29918,
2098,
29918,
9902,
29918,
2176,
29918,
8977,
29889,
8149,
580,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
1243,
29918,
4713,
389,
19715,
29918,
8159,
29918,
16121,
29918,
29873,
1113,
580,
13,
1678,
1243,
29918,
20965,
29918,
15190,
29918,
27259,
29918,
1272,
29918,
29873,
1113,
580,
13,
13,
1678,
1243,
29918,
710,
404,
29918,
29873,
1113,
580,
13,
13,
1678,
396,
1053,
11451,
1688,
29936,
11451,
1688,
29889,
3396,
580,
13,
2
] |
saleor/order/migrations/0072_django_price_2.py | elwoodxblues/saleor | 19 | 11987 | # Generated by Django 2.2.4 on 2019-08-14 09:13
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("order", "0071_order_gift_cards")]
operations = [
migrations.RenameField(
model_name="order",
old_name="shipping_price_gross",
new_name="shipping_price_gross_amount",
),
migrations.RenameField(
model_name="order",
old_name="shipping_price_net",
new_name="shipping_price_net_amount",
),
migrations.RenameField(
model_name="order", old_name="total_gross", new_name="total_gross_amount"
),
migrations.RenameField(
model_name="order", old_name="total_net", new_name="total_net_amount"
),
migrations.RenameField(
model_name="orderline",
old_name="unit_price_gross",
new_name="unit_price_gross_amount",
),
migrations.RenameField(
model_name="orderline",
old_name="unit_price_net",
new_name="unit_price_net_amount",
),
migrations.AddField(
model_name="order",
name="currency",
field=models.CharField(
default=settings.DEFAULT_CURRENCY,
max_length=settings.DEFAULT_CURRENCY_CODE_LENGTH,
),
),
migrations.AddField(
model_name="orderline",
name="currency",
field=models.CharField(
default=settings.DEFAULT_CURRENCY,
max_length=settings.DEFAULT_CURRENCY_CODE_LENGTH,
),
),
]
| [
1,
396,
3251,
630,
491,
15337,
29871,
29906,
29889,
29906,
29889,
29946,
373,
29871,
29906,
29900,
29896,
29929,
29899,
29900,
29947,
29899,
29896,
29946,
29871,
29900,
29929,
29901,
29896,
29941,
13,
13,
3166,
9557,
29889,
5527,
1053,
6055,
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,
703,
2098,
613,
376,
29900,
29900,
29955,
29896,
29918,
2098,
29918,
29887,
2027,
29918,
28160,
13531,
13,
13,
1678,
6931,
353,
518,
13,
4706,
9725,
800,
29889,
29934,
3871,
3073,
29898,
13,
9651,
1904,
29918,
978,
543,
2098,
613,
13,
9651,
2030,
29918,
978,
543,
845,
17347,
29918,
9175,
29918,
29887,
2124,
613,
13,
9651,
716,
29918,
978,
543,
845,
17347,
29918,
9175,
29918,
29887,
2124,
29918,
14506,
613,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
29934,
3871,
3073,
29898,
13,
9651,
1904,
29918,
978,
543,
2098,
613,
13,
9651,
2030,
29918,
978,
543,
845,
17347,
29918,
9175,
29918,
1212,
613,
13,
9651,
716,
29918,
978,
543,
845,
17347,
29918,
9175,
29918,
1212,
29918,
14506,
613,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
29934,
3871,
3073,
29898,
13,
9651,
1904,
29918,
978,
543,
2098,
613,
2030,
29918,
978,
543,
7827,
29918,
29887,
2124,
613,
716,
29918,
978,
543,
7827,
29918,
29887,
2124,
29918,
14506,
29908,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
29934,
3871,
3073,
29898,
13,
9651,
1904,
29918,
978,
543,
2098,
613,
2030,
29918,
978,
543,
7827,
29918,
1212,
613,
716,
29918,
978,
543,
7827,
29918,
1212,
29918,
14506,
29908,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
29934,
3871,
3073,
29898,
13,
9651,
1904,
29918,
978,
543,
2098,
1220,
613,
13,
9651,
2030,
29918,
978,
543,
5441,
29918,
9175,
29918,
29887,
2124,
613,
13,
9651,
716,
29918,
978,
543,
5441,
29918,
9175,
29918,
29887,
2124,
29918,
14506,
613,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
29934,
3871,
3073,
29898,
13,
9651,
1904,
29918,
978,
543,
2098,
1220,
613,
13,
9651,
2030,
29918,
978,
543,
5441,
29918,
9175,
29918,
1212,
613,
13,
9651,
716,
29918,
978,
543,
5441,
29918,
9175,
29918,
1212,
29918,
14506,
613,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
2528,
3073,
29898,
13,
9651,
1904,
29918,
978,
543,
2098,
613,
13,
9651,
1024,
543,
26095,
613,
13,
9651,
1746,
29922,
9794,
29889,
27890,
29898,
13,
18884,
2322,
29922,
11027,
29889,
23397,
29918,
22484,
29934,
1430,
29907,
29979,
29892,
13,
18884,
4236,
29918,
2848,
29922,
11027,
29889,
23397,
29918,
22484,
29934,
1430,
29907,
29979,
29918,
16524,
29918,
19433,
29892,
13,
9651,
10353,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
2528,
3073,
29898,
13,
9651,
1904,
29918,
978,
543,
2098,
1220,
613,
13,
9651,
1024,
543,
26095,
613,
13,
9651,
1746,
29922,
9794,
29889,
27890,
29898,
13,
18884,
2322,
29922,
11027,
29889,
23397,
29918,
22484,
29934,
1430,
29907,
29979,
29892,
13,
18884,
4236,
29918,
2848,
29922,
11027,
29889,
23397,
29918,
22484,
29934,
1430,
29907,
29979,
29918,
16524,
29918,
19433,
29892,
13,
9651,
10353,
13,
4706,
10353,
13,
1678,
4514,
13,
2
] |
tests/datatypes/test_datatypes.py | ambv/edgedb-python | 214 | 1614136 | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2016-present MagicStack Inc. and the EdgeDB 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.
#
import unittest
import edgedb
from edgedb.datatypes import datatypes as private
from edgedb import introspect
class TestRecordDesc(unittest.TestCase):
def test_recorddesc_1(self):
with self.assertRaisesRegex(TypeError, 'one to three positional'):
private._RecordDescriptor()
with self.assertRaisesRegex(TypeError, 'one to three positional'):
private._RecordDescriptor(t=1)
with self.assertRaisesRegex(TypeError, 'requires a tuple'):
private._RecordDescriptor(1)
with self.assertRaisesRegex(TypeError, 'requires a tuple'):
private._RecordDescriptor(('a',), 1)
with self.assertRaisesRegex(TypeError,
'the same length as the names tuple'):
private._RecordDescriptor(('a',), ())
private._RecordDescriptor(('a', 'b'))
with self.assertRaisesRegex(ValueError, f'more than {0x4000-1}'):
private._RecordDescriptor(('a',) * 20000)
def test_recorddesc_2(self):
rd = private._RecordDescriptor(
('a', 'b', 'c'),
(private._EDGE_POINTER_IS_LINKPROP,
0,
private._EDGE_POINTER_IS_LINK))
self.assertEqual(rd.get_pos('a'), 0)
self.assertEqual(rd.get_pos('b'), 1)
self.assertEqual(rd.get_pos('c'), 2)
self.assertTrue(rd.is_linkprop('a'))
self.assertFalse(rd.is_linkprop('b'))
self.assertFalse(rd.is_linkprop('c'))
self.assertFalse(rd.is_link('a'))
self.assertFalse(rd.is_link('b'))
self.assertTrue(rd.is_link('c'))
with self.assertRaises(LookupError):
rd.get_pos('z')
with self.assertRaises(LookupError):
rd.is_linkprop('z')
def test_recorddesc_3(self):
f = private.create_object_factory(
id={'property', 'implicit'},
lb='link-property',
c='property',
d='link',
)
o = f(1, 2, 3, 4)
desc = private.get_object_descriptor(o)
self.assertEqual(set(dir(desc)), set(('id', 'lb', 'c', 'd')))
self.assertTrue(desc.is_linkprop('lb'))
self.assertFalse(desc.is_linkprop('id'))
self.assertFalse(desc.is_linkprop('c'))
self.assertFalse(desc.is_linkprop('d'))
self.assertFalse(desc.is_link('lb'))
self.assertFalse(desc.is_link('id'))
self.assertFalse(desc.is_link('c'))
self.assertTrue(desc.is_link('d'))
self.assertFalse(desc.is_implicit('lb'))
self.assertTrue(desc.is_implicit('id'))
self.assertFalse(desc.is_implicit('c'))
self.assertFalse(desc.is_implicit('d'))
self.assertEqual(desc.get_pos('lb'), 1)
self.assertEqual(desc.get_pos('id'), 0)
self.assertEqual(desc.get_pos('c'), 2)
self.assertEqual(desc.get_pos('d'), 3)
def test_recorddesc_4(self):
f = private.create_object_factory(
id={'property', 'implicit'},
lb='link-property',
c='property',
d='link',
)
o = f(1, 2, 3, 4)
intro = introspect.introspect_object(o)
self.assertEqual(
intro.pointers,
(
('id', introspect.PointerKind.PROPERTY, True),
('c', introspect.PointerKind.PROPERTY, False),
('d', introspect.PointerKind.LINK, False),
)
)
# clear cache so that tests in refcount mode don't freak out.
introspect._introspect_object_desc.cache_clear()
class TestTuple(unittest.TestCase):
def test_tuple_empty_1(self):
t = edgedb.Tuple()
self.assertEqual(len(t), 0)
self.assertEqual(hash(t), hash(()))
self.assertEqual(repr(t), '()')
with self.assertRaisesRegex(IndexError, 'out of range'):
t[0]
def test_tuple_2(self):
t = edgedb.Tuple((1, 'a'))
self.assertEqual(len(t), 2)
self.assertEqual(hash(t), hash((1, 'a')))
self.assertEqual(repr(t), "(1, 'a')")
self.assertEqual(t[0], 1)
self.assertEqual(t[1], 'a')
with self.assertRaisesRegex(IndexError, 'out of range'):
t[2]
def test_tuple_3(self):
t = edgedb.Tuple((1, []))
t[1].append(t)
self.assertEqual(t[1], [t])
self.assertEqual(repr(t), '(1, [(...)])')
self.assertEqual(str(t), '(1, [(...)])')
def test_tuple_4(self):
with self.assertRaisesRegex(ValueError, f'more than {0x4000 - 1}'):
edgedb.Tuple([1] * 20000)
def test_tuple_freelist_1(self):
lst = []
for _ in range(5000):
lst.append(edgedb.Tuple((1,)))
for t in lst:
self.assertEqual(t[0], 1)
def test_tuple_5(self):
self.assertEqual(
edgedb.Tuple([1, 2, 3]),
edgedb.Tuple([1, 2, 3]))
self.assertNotEqual(
edgedb.Tuple([1, 2, 3]),
edgedb.Tuple([1, 3, 2]))
self.assertLess(
edgedb.Tuple([1, 2, 3]),
edgedb.Tuple([1, 3, 2]))
self.assertEqual(
edgedb.Tuple([]),
edgedb.Tuple([]))
self.assertEqual(
edgedb.Tuple([1]),
edgedb.Tuple([1]))
self.assertGreaterEqual(
edgedb.Tuple([1]),
edgedb.Tuple([1]))
self.assertNotEqual(
edgedb.Tuple([1]),
edgedb.Tuple([]))
self.assertGreater(
edgedb.Tuple([1]),
edgedb.Tuple([]))
self.assertNotEqual(
edgedb.Tuple([1]),
edgedb.Tuple([2]))
self.assertLess(
edgedb.Tuple([1]),
edgedb.Tuple([2]))
self.assertNotEqual(
edgedb.Tuple([1, 2]),
edgedb.Tuple([2, 2]))
self.assertNotEqual(
edgedb.Tuple([1, 1]),
edgedb.Tuple([2, 2, 1]))
def test_tuple_6(self):
self.assertEqual(
edgedb.Tuple([1, 2, 3]),
(1, 2, 3))
self.assertEqual(
(1, 2, 3),
edgedb.Tuple([1, 2, 3]))
self.assertNotEqual(
edgedb.Tuple([1, 2, 3]),
(1, 3, 2))
self.assertLess(
edgedb.Tuple([1, 2, 3]),
(1, 3, 2))
self.assertEqual(
edgedb.Tuple([]),
())
self.assertEqual(
edgedb.Tuple([1]),
(1,))
self.assertGreaterEqual(
edgedb.Tuple([1]),
(1,))
self.assertNotEqual(
edgedb.Tuple([1]),
())
self.assertGreater(
edgedb.Tuple([1]),
())
self.assertNotEqual(
edgedb.Tuple([1]),
(2,))
self.assertLess(
edgedb.Tuple([1]),
(2,))
self.assertNotEqual(
edgedb.Tuple([1, 2]),
(2, 2))
self.assertNotEqual(
edgedb.Tuple([1, 1]),
(2, 2, 1))
def test_tuple_7(self):
self.assertNotEqual(
edgedb.Tuple([1, 2, 3]),
123)
class TestNamedTuple(unittest.TestCase):
def test_namedtuple_empty_1(self):
with self.assertRaisesRegex(ValueError, 'at least one field'):
edgedb.NamedTuple()
def test_namedtuple_2(self):
t = edgedb.NamedTuple(a=1)
self.assertEqual(repr(t), "(a := 1)")
t = edgedb.NamedTuple(a=1, b='a')
self.assertEqual(set(dir(t)), {'a', 'b'})
self.assertEqual(repr(t), "(a := 1, b := 'a')")
self.assertEqual(t[0], 1)
self.assertEqual(t[1], 'a')
with self.assertRaisesRegex(IndexError, 'out of range'):
t[2]
self.assertEqual(len(t), 2)
self.assertEqual(hash(t), hash((1, 'a')))
self.assertEqual(t.a, 1)
self.assertEqual(t.b, 'a')
with self.assertRaises(AttributeError):
t.z
def test_namedtuple_3(self):
t = edgedb.NamedTuple(a=1, b=[])
t.b.append(t)
self.assertEqual(t.b, [t])
self.assertEqual(repr(t), '(a := 1, b := [(...)])')
self.assertEqual(str(t), '(a := 1, b := [(...)])')
def test_namedtuple_4(self):
t1 = edgedb.NamedTuple(a=1, b='aaaa')
t2 = edgedb.Tuple((1, 'aaaa'))
t3 = (1, 'aaaa')
self.assertEqual(hash(t1), hash(t2))
self.assertEqual(hash(t1), hash(t3))
def test_namedtuple_5(self):
self.assertEqual(
edgedb.NamedTuple(a=1, b=2, c=3),
edgedb.NamedTuple(x=1, y=2, z=3))
self.assertNotEqual(
edgedb.NamedTuple(a=1, b=2, c=3),
edgedb.NamedTuple(a=1, c=3, b=2))
self.assertLess(
edgedb.NamedTuple(a=1, b=2, c=3),
edgedb.NamedTuple(a=1, b=3, c=2))
self.assertEqual(
edgedb.NamedTuple(a=1),
edgedb.NamedTuple(b=1))
self.assertEqual(
edgedb.NamedTuple(a=1),
edgedb.NamedTuple(a=1))
def test_namedtuple_6(self):
self.assertEqual(
edgedb.NamedTuple(a=1, b=2, c=3),
(1, 2, 3))
self.assertEqual(
(1, 2, 3),
edgedb.NamedTuple(a=1, b=2, c=3))
self.assertNotEqual(
edgedb.NamedTuple(a=1, b=2, c=3),
(1, 3, 2))
self.assertLess(
edgedb.NamedTuple(a=1, b=2, c=3),
(1, 3, 2))
self.assertEqual(
edgedb.NamedTuple(a=1),
(1,))
self.assertEqual(
edgedb.NamedTuple(a=1),
(1,))
def test_namedtuple_7(self):
self.assertNotEqual(
edgedb.NamedTuple(a=1, b=2, c=3),
1)
class TestObject(unittest.TestCase):
def test_object_1(self):
f = private.create_object_factory(
id='property',
lb='link-property',
c='property'
)
o = f(1, 2, 3)
self.assertEqual(repr(o), 'Object{id := 1, @lb := 2, c := 3}')
self.assertEqual(o.id, 1)
self.assertEqual(o.c, 3)
with self.assertRaises(AttributeError):
o.lb
with self.assertRaises(AttributeError):
o.z
with self.assertRaises(TypeError):
len(o)
with self.assertRaises(KeyError):
o[0]
with self.assertRaises(TypeError):
o['id']
self.assertEqual(set(dir(o)), {'id', 'c'})
def test_object_2(self):
f = private.create_object_factory(
id={'property', 'implicit'},
lb='link-property',
c='property'
)
o = f(1, 2, 3)
self.assertEqual(repr(o), 'Object{@lb := 2, c := 3}')
self.assertEqual(hash(o), hash(f(1, 2, 3)))
self.assertNotEqual(hash(o), hash(f(1, 2, 'aaaa')))
self.assertNotEqual(hash(o), hash((1, 2, 3)))
self.assertEqual(set(dir(o)), {'id', 'c'})
def test_object_3(self):
f = private.create_object_factory(id='property', c='link')
o = f(1, [])
o.c.append(o)
self.assertEqual(repr(o), 'Object{id := 1, c := [Object{...}]}')
with self.assertRaisesRegex(TypeError, 'unhashable'):
hash(o)
def test_object_4(self):
f = private.create_object_factory(
id={'property', 'implicit'},
lb='link-property',
c='property'
)
o1 = f(1, 'aa', 'ba')
o2 = f(1, 'ab', 'bb')
o3 = f(3, 'ac', 'bc')
self.assertEqual(o1, o2)
self.assertNotEqual(o1, o3)
self.assertLess(o1, o3)
self.assertGreater(o3, o2)
def test_object_5(self):
f = private.create_object_factory(
a='property',
lb='link-property',
c='property'
)
with self.assertRaisesRegex(ValueError, "without 'id' field"):
f(1, 2, 3)
def test_object_6(self):
User = private.create_object_factory(
id='property',
name='property',
)
u = User(1, 'user1')
with self.assertRaisesRegex(TypeError,
"property 'name' should be "
"accessed via dot notation"):
u['name']
def test_object_links_1(self):
O2 = private.create_object_factory(
id='property',
lb='link-property',
c='property'
)
O1 = private.create_object_factory(
id='property',
o2s='link'
)
o2_1 = O2(1, 'linkprop o2 1', 3)
o2_2 = O2(4, 'linkprop o2 2', 6)
o1 = O1(2, edgedb.Set((o2_1, o2_2)))
linkset = o1['o2s']
self.assertEqual(len(linkset), 2)
self.assertEqual(linkset, o1['o2s'])
self.assertEqual(hash(linkset), hash(o1['o2s']))
self.assertEqual(
repr(linkset),
"LinkSet(name='o2s', source_id=2, target_ids={1, 4})")
link1 = linkset[0]
self.assertIs(link1.source, o1)
self.assertIs(link1.target, o2_1)
self.assertEqual(
repr(link1),
"Link(name='o2s', source_id=2, target_id=1)")
self.assertEqual(set(dir(link1)), {'target', 'source', 'lb'})
link2 = linkset[1]
self.assertIs(link2.source, o1)
self.assertIs(link2.target, o2_2)
self.assertNotEqual(link1, link2)
self.assertEqual(list(linkset), [link1, link2])
self.assertEqual([link for link in linkset], [link1, link2])
self.assertNotEqual(link1, link2)
self.assertEqual(link1.lb, 'linkprop o2 1')
self.assertEqual(link2.lb, 'linkprop o2 2')
with self.assertRaises(AttributeError):
link2.aaaa
def test_object_links_2(self):
User = private.create_object_factory(
id='property',
friends='link',
enemies='link',
)
u1 = User(1, edgedb.Set([]), edgedb.Set([]))
u2 = User(2, edgedb.Set([]), edgedb.Set([]))
u3 = User(3, edgedb.Set([]), edgedb.Set([]))
u4 = User(4, edgedb.Set([u1, u2]), edgedb.Set([u1, u2]))
u5 = User(5, edgedb.Set([u1, u3]), edgedb.Set([u1, u2]))
self.assertNotEqual(u4['friends'], u4['enemies'])
self.assertNotEqual(u4['enemies'], u5['enemies'])
self.assertEqual(set(dir(u1)), {'id', 'friends', 'enemies'})
def test_object_links_3(self):
User = private.create_object_factory(
id='property',
friend='link',
)
u1 = User(1, None)
u2 = User(2, u1)
u3 = User(3, edgedb.Set([]))
self.assertEqual(set(dir(u2['friend'])), {'source', 'target'})
self.assertIs(u2['friend'].target, u1)
self.assertIsNone(u1['friend'])
self.assertEqual(len(u3['friend']), 0)
self.assertEqual(
repr(u3['friend']),
"LinkSet(name='friend', source_id=3, target_ids={})")
self.assertEqual(
repr(u2['friend']),
"Link(name='friend', source_id=2, target_id=1)")
def test_object_links_4(self):
User = private.create_object_factory(
id='property',
friend='link',
)
u = User(1, None)
with self.assertRaisesRegex(KeyError,
"link 'error_key' does not exist"):
u['error_key']
class TestSet(unittest.TestCase):
def test_set_1(self):
s = edgedb.Set(())
self.assertEqual(repr(s), 'Set{}')
s = edgedb.Set((1, 2, [], 'a'))
self.assertEqual(s[1], 2)
self.assertEqual(s[2], [])
self.assertEqual(len(s), 4)
with self.assertRaises(IndexError):
s[10]
with self.assertRaises(TypeError):
s[0] = 1
def test_set_2(self):
s = edgedb.Set((1, 2, 3000, 'a'))
self.assertEqual(repr(s), "Set{1, 2, 3000, 'a'}")
self.assertEqual(
hash(s),
hash(edgedb.Set((1, 2, sum([1000, 2000]), 'a'))))
self.assertNotEqual(
hash(s),
hash((1, 2, 3000, 'a')))
def test_set_3(self):
s = edgedb.Set(())
self.assertEqual(len(s), 0)
self.assertEqual(hash(s), hash(edgedb.Set(())))
self.assertNotEqual(hash(s), hash(()))
def test_set_4(self):
s = edgedb.Set(([],))
s[0].append(s)
self.assertEqual(repr(s), "Set{[Set{...}]}")
def test_set_5(self):
self.assertEqual(
edgedb.Set([1, 2, 3]),
edgedb.Set([3, 2, 1]))
self.assertEqual(
edgedb.Set([]),
edgedb.Set([]))
self.assertEqual(
edgedb.Set([1]),
edgedb.Set([1]))
self.assertNotEqual(
edgedb.Set([1]),
edgedb.Set([]))
self.assertNotEqual(
edgedb.Set([1]),
edgedb.Set([2]))
self.assertNotEqual(
edgedb.Set([1, 2]),
edgedb.Set([2, 2]))
self.assertNotEqual(
edgedb.Set([1, 1, 2]),
edgedb.Set([2, 2, 1]))
def test_set_6(self):
f = private.create_object_factory(
id={'property', 'implicit'},
lb='link-property',
c='property'
)
o1 = f(1, 'aa', edgedb.Set([1, 2, 3]))
o2 = f(1, 'ab', edgedb.Set([1, 2, 4]))
o3 = f(3, 'ac', edgedb.Set([5, 5, 5, 5]))
self.assertEqual(
edgedb.Set([o1, o2, o3]),
edgedb.Set([o2, o3, o1]))
self.assertEqual(
edgedb.Set([o1, o3]),
edgedb.Set([o2, o3]))
self.assertNotEqual(
edgedb.Set([o1, o1]),
edgedb.Set([o2, o3]))
def test_set_7(self):
self.assertEqual(
edgedb.Set([1, 2, 3]),
[1, 2, 3])
self.assertNotEqual(
edgedb.Set([1, 2, 3]),
[3, 2, 1])
self.assertNotEqual(
edgedb.Set([1, 2, 3]),
1)
def test_set_8(self):
s = edgedb.Set([1, 2, 3])
si = iter(s)
self.assertEqual(list(si), [1, 2, 3])
class TestArray(unittest.TestCase):
def test_array_empty_1(self):
t = edgedb.Array()
self.assertEqual(len(t), 0)
self.assertNotEqual(hash(t), hash(()))
with self.assertRaisesRegex(IndexError, 'out of range'):
t[0]
self.assertEqual(repr(t), "[]")
def test_array_2(self):
t = edgedb.Array((1, 'a'))
self.assertEqual(repr(t), "[1, 'a']")
self.assertEqual(str(t), "[1, 'a']")
self.assertEqual(len(t), 2)
self.assertEqual(hash(t), hash(edgedb.Array([1, 'a'])))
self.assertNotEqual(hash(t), hash(edgedb.Array([10, 'ab'])))
self.assertEqual(t[0], 1)
self.assertEqual(t[1], 'a')
with self.assertRaisesRegex(IndexError, 'out of range'):
t[2]
def test_array_3(self):
t = edgedb.Array((1, []))
t[1].append(t)
self.assertEqual(t[1], [t])
self.assertEqual(repr(t), '[1, [[...]]]')
def test_array_4(self):
self.assertEqual(
edgedb.Array([1, 2, 3]),
edgedb.Array([1, 2, 3]))
self.assertNotEqual(
edgedb.Array([1, 2, 3]),
edgedb.Array([1, 3, 2]))
self.assertLess(
edgedb.Array([1, 2, 3]),
edgedb.Array([1, 3, 2]))
self.assertEqual(
edgedb.Array([]),
edgedb.Array([]))
self.assertEqual(
edgedb.Array([1]),
edgedb.Array([1]))
self.assertGreaterEqual(
edgedb.Array([1]),
edgedb.Array([1]))
self.assertNotEqual(
edgedb.Array([1]),
edgedb.Array([]))
self.assertGreater(
edgedb.Array([1]),
edgedb.Array([]))
self.assertNotEqual(
edgedb.Array([1]),
edgedb.Array([2]))
self.assertLess(
edgedb.Array([1]),
edgedb.Array([2]))
self.assertNotEqual(
edgedb.Array([1, 2]),
edgedb.Array([2, 2]))
self.assertNotEqual(
edgedb.Array([1, 1]),
edgedb.Array([2, 2, 1]))
def test_array_5(self):
self.assertEqual(
edgedb.Array([1, 2, 3]),
[1, 2, 3])
self.assertEqual(
[1, 2, 3],
edgedb.Array([1, 2, 3]))
self.assertNotEqual(
[1, 2, 4],
edgedb.Array([1, 2, 3]))
self.assertNotEqual(
edgedb.Array([1, 2, 3]),
[1, 3, 2])
self.assertLess(
edgedb.Array([1, 2, 3]),
[1, 3, 2])
self.assertEqual(
edgedb.Array([]),
[])
self.assertEqual(
edgedb.Array([1]),
[1])
self.assertGreaterEqual(
edgedb.Array([1]),
[1])
self.assertNotEqual(
edgedb.Array([1]),
[])
self.assertGreater(
edgedb.Array([1]),
[])
self.assertNotEqual(
edgedb.Array([1]),
[2])
self.assertLess(
edgedb.Array([1]),
[2])
self.assertNotEqual(
edgedb.Array([1, 2]),
[2, 2])
self.assertNotEqual(
edgedb.Array([1, 1]),
[2, 2, 1])
def test_array_6(self):
self.assertNotEqual(
edgedb.Array([1, 2, 3]),
False)
| [
1,
396,
13,
29937,
910,
2752,
934,
338,
760,
310,
278,
21086,
4051,
1722,
2752,
2060,
29889,
13,
29937,
13,
29937,
14187,
1266,
29871,
29906,
29900,
29896,
29953,
29899,
6338,
26494,
7264,
9266,
29889,
322,
278,
21086,
4051,
15717,
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,
13,
13,
5215,
443,
27958,
13,
13,
13,
5215,
1226,
3192,
29890,
13,
3166,
1226,
3192,
29890,
29889,
4130,
271,
7384,
1053,
1418,
271,
7384,
408,
2024,
13,
3166,
1226,
3192,
29890,
1053,
25956,
1103,
13,
13,
13,
1990,
4321,
9182,
19617,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
13,
1678,
822,
1243,
29918,
11651,
14273,
29918,
29896,
29898,
1311,
1125,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
735,
29898,
1542,
2392,
29892,
525,
650,
304,
2211,
2602,
284,
29374,
13,
9651,
2024,
3032,
9182,
19124,
580,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
735,
29898,
1542,
2392,
29892,
525,
650,
304,
2211,
2602,
284,
29374,
13,
9651,
2024,
3032,
9182,
19124,
29898,
29873,
29922,
29896,
29897,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
735,
29898,
1542,
2392,
29892,
525,
276,
339,
2658,
263,
18761,
29374,
13,
9651,
2024,
3032,
9182,
19124,
29898,
29896,
29897,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
735,
29898,
1542,
2392,
29892,
525,
276,
339,
2658,
263,
18761,
29374,
13,
9651,
2024,
3032,
9182,
19124,
29898,
877,
29874,
742,
511,
29871,
29896,
29897,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
735,
29898,
1542,
2392,
29892,
13,
462,
462,
1678,
525,
1552,
1021,
3309,
408,
278,
2983,
18761,
29374,
13,
9651,
2024,
3032,
9182,
19124,
29898,
877,
29874,
742,
511,
313,
876,
13,
13,
4706,
2024,
3032,
9182,
19124,
29898,
877,
29874,
742,
525,
29890,
8785,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
735,
29898,
1917,
2392,
29892,
285,
29915,
5514,
1135,
426,
29900,
29916,
29946,
29900,
29900,
29900,
29899,
29896,
10162,
1125,
13,
9651,
2024,
3032,
9182,
19124,
29898,
877,
29874,
742,
29897,
334,
29871,
29906,
29900,
29900,
29900,
29900,
29897,
13,
13,
1678,
822,
1243,
29918,
11651,
14273,
29918,
29906,
29898,
1311,
1125,
13,
4706,
364,
29881,
353,
2024,
3032,
9182,
19124,
29898,
13,
9651,
6702,
29874,
742,
525,
29890,
742,
525,
29883,
5477,
13,
9651,
313,
9053,
3032,
3352,
1692,
29918,
29925,
6992,
4945,
29918,
3235,
29918,
23714,
29968,
8618,
29925,
29892,
13,
795,
29900,
29892,
13,
632,
2024,
3032,
3352,
1692,
29918,
29925,
6992,
4945,
29918,
3235,
29918,
23714,
29968,
876,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5499,
29889,
657,
29918,
1066,
877,
29874,
5477,
29871,
29900,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5499,
29889,
657,
29918,
1066,
877,
29890,
5477,
29871,
29896,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
5499,
29889,
657,
29918,
1066,
877,
29883,
5477,
29871,
29906,
29897,
13,
13,
4706,
1583,
29889,
9294,
5574,
29898,
5499,
29889,
275,
29918,
2324,
7728,
877,
29874,
8785,
13,
4706,
1583,
29889,
9294,
8824,
29898,
5499,
29889,
275,
29918,
2324,
7728,
877,
29890,
8785,
13,
4706,
1583,
29889,
9294,
8824,
29898,
5499,
29889,
275,
29918,
2324,
7728,
877,
29883,
8785,
13,
13,
4706,
1583,
29889,
9294,
8824,
29898,
5499,
29889,
275,
29918,
2324,
877,
29874,
8785,
13,
4706,
1583,
29889,
9294,
8824,
29898,
5499,
29889,
275,
29918,
2324,
877,
29890,
8785,
13,
4706,
1583,
29889,
9294,
5574,
29898,
5499,
29889,
275,
29918,
2324,
877,
29883,
8785,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
14959,
786,
2392,
1125,
13,
9651,
364,
29881,
29889,
657,
29918,
1066,
877,
29920,
1495,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
14959,
786,
2392,
1125,
13,
9651,
364,
29881,
29889,
275,
29918,
2324,
7728,
877,
29920,
1495,
13,
13,
1678,
822,
1243,
29918,
11651,
14273,
29918,
29941,
29898,
1311,
1125,
13,
4706,
285,
353,
2024,
29889,
3258,
29918,
3318,
29918,
14399,
29898,
13,
9651,
1178,
3790,
29915,
6799,
742,
525,
6574,
4019,
16675,
13,
9651,
27981,
2433,
2324,
29899,
6799,
742,
13,
9651,
274,
2433,
6799,
742,
13,
9651,
270,
2433,
2324,
742,
13,
4706,
1723,
13,
13,
4706,
288,
353,
285,
29898,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29897,
13,
13,
4706,
5153,
353,
2024,
29889,
657,
29918,
3318,
29918,
2783,
11709,
29898,
29877,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
842,
29898,
3972,
29898,
14273,
8243,
731,
29898,
877,
333,
742,
525,
27728,
742,
525,
29883,
742,
525,
29881,
29915,
4961,
13,
13,
4706,
1583,
29889,
9294,
5574,
29898,
14273,
29889,
275,
29918,
2324,
7728,
877,
27728,
8785,
13,
4706,
1583,
29889,
9294,
8824,
29898,
14273,
29889,
275,
29918,
2324,
7728,
877,
333,
8785,
13,
4706,
1583,
29889,
9294,
8824,
29898,
14273,
29889,
275,
29918,
2324,
7728,
877,
29883,
8785,
13,
4706,
1583,
29889,
9294,
8824,
29898,
14273,
29889,
275,
29918,
2324,
7728,
877,
29881,
8785,
13,
13,
4706,
1583,
29889,
9294,
8824,
29898,
14273,
29889,
275,
29918,
2324,
877,
27728,
8785,
13,
4706,
1583,
29889,
9294,
8824,
29898,
14273,
29889,
275,
29918,
2324,
877,
333,
8785,
13,
4706,
1583,
29889,
9294,
8824,
29898,
14273,
29889,
275,
29918,
2324,
877,
29883,
8785,
13,
4706,
1583,
29889,
9294,
5574,
29898,
14273,
29889,
275,
29918,
2324,
877,
29881,
8785,
13,
13,
4706,
1583,
29889,
9294,
8824,
29898,
14273,
29889,
275,
29918,
6574,
4019,
877,
27728,
8785,
13,
4706,
1583,
29889,
9294,
5574,
29898,
14273,
29889,
275,
29918,
6574,
4019,
877,
333,
8785,
13,
4706,
1583,
29889,
9294,
8824,
29898,
14273,
29889,
275,
29918,
6574,
4019,
877,
29883,
8785,
13,
4706,
1583,
29889,
9294,
8824,
29898,
14273,
29889,
275,
29918,
6574,
4019,
877,
29881,
8785,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
14273,
29889,
657,
29918,
1066,
877,
27728,
5477,
29871,
29896,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
14273,
29889,
657,
29918,
1066,
877,
333,
5477,
29871,
29900,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
14273,
29889,
657,
29918,
1066,
877,
29883,
5477,
29871,
29906,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
14273,
29889,
657,
29918,
1066,
877,
29881,
5477,
29871,
29941,
29897,
13,
13,
1678,
822,
1243,
29918,
11651,
14273,
29918,
29946,
29898,
1311,
1125,
13,
4706,
285,
353,
2024,
29889,
3258,
29918,
3318,
29918,
14399,
29898,
13,
9651,
1178,
3790,
29915,
6799,
742,
525,
6574,
4019,
16675,
13,
9651,
27981,
2433,
2324,
29899,
6799,
742,
13,
9651,
274,
2433,
6799,
742,
13,
9651,
270,
2433,
2324,
742,
13,
4706,
1723,
13,
13,
4706,
288,
353,
285,
29898,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29946,
29897,
13,
4706,
22909,
353,
25956,
1103,
29889,
524,
1883,
1103,
29918,
3318,
29898,
29877,
29897,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
22909,
29889,
17226,
29879,
29892,
13,
9651,
313,
13,
18884,
6702,
333,
742,
25956,
1103,
29889,
14516,
11885,
29889,
8618,
13171,
15631,
29892,
5852,
511,
13,
18884,
6702,
29883,
742,
25956,
1103,
29889,
14516,
11885,
29889,
8618,
13171,
15631,
29892,
7700,
511,
13,
18884,
6702,
29881,
742,
25956,
1103,
29889,
14516,
11885,
29889,
23714,
29968,
29892,
7700,
511,
13,
9651,
1723,
13,
4706,
1723,
13,
13,
4706,
396,
2821,
7090,
577,
393,
6987,
297,
2143,
2798,
4464,
1016,
29915,
29873,
3005,
557,
714,
29889,
13,
4706,
25956,
1103,
3032,
524,
1883,
1103,
29918,
3318,
29918,
14273,
29889,
8173,
29918,
8551,
580,
13,
13,
13,
1990,
4321,
23215,
552,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
13,
1678,
822,
1243,
29918,
23583,
29918,
6310,
29918,
29896,
29898,
1311,
1125,
13,
4706,
260,
353,
1226,
3192,
29890,
29889,
23215,
552,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
29873,
511,
29871,
29900,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
8568,
29898,
29873,
511,
6608,
14885,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
276,
558,
29898,
29873,
511,
525,
580,
1495,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
735,
29898,
3220,
2392,
29892,
525,
449,
310,
3464,
29374,
13,
9651,
260,
29961,
29900,
29962,
13,
13,
1678,
822,
1243,
29918,
23583,
29918,
29906,
29898,
1311,
1125,
13,
4706,
260,
353,
1226,
3192,
29890,
29889,
23215,
552,
3552,
29896,
29892,
525,
29874,
8785,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
29873,
511,
29871,
29906,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
8568,
29898,
29873,
511,
6608,
3552,
29896,
29892,
525,
29874,
29915,
4961,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
276,
558,
29898,
29873,
511,
18227,
29896,
29892,
525,
29874,
1495,
1159,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29873,
29961,
29900,
1402,
29871,
29896,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29873,
29961,
29896,
1402,
525,
29874,
1495,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
735,
29898,
3220,
2392,
29892,
525,
449,
310,
3464,
29374,
13,
9651,
260,
29961,
29906,
29962,
13,
13,
1678,
822,
1243,
29918,
23583,
29918,
29941,
29898,
1311,
1125,
13,
4706,
260,
353,
1226,
3192,
29890,
29889,
23215,
552,
3552,
29896,
29892,
5159,
876,
13,
4706,
260,
29961,
29896,
1822,
4397,
29898,
29873,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29873,
29961,
29896,
1402,
518,
29873,
2314,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
276,
558,
29898,
29873,
511,
525,
29898,
29896,
29892,
17288,
11410,
2314,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
710,
29898,
29873,
511,
525,
29898,
29896,
29892,
17288,
11410,
2314,
1495,
13,
13,
1678,
822,
1243,
29918,
23583,
29918,
29946,
29898,
1311,
1125,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
735,
29898,
1917,
2392,
29892,
285,
29915,
5514,
1135,
426,
29900,
29916,
29946,
29900,
29900,
29900,
448,
29871,
29896,
10162,
1125,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
29962,
334,
29871,
29906,
29900,
29900,
29900,
29900,
29897,
13,
13,
1678,
822,
1243,
29918,
23583,
29918,
10745,
295,
391,
29918,
29896,
29898,
1311,
1125,
13,
4706,
24471,
353,
5159,
13,
4706,
363,
903,
297,
3464,
29898,
29945,
29900,
29900,
29900,
1125,
13,
9651,
24471,
29889,
4397,
29898,
287,
3192,
29890,
29889,
23215,
552,
3552,
29896,
29892,
4961,
13,
4706,
363,
260,
297,
24471,
29901,
13,
9651,
1583,
29889,
9294,
9843,
29898,
29873,
29961,
29900,
1402,
29871,
29896,
29897,
13,
13,
1678,
822,
1243,
29918,
23583,
29918,
29945,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
12622,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
29892,
29871,
29941,
29892,
29871,
29906,
12622,
13,
13,
4706,
1583,
29889,
9294,
29931,
404,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
29892,
29871,
29941,
29892,
29871,
29906,
12622,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
29898,
2636,
511,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
29898,
2636,
876,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
12622,
13,
13,
4706,
1583,
29889,
9294,
25120,
1008,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
12622,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
29898,
2636,
876,
13,
13,
4706,
1583,
29889,
9294,
25120,
1008,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
29898,
2636,
876,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29906,
12622,
13,
13,
4706,
1583,
29889,
9294,
29931,
404,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29906,
12622,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
29892,
29871,
29906,
11724,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29906,
29892,
29871,
29906,
12622,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
29892,
29871,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29906,
29892,
29871,
29906,
29892,
29871,
29896,
12622,
13,
13,
1678,
822,
1243,
29918,
23583,
29918,
29953,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
9651,
313,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
876,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
313,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
511,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
12622,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
9651,
313,
29896,
29892,
29871,
29941,
29892,
29871,
29906,
876,
13,
13,
4706,
1583,
29889,
9294,
29931,
404,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
9651,
313,
29896,
29892,
29871,
29941,
29892,
29871,
29906,
876,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
29898,
2636,
511,
13,
9651,
313,
876,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
11724,
13,
9651,
313,
29896,
29892,
876,
13,
13,
4706,
1583,
29889,
9294,
25120,
1008,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
11724,
13,
9651,
313,
29896,
29892,
876,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
11724,
13,
9651,
313,
876,
13,
13,
4706,
1583,
29889,
9294,
25120,
1008,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
11724,
13,
9651,
313,
876,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
11724,
13,
9651,
313,
29906,
29892,
876,
13,
13,
4706,
1583,
29889,
9294,
29931,
404,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
11724,
13,
9651,
313,
29906,
29892,
876,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
29892,
29871,
29906,
11724,
13,
9651,
313,
29906,
29892,
29871,
29906,
876,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
29892,
29871,
29896,
11724,
13,
9651,
313,
29906,
29892,
29871,
29906,
29892,
29871,
29896,
876,
13,
13,
1678,
822,
1243,
29918,
23583,
29918,
29955,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
23215,
552,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
632,
29896,
29906,
29941,
29897,
13,
13,
13,
1990,
4321,
22175,
23215,
552,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
13,
1678,
822,
1243,
29918,
17514,
23583,
29918,
6310,
29918,
29896,
29898,
1311,
1125,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
735,
29898,
1917,
2392,
29892,
525,
271,
3203,
697,
1746,
29374,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
580,
13,
13,
1678,
822,
1243,
29918,
17514,
23583,
29918,
29906,
29898,
1311,
1125,
13,
4706,
260,
353,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
276,
558,
29898,
29873,
511,
18227,
29874,
3490,
29871,
29896,
25760,
13,
13,
4706,
260,
353,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
29892,
289,
2433,
29874,
1495,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
842,
29898,
3972,
29898,
29873,
8243,
11117,
29874,
742,
525,
29890,
29915,
1800,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
276,
558,
29898,
29873,
511,
18227,
29874,
3490,
29871,
29896,
29892,
289,
3490,
525,
29874,
1495,
1159,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29873,
29961,
29900,
1402,
29871,
29896,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29873,
29961,
29896,
1402,
525,
29874,
1495,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
735,
29898,
3220,
2392,
29892,
525,
449,
310,
3464,
29374,
13,
9651,
260,
29961,
29906,
29962,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
29873,
511,
29871,
29906,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
8568,
29898,
29873,
511,
6608,
3552,
29896,
29892,
525,
29874,
29915,
4961,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29873,
29889,
29874,
29892,
29871,
29896,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29873,
29889,
29890,
29892,
525,
29874,
1495,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
6708,
2392,
1125,
13,
9651,
260,
29889,
29920,
13,
13,
1678,
822,
1243,
29918,
17514,
23583,
29918,
29941,
29898,
1311,
1125,
13,
4706,
260,
353,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
29892,
289,
11759,
2314,
13,
4706,
260,
29889,
29890,
29889,
4397,
29898,
29873,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29873,
29889,
29890,
29892,
518,
29873,
2314,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
276,
558,
29898,
29873,
511,
525,
29898,
29874,
3490,
29871,
29896,
29892,
289,
3490,
17288,
11410,
2314,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
710,
29898,
29873,
511,
525,
29898,
29874,
3490,
29871,
29896,
29892,
289,
3490,
17288,
11410,
2314,
1495,
13,
13,
1678,
822,
1243,
29918,
17514,
23583,
29918,
29946,
29898,
1311,
1125,
13,
4706,
260,
29896,
353,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
29892,
289,
2433,
27137,
1495,
13,
4706,
260,
29906,
353,
1226,
3192,
29890,
29889,
23215,
552,
3552,
29896,
29892,
525,
27137,
8785,
13,
4706,
260,
29941,
353,
313,
29896,
29892,
525,
27137,
1495,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
8568,
29898,
29873,
29896,
511,
6608,
29898,
29873,
29906,
876,
13,
4706,
1583,
29889,
9294,
9843,
29898,
8568,
29898,
29873,
29896,
511,
6608,
29898,
29873,
29941,
876,
13,
13,
1678,
822,
1243,
29918,
17514,
23583,
29918,
29945,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
29892,
289,
29922,
29906,
29892,
274,
29922,
29941,
511,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29916,
29922,
29896,
29892,
343,
29922,
29906,
29892,
503,
29922,
29941,
876,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
29892,
289,
29922,
29906,
29892,
274,
29922,
29941,
511,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
29892,
274,
29922,
29941,
29892,
289,
29922,
29906,
876,
13,
13,
4706,
1583,
29889,
9294,
29931,
404,
29898,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
29892,
289,
29922,
29906,
29892,
274,
29922,
29941,
511,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
29892,
289,
29922,
29941,
29892,
274,
29922,
29906,
876,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
511,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29890,
29922,
29896,
876,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
511,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
876,
13,
13,
1678,
822,
1243,
29918,
17514,
23583,
29918,
29953,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
29892,
289,
29922,
29906,
29892,
274,
29922,
29941,
511,
13,
9651,
313,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
876,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
313,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
511,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
29892,
289,
29922,
29906,
29892,
274,
29922,
29941,
876,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
29892,
289,
29922,
29906,
29892,
274,
29922,
29941,
511,
13,
9651,
313,
29896,
29892,
29871,
29941,
29892,
29871,
29906,
876,
13,
13,
4706,
1583,
29889,
9294,
29931,
404,
29898,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
29892,
289,
29922,
29906,
29892,
274,
29922,
29941,
511,
13,
9651,
313,
29896,
29892,
29871,
29941,
29892,
29871,
29906,
876,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
511,
13,
9651,
313,
29896,
29892,
876,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
511,
13,
9651,
313,
29896,
29892,
876,
13,
13,
1678,
822,
1243,
29918,
17514,
23583,
29918,
29955,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
22175,
23215,
552,
29898,
29874,
29922,
29896,
29892,
289,
29922,
29906,
29892,
274,
29922,
29941,
511,
13,
632,
29896,
29897,
13,
13,
13,
1990,
4321,
2061,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
13,
1678,
822,
1243,
29918,
3318,
29918,
29896,
29898,
1311,
1125,
13,
4706,
285,
353,
2024,
29889,
3258,
29918,
3318,
29918,
14399,
29898,
13,
9651,
1178,
2433,
6799,
742,
13,
9651,
27981,
2433,
2324,
29899,
6799,
742,
13,
9651,
274,
2433,
6799,
29915,
13,
4706,
1723,
13,
13,
4706,
288,
353,
285,
29898,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29897,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
276,
558,
29898,
29877,
511,
525,
2061,
29912,
333,
3490,
29871,
29896,
29892,
732,
27728,
3490,
29871,
29906,
29892,
274,
3490,
29871,
29941,
29913,
1495,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29877,
29889,
333,
29892,
29871,
29896,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29877,
29889,
29883,
29892,
29871,
29941,
29897,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
6708,
2392,
1125,
13,
9651,
288,
29889,
27728,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
6708,
2392,
1125,
13,
9651,
288,
29889,
29920,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
1542,
2392,
1125,
13,
9651,
7431,
29898,
29877,
29897,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
2558,
2392,
1125,
13,
9651,
288,
29961,
29900,
29962,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
1542,
2392,
1125,
13,
9651,
288,
1839,
333,
2033,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
842,
29898,
3972,
29898,
29877,
8243,
11117,
333,
742,
525,
29883,
29915,
1800,
13,
13,
1678,
822,
1243,
29918,
3318,
29918,
29906,
29898,
1311,
1125,
13,
4706,
285,
353,
2024,
29889,
3258,
29918,
3318,
29918,
14399,
29898,
13,
9651,
1178,
3790,
29915,
6799,
742,
525,
6574,
4019,
16675,
13,
9651,
27981,
2433,
2324,
29899,
6799,
742,
13,
9651,
274,
2433,
6799,
29915,
13,
4706,
1723,
13,
13,
4706,
288,
353,
285,
29898,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29897,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
276,
558,
29898,
29877,
511,
525,
2061,
29912,
29992,
27728,
3490,
29871,
29906,
29892,
274,
3490,
29871,
29941,
29913,
1495,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
8568,
29898,
29877,
511,
6608,
29898,
29888,
29898,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
4961,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
8568,
29898,
29877,
511,
6608,
29898,
29888,
29898,
29896,
29892,
29871,
29906,
29892,
525,
27137,
29915,
4961,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
8568,
29898,
29877,
511,
6608,
3552,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
4961,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
842,
29898,
3972,
29898,
29877,
8243,
11117,
333,
742,
525,
29883,
29915,
1800,
13,
13,
1678,
822,
1243,
29918,
3318,
29918,
29941,
29898,
1311,
1125,
13,
4706,
285,
353,
2024,
29889,
3258,
29918,
3318,
29918,
14399,
29898,
333,
2433,
6799,
742,
274,
2433,
2324,
1495,
13,
4706,
288,
353,
285,
29898,
29896,
29892,
518,
2314,
13,
13,
4706,
288,
29889,
29883,
29889,
4397,
29898,
29877,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
276,
558,
29898,
29877,
511,
525,
2061,
29912,
333,
3490,
29871,
29896,
29892,
274,
3490,
518,
2061,
29912,
856,
6525,
29913,
1495,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
735,
29898,
1542,
2392,
29892,
525,
348,
8568,
519,
29374,
13,
9651,
6608,
29898,
29877,
29897,
13,
13,
1678,
822,
1243,
29918,
3318,
29918,
29946,
29898,
1311,
1125,
13,
4706,
285,
353,
2024,
29889,
3258,
29918,
3318,
29918,
14399,
29898,
13,
9651,
1178,
3790,
29915,
6799,
742,
525,
6574,
4019,
16675,
13,
9651,
27981,
2433,
2324,
29899,
6799,
742,
13,
9651,
274,
2433,
6799,
29915,
13,
4706,
1723,
13,
13,
4706,
288,
29896,
353,
285,
29898,
29896,
29892,
525,
7340,
742,
525,
2291,
1495,
13,
4706,
288,
29906,
353,
285,
29898,
29896,
29892,
525,
370,
742,
525,
1327,
1495,
13,
4706,
288,
29941,
353,
285,
29898,
29941,
29892,
525,
562,
742,
525,
12328,
1495,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29877,
29896,
29892,
288,
29906,
29897,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
29877,
29896,
29892,
288,
29941,
29897,
13,
4706,
1583,
29889,
9294,
29931,
404,
29898,
29877,
29896,
29892,
288,
29941,
29897,
13,
4706,
1583,
29889,
9294,
25120,
1008,
29898,
29877,
29941,
29892,
288,
29906,
29897,
13,
13,
1678,
822,
1243,
29918,
3318,
29918,
29945,
29898,
1311,
1125,
13,
4706,
285,
353,
2024,
29889,
3258,
29918,
3318,
29918,
14399,
29898,
13,
9651,
263,
2433,
6799,
742,
13,
9651,
27981,
2433,
2324,
29899,
6799,
742,
13,
9651,
274,
2433,
6799,
29915,
13,
4706,
1723,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
735,
29898,
1917,
2392,
29892,
376,
14037,
525,
333,
29915,
1746,
29908,
1125,
13,
9651,
285,
29898,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29897,
13,
13,
1678,
822,
1243,
29918,
3318,
29918,
29953,
29898,
1311,
1125,
13,
4706,
4911,
353,
2024,
29889,
3258,
29918,
3318,
29918,
14399,
29898,
13,
9651,
1178,
2433,
6799,
742,
13,
9651,
1024,
2433,
6799,
742,
13,
4706,
1723,
13,
13,
4706,
318,
353,
4911,
29898,
29896,
29892,
525,
1792,
29896,
1495,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
735,
29898,
1542,
2392,
29892,
13,
462,
462,
1678,
376,
6799,
525,
978,
29915,
881,
367,
376,
13,
462,
462,
1678,
376,
5943,
287,
3025,
8329,
12640,
29908,
1125,
13,
9651,
318,
1839,
978,
2033,
13,
13,
1678,
822,
1243,
29918,
3318,
29918,
4965,
29918,
29896,
29898,
1311,
1125,
13,
4706,
438,
29906,
353,
2024,
29889,
3258,
29918,
3318,
29918,
14399,
29898,
13,
9651,
1178,
2433,
6799,
742,
13,
9651,
27981,
2433,
2324,
29899,
6799,
742,
13,
9651,
274,
2433,
6799,
29915,
13,
4706,
1723,
13,
13,
4706,
438,
29896,
353,
2024,
29889,
3258,
29918,
3318,
29918,
14399,
29898,
13,
9651,
1178,
2433,
6799,
742,
13,
9651,
288,
29906,
29879,
2433,
2324,
29915,
13,
4706,
1723,
13,
13,
4706,
288,
29906,
29918,
29896,
353,
438,
29906,
29898,
29896,
29892,
525,
2324,
7728,
288,
29906,
29871,
29896,
742,
29871,
29941,
29897,
13,
4706,
288,
29906,
29918,
29906,
353,
438,
29906,
29898,
29946,
29892,
525,
2324,
7728,
288,
29906,
29871,
29906,
742,
29871,
29953,
29897,
13,
4706,
288,
29896,
353,
438,
29896,
29898,
29906,
29892,
1226,
3192,
29890,
29889,
2697,
3552,
29877,
29906,
29918,
29896,
29892,
288,
29906,
29918,
29906,
4961,
13,
13,
4706,
1544,
842,
353,
288,
29896,
1839,
29877,
29906,
29879,
2033,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
2324,
842,
511,
29871,
29906,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2324,
842,
29892,
288,
29896,
1839,
29877,
29906,
29879,
11287,
13,
4706,
1583,
29889,
9294,
9843,
29898,
8568,
29898,
2324,
842,
511,
6608,
29898,
29877,
29896,
1839,
29877,
29906,
29879,
25901,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
2062,
29898,
2324,
842,
511,
13,
9651,
376,
6595,
2697,
29898,
978,
2433,
29877,
29906,
29879,
742,
2752,
29918,
333,
29922,
29906,
29892,
3646,
29918,
4841,
3790,
29896,
29892,
29871,
29946,
1800,
1159,
13,
13,
4706,
1544,
29896,
353,
1544,
842,
29961,
29900,
29962,
13,
4706,
1583,
29889,
9294,
3624,
29898,
2324,
29896,
29889,
4993,
29892,
288,
29896,
29897,
13,
4706,
1583,
29889,
9294,
3624,
29898,
2324,
29896,
29889,
5182,
29892,
288,
29906,
29918,
29896,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
2062,
29898,
2324,
29896,
511,
13,
9651,
376,
6595,
29898,
978,
2433,
29877,
29906,
29879,
742,
2752,
29918,
333,
29922,
29906,
29892,
3646,
29918,
333,
29922,
29896,
25760,
13,
4706,
1583,
29889,
9294,
9843,
29898,
842,
29898,
3972,
29898,
2324,
29896,
8243,
11117,
5182,
742,
525,
4993,
742,
525,
27728,
29915,
1800,
13,
13,
4706,
1544,
29906,
353,
1544,
842,
29961,
29896,
29962,
13,
4706,
1583,
29889,
9294,
3624,
29898,
2324,
29906,
29889,
4993,
29892,
288,
29896,
29897,
13,
4706,
1583,
29889,
9294,
3624,
29898,
2324,
29906,
29889,
5182,
29892,
288,
29906,
29918,
29906,
29897,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
2324,
29896,
29892,
1544,
29906,
29897,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1761,
29898,
2324,
842,
511,
518,
2324,
29896,
29892,
1544,
29906,
2314,
13,
4706,
1583,
29889,
9294,
9843,
4197,
2324,
363,
1544,
297,
1544,
842,
1402,
518,
2324,
29896,
29892,
1544,
29906,
2314,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
2324,
29896,
29892,
1544,
29906,
29897,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2324,
29896,
29889,
27728,
29892,
525,
2324,
7728,
288,
29906,
29871,
29896,
1495,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2324,
29906,
29889,
27728,
29892,
525,
2324,
7728,
288,
29906,
29871,
29906,
1495,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
6708,
2392,
1125,
13,
9651,
1544,
29906,
29889,
27137,
13,
13,
1678,
822,
1243,
29918,
3318,
29918,
4965,
29918,
29906,
29898,
1311,
1125,
13,
4706,
4911,
353,
2024,
29889,
3258,
29918,
3318,
29918,
14399,
29898,
13,
9651,
1178,
2433,
6799,
742,
13,
9651,
7875,
2433,
2324,
742,
13,
9651,
22595,
2433,
2324,
742,
13,
4706,
1723,
13,
13,
4706,
318,
29896,
353,
4911,
29898,
29896,
29892,
1226,
3192,
29890,
29889,
2697,
29898,
2636,
511,
1226,
3192,
29890,
29889,
2697,
29898,
2636,
876,
13,
4706,
318,
29906,
353,
4911,
29898,
29906,
29892,
1226,
3192,
29890,
29889,
2697,
29898,
2636,
511,
1226,
3192,
29890,
29889,
2697,
29898,
2636,
876,
13,
4706,
318,
29941,
353,
4911,
29898,
29941,
29892,
1226,
3192,
29890,
29889,
2697,
29898,
2636,
511,
1226,
3192,
29890,
29889,
2697,
29898,
2636,
876,
13,
4706,
318,
29946,
353,
4911,
29898,
29946,
29892,
1226,
3192,
29890,
29889,
2697,
4197,
29884,
29896,
29892,
318,
29906,
11724,
1226,
3192,
29890,
29889,
2697,
4197,
29884,
29896,
29892,
318,
29906,
12622,
13,
4706,
318,
29945,
353,
4911,
29898,
29945,
29892,
1226,
3192,
29890,
29889,
2697,
4197,
29884,
29896,
29892,
318,
29941,
11724,
1226,
3192,
29890,
29889,
2697,
4197,
29884,
29896,
29892,
318,
29906,
12622,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
29884,
29946,
1839,
7932,
1975,
7464,
318,
29946,
1839,
264,
331,
583,
11287,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
29884,
29946,
1839,
264,
331,
583,
7464,
318,
29945,
1839,
264,
331,
583,
11287,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
842,
29898,
3972,
29898,
29884,
29896,
8243,
11117,
333,
742,
525,
7932,
1975,
742,
525,
264,
331,
583,
29915,
1800,
13,
13,
1678,
822,
1243,
29918,
3318,
29918,
4965,
29918,
29941,
29898,
1311,
1125,
13,
4706,
4911,
353,
2024,
29889,
3258,
29918,
3318,
29918,
14399,
29898,
13,
9651,
1178,
2433,
6799,
742,
13,
9651,
5121,
2433,
2324,
742,
13,
4706,
1723,
13,
13,
4706,
318,
29896,
353,
4911,
29898,
29896,
29892,
6213,
29897,
13,
4706,
318,
29906,
353,
4911,
29898,
29906,
29892,
318,
29896,
29897,
13,
4706,
318,
29941,
353,
4911,
29898,
29941,
29892,
1226,
3192,
29890,
29889,
2697,
29898,
2636,
876,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
842,
29898,
3972,
29898,
29884,
29906,
1839,
18326,
2033,
8243,
11117,
4993,
742,
525,
5182,
29915,
1800,
13,
13,
4706,
1583,
29889,
9294,
3624,
29898,
29884,
29906,
1839,
18326,
13359,
5182,
29892,
318,
29896,
29897,
13,
13,
4706,
1583,
29889,
9294,
3624,
8516,
29898,
29884,
29896,
1839,
18326,
11287,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
29884,
29941,
1839,
18326,
2033,
511,
29871,
29900,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
2062,
29898,
29884,
29941,
1839,
18326,
2033,
511,
13,
9651,
376,
6595,
2697,
29898,
978,
2433,
18326,
742,
2752,
29918,
333,
29922,
29941,
29892,
3646,
29918,
4841,
3790,
1800,
1159,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
2062,
29898,
29884,
29906,
1839,
18326,
2033,
511,
13,
9651,
376,
6595,
29898,
978,
2433,
18326,
742,
2752,
29918,
333,
29922,
29906,
29892,
3646,
29918,
333,
29922,
29896,
25760,
13,
13,
1678,
822,
1243,
29918,
3318,
29918,
4965,
29918,
29946,
29898,
1311,
1125,
13,
4706,
4911,
353,
2024,
29889,
3258,
29918,
3318,
29918,
14399,
29898,
13,
9651,
1178,
2433,
6799,
742,
13,
9651,
5121,
2433,
2324,
742,
13,
4706,
1723,
13,
13,
4706,
318,
353,
4911,
29898,
29896,
29892,
6213,
29897,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
735,
29898,
2558,
2392,
29892,
13,
462,
462,
1678,
376,
2324,
525,
2704,
29918,
1989,
29915,
947,
451,
1863,
29908,
1125,
13,
9651,
318,
1839,
2704,
29918,
1989,
2033,
13,
13,
13,
1990,
4321,
2697,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
13,
1678,
822,
1243,
29918,
842,
29918,
29896,
29898,
1311,
1125,
13,
4706,
269,
353,
1226,
3192,
29890,
29889,
2697,
29898,
3101,
13,
4706,
1583,
29889,
9294,
9843,
29898,
276,
558,
29898,
29879,
511,
525,
2697,
8875,
1495,
13,
13,
4706,
269,
353,
1226,
3192,
29890,
29889,
2697,
3552,
29896,
29892,
29871,
29906,
29892,
19997,
525,
29874,
8785,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29879,
29961,
29896,
1402,
29871,
29906,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29879,
29961,
29906,
1402,
518,
2314,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
29879,
511,
29871,
29946,
29897,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
3220,
2392,
1125,
13,
9651,
269,
29961,
29896,
29900,
29962,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
1542,
2392,
1125,
13,
9651,
269,
29961,
29900,
29962,
353,
29871,
29896,
13,
13,
1678,
822,
1243,
29918,
842,
29918,
29906,
29898,
1311,
1125,
13,
4706,
269,
353,
1226,
3192,
29890,
29889,
2697,
3552,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29900,
29900,
29900,
29892,
525,
29874,
8785,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
276,
558,
29898,
29879,
511,
376,
2697,
29912,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29900,
29900,
29900,
29892,
525,
29874,
10827,
1159,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
6608,
29898,
29879,
511,
13,
9651,
6608,
29898,
287,
3192,
29890,
29889,
2697,
3552,
29896,
29892,
29871,
29906,
29892,
2533,
4197,
29896,
29900,
29900,
29900,
29892,
29871,
29906,
29900,
29900,
29900,
11724,
525,
29874,
8785,
876,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
6608,
29898,
29879,
511,
13,
9651,
6608,
3552,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29900,
29900,
29900,
29892,
525,
29874,
29915,
4961,
13,
13,
1678,
822,
1243,
29918,
842,
29918,
29941,
29898,
1311,
1125,
13,
4706,
269,
353,
1226,
3192,
29890,
29889,
2697,
29898,
3101,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
29879,
511,
29871,
29900,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
8568,
29898,
29879,
511,
6608,
29898,
287,
3192,
29890,
29889,
2697,
14885,
4961,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
8568,
29898,
29879,
511,
6608,
14885,
876,
13,
13,
1678,
822,
1243,
29918,
842,
29918,
29946,
29898,
1311,
1125,
13,
4706,
269,
353,
1226,
3192,
29890,
29889,
2697,
3552,
29961,
1402,
876,
13,
4706,
269,
29961,
29900,
1822,
4397,
29898,
29879,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
276,
558,
29898,
29879,
511,
376,
2697,
13970,
2697,
29912,
856,
6525,
27195,
13,
13,
1678,
822,
1243,
29918,
842,
29918,
29945,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29941,
29892,
29871,
29906,
29892,
29871,
29896,
12622,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2697,
29898,
2636,
511,
13,
9651,
1226,
3192,
29890,
29889,
2697,
29898,
2636,
876,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29896,
12622,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2697,
29898,
2636,
876,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29906,
12622,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29896,
29892,
29871,
29906,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29906,
29892,
29871,
29906,
12622,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29896,
29892,
29871,
29896,
29892,
29871,
29906,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29906,
29892,
29871,
29906,
29892,
29871,
29896,
12622,
13,
13,
1678,
822,
1243,
29918,
842,
29918,
29953,
29898,
1311,
1125,
13,
4706,
285,
353,
2024,
29889,
3258,
29918,
3318,
29918,
14399,
29898,
13,
9651,
1178,
3790,
29915,
6799,
742,
525,
6574,
4019,
16675,
13,
9651,
27981,
2433,
2324,
29899,
6799,
742,
13,
9651,
274,
2433,
6799,
29915,
13,
4706,
1723,
13,
13,
4706,
288,
29896,
353,
285,
29898,
29896,
29892,
525,
7340,
742,
1226,
3192,
29890,
29889,
2697,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
12622,
13,
4706,
288,
29906,
353,
285,
29898,
29896,
29892,
525,
370,
742,
1226,
3192,
29890,
29889,
2697,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29946,
12622,
13,
4706,
288,
29941,
353,
285,
29898,
29941,
29892,
525,
562,
742,
1226,
3192,
29890,
29889,
2697,
4197,
29945,
29892,
29871,
29945,
29892,
29871,
29945,
29892,
29871,
29945,
12622,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29877,
29896,
29892,
288,
29906,
29892,
288,
29941,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29877,
29906,
29892,
288,
29941,
29892,
288,
29896,
12622,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29877,
29896,
29892,
288,
29941,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29877,
29906,
29892,
288,
29941,
12622,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29877,
29896,
29892,
288,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29877,
29906,
29892,
288,
29941,
12622,
13,
13,
1678,
822,
1243,
29918,
842,
29918,
29955,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
9651,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
2314,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
9651,
518,
29941,
29892,
29871,
29906,
29892,
29871,
29896,
2314,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2697,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
632,
29896,
29897,
13,
13,
1678,
822,
1243,
29918,
842,
29918,
29947,
29898,
1311,
1125,
13,
4706,
269,
353,
1226,
3192,
29890,
29889,
2697,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
2314,
13,
4706,
1354,
353,
4256,
29898,
29879,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
1761,
29898,
1039,
511,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
2314,
13,
13,
13,
1990,
4321,
2588,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
13,
1678,
822,
1243,
29918,
2378,
29918,
6310,
29918,
29896,
29898,
1311,
1125,
13,
4706,
260,
353,
1226,
3192,
29890,
29889,
2588,
580,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
29873,
511,
29871,
29900,
29897,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
8568,
29898,
29873,
511,
6608,
14885,
876,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
735,
29898,
3220,
2392,
29892,
525,
449,
310,
3464,
29374,
13,
9651,
260,
29961,
29900,
29962,
13,
4706,
1583,
29889,
9294,
9843,
29898,
276,
558,
29898,
29873,
511,
376,
2636,
1159,
13,
13,
1678,
822,
1243,
29918,
2378,
29918,
29906,
29898,
1311,
1125,
13,
4706,
260,
353,
1226,
3192,
29890,
29889,
2588,
3552,
29896,
29892,
525,
29874,
8785,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
276,
558,
29898,
29873,
511,
14704,
29896,
29892,
525,
29874,
2033,
1159,
13,
4706,
1583,
29889,
9294,
9843,
29898,
710,
29898,
29873,
511,
14704,
29896,
29892,
525,
29874,
2033,
1159,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
2435,
29898,
29873,
511,
29871,
29906,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
8568,
29898,
29873,
511,
6608,
29898,
287,
3192,
29890,
29889,
2588,
4197,
29896,
29892,
525,
29874,
2033,
4961,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
8568,
29898,
29873,
511,
6608,
29898,
287,
3192,
29890,
29889,
2588,
4197,
29896,
29900,
29892,
525,
370,
2033,
4961,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29873,
29961,
29900,
1402,
29871,
29896,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29873,
29961,
29896,
1402,
525,
29874,
1495,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
4597,
735,
29898,
3220,
2392,
29892,
525,
449,
310,
3464,
29374,
13,
9651,
260,
29961,
29906,
29962,
13,
13,
1678,
822,
1243,
29918,
2378,
29918,
29941,
29898,
1311,
1125,
13,
4706,
260,
353,
1226,
3192,
29890,
29889,
2588,
3552,
29896,
29892,
5159,
876,
13,
4706,
260,
29961,
29896,
1822,
4397,
29898,
29873,
29897,
13,
4706,
1583,
29889,
9294,
9843,
29898,
29873,
29961,
29896,
1402,
518,
29873,
2314,
13,
4706,
1583,
29889,
9294,
9843,
29898,
276,
558,
29898,
29873,
511,
525,
29961,
29896,
29892,
5519,
856,
5262,
29962,
1495,
13,
13,
1678,
822,
1243,
29918,
2378,
29918,
29946,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
12622,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
29892,
29871,
29941,
29892,
29871,
29906,
12622,
13,
13,
4706,
1583,
29889,
9294,
29931,
404,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
29892,
29871,
29941,
29892,
29871,
29906,
12622,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
29898,
2636,
511,
13,
9651,
1226,
3192,
29890,
29889,
2588,
29898,
2636,
876,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
12622,
13,
13,
4706,
1583,
29889,
9294,
25120,
1008,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
12622,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2588,
29898,
2636,
876,
13,
13,
4706,
1583,
29889,
9294,
25120,
1008,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2588,
29898,
2636,
876,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29906,
12622,
13,
13,
4706,
1583,
29889,
9294,
29931,
404,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29906,
12622,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
29892,
29871,
29906,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29906,
29892,
29871,
29906,
12622,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
29892,
29871,
29896,
11724,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29906,
29892,
29871,
29906,
29892,
29871,
29896,
12622,
13,
13,
1678,
822,
1243,
29918,
2378,
29918,
29945,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
9651,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
2314,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
1402,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
12622,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
518,
29896,
29892,
29871,
29906,
29892,
29871,
29946,
1402,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
12622,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
9651,
518,
29896,
29892,
29871,
29941,
29892,
29871,
29906,
2314,
13,
13,
4706,
1583,
29889,
9294,
29931,
404,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
9651,
518,
29896,
29892,
29871,
29941,
29892,
29871,
29906,
2314,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
29898,
2636,
511,
13,
9651,
518,
2314,
13,
13,
4706,
1583,
29889,
9294,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
11724,
13,
9651,
518,
29896,
2314,
13,
13,
4706,
1583,
29889,
9294,
25120,
1008,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
11724,
13,
9651,
518,
29896,
2314,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
11724,
13,
9651,
518,
2314,
13,
13,
4706,
1583,
29889,
9294,
25120,
1008,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
11724,
13,
9651,
518,
2314,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
11724,
13,
9651,
518,
29906,
2314,
13,
13,
4706,
1583,
29889,
9294,
29931,
404,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
11724,
13,
9651,
518,
29906,
2314,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
29892,
29871,
29906,
11724,
13,
9651,
518,
29906,
29892,
29871,
29906,
2314,
13,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
29892,
29871,
29896,
11724,
13,
9651,
518,
29906,
29892,
29871,
29906,
29892,
29871,
29896,
2314,
13,
13,
1678,
822,
1243,
29918,
2378,
29918,
29953,
29898,
1311,
1125,
13,
4706,
1583,
29889,
9294,
3664,
9843,
29898,
13,
9651,
1226,
3192,
29890,
29889,
2588,
4197,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
11724,
13,
9651,
7700,
29897,
13,
2
] |
find_offset.py | psdon/bufferoverflow_scripts | 0 | 120977 | <gh_stars>0
import argparse
from pwn import cyclic_metasploit_find
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"-a", "--address", type=str, required=True, help="EIP hex value"
)
parser.add_argument(
"-c",
"--prepend_cmd",
type=str,
required=False,
default="",
help="EIP hex value",
)
args = parser.parse_args()
hex_val = int(args.address, 16)
offset = cyclic_metasploit_find(hex_val)
cmd = args.prepend_cmd
offset_eip = offset + len(cmd)
offset_esp = offset_eip + 4 # + 4 bytes after EIP
print(f"Offset of {args.address}: {offset}")
print(f"Offset of EIP + cmd len : {offset_eip}")
print(f"Offset of EIP + cmd len + 4 = ESP: {offset_esp}")
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
1852,
5510,
13,
13,
3166,
282,
1233,
1053,
5094,
28746,
29918,
2527,
4692,
417,
277,
29918,
2886,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
580,
13,
1678,
13812,
29889,
1202,
29918,
23516,
29898,
13,
4706,
11663,
29874,
613,
376,
489,
7328,
613,
1134,
29922,
710,
29892,
3734,
29922,
5574,
29892,
1371,
543,
29923,
5690,
15090,
995,
29908,
13,
1678,
1723,
13,
1678,
13812,
29889,
1202,
29918,
23516,
29898,
13,
4706,
11663,
29883,
613,
13,
4706,
376,
489,
1457,
14081,
29918,
9006,
613,
13,
4706,
1134,
29922,
710,
29892,
13,
4706,
3734,
29922,
8824,
29892,
13,
4706,
2322,
543,
613,
13,
4706,
1371,
543,
29923,
5690,
15090,
995,
613,
13,
1678,
1723,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
13,
1678,
15090,
29918,
791,
353,
938,
29898,
5085,
29889,
7328,
29892,
29871,
29896,
29953,
29897,
13,
1678,
9210,
353,
5094,
28746,
29918,
2527,
4692,
417,
277,
29918,
2886,
29898,
20970,
29918,
791,
29897,
13,
1678,
9920,
353,
6389,
29889,
1457,
14081,
29918,
9006,
13,
13,
1678,
9210,
29918,
29872,
666,
353,
9210,
718,
7431,
29898,
9006,
29897,
13,
1678,
9210,
29918,
9983,
353,
9210,
29918,
29872,
666,
718,
29871,
29946,
29871,
396,
718,
29871,
29946,
6262,
1156,
382,
5690,
13,
13,
1678,
1596,
29898,
29888,
29908,
10302,
310,
426,
5085,
29889,
7328,
6177,
426,
10289,
27195,
13,
1678,
1596,
29898,
29888,
29908,
10302,
310,
382,
5690,
718,
9920,
7431,
584,
426,
10289,
29918,
29872,
666,
27195,
13,
1678,
1596,
29898,
29888,
29908,
10302,
310,
382,
5690,
718,
9920,
7431,
718,
29871,
29946,
353,
26480,
29901,
426,
10289,
29918,
9983,
27195,
13,
2
] |
sdk/ml/azure-ai-ml/azure/ai/ml/_schema/automl/image_vertical/image_limit_settings.py | dubiety/azure-sdk-for-python | 1 | 84261 | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from marshmallow import fields, post_load
from azure.ai.ml.constants import AutoMLConstants
from azure.ai.ml._schema import PatchedSchemaMeta
from azure.ai.ml._restclient.v2022_02_01_preview.models import ImageSweepLimitSettings
class ImageLimitsSchema(metaclass=PatchedSchemaMeta):
max_concurrent_trials = fields.Int()
max_trials = fields.Int()
timeout_minutes = fields.Int() # type duration
@post_load
def make(self, data, **kwargs):
from azure.ai.ml.automl import ImageLimitSettings
return ImageLimitSettings(**data)
class ImageSweepLimitSchema(metaclass=PatchedSchemaMeta):
max_concurrent_trials = fields.Int()
max_trials = fields.Int(data_key=AutoMLConstants.MAX_TRIALS_YAML)
@post_load
def make(self, data, **kwargs):
return ImageSweepLimitSettings(**data)
| [
1,
396,
448,
2683,
2683,
2683,
1378,
13,
29937,
14187,
1266,
313,
29883,
29897,
7783,
15025,
29889,
2178,
10462,
21676,
29889,
13,
29937,
448,
2683,
2683,
2683,
1378,
13,
13,
3166,
1766,
845,
29885,
9536,
1053,
4235,
29892,
1400,
29918,
1359,
13,
3166,
15699,
29889,
1794,
29889,
828,
29889,
3075,
1934,
1053,
11133,
1988,
26570,
13,
3166,
15699,
29889,
1794,
29889,
828,
3032,
11010,
1053,
349,
905,
287,
12763,
19346,
13,
3166,
15699,
29889,
1794,
29889,
828,
3032,
5060,
4645,
29889,
29894,
29906,
29900,
29906,
29906,
29918,
29900,
29906,
29918,
29900,
29896,
29918,
25347,
29889,
9794,
1053,
7084,
29903,
705,
1022,
24445,
9585,
13,
13,
13,
1990,
7084,
29931,
326,
1169,
12763,
29898,
2527,
562,
605,
29922,
29925,
905,
287,
12763,
19346,
1125,
13,
1678,
4236,
29918,
19279,
29918,
3626,
1338,
353,
4235,
29889,
2928,
580,
13,
1678,
4236,
29918,
3626,
1338,
353,
4235,
29889,
2928,
580,
13,
1678,
11815,
29918,
1195,
2667,
353,
4235,
29889,
2928,
580,
29871,
396,
1134,
14385,
13,
13,
1678,
732,
2490,
29918,
1359,
13,
1678,
822,
1207,
29898,
1311,
29892,
848,
29892,
3579,
19290,
1125,
13,
13,
4706,
515,
15699,
29889,
1794,
29889,
828,
29889,
17405,
29880,
1053,
7084,
24445,
9585,
13,
13,
4706,
736,
7084,
24445,
9585,
29898,
1068,
1272,
29897,
13,
13,
13,
1990,
7084,
29903,
705,
1022,
24445,
12763,
29898,
2527,
562,
605,
29922,
29925,
905,
287,
12763,
19346,
1125,
13,
1678,
4236,
29918,
19279,
29918,
3626,
1338,
353,
4235,
29889,
2928,
580,
13,
1678,
4236,
29918,
3626,
1338,
353,
4235,
29889,
2928,
29898,
1272,
29918,
1989,
29922,
12300,
1988,
26570,
29889,
12648,
29918,
29911,
3960,
1964,
29903,
29918,
29979,
23956,
29897,
13,
13,
1678,
732,
2490,
29918,
1359,
13,
1678,
822,
1207,
29898,
1311,
29892,
848,
29892,
3579,
19290,
1125,
13,
4706,
736,
7084,
29903,
705,
1022,
24445,
9585,
29898,
1068,
1272,
29897,
13,
2
] |
tests/test_general.py | MichaelRazum/cachier | 0 | 154719 | """Non-core-specific tests for cachier."""
import os
from cachier.core import (
MAX_WORKERS_ENVAR_NAME,
DEFAULT_MAX_WORKERS,
_max_workers,
_set_max_workers,
_get_executor
)
def test_max_workers():
"""Just call this function for coverage."""
try:
del os.environ[MAX_WORKERS_ENVAR_NAME]
except KeyError:
pass
assert _max_workers() == DEFAULT_MAX_WORKERS
def test_get_executor():
"""Just call this function for coverage."""
_get_executor()
_get_executor(False)
_get_executor(True)
def test_set_max_workers():
"""Just call this function for coverage."""
_set_max_workers(9)
| [
1,
9995,
12283,
29899,
3221,
29899,
14940,
6987,
363,
274,
496,
631,
1213,
15945,
13,
13,
5215,
2897,
13,
13,
3166,
274,
496,
631,
29889,
3221,
1053,
313,
13,
1678,
18134,
29918,
11686,
29968,
23598,
29918,
25838,
1718,
29918,
5813,
29892,
13,
1678,
22236,
29918,
12648,
29918,
11686,
29968,
23598,
29892,
13,
1678,
903,
3317,
29918,
1287,
414,
29892,
13,
1678,
903,
842,
29918,
3317,
29918,
1287,
414,
29892,
13,
1678,
903,
657,
29918,
4258,
3406,
13,
29897,
13,
13,
13,
1753,
1243,
29918,
3317,
29918,
1287,
414,
7295,
13,
1678,
9995,
14084,
1246,
445,
740,
363,
23746,
1213,
15945,
13,
1678,
1018,
29901,
13,
4706,
628,
2897,
29889,
21813,
29961,
12648,
29918,
11686,
29968,
23598,
29918,
25838,
1718,
29918,
5813,
29962,
13,
1678,
5174,
7670,
2392,
29901,
13,
4706,
1209,
13,
1678,
4974,
903,
3317,
29918,
1287,
414,
580,
1275,
22236,
29918,
12648,
29918,
11686,
29968,
23598,
13,
13,
13,
1753,
1243,
29918,
657,
29918,
4258,
3406,
7295,
13,
1678,
9995,
14084,
1246,
445,
740,
363,
23746,
1213,
15945,
13,
1678,
903,
657,
29918,
4258,
3406,
580,
13,
1678,
903,
657,
29918,
4258,
3406,
29898,
8824,
29897,
13,
1678,
903,
657,
29918,
4258,
3406,
29898,
5574,
29897,
13,
13,
13,
1753,
1243,
29918,
842,
29918,
3317,
29918,
1287,
414,
7295,
13,
1678,
9995,
14084,
1246,
445,
740,
363,
23746,
1213,
15945,
13,
1678,
903,
842,
29918,
3317,
29918,
1287,
414,
29898,
29929,
29897,
13,
13,
13,
2
] |
heroku_py/__init__.py | AnthonyAniobi/heroku-py | 5 | 49230 | <gh_stars>1-10
from .heroku_client import HerokuClient
__version__ = "1.2.0"
__all__ = ["HerokuClient"]
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
869,
2276,
9154,
29918,
4645,
1053,
2439,
9154,
4032,
13,
13,
1649,
3259,
1649,
353,
376,
29896,
29889,
29906,
29889,
29900,
29908,
13,
13,
1649,
497,
1649,
353,
6796,
18650,
9154,
4032,
3108,
13,
2
] |
VideoSearchWithAutoMLVision/parser/ParserAPI/app.py | nikkiconley/media-services-video-indexer | 54 | 187556 | import os
from typing import Dict, List
import uvicorn
from dotenv import load_dotenv
from fastapi import FastAPI, Security, Depends, HTTPException
from fastapi.security.api_key import APIKeyHeader, APIKey
from impl import extractor
from pydantic import BaseModel
from starlette.status import HTTP_403_FORBIDDEN
load_dotenv()
app = FastAPI()
class Values(BaseModel):
values: List = []
class Value(Values):
recordId: str
data: Dict[str, str] = None
API_KEY = os.environ['KEY']
API_KEY_NAME = "Ocp-Apim-Subscription-Key"
api_key_header = APIKeyHeader(name=API_KEY_NAME, auto_error=False)
async def get_api_key(
api_key_header: str = Security(api_key_header),
):
if api_key_header == API_KEY:
return api_key_header
else:
raise HTTPException(
status_code = HTTP_403_FORBIDDEN, detail = "Key not present"
)
@app.get('/api/healthcheck', status_code=200)
async def healthcheck():
return 'Ready'
@app.post('/api/parse')
def parse(values: Values, api_key: APIKey = Depends(get_api_key)): #
body = values.dict()
if not body:
return 'Expected text within body of request. No text found.', status.HTTP_400_BAD_REQUEST
else:
return extractor.parse(body)
# Remove these two lines below for non-debug/production mode
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=5000)
| [
1,
1053,
2897,
13,
3166,
19229,
1053,
360,
919,
29892,
2391,
13,
13,
5215,
318,
26311,
1398,
13,
3166,
8329,
6272,
1053,
2254,
29918,
6333,
6272,
13,
3166,
5172,
2754,
1053,
23786,
8787,
29892,
14223,
29892,
10034,
1975,
29892,
7331,
2451,
13,
3166,
5172,
2754,
29889,
8926,
29889,
2754,
29918,
1989,
1053,
3450,
2558,
7850,
29892,
3450,
2558,
13,
3166,
13374,
1053,
6597,
272,
13,
3166,
282,
2941,
7716,
1053,
7399,
3195,
13,
3166,
5810,
20200,
29889,
4882,
1053,
7331,
29918,
29946,
29900,
29941,
29918,
22051,
29933,
1367,
29928,
1430,
13,
13,
1359,
29918,
6333,
6272,
580,
13,
932,
353,
23786,
8787,
580,
13,
13,
13,
1990,
2630,
1041,
29898,
5160,
3195,
1125,
13,
1678,
1819,
29901,
2391,
353,
5159,
13,
13,
13,
1990,
7865,
29898,
9065,
1125,
13,
1678,
2407,
1204,
29901,
851,
13,
1678,
848,
29901,
360,
919,
29961,
710,
29892,
851,
29962,
353,
6213,
13,
13,
13,
8787,
29918,
10818,
353,
2897,
29889,
21813,
1839,
10818,
2033,
13,
8787,
29918,
10818,
29918,
5813,
353,
376,
29949,
6814,
29899,
17396,
326,
29899,
4035,
22371,
29899,
2558,
29908,
13,
13,
13,
2754,
29918,
1989,
29918,
6672,
353,
3450,
2558,
7850,
29898,
978,
29922,
8787,
29918,
10818,
29918,
5813,
29892,
4469,
29918,
2704,
29922,
8824,
29897,
13,
13,
13,
12674,
822,
679,
29918,
2754,
29918,
1989,
29898,
13,
1678,
7882,
29918,
1989,
29918,
6672,
29901,
851,
353,
14223,
29898,
2754,
29918,
1989,
29918,
6672,
511,
13,
1125,
13,
13,
1678,
565,
7882,
29918,
1989,
29918,
6672,
1275,
3450,
29918,
10818,
29901,
13,
4706,
736,
7882,
29918,
1989,
29918,
6672,
13,
1678,
1683,
29901,
13,
4706,
12020,
7331,
2451,
29898,
13,
9651,
4660,
29918,
401,
353,
7331,
29918,
29946,
29900,
29941,
29918,
22051,
29933,
1367,
29928,
1430,
29892,
9493,
353,
376,
2558,
451,
2198,
29908,
13,
4706,
1723,
13,
13,
13,
29992,
932,
29889,
657,
11219,
2754,
29914,
354,
4298,
3198,
742,
4660,
29918,
401,
29922,
29906,
29900,
29900,
29897,
13,
12674,
822,
9045,
3198,
7295,
13,
1678,
736,
525,
28181,
29915,
13,
13,
13,
29992,
932,
29889,
2490,
11219,
2754,
29914,
5510,
1495,
13,
1753,
6088,
29898,
5975,
29901,
2630,
1041,
29892,
7882,
29918,
1989,
29901,
3450,
2558,
353,
10034,
1975,
29898,
657,
29918,
2754,
29918,
1989,
22164,
396,
13,
1678,
3573,
353,
1819,
29889,
8977,
580,
13,
1678,
565,
451,
3573,
29901,
13,
4706,
736,
525,
1252,
6021,
1426,
2629,
3573,
310,
2009,
29889,
1939,
1426,
1476,
29889,
742,
4660,
29889,
10493,
29918,
29946,
29900,
29900,
29918,
29933,
3035,
29918,
16244,
13,
1678,
1683,
29901,
13,
4706,
736,
6597,
272,
29889,
5510,
29898,
2587,
29897,
13,
13,
13,
29937,
15154,
1438,
1023,
3454,
2400,
363,
1661,
29899,
8382,
29914,
24601,
4464,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
318,
26311,
1398,
29889,
3389,
29898,
932,
29892,
3495,
543,
29900,
29889,
29900,
29889,
29900,
29889,
29900,
613,
2011,
29922,
29945,
29900,
29900,
29900,
29897,
13,
2
] |
start_project/src/start_project.py | pdminimal/sandbox | 0 | 170619 | from fs import enums, errors, osfs
from self_print import SelfPrint
class StartProject:
def __init__(self, name, fs=None):
self.sp = SelfPrint(leading="- ")
self.name = name
if fs is None:
fs = osfs.OSFS(".")
self.fs = fs
def warning(self, text):
print("Warining: " + text)
def error(self, text):
print("Error: " + text)
raise IOError(text)
def generate(self):
# - investigating dir
try:
info = self.fs.getinfo(self.name, namespaces=["details"])
if info.type == enums.ResourceType.directory:
self.sp.print()
self.warning(f"Target directory '{self.name}' already exists.")
else:
self.error(
f"Target path '{self.name}' already exists and is not a directory."
)
except errors.ResourceNotFound:
# - generate dir
self.fs.makedir(self.name)
self.sp.print()
| [
1,
515,
18920,
1053,
427,
6762,
29892,
4436,
29892,
2897,
5847,
13,
3166,
1583,
29918,
2158,
1053,
21782,
11816,
13,
13,
13,
1990,
7370,
7653,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
29892,
18920,
29922,
8516,
1125,
13,
4706,
1583,
29889,
1028,
353,
21782,
11816,
29898,
25369,
543,
29899,
16521,
13,
4706,
1583,
29889,
978,
353,
1024,
13,
4706,
565,
18920,
338,
6213,
29901,
13,
9651,
18920,
353,
2897,
5847,
29889,
3267,
9998,
17350,
1159,
13,
4706,
1583,
29889,
5847,
353,
18920,
13,
13,
1678,
822,
9177,
29898,
1311,
29892,
1426,
1125,
13,
4706,
1596,
703,
29956,
279,
2827,
29901,
376,
718,
1426,
29897,
13,
13,
1678,
822,
1059,
29898,
1311,
29892,
1426,
1125,
13,
4706,
1596,
703,
2392,
29901,
376,
718,
1426,
29897,
13,
4706,
12020,
10663,
2392,
29898,
726,
29897,
13,
13,
1678,
822,
5706,
29898,
1311,
1125,
13,
4706,
396,
448,
7405,
1218,
4516,
13,
4706,
1018,
29901,
13,
9651,
5235,
353,
1583,
29889,
5847,
29889,
657,
3888,
29898,
1311,
29889,
978,
29892,
2983,
22459,
29922,
3366,
14144,
20068,
13,
9651,
565,
5235,
29889,
1853,
1275,
427,
6762,
29889,
6848,
1542,
29889,
12322,
29901,
13,
18884,
1583,
29889,
1028,
29889,
2158,
580,
13,
18884,
1583,
29889,
27392,
29898,
29888,
29908,
8667,
3884,
22372,
1311,
29889,
978,
10162,
2307,
4864,
23157,
13,
9651,
1683,
29901,
13,
18884,
1583,
29889,
2704,
29898,
13,
462,
1678,
285,
29908,
8667,
2224,
22372,
1311,
29889,
978,
10162,
2307,
4864,
322,
338,
451,
263,
3884,
1213,
13,
18884,
1723,
13,
4706,
5174,
4436,
29889,
6848,
17413,
29901,
13,
9651,
396,
448,
5706,
4516,
13,
9651,
1583,
29889,
5847,
29889,
29885,
12535,
381,
29898,
1311,
29889,
978,
29897,
13,
9651,
1583,
29889,
1028,
29889,
2158,
580,
13,
2
] |
Discord Bots/Galaxy Studio/cogs/money/commands.py | LUNA761/Code-Archive | 1 | 1613932 | <filename>Discord Bots/Galaxy Studio/cogs/money/commands.py
import discord, time, asyncio, os, random, json
from discord.ext import commands, tasks
from discord.ext.commands import has_permissions, cooldown, MissingPermissions, check, Cog
from discord.utils import get
def is_wiggle_or_luna(ctx):
return ctx.author.id in [<PASSWORD>, 7<PASSWORD>]
class App(commands.Cog):
def __init__(self, client):
self.client = client
print("Money Commands Cog Running")
# <-- commands -->
@commands.command()
async def bal(self, ctx, user : discord.Member = None):
with open("data/money.json") as f:
money = json.load(f)
f.close()
if user == None:
user = ctx.author
try:
bux = str(money[str(user.id)])
except:
bux = 0
embed=discord.Embed(title="Boogie Bal", color=0x00ffff)
embed.add_field(name="Boogie Bucks:", value=f"${bux}", inline=False)
await ctx.send(embed=embed)
@commands.command()
@check(is_wiggle_or_luna)
async def give(self, ctx, user : discord.User = None, num : int = None):
if user == None or num == None:
embed=discord.Embed(title="Incorrect command usage!", description=".give @user {number}", color=0x00ffff)
await ctx.send(embed=embed)
return
with open("data/money.json") as f:
money = json.load(f)
f.close()
with open("data/bank-queue.json") as f:
queue = json.load(f)
f.close()
try:
bal = money[str(user.id)]
except:
bal = 0
bal += num
queue.append(-num)
money[str(user.id)] = bal
with open("data/money.json", "w+") as f:
json.dump(money, f)
f.close()
with open("data/bank-queue.json", "w+") as f:
json.dump(queue, f)
f.close()
await ctx.send(f"I have gave {user.mention} {str(num)} Boogie bucks!")
@give.error
async def give_error(self, ctx, error):
if isinstance(error, commands.CheckFailure):
await ctx.send(f"❌ Hey, {ctx.author.name} you can't do that!")
@commands.command()
@check(is_wiggle_or_luna)
async def take(self, ctx, user : discord.User = None, num : int = None):
if user == None or num == None:
embed=discord.Embed(title="Incorrect command usage!", description=".take @user {number}", color=0x00ffff)
await ctx.send(embed=embed)
return
with open("data/money.json") as f:
money = json.load(f)
f.close()
try:
bal = money[str(user.id)]
except:
bal = 0
bal -= num
queue.append(num)
money[str(user.id)] = bal
with open("data/money.json", "w+") as f:
json.dump(money, f)
f.close()
with open("data/bank-queue.json", "w+") as f:
json.dump(queue, f)
f.close()
await ctx.send(f"I have taken {str(num)} Boogie bucks from {user.mention}!")
@take.error
async def take_error(self, ctx, error):
if isinstance(error, commands.CheckFailure):
await ctx.send(f"❌ Hey, {ctx.author.name} you can't do that!")
@commands.command()
@check(is_wiggle_or_luna)
async def totalreset(self, ctx, num : int = None):
if num == None:
embed=discord.Embed(title="Incorrect command usage!", description=".totalreset {number}", color=0x00ffff)
await ctx.send(embed=embed)
return
with open("data/money.json") as f:
money = json.load(f)
f.close()
for user in money:
money[user] = num
with open("data/money.json", "w+") as f:
json.dump(money, f)
f.close()
await ctx.send(f"I have reset all Boogie Bucks!")
@take.error
async def take_error(self, ctx, error):
if isinstance(error, commands.CheckFailure):
await ctx.send(f"❌ Hey, {ctx.author.name} you can't do that!")
def setup(client):
client.add_cog(App(client))
| [
1,
529,
9507,
29958,
4205,
16090,
350,
1862,
29914,
29954,
284,
26825,
7448,
29914,
29883,
12099,
29914,
29885,
4992,
29914,
26381,
29889,
2272,
13,
5215,
2313,
536,
29892,
931,
29892,
408,
948,
3934,
29892,
2897,
29892,
4036,
29892,
4390,
13,
3166,
2313,
536,
29889,
1062,
1053,
8260,
29892,
9595,
13,
3166,
2313,
536,
29889,
1062,
29889,
26381,
1053,
756,
29918,
17858,
6847,
29892,
1302,
1025,
776,
29892,
4750,
292,
15737,
6847,
29892,
1423,
29892,
315,
468,
13,
3166,
2313,
536,
29889,
13239,
1053,
679,
13,
13,
1753,
338,
29918,
9192,
6234,
29918,
272,
29918,
29880,
4347,
29898,
13073,
1125,
13,
1678,
736,
12893,
29889,
8921,
29889,
333,
297,
518,
29966,
25711,
17013,
10202,
29871,
29955,
29966,
25711,
17013,
29958,
29962,
13,
13,
1990,
2401,
29898,
26381,
29889,
29907,
468,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3132,
1125,
13,
4706,
1583,
29889,
4645,
353,
3132,
13,
4706,
1596,
703,
29924,
4992,
1876,
4167,
315,
468,
19509,
1159,
13,
13,
1678,
396,
462,
4706,
529,
489,
8260,
6660,
13,
13,
1678,
732,
26381,
29889,
6519,
580,
13,
1678,
7465,
822,
6411,
29898,
1311,
29892,
12893,
29892,
1404,
584,
2313,
536,
29889,
13404,
353,
6213,
1125,
13,
4706,
411,
1722,
703,
1272,
29914,
29885,
4992,
29889,
3126,
1159,
408,
285,
29901,
13,
9651,
6909,
353,
4390,
29889,
1359,
29898,
29888,
29897,
13,
9651,
285,
29889,
5358,
580,
13,
13,
4706,
565,
1404,
1275,
6213,
29901,
13,
9651,
1404,
353,
12893,
29889,
8921,
13,
13,
4706,
1018,
29901,
13,
9651,
289,
1314,
353,
851,
29898,
29885,
4992,
29961,
710,
29898,
1792,
29889,
333,
29897,
2314,
13,
4706,
5174,
29901,
13,
9651,
289,
1314,
353,
29871,
29900,
13,
13,
4706,
8297,
29922,
2218,
16090,
29889,
6026,
2580,
29898,
3257,
543,
8431,
468,
347,
7392,
613,
2927,
29922,
29900,
29916,
29900,
29900,
17156,
29897,
13,
4706,
8297,
29889,
1202,
29918,
2671,
29898,
978,
543,
8431,
468,
347,
16281,
29879,
29901,
613,
995,
29922,
29888,
29908,
5303,
29890,
1314,
17671,
10583,
29922,
8824,
29897,
13,
4706,
7272,
12893,
29889,
6717,
29898,
17987,
29922,
17987,
29897,
13,
13,
1678,
732,
26381,
29889,
6519,
580,
13,
1678,
732,
3198,
29898,
275,
29918,
9192,
6234,
29918,
272,
29918,
29880,
4347,
29897,
13,
1678,
7465,
822,
2367,
29898,
1311,
29892,
12893,
29892,
1404,
584,
2313,
536,
29889,
2659,
353,
6213,
29892,
954,
584,
938,
353,
6213,
1125,
13,
4706,
565,
1404,
1275,
6213,
470,
954,
1275,
6213,
29901,
13,
9651,
8297,
29922,
2218,
16090,
29889,
6026,
2580,
29898,
3257,
543,
797,
15728,
1899,
8744,
29991,
613,
6139,
29569,
29887,
573,
732,
1792,
426,
4537,
17671,
2927,
29922,
29900,
29916,
29900,
29900,
17156,
29897,
13,
9651,
7272,
12893,
29889,
6717,
29898,
17987,
29922,
17987,
29897,
13,
9651,
736,
13,
13,
4706,
411,
1722,
703,
1272,
29914,
29885,
4992,
29889,
3126,
1159,
408,
285,
29901,
13,
9651,
6909,
353,
4390,
29889,
1359,
29898,
29888,
29897,
13,
9651,
285,
29889,
5358,
580,
13,
13,
4706,
411,
1722,
703,
1272,
29914,
9157,
29899,
9990,
29889,
3126,
1159,
408,
285,
29901,
13,
9651,
9521,
353,
4390,
29889,
1359,
29898,
29888,
29897,
13,
9651,
285,
29889,
5358,
580,
13,
13,
4706,
1018,
29901,
13,
9651,
6411,
353,
6909,
29961,
710,
29898,
1792,
29889,
333,
4638,
13,
4706,
5174,
29901,
13,
9651,
6411,
353,
29871,
29900,
13,
13,
4706,
6411,
4619,
954,
13,
13,
4706,
9521,
29889,
4397,
6278,
1949,
29897,
13,
13,
4706,
6909,
29961,
710,
29898,
1792,
29889,
333,
4638,
353,
6411,
13,
13,
4706,
411,
1722,
703,
1272,
29914,
29885,
4992,
29889,
3126,
613,
376,
29893,
29974,
1159,
408,
285,
29901,
13,
9651,
4390,
29889,
15070,
29898,
29885,
4992,
29892,
285,
29897,
13,
9651,
285,
29889,
5358,
580,
13,
13,
4706,
411,
1722,
703,
1272,
29914,
9157,
29899,
9990,
29889,
3126,
613,
376,
29893,
29974,
1159,
408,
285,
29901,
13,
9651,
4390,
29889,
15070,
29898,
9990,
29892,
285,
29897,
13,
9651,
285,
29889,
5358,
580,
13,
13,
4706,
7272,
12893,
29889,
6717,
29898,
29888,
29908,
29902,
505,
4846,
426,
1792,
29889,
358,
291,
29913,
426,
710,
29898,
1949,
2915,
1952,
468,
347,
1321,
4684,
29991,
1159,
13,
13,
1678,
732,
29887,
573,
29889,
2704,
13,
1678,
7465,
822,
2367,
29918,
2704,
29898,
1311,
29892,
12893,
29892,
1059,
1125,
13,
4706,
565,
338,
8758,
29898,
2704,
29892,
8260,
29889,
5596,
24155,
1125,
13,
9651,
7272,
12893,
29889,
6717,
29898,
29888,
29908,
229,
160,
143,
18637,
29892,
426,
13073,
29889,
8921,
29889,
978,
29913,
366,
508,
29915,
29873,
437,
393,
29991,
1159,
13,
13,
1678,
732,
26381,
29889,
6519,
580,
13,
1678,
732,
3198,
29898,
275,
29918,
9192,
6234,
29918,
272,
29918,
29880,
4347,
29897,
13,
1678,
7465,
822,
2125,
29898,
1311,
29892,
12893,
29892,
1404,
584,
2313,
536,
29889,
2659,
353,
6213,
29892,
954,
584,
938,
353,
6213,
1125,
13,
4706,
565,
1404,
1275,
6213,
470,
954,
1275,
6213,
29901,
13,
9651,
8297,
29922,
2218,
16090,
29889,
6026,
2580,
29898,
3257,
543,
797,
15728,
1899,
8744,
29991,
613,
6139,
29569,
19730,
732,
1792,
426,
4537,
17671,
2927,
29922,
29900,
29916,
29900,
29900,
17156,
29897,
13,
9651,
7272,
12893,
29889,
6717,
29898,
17987,
29922,
17987,
29897,
13,
9651,
736,
13,
13,
4706,
411,
1722,
703,
1272,
29914,
29885,
4992,
29889,
3126,
1159,
408,
285,
29901,
13,
9651,
6909,
353,
4390,
29889,
1359,
29898,
29888,
29897,
13,
9651,
285,
29889,
5358,
580,
13,
13,
4706,
1018,
29901,
13,
9651,
6411,
353,
6909,
29961,
710,
29898,
1792,
29889,
333,
4638,
13,
4706,
5174,
29901,
13,
9651,
6411,
353,
29871,
29900,
13,
13,
4706,
6411,
22361,
954,
13,
13,
4706,
9521,
29889,
4397,
29898,
1949,
29897,
13,
13,
4706,
6909,
29961,
710,
29898,
1792,
29889,
333,
4638,
353,
6411,
13,
13,
4706,
411,
1722,
703,
1272,
29914,
29885,
4992,
29889,
3126,
613,
376,
29893,
29974,
1159,
408,
285,
29901,
13,
9651,
4390,
29889,
15070,
29898,
29885,
4992,
29892,
285,
29897,
13,
9651,
285,
29889,
5358,
580,
13,
13,
4706,
411,
1722,
703,
1272,
29914,
9157,
29899,
9990,
29889,
3126,
613,
376,
29893,
29974,
1159,
408,
285,
29901,
13,
9651,
4390,
29889,
15070,
29898,
9990,
29892,
285,
29897,
13,
9651,
285,
29889,
5358,
580,
13,
13,
4706,
7272,
12893,
29889,
6717,
29898,
29888,
29908,
29902,
505,
4586,
426,
710,
29898,
1949,
2915,
1952,
468,
347,
1321,
4684,
515,
426,
1792,
29889,
358,
291,
29913,
29991,
1159,
13,
13,
1678,
732,
19730,
29889,
2704,
13,
1678,
7465,
822,
2125,
29918,
2704,
29898,
1311,
29892,
12893,
29892,
1059,
1125,
13,
4706,
565,
338,
8758,
29898,
2704,
29892,
8260,
29889,
5596,
24155,
1125,
13,
9651,
7272,
12893,
29889,
6717,
29898,
29888,
29908,
229,
160,
143,
18637,
29892,
426,
13073,
29889,
8921,
29889,
978,
29913,
366,
508,
29915,
29873,
437,
393,
29991,
1159,
13,
13,
1678,
732,
26381,
29889,
6519,
580,
13,
1678,
732,
3198,
29898,
275,
29918,
9192,
6234,
29918,
272,
29918,
29880,
4347,
29897,
13,
1678,
7465,
822,
3001,
12071,
29898,
1311,
29892,
12893,
29892,
954,
584,
938,
353,
6213,
1125,
13,
4706,
565,
954,
1275,
6213,
29901,
13,
9651,
8297,
29922,
2218,
16090,
29889,
6026,
2580,
29898,
3257,
543,
797,
15728,
1899,
8744,
29991,
613,
6139,
29569,
7827,
12071,
426,
4537,
17671,
2927,
29922,
29900,
29916,
29900,
29900,
17156,
29897,
13,
9651,
7272,
12893,
29889,
6717,
29898,
17987,
29922,
17987,
29897,
13,
9651,
736,
13,
13,
4706,
411,
1722,
703,
1272,
29914,
29885,
4992,
29889,
3126,
1159,
408,
285,
29901,
13,
9651,
6909,
353,
4390,
29889,
1359,
29898,
29888,
29897,
13,
9651,
285,
29889,
5358,
580,
13,
13,
4706,
363,
1404,
297,
6909,
29901,
13,
9651,
6909,
29961,
1792,
29962,
353,
954,
13,
13,
4706,
411,
1722,
703,
1272,
29914,
29885,
4992,
29889,
3126,
613,
376,
29893,
29974,
1159,
408,
285,
29901,
13,
9651,
4390,
29889,
15070,
29898,
29885,
4992,
29892,
285,
29897,
13,
9651,
285,
29889,
5358,
580,
13,
13,
4706,
7272,
12893,
29889,
6717,
29898,
29888,
29908,
29902,
505,
10092,
599,
1952,
468,
347,
16281,
29879,
29991,
1159,
13,
13,
1678,
732,
19730,
29889,
2704,
13,
1678,
7465,
822,
2125,
29918,
2704,
29898,
1311,
29892,
12893,
29892,
1059,
1125,
13,
4706,
565,
338,
8758,
29898,
2704,
29892,
8260,
29889,
5596,
24155,
1125,
13,
9651,
7272,
12893,
29889,
6717,
29898,
29888,
29908,
229,
160,
143,
18637,
29892,
426,
13073,
29889,
8921,
29889,
978,
29913,
366,
508,
29915,
29873,
437,
393,
29991,
1159,
13,
13,
13,
13,
13,
1753,
6230,
29898,
4645,
1125,
13,
1678,
3132,
29889,
1202,
29918,
29883,
468,
29898,
2052,
29898,
4645,
876,
13,
2
] |
new_pro/shorten/models.py | Lavkushmani/URL_SHORTNER | 1 | 185483 | from django.db import models
# Create your models here.
class bitly(models.Model):
user = models.CharField(max_length=15, null=True)
long_url = models.URLField(null=False)
shortcode = models.CharField(max_length=6,unique=True)
created_date = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
datewise = models.TextField()
def __str__(self):
return self.long_url
| [
1,
515,
9557,
29889,
2585,
1053,
4733,
13,
13,
13,
29937,
6204,
596,
4733,
1244,
29889,
13,
1990,
2586,
368,
29898,
9794,
29889,
3195,
1125,
13,
1678,
1404,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29896,
29945,
29892,
1870,
29922,
5574,
29897,
13,
1678,
1472,
29918,
2271,
353,
4733,
29889,
4219,
3073,
29898,
4304,
29922,
8824,
29897,
13,
1678,
3273,
401,
353,
4733,
29889,
27890,
29898,
3317,
29918,
2848,
29922,
29953,
29892,
13092,
29922,
5574,
29897,
13,
1678,
2825,
29918,
1256,
353,
4733,
29889,
11384,
3073,
29898,
6921,
29918,
3707,
29918,
1202,
29922,
5574,
29897,
13,
1678,
4784,
353,
4733,
29889,
11384,
3073,
29898,
6921,
29918,
3707,
29922,
5574,
29897,
13,
1678,
2635,
3538,
353,
4733,
29889,
15778,
580,
13,
13,
1678,
822,
4770,
710,
12035,
1311,
1125,
13,
4706,
736,
1583,
29889,
5426,
29918,
2271,
13,
13,
268,
13,
2
] |
python/tests/test_insertion_sort.py | bjgman12/data-structures-and-algorithms | 0 | 131371 | from code_challenges.insertion_sort.insertion_sort import insert_sort
def test_sorting_functionality():
test_list = [8,4,23,42,16,15]
actual = insert_sort(test_list)
expected = [4,8,15,16,23,42]
assert actual == expected
| [
1,
515,
775,
29918,
305,
16047,
267,
29889,
7851,
291,
29918,
6605,
29889,
7851,
291,
29918,
6605,
1053,
4635,
29918,
6605,
13,
13,
1753,
1243,
29918,
6605,
292,
29918,
2220,
2877,
7295,
13,
1678,
1243,
29918,
1761,
353,
518,
29947,
29892,
29946,
29892,
29906,
29941,
29892,
29946,
29906,
29892,
29896,
29953,
29892,
29896,
29945,
29962,
13,
1678,
3935,
353,
4635,
29918,
6605,
29898,
1688,
29918,
1761,
29897,
13,
1678,
3806,
353,
518,
29946,
29892,
29947,
29892,
29896,
29945,
29892,
29896,
29953,
29892,
29906,
29941,
29892,
29946,
29906,
29962,
13,
1678,
4974,
3935,
1275,
3806,
13,
13,
2
] |
testing/onQuest/longClusters/m67/OLD-analyseEBLSSTm67.py | andrewbowen19/ClusterEclipsingBinaries | 0 | 2429 | #########################
#########################
# Need to account for limit in input period
#########################
#########################
# Baseline M67 long script -- NO crowding
# New script copied from quest - want to take p and ecc from each population (all, obs, rec) and put them into separate file
# Doing this so we don't have to run analyse each time
# Can write separate script for p-ecc plots
# Quest paths in this version of script
import pandas as pd
import numpy as np
import os
from astropy.coordinates import SkyCoord
from astropy import units, constants
from astropy.modeling import models, fitting
import scipy.stats
from scipy.integrate import quad
#for Quest
import matplotlib
matplotlib.use('Agg')
doIndividualPlots = True
from matplotlib import pyplot as plt
def file_len(fname):
i = 0
with open(fname) as f:
for i, l in enumerate(f):
pass
return i + 1
def getPhs(sigma, m1=1*units.solMass, m2=1*units.solMass, m3=0.5*units.solMass):
Phs = np.pi*constants.G/np.sqrt(2.)*(m1*m2/m3)**(3./2.)*(m1 + m2)**(-0.5)*sigma**(-3.)
return Phs.decompose().to(units.day)
#similar to field, but limiting by the hard-soft boundary
def fitRagfb():
x = [0.05, 0.1, 1, 8, 15] #estimates of midpoints in bins, and using this: https://sites.uni.edu/morgans/astro/course/Notes/section2/spectralmasses.html
y = [0.20, 0.35, 0.50, 0.70, 0.75]
init = models.PowerLaw1D(amplitude=0.5, x_0=1, alpha=-1.)
fitter = fitting.LevMarLSQFitter()
fit = fitter(init, x, y)
return fit
def RagNormal(x, cdf = False):
mean = 5.03
std = 2.28
if (cdf):
return scipy.stats.norm.cdf(x,mean,std)
return scipy.stats.norm.pdf(x,mean,std)
def saveHist(histAll, histObs, histRec, bin_edges, xtitle, fname, filters = ['u_', 'g_', 'r_', 'i_', 'z_', 'y_','all']):
c1 = '#5687A6' #Dali Blue (Andrew's AAS Poster)
c2 = '#A62B1F' #Dai Red
c3 = '#BF8A26' #Dali Beige
fig,ax1 = plt.subplots(figsize=(8,6), sharex=True)#can change to include cdf with ax1, ax2
histAll = np.insert(histAll,0,0)
histObs = np.insert(histObs,0,0)
for f in filters:
histRec[f] = np.insert(histRec[f],0,0)
#PDF
ax1.step(bin_edges, histAll/np.sum(histAll), color=c1)
ax1.step(bin_edges, histObs/np.sum(histObs), color=c2)
for f in filters:
lw = 1
if (f == 'all'):
lw = 0.5
ax1.step(bin_edges, histRec[f]/np.sum(histRec[f]), color=c3, linewidth=lw)
ax1.set_ylabel('PDF')
ax1.set_yscale('log')
ax1.set_title('Globular Clusters - Baseline', fontsize = 16)
ax1.set_xlabel(xtitle)
#CDF
#cdfAll = []
#cdfObs = []
#cdfRec = dict()
#for f in filters:
# cdfRec[f] = []
# for i in range(len(histAll)):
# cdfAll.append(np.sum(histAll[:i])/np.sum(histAll))
# for i in range(len(histObs)):
# cdfObs.append(np.sum(histObs[:i])/np.sum(histObs))
# for f in filters:
# for i in range(len(histRec[f])):
# cdfRec[f].append(np.sum(histRec[f][:i])/np.sum(histRec[f]))
#ax2.step(bin_edges, cdfAll, color=c1)
#ax2.step(bin_edges, cdfObs, color=c2)
#for f in filters:
# lw = 1
# if (f == 'all'):
# lw = 0.5
# ax2.step(bin_edges, cdfRec[f], color=c3, linewidth=lw)
#ax2.set_ylabel('CDF')
#ax2.set_xlabel(xtitle)
fig.subplots_adjust(hspace=0)
fig.savefig('./plots/' + fname+'.pdf',format='pdf', bbox_inches = 'tight')
#write to a text file
with open('./eblsst_files/' + fname+'.csv','w') as fl:
outline = 'binEdges,histAll,histObs'
for f in filters:
outline += ','+f+'histRec'
outline += '\n'
fl.write(outline)
for i in range(len(bin_edges)):
outline = str(bin_edges[i])+','+str(histAll[i])+','+str(histObs[i])
for f in filters:
outline += ','+str(histRec[f][i])
outline += '\n'
fl.write(outline)
if __name__ == "__main__":
filters = ['u_', 'g_', 'r_', 'i_', 'z_', 'y_', 'all']
#get the Raghavan binary fraction fit
fbFit= fitRagfb()
print(fbFit)
#to normalize
intAll, err = quad(RagNormal, -20, 20)
intCut, err = quad(RagNormal, -20, np.log10(365*10.))
intNorm = intCut/intAll
#cutoff in percent error for "recovered"
Pcut = 0.1
#assumed mean stellar mass
mMean = 0.5
#minimum number of lines to consider in file
Nlim = 3
if (doIndividualPlots):
fmass, axmass = plt.subplots()
fqrat, axqrat = plt.subplots()
fecc, axecc = plt.subplots()
flper, axlper = plt.subplots()
fdist, axdist = plt.subplots()
fmag, axmag = plt.subplots()
frad, axrad = plt.subplots()
#bins for all the histograms
Nbins = 25
mbins = np.arange(0,10, 0.1, dtype='float')
qbins = np.arange(0,1, 0.1, dtype='float')
ebins = np.arange(0, 1.05, 0.05, dtype='float')
lpbins = np.arange(-2, 10, 0.5, dtype='float')
dbins = np.arange(0, 40, 1, dtype='float')
magbins = np.arange(11, 25, 1, dtype='float')
rbins = np.arange(0, 100, 0.2, dtype='float')
#blanks for the histograms
#All
m1hAll = np.zeros_like(mbins)[1:]
qhAll = np.zeros_like(qbins)[1:]
ehAll = np.zeros_like(ebins)[1:]
lphAll = np.zeros_like(lpbins)[1:]
dhAll = np.zeros_like(dbins)[1:]
maghAll = np.zeros_like(magbins)[1:]
rhAll = np.zeros_like(rbins)[1:]
#Observable
m1hObs = np.zeros_like(mbins)[1:]
qhObs = np.zeros_like(qbins)[1:]
ehObs = np.zeros_like(ebins)[1:]
lphObs = np.zeros_like(lpbins)[1:]
dhObs = np.zeros_like(dbins)[1:]
maghObs = np.zeros_like(magbins)[1:]
rhObs = np.zeros_like(rbins)[1:]
#Recovered
m1hRec = dict()
qhRec = dict()
ehRec = dict()
lphRec = dict()
dhRec = dict()
maghRec = dict()
rhRec = dict()
for f in filters:
m1hRec[f] = np.zeros_like(mbins)[1:]
qhRec[f] = np.zeros_like(qbins)[1:]
ehRec[f] = np.zeros_like(ebins)[1:]
lphRec[f] = np.zeros_like(lpbins)[1:]
dhRec[f] = np.zeros_like(dbins)[1:]
maghRec[f] = np.zeros_like(magbins)[1:]
rhRec[f] = np.zeros_like(rbins)[1:]
RA = []
Dec = []
recFrac = []
recN = []
rawN = []
obsN = []
fileN = []
fileObsN = []
fileRecN = []
allNPrsa = []
obsNPrsa = []
recNPrsa = []
# Lists for period and eccentricity for Andrew's circularization plots
eccAll = []
eccObs = []
eccRec = []
pAll = []
pObs = []
pRec = []
# Using prsa dataframes for these lists because of period cutoff at 1000 days
# Dataframes to write to files later; 3 files for each sub-population - append everything to these
peccAll = pd.DataFrame(columns = ['e', 'p'])
peccObs = pd.DataFrame(columns = ['e', 'p'])
peccRec = pd.DataFrame(columns = ['e', 'p'])
#Read in all the data and make the histograms
d = "./input_files/"
files = os.listdir(d)
IDs = []
for i, f in enumerate(files):
print(round(i/len(files),4), f)
fl = file_len(d+f)
if (fl >= 4):
#read in the header
header = pd.read_csv(d+f, nrows=1)
######################
#NEED TO ACCOUNT FOR THE BINARY FRACTION when combining histograms
#####################
Nmult = header['clusterMass'][0]/mMean
#Nmult = 1.
RA.append(header['OpSimRA'])
Dec.append(header['OpSimDec'])
#read in rest of the file
data = pd.read_csv(d+f, header = 2).fillna(-999)
rF = 0.
rN = 0.
Nrec = 0.
Nobs = 0.
raN = 0.
obN = 0.
fiN = 0.
fioN = 0.
firN = 0.
NallPrsa = 0.
NobsPrsa = 0.
NrecPrsa = 0.
Nall = len(data.index)/intNorm ###is this correct? (and the only place I need to normalize?)
prsa = data.loc[(data['appMagMean_r'] <= 19.5) & (data['appMagMean_r'] > 15.8) & (data['p'] < 1000) & (data['p'] > 0.5)]
# Appending for Andrew
eccAll.append(prsa['e'].values)
pAll.append(prsa['p'].values)
NallPrsa = len(prsa.index)
if (Nall >= Nlim):
#create histograms
#All
m1hAll0, m1b = np.histogram(data["m1"], bins=mbins)
qhAll0, qb = np.histogram(data["m2"]/data["m1"], bins=qbins)
ehAll0, eb = np.histogram(data["e"], bins=ebins)
lphAll0, lpb = np.histogram(np.ma.log10(data["p"].values).filled(-999), bins=lpbins)
dhAll0, db = np.histogram(data["d"], bins=dbins)
maghAll0, magb = np.histogram(data["appMagMean_r"], bins=magbins)
rhAll0, rb = np.histogram(data["r2"]/data["r1"], bins=rbins)
if (doIndividualPlots):
axmass.step(m1b[0:-1], m1hAll0/np.sum(m1hAll0), color='black', alpha=0.1)
axqrat.step(qb[0:-1], qhAll0/np.sum(qhAll0), color='black', alpha=0.1)
axecc.step(eb[0:-1], ehAll0/np.sum(ehAll0), color='black', alpha=0.1)
axlper.step(lpb[0:-1], lphAll0/np.sum(lphAll0), color='black', alpha=0.1)
axdist.step(db[0:-1], dhAll0/np.sum(dhAll0), color='black', alpha=0.1)
axmag.step(magb[0:-1], maghAll0/np.sum(maghAll0), color='black', alpha=0.1)
axrad.step(rb[0:-1], rhAll0/np.sum(rhAll0), color='black', alpha=0.1)
#account for the binary fraction, as a function of mass
dm1 = np.diff(m1b)
m1val = m1b[:-1] + dm1/2.
fb = np.sum(m1hAll0/len(data.index)*fbFit(m1val))
#account for the hard-soft boundary
Phs = getPhs(header['clusterVdisp'].iloc[0]*units.km/units.s).to(units.day).value
fb *= RagNormal(np.log10(Phs), cdf = True)
print("fb, Phs = ", fb, Phs)
Nmult *= fb
m1hAll += m1hAll0/Nall*Nmult
qhAll += qhAll0/Nall*Nmult
ehAll += ehAll0/Nall*Nmult
lphAll += lphAll0/Nall*Nmult
dhAll += dhAll0/Nall*Nmult
maghAll += maghAll0/Nall*Nmult
rhAll += rhAll0/Nall*Nmult
#Obs
obs = data.loc[data['LSM_PERIOD'] != -999]
Nobs = len(obs.index)
prsaObs = data.loc[(data['appMagMean_r'] <= 19.5) & (data['appMagMean_r'] > 15.8) & (data['p'] < 1000) & (data['p'] >0.5) & (data['LSM_PERIOD'] != -999)]
NobsPrsa = len(prsaObs.index)
# Appending for Andrew's files
eccObs.append(prsaObs['e'].values)
pObs.append(prsaObs['p'].values)
if (Nobs >= Nlim):
m1hObs0, m1b = np.histogram(obs["m1"], bins=mbins)
qhObs0, qb = np.histogram(obs["m2"]/obs["m1"], bins=qbins)
ehObs0, eb = np.histogram(obs["e"], bins=ebins)
lphObs0, lpb = np.histogram(np.ma.log10(obs["p"].values).filled(-999), bins=lpbins)
dhObs0, db = np.histogram(obs["d"], bins=dbins)
maghObs0, magb = np.histogram(obs["appMagMean_r"], bins=magbins)
rhObs0, rb = np.histogram(obs["r2"]/obs["r1"], bins=rbins)
m1hObs += m1hObs0/Nall*Nmult
qhObs += qhObs0/Nall*Nmult
ehObs += ehObs0/Nall*Nmult
lphObs += lphObs0/Nall*Nmult
dhObs += dhObs0/Nall*Nmult
maghObs += maghObs0/Nall*Nmult
rhObs += rhObs0/Nall*Nmult
#Rec
recCombined = pd.DataFrame()
prsaRecCombined = pd.DataFrame()
for filt in filters:
key = filt+'LSS_PERIOD'
if (filt == 'all'):
key = 'LSM_PERIOD'
fullP = abs(data[key] - data['p'])/data['p']
halfP = abs(data[key] - 0.5*data['p'])/(0.5*data['p'])
twiceP = abs(data[key] - 2.*data['p'])/(2.*data['p'])
rec = data.loc[(data[key] != -999) & ( (fullP < Pcut) | (halfP < Pcut) | (twiceP < Pcut))]
prsaRec = data.loc[(data['appMagMean_r'] <= 19.5) & (data['appMagMean_r'] >15.8) & (data['p'] < 1000) & (data['p'] >0.5) & (data['LSM_PERIOD'] != -999) & ( (fullP < Pcut) | (halfP < Pcut) | (twiceP < Pcut))]
Nrec = len(rec.index)
#I'd like to account for all filters here to have more accurate numbers
recCombined = recCombined.append(rec)
prsaRecCombined = prsaRecCombined.append(prsaRec)
# Going to use prsaRecCombined for ecc-p plots to account for all filters
eccRec.append(prsaRec['e'].values)
pRec.append(prsaRec['p'].values)
if (filt == 'all'):
recCombined.drop_duplicates(inplace=True)
prsaRecCombined.drop_duplicates(inplace=True)
if (Nrec >= Nlim):
m1hRec0, m1b = np.histogram(rec["m1"], bins=mbins)
qhRec0, qb = np.histogram(rec["m2"]/rec["m1"], bins=qbins)
ehRec0, eb = np.histogram(rec["e"], bins=ebins)
lphRec0, lpb = np.histogram(np.ma.log10(rec["p"].values).filled(-999), bins=lpbins)
dhRec0, db = np.histogram(rec["d"], bins=dbins)
maghRec0, magb = np.histogram(rec["appMagMean_r"], bins=magbins)
rhRec0, rb = np.histogram(rec["r2"]/rec["r1"], bins=rbins)
m1hRec[filt] += m1hRec0/Nall*Nmult
qhRec[filt] += qhRec0/Nall*Nmult
ehRec[filt] += ehRec0/Nall*Nmult
lphRec[filt] += lphRec0/Nall*Nmult
dhRec[filt] += dhRec0/Nall*Nmult
maghRec[filt] += maghRec0/Nall*Nmult
rhRec[filt] += rhRec0/Nall*Nmult
#for the mollweide
if (filt == 'all'):
Nrec = len(recCombined.index)
rF = Nrec/Nall
rN = Nrec/Nall*Nmult
raN = Nmult
obN = Nobs/Nall*Nmult
fiN = Nall
fioN = Nobs
firN = Nrec
NrecPrsa = len(prsaRecCombined.index)
NrecPrsa = NrecPrsa/Nall*Nmult
NobsPrsa = NobsPrsa/Nall*Nmult
NallPrsa = NallPrsa/Nall*Nmult
recFrac.append(rF)
recN.append(rN)
rawN.append(raN)
obsN.append(obN)
fileN.append(fiN)
fileObsN.append(fioN)
fileRecN.append(firN)
allNPrsa.append(NallPrsa)
obsNPrsa.append(NobsPrsa)
recNPrsa.append(NrecPrsa)
#print(np.sum(lphRec), np.sum(recN), np.sum(lphRec)/np.sum(recN), np.sum(lphRec0), Nrec, np.sum(lphRec0)/Nrec, np.sum(lphObs), np.sum(obsN), np.sum(lphObs)/np.sum(obsN))
# Concatenating p and ecc lists
eccAll = np.concatenate(eccAll)
eccObs = np.concatenate(eccObs)
eccRec = np.concatenate(eccRec)
pAll = np.concatenate(pAll)
pObs = np.concatenate(pObs)
pRec = np.concatenate(pRec)
# print('Ecc lists:', eccAll, eccObs, eccRec)
# print('P lists:', pAll, pObs, pRec)
# Appending lists with all the p/ecc values to our dataframes
# All dataframe
peccAll['e'] = eccAll
peccAll['p'] = pAll
# Observable dataframe
peccObs['e'] = eccObs
peccObs['p'] = pObs
# Recovered dataframe
peccRec['e'] = eccRec
peccRec['p'] = pRec
# print('Final Dataframes:', peccAll, peccObs, peccRec)
# print(peccRec.columns)
# 3 letter code corresponds to scenario (OC/GC, baseline/colossus, crowding/no crowding)
peccAll.to_csv('./pecc/all-M67BN-ecc-p.csv', header = ['e', 'p'])
peccObs.to_csv('./pecc/obs-M67BN-ecc-p.csv', header = ['e', 'p'])
peccRec.to_csv('./pecc/rec-M67BN-ecc-p.csv', header = ['e', 'p'])
#plot and save the histograms
saveHist(m1hAll, m1hObs, m1hRec, m1b, 'm1 (Msolar)', 'EBLSST_m1hist')
saveHist(qhAll, qhObs, qhRec, qb, 'q (m2/m1)', 'EBLSST_qhist')
saveHist(ehAll, ehObs, ehRec, eb, 'e', 'EBLSST_ehist')
saveHist(lphAll, lphObs, lphRec, lpb, 'log(P [days])', 'EBLSST_lphist')
saveHist(dhAll, dhObs, dhRec, db, 'd (kpc)', 'EBLSST_dhist')
saveHist(maghAll, maghObs, maghRec, magb, 'mag', 'EBLSST_maghist')
saveHist(rhAll, rhObs, rhRec, rb, 'r2/r1', 'EBLSST_rhist')
#make the mollweide
coords = SkyCoord(RA, Dec, unit=(units.degree, units.degree),frame='icrs')
lGal = coords.galactic.l.wrap_at(180.*units.degree).degree
bGal = coords.galactic.b.wrap_at(180.*units.degree).degree
RAwrap = coords.ra.wrap_at(180.*units.degree).degree
Decwrap = coords.dec.wrap_at(180.*units.degree).degree
f, ax = plt.subplots(subplot_kw={'projection': "mollweide"}, figsize=(8,5))
ax.grid(True)
#ax.set_xlabel(r"$l$",fontsize=16)
#ax.set_ylabel(r"$b$",fontsize=16)
#mlw = ax.scatter(lGal.ravel()*np.pi/180., bGal.ravel()*np.pi/180., c=np.log10(np.array(recFrac)*100.), cmap='viridis_r', s = 4)
ax.set_xlabel("RA",fontsize=16)
ax.set_ylabel("Dec",fontsize=16)
mlw = ax.scatter(np.array(RAwrap).ravel()*np.pi/180., np.array(Decwrap).ravel()*np.pi/180., c=np.array(recFrac)*100., cmap='viridis_r', s = 4)
cbar = f.colorbar(mlw, shrink=0.7)
cbar.set_label(r'% recovered')
f.savefig('./plots/' + 'mollweide_pct.pdf',format='pdf', bbox_inches = 'tight')
f, ax = plt.subplots(subplot_kw={'projection': "mollweide"}, figsize=(8,5))
ax.grid(True)
#ax.set_xlabel(r"$l$",fontsize=16)
#ax.set_ylabel(r"$b$",fontsize=16)
#mlw = ax.scatter(lGal.ravel()*np.pi/180., bGal.ravel()*np.pi/180., c=np.log10(np.array(recN)), cmap='viridis_r', s = 4)
ax.set_xlabel("RA",fontsize=16)
ax.set_ylabel("Dec",fontsize=16)
mlw = ax.scatter(np.array(RAwrap).ravel()*np.pi/180., np.array(Decwrap).ravel()*np.pi/180., c=np.log10(np.array(recN)), cmap='viridis_r', s = 4)
cbar = f.colorbar(mlw, shrink=0.7)
cbar.set_label(r'log10(N) recovered')
f.savefig('./plots/' + 'mollweide_N.pdf',format='pdf', bbox_inches = 'tight')
if (doIndividualPlots):
fmass.savefig('./plots/' + 'massPDFall.pdf',format='pdf', bbox_inches = 'tight')
fqrat.savefig('./plots/' + 'qPDFall.pdf',format='pdf', bbox_inches = 'tight')
fecc.savefig('./plots/' + 'eccPDFall.pdf',format='pdf', bbox_inches = 'tight')
flper.savefig('./plots/' + 'lperPDFall.pdf',format='pdf', bbox_inches = 'tight')
fdist.savefig('./plots/' + 'distPDFall.pdf',format='pdf', bbox_inches = 'tight')
fmag.savefig('./plots/' + 'magPDFall.pdf',format='pdf', bbox_inches = 'tight')
frad.savefig('./plots/' + 'radPDFall.pdf',format='pdf', bbox_inches = 'tight')
print("###################")
print("number of binaries in input files (raw, log):",np.sum(fileN), np.log10(np.sum(fileN)))
print("number of binaries in tested with gatspy (raw, log):",np.sum(fileObsN), np.log10(np.sum(fileObsN)))
print("number of binaries in recovered with gatspy (raw, log):",np.sum(fileRecN), np.log10(np.sum(fileRecN)))
print("recovered/observable*100 with gatspy:",np.sum(fileRecN)/np.sum(fileObsN)*100.)
print("###################")
print("total in sample (raw, log):",np.sum(rawN), np.log10(np.sum(rawN)))
print("total observable (raw, log):",np.sum(obsN), np.log10(np.sum(obsN)))
print("total recovered (raw, log):",np.sum(recN), np.log10(np.sum(recN)))
print("recovered/observable*100:",np.sum(recN)/np.sum(obsN)*100.)
print("###################")
print("total in Prsa 15.8<r<19.5 P<1000d sample (raw, log):",np.sum(allNPrsa), np.log10(np.sum(allNPrsa)))
print("total observable in Prsa 15.8<r<19.5 P<1000d sample (raw, log):",np.sum(obsNPrsa), np.log10(np.sum(obsNPrsa)))
print("total recovered in Prsa 15.8<r<19.5 P<1000d sample (raw, log):",np.sum(recNPrsa), np.log10(np.sum(recNPrsa)))
print("Prsa 15.8<r<19.5 P<1000d rec/obs*100:",np.sum(recNPrsa)/np.sum(obsNPrsa)*100.)
| [
1,
835,
13383,
4136,
2277,
13,
13383,
7346,
29937,
13,
29937,
20768,
304,
3633,
363,
4046,
297,
1881,
3785,
13,
13383,
7346,
29937,
13,
13383,
7346,
29937,
13,
13,
29937,
4886,
5570,
341,
29953,
29955,
1472,
2471,
1192,
11698,
11660,
8497,
13,
29937,
1570,
2471,
13746,
515,
21126,
448,
864,
304,
2125,
282,
322,
16882,
515,
1269,
4665,
313,
497,
29892,
20881,
29892,
1162,
29897,
322,
1925,
963,
964,
5004,
934,
13,
29937,
1938,
292,
445,
577,
591,
1016,
29915,
29873,
505,
304,
1065,
16455,
344,
1269,
931,
13,
29937,
1815,
2436,
5004,
2471,
363,
282,
29899,
29872,
617,
24580,
13,
29937,
751,
342,
10898,
297,
445,
1873,
310,
2471,
13,
13,
5215,
11701,
408,
10518,
13,
5215,
12655,
408,
7442,
13,
5215,
2897,
13,
3166,
8717,
14441,
29889,
1111,
24266,
1053,
16572,
7967,
536,
13,
3166,
8717,
14441,
1053,
10340,
29892,
17727,
13,
3166,
8717,
14441,
29889,
4299,
292,
1053,
4733,
29892,
28221,
13,
5215,
4560,
2272,
29889,
16202,
13,
3166,
4560,
2272,
29889,
14146,
403,
1053,
18890,
13,
13,
29937,
1454,
751,
342,
13,
5215,
22889,
13,
2922,
17357,
29889,
1509,
877,
29909,
1505,
1495,
13,
13,
1867,
2568,
23352,
3247,
1862,
353,
5852,
13,
13,
3166,
22889,
1053,
11451,
5317,
408,
14770,
13,
1753,
934,
29918,
2435,
29898,
29888,
978,
1125,
13,
12,
29875,
353,
29871,
29900,
13,
12,
2541,
1722,
29898,
29888,
978,
29897,
408,
285,
29901,
13,
12,
12,
1454,
474,
29892,
301,
297,
26985,
29898,
29888,
1125,
13,
12,
12,
12,
3364,
13,
12,
2457,
474,
718,
29871,
29896,
13,
13,
1753,
679,
4819,
29879,
29898,
3754,
29892,
286,
29896,
29922,
29896,
29930,
348,
1169,
29889,
2929,
29924,
465,
29892,
286,
29906,
29922,
29896,
29930,
348,
1169,
29889,
2929,
29924,
465,
29892,
286,
29941,
29922,
29900,
29889,
29945,
29930,
348,
1169,
29889,
2929,
29924,
465,
1125,
13,
12,
4819,
29879,
353,
7442,
29889,
1631,
29930,
3075,
1934,
29889,
29954,
29914,
9302,
29889,
3676,
29898,
29906,
1846,
16395,
29885,
29896,
29930,
29885,
29906,
29914,
29885,
29941,
29897,
1068,
29898,
29941,
6904,
29906,
1846,
16395,
29885,
29896,
718,
286,
29906,
29897,
1068,
6278,
29900,
29889,
29945,
11877,
3754,
1068,
6278,
29941,
1846,
13,
12,
2457,
1963,
29879,
29889,
311,
19438,
2141,
517,
29898,
348,
1169,
29889,
3250,
29897,
13,
13,
29937,
29764,
304,
1746,
29892,
541,
4046,
292,
491,
278,
2898,
29899,
2695,
10452,
13,
1753,
6216,
29934,
351,
14943,
7295,
13,
12,
29916,
353,
518,
29900,
29889,
29900,
29945,
29892,
29871,
29900,
29889,
29896,
29892,
29871,
29896,
29892,
29871,
29947,
29892,
29871,
29896,
29945,
29962,
29871,
396,
342,
326,
1078,
310,
7145,
9748,
297,
289,
1144,
29892,
322,
773,
445,
29901,
2045,
597,
16315,
29889,
3909,
29889,
6085,
29914,
29885,
990,
550,
29914,
23364,
29914,
15775,
29914,
3664,
267,
29914,
2042,
29906,
29914,
21494,
1705,
25379,
267,
29889,
1420,
13,
12,
29891,
353,
518,
29900,
29889,
29906,
29900,
29892,
29871,
29900,
29889,
29941,
29945,
29892,
29871,
29900,
29889,
29945,
29900,
29892,
29871,
29900,
29889,
29955,
29900,
29892,
29871,
29900,
29889,
29955,
29945,
29962,
13,
12,
2344,
353,
4733,
29889,
21472,
29931,
1450,
29896,
29928,
29898,
314,
2830,
1151,
29922,
29900,
29889,
29945,
29892,
921,
29918,
29900,
29922,
29896,
29892,
15595,
10457,
29896,
1846,
13,
12,
29888,
5171,
353,
28221,
29889,
3226,
29894,
7083,
8547,
29984,
29943,
5171,
580,
13,
12,
9202,
353,
285,
5171,
29898,
2344,
29892,
921,
29892,
343,
29897,
13,
13,
12,
2457,
6216,
13,
13,
1753,
390,
351,
19077,
29898,
29916,
29892,
274,
2176,
353,
7700,
1125,
13,
12,
12676,
353,
29871,
29945,
29889,
29900,
29941,
13,
12,
4172,
353,
29871,
29906,
29889,
29906,
29947,
13,
12,
361,
313,
29883,
2176,
1125,
13,
12,
12,
2457,
4560,
2272,
29889,
16202,
29889,
12324,
29889,
29883,
2176,
29898,
29916,
29892,
12676,
29892,
4172,
29897,
13,
13,
12,
2457,
4560,
2272,
29889,
16202,
29889,
12324,
29889,
5140,
29898,
29916,
29892,
12676,
29892,
4172,
29897,
13,
13,
13,
1753,
4078,
29950,
391,
29898,
29882,
391,
3596,
29892,
9825,
29949,
5824,
29892,
9825,
4789,
29892,
9016,
29918,
287,
2710,
29892,
29871,
486,
1740,
29892,
285,
978,
29892,
18094,
353,
6024,
29884,
29918,
742,
525,
29887,
29918,
742,
525,
29878,
29918,
742,
525,
29875,
29918,
742,
525,
29920,
29918,
742,
525,
29891,
29918,
3788,
497,
2033,
1125,
13,
12,
29883,
29896,
353,
16321,
29945,
29953,
29947,
29955,
29909,
29953,
29915,
396,
29928,
2606,
10924,
313,
2855,
3973,
29915,
29879,
319,
3289,
4918,
261,
29897,
13,
12,
29883,
29906,
353,
16321,
29909,
29953,
29906,
29933,
29896,
29943,
29915,
396,
29928,
1794,
4367,
29871,
13,
12,
29883,
29941,
353,
16321,
28062,
29947,
29909,
29906,
29953,
29915,
396,
29928,
2606,
1522,
2231,
13,
12,
1003,
29892,
1165,
29896,
353,
14770,
29889,
1491,
26762,
29898,
1003,
2311,
7607,
29947,
29892,
29953,
511,
6232,
29916,
29922,
5574,
29897,
29937,
3068,
1735,
304,
3160,
274,
2176,
411,
4853,
29896,
29892,
4853,
29906,
13,
13,
12,
29882,
391,
3596,
353,
7442,
29889,
7851,
29898,
29882,
391,
3596,
29892,
29900,
29892,
29900,
29897,
13,
12,
29882,
391,
29949,
5824,
353,
7442,
29889,
7851,
29898,
29882,
391,
29949,
5824,
29892,
29900,
29892,
29900,
29897,
13,
12,
1454,
285,
297,
18094,
29901,
13,
12,
12,
29882,
391,
4789,
29961,
29888,
29962,
353,
7442,
29889,
7851,
29898,
29882,
391,
4789,
29961,
29888,
1402,
29900,
29892,
29900,
29897,
13,
13,
12,
29937,
8493,
13,
12,
1165,
29896,
29889,
10568,
29898,
2109,
29918,
287,
2710,
29892,
9825,
3596,
29914,
9302,
29889,
2083,
29898,
29882,
391,
3596,
511,
2927,
29922,
29883,
29896,
29897,
13,
12,
1165,
29896,
29889,
10568,
29898,
2109,
29918,
287,
2710,
29892,
9825,
29949,
5824,
29914,
9302,
29889,
2083,
29898,
29882,
391,
29949,
5824,
511,
2927,
29922,
29883,
29906,
29897,
13,
12,
1454,
285,
297,
18094,
29901,
13,
12,
12,
29880,
29893,
353,
29871,
29896,
13,
12,
12,
361,
313,
29888,
1275,
525,
497,
29374,
13,
12,
12,
12,
29880,
29893,
353,
29871,
29900,
29889,
29945,
13,
12,
1165,
29896,
29889,
10568,
29898,
2109,
29918,
287,
2710,
29892,
9825,
4789,
29961,
29888,
16261,
9302,
29889,
2083,
29898,
29882,
391,
4789,
29961,
29888,
11724,
2927,
29922,
29883,
29941,
29892,
1196,
2103,
29922,
29880,
29893,
29897,
13,
12,
1165,
29896,
29889,
842,
29918,
29891,
1643,
877,
8493,
1495,
13,
12,
1165,
29896,
29889,
842,
29918,
952,
29883,
744,
877,
1188,
1495,
13,
12,
1165,
29896,
29889,
842,
29918,
3257,
877,
29954,
2127,
1070,
2233,
504,
414,
448,
4886,
5570,
742,
4079,
2311,
353,
29871,
29896,
29953,
29897,
13,
12,
1165,
29896,
29889,
842,
29918,
29916,
1643,
29898,
486,
1740,
29897,
13,
12,
29937,
29907,
4037,
13,
12,
29937,
29883,
2176,
3596,
353,
5159,
13,
12,
29937,
29883,
2176,
29949,
5824,
353,
5159,
13,
12,
29937,
29883,
2176,
4789,
353,
9657,
580,
13,
12,
29937,
1454,
285,
297,
18094,
29901,
13,
29937,
12,
12,
29883,
2176,
4789,
29961,
29888,
29962,
353,
5159,
13,
13,
29937,
12,
1454,
474,
297,
3464,
29898,
2435,
29898,
29882,
391,
3596,
22164,
13,
29937,
12,
12,
29883,
2176,
3596,
29889,
4397,
29898,
9302,
29889,
2083,
29898,
29882,
391,
3596,
7503,
29875,
2314,
29914,
9302,
29889,
2083,
29898,
29882,
391,
3596,
876,
13,
29937,
12,
1454,
474,
297,
3464,
29898,
2435,
29898,
29882,
391,
29949,
5824,
22164,
13,
29937,
12,
12,
29883,
2176,
29949,
5824,
29889,
4397,
29898,
9302,
29889,
2083,
29898,
29882,
391,
29949,
5824,
7503,
29875,
2314,
29914,
9302,
29889,
2083,
29898,
29882,
391,
29949,
5824,
876,
13,
29937,
12,
1454,
285,
297,
18094,
29901,
13,
12,
29937,
12,
1454,
474,
297,
3464,
29898,
2435,
29898,
29882,
391,
4789,
29961,
29888,
12622,
29901,
13,
12,
29937,
12,
12,
29883,
2176,
4789,
29961,
29888,
1822,
4397,
29898,
9302,
29889,
2083,
29898,
29882,
391,
4789,
29961,
29888,
3816,
29901,
29875,
2314,
29914,
9302,
29889,
2083,
29898,
29882,
391,
4789,
29961,
29888,
12622,
13,
12,
29937,
1165,
29906,
29889,
10568,
29898,
2109,
29918,
287,
2710,
29892,
274,
2176,
3596,
29892,
2927,
29922,
29883,
29896,
29897,
13,
12,
29937,
1165,
29906,
29889,
10568,
29898,
2109,
29918,
287,
2710,
29892,
274,
2176,
29949,
5824,
29892,
2927,
29922,
29883,
29906,
29897,
13,
12,
29937,
1454,
285,
297,
18094,
29901,
13,
12,
29937,
12,
29880,
29893,
353,
29871,
29896,
13,
12,
29937,
12,
361,
313,
29888,
1275,
525,
497,
29374,
13,
12,
29937,
12,
12,
29880,
29893,
353,
29871,
29900,
29889,
29945,
13,
12,
29937,
12,
1165,
29906,
29889,
10568,
29898,
2109,
29918,
287,
2710,
29892,
274,
2176,
4789,
29961,
29888,
1402,
2927,
29922,
29883,
29941,
29892,
1196,
2103,
29922,
29880,
29893,
29897,
13,
12,
29937,
1165,
29906,
29889,
842,
29918,
29891,
1643,
877,
29907,
4037,
1495,
13,
13,
12,
29937,
1165,
29906,
29889,
842,
29918,
29916,
1643,
29898,
486,
1740,
29897,
13,
12,
1003,
29889,
1491,
26762,
29918,
328,
5143,
29898,
14158,
29922,
29900,
29897,
13,
12,
1003,
29889,
7620,
1003,
877,
6904,
26762,
22208,
29871,
718,
285,
978,
29974,
4286,
5140,
742,
4830,
2433,
5140,
742,
289,
1884,
29918,
262,
6609,
353,
525,
29873,
523,
1495,
13,
13,
12,
29937,
3539,
304,
263,
1426,
934,
13,
12,
2541,
1722,
877,
6904,
774,
3137,
303,
29918,
5325,
22208,
718,
285,
978,
29974,
4286,
7638,
3788,
29893,
1495,
408,
1652,
29901,
13,
12,
12,
449,
1220,
353,
525,
2109,
3853,
2710,
29892,
29882,
391,
3596,
29892,
29882,
391,
29949,
5824,
29915,
13,
12,
12,
1454,
285,
297,
18094,
29901,
13,
12,
12,
12,
449,
1220,
4619,
525,
5501,
29974,
29888,
23097,
29882,
391,
4789,
29915,
13,
12,
12,
449,
1220,
4619,
11297,
29876,
29915,
13,
12,
12,
1579,
29889,
3539,
29898,
449,
1220,
29897,
13,
12,
12,
1454,
474,
297,
3464,
29898,
2435,
29898,
2109,
29918,
287,
2710,
22164,
13,
12,
12,
12,
449,
1220,
353,
851,
29898,
2109,
29918,
287,
2710,
29961,
29875,
2314,
29974,
3788,
29974,
710,
29898,
29882,
391,
3596,
29961,
29875,
2314,
29974,
3788,
29974,
710,
29898,
29882,
391,
29949,
5824,
29961,
29875,
2314,
13,
12,
12,
12,
1454,
285,
297,
18094,
29901,
13,
12,
12,
12,
12,
449,
1220,
4619,
525,
5501,
29974,
710,
29898,
29882,
391,
4789,
29961,
29888,
3816,
29875,
2314,
13,
12,
12,
12,
449,
1220,
4619,
11297,
29876,
29915,
13,
12,
12,
12,
1579,
29889,
3539,
29898,
449,
1220,
29897,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
13,
12,
26705,
353,
6024,
29884,
29918,
742,
525,
29887,
29918,
742,
525,
29878,
29918,
742,
525,
29875,
29918,
742,
525,
29920,
29918,
742,
525,
29891,
29918,
742,
525,
497,
2033,
13,
13,
12,
29937,
657,
278,
390,
351,
8708,
273,
7581,
15958,
6216,
13,
12,
14943,
29943,
277,
29922,
6216,
29934,
351,
14943,
580,
13,
12,
2158,
29898,
14943,
29943,
277,
29897,
13,
12,
12,
13,
12,
29937,
517,
4226,
675,
13,
12,
524,
3596,
29892,
4589,
353,
18890,
29898,
29934,
351,
19077,
29892,
448,
29906,
29900,
29892,
29871,
29906,
29900,
29897,
13,
12,
524,
29907,
329,
29892,
4589,
353,
18890,
29898,
29934,
351,
19077,
29892,
448,
29906,
29900,
29892,
7442,
29889,
1188,
29896,
29900,
29898,
29941,
29953,
29945,
29930,
29896,
29900,
29889,
876,
13,
12,
524,
29940,
555,
353,
938,
29907,
329,
29914,
524,
3596,
13,
13,
12,
29937,
7582,
2696,
297,
10151,
1059,
363,
376,
3757,
957,
287,
29908,
13,
12,
29925,
7582,
353,
29871,
29900,
29889,
29896,
13,
13,
12,
29937,
465,
21571,
2099,
14781,
279,
4158,
13,
12,
29885,
6816,
273,
353,
29871,
29900,
29889,
29945,
13,
13,
12,
29937,
1195,
12539,
1353,
310,
3454,
304,
2050,
297,
934,
13,
12,
29940,
2576,
353,
29871,
29941,
13,
13,
12,
361,
313,
1867,
2568,
23352,
3247,
1862,
1125,
13,
12,
12,
24826,
465,
29892,
4853,
25379,
353,
14770,
29889,
1491,
26762,
580,
13,
12,
12,
29888,
29939,
3605,
29892,
4853,
29939,
3605,
353,
14770,
29889,
1491,
26762,
580,
13,
12,
12,
1725,
617,
29892,
4853,
29872,
617,
353,
14770,
29889,
1491,
26762,
580,
13,
12,
12,
1579,
546,
29892,
4853,
29880,
546,
353,
14770,
29889,
1491,
26762,
580,
13,
12,
12,
29888,
5721,
29892,
4853,
5721,
353,
14770,
29889,
1491,
26762,
580,
13,
12,
12,
29888,
11082,
29892,
4853,
11082,
353,
14770,
29889,
1491,
26762,
580,
13,
12,
12,
1341,
328,
29892,
4853,
3665,
353,
14770,
29889,
1491,
26762,
580,
13,
13,
12,
29937,
29890,
1144,
363,
599,
278,
9825,
468,
25402,
13,
12,
29940,
29890,
1144,
353,
29871,
29906,
29945,
13,
12,
8337,
1144,
353,
7442,
29889,
279,
927,
29898,
29900,
29892,
29896,
29900,
29892,
29871,
29900,
29889,
29896,
29892,
26688,
2433,
7411,
1495,
13,
12,
29939,
29890,
1144,
353,
7442,
29889,
279,
927,
29898,
29900,
29892,
29896,
29892,
29871,
29900,
29889,
29896,
29892,
26688,
2433,
7411,
1495,
13,
12,
774,
1144,
353,
7442,
29889,
279,
927,
29898,
29900,
29892,
29871,
29896,
29889,
29900,
29945,
29892,
29871,
29900,
29889,
29900,
29945,
29892,
26688,
2433,
7411,
1495,
13,
12,
22833,
29890,
1144,
353,
7442,
29889,
279,
927,
6278,
29906,
29892,
29871,
29896,
29900,
29892,
29871,
29900,
29889,
29945,
29892,
26688,
2433,
7411,
1495,
13,
12,
2585,
1144,
353,
7442,
29889,
279,
927,
29898,
29900,
29892,
29871,
29946,
29900,
29892,
29871,
29896,
29892,
26688,
2433,
7411,
1495,
13,
12,
11082,
29890,
1144,
353,
7442,
29889,
279,
927,
29898,
29896,
29896,
29892,
29871,
29906,
29945,
29892,
29871,
29896,
29892,
26688,
2433,
7411,
1495,
13,
12,
6050,
1144,
353,
7442,
29889,
279,
927,
29898,
29900,
29892,
29871,
29896,
29900,
29900,
29892,
29871,
29900,
29889,
29906,
29892,
26688,
2433,
7411,
1495,
13,
13,
12,
29937,
2204,
1331,
363,
278,
9825,
468,
25402,
13,
12,
29937,
3596,
13,
12,
29885,
29896,
29882,
3596,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
8337,
1144,
9601,
29896,
17531,
13,
12,
29939,
29882,
3596,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
29939,
29890,
1144,
9601,
29896,
17531,
13,
12,
14797,
3596,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
774,
1144,
9601,
29896,
17531,
13,
12,
29880,
561,
3596,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
22833,
29890,
1144,
9601,
29896,
17531,
13,
12,
12744,
3596,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
2585,
1144,
9601,
29896,
17531,
13,
12,
11082,
29882,
3596,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
11082,
29890,
1144,
9601,
29896,
17531,
13,
12,
19046,
3596,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
6050,
1144,
9601,
29896,
17531,
13,
12,
29937,
27928,
13,
12,
29885,
29896,
29882,
29949,
5824,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
8337,
1144,
9601,
29896,
17531,
13,
12,
29939,
29882,
29949,
5824,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
29939,
29890,
1144,
9601,
29896,
17531,
13,
12,
14797,
29949,
5824,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
774,
1144,
9601,
29896,
17531,
13,
12,
29880,
561,
29949,
5824,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
22833,
29890,
1144,
9601,
29896,
17531,
13,
12,
12744,
29949,
5824,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
2585,
1144,
9601,
29896,
17531,
13,
12,
11082,
29882,
29949,
5824,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
11082,
29890,
1144,
9601,
29896,
17531,
13,
12,
19046,
29949,
5824,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
6050,
1144,
9601,
29896,
17531,
13,
12,
29937,
4789,
957,
287,
13,
12,
29885,
29896,
29882,
4789,
353,
9657,
580,
13,
12,
29939,
29882,
4789,
353,
9657,
580,
13,
12,
14797,
4789,
353,
9657,
580,
13,
12,
29880,
561,
4789,
353,
9657,
580,
13,
12,
12744,
4789,
353,
9657,
580,
13,
12,
11082,
29882,
4789,
353,
9657,
580,
13,
12,
19046,
4789,
353,
9657,
580,
13,
12,
1454,
285,
297,
18094,
29901,
13,
12,
12,
29885,
29896,
29882,
4789,
29961,
29888,
29962,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
8337,
1144,
9601,
29896,
17531,
13,
12,
12,
29939,
29882,
4789,
29961,
29888,
29962,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
29939,
29890,
1144,
9601,
29896,
17531,
13,
12,
12,
14797,
4789,
29961,
29888,
29962,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
774,
1144,
9601,
29896,
17531,
13,
12,
12,
29880,
561,
4789,
29961,
29888,
29962,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
22833,
29890,
1144,
9601,
29896,
17531,
13,
12,
12,
12744,
4789,
29961,
29888,
29962,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
2585,
1144,
9601,
29896,
17531,
13,
12,
12,
11082,
29882,
4789,
29961,
29888,
29962,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
11082,
29890,
1144,
9601,
29896,
17531,
13,
12,
12,
19046,
4789,
29961,
29888,
29962,
353,
7442,
29889,
3298,
359,
29918,
4561,
29898,
6050,
1144,
9601,
29896,
17531,
13,
13,
12,
4717,
353,
5159,
13,
12,
6185,
353,
5159,
13,
12,
3757,
29943,
945,
353,
5159,
13,
12,
3757,
29940,
353,
5159,
13,
12,
1610,
29940,
353,
5159,
13,
12,
26290,
29940,
353,
5159,
13,
12,
1445,
29940,
353,
5159,
13,
12,
1445,
29949,
5824,
29940,
353,
5159,
13,
12,
1445,
4789,
29940,
353,
5159,
13,
13,
12,
497,
25500,
2288,
29874,
353,
5159,
13,
12,
26290,
25500,
2288,
29874,
353,
5159,
13,
12,
3757,
25500,
2288,
29874,
353,
5159,
13,
13,
12,
29937,
2391,
29879,
363,
3785,
322,
16882,
296,
2200,
537,
363,
11571,
29915,
29879,
19308,
2133,
24580,
13,
12,
29872,
617,
3596,
353,
5159,
13,
12,
29872,
617,
29949,
5824,
353,
5159,
13,
12,
29872,
617,
4789,
353,
5159,
13,
13,
12,
29886,
3596,
353,
5159,
13,
12,
29886,
29949,
5824,
353,
5159,
13,
12,
29886,
4789,
353,
5159,
13,
12,
29937,
5293,
544,
4977,
848,
19935,
363,
1438,
8857,
1363,
310,
3785,
5700,
2696,
472,
29871,
29896,
29900,
29900,
29900,
3841,
13,
13,
12,
29937,
3630,
19935,
304,
2436,
304,
2066,
2678,
29936,
29871,
29941,
2066,
363,
1269,
1014,
29899,
7323,
2785,
448,
9773,
4129,
304,
1438,
13,
12,
412,
617,
3596,
353,
10518,
29889,
17271,
29898,
13099,
353,
6024,
29872,
742,
525,
29886,
11287,
13,
12,
412,
617,
29949,
5824,
353,
10518,
29889,
17271,
29898,
13099,
353,
6024,
29872,
742,
525,
29886,
11287,
13,
12,
412,
617,
4789,
353,
10518,
29889,
17271,
29898,
13099,
353,
6024,
29872,
742,
525,
29886,
11287,
13,
13,
12,
29937,
6359,
297,
599,
278,
848,
322,
1207,
278,
9825,
468,
25402,
13,
12,
29881,
353,
376,
6904,
2080,
29918,
5325,
12975,
13,
12,
5325,
353,
2897,
29889,
1761,
3972,
29898,
29881,
29897,
13,
12,
1367,
29879,
353,
5159,
13,
12,
1454,
474,
29892,
285,
297,
26985,
29898,
5325,
1125,
13,
12,
12,
2158,
29898,
14486,
29898,
29875,
29914,
2435,
29898,
5325,
511,
29946,
511,
285,
29897,
13,
12,
12,
1579,
353,
934,
29918,
2435,
29898,
29881,
29974,
29888,
29897,
13,
12,
12,
361,
313,
1579,
6736,
29871,
29946,
1125,
13,
12,
12,
12,
29937,
949,
297,
278,
4839,
13,
12,
12,
12,
6672,
353,
10518,
29889,
949,
29918,
7638,
29898,
29881,
29974,
29888,
29892,
302,
5727,
29922,
29896,
29897,
13,
12,
13383,
4136,
2277,
13,
12,
29937,
8186,
3352,
7495,
14614,
18736,
15842,
6093,
350,
1177,
19926,
383,
4717,
9838,
746,
29299,
9825,
468,
25402,
13,
12,
13383,
4136,
29937,
13,
12,
12,
12,
29940,
4713,
353,
4839,
1839,
19594,
29924,
465,
2033,
29961,
29900,
16261,
29885,
6816,
273,
13,
12,
12,
12,
29937,
29940,
4713,
353,
29871,
29896,
29889,
13,
13,
12,
12,
12,
4717,
29889,
4397,
29898,
6672,
1839,
11746,
8942,
4717,
11287,
13,
12,
12,
12,
6185,
29889,
4397,
29898,
6672,
1839,
11746,
8942,
6185,
11287,
13,
13,
12,
12,
12,
29937,
949,
297,
1791,
310,
278,
934,
13,
12,
12,
12,
1272,
353,
10518,
29889,
949,
29918,
7638,
29898,
29881,
29974,
29888,
29892,
4839,
353,
29871,
29906,
467,
5589,
1056,
6278,
29929,
29929,
29929,
29897,
13,
12,
12,
12,
29878,
29943,
353,
29871,
29900,
29889,
13,
12,
12,
12,
29878,
29940,
353,
29871,
29900,
29889,
13,
12,
12,
12,
29940,
3757,
353,
29871,
29900,
29889,
13,
12,
12,
12,
29940,
26290,
353,
29871,
29900,
29889,
13,
12,
12,
12,
336,
29940,
353,
29871,
29900,
29889,
13,
12,
12,
12,
711,
29940,
353,
29871,
29900,
29889,
13,
12,
12,
12,
7241,
29940,
353,
29871,
29900,
29889,
13,
12,
12,
12,
29888,
601,
29940,
353,
29871,
29900,
29889,
13,
12,
12,
12,
28034,
29940,
353,
29871,
29900,
29889,
13,
12,
12,
12,
29940,
497,
29925,
2288,
29874,
353,
29871,
29900,
29889,
13,
12,
12,
12,
29940,
26290,
29925,
2288,
29874,
353,
29871,
29900,
29889,
13,
12,
12,
12,
29940,
3757,
29925,
2288,
29874,
353,
29871,
29900,
29889,
13,
12,
12,
12,
29940,
497,
353,
7431,
29898,
1272,
29889,
2248,
6802,
524,
29940,
555,
835,
275,
445,
1959,
29973,
313,
392,
278,
871,
2058,
306,
817,
304,
4226,
675,
7897,
13,
12,
12,
12,
558,
4977,
353,
848,
29889,
2029,
15625,
1272,
1839,
932,
19095,
6816,
273,
29918,
29878,
2033,
5277,
29871,
29896,
29929,
29889,
29945,
29897,
669,
313,
1272,
1839,
932,
19095,
6816,
273,
29918,
29878,
2033,
1405,
29871,
29896,
29945,
29889,
29947,
29897,
669,
313,
1272,
1839,
29886,
2033,
529,
29871,
29896,
29900,
29900,
29900,
29897,
669,
313,
1272,
1839,
29886,
2033,
1405,
29871,
29900,
29889,
29945,
4638,
13,
13,
12,
12,
12,
29937,
2401,
2548,
363,
11571,
13,
12,
12,
12,
29872,
617,
3596,
29889,
4397,
29898,
558,
4977,
1839,
29872,
13359,
5975,
29897,
13,
12,
12,
12,
29886,
3596,
29889,
4397,
29898,
558,
4977,
1839,
29886,
13359,
5975,
29897,
13,
13,
12,
12,
12,
29940,
497,
29925,
2288,
29874,
353,
7431,
29898,
558,
4977,
29889,
2248,
29897,
13,
12,
12,
12,
361,
313,
29940,
497,
6736,
405,
2576,
1125,
13,
12,
12,
12,
12,
29937,
3258,
9825,
468,
25402,
13,
12,
12,
12,
12,
29937,
3596,
13,
12,
12,
12,
12,
29885,
29896,
29882,
3596,
29900,
29892,
286,
29896,
29890,
353,
7442,
29889,
29882,
391,
13342,
29898,
1272,
3366,
29885,
29896,
12436,
289,
1144,
29922,
8337,
1144,
29897,
13,
12,
12,
12,
12,
29939,
29882,
3596,
29900,
29892,
3855,
29890,
353,
7442,
29889,
29882,
391,
13342,
29898,
1272,
3366,
29885,
29906,
3108,
29914,
1272,
3366,
29885,
29896,
12436,
289,
1144,
29922,
29939,
29890,
1144,
29897,
13,
12,
12,
12,
12,
14797,
3596,
29900,
29892,
18230,
353,
7442,
29889,
29882,
391,
13342,
29898,
1272,
3366,
29872,
12436,
289,
1144,
29922,
774,
1144,
29897,
13,
12,
12,
12,
12,
29880,
561,
3596,
29900,
29892,
301,
24381,
353,
7442,
29889,
29882,
391,
13342,
29898,
9302,
29889,
655,
29889,
1188,
29896,
29900,
29898,
1272,
3366,
29886,
16862,
5975,
467,
26940,
6278,
29929,
29929,
29929,
511,
289,
1144,
29922,
22833,
29890,
1144,
29897,
13,
12,
12,
12,
12,
12744,
3596,
29900,
29892,
4833,
353,
7442,
29889,
29882,
391,
13342,
29898,
1272,
3366,
29881,
12436,
289,
1144,
29922,
2585,
1144,
29897,
13,
12,
12,
12,
12,
11082,
29882,
3596,
29900,
29892,
2320,
29890,
353,
7442,
29889,
29882,
391,
13342,
29898,
1272,
3366,
932,
19095,
6816,
273,
29918,
29878,
12436,
289,
1144,
29922,
11082,
29890,
1144,
29897,
13,
12,
12,
12,
12,
19046,
3596,
29900,
29892,
364,
29890,
353,
7442,
29889,
29882,
391,
13342,
29898,
1272,
3366,
29878,
29906,
3108,
29914,
1272,
3366,
29878,
29896,
12436,
289,
1144,
29922,
6050,
1144,
29897,
13,
13,
12,
12,
12,
12,
361,
313,
1867,
2568,
23352,
3247,
1862,
1125,
13,
12,
12,
12,
12,
12,
1165,
25379,
29889,
10568,
29898,
29885,
29896,
29890,
29961,
29900,
13018,
29896,
1402,
286,
29896,
29882,
3596,
29900,
29914,
9302,
29889,
2083,
29898,
29885,
29896,
29882,
3596,
29900,
511,
2927,
2433,
8517,
742,
15595,
29922,
29900,
29889,
29896,
29897,
13,
12,
12,
12,
12,
12,
1165,
29939,
3605,
29889,
10568,
29898,
29939,
29890,
29961,
29900,
13018,
29896,
1402,
3855,
29882,
3596,
29900,
29914,
9302,
29889,
2083,
29898,
29939,
29882,
3596,
29900,
511,
2927,
2433,
8517,
742,
15595,
29922,
29900,
29889,
29896,
29897,
13,
12,
12,
12,
12,
12,
1165,
29872,
617,
29889,
10568,
29898,
774,
29961,
29900,
13018,
29896,
1402,
321,
29882,
3596,
29900,
29914,
9302,
29889,
2083,
29898,
14797,
3596,
29900,
511,
2927,
2433,
8517,
742,
15595,
29922,
29900,
29889,
29896,
29897,
13,
12,
12,
12,
12,
12,
1165,
29880,
546,
29889,
10568,
29898,
22833,
29890,
29961,
29900,
13018,
29896,
1402,
301,
561,
3596,
29900,
29914,
9302,
29889,
2083,
29898,
29880,
561,
3596,
29900,
511,
2927,
2433,
8517,
742,
15595,
29922,
29900,
29889,
29896,
29897,
13,
12,
12,
12,
12,
12,
1165,
5721,
29889,
10568,
29898,
2585,
29961,
29900,
13018,
29896,
1402,
270,
29882,
3596,
29900,
29914,
9302,
29889,
2083,
29898,
12744,
3596,
29900,
511,
2927,
2433,
8517,
742,
15595,
29922,
29900,
29889,
29896,
29897,
13,
12,
12,
12,
12,
12,
1165,
11082,
29889,
10568,
29898,
11082,
29890,
29961,
29900,
13018,
29896,
1402,
2320,
29882,
3596,
29900,
29914,
9302,
29889,
2083,
29898,
11082,
29882,
3596,
29900,
511,
2927,
2433,
8517,
742,
15595,
29922,
29900,
29889,
29896,
29897,
13,
12,
12,
12,
12,
12,
1165,
3665,
29889,
10568,
29898,
6050,
29961,
29900,
13018,
29896,
1402,
18178,
3596,
29900,
29914,
9302,
29889,
2083,
29898,
19046,
3596,
29900,
511,
2927,
2433,
8517,
742,
15595,
29922,
29900,
29889,
29896,
29897,
13,
13,
12,
12,
12,
12,
29937,
10149,
363,
278,
7581,
15958,
29892,
408,
263,
740,
310,
4158,
13,
12,
12,
12,
12,
18933,
29896,
353,
7442,
29889,
12765,
29898,
29885,
29896,
29890,
29897,
13,
12,
12,
12,
12,
29885,
29896,
791,
353,
286,
29896,
29890,
7503,
29899,
29896,
29962,
718,
270,
29885,
29896,
29914,
29906,
29889,
13,
12,
12,
12,
12,
14943,
353,
7442,
29889,
2083,
29898,
29885,
29896,
29882,
3596,
29900,
29914,
2435,
29898,
1272,
29889,
2248,
11877,
14943,
29943,
277,
29898,
29885,
29896,
791,
876,
13,
12,
12,
12,
12,
29937,
10149,
363,
278,
2898,
29899,
2695,
10452,
13,
12,
12,
12,
12,
4819,
29879,
353,
679,
4819,
29879,
29898,
6672,
1839,
19594,
29963,
2218,
29886,
13359,
309,
542,
29961,
29900,
14178,
348,
1169,
29889,
8848,
29914,
348,
1169,
29889,
29879,
467,
517,
29898,
348,
1169,
29889,
3250,
467,
1767,
13,
12,
12,
12,
12,
14943,
334,
29922,
390,
351,
19077,
29898,
9302,
29889,
1188,
29896,
29900,
29898,
4819,
29879,
511,
274,
2176,
353,
5852,
29897,
13,
12,
12,
12,
12,
2158,
703,
14943,
29892,
1963,
29879,
353,
9162,
285,
29890,
29892,
1963,
29879,
29897,
13,
12,
12,
12,
12,
29940,
4713,
334,
29922,
285,
29890,
13,
13,
12,
12,
12,
12,
12,
12,
12,
13,
12,
12,
12,
12,
29885,
29896,
29882,
3596,
4619,
286,
29896,
29882,
3596,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
29939,
29882,
3596,
4619,
3855,
29882,
3596,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
14797,
3596,
4619,
321,
29882,
3596,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
29880,
561,
3596,
4619,
301,
561,
3596,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
12744,
3596,
4619,
270,
29882,
3596,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
11082,
29882,
3596,
4619,
2320,
29882,
3596,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
19046,
3596,
4619,
18178,
3596,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
13,
12,
12,
12,
12,
29937,
29949,
5824,
13,
12,
12,
12,
12,
26290,
353,
848,
29889,
2029,
29961,
1272,
1839,
8547,
29924,
29918,
13171,
5971,
29928,
2033,
2804,
448,
29929,
29929,
29929,
29962,
13,
12,
12,
12,
12,
29940,
26290,
353,
7431,
29898,
26290,
29889,
2248,
29897,
13,
12,
12,
12,
12,
558,
4977,
29949,
5824,
353,
848,
29889,
2029,
15625,
1272,
1839,
932,
19095,
6816,
273,
29918,
29878,
2033,
5277,
29871,
29896,
29929,
29889,
29945,
29897,
669,
313,
1272,
1839,
932,
19095,
6816,
273,
29918,
29878,
2033,
1405,
29871,
29896,
29945,
29889,
29947,
29897,
669,
313,
1272,
1839,
29886,
2033,
529,
29871,
29896,
29900,
29900,
29900,
29897,
669,
313,
1272,
1839,
29886,
2033,
1405,
29900,
29889,
29945,
29897,
669,
313,
1272,
1839,
8547,
29924,
29918,
13171,
5971,
29928,
2033,
2804,
448,
29929,
29929,
29929,
4638,
13,
12,
12,
12,
12,
29940,
26290,
29925,
2288,
29874,
353,
7431,
29898,
558,
4977,
29949,
5824,
29889,
2248,
29897,
13,
13,
12,
12,
12,
12,
29937,
2401,
2548,
363,
11571,
29915,
29879,
2066,
13,
12,
12,
12,
12,
29872,
617,
29949,
5824,
29889,
4397,
29898,
558,
4977,
29949,
5824,
1839,
29872,
13359,
5975,
29897,
13,
12,
12,
12,
12,
29886,
29949,
5824,
29889,
4397,
29898,
558,
4977,
29949,
5824,
1839,
29886,
13359,
5975,
29897,
13,
13,
12,
12,
12,
12,
361,
313,
29940,
26290,
6736,
405,
2576,
1125,
13,
12,
12,
12,
12,
12,
29885,
29896,
29882,
29949,
5824,
29900,
29892,
286,
29896,
29890,
353,
7442,
29889,
29882,
391,
13342,
29898,
26290,
3366,
29885,
29896,
12436,
289,
1144,
29922,
8337,
1144,
29897,
13,
12,
12,
12,
12,
12,
29939,
29882,
29949,
5824,
29900,
29892,
3855,
29890,
353,
7442,
29889,
29882,
391,
13342,
29898,
26290,
3366,
29885,
29906,
3108,
29914,
26290,
3366,
29885,
29896,
12436,
289,
1144,
29922,
29939,
29890,
1144,
29897,
13,
12,
12,
12,
12,
12,
14797,
29949,
5824,
29900,
29892,
18230,
353,
7442,
29889,
29882,
391,
13342,
29898,
26290,
3366,
29872,
12436,
289,
1144,
29922,
774,
1144,
29897,
13,
12,
12,
12,
12,
12,
29880,
561,
29949,
5824,
29900,
29892,
301,
24381,
353,
7442,
29889,
29882,
391,
13342,
29898,
9302,
29889,
655,
29889,
1188,
29896,
29900,
29898,
26290,
3366,
29886,
16862,
5975,
467,
26940,
6278,
29929,
29929,
29929,
511,
289,
1144,
29922,
22833,
29890,
1144,
29897,
13,
12,
12,
12,
12,
12,
12744,
29949,
5824,
29900,
29892,
4833,
353,
7442,
29889,
29882,
391,
13342,
29898,
26290,
3366,
29881,
12436,
289,
1144,
29922,
2585,
1144,
29897,
13,
12,
12,
12,
12,
12,
11082,
29882,
29949,
5824,
29900,
29892,
2320,
29890,
353,
7442,
29889,
29882,
391,
13342,
29898,
26290,
3366,
932,
19095,
6816,
273,
29918,
29878,
12436,
289,
1144,
29922,
11082,
29890,
1144,
29897,
13,
12,
12,
12,
12,
12,
19046,
29949,
5824,
29900,
29892,
364,
29890,
353,
7442,
29889,
29882,
391,
13342,
29898,
26290,
3366,
29878,
29906,
3108,
29914,
26290,
3366,
29878,
29896,
12436,
289,
1144,
29922,
6050,
1144,
29897,
13,
12,
12,
12,
12,
12,
29885,
29896,
29882,
29949,
5824,
4619,
286,
29896,
29882,
29949,
5824,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
12,
29939,
29882,
29949,
5824,
4619,
3855,
29882,
29949,
5824,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
12,
14797,
29949,
5824,
4619,
321,
29882,
29949,
5824,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
12,
29880,
561,
29949,
5824,
4619,
301,
561,
29949,
5824,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
12,
12744,
29949,
5824,
4619,
270,
29882,
29949,
5824,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
12,
11082,
29882,
29949,
5824,
4619,
2320,
29882,
29949,
5824,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
12,
19046,
29949,
5824,
4619,
18178,
29949,
5824,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
13,
12,
12,
12,
12,
12,
29937,
4789,
13,
12,
12,
12,
12,
12,
3757,
1523,
29890,
1312,
353,
10518,
29889,
17271,
580,
13,
12,
12,
12,
12,
12,
558,
4977,
4789,
1523,
29890,
1312,
353,
10518,
29889,
17271,
580,
13,
12,
12,
12,
12,
12,
1454,
977,
29873,
297,
18094,
29901,
13,
12,
12,
12,
12,
12,
12,
1989,
353,
977,
29873,
23097,
29931,
1799,
29918,
13171,
5971,
29928,
29915,
13,
12,
12,
12,
12,
12,
12,
361,
313,
1777,
29873,
1275,
525,
497,
29374,
13,
12,
12,
12,
12,
12,
12,
12,
1989,
353,
525,
8547,
29924,
29918,
13171,
5971,
29928,
29915,
13,
12,
12,
12,
12,
12,
12,
8159,
29925,
353,
6425,
29898,
1272,
29961,
1989,
29962,
448,
848,
1839,
29886,
2033,
6802,
1272,
1839,
29886,
2033,
13,
12,
12,
12,
12,
12,
12,
24498,
29925,
353,
6425,
29898,
1272,
29961,
1989,
29962,
448,
29871,
29900,
29889,
29945,
29930,
1272,
1839,
29886,
2033,
6802,
29898,
29900,
29889,
29945,
29930,
1272,
1839,
29886,
11287,
13,
12,
12,
12,
12,
12,
12,
7516,
625,
29925,
353,
6425,
29898,
1272,
29961,
1989,
29962,
448,
29871,
29906,
5575,
1272,
1839,
29886,
2033,
6802,
29898,
29906,
5575,
1272,
1839,
29886,
11287,
13,
12,
12,
12,
12,
12,
12,
3757,
353,
848,
29889,
2029,
15625,
1272,
29961,
1989,
29962,
2804,
448,
29929,
29929,
29929,
29897,
669,
313,
313,
8159,
29925,
529,
349,
7582,
29897,
891,
313,
24498,
29925,
529,
349,
7582,
29897,
891,
313,
7516,
625,
29925,
529,
349,
7582,
28166,
13,
12,
12,
12,
12,
12,
12,
558,
4977,
4789,
353,
848,
29889,
2029,
15625,
1272,
1839,
932,
19095,
6816,
273,
29918,
29878,
2033,
5277,
29871,
29896,
29929,
29889,
29945,
29897,
669,
313,
1272,
1839,
932,
19095,
6816,
273,
29918,
29878,
2033,
1405,
29896,
29945,
29889,
29947,
29897,
669,
313,
1272,
1839,
29886,
2033,
529,
29871,
29896,
29900,
29900,
29900,
29897,
669,
313,
1272,
1839,
29886,
2033,
1405,
29900,
29889,
29945,
29897,
669,
313,
1272,
1839,
8547,
29924,
29918,
13171,
5971,
29928,
2033,
2804,
448,
29929,
29929,
29929,
29897,
669,
313,
313,
8159,
29925,
529,
349,
7582,
29897,
891,
313,
24498,
29925,
529,
349,
7582,
29897,
891,
313,
7516,
625,
29925,
529,
349,
7582,
28166,
13,
12,
12,
12,
12,
12,
12,
29940,
3757,
353,
7431,
29898,
3757,
29889,
2248,
29897,
13,
13,
12,
12,
12,
12,
12,
12,
29937,
29902,
29915,
29881,
763,
304,
3633,
363,
599,
18094,
1244,
304,
505,
901,
16232,
3694,
13,
12,
12,
12,
12,
12,
12,
3757,
1523,
29890,
1312,
353,
1162,
1523,
29890,
1312,
29889,
4397,
29898,
3757,
29897,
13,
12,
12,
12,
12,
12,
12,
558,
4977,
4789,
1523,
29890,
1312,
353,
544,
4977,
4789,
1523,
29890,
1312,
29889,
4397,
29898,
558,
4977,
4789,
29897,
13,
13,
12,
12,
12,
12,
12,
12,
29937,
2921,
292,
304,
671,
544,
4977,
4789,
1523,
29890,
1312,
363,
16882,
29899,
29886,
24580,
304,
3633,
363,
599,
18094,
13,
12,
12,
12,
12,
12,
12,
29872,
617,
4789,
29889,
4397,
29898,
558,
4977,
4789,
1839,
29872,
13359,
5975,
29897,
13,
12,
12,
12,
12,
12,
12,
29886,
4789,
29889,
4397,
29898,
558,
4977,
4789,
1839,
29886,
13359,
5975,
29897,
13,
13,
13,
12,
12,
12,
12,
12,
12,
361,
313,
1777,
29873,
1275,
525,
497,
29374,
13,
12,
12,
12,
12,
12,
12,
12,
3757,
1523,
29890,
1312,
29889,
8865,
29918,
20908,
15815,
29898,
262,
6689,
29922,
5574,
29897,
13,
12,
12,
12,
12,
12,
12,
12,
558,
4977,
4789,
1523,
29890,
1312,
29889,
8865,
29918,
20908,
15815,
29898,
262,
6689,
29922,
5574,
29897,
13,
13,
12,
12,
12,
12,
12,
12,
361,
313,
29940,
3757,
6736,
405,
2576,
1125,
13,
12,
12,
12,
12,
12,
12,
12,
29885,
29896,
29882,
4789,
29900,
29892,
286,
29896,
29890,
353,
7442,
29889,
29882,
391,
13342,
29898,
3757,
3366,
29885,
29896,
12436,
289,
1144,
29922,
8337,
1144,
29897,
13,
12,
12,
12,
12,
12,
12,
12,
29939,
29882,
4789,
29900,
29892,
3855,
29890,
353,
7442,
29889,
29882,
391,
13342,
29898,
3757,
3366,
29885,
29906,
3108,
29914,
3757,
3366,
29885,
29896,
12436,
289,
1144,
29922,
29939,
29890,
1144,
29897,
13,
12,
12,
12,
12,
12,
12,
12,
14797,
4789,
29900,
29892,
18230,
353,
7442,
29889,
29882,
391,
13342,
29898,
3757,
3366,
29872,
12436,
289,
1144,
29922,
774,
1144,
29897,
13,
12,
12,
12,
12,
12,
12,
12,
29880,
561,
4789,
29900,
29892,
301,
24381,
353,
7442,
29889,
29882,
391,
13342,
29898,
9302,
29889,
655,
29889,
1188,
29896,
29900,
29898,
3757,
3366,
29886,
16862,
5975,
467,
26940,
6278,
29929,
29929,
29929,
511,
289,
1144,
29922,
22833,
29890,
1144,
29897,
13,
12,
12,
12,
12,
12,
12,
12,
12744,
4789,
29900,
29892,
4833,
353,
7442,
29889,
29882,
391,
13342,
29898,
3757,
3366,
29881,
12436,
289,
1144,
29922,
2585,
1144,
29897,
13,
12,
12,
12,
12,
12,
12,
12,
11082,
29882,
4789,
29900,
29892,
2320,
29890,
353,
7442,
29889,
29882,
391,
13342,
29898,
3757,
3366,
932,
19095,
6816,
273,
29918,
29878,
12436,
289,
1144,
29922,
11082,
29890,
1144,
29897,
13,
12,
12,
12,
12,
12,
12,
12,
19046,
4789,
29900,
29892,
364,
29890,
353,
7442,
29889,
29882,
391,
13342,
29898,
3757,
3366,
29878,
29906,
3108,
29914,
3757,
3366,
29878,
29896,
12436,
289,
1144,
29922,
6050,
1144,
29897,
13,
12,
12,
12,
12,
12,
12,
12,
29885,
29896,
29882,
4789,
29961,
1777,
29873,
29962,
4619,
286,
29896,
29882,
4789,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
12,
12,
12,
29939,
29882,
4789,
29961,
1777,
29873,
29962,
4619,
3855,
29882,
4789,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
12,
12,
12,
14797,
4789,
29961,
1777,
29873,
29962,
4619,
321,
29882,
4789,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
12,
12,
12,
29880,
561,
4789,
29961,
1777,
29873,
29962,
4619,
301,
561,
4789,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
12,
12,
12,
12744,
4789,
29961,
1777,
29873,
29962,
4619,
270,
29882,
4789,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
12,
12,
12,
11082,
29882,
4789,
29961,
1777,
29873,
29962,
4619,
2320,
29882,
4789,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
12,
12,
12,
19046,
4789,
29961,
1777,
29873,
29962,
4619,
18178,
4789,
29900,
29914,
29940,
497,
29930,
29940,
4713,
13,
13,
12,
12,
12,
12,
12,
12,
12,
29937,
1454,
278,
286,
3028,
705,
680,
13,
12,
12,
12,
12,
12,
12,
12,
361,
313,
1777,
29873,
1275,
525,
497,
29374,
13,
12,
12,
12,
12,
12,
12,
12,
12,
29940,
3757,
353,
7431,
29898,
3757,
1523,
29890,
1312,
29889,
2248,
29897,
13,
12,
12,
12,
12,
12,
12,
12,
12,
29878,
29943,
353,
405,
3757,
29914,
29940,
497,
13,
12,
12,
12,
12,
12,
12,
12,
12,
29878,
29940,
353,
405,
3757,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
12,
12,
12,
12,
336,
29940,
353,
405,
4713,
13,
12,
12,
12,
12,
12,
12,
12,
12,
711,
29940,
353,
15706,
29879,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
12,
12,
12,
12,
7241,
29940,
353,
405,
497,
13,
12,
12,
12,
12,
12,
12,
12,
12,
29888,
601,
29940,
353,
15706,
29879,
13,
12,
12,
12,
12,
12,
12,
12,
12,
28034,
29940,
353,
405,
3757,
13,
13,
12,
12,
12,
12,
12,
12,
12,
12,
29940,
3757,
29925,
2288,
29874,
353,
7431,
29898,
558,
4977,
4789,
1523,
29890,
1312,
29889,
2248,
29897,
13,
12,
12,
12,
12,
12,
12,
12,
12,
29940,
3757,
29925,
2288,
29874,
353,
405,
3757,
29925,
2288,
29874,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
12,
12,
12,
12,
29940,
26290,
29925,
2288,
29874,
353,
15706,
29879,
29925,
2288,
29874,
29914,
29940,
497,
29930,
29940,
4713,
13,
12,
12,
12,
12,
12,
12,
12,
12,
29940,
497,
29925,
2288,
29874,
353,
405,
497,
29925,
2288,
29874,
29914,
29940,
497,
29930,
29940,
4713,
12,
12,
13,
13,
13,
13,
12,
12,
12,
3757,
29943,
945,
29889,
4397,
29898,
29878,
29943,
29897,
13,
12,
12,
12,
3757,
29940,
29889,
4397,
29898,
29878,
29940,
29897,
13,
12,
12,
12,
1610,
29940,
29889,
4397,
29898,
336,
29940,
29897,
13,
12,
12,
12,
26290,
29940,
29889,
4397,
29898,
711,
29940,
29897,
13,
12,
12,
12,
1445,
29940,
29889,
4397,
29898,
7241,
29940,
29897,
13,
12,
12,
12,
1445,
29949,
5824,
29940,
29889,
4397,
29898,
29888,
601,
29940,
29897,
13,
12,
12,
12,
1445,
4789,
29940,
29889,
4397,
29898,
28034,
29940,
29897,
13,
12,
12,
12,
497,
25500,
2288,
29874,
29889,
4397,
29898,
29940,
497,
29925,
2288,
29874,
29897,
13,
12,
12,
12,
26290,
25500,
2288,
29874,
29889,
4397,
29898,
29940,
26290,
29925,
2288,
29874,
29897,
13,
12,
12,
12,
3757,
25500,
2288,
29874,
29889,
4397,
29898,
29940,
3757,
29925,
2288,
29874,
29897,
13,
12,
12,
12,
29937,
2158,
29898,
9302,
29889,
2083,
29898,
29880,
561,
4789,
511,
7442,
29889,
2083,
29898,
3757,
29940,
511,
7442,
29889,
2083,
29898,
29880,
561,
4789,
6802,
9302,
29889,
2083,
29898,
3757,
29940,
511,
7442,
29889,
2083,
29898,
29880,
561,
4789,
29900,
511,
405,
3757,
29892,
7442,
29889,
2083,
29898,
29880,
561,
4789,
29900,
6802,
29940,
3757,
29892,
7442,
29889,
2083,
29898,
29880,
561,
29949,
5824,
511,
7442,
29889,
2083,
29898,
26290,
29940,
511,
7442,
29889,
2083,
29898,
29880,
561,
29949,
5824,
6802,
9302,
29889,
2083,
29898,
26290,
29940,
876,
13,
13,
12,
29937,
23924,
2579,
1218,
282,
322,
16882,
8857,
13,
12,
29872,
617,
3596,
353,
7442,
29889,
535,
29883,
2579,
403,
29898,
29872,
617,
3596,
29897,
13,
12,
29872,
617,
29949,
5824,
353,
7442,
29889,
535,
29883,
2579,
403,
29898,
29872,
617,
29949,
5824,
29897,
13,
12,
29872,
617,
4789,
353,
7442,
29889,
535,
29883,
2579,
403,
29898,
29872,
617,
4789,
29897,
13,
13,
12,
29886,
3596,
353,
7442,
29889,
535,
29883,
2579,
403,
29898,
29886,
3596,
29897,
13,
12,
29886,
29949,
5824,
353,
7442,
29889,
535,
29883,
2579,
403,
29898,
29886,
29949,
5824,
29897,
13,
12,
29886,
4789,
353,
7442,
29889,
535,
29883,
2579,
403,
29898,
29886,
4789,
29897,
13,
13,
13,
12,
29937,
1596,
877,
29923,
617,
8857,
29901,
742,
16882,
3596,
29892,
16882,
29949,
5824,
29892,
16882,
4789,
29897,
13,
12,
29937,
1596,
877,
29925,
8857,
29901,
742,
282,
3596,
29892,
282,
29949,
5824,
29892,
282,
4789,
29897,
13,
12,
29937,
2401,
2548,
8857,
411,
599,
278,
282,
29914,
29872,
617,
1819,
304,
1749,
848,
19935,
13,
12,
29937,
2178,
12205,
13,
12,
412,
617,
3596,
1839,
29872,
2033,
353,
16882,
3596,
13,
12,
412,
617,
3596,
1839,
29886,
2033,
353,
282,
3596,
13,
13,
12,
29937,
20215,
12205,
13,
12,
412,
617,
29949,
5824,
1839,
29872,
2033,
353,
16882,
29949,
5824,
13,
12,
412,
617,
29949,
5824,
1839,
29886,
2033,
353,
282,
29949,
5824,
13,
13,
12,
29937,
3599,
957,
287,
12205,
13,
12,
412,
617,
4789,
1839,
29872,
2033,
353,
16882,
4789,
13,
12,
412,
617,
4789,
1839,
29886,
2033,
353,
282,
4789,
13,
13,
12,
29937,
1596,
877,
15790,
3630,
19935,
29901,
742,
1236,
617,
3596,
29892,
1236,
617,
29949,
5824,
29892,
1236,
617,
4789,
29897,
13,
12,
29937,
1596,
29898,
412,
617,
4789,
29889,
13099,
29897,
13,
12,
13,
12,
29937,
29871,
29941,
5497,
775,
16161,
304,
10483,
313,
20166,
29914,
8766,
29892,
2362,
5570,
29914,
1054,
2209,
375,
29892,
11660,
8497,
29914,
1217,
11660,
8497,
29897,
13,
12,
412,
617,
3596,
29889,
517,
29918,
7638,
877,
6904,
412,
617,
29914,
497,
29899,
29924,
29953,
29955,
29933,
29940,
29899,
29872,
617,
29899,
29886,
29889,
7638,
742,
4839,
353,
6024,
29872,
742,
525,
29886,
11287,
13,
12,
412,
617,
29949,
5824,
29889,
517,
29918,
7638,
877,
6904,
412,
617,
29914,
26290,
29899,
29924,
29953,
29955,
29933,
29940,
29899,
29872,
617,
29899,
29886,
29889,
7638,
742,
4839,
353,
6024,
29872,
742,
525,
29886,
11287,
13,
12,
412,
617,
4789,
29889,
517,
29918,
7638,
877,
6904,
412,
617,
29914,
3757,
29899,
29924,
29953,
29955,
29933,
29940,
29899,
29872,
617,
29899,
29886,
29889,
7638,
742,
4839,
353,
6024,
29872,
742,
525,
29886,
11287,
13,
13,
12,
29937,
5317,
322,
4078,
278,
9825,
468,
25402,
13,
12,
7620,
29950,
391,
29898,
29885,
29896,
29882,
3596,
29892,
286,
29896,
29882,
29949,
5824,
29892,
286,
29896,
29882,
4789,
29892,
286,
29896,
29890,
29892,
525,
29885,
29896,
313,
29924,
2929,
279,
29897,
742,
525,
25752,
8547,
1254,
29918,
29885,
29896,
29882,
391,
1495,
13,
12,
7620,
29950,
391,
29898,
29939,
29882,
3596,
29892,
3855,
29882,
29949,
5824,
29892,
3855,
29882,
4789,
29892,
3855,
29890,
29892,
525,
29939,
313,
29885,
29906,
29914,
29885,
29896,
29897,
742,
525,
25752,
8547,
1254,
29918,
29939,
29882,
391,
1495,
13,
12,
7620,
29950,
391,
29898,
14797,
3596,
29892,
321,
29882,
29949,
5824,
29892,
321,
29882,
4789,
29892,
18230,
29892,
525,
29872,
742,
525,
25752,
8547,
1254,
29918,
14797,
391,
1495,
13,
12,
7620,
29950,
391,
29898,
29880,
561,
3596,
29892,
301,
561,
29949,
5824,
29892,
301,
561,
4789,
29892,
301,
24381,
29892,
525,
1188,
29898,
29925,
518,
16700,
2314,
742,
525,
25752,
8547,
1254,
29918,
29880,
561,
391,
1495,
13,
12,
7620,
29950,
391,
29898,
12744,
3596,
29892,
270,
29882,
29949,
5824,
29892,
270,
29882,
4789,
29892,
4833,
29892,
525,
29881,
313,
29895,
6739,
29897,
742,
525,
25752,
8547,
1254,
29918,
12744,
391,
1495,
13,
12,
7620,
29950,
391,
29898,
11082,
29882,
3596,
29892,
2320,
29882,
29949,
5824,
29892,
2320,
29882,
4789,
29892,
2320,
29890,
29892,
525,
11082,
742,
525,
25752,
8547,
1254,
29918,
11082,
29882,
391,
1495,
13,
12,
7620,
29950,
391,
29898,
19046,
3596,
29892,
18178,
29949,
5824,
29892,
18178,
4789,
29892,
364,
29890,
29892,
525,
29878,
29906,
29914,
29878,
29896,
742,
525,
25752,
8547,
1254,
29918,
19046,
391,
1495,
13,
13,
13,
12,
29937,
5675,
278,
286,
3028,
705,
680,
13,
12,
1111,
4339,
353,
16572,
7967,
536,
29898,
4717,
29892,
3826,
29892,
5190,
7607,
348,
1169,
29889,
12163,
929,
29892,
10340,
29889,
12163,
929,
511,
2557,
2433,
293,
2288,
1495,
12,
13,
12,
29880,
29954,
284,
353,
1302,
4339,
29889,
23014,
17911,
29889,
29880,
29889,
6312,
29918,
271,
29898,
29896,
29947,
29900,
5575,
348,
1169,
29889,
12163,
929,
467,
12163,
929,
13,
12,
29890,
29954,
284,
353,
1302,
4339,
29889,
23014,
17911,
29889,
29890,
29889,
6312,
29918,
271,
29898,
29896,
29947,
29900,
5575,
348,
1169,
29889,
12163,
929,
467,
12163,
929,
13,
12,
4717,
6312,
353,
1302,
4339,
29889,
336,
29889,
6312,
29918,
271,
29898,
29896,
29947,
29900,
5575,
348,
1169,
29889,
12163,
929,
467,
12163,
929,
13,
12,
6185,
6312,
353,
1302,
4339,
29889,
7099,
29889,
6312,
29918,
271,
29898,
29896,
29947,
29900,
5575,
348,
1169,
29889,
12163,
929,
467,
12163,
929,
13,
13,
12,
29888,
29892,
4853,
353,
14770,
29889,
1491,
26762,
29898,
1491,
5317,
29918,
11022,
3790,
29915,
771,
6929,
2396,
376,
29885,
3028,
705,
680,
10758,
2537,
2311,
7607,
29947,
29892,
29945,
876,
13,
12,
1165,
29889,
7720,
29898,
5574,
29897,
13,
12,
29937,
1165,
29889,
842,
29918,
29916,
1643,
29898,
29878,
29908,
29938,
29880,
29938,
613,
5657,
2311,
29922,
29896,
29953,
29897,
13,
12,
29937,
1165,
29889,
842,
29918,
29891,
1643,
29898,
29878,
29908,
29938,
29890,
29938,
613,
5657,
2311,
29922,
29896,
29953,
29897,
13,
12,
29937,
828,
29893,
353,
4853,
29889,
1557,
2620,
29898,
29880,
29954,
284,
29889,
336,
955,
580,
29930,
9302,
29889,
1631,
29914,
29896,
29947,
29900,
1696,
289,
29954,
284,
29889,
336,
955,
580,
29930,
9302,
29889,
1631,
29914,
29896,
29947,
29900,
1696,
274,
29922,
9302,
29889,
1188,
29896,
29900,
29898,
9302,
29889,
2378,
29898,
3757,
29943,
945,
11877,
29896,
29900,
29900,
9774,
274,
1958,
2433,
2405,
333,
275,
29918,
29878,
742,
269,
353,
29871,
29946,
29897,
13,
12,
1165,
29889,
842,
29918,
29916,
1643,
703,
4717,
613,
5657,
2311,
29922,
29896,
29953,
29897,
13,
12,
1165,
29889,
842,
29918,
29891,
1643,
703,
6185,
613,
5657,
2311,
29922,
29896,
29953,
29897,
13,
12,
828,
29893,
353,
4853,
29889,
1557,
2620,
29898,
9302,
29889,
2378,
29898,
4717,
6312,
467,
336,
955,
580,
29930,
9302,
29889,
1631,
29914,
29896,
29947,
29900,
1696,
7442,
29889,
2378,
29898,
6185,
6312,
467,
336,
955,
580,
29930,
9302,
29889,
1631,
29914,
29896,
29947,
29900,
1696,
274,
29922,
9302,
29889,
2378,
29898,
3757,
29943,
945,
11877,
29896,
29900,
29900,
1696,
274,
1958,
2433,
2405,
333,
275,
29918,
29878,
742,
269,
353,
29871,
29946,
29897,
13,
12,
29883,
1646,
353,
285,
29889,
2780,
1646,
29898,
828,
29893,
29892,
14653,
682,
29922,
29900,
29889,
29955,
29897,
13,
12,
29883,
1646,
29889,
842,
29918,
1643,
29898,
29878,
29915,
29995,
24776,
1495,
13,
12,
29888,
29889,
7620,
1003,
877,
6904,
26762,
22208,
29871,
718,
525,
29885,
3028,
705,
680,
29918,
29886,
312,
29889,
5140,
742,
4830,
2433,
5140,
742,
289,
1884,
29918,
262,
6609,
353,
525,
29873,
523,
1495,
13,
13,
12,
29888,
29892,
4853,
353,
14770,
29889,
1491,
26762,
29898,
1491,
5317,
29918,
11022,
3790,
29915,
771,
6929,
2396,
376,
29885,
3028,
705,
680,
10758,
2537,
2311,
7607,
29947,
29892,
29945,
876,
13,
12,
1165,
29889,
7720,
29898,
5574,
29897,
13,
12,
29937,
1165,
29889,
842,
29918,
29916,
1643,
29898,
29878,
29908,
29938,
29880,
29938,
613,
5657,
2311,
29922,
29896,
29953,
29897,
13,
12,
29937,
1165,
29889,
842,
29918,
29891,
1643,
29898,
29878,
29908,
29938,
29890,
29938,
613,
5657,
2311,
29922,
29896,
29953,
29897,
13,
12,
29937,
828,
29893,
353,
4853,
29889,
1557,
2620,
29898,
29880,
29954,
284,
29889,
336,
955,
580,
29930,
9302,
29889,
1631,
29914,
29896,
29947,
29900,
1696,
289,
29954,
284,
29889,
336,
955,
580,
29930,
9302,
29889,
1631,
29914,
29896,
29947,
29900,
1696,
274,
29922,
9302,
29889,
1188,
29896,
29900,
29898,
9302,
29889,
2378,
29898,
3757,
29940,
8243,
274,
1958,
2433,
2405,
333,
275,
29918,
29878,
742,
269,
353,
29871,
29946,
29897,
13,
12,
1165,
29889,
842,
29918,
29916,
1643,
703,
4717,
613,
5657,
2311,
29922,
29896,
29953,
29897,
13,
12,
1165,
29889,
842,
29918,
29891,
1643,
703,
6185,
613,
5657,
2311,
29922,
29896,
29953,
29897,
13,
12,
828,
29893,
353,
4853,
29889,
1557,
2620,
29898,
9302,
29889,
2378,
29898,
4717,
6312,
467,
336,
955,
580,
29930,
9302,
29889,
1631,
29914,
29896,
29947,
29900,
1696,
7442,
29889,
2378,
29898,
6185,
6312,
467,
336,
955,
580,
29930,
9302,
29889,
1631,
29914,
29896,
29947,
29900,
1696,
274,
29922,
9302,
29889,
1188,
29896,
29900,
29898,
9302,
29889,
2378,
29898,
3757,
29940,
8243,
274,
1958,
2433,
2405,
333,
275,
29918,
29878,
742,
269,
353,
29871,
29946,
29897,
13,
12,
29883,
1646,
353,
285,
29889,
2780,
1646,
29898,
828,
29893,
29892,
14653,
682,
29922,
29900,
29889,
29955,
29897,
13,
12,
29883,
1646,
29889,
842,
29918,
1643,
29898,
29878,
29915,
1188,
29896,
29900,
29898,
29940,
29897,
24776,
1495,
13,
12,
29888,
29889,
7620,
1003,
877,
6904,
26762,
22208,
29871,
718,
525,
29885,
3028,
705,
680,
29918,
29940,
29889,
5140,
742,
4830,
2433,
5140,
742,
289,
1884,
29918,
262,
6609,
353,
525,
29873,
523,
1495,
13,
13,
12,
361,
313,
1867,
2568,
23352,
3247,
1862,
1125,
13,
12,
12,
24826,
465,
29889,
7620,
1003,
877,
6904,
26762,
22208,
29871,
718,
525,
25379,
8493,
497,
29889,
5140,
742,
4830,
2433,
5140,
742,
289,
1884,
29918,
262,
6609,
353,
525,
29873,
523,
1495,
13,
12,
12,
29888,
29939,
3605,
29889,
7620,
1003,
877,
6904,
26762,
22208,
29871,
718,
525,
29939,
8493,
497,
29889,
5140,
742,
4830,
2433,
5140,
742,
289,
1884,
29918,
262,
6609,
353,
525,
29873,
523,
1495,
13,
12,
12,
1725,
617,
29889,
7620,
1003,
877,
6904,
26762,
22208,
29871,
718,
525,
29872,
617,
8493,
497,
29889,
5140,
742,
4830,
2433,
5140,
742,
289,
1884,
29918,
262,
6609,
353,
525,
29873,
523,
1495,
13,
12,
12,
1579,
546,
29889,
7620,
1003,
877,
6904,
26762,
22208,
29871,
718,
525,
29880,
546,
8493,
497,
29889,
5140,
742,
4830,
2433,
5140,
742,
289,
1884,
29918,
262,
6609,
353,
525,
29873,
523,
1495,
13,
12,
12,
29888,
5721,
29889,
7620,
1003,
877,
6904,
26762,
22208,
29871,
718,
525,
5721,
8493,
497,
29889,
5140,
742,
4830,
2433,
5140,
742,
289,
1884,
29918,
262,
6609,
353,
525,
29873,
523,
1495,
13,
12,
12,
29888,
11082,
29889,
7620,
1003,
877,
6904,
26762,
22208,
29871,
718,
525,
11082,
8493,
497,
29889,
5140,
742,
4830,
2433,
5140,
742,
289,
1884,
29918,
262,
6609,
353,
525,
29873,
523,
1495,
13,
12,
12,
1341,
328,
29889,
7620,
1003,
877,
6904,
26762,
22208,
29871,
718,
525,
3665,
8493,
497,
29889,
5140,
742,
4830,
2433,
5140,
742,
289,
1884,
29918,
262,
6609,
353,
525,
29873,
523,
1495,
13,
13,
12,
2158,
703,
13383,
2277,
29937,
1159,
13,
12,
2158,
703,
4537,
310,
9016,
4314,
297,
1881,
2066,
313,
1610,
29892,
1480,
1125,
613,
9302,
29889,
2083,
29898,
1445,
29940,
511,
7442,
29889,
1188,
29896,
29900,
29898,
9302,
29889,
2083,
29898,
1445,
29940,
4961,
13,
12,
2158,
703,
4537,
310,
9016,
4314,
297,
9528,
411,
26989,
1028,
29891,
313,
1610,
29892,
1480,
1125,
613,
9302,
29889,
2083,
29898,
1445,
29949,
5824,
29940,
511,
7442,
29889,
1188,
29896,
29900,
29898,
9302,
29889,
2083,
29898,
1445,
29949,
5824,
29940,
4961,
13,
12,
2158,
703,
4537,
310,
9016,
4314,
297,
24776,
411,
26989,
1028,
29891,
313,
1610,
29892,
1480,
1125,
613,
9302,
29889,
2083,
29898,
1445,
4789,
29940,
511,
7442,
29889,
1188,
29896,
29900,
29898,
9302,
29889,
2083,
29898,
1445,
4789,
29940,
4961,
13,
12,
2158,
703,
3757,
957,
287,
29914,
711,
12114,
29930,
29896,
29900,
29900,
411,
26989,
1028,
29891,
29901,
613,
9302,
29889,
2083,
29898,
1445,
4789,
29940,
6802,
9302,
29889,
2083,
29898,
1445,
29949,
5824,
29940,
11877,
29896,
29900,
29900,
1846,
13,
12,
2158,
703,
13383,
2277,
29937,
1159,
13,
12,
2158,
703,
7827,
297,
4559,
313,
1610,
29892,
1480,
1125,
613,
9302,
29889,
2083,
29898,
1610,
29940,
511,
7442,
29889,
1188,
29896,
29900,
29898,
9302,
29889,
2083,
29898,
1610,
29940,
4961,
13,
12,
2158,
703,
7827,
25209,
313,
1610,
29892,
1480,
1125,
613,
9302,
29889,
2083,
29898,
26290,
29940,
511,
7442,
29889,
1188,
29896,
29900,
29898,
9302,
29889,
2083,
29898,
26290,
29940,
4961,
13,
12,
2158,
703,
7827,
24776,
313,
1610,
29892,
1480,
1125,
613,
9302,
29889,
2083,
29898,
3757,
29940,
511,
7442,
29889,
1188,
29896,
29900,
29898,
9302,
29889,
2083,
29898,
3757,
29940,
4961,
13,
12,
2158,
703,
3757,
957,
287,
29914,
711,
12114,
29930,
29896,
29900,
29900,
29901,
613,
9302,
29889,
2083,
29898,
3757,
29940,
6802,
9302,
29889,
2083,
29898,
26290,
29940,
11877,
29896,
29900,
29900,
1846,
13,
12,
2158,
703,
13383,
2277,
29937,
1159,
13,
12,
2158,
703,
7827,
297,
1588,
4977,
29871,
29896,
29945,
29889,
29947,
29966,
29878,
29966,
29896,
29929,
29889,
29945,
349,
29966,
29896,
29900,
29900,
29900,
29881,
4559,
313,
1610,
29892,
1480,
1125,
613,
9302,
29889,
2083,
29898,
497,
25500,
2288,
29874,
511,
7442,
29889,
1188,
29896,
29900,
29898,
9302,
29889,
2083,
29898,
497,
25500,
2288,
29874,
4961,
13,
12,
2158,
703,
7827,
25209,
297,
1588,
4977,
29871,
29896,
29945,
29889,
29947,
29966,
29878,
29966,
29896,
29929,
29889,
29945,
349,
29966,
29896,
29900,
29900,
29900,
29881,
4559,
313,
1610,
29892,
1480,
1125,
613,
9302,
29889,
2083,
29898,
26290,
25500,
2288,
29874,
511,
7442,
29889,
1188,
29896,
29900,
29898,
9302,
29889,
2083,
29898,
26290,
25500,
2288,
29874,
4961,
13,
12,
2158,
703,
7827,
24776,
297,
1588,
4977,
29871,
29896,
29945,
29889,
29947,
29966,
29878,
29966,
29896,
29929,
29889,
29945,
349,
29966,
29896,
29900,
29900,
29900,
29881,
4559,
313,
1610,
29892,
1480,
1125,
613,
9302,
29889,
2083,
29898,
3757,
25500,
2288,
29874,
511,
7442,
29889,
1188,
29896,
29900,
29898,
9302,
29889,
2083,
29898,
3757,
25500,
2288,
29874,
4961,
13,
12,
2158,
703,
29925,
2288,
29874,
29871,
29896,
29945,
29889,
29947,
29966,
29878,
29966,
29896,
29929,
29889,
29945,
349,
29966,
29896,
29900,
29900,
29900,
29881,
1162,
29914,
26290,
29930,
29896,
29900,
29900,
29901,
613,
9302,
29889,
2083,
29898,
3757,
25500,
2288,
29874,
6802,
9302,
29889,
2083,
29898,
26290,
25500,
2288,
29874,
11877,
29896,
29900,
29900,
1846,
13,
13,
13,
2
] |
examples/pest_query.py | vpreston/jetyak-parsing | 0 | 189401 | <filename>examples/pest_query.py<gh_stars>0
#!/usr/env/python
'''
This is an example in which all CTD and Optode data is compiled for PEST deployments.
Maintainer: vpreston-at-{whoi, mit}-dot-edu
'''
import numpy as np
import jetyak
import sensors
import jviz
import shapefile
import matplotlib
import gpxpy
import pandas as pd
import copy
import gsw
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
import mpl_toolkits.basemap as mb
from mpl_toolkits.mplot3d import Axes3D
import seaborn as sns
from matplotlib.mlab import griddata
import utm
from mpl_toolkits.axes_grid1.anchored_artists import AnchoredSizeBar
from matplotlib.ticker import LogFormatter
def lat2str(deg):
min = 60 * (deg - np.floor(deg))
deg = np.floor(deg)
dir = 'N'
if deg < 0:
if min != 0.0:
deg += 1.0
min -= 60.0
dir = 'S'
return ("%d$\degree$ %g'") % (np.abs(deg),np.abs(min))
def lon2str(deg):
min = 60 * (deg - np.floor(deg))
deg = np.floor(deg)
dir = 'E'
if deg < 0:
if min != 0.0:
deg += 1.0
min -= 60.0
dir = 'W'
return ("%d$\degree$ %g'") % (np.abs(deg),np.abs(min))
def calc_salinity(temp, conduc):
pressure = 0.1
salt = gsw.SP_from_C(conduc, temp, pressure)
return salt
if __name__ == '__main__':
####################################################
###### Instrument Data and Params ##################
####################################################
base_path = '/home/vpreston/Documents/field_work/pest/'
save_path = '/home/vpreston/Documents/IPP/jetyak_parsing/missions/pest/'
ctd_dirs = [base_path + 'ctd_all.txt']
optode_dirs = [base_path + 'op_all.txt']
gps_dirs = [base_path + '20190605-142802.gpx']
# ctd_dirs = [base_path + 'ctd.txt']
# optode_dirs = [base_path + 'op_morning.txt']
# gps_dirs = [base_path + '20190605-105758.gpx']
mission_name = 'PEST_ExternalLoggers_060519_all.csv'
trim_values = None
bounds = None
offset = 0.0
####################################################
###### Make a "mission" dataset ####################
####################################################
jy = jetyak.JetYak(trim_vals=trim_values, bounds=bounds, args=[offset])
jy.attach_sensor('ctd', ctd_dirs)
jy.attach_sensor('mini_optode', optode_dirs)
jy.attach_sensor('phone_gps', gps_dirs)
# Can now perform work with the sensors
jy.create_mission({'geoframe':'phone_gps'})
jy.save_mission(save_path, mission_name=mission_name)
# Also get the waypoints from the mission and save those
data = []
for point in jy.phone_gps.waypoints:
data.append([point.longitude, point.latitude, point.elevation, point.time, point.name])
pdf = pd.DataFrame(data, columns=['Longitude', 'Latitude', 'Elevation', 'Time', 'Name'])
# Set Times
data = copy.copy(pdf)
data.loc[:, 'Year'] = data.apply(lambda x: x['Time'].year, axis=1)
data.loc[:, 'Month'] = data.apply(lambda x: x['Time'].month, axis=1)
data.loc[:, 'Day'] = data.apply(lambda x: x['Time'].day, axis=1)
data.loc[:, 'Hour'] = data.apply(lambda x: x['Time'].hour, axis=1)
data.loc[:, 'Minute'] = data.apply(lambda x: x['Time'].minute, axis=1)
data.loc[:, 'Second'] = data.apply(lambda x: x['Time'].second, axis=1)
data = sensors.make_global_time(data)
# Query for Data Reading
m = jy.mission[0]
oxy = []
conduct = []
salt = []
ctdtemp = []
optemp = []
for lat, lon, time in zip(pdf.Latitude, pdf.Longitude, pdf.Julian_Date):
# temp = m[(m['phone_gps']['Latitude'] == lat) & (m['phone_gps']['Longitude'] == lon)]
temp = m[np.fabs(m.index - time) < 0.0007]
oxy.append(np.median(temp['mini_optode']['DO']))
conduct.append(np.median(temp['ctd']['Conductivity']))
salt.append(np.median(temp['ctd']['Salinity']))
ctdtemp.append(np.median(temp['ctd']['Temperature']))
optemp.append(np.median(temp['mini_optode']['Temperature']))
data.loc[:, 'DO'] = oxy
data.loc[:, 'Conductivity'] = conduct
data.loc[:, 'Salinity'] = salt
data.loc[:, 'CTD_Temperature'] = ctdtemp
data.loc[:, 'Op_Temperature'] = optemp
# print conduct
# print data.Name
pdf = data
pdf.to_csv(save_path+'waypoint_'+mission_name)
# plt.plot(m.index, m['ctd']['Temperature'], label='CTD')
# plt.plot(m.index, m['mini_optode']['Temperature'], label='Optode')
# plt.legend()
# plt.xlabel('Julian Date')
# plt.ylabel('Temeprature, C')
# plt.show()
# plt.close()
x_min = np.nanmin(m['phone_gps']['Latitude']) - 0.0001
x_max = np.nanmax(m['phone_gps']['Latitude']) + 0.0001
y_min = np.nanmin(m['phone_gps']['Longitude']) - 0.0001
y_max = np.nanmax(m['phone_gps']['Longitude']) + 0.0001
# y_max = -70.640268
# y_min = -70.641015
# x_min = 41.575445
# x_max = 41.576148
base = Basemap(llcrnrlon=y_min,
llcrnrlat=x_min,
urcrnrlon=y_max,
urcrnrlat=x_max,
resolution='l',
projection='cyl',
suppress_ticks=False)
# im = plt.imshow(plt.imread('/home/vpreston/Pictures/little_sipp.jpg'), extent=(y_min, y_max, x_min, x_max))
proj_lon, proj_lat = base(*(m['phone_gps']['Longitude'].values, m['phone_gps']['Latitude'].values))
path_lon, path_lat = base(*(pdf['Longitude'].values, pdf['Latitude'].values))
scat = base.scatter(path_lon,
path_lat,
zorder=5,
s=100.0,
alpha=1.0,
c=pdf['Conductivity'],
cmap='coolwarm',
lw=0)
base.scatter(proj_lon,
proj_lat,
zorder=3,
s=1.0,
alpha=1.0,
c='k')
ax = plt.gca()
def xformat(x, pos=None): return lon2str(x)
def yformat(x, pos=None): return lat2str(x)
ax.xaxis.set_major_formatter(matplotlib.ticker.FuncFormatter(xformat))
ax.yaxis.set_major_formatter(matplotlib.ticker.FuncFormatter(yformat))
plt.setp(ax.get_xticklabels(), rotation=45, ha="right", rotation_mode="anchor")
plt.gcf().tight_layout(rect=(0, 0.11, 1, 1))
cbar = plt.colorbar(scat)
# cbar.set_label('Salinity, PSS')
cbar.set_label('Conductivity, mS/cm')
# cbar.set_label('DO, mg/l')
# cbar.set_label('Temperature, C')
# plt.legend()
plt.show()
plt.close()
scat = plt.scatter(pdf['DO'], pdf['Conductivity'], c=pdf['CTD_Temperature'], cmap='coolwarm')
cbar = plt.colorbar(scat)
cbar.set_label('Temperature, C')
plt.xlabel('DO, mg/l')
plt.ylabel('Conductivity, mS/cm')
plt.show()
plt.close()
####################################################
###### Make a PEST Version of Everything ###########
####################################################
#read in Noa's PEST file
pest_path = '/home/vpreston/Documents/field_work/pest/'
pixhawk = base_path + 'pix_log17.gpx'
suite = base_path + 'LOG99.txt'
pest = pd.read_table(suite, delimiter=',', header=0, engine='c')
pest.Year = pest.Year.values - 3
pest.Month = pest.Month.values - 5
pest.Day = pest.Day.values - 9
pest.Hour = pest.Hour.values - 11
pest = sensors.make_global_time(pest)
pest.loc[:, 'Salinity'] = pest.apply(lambda x: calc_salinity(x['Temperature'], x['Conductivity']/1000), axis=1)
print pest.Salinity.values
sal = [np.round(x, 3) for x in pest.Salinity.values]
np.savetxt('pest_salinity.txt', sal, fmt='%s')
plt.scatter(pest.index, pest['Salinity'])
plt.show()
plt.close()
pix = gpxpy.parse(open(pixhawk))
track = pix.tracks[0]
segment = track.segments[0]
data = []
for i, point in enumerate(segment.points):
data.append([point.longitude, point.latitude, point.elevation, point.time])
pixdf = pd.DataFrame(data, columns=['Longitude', 'Latitude', 'Elevation', 'Time'])
data = copy.copy(pixdf)
data.loc[:, 'Year'] = data.apply(lambda x: x['Time'].year, axis=1)
data.loc[:, 'Month'] = data.apply(lambda x: x['Time'].month, axis=1)
data.loc[:, 'Day'] = data.apply(lambda x: x['Time'].day, axis=1)
data.loc[:, 'Hour'] = data.apply(lambda x: x['Time'].hour, axis=1)
data.loc[:, 'Minute'] = data.apply(lambda x: x['Time'].minute, axis=1)
data.loc[:, 'Second'] = data.apply(lambda x: x['Time'].second, axis=1)
data = sensors.make_global_time(data)
pixdf = data
dfs = [pest.drop_duplicates(subset='Julian_Date', keep='last').set_index('Julian_Date'),
pixdf.drop_duplicates(subset='Julian_Date', keep='last').set_index('Julian_Date')]
temp = pd.concat(dfs, axis=1, keys=['pest', 'pix'])
inter_temp = temp.interpolate()
df_index = dfs[1].index
pest_df = inter_temp.loc[df_index]
print pest_df.head(3)
plt.scatter(pest_df['pix']['Longitude'], pest_df['pix']['Latitude'], c=pest_df['pest']['Salinity'], cmap='coolwarm')
plt.show()
plt.close() | [
1,
529,
9507,
29958,
19057,
29914,
29886,
342,
29918,
1972,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
6272,
29914,
4691,
13,
13,
12008,
13,
4013,
338,
385,
1342,
297,
607,
599,
315,
24495,
322,
20693,
356,
848,
338,
13126,
363,
349,
29923,
1254,
7246,
1860,
29889,
13,
13,
29924,
2365,
4008,
29901,
325,
558,
21496,
29899,
271,
29899,
29912,
15970,
29875,
29892,
1380,
7402,
6333,
29899,
6085,
13,
12008,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
432,
3305,
557,
13,
5215,
4771,
943,
13,
5215,
432,
29894,
466,
13,
5215,
8267,
1445,
13,
5215,
22889,
13,
5215,
330,
1756,
2272,
13,
5215,
11701,
408,
10518,
13,
5215,
3509,
13,
5215,
330,
2774,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
3166,
286,
572,
29918,
10154,
29895,
1169,
29889,
6500,
331,
481,
1053,
4886,
331,
481,
13,
5215,
286,
572,
29918,
10154,
29895,
1169,
29889,
6500,
331,
481,
408,
286,
29890,
13,
3166,
286,
572,
29918,
10154,
29895,
1169,
29889,
29885,
5317,
29941,
29881,
1053,
319,
9100,
29941,
29928,
13,
5215,
409,
370,
1398,
408,
269,
1983,
13,
3166,
22889,
29889,
828,
370,
1053,
6856,
1272,
13,
5215,
3477,
29885,
13,
3166,
286,
572,
29918,
10154,
29895,
1169,
29889,
1165,
267,
29918,
7720,
29896,
29889,
14588,
4395,
29918,
442,
2879,
1053,
530,
305,
4395,
3505,
4297,
13,
3166,
22889,
29889,
29873,
6541,
1053,
4522,
18522,
13,
13,
13,
1753,
3405,
29906,
710,
29898,
12163,
1125,
13,
1678,
1375,
353,
29871,
29953,
29900,
334,
313,
12163,
448,
7442,
29889,
14939,
29898,
12163,
876,
13,
1678,
3587,
353,
7442,
29889,
14939,
29898,
12163,
29897,
13,
1678,
4516,
353,
525,
29940,
29915,
13,
1678,
565,
3587,
529,
29871,
29900,
29901,
13,
4706,
565,
1375,
2804,
29871,
29900,
29889,
29900,
29901,
13,
9651,
3587,
4619,
29871,
29896,
29889,
29900,
13,
9651,
1375,
22361,
29871,
29953,
29900,
29889,
29900,
13,
4706,
4516,
353,
525,
29903,
29915,
13,
1678,
736,
4852,
29995,
29881,
4535,
12163,
929,
29938,
1273,
29887,
29915,
1159,
1273,
313,
9302,
29889,
6897,
29898,
12163,
511,
9302,
29889,
6897,
29898,
1195,
876,
13,
13,
1753,
23123,
29906,
710,
29898,
12163,
1125,
13,
1678,
1375,
353,
29871,
29953,
29900,
334,
313,
12163,
448,
7442,
29889,
14939,
29898,
12163,
876,
13,
1678,
3587,
353,
7442,
29889,
14939,
29898,
12163,
29897,
13,
1678,
4516,
353,
525,
29923,
29915,
13,
1678,
565,
3587,
529,
29871,
29900,
29901,
13,
4706,
565,
1375,
2804,
29871,
29900,
29889,
29900,
29901,
13,
9651,
3587,
4619,
29871,
29896,
29889,
29900,
13,
9651,
1375,
22361,
29871,
29953,
29900,
29889,
29900,
13,
4706,
4516,
353,
525,
29956,
29915,
13,
1678,
736,
4852,
29995,
29881,
4535,
12163,
929,
29938,
1273,
29887,
29915,
1159,
1273,
313,
9302,
29889,
6897,
29898,
12163,
511,
9302,
29889,
6897,
29898,
1195,
876,
13,
13,
1753,
22235,
29918,
19585,
13593,
29898,
7382,
29892,
13417,
29883,
1125,
13,
12,
2139,
545,
353,
29871,
29900,
29889,
29896,
13,
12,
29879,
1997,
353,
330,
2774,
29889,
5550,
29918,
3166,
29918,
29907,
29898,
535,
700,
29883,
29892,
5694,
29892,
12959,
29897,
13,
12,
2457,
15795,
13,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
13,
1678,
835,
13383,
13383,
13383,
29937,
13,
1678,
16101,
29937,
2799,
15461,
3630,
322,
1459,
2232,
835,
7346,
4136,
2277,
29937,
13,
1678,
835,
13383,
13383,
13383,
29937,
13,
13,
1678,
2967,
29918,
2084,
353,
8207,
5184,
29914,
29894,
558,
21496,
29914,
20128,
29914,
2671,
29918,
1287,
29914,
29886,
342,
22208,
13,
1678,
4078,
29918,
2084,
353,
8207,
5184,
29914,
29894,
558,
21496,
29914,
20128,
29914,
5690,
29925,
29914,
29926,
3305,
557,
29918,
862,
2976,
29914,
29885,
6847,
29914,
29886,
342,
22208,
13,
1678,
274,
1594,
29918,
3972,
29879,
353,
518,
3188,
29918,
2084,
718,
525,
312,
29881,
29918,
497,
29889,
3945,
2033,
13,
1678,
3523,
356,
29918,
3972,
29879,
353,
518,
3188,
29918,
2084,
718,
525,
459,
29918,
497,
29889,
3945,
2033,
13,
1678,
330,
567,
29918,
3972,
29879,
353,
518,
3188,
29918,
2084,
718,
525,
29906,
29900,
29896,
29929,
29900,
29953,
29900,
29945,
29899,
29896,
29946,
29906,
29947,
29900,
29906,
29889,
29887,
1756,
2033,
13,
1678,
396,
274,
1594,
29918,
3972,
29879,
353,
518,
3188,
29918,
2084,
718,
525,
312,
29881,
29889,
3945,
2033,
13,
1678,
396,
3523,
356,
29918,
3972,
29879,
353,
518,
3188,
29918,
2084,
718,
525,
459,
29918,
12257,
1076,
29889,
3945,
2033,
13,
1678,
396,
330,
567,
29918,
3972,
29879,
353,
518,
3188,
29918,
2084,
718,
525,
29906,
29900,
29896,
29929,
29900,
29953,
29900,
29945,
29899,
29896,
29900,
29945,
29955,
29945,
29947,
29889,
29887,
1756,
2033,
13,
1678,
10655,
29918,
978,
353,
525,
4162,
1254,
29918,
25865,
3403,
5743,
29918,
29900,
29953,
29900,
29945,
29896,
29929,
29918,
497,
29889,
7638,
29915,
13,
1678,
17151,
29918,
5975,
353,
6213,
13,
1678,
13451,
353,
6213,
13,
1678,
9210,
353,
29871,
29900,
29889,
29900,
13,
13,
1678,
835,
13383,
13383,
13383,
29937,
13,
1678,
16101,
29937,
8561,
263,
376,
6737,
29908,
8783,
835,
13383,
29937,
13,
1678,
835,
13383,
13383,
13383,
29937,
13,
13,
1678,
432,
29891,
353,
432,
3305,
557,
29889,
29967,
300,
29979,
557,
29898,
15450,
29918,
791,
29879,
29922,
15450,
29918,
5975,
29892,
13451,
29922,
23687,
29892,
6389,
11759,
10289,
2314,
13,
1678,
432,
29891,
29889,
14930,
29918,
29879,
6073,
877,
312,
29881,
742,
274,
1594,
29918,
3972,
29879,
29897,
13,
1678,
432,
29891,
29889,
14930,
29918,
29879,
6073,
877,
1195,
29875,
29918,
3670,
356,
742,
3523,
356,
29918,
3972,
29879,
29897,
13,
1678,
432,
29891,
29889,
14930,
29918,
29879,
6073,
877,
6710,
29918,
29887,
567,
742,
330,
567,
29918,
3972,
29879,
29897,
13,
13,
1678,
396,
1815,
1286,
2189,
664,
411,
278,
4771,
943,
13,
1678,
432,
29891,
29889,
3258,
29918,
6737,
3319,
29915,
479,
974,
3128,
22099,
6710,
29918,
29887,
567,
29915,
1800,
13,
1678,
432,
29891,
29889,
7620,
29918,
6737,
29898,
7620,
29918,
2084,
29892,
10655,
29918,
978,
29922,
6737,
29918,
978,
29897,
13,
13,
1678,
396,
3115,
679,
278,
982,
9748,
515,
278,
10655,
322,
4078,
1906,
13,
1678,
848,
353,
5159,
13,
1678,
363,
1298,
297,
432,
29891,
29889,
6710,
29918,
29887,
567,
29889,
1582,
9748,
29901,
13,
268,
12,
1272,
29889,
4397,
4197,
3149,
29889,
5426,
4279,
29892,
1298,
29889,
5066,
4279,
29892,
1298,
29889,
29872,
2608,
362,
29892,
1298,
29889,
2230,
29892,
1298,
29889,
978,
2314,
13,
1678,
13552,
353,
10518,
29889,
17271,
29898,
1272,
29892,
4341,
29922,
1839,
8208,
4279,
742,
525,
13992,
4279,
742,
525,
29923,
2608,
362,
742,
525,
2481,
742,
525,
1170,
11287,
13,
13,
1678,
396,
3789,
10277,
13,
1678,
848,
353,
3509,
29889,
8552,
29898,
5140,
29897,
13,
1678,
848,
29889,
2029,
7503,
29892,
525,
12883,
2033,
353,
848,
29889,
7302,
29898,
2892,
921,
29901,
921,
1839,
2481,
13359,
6360,
29892,
9685,
29922,
29896,
29897,
13,
1678,
848,
29889,
2029,
7503,
29892,
525,
13953,
2033,
353,
848,
29889,
7302,
29898,
2892,
921,
29901,
921,
1839,
2481,
13359,
10874,
29892,
9685,
29922,
29896,
29897,
13,
1678,
848,
29889,
2029,
7503,
29892,
525,
12742,
2033,
353,
848,
29889,
7302,
29898,
2892,
921,
29901,
921,
1839,
2481,
13359,
3250,
29892,
9685,
29922,
29896,
29897,
13,
1678,
848,
29889,
2029,
7503,
29892,
525,
29950,
473,
2033,
353,
848,
29889,
7302,
29898,
2892,
921,
29901,
921,
1839,
2481,
13359,
18721,
29892,
9685,
29922,
29896,
29897,
13,
1678,
848,
29889,
2029,
7503,
29892,
525,
8140,
1082,
2033,
353,
848,
29889,
7302,
29898,
2892,
921,
29901,
921,
1839,
2481,
13359,
1195,
1082,
29892,
9685,
29922,
29896,
29897,
13,
1678,
848,
29889,
2029,
7503,
29892,
525,
11863,
2033,
353,
848,
29889,
7302,
29898,
2892,
921,
29901,
921,
1839,
2481,
13359,
7496,
29892,
9685,
29922,
29896,
29897,
13,
1678,
848,
353,
4771,
943,
29889,
5675,
29918,
10945,
29918,
2230,
29898,
1272,
29897,
13,
13,
1678,
396,
13641,
363,
3630,
21439,
13,
1678,
286,
353,
432,
29891,
29889,
6737,
29961,
29900,
29962,
13,
1678,
288,
3594,
353,
5159,
13,
1678,
7512,
353,
5159,
13,
1678,
15795,
353,
5159,
13,
1678,
274,
1594,
7382,
353,
5159,
13,
1678,
3523,
3451,
353,
5159,
13,
1678,
363,
3405,
29892,
23123,
29892,
931,
297,
14319,
29898,
5140,
29889,
13992,
4279,
29892,
13552,
29889,
8208,
4279,
29892,
13552,
29889,
27501,
713,
29918,
2539,
1125,
13,
268,
12,
29937,
5694,
353,
286,
15625,
29885,
1839,
6710,
29918,
29887,
567,
16215,
13992,
4279,
2033,
1275,
3405,
29897,
669,
313,
29885,
1839,
6710,
29918,
29887,
567,
16215,
8208,
4279,
2033,
1275,
23123,
4638,
13,
268,
12,
7382,
353,
286,
29961,
9302,
29889,
29888,
6897,
29898,
29885,
29889,
2248,
448,
931,
29897,
529,
29871,
29900,
29889,
29900,
29900,
29900,
29955,
29962,
13,
268,
12,
2251,
29891,
29889,
4397,
29898,
9302,
29889,
2168,
713,
29898,
7382,
1839,
1195,
29875,
29918,
3670,
356,
16215,
3970,
25901,
13,
268,
12,
535,
2199,
29889,
4397,
29898,
9302,
29889,
2168,
713,
29898,
7382,
1839,
312,
29881,
16215,
1168,
2199,
2068,
25901,
13,
268,
12,
29879,
1997,
29889,
4397,
29898,
9302,
29889,
2168,
713,
29898,
7382,
1839,
312,
29881,
16215,
20392,
13593,
25901,
13,
268,
12,
312,
29881,
7382,
29889,
4397,
29898,
9302,
29889,
2168,
713,
29898,
7382,
1839,
312,
29881,
16215,
5776,
546,
1535,
25901,
13,
268,
12,
3670,
3451,
29889,
4397,
29898,
9302,
29889,
2168,
713,
29898,
7382,
1839,
1195,
29875,
29918,
3670,
356,
16215,
5776,
546,
1535,
25901,
13,
13,
1678,
848,
29889,
2029,
7503,
29892,
525,
3970,
2033,
353,
288,
3594,
13,
1678,
848,
29889,
2029,
7503,
29892,
525,
1168,
2199,
2068,
2033,
353,
7512,
13,
1678,
848,
29889,
2029,
7503,
29892,
525,
20392,
13593,
2033,
353,
15795,
13,
1678,
848,
29889,
2029,
7503,
29892,
525,
1783,
29928,
29918,
5776,
546,
1535,
2033,
353,
274,
1594,
7382,
13,
1678,
848,
29889,
2029,
7503,
29892,
525,
11746,
29918,
5776,
546,
1535,
2033,
353,
3523,
3451,
13,
13,
1678,
396,
1596,
7512,
13,
1678,
396,
1596,
848,
29889,
1170,
13,
13,
1678,
13552,
353,
848,
13,
1678,
13552,
29889,
517,
29918,
7638,
29898,
7620,
29918,
2084,
23097,
1582,
3149,
29918,
18717,
6737,
29918,
978,
29897,
13,
13,
1678,
396,
14770,
29889,
5317,
29898,
29885,
29889,
2248,
29892,
286,
1839,
312,
29881,
16215,
5776,
546,
1535,
7464,
3858,
2433,
1783,
29928,
1495,
13,
1678,
396,
14770,
29889,
5317,
29898,
29885,
29889,
2248,
29892,
286,
1839,
1195,
29875,
29918,
3670,
356,
16215,
5776,
546,
1535,
7464,
3858,
2433,
20624,
356,
1495,
13,
1678,
396,
14770,
29889,
26172,
580,
13,
1678,
396,
14770,
29889,
29916,
1643,
877,
27501,
713,
4712,
1495,
13,
1678,
396,
14770,
29889,
29891,
1643,
877,
29911,
2004,
558,
1535,
29892,
315,
1495,
13,
1678,
396,
14770,
29889,
4294,
580,
13,
1678,
396,
14770,
29889,
5358,
580,
13,
13,
1678,
921,
29918,
1195,
353,
7442,
29889,
13707,
1195,
29898,
29885,
1839,
6710,
29918,
29887,
567,
16215,
13992,
4279,
11287,
448,
29871,
29900,
29889,
29900,
29900,
29900,
29896,
13,
1678,
921,
29918,
3317,
353,
7442,
29889,
13707,
3317,
29898,
29885,
1839,
6710,
29918,
29887,
567,
16215,
13992,
4279,
11287,
718,
29871,
29900,
29889,
29900,
29900,
29900,
29896,
13,
1678,
343,
29918,
1195,
353,
7442,
29889,
13707,
1195,
29898,
29885,
1839,
6710,
29918,
29887,
567,
16215,
8208,
4279,
11287,
448,
29871,
29900,
29889,
29900,
29900,
29900,
29896,
13,
1678,
343,
29918,
3317,
353,
7442,
29889,
13707,
3317,
29898,
29885,
1839,
6710,
29918,
29887,
567,
16215,
8208,
4279,
11287,
718,
29871,
29900,
29889,
29900,
29900,
29900,
29896,
13,
13,
1678,
396,
343,
29918,
3317,
353,
448,
29955,
29900,
29889,
29953,
29946,
29900,
29906,
29953,
29947,
13,
1678,
396,
343,
29918,
1195,
353,
448,
29955,
29900,
29889,
29953,
29946,
29896,
29900,
29896,
29945,
13,
1678,
396,
921,
29918,
1195,
353,
29871,
29946,
29896,
29889,
29945,
29955,
29945,
29946,
29946,
29945,
13,
1678,
396,
921,
29918,
3317,
353,
29871,
29946,
29896,
29889,
29945,
29955,
29953,
29896,
29946,
29947,
13,
13,
13,
1678,
2967,
353,
4886,
331,
481,
29898,
645,
7283,
29876,
2096,
265,
29922,
29891,
29918,
1195,
29892,
13,
462,
259,
11148,
7283,
29876,
2096,
271,
29922,
29916,
29918,
1195,
29892,
13,
462,
259,
318,
2214,
27539,
2096,
265,
29922,
29891,
29918,
3317,
29892,
13,
462,
259,
318,
2214,
27539,
2096,
271,
29922,
29916,
29918,
3317,
29892,
13,
462,
259,
10104,
2433,
29880,
742,
13,
462,
259,
18246,
2433,
1270,
29880,
742,
13,
462,
259,
21301,
29918,
29873,
7358,
29922,
8824,
29897,
13,
13,
1678,
396,
527,
353,
14770,
29889,
326,
4294,
29898,
572,
29873,
29889,
326,
949,
11219,
5184,
29914,
29894,
558,
21496,
29914,
29925,
10373,
29914,
29880,
1992,
29918,
1039,
407,
29889,
6173,
5477,
15834,
7607,
29891,
29918,
1195,
29892,
343,
29918,
3317,
29892,
921,
29918,
1195,
29892,
921,
29918,
3317,
876,
13,
13,
1678,
410,
29926,
29918,
12957,
29892,
410,
29926,
29918,
5066,
353,
2967,
10456,
29898,
29885,
1839,
6710,
29918,
29887,
567,
16215,
8208,
4279,
13359,
5975,
29892,
286,
1839,
6710,
29918,
29887,
567,
16215,
13992,
4279,
13359,
5975,
876,
13,
1678,
2224,
29918,
12957,
29892,
2224,
29918,
5066,
353,
2967,
10456,
29898,
5140,
1839,
8208,
4279,
13359,
5975,
29892,
13552,
1839,
13992,
4279,
13359,
5975,
876,
13,
13,
1678,
885,
271,
353,
2967,
29889,
1557,
2620,
29898,
2084,
29918,
12957,
29892,
13,
462,
4706,
2224,
29918,
5066,
29892,
13,
462,
4706,
503,
2098,
29922,
29945,
29892,
13,
462,
4706,
269,
29922,
29896,
29900,
29900,
29889,
29900,
29892,
13,
462,
4706,
15595,
29922,
29896,
29889,
29900,
29892,
13,
462,
4706,
274,
29922,
5140,
1839,
1168,
2199,
2068,
7464,
13,
462,
4706,
274,
1958,
2433,
1111,
324,
29893,
2817,
742,
13,
462,
4706,
301,
29893,
29922,
29900,
29897,
13,
1678,
2967,
29889,
1557,
2620,
29898,
20865,
29918,
12957,
29892,
13,
462,
410,
29926,
29918,
5066,
29892,
13,
462,
503,
2098,
29922,
29941,
29892,
13,
462,
269,
29922,
29896,
29889,
29900,
29892,
13,
462,
15595,
29922,
29896,
29889,
29900,
29892,
13,
462,
274,
2433,
29895,
1495,
13,
13,
1678,
4853,
353,
14770,
29889,
29887,
1113,
580,
13,
1678,
822,
921,
4830,
29898,
29916,
29892,
926,
29922,
8516,
1125,
736,
23123,
29906,
710,
29898,
29916,
29897,
13,
1678,
822,
343,
4830,
29898,
29916,
29892,
926,
29922,
8516,
1125,
736,
3405,
29906,
710,
29898,
29916,
29897,
13,
1678,
4853,
29889,
29916,
8990,
29889,
842,
29918,
21355,
29918,
689,
2620,
29898,
2922,
17357,
29889,
29873,
6541,
29889,
14400,
18522,
29898,
29916,
4830,
876,
13,
1678,
4853,
29889,
29891,
8990,
29889,
842,
29918,
21355,
29918,
689,
2620,
29898,
2922,
17357,
29889,
29873,
6541,
29889,
14400,
18522,
29898,
29891,
4830,
876,
13,
13,
1678,
14770,
29889,
842,
29886,
29898,
1165,
29889,
657,
29918,
486,
860,
21134,
3285,
13733,
29922,
29946,
29945,
29892,
447,
543,
1266,
613,
13733,
29918,
8513,
543,
25367,
1159,
13,
1678,
14770,
29889,
29887,
6854,
2141,
29873,
523,
29918,
2680,
29898,
1621,
7607,
29900,
29892,
29871,
29900,
29889,
29896,
29896,
29892,
29871,
29896,
29892,
29871,
29896,
876,
13,
1678,
274,
1646,
353,
14770,
29889,
2780,
1646,
29898,
1557,
271,
29897,
13,
1678,
396,
274,
1646,
29889,
842,
29918,
1643,
877,
20392,
13593,
29892,
349,
1799,
1495,
13,
1678,
274,
1646,
29889,
842,
29918,
1643,
877,
1168,
2199,
2068,
29892,
286,
29903,
29914,
4912,
1495,
13,
1678,
396,
274,
1646,
29889,
842,
29918,
1643,
877,
3970,
29892,
286,
29887,
29914,
29880,
1495,
13,
1678,
396,
274,
1646,
29889,
842,
29918,
1643,
877,
5776,
546,
1535,
29892,
315,
1495,
13,
13,
13,
1678,
396,
14770,
29889,
26172,
580,
13,
1678,
14770,
29889,
4294,
580,
13,
1678,
14770,
29889,
5358,
580,
13,
13,
1678,
885,
271,
353,
14770,
29889,
1557,
2620,
29898,
5140,
1839,
3970,
7464,
13552,
1839,
1168,
2199,
2068,
7464,
274,
29922,
5140,
1839,
1783,
29928,
29918,
5776,
546,
1535,
7464,
274,
1958,
2433,
1111,
324,
29893,
2817,
1495,
13,
1678,
274,
1646,
353,
14770,
29889,
2780,
1646,
29898,
1557,
271,
29897,
13,
1678,
274,
1646,
29889,
842,
29918,
1643,
877,
5776,
546,
1535,
29892,
315,
1495,
13,
1678,
14770,
29889,
29916,
1643,
877,
3970,
29892,
286,
29887,
29914,
29880,
1495,
13,
1678,
14770,
29889,
29891,
1643,
877,
1168,
2199,
2068,
29892,
286,
29903,
29914,
4912,
1495,
13,
1678,
14770,
29889,
4294,
580,
13,
1678,
14770,
29889,
5358,
580,
13,
13,
1678,
835,
13383,
13383,
13383,
29937,
13,
1678,
16101,
29937,
8561,
263,
349,
29923,
1254,
10079,
310,
17296,
835,
7346,
13,
1678,
835,
13383,
13383,
13383,
29937,
13,
13,
13,
1678,
396,
949,
297,
1939,
29874,
29915,
29879,
349,
29923,
1254,
934,
13,
1678,
282,
342,
29918,
2084,
353,
8207,
5184,
29914,
29894,
558,
21496,
29914,
20128,
29914,
2671,
29918,
1287,
29914,
29886,
342,
22208,
13,
1678,
9277,
29882,
20011,
353,
2967,
29918,
2084,
718,
525,
29886,
861,
29918,
1188,
29896,
29955,
29889,
29887,
1756,
29915,
13,
1678,
9460,
353,
2967,
29918,
2084,
718,
525,
14480,
29929,
29929,
29889,
3945,
29915,
13,
1678,
282,
342,
353,
10518,
29889,
949,
29918,
2371,
29898,
13495,
29892,
28552,
29922,
742,
742,
4839,
29922,
29900,
29892,
6012,
2433,
29883,
1495,
13,
1678,
282,
342,
29889,
12883,
353,
282,
342,
29889,
12883,
29889,
5975,
448,
29871,
29941,
13,
1678,
282,
342,
29889,
13953,
353,
282,
342,
29889,
13953,
29889,
5975,
448,
29871,
29945,
13,
1678,
282,
342,
29889,
12742,
353,
282,
342,
29889,
12742,
29889,
5975,
448,
29871,
29929,
13,
1678,
282,
342,
29889,
29950,
473,
353,
282,
342,
29889,
29950,
473,
29889,
5975,
448,
29871,
29896,
29896,
13,
1678,
282,
342,
353,
4771,
943,
29889,
5675,
29918,
10945,
29918,
2230,
29898,
29886,
342,
29897,
13,
1678,
282,
342,
29889,
2029,
7503,
29892,
525,
20392,
13593,
2033,
353,
282,
342,
29889,
7302,
29898,
2892,
921,
29901,
22235,
29918,
19585,
13593,
29898,
29916,
1839,
5776,
546,
1535,
7464,
921,
1839,
1168,
2199,
2068,
2033,
29914,
29896,
29900,
29900,
29900,
511,
9685,
29922,
29896,
29897,
13,
1678,
1596,
282,
342,
29889,
20392,
13593,
29889,
5975,
13,
1678,
4497,
353,
518,
9302,
29889,
14486,
29898,
29916,
29892,
29871,
29941,
29897,
363,
921,
297,
282,
342,
29889,
20392,
13593,
29889,
5975,
29962,
13,
1678,
7442,
29889,
29879,
485,
300,
486,
877,
29886,
342,
29918,
19585,
13593,
29889,
3945,
742,
4497,
29892,
19200,
2433,
29995,
29879,
1495,
13,
1678,
14770,
29889,
1557,
2620,
29898,
29886,
342,
29889,
2248,
29892,
282,
342,
1839,
20392,
13593,
11287,
13,
1678,
14770,
29889,
4294,
580,
13,
1678,
14770,
29889,
5358,
580,
13,
13,
1678,
9277,
353,
330,
1756,
2272,
29889,
5510,
29898,
3150,
29898,
29886,
861,
29882,
20011,
876,
13,
1678,
5702,
353,
9277,
29889,
3018,
4684,
29961,
29900,
29962,
13,
1678,
10768,
353,
5702,
29889,
10199,
1860,
29961,
29900,
29962,
13,
1678,
848,
353,
5159,
13,
1678,
363,
474,
29892,
1298,
297,
26985,
29898,
28192,
29889,
9748,
1125,
13,
268,
12,
1272,
29889,
4397,
4197,
3149,
29889,
5426,
4279,
29892,
1298,
29889,
5066,
4279,
29892,
1298,
29889,
29872,
2608,
362,
29892,
1298,
29889,
2230,
2314,
13,
13,
1678,
9277,
2176,
353,
10518,
29889,
17271,
29898,
1272,
29892,
4341,
29922,
1839,
8208,
4279,
742,
525,
13992,
4279,
742,
525,
29923,
2608,
362,
742,
525,
2481,
11287,
13,
1678,
848,
353,
3509,
29889,
8552,
29898,
29886,
861,
2176,
29897,
13,
1678,
848,
29889,
2029,
7503,
29892,
525,
12883,
2033,
353,
848,
29889,
7302,
29898,
2892,
921,
29901,
921,
1839,
2481,
13359,
6360,
29892,
9685,
29922,
29896,
29897,
13,
1678,
848,
29889,
2029,
7503,
29892,
525,
13953,
2033,
353,
848,
29889,
7302,
29898,
2892,
921,
29901,
921,
1839,
2481,
13359,
10874,
29892,
9685,
29922,
29896,
29897,
13,
1678,
848,
29889,
2029,
7503,
29892,
525,
12742,
2033,
353,
848,
29889,
7302,
29898,
2892,
921,
29901,
921,
1839,
2481,
13359,
3250,
29892,
9685,
29922,
29896,
29897,
13,
1678,
848,
29889,
2029,
7503,
29892,
525,
29950,
473,
2033,
353,
848,
29889,
7302,
29898,
2892,
921,
29901,
921,
1839,
2481,
13359,
18721,
29892,
9685,
29922,
29896,
29897,
13,
1678,
848,
29889,
2029,
7503,
29892,
525,
8140,
1082,
2033,
353,
848,
29889,
7302,
29898,
2892,
921,
29901,
921,
1839,
2481,
13359,
1195,
1082,
29892,
9685,
29922,
29896,
29897,
13,
1678,
848,
29889,
2029,
7503,
29892,
525,
11863,
2033,
353,
848,
29889,
7302,
29898,
2892,
921,
29901,
921,
1839,
2481,
13359,
7496,
29892,
9685,
29922,
29896,
29897,
13,
1678,
848,
353,
4771,
943,
29889,
5675,
29918,
10945,
29918,
2230,
29898,
1272,
29897,
13,
1678,
9277,
2176,
353,
848,
13,
13,
1678,
4489,
29879,
353,
518,
29886,
342,
29889,
8865,
29918,
20908,
15815,
29898,
6484,
2433,
27501,
713,
29918,
2539,
742,
3013,
2433,
4230,
2824,
842,
29918,
2248,
877,
27501,
713,
29918,
2539,
5477,
13,
965,
9277,
2176,
29889,
8865,
29918,
20908,
15815,
29898,
6484,
2433,
27501,
713,
29918,
2539,
742,
3013,
2433,
4230,
2824,
842,
29918,
2248,
877,
27501,
713,
29918,
2539,
1495,
29962,
13,
1678,
5694,
353,
10518,
29889,
17685,
29898,
29069,
29892,
9685,
29922,
29896,
29892,
6611,
29922,
1839,
29886,
342,
742,
525,
29886,
861,
11287,
13,
1678,
1006,
29918,
7382,
353,
5694,
29889,
1639,
3733,
403,
580,
13,
1678,
4489,
29918,
2248,
353,
4489,
29879,
29961,
29896,
1822,
2248,
13,
1678,
282,
342,
29918,
2176,
353,
1006,
29918,
7382,
29889,
2029,
29961,
2176,
29918,
2248,
29962,
13,
13,
13,
1678,
1596,
282,
342,
29918,
2176,
29889,
2813,
29898,
29941,
29897,
13,
13,
1678,
14770,
29889,
1557,
2620,
29898,
29886,
342,
29918,
2176,
1839,
29886,
861,
16215,
8208,
4279,
7464,
282,
342,
29918,
2176,
1839,
29886,
861,
16215,
13992,
4279,
7464,
274,
29922,
29886,
342,
29918,
2176,
1839,
29886,
342,
16215,
20392,
13593,
7464,
274,
1958,
2433,
1111,
324,
29893,
2817,
1495,
13,
1678,
14770,
29889,
4294,
580,
13,
1678,
14770,
29889,
5358,
580,
2
] |
Examples/tools/display_tremolo.py | apohl79/AudioTK | 10 | 137669 | <gh_stars>1-10
#!/usr/bin/env python
from ATK.Core import DoubleInPointerFilter, DoubleOutPointerFilter
from ATK.Tools import DoubleCachedSinusGeneratorFilter, DoubleApplyGainFilter
import matplotlib.pyplot as plt
sample_rate = 96000
import sys, os
sys.path.append(os.path.dirname(os.path.realpath(__file__))+"/..")
from display.compare_spec import plot_me
def filter(input):
import numpy as np
output = np.zeros(input.shape, dtype=np.float64)
infilter = DoubleInPointerFilter(input, False)
infilter.set_input_sampling_rate(sample_rate)
sinusfilter = DoubleCachedSinusGeneratorFilter(20, 5)
sinusfilter.set_input_sampling_rate(sample_rate)
sinusfilter.set_offset(0.5)
sinusfilter.set_volume(0.5)
gainfilter = DoubleApplyGainFilter(1)
gainfilter.set_input_sampling_rate(sample_rate)
gainfilter.set_input_port(0, infilter, 0)
gainfilter.set_input_port(1, sinusfilter, 0)
outfilter = DoubleOutPointerFilter(output, False)
outfilter.set_input_sampling_rate(sample_rate)
outfilter.set_input_port(0, gainfilter, 0)
outfilter.process(input.shape[1])
return output
if __name__ == "__main__":
import numpy as np
samples = 2000000
freq_max = 20000
t = np.arange(samples, dtype=np.float64).reshape(1, -1) / sample_rate
d = np.sin(np.pi * (sample_rate * freq_max / samples * (t + .1)) * t)
np.savetxt("input.txt", d)
out = filter(d)
np.savetxt("output.txt", d)
plt.figure()
plot_me((d[0], out[0]), sample_rate)
plt.gcf().suptitle("Delay")
plt.legend()
plt.show()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
3166,
15531,
29968,
29889,
9203,
1053,
11599,
797,
14516,
5072,
29892,
11599,
3744,
14516,
5072,
13,
3166,
15531,
29968,
29889,
24183,
1053,
11599,
29907,
3791,
29903,
13419,
21575,
5072,
29892,
11599,
2052,
368,
29954,
475,
5072,
13,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
13,
11249,
29918,
10492,
353,
29871,
29929,
29953,
29900,
29900,
29900,
13,
13,
5215,
10876,
29892,
2897,
13,
9675,
29889,
2084,
29889,
4397,
29898,
359,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
6370,
2084,
22168,
1445,
1649,
876,
13578,
29914,
636,
1159,
13,
3166,
2479,
29889,
18307,
29918,
6550,
1053,
6492,
29918,
1004,
13,
13,
1753,
4175,
29898,
2080,
1125,
13,
29871,
1053,
12655,
408,
7442,
13,
29871,
1962,
353,
7442,
29889,
3298,
359,
29898,
2080,
29889,
12181,
29892,
26688,
29922,
9302,
29889,
7411,
29953,
29946,
29897,
13,
13,
29871,
297,
4572,
353,
11599,
797,
14516,
5072,
29898,
2080,
29892,
7700,
29897,
13,
29871,
297,
4572,
29889,
842,
29918,
2080,
29918,
13445,
10335,
29918,
10492,
29898,
11249,
29918,
10492,
29897,
13,
13,
29871,
4457,
375,
4572,
353,
11599,
29907,
3791,
29903,
13419,
21575,
5072,
29898,
29906,
29900,
29892,
29871,
29945,
29897,
13,
29871,
4457,
375,
4572,
29889,
842,
29918,
2080,
29918,
13445,
10335,
29918,
10492,
29898,
11249,
29918,
10492,
29897,
13,
29871,
4457,
375,
4572,
29889,
842,
29918,
10289,
29898,
29900,
29889,
29945,
29897,
13,
29871,
4457,
375,
4572,
29889,
842,
29918,
24623,
29898,
29900,
29889,
29945,
29897,
13,
259,
13,
29871,
11581,
4572,
353,
11599,
2052,
368,
29954,
475,
5072,
29898,
29896,
29897,
13,
29871,
11581,
4572,
29889,
842,
29918,
2080,
29918,
13445,
10335,
29918,
10492,
29898,
11249,
29918,
10492,
29897,
13,
29871,
11581,
4572,
29889,
842,
29918,
2080,
29918,
637,
29898,
29900,
29892,
297,
4572,
29892,
29871,
29900,
29897,
13,
29871,
11581,
4572,
29889,
842,
29918,
2080,
29918,
637,
29898,
29896,
29892,
4457,
375,
4572,
29892,
29871,
29900,
29897,
13,
259,
13,
29871,
714,
4572,
353,
11599,
3744,
14516,
5072,
29898,
4905,
29892,
7700,
29897,
13,
29871,
714,
4572,
29889,
842,
29918,
2080,
29918,
13445,
10335,
29918,
10492,
29898,
11249,
29918,
10492,
29897,
13,
29871,
714,
4572,
29889,
842,
29918,
2080,
29918,
637,
29898,
29900,
29892,
11581,
4572,
29892,
29871,
29900,
29897,
13,
29871,
714,
4572,
29889,
5014,
29898,
2080,
29889,
12181,
29961,
29896,
2314,
13,
13,
29871,
736,
1962,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
29871,
1053,
12655,
408,
7442,
13,
29871,
11916,
353,
29871,
29906,
29900,
29900,
29900,
29900,
29900,
29900,
13,
29871,
3005,
29939,
29918,
3317,
353,
29871,
29906,
29900,
29900,
29900,
29900,
13,
13,
29871,
260,
353,
7442,
29889,
279,
927,
29898,
27736,
29892,
26688,
29922,
9302,
29889,
7411,
29953,
29946,
467,
690,
14443,
29898,
29896,
29892,
448,
29896,
29897,
847,
4559,
29918,
10492,
13,
29871,
270,
353,
7442,
29889,
5223,
29898,
9302,
29889,
1631,
334,
313,
11249,
29918,
10492,
334,
3005,
29939,
29918,
3317,
847,
11916,
334,
313,
29873,
718,
869,
29896,
876,
334,
260,
29897,
13,
13,
29871,
7442,
29889,
29879,
485,
300,
486,
703,
2080,
29889,
3945,
613,
270,
29897,
13,
29871,
714,
353,
4175,
29898,
29881,
29897,
13,
29871,
7442,
29889,
29879,
485,
300,
486,
703,
4905,
29889,
3945,
613,
270,
29897,
13,
29871,
14770,
29889,
4532,
580,
13,
29871,
6492,
29918,
1004,
3552,
29881,
29961,
29900,
1402,
714,
29961,
29900,
11724,
4559,
29918,
10492,
29897,
13,
29871,
14770,
29889,
29887,
6854,
2141,
2146,
415,
1740,
703,
24996,
1159,
13,
29871,
14770,
29889,
26172,
580,
13,
29871,
14770,
29889,
4294,
580,
13,
2
] |
test_spmm.py | binfoo1993/torchdgl | 0 | 79108 | <reponame>binfoo1993/torchdgl
import argparse, time, math
import numpy as np
import networkx as nx
import torch as th
import torch.nn as nn
import torch.nn.functional as F
import dgl
import dgl.function as fn
from dgl.data import register_data_args
from dgl.data import CoraGraphDataset, CiteseerGraphDataset, PubmedGraphDataset
from dgl.data import RedditDataset
from torch_sparse import SparseTensor
from torch_geometric.nn import MessagePassing
from torch_sparse import matmul
from typing import Optional
th.classes.load_library("build/libadjmatrix.so")
AdjMatrix = th.classes.DGL.AdjMatrix
def do_spmm(adj: AdjMatrix,
op: str,
reduce: str,
ufeat : Optional[th.Tensor],
efeat : Optional[th.Tensor]):
return th.ops.DGL.GSpMM(adj, op, reduce, ufeat, efeat)
scripted_spmm = th.jit.script(do_spmm)
class GCNConv_pyg(MessagePassing):
def __init__(self):
super(GCNConv_pyg, self).__init__(aggr="add")
def forward(self, x, edge_index):
out = self.propagate(edge_index, x=x)
return out
def message(self, x_j):
return x_j
def message_and_aggregate(self, adj_t, x):
return matmul(adj_t, x, reduce=self.aggr)
pyg_spmm = GCNConv_pyg()
def run_dgl(g, features):
g.ndata["h"] = features
g.update_all(fn.copy_src(src="h", out="m"), fn.sum(msg="m", out="h"))
return g.ndata['h']
def run_pyg(edge_index, features):
return pyg_spmm(features, edge_index)
def run_script(adj, features):
return scripted_spmm(adj, "copy_lhs", "sum", features, None)
def main(args):
# load and preprocess dataset
if args.dataset == 'cora':
data = CoraGraphDataset()
elif args.dataset == 'citeseer':
data = CiteseerGraphDataset()
elif args.dataset == 'pubmed':
data = PubmedGraphDataset()
elif args.dataset == 'reddit':
data = RedditDataset()
else:
raise ValueError('Unknown dataset: {}'.format(args.dataset))
g = data[0]
if args.gpu < 0:
cuda = False
else:
cuda = True
g = g.to(args.gpu)
features = g.ndata['feat']
in_feats = features.shape[1]
n_classes = data.num_classes
print("feature size: {}".format(in_feats))
# add self loop
g = dgl.remove_self_loop(g)
g = dgl.add_self_loop(g)
n_edges = g.number_of_edges()
src, dst = g.edges()
edge_index = SparseTensor(row=src,
col=dst,
sparse_sizes=(g.number_of_nodes(), g.number_of_nodes()))
adj = AdjMatrix(src, dst)
runtime = 0.0
n = 1
if args.impl == "dgl":
run_dgl(g, features)
if args.gpu >= 0:
th.cuda.synchronize()
th.cuda.nvtx.range_push("spmm start")
for _ in range(n):
start_run = time.perf_counter()
run_dgl(g, features)
if args.gpu >= 0:
th.cuda.synchronize()
runtime += time.perf_counter() - start_run
th.cuda.nvtx.range_pop()
elif args.impl == "pyg":
run_pyg(edge_index, features)
if args.gpu >= 0:
th.cuda.synchronize()
for _ in range(n):
start_run = time.perf_counter()
run_pyg(edge_index, features)
if args.gpu >= 0:
th.cuda.synchronize()
runtime += time.perf_counter() - start_run
else:
run_script(adj, features)
if args.gpu >= 0:
th.cuda.synchronize()
for _ in range(n):
start_run = time.perf_counter()
run_script(adj, features)
if args.gpu >= 0:
th.cuda.synchronize()
runtime += time.perf_counter() - start_run
#print('Time (ms): {:.3f}'.format(runtime*1e3/n))
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='GCN')
register_data_args(parser)
parser.add_argument("--impl", type=str, default="dgl",
help="use torch script or not")
parser.add_argument("--gpu", type=int, default=-1,
help="gpu")
args = parser.parse_args()
print(args)
main(args)
| [
1,
529,
276,
1112,
420,
29958,
2109,
5431,
29896,
29929,
29929,
29941,
29914,
7345,
305,
29881,
3820,
13,
5215,
1852,
5510,
29892,
931,
29892,
5844,
13,
5215,
12655,
408,
7442,
13,
5215,
3564,
29916,
408,
302,
29916,
13,
5215,
4842,
305,
408,
266,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
5215,
4842,
305,
29889,
15755,
29889,
2220,
284,
408,
383,
13,
5215,
270,
3820,
13,
5215,
270,
3820,
29889,
2220,
408,
7876,
13,
3166,
270,
3820,
29889,
1272,
1053,
6036,
29918,
1272,
29918,
5085,
13,
3166,
270,
3820,
29889,
1272,
1053,
315,
2207,
9527,
16390,
24541,
29892,
21353,
968,
261,
9527,
16390,
24541,
29892,
8042,
2168,
9527,
16390,
24541,
13,
3166,
270,
3820,
29889,
1272,
1053,
4367,
27423,
16390,
24541,
259,
13,
3166,
4842,
305,
29918,
29879,
5510,
1053,
317,
5510,
29911,
6073,
13,
3166,
4842,
305,
29918,
479,
14066,
29889,
15755,
1053,
7777,
7129,
292,
13,
3166,
4842,
305,
29918,
29879,
5510,
1053,
1775,
16109,
13,
3166,
19229,
1053,
28379,
13,
386,
29889,
13203,
29889,
1359,
29918,
5258,
703,
4282,
29914,
1982,
26859,
5344,
29889,
578,
1159,
13,
3253,
29926,
14609,
353,
266,
29889,
13203,
29889,
29928,
7239,
29889,
3253,
29926,
14609,
13,
13,
1753,
437,
29918,
1028,
4317,
29898,
26859,
29901,
2087,
29926,
14609,
29892,
29871,
13,
9651,
1015,
29901,
851,
29892,
29871,
13,
9651,
10032,
29901,
851,
29892,
29871,
13,
9651,
318,
1725,
271,
584,
28379,
29961,
386,
29889,
29911,
6073,
1402,
13,
9651,
321,
1725,
271,
584,
28379,
29961,
386,
29889,
29911,
6073,
29962,
1125,
13,
1678,
736,
266,
29889,
3554,
29889,
29928,
7239,
29889,
29954,
5592,
7428,
29898,
26859,
29892,
1015,
29892,
10032,
29892,
318,
1725,
271,
29892,
321,
1725,
271,
29897,
13,
13,
2154,
287,
29918,
1028,
4317,
353,
266,
29889,
29926,
277,
29889,
2154,
29898,
1867,
29918,
1028,
4317,
29897,
13,
13,
1990,
402,
13778,
1168,
29894,
29918,
2272,
29887,
29898,
3728,
7129,
292,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
1125,
13,
4706,
2428,
29898,
8766,
29940,
1168,
29894,
29918,
2272,
29887,
29892,
1583,
467,
1649,
2344,
12035,
351,
629,
543,
1202,
1159,
13,
13,
1678,
822,
6375,
29898,
1311,
29892,
921,
29892,
7636,
29918,
2248,
1125,
13,
4706,
714,
353,
1583,
29889,
7728,
351,
403,
29898,
12864,
29918,
2248,
29892,
921,
29922,
29916,
29897,
13,
4706,
736,
714,
13,
13,
1678,
822,
2643,
29898,
1311,
29892,
921,
29918,
29926,
1125,
13,
4706,
736,
921,
29918,
29926,
13,
13,
1678,
822,
2643,
29918,
392,
29918,
26193,
403,
29898,
1311,
29892,
12109,
29918,
29873,
29892,
921,
1125,
13,
4706,
736,
1775,
16109,
29898,
26859,
29918,
29873,
29892,
921,
29892,
10032,
29922,
1311,
29889,
351,
629,
29897,
13,
13,
2272,
29887,
29918,
1028,
4317,
353,
402,
13778,
1168,
29894,
29918,
2272,
29887,
580,
13,
13,
1753,
1065,
29918,
29881,
3820,
29898,
29887,
29892,
5680,
1125,
13,
1678,
330,
29889,
299,
532,
3366,
29882,
3108,
353,
5680,
13,
1678,
330,
29889,
5504,
29918,
497,
29898,
9144,
29889,
8552,
29918,
4351,
29898,
4351,
543,
29882,
613,
714,
543,
29885,
4968,
7876,
29889,
2083,
29898,
7645,
543,
29885,
613,
714,
543,
29882,
5783,
13,
1678,
736,
330,
29889,
299,
532,
1839,
29882,
2033,
13,
13,
1753,
1065,
29918,
2272,
29887,
29898,
12864,
29918,
2248,
29892,
5680,
1125,
13,
1678,
736,
19484,
29918,
1028,
4317,
29898,
22100,
29892,
7636,
29918,
2248,
29897,
13,
13,
1753,
1065,
29918,
2154,
29898,
26859,
29892,
5680,
1125,
13,
1678,
736,
2471,
287,
29918,
1028,
4317,
29898,
26859,
29892,
376,
8552,
29918,
29880,
9499,
613,
376,
2083,
613,
5680,
29892,
6213,
29897,
13,
13,
1753,
1667,
29898,
5085,
1125,
13,
1678,
396,
2254,
322,
758,
5014,
8783,
13,
1678,
565,
6389,
29889,
24713,
1275,
525,
29883,
2207,
2396,
13,
4706,
848,
353,
315,
2207,
9527,
16390,
24541,
580,
13,
1678,
25342,
6389,
29889,
24713,
1275,
525,
20752,
968,
261,
2396,
13,
4706,
848,
353,
21353,
968,
261,
9527,
16390,
24541,
580,
13,
1678,
25342,
6389,
29889,
24713,
1275,
525,
5467,
2168,
2396,
13,
4706,
848,
353,
8042,
2168,
9527,
16390,
24541,
580,
13,
1678,
25342,
6389,
29889,
24713,
1275,
525,
1127,
27423,
2396,
13,
4706,
848,
353,
4367,
27423,
16390,
24541,
580,
13,
1678,
1683,
29901,
13,
4706,
12020,
7865,
2392,
877,
14148,
8783,
29901,
6571,
4286,
4830,
29898,
5085,
29889,
24713,
876,
13,
13,
1678,
330,
353,
848,
29961,
29900,
29962,
13,
1678,
565,
6389,
29889,
29887,
3746,
529,
29871,
29900,
29901,
13,
4706,
274,
6191,
353,
7700,
13,
1678,
1683,
29901,
13,
4706,
274,
6191,
353,
5852,
13,
4706,
330,
353,
330,
29889,
517,
29898,
5085,
29889,
29887,
3746,
29897,
13,
13,
1678,
5680,
353,
330,
29889,
299,
532,
1839,
1725,
271,
2033,
13,
1678,
297,
29918,
1725,
1446,
353,
5680,
29889,
12181,
29961,
29896,
29962,
13,
1678,
302,
29918,
13203,
353,
848,
29889,
1949,
29918,
13203,
13,
1678,
1596,
703,
14394,
2159,
29901,
6571,
1642,
4830,
29898,
262,
29918,
1725,
1446,
876,
13,
13,
1678,
396,
788,
1583,
2425,
13,
1678,
330,
353,
270,
3820,
29889,
5992,
29918,
1311,
29918,
7888,
29898,
29887,
29897,
13,
1678,
330,
353,
270,
3820,
29889,
1202,
29918,
1311,
29918,
7888,
29898,
29887,
29897,
13,
1678,
302,
29918,
287,
2710,
353,
330,
29889,
4537,
29918,
974,
29918,
287,
2710,
580,
13,
13,
1678,
4765,
29892,
29743,
353,
330,
29889,
287,
2710,
580,
13,
1678,
7636,
29918,
2248,
353,
317,
5510,
29911,
6073,
29898,
798,
29922,
4351,
29892,
29871,
13,
462,
4706,
784,
29922,
22992,
29892,
29871,
13,
462,
4706,
29234,
29918,
29879,
7093,
7607,
29887,
29889,
4537,
29918,
974,
29918,
18010,
3285,
330,
29889,
4537,
29918,
974,
29918,
18010,
22130,
13,
1678,
12109,
353,
2087,
29926,
14609,
29898,
4351,
29892,
29743,
29897,
13,
13,
1678,
10073,
353,
29871,
29900,
29889,
29900,
13,
1678,
302,
353,
29871,
29896,
13,
13,
1678,
565,
6389,
29889,
13699,
1275,
376,
29881,
3820,
1115,
13,
4706,
1065,
29918,
29881,
3820,
29898,
29887,
29892,
5680,
29897,
13,
4706,
565,
6389,
29889,
29887,
3746,
6736,
29871,
29900,
29901,
13,
9651,
266,
29889,
29883,
6191,
29889,
29879,
9524,
675,
580,
13,
4706,
266,
29889,
29883,
6191,
29889,
29876,
29894,
7508,
29889,
3881,
29918,
5910,
703,
1028,
4317,
1369,
1159,
13,
4706,
363,
903,
297,
3464,
29898,
29876,
1125,
13,
9651,
1369,
29918,
3389,
353,
931,
29889,
546,
29888,
29918,
11808,
580,
13,
9651,
1065,
29918,
29881,
3820,
29898,
29887,
29892,
5680,
29897,
13,
9651,
565,
6389,
29889,
29887,
3746,
6736,
29871,
29900,
29901,
13,
18884,
266,
29889,
29883,
6191,
29889,
29879,
9524,
675,
580,
13,
9651,
10073,
4619,
931,
29889,
546,
29888,
29918,
11808,
580,
448,
1369,
29918,
3389,
13,
4706,
266,
29889,
29883,
6191,
29889,
29876,
29894,
7508,
29889,
3881,
29918,
7323,
580,
13,
1678,
25342,
6389,
29889,
13699,
1275,
376,
2272,
29887,
1115,
13,
4706,
1065,
29918,
2272,
29887,
29898,
12864,
29918,
2248,
29892,
5680,
29897,
13,
4706,
565,
6389,
29889,
29887,
3746,
6736,
29871,
29900,
29901,
13,
9651,
266,
29889,
29883,
6191,
29889,
29879,
9524,
675,
580,
13,
4706,
363,
903,
297,
3464,
29898,
29876,
1125,
13,
9651,
1369,
29918,
3389,
353,
931,
29889,
546,
29888,
29918,
11808,
580,
13,
9651,
1065,
29918,
2272,
29887,
29898,
12864,
29918,
2248,
29892,
5680,
29897,
13,
9651,
565,
6389,
29889,
29887,
3746,
6736,
29871,
29900,
29901,
13,
18884,
266,
29889,
29883,
6191,
29889,
29879,
9524,
675,
580,
13,
9651,
10073,
4619,
931,
29889,
546,
29888,
29918,
11808,
580,
448,
1369,
29918,
3389,
13,
1678,
1683,
29901,
13,
4706,
1065,
29918,
2154,
29898,
26859,
29892,
5680,
29897,
13,
4706,
565,
6389,
29889,
29887,
3746,
6736,
29871,
29900,
29901,
13,
9651,
266,
29889,
29883,
6191,
29889,
29879,
9524,
675,
580,
13,
4706,
363,
903,
297,
3464,
29898,
29876,
1125,
13,
9651,
1369,
29918,
3389,
353,
931,
29889,
546,
29888,
29918,
11808,
580,
13,
9651,
1065,
29918,
2154,
29898,
26859,
29892,
5680,
29897,
13,
9651,
565,
6389,
29889,
29887,
3746,
6736,
29871,
29900,
29901,
13,
18884,
266,
29889,
29883,
6191,
29889,
29879,
9524,
675,
580,
13,
9651,
10073,
4619,
931,
29889,
546,
29888,
29918,
11808,
580,
448,
1369,
29918,
3389,
13,
268,
13,
1678,
396,
2158,
877,
2481,
313,
1516,
1125,
12365,
29889,
29941,
29888,
29913,
4286,
4830,
29898,
15634,
29930,
29896,
29872,
29941,
29914,
29876,
876,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
29898,
8216,
2433,
8766,
29940,
1495,
13,
1678,
6036,
29918,
1272,
29918,
5085,
29898,
16680,
29897,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
489,
13699,
613,
1134,
29922,
710,
29892,
2322,
543,
29881,
3820,
613,
13,
9651,
1371,
543,
1509,
4842,
305,
2471,
470,
451,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
489,
29887,
3746,
613,
1134,
29922,
524,
29892,
2322,
10457,
29896,
29892,
13,
9651,
1371,
543,
29887,
3746,
1159,
13,
1678,
6389,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
1678,
1596,
29898,
5085,
29897,
13,
13,
1678,
1667,
29898,
5085,
29897,
13,
2
] |
Sample/PyWebApi.IIS/json_fmtr.py | DataBooster/PyWebApi | 6 | 39252 | # -*- coding: utf-8 -*-
"""json_fmtr.py
This module implements a MediaTypeFormatter with JSON response.
This module was originally shipped as an example code from https://github.com/DataBooster/PyWebApi, licensed under the MIT license.
Anyone who obtains a copy of this code is welcome to modify it for any purpose, and holds all rights to the modified part only.
The above license notice and permission notice shall be included in all copies or substantial portions of the Software.
"""
from jsonpickle import dumps
from pywebapi import MediaTypeFormatter
class JsonFormatter(MediaTypeFormatter):
"""description of class"""
@property
def supported_media_types(self):
return ['application/json', 'text/json']
def format(self, obj, media_type:str, **kwargs):
kwargs['unpicklable'] = kwargs.get('unpicklable', False)
return dumps(obj, **kwargs)
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
3126,
29918,
24826,
509,
29889,
2272,
13,
13,
1678,
910,
3883,
10703,
263,
8213,
1542,
18522,
411,
4663,
2933,
29889,
13,
13,
1678,
910,
3883,
471,
10437,
528,
16242,
408,
385,
1342,
775,
515,
2045,
597,
3292,
29889,
510,
29914,
1469,
8431,
15664,
29914,
19737,
3609,
11713,
29892,
7794,
21144,
1090,
278,
341,
1806,
19405,
29889,
13,
1678,
26407,
1058,
4017,
29879,
263,
3509,
310,
445,
775,
338,
12853,
304,
6623,
372,
363,
738,
6437,
29892,
322,
8640,
599,
10462,
304,
278,
9120,
760,
871,
29889,
13,
1678,
450,
2038,
19405,
8369,
322,
10751,
8369,
4091,
367,
5134,
297,
599,
14591,
470,
23228,
2011,
1080,
310,
278,
18540,
29889,
13,
15945,
29908,
13,
13,
3166,
4390,
23945,
280,
1053,
270,
17204,
13,
3166,
11451,
2676,
2754,
1053,
8213,
1542,
18522,
13,
13,
13,
1990,
14355,
18522,
29898,
10572,
1542,
18522,
1125,
13,
1678,
9995,
8216,
310,
770,
15945,
29908,
13,
13,
1678,
732,
6799,
13,
1678,
822,
6969,
29918,
9799,
29918,
8768,
29898,
1311,
1125,
13,
539,
736,
6024,
6214,
29914,
3126,
742,
525,
726,
29914,
3126,
2033,
13,
13,
13,
1678,
822,
3402,
29898,
1311,
29892,
5446,
29892,
5745,
29918,
1853,
29901,
710,
29892,
3579,
19290,
1125,
13,
4706,
9049,
5085,
1839,
348,
23945,
29880,
519,
2033,
353,
9049,
5085,
29889,
657,
877,
348,
23945,
29880,
519,
742,
7700,
29897,
13,
4706,
736,
270,
17204,
29898,
5415,
29892,
3579,
19290,
29897,
13,
2
] |
web1.py | Riddhikshah21/whyec2 | 0 | 120007 | <filename>web1.py
from flask import Flask
from flask import request
import random
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!!!!"
def randomNumber(rnum):
sumran=0
for i in range(int(rnum)):
sumran += random.randint(0,int(rnum))
return sumran
@app.route("/r")
def printRandom():
rnum = request.args.get('rnum')
print(rnum)
var1 =randomNumber(rnum)
return str(var1)
if __name__ == '__name__':
app.run()
app.run(port=5000)
| [
1,
529,
9507,
29958,
2676,
29896,
29889,
2272,
13,
3166,
29784,
1053,
2379,
1278,
13,
3166,
29784,
1053,
2009,
13,
13,
5215,
4036,
13,
932,
353,
2379,
1278,
22168,
978,
1649,
29897,
13,
13,
29992,
932,
29889,
13134,
11974,
1159,
13,
1753,
22172,
7295,
13,
1678,
736,
376,
10994,
2787,
21004,
3850,
13,
13,
13,
1753,
4036,
4557,
29898,
29878,
1949,
1125,
13,
1678,
2533,
661,
29922,
29900,
13,
1678,
363,
474,
297,
3464,
29898,
524,
29898,
29878,
1949,
22164,
13,
4706,
2533,
661,
4619,
4036,
29889,
9502,
524,
29898,
29900,
29892,
524,
29898,
29878,
1949,
876,
13,
1678,
736,
2533,
661,
13,
13,
13,
29992,
932,
29889,
13134,
11974,
29878,
1159,
13,
1753,
1596,
17875,
7295,
13,
1678,
364,
1949,
353,
2009,
29889,
5085,
29889,
657,
877,
29878,
1949,
1495,
13,
1678,
1596,
29898,
29878,
1949,
29897,
13,
1678,
722,
29896,
353,
8172,
4557,
29898,
29878,
1949,
29897,
13,
1678,
736,
851,
29898,
1707,
29896,
29897,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
978,
1649,
2396,
13,
1678,
623,
29889,
3389,
580,
13,
13,
932,
29889,
3389,
29898,
637,
29922,
29945,
29900,
29900,
29900,
29897,
13,
13,
13,
2
] |
src/sima/simo/blueprints/simplewirecoupling.py | SINTEF/simapy | 0 | 124214 | <filename>src/sima/simo/blueprints/simplewirecoupling.py
#
# Generated with SimpleWireCouplingBlueprint
from dmt.blueprint import Blueprint
from dmt.dimension import Dimension
from dmt.attribute import Attribute
from dmt.enum_attribute import EnumAttribute
from dmt.blueprint_attribute import BlueprintAttribute
from .simplecoupling import SimpleCouplingBlueprint
class SimpleWireCouplingBlueprint(SimpleCouplingBlueprint):
""""""
def __init__(self, name="SimpleWireCoupling", package_path="sima/simo", description=""):
super().__init__(name,package_path,description)
self.attributes.append(Attribute("name","string","",default=""))
self.attributes.append(Attribute("description","string","",default=""))
self.attributes.append(Attribute("_id","string","",default=""))
self.attributes.append(BlueprintAttribute("scriptableValues","sima/sima/ScriptableValue","",True,Dimension("*")))
self.attributes.append(BlueprintAttribute("endPoint1","sima/simo/SIMOBodyPoint","",False))
self.attributes.append(BlueprintAttribute("endPoint2","sima/simo/SIMOBodyPoint","",False))
self.attributes.append(EnumAttribute("failureMode","sima/simo/ActivationFailureMode","Failure mode of coupling element"))
self.attributes.append(Attribute("failureTime","number","Earliest possible time of failure",default=0.0))
self.attributes.append(Attribute("breakingStrength","number","Breaking strength",default=0.0))
self.attributes.append(Attribute("ea","number","Wire cross section stiffness",default=0.0))
self.attributes.append(Attribute("length","number","Initial, unstretched wire length",default=0.0))
self.attributes.append(Attribute("damping","number","Material damping",default=0.0))
self.attributes.append(Attribute("flexibility","number","Connection flexibility",default=0.0))
self.attributes.append(BlueprintAttribute("guidePointSpecifications","sima/simo/GuidePointSpecification","",True,Dimension("*")))
self.attributes.append(Attribute("constantTensionControl","boolean","Enable constant tension control for this wire",default=True))
self.attributes.append(Attribute("tensionLevel","number","Desired tension level",default=0.0))
self.attributes.append(Attribute("tensionDeadband","number","Tension level deadband",default=0.0))
self.attributes.append(Attribute("maxSpeed","number","Max wire length rate of change",default=0.0))
self.attributes.append(Attribute("activationTime","number","Activation time for constant tension control",default=0.0))
self.attributes.append(Attribute("deactivationTime","number","Deactivation time for constant tension control. If value is less then or equal to activation time, controller will remain active throughout simulation",default=0.0)) | [
1,
529,
9507,
29958,
4351,
29914,
29879,
2946,
29914,
3601,
29877,
29914,
9539,
2158,
29879,
29914,
12857,
22376,
16589,
10335,
29889,
2272,
13,
29937,
29871,
13,
29937,
3251,
630,
411,
12545,
29956,
533,
29907,
283,
10335,
21319,
2158,
13,
3166,
270,
4378,
29889,
9539,
2158,
1053,
10924,
2158,
13,
3166,
270,
4378,
29889,
6229,
2673,
1053,
4792,
2673,
13,
3166,
270,
4378,
29889,
12715,
1053,
23833,
13,
3166,
270,
4378,
29889,
18605,
29918,
12715,
1053,
1174,
398,
6708,
13,
3166,
270,
4378,
29889,
9539,
2158,
29918,
12715,
1053,
10924,
2158,
6708,
13,
3166,
869,
12857,
16589,
10335,
1053,
12545,
29907,
283,
10335,
21319,
2158,
13,
13,
1990,
12545,
29956,
533,
29907,
283,
10335,
21319,
2158,
29898,
15427,
29907,
283,
10335,
21319,
2158,
1125,
13,
1678,
9995,
15945,
29908,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
543,
15427,
29956,
533,
29907,
283,
10335,
613,
3577,
29918,
2084,
543,
29879,
2946,
29914,
3601,
29877,
613,
6139,
13776,
1125,
13,
4706,
2428,
2141,
1649,
2344,
12035,
978,
29892,
5113,
29918,
2084,
29892,
8216,
29897,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
6708,
703,
978,
3284,
1807,
3284,
613,
4381,
543,
5783,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
6708,
703,
8216,
3284,
1807,
3284,
613,
4381,
543,
5783,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
6708,
703,
29918,
333,
3284,
1807,
3284,
613,
4381,
543,
5783,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
21319,
2158,
6708,
703,
2154,
519,
9065,
3284,
29879,
2946,
29914,
29879,
2946,
29914,
4081,
519,
1917,
3284,
613,
5574,
29892,
16142,
2673,
703,
20605,
4961,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
21319,
2158,
6708,
703,
355,
5228,
29896,
3284,
29879,
2946,
29914,
3601,
29877,
29914,
5425,
6720,
8434,
5228,
3284,
613,
8824,
876,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
21319,
2158,
6708,
703,
355,
5228,
29906,
3284,
29879,
2946,
29914,
3601,
29877,
29914,
5425,
6720,
8434,
5228,
3284,
613,
8824,
876,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
16854,
6708,
703,
14057,
545,
6818,
3284,
29879,
2946,
29914,
3601,
29877,
29914,
21786,
362,
24155,
6818,
3284,
24155,
4464,
310,
23638,
1543,
5783,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
6708,
703,
14057,
545,
2481,
3284,
4537,
3284,
29923,
279,
20409,
1950,
931,
310,
10672,
613,
4381,
29922,
29900,
29889,
29900,
876,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
6708,
703,
1030,
5086,
5015,
1477,
3284,
4537,
3284,
20130,
5086,
9324,
613,
4381,
29922,
29900,
29889,
29900,
876,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
6708,
703,
11248,
3284,
4537,
3284,
29956,
533,
4891,
4004,
380,
2593,
2264,
613,
4381,
29922,
29900,
29889,
29900,
876,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
6708,
703,
2848,
3284,
4537,
3284,
15514,
29892,
443,
303,
10301,
287,
8014,
3309,
613,
4381,
29922,
29900,
29889,
29900,
876,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
6708,
703,
29881,
1160,
292,
3284,
4537,
3284,
24095,
270,
1160,
292,
613,
4381,
29922,
29900,
29889,
29900,
876,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
6708,
703,
16041,
4127,
3284,
4537,
3284,
5350,
8525,
4127,
613,
4381,
29922,
29900,
29889,
29900,
876,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
21319,
2158,
6708,
703,
13075,
5228,
10299,
8232,
3284,
29879,
2946,
29914,
3601,
29877,
29914,
9485,
680,
5228,
10299,
2450,
3284,
613,
5574,
29892,
16142,
2673,
703,
20605,
4961,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
6708,
703,
23362,
29911,
2673,
4809,
3284,
20054,
3284,
20701,
4868,
260,
2673,
2761,
363,
445,
8014,
613,
4381,
29922,
5574,
876,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
6708,
703,
29873,
2673,
10108,
3284,
4537,
3284,
4002,
2859,
260,
2673,
3233,
613,
4381,
29922,
29900,
29889,
29900,
876,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
6708,
703,
29873,
2673,
29928,
1479,
4980,
3284,
4537,
3284,
29911,
2673,
3233,
7123,
4980,
613,
4381,
29922,
29900,
29889,
29900,
876,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
6708,
703,
3317,
26539,
3284,
4537,
3284,
7976,
8014,
3309,
6554,
310,
1735,
613,
4381,
29922,
29900,
29889,
29900,
876,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
6708,
703,
11236,
362,
2481,
3284,
4537,
3284,
21786,
362,
931,
363,
4868,
260,
2673,
2761,
613,
4381,
29922,
29900,
29889,
29900,
876,
13,
4706,
1583,
29889,
15697,
29889,
4397,
29898,
6708,
703,
311,
11236,
362,
2481,
3284,
4537,
3284,
2772,
11236,
362,
931,
363,
4868,
260,
2673,
2761,
29889,
960,
995,
338,
3109,
769,
470,
5186,
304,
26229,
931,
29892,
4701,
674,
3933,
6136,
10106,
17402,
613,
4381,
29922,
29900,
29889,
29900,
876,
2
] |
heroes/heroes/apps.py | devrishik/Heroes | 0 | 106563 | <reponame>devrishik/Heroes
from django.apps import AppConfig
class HeroesConfig(AppConfig):
name = 'heroes.heroes'
verbose_name = "Heroes"
| [
1,
529,
276,
1112,
420,
29958,
3359,
29878,
728,
638,
29914,
29950,
1489,
267,
13,
3166,
9557,
29889,
13371,
1053,
2401,
3991,
13,
13,
13,
1990,
22167,
267,
3991,
29898,
2052,
3991,
1125,
13,
1678,
1024,
353,
525,
29882,
1489,
267,
29889,
29882,
1489,
267,
29915,
13,
1678,
26952,
29918,
978,
353,
376,
29950,
1489,
267,
29908,
13,
2
] |
visfbpic/static.py | georgeholt1/visfbpic | 1 | 119787 | <gh_stars>1-10
# Author: <NAME>
# License: MIT
# Version: 0.1.0
"""
Part of VISFBPIC.
Contains methods for creating static visualisations of the FBPIC data.
"""
import os
import sys
import importlib.util
import numpy as np
import matplotlib.pyplot as plt
plt.style.use(os.path.join(
os.path.split(__file__)[0], '_mpl_config', 'style.mplstyle'
))
def plot_plasma_profile(
n_file,
z_min,
z_max,
z_points=1000,
out_dir=None,
dpi=200,
figsize=(8, 4.5)
):
'''Create plot of plasma density profile.
Parameters
n_file : str
Path to file containing a function called `number_density`. The function
should take one argument: a value of z-position, and should return a
corresponding number density value. See `plasma_profile_example.py` for
an example.
z_min, z_max : float
Minimum and maximum values of the z-coordinate for the plasma profile.
z_points : int, optional
Number of points to sample the number density profile along z.
out_dir : str, optional
Path to output directory within which to save the animation. Defaults to
None, which shows the visualisation onscreen.
dpi : int, optional
Dots per inch resolution. Changing this parameter may result in a bad
plot layout. Defaults to 200.
figsize : tuple, optional
Figure size in the form (width, height). Changing this parameter may
results in a bad plot layout. Defaults to (8, 4.5).
'''
# initialise method from external file
spec = importlib.util.spec_from_file_location(
"plasma_profile",
n_file
)
number_density_mod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(number_density_mod)
# generate data
z_array = np.linspace(z_min, z_max, z_points)
n_array = []
for z in z_array:
n_array.append(number_density_mod.number_density(z))
n_array = np.array(n_array)
n_profile_max_oom = int(np.floor(np.log10(n_array.max())))
# plotting
fig, ax = plt.subplots()
ax.plot(
z_array*1e3,
n_array/10**n_profile_max_oom,
c='C1'
)
ax.set_xlabel('$z$ (mm)')
ax.set_ylabel(r'$n_e$ ($\times 10 ^ {{{}}}$'.format(
n_profile_max_oom-6
) + ' cm$^{-3}$)')
if out_dir is None:
plt.show()
else:
fig.savefig(os.path.join(out_dir, "plasma_profile.png"))
# unit testing
if __name__ == "__main__":
plot_plasma_profile(
sys.argv[1],
float(sys.argv[2]),
float(sys.argv[3]),
out_dir=sys.argv[4],
) | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
13361,
29901,
529,
5813,
29958,
13,
29937,
19245,
29901,
341,
1806,
13,
29937,
10079,
29901,
29871,
29900,
29889,
29896,
29889,
29900,
13,
15945,
29908,
13,
7439,
310,
478,
3235,
18426,
2227,
29907,
29889,
13,
13,
21409,
3519,
363,
4969,
2294,
7604,
275,
800,
310,
278,
28816,
2227,
29907,
848,
29889,
13,
15945,
29908,
13,
5215,
2897,
13,
5215,
10876,
13,
5215,
1053,
1982,
29889,
4422,
13,
5215,
12655,
408,
7442,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
13,
572,
29873,
29889,
3293,
29889,
1509,
29898,
359,
29889,
2084,
29889,
7122,
29898,
13,
1678,
2897,
29889,
2084,
29889,
5451,
22168,
1445,
1649,
9601,
29900,
1402,
22868,
29885,
572,
29918,
2917,
742,
525,
3293,
29889,
29885,
572,
3293,
29915,
13,
876,
13,
13,
13,
13,
1753,
6492,
29918,
572,
25392,
29918,
10185,
29898,
13,
1678,
302,
29918,
1445,
29892,
13,
1678,
503,
29918,
1195,
29892,
13,
1678,
503,
29918,
3317,
29892,
13,
1678,
503,
29918,
9748,
29922,
29896,
29900,
29900,
29900,
29892,
13,
1678,
714,
29918,
3972,
29922,
8516,
29892,
13,
1678,
270,
1631,
29922,
29906,
29900,
29900,
29892,
13,
1678,
2537,
2311,
7607,
29947,
29892,
29871,
29946,
29889,
29945,
29897,
13,
1125,
13,
1678,
14550,
4391,
6492,
310,
715,
25392,
9027,
8722,
29889,
13,
268,
13,
1678,
12662,
2699,
13,
1678,
302,
29918,
1445,
584,
851,
13,
4706,
10802,
304,
934,
6943,
263,
740,
2000,
421,
4537,
29918,
21518,
537,
1412,
450,
740,
13,
4706,
881,
2125,
697,
2980,
29901,
263,
995,
310,
503,
29899,
3283,
29892,
322,
881,
736,
263,
13,
4706,
6590,
1353,
9027,
995,
29889,
2823,
421,
572,
25392,
29918,
10185,
29918,
4773,
29889,
2272,
29952,
363,
13,
4706,
385,
1342,
29889,
13,
1678,
503,
29918,
1195,
29892,
503,
29918,
3317,
584,
5785,
13,
4706,
3080,
12539,
322,
7472,
1819,
310,
278,
503,
29899,
29302,
363,
278,
715,
25392,
8722,
29889,
13,
1678,
503,
29918,
9748,
584,
938,
29892,
13136,
13,
4706,
9681,
310,
3291,
304,
4559,
278,
1353,
9027,
8722,
3412,
503,
29889,
13,
1678,
714,
29918,
3972,
584,
851,
29892,
13136,
13,
4706,
10802,
304,
1962,
3884,
2629,
607,
304,
4078,
278,
9612,
29889,
13109,
29879,
304,
13,
4706,
6213,
29892,
607,
3697,
278,
7604,
4371,
373,
10525,
29889,
13,
1678,
270,
1631,
584,
938,
29892,
13136,
13,
4706,
360,
1862,
639,
297,
305,
10104,
29889,
678,
9776,
445,
3443,
1122,
1121,
297,
263,
4319,
13,
4706,
6492,
5912,
29889,
13109,
29879,
304,
29871,
29906,
29900,
29900,
29889,
13,
1678,
2537,
2311,
584,
18761,
29892,
13136,
13,
4706,
11479,
2159,
297,
278,
883,
313,
2103,
29892,
3171,
467,
678,
9776,
445,
3443,
1122,
13,
4706,
2582,
297,
263,
4319,
6492,
5912,
29889,
13109,
29879,
304,
313,
29947,
29892,
29871,
29946,
29889,
29945,
467,
13,
1678,
14550,
13,
1678,
396,
2847,
895,
1158,
515,
7029,
934,
13,
1678,
1580,
353,
1053,
1982,
29889,
4422,
29889,
6550,
29918,
3166,
29918,
1445,
29918,
5479,
29898,
13,
4706,
376,
572,
25392,
29918,
10185,
613,
13,
4706,
302,
29918,
1445,
13,
1678,
1723,
13,
1678,
1353,
29918,
21518,
537,
29918,
1545,
353,
1053,
1982,
29889,
4422,
29889,
5453,
29918,
3166,
29918,
6550,
29898,
6550,
29897,
13,
1678,
1580,
29889,
12657,
29889,
4258,
29918,
5453,
29898,
4537,
29918,
21518,
537,
29918,
1545,
29897,
13,
268,
13,
1678,
396,
5706,
848,
13,
1678,
503,
29918,
2378,
353,
7442,
29889,
1915,
3493,
29898,
29920,
29918,
1195,
29892,
503,
29918,
3317,
29892,
503,
29918,
9748,
29897,
13,
1678,
302,
29918,
2378,
353,
5159,
13,
1678,
363,
503,
297,
503,
29918,
2378,
29901,
13,
4706,
302,
29918,
2378,
29889,
4397,
29898,
4537,
29918,
21518,
537,
29918,
1545,
29889,
4537,
29918,
21518,
537,
29898,
29920,
876,
13,
1678,
302,
29918,
2378,
353,
7442,
29889,
2378,
29898,
29876,
29918,
2378,
29897,
13,
1678,
302,
29918,
10185,
29918,
3317,
29918,
29667,
353,
938,
29898,
9302,
29889,
14939,
29898,
9302,
29889,
1188,
29896,
29900,
29898,
29876,
29918,
2378,
29889,
3317,
580,
4961,
13,
268,
13,
1678,
396,
6492,
1259,
13,
1678,
2537,
29892,
4853,
353,
14770,
29889,
1491,
26762,
580,
13,
1678,
4853,
29889,
5317,
29898,
13,
4706,
503,
29918,
2378,
29930,
29896,
29872,
29941,
29892,
13,
4706,
302,
29918,
2378,
29914,
29896,
29900,
1068,
29876,
29918,
10185,
29918,
3317,
29918,
29667,
29892,
13,
4706,
274,
2433,
29907,
29896,
29915,
13,
1678,
1723,
13,
268,
13,
1678,
4853,
29889,
842,
29918,
29916,
1643,
877,
29938,
29920,
29938,
313,
4317,
29897,
1495,
13,
1678,
4853,
29889,
842,
29918,
29891,
1643,
29898,
29878,
13090,
29876,
29918,
29872,
29938,
20430,
3706,
29871,
29896,
29900,
6228,
426,
6224,
930,
1042,
4286,
4830,
29898,
13,
4706,
302,
29918,
10185,
29918,
3317,
29918,
29667,
29899,
29953,
13,
1678,
1723,
718,
525,
7477,
29938,
3426,
29941,
1042,
29897,
1495,
13,
268,
13,
1678,
565,
714,
29918,
3972,
338,
6213,
29901,
13,
4706,
14770,
29889,
4294,
580,
13,
1678,
1683,
29901,
13,
4706,
2537,
29889,
7620,
1003,
29898,
359,
29889,
2084,
29889,
7122,
29898,
449,
29918,
3972,
29892,
376,
572,
25392,
29918,
10185,
29889,
2732,
5783,
13,
308,
13,
308,
13,
308,
13,
29937,
5190,
6724,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
6492,
29918,
572,
25392,
29918,
10185,
29898,
13,
4706,
10876,
29889,
19218,
29961,
29896,
1402,
13,
4706,
5785,
29898,
9675,
29889,
19218,
29961,
29906,
11724,
13,
4706,
5785,
29898,
9675,
29889,
19218,
29961,
29941,
11724,
13,
4706,
714,
29918,
3972,
29922,
9675,
29889,
19218,
29961,
29946,
1402,
13,
1678,
1723,
2
] |
python/rhinoscripts/example_csv_loading.py | tasbolat1/hmv-s16 | 1 | 15414 | <gh_stars>1-10
"""Example code for importing a single rigid body trajectory into Rhino from a Optitrack CSV file.
Copyright (c) 2016, <NAME>. All rights reserved. Licensed under the terms
of the BSD 3-clause license as included in LICENSE.
Example code for generating a path of Rhino 'planes' (e.g. coordinate frame)
from a trajectory data file. The path is returned as a list of Plane objects.
Each plane is created using an origin vector and X and Y basis vectors. The
time stamps and Z basis vectors in the trajectory file are ignored.
"""
# Load the Rhino API.
import rhinoscriptsyntax as rs
# Make sure that the Python libraries also contained within this course package
# are on the load path. This adds the parent folder to the load path, assuming that this
# script is still located with the rhinoscripts/ subfolder of the Python library tree.
import sys, os
sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
# Load the Optitrack CSV file parser module.
import optitrack.csv_reader as csv
from optitrack.geometry import *
# Find the path to the test data file located alongside the script.
filename = os.path.join( os.path.abspath(os.path.dirname(__file__)), "sample_optitrack_take.csv")
# Read the file.
take = csv.Take().readCSV(filename)
# Print out some statistics
print "Found rigid bodies:", take.rigid_bodies.keys()
# Process the first rigid body into a set of planes.
bodies = take.rigid_bodies.values()
# for now:
xaxis = [1,0,0]
yaxis = [0,1,0]
if len(bodies) > 0:
body = bodies[0]
for pos,rot in zip(body.positions, body.rotations):
if pos is not None and rot is not None:
xaxis, yaxis = quaternion_to_xaxis_yaxis(rot)
plane = rs.PlaneFromFrame(pos, xaxis, yaxis)
# create a visible plane, assuming units are in meters
rs.AddPlaneSurface( plane, 0.1, 0.1 )
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
14023,
775,
363,
28348,
263,
2323,
12912,
333,
3573,
23324,
706,
964,
7861,
1789,
515,
263,
20693,
277,
22282,
16874,
934,
29889,
13,
13,
11882,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29953,
29892,
529,
5813,
15513,
29871,
2178,
10462,
21676,
29889,
10413,
21144,
1090,
278,
4958,
13,
974,
278,
350,
7230,
29871,
29941,
29899,
16398,
1509,
19405,
408,
5134,
297,
365,
2965,
1430,
1660,
29889,
13,
13,
14023,
775,
363,
14655,
263,
2224,
310,
7861,
1789,
525,
9018,
267,
29915,
313,
29872,
29889,
29887,
29889,
14821,
3515,
29897,
13,
3166,
263,
23324,
706,
848,
934,
29889,
29871,
450,
2224,
338,
4133,
408,
263,
1051,
310,
1858,
1662,
3618,
29889,
13,
13,
9760,
10694,
338,
2825,
773,
385,
3978,
4608,
322,
1060,
322,
612,
8405,
12047,
29889,
29871,
450,
13,
2230,
380,
15092,
322,
796,
8405,
12047,
297,
278,
23324,
706,
934,
526,
17262,
29889,
13,
15945,
29908,
13,
13,
29937,
16012,
278,
7861,
1789,
3450,
29889,
13,
5215,
18178,
8226,
924,
29562,
408,
20371,
13,
13,
13,
29937,
8561,
1854,
393,
278,
5132,
9562,
884,
11122,
2629,
445,
3236,
3577,
13,
29937,
526,
373,
278,
2254,
2224,
29889,
29871,
910,
12778,
278,
3847,
4138,
304,
278,
2254,
2224,
29892,
10241,
393,
445,
13,
29937,
2471,
338,
1603,
5982,
411,
278,
18178,
8226,
924,
29879,
29914,
1014,
12083,
310,
278,
5132,
3489,
5447,
29889,
13,
5215,
10876,
29892,
2897,
13,
9675,
29889,
2084,
29889,
7851,
29898,
29900,
29892,
2897,
29889,
2084,
29889,
25721,
29898,
359,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
13697,
13,
13,
29937,
16012,
278,
20693,
277,
22282,
16874,
934,
13812,
3883,
29889,
13,
5215,
3523,
277,
22282,
29889,
7638,
29918,
16950,
408,
11799,
13,
3166,
3523,
277,
22282,
29889,
19156,
1053,
334,
13,
13,
29937,
10987,
278,
2224,
304,
278,
1243,
848,
934,
5982,
19963,
278,
2471,
29889,
13,
9507,
353,
2897,
29889,
2084,
29889,
7122,
29898,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
8243,
376,
11249,
29918,
3670,
277,
22282,
29918,
19730,
29889,
7638,
1159,
13,
13,
29937,
7523,
278,
934,
29889,
13,
19730,
353,
11799,
29889,
26772,
2141,
949,
29907,
7597,
29898,
9507,
29897,
13,
13,
29937,
13905,
714,
777,
13964,
13,
2158,
376,
9692,
12912,
333,
17873,
29901,
613,
2125,
29889,
8966,
333,
29918,
29890,
397,
583,
29889,
8149,
580,
13,
13,
29937,
10554,
278,
937,
12912,
333,
3573,
964,
263,
731,
310,
3814,
267,
29889,
13,
29890,
397,
583,
353,
2125,
29889,
8966,
333,
29918,
29890,
397,
583,
29889,
5975,
580,
13,
13,
29937,
363,
1286,
29901,
13,
29916,
8990,
353,
518,
29896,
29892,
29900,
29892,
29900,
29962,
13,
29891,
8990,
353,
518,
29900,
29892,
29896,
29892,
29900,
29962,
13,
13,
361,
7431,
29898,
29890,
397,
583,
29897,
1405,
29871,
29900,
29901,
13,
1678,
3573,
353,
17873,
29961,
29900,
29962,
13,
1678,
363,
926,
29892,
5450,
297,
14319,
29898,
2587,
29889,
1066,
2187,
29892,
3573,
29889,
5450,
800,
1125,
13,
4706,
565,
926,
338,
451,
6213,
322,
5731,
338,
451,
6213,
29901,
13,
9651,
921,
8990,
29892,
343,
8990,
353,
439,
25744,
291,
29918,
517,
29918,
29916,
8990,
29918,
29891,
8990,
29898,
5450,
29897,
13,
9651,
10694,
353,
20371,
29889,
3247,
1662,
4591,
4308,
29898,
1066,
29892,
921,
8990,
29892,
343,
8990,
29897,
13,
13,
9651,
396,
1653,
263,
7962,
10694,
29892,
10241,
10340,
526,
297,
27881,
13,
9651,
20371,
29889,
2528,
3247,
1662,
18498,
2161,
29898,
10694,
29892,
29871,
29900,
29889,
29896,
29892,
29871,
29900,
29889,
29896,
1723,
13,
2
] |
models/attention_ensemble_diff_layers.py | tlatkowski/attention-ensemble-gene-expression | 0 | 35479 | import tensorflow as tf
from layers.attention_layers import attention_layer
from layers.common_layers import init_inputs
from layers.feed_forward_layers import feed_forward_diff_features, feed_forward_diff_layers
from utils.hyperparams import Hyperparams as hp
class AttentionBasedEnsembleNets:
def __init__(self, selection_methods, num_features, learning_rate=0.01):
with tf.name_scope('input'):
self.nn_inputs = init_inputs(num_features, selection_methods)
self.labels = tf.placeholder(dtype=tf.float32, shape=[None, 1], name='labels')
with tf.name_scope('ff'):
nets = {'fisher': [200, 50], 'ttest': [200, 50], 'corr': [200, 50], 'random': [200, 50]}
feed_forward = feed_forward_diff_layers(self.nn_inputs, nets)
with tf.name_scope('output'):
out = attention_layer(feed_forward, attention_size=50)
logits = tf.layers.dense(out, units=1)
sig = tf.nn.sigmoid(logits)
predictions = tf.round(sig)
with tf.name_scope('train'):
self.loss = tf.losses.sigmoid_cross_entropy(
multi_class_labels=self.labels, logits=logits)
self.opt = tf.train.AdamOptimizer(learning_rate=learning_rate).minimize(self.loss)
with tf.name_scope('summaries'):
self.acc = tf.reduce_mean((predictions * self.labels) + ((1 - predictions) * (1 - self.labels)))
self.precision, precision_op = tf.metrics.precision(self.labels, predictions)
# summaries
tf.summary.scalar('loss', self.loss)
tf.summary.scalar('accuracy', self.acc)
tf.summary.scalar('precision_op', precision_op)
self.merged_summary_op = tf.summary.merge_all()
| [
1,
1053,
26110,
408,
15886,
13,
13,
3166,
15359,
29889,
1131,
2509,
29918,
29277,
1053,
8570,
29918,
13148,
13,
3166,
15359,
29889,
9435,
29918,
29277,
1053,
2069,
29918,
2080,
29879,
13,
3166,
15359,
29889,
18798,
29918,
11333,
29918,
29277,
1053,
8343,
29918,
11333,
29918,
12765,
29918,
22100,
29892,
8343,
29918,
11333,
29918,
12765,
29918,
29277,
13,
3166,
3667,
29879,
29889,
24947,
7529,
1053,
26078,
7529,
408,
298,
29886,
13,
13,
13,
1990,
6212,
2509,
29933,
1463,
29923,
1983,
6967,
29940,
1691,
29901,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
9262,
29918,
23515,
29892,
954,
29918,
22100,
29892,
6509,
29918,
10492,
29922,
29900,
29889,
29900,
29896,
1125,
13,
13,
4706,
411,
15886,
29889,
978,
29918,
6078,
877,
2080,
29374,
13,
9651,
1583,
29889,
15755,
29918,
2080,
29879,
353,
2069,
29918,
2080,
29879,
29898,
1949,
29918,
22100,
29892,
9262,
29918,
23515,
29897,
13,
9651,
1583,
29889,
21134,
353,
15886,
29889,
27074,
29898,
29881,
1853,
29922,
13264,
29889,
7411,
29941,
29906,
29892,
8267,
11759,
8516,
29892,
29871,
29896,
1402,
1024,
2433,
21134,
1495,
13,
13,
4706,
411,
15886,
29889,
978,
29918,
6078,
877,
600,
29374,
13,
9651,
302,
1691,
353,
11117,
15161,
261,
2396,
518,
29906,
29900,
29900,
29892,
29871,
29945,
29900,
1402,
525,
698,
342,
2396,
518,
29906,
29900,
29900,
29892,
29871,
29945,
29900,
1402,
525,
29725,
2396,
518,
29906,
29900,
29900,
29892,
29871,
29945,
29900,
1402,
525,
8172,
2396,
518,
29906,
29900,
29900,
29892,
29871,
29945,
29900,
12258,
13,
9651,
8343,
29918,
11333,
353,
8343,
29918,
11333,
29918,
12765,
29918,
29277,
29898,
1311,
29889,
15755,
29918,
2080,
29879,
29892,
302,
1691,
29897,
13,
4706,
411,
15886,
29889,
978,
29918,
6078,
877,
4905,
29374,
13,
9651,
714,
353,
8570,
29918,
13148,
29898,
18798,
29918,
11333,
29892,
8570,
29918,
2311,
29922,
29945,
29900,
29897,
13,
9651,
1480,
1169,
353,
15886,
29889,
29277,
29889,
1145,
344,
29898,
449,
29892,
10340,
29922,
29896,
29897,
13,
9651,
4365,
353,
15886,
29889,
15755,
29889,
18816,
29885,
3398,
29898,
1188,
1169,
29897,
13,
9651,
27303,
353,
15886,
29889,
14486,
29898,
18816,
29897,
13,
13,
4706,
411,
15886,
29889,
978,
29918,
6078,
877,
14968,
29374,
13,
9651,
1583,
29889,
6758,
353,
15886,
29889,
6758,
267,
29889,
18816,
29885,
3398,
29918,
19128,
29918,
296,
14441,
29898,
13,
462,
29871,
2473,
29918,
1990,
29918,
21134,
29922,
1311,
29889,
21134,
29892,
1480,
1169,
29922,
1188,
1169,
29897,
13,
9651,
1583,
29889,
3670,
353,
15886,
29889,
14968,
29889,
3253,
314,
20624,
326,
3950,
29898,
21891,
29918,
10492,
29922,
21891,
29918,
10492,
467,
1195,
326,
675,
29898,
1311,
29889,
6758,
29897,
13,
13,
4706,
411,
15886,
29889,
978,
29918,
6078,
877,
2083,
3034,
583,
29374,
13,
9651,
1583,
29889,
5753,
353,
15886,
29889,
17469,
29918,
12676,
3552,
27711,
1080,
334,
1583,
29889,
21134,
29897,
718,
5135,
29896,
448,
27303,
29897,
334,
313,
29896,
448,
1583,
29889,
21134,
4961,
13,
9651,
1583,
29889,
17990,
2459,
29892,
16716,
29918,
459,
353,
15886,
29889,
2527,
10817,
29889,
17990,
2459,
29898,
1311,
29889,
21134,
29892,
27303,
29897,
13,
9651,
396,
19138,
583,
13,
9651,
15886,
29889,
7727,
29889,
19529,
279,
877,
6758,
742,
1583,
29889,
6758,
29897,
13,
9651,
15886,
29889,
7727,
29889,
19529,
279,
877,
562,
2764,
4135,
742,
1583,
29889,
5753,
29897,
13,
9651,
15886,
29889,
7727,
29889,
19529,
279,
877,
17990,
2459,
29918,
459,
742,
16716,
29918,
459,
29897,
13,
9651,
1583,
29889,
1050,
3192,
29918,
7727,
29918,
459,
353,
15886,
29889,
7727,
29889,
14634,
29918,
497,
580,
13,
2
] |
kmip/services/results.py | ondrap/PyKMIP | 179 | 78665 | # Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
class OperationResult(object):
def __init__(self,
result_status,
result_reason=None,
result_message=None):
self.result_status = result_status
if result_reason is not None:
self.result_reason = result_reason
else:
self.result_reason = None
if result_message is not None:
self.result_message = result_message
else:
self.result_message = None
class CreateResult(OperationResult):
def __init__(self,
result_status,
result_reason=None,
result_message=None,
object_type=None,
uuid=None,
template_attribute=None):
super(CreateResult, self).__init__(
result_status, result_reason, result_message)
if object_type is not None:
self.object_type = object_type
else:
self.object_type = None
if uuid is not None:
self.uuid = uuid
else:
self.uuid = None
if template_attribute is not None:
self.template_attribute = template_attribute
else:
self.template_attribute = None
class CreateKeyPairResult(OperationResult):
def __init__(self,
result_status,
result_reason=None,
result_message=None,
private_key_uuid=None,
public_key_uuid=None,
private_key_template_attribute=None,
public_key_template_attribute=None):
super(CreateKeyPairResult, self).__init__(
result_status, result_reason, result_message)
self.private_key_uuid = private_key_uuid
self.public_key_uuid = public_key_uuid
self.private_key_template_attribute = private_key_template_attribute
self.public_key_template_attribute = public_key_template_attribute
class ActivateResult(OperationResult):
def __init__(self,
result_status,
result_reason=None,
result_message=None,
uuid=None):
super(ActivateResult, self).__init__(
result_status, result_reason, result_message)
if uuid is not None:
self.uuid = uuid
else:
self.uuid = None
class RegisterResult(OperationResult):
def __init__(self,
result_status,
result_reason=None,
result_message=None,
uuid=None,
template_attribute=None):
super(RegisterResult, self).__init__(
result_status, result_reason, result_message)
if uuid is not None:
self.uuid = uuid
else:
self.uuid = None
if template_attribute is not None:
self.template_attribute = template_attribute
else:
self.template_attribute = None
class RekeyKeyPairResult(CreateKeyPairResult):
def __init__(self,
result_status,
result_reason=None,
result_message=None,
private_key_uuid=None,
public_key_uuid=None,
private_key_template_attribute=None,
public_key_template_attribute=None):
super(RekeyKeyPairResult, self).__init__(
result_status, result_reason, result_message, private_key_uuid,
public_key_uuid, private_key_template_attribute,
public_key_template_attribute)
class GetResult(OperationResult):
def __init__(self,
result_status,
result_reason=None,
result_message=None,
object_type=None,
uuid=None,
secret=None):
super(GetResult, self).__init__(
result_status, result_reason, result_message)
if object_type is not None:
self.object_type = object_type
else:
self.object_type = None
if uuid is not None:
self.uuid = uuid
else:
self.uuid = None
if secret is not None:
self.secret = secret
else:
self.secret = None
class GetAttributesResult(OperationResult):
def __init__(
self,
result_status,
result_reason=None,
result_message=None,
uuid=None,
attributes=None
):
super(GetAttributesResult, self).__init__(
result_status,
result_reason,
result_message
)
self.uuid = uuid
self.attributes = attributes
class GetAttributeListResult(OperationResult):
def __init__(
self,
result_status,
result_reason=None,
result_message=None,
uid=None,
names=None):
super(GetAttributeListResult, self).__init__(
result_status, result_reason, result_message)
self.uid = uid
self.names = names
class DestroyResult(OperationResult):
def __init__(self,
result_status,
result_reason=None,
result_message=None,
uuid=None):
super(DestroyResult, self).__init__(
result_status, result_reason, result_message)
if uuid is not None:
self.uuid = uuid
else:
self.uuid = None
class LocateResult(OperationResult):
def __init__(self,
result_status,
result_reason=None,
result_message=None,
uuids=None):
super(LocateResult, self).__init__(
result_status, result_reason, result_message)
self.uuids = uuids
class QueryResult(OperationResult):
"""
A container for the results of a Query operation.
Attributes:
result_status: The status of the Query operation (e.g., success or
failure).
result_reason: The reason for the operation status.
result_message: Extra information pertaining to the status reason.
operations: A list of Operations supported by the server.
object_types: A list of Object Types supported by the server.
vendor_identification:
server_information:
application_namespaces: A list of namespaces supported by the server.
extension_information: A list of extensions supported by the server.
"""
def __init__(self,
result_status,
result_reason=None,
result_message=None,
operations=None,
object_types=None,
vendor_identification=None,
server_information=None,
application_namespaces=None,
extension_information=None):
super(QueryResult, self).__init__(
result_status, result_reason, result_message)
if operations is None:
self.operations = list()
else:
self.operations = operations
if object_types is None:
self.object_types = list()
else:
self.object_types = object_types
self.vendor_identification = vendor_identification
self.server_information = server_information
if application_namespaces is None:
self.application_namespaces = list()
else:
self.application_namespaces = application_namespaces
if extension_information is None:
self.extension_information = list()
else:
self.extension_information = extension_information
class DiscoverVersionsResult(OperationResult):
def __init__(self,
result_status,
result_reason=None,
result_message=None,
protocol_versions=None):
super(DiscoverVersionsResult, self).__init__(
result_status, result_reason, result_message)
self.protocol_versions = protocol_versions
class RevokeResult(OperationResult):
def __init__(self,
result_status,
result_reason=None,
result_message=None,
unique_identifier=None):
super(RevokeResult, self).__init__(
result_status, result_reason, result_message)
self.unique_identifier = unique_identifier
class MACResult(OperationResult):
def __init__(self,
result_status,
result_reason=None,
result_message=None,
uuid=None,
mac_data=None):
super(MACResult, self).__init__(
result_status,
result_reason,
result_message
)
self.uuid = uuid
self.mac_data = mac_data
| [
1,
396,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29946,
450,
1861,
1983,
20727,
11335,
3014,
29914,
2052,
2957,
29837,
16715,
7606,
13,
29937,
2178,
26863,
2538,
9841,
29889,
13,
29937,
13,
29937,
10413,
21144,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
376,
29931,
293,
1947,
1496,
366,
1122,
13,
29937,
451,
671,
445,
934,
5174,
297,
752,
13036,
411,
278,
19245,
29889,
887,
1122,
4017,
13,
29937,
263,
3509,
310,
278,
19245,
472,
13,
29937,
13,
29937,
1678,
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,
399,
1806,
8187,
2692,
13,
29937,
399,
1718,
29934,
13566,
29059,
6323,
8707,
29928,
22122,
29903,
8079,
13764,
29979,
476,
22255,
29892,
2845,
4653,
470,
2411,
2957,
29889,
2823,
278,
13,
29937,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
27028,
13,
29937,
1090,
278,
19245,
29889,
13,
13,
13,
1990,
20462,
3591,
29898,
3318,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
1121,
29918,
4882,
29892,
13,
462,
1121,
29918,
23147,
29922,
8516,
29892,
13,
462,
1121,
29918,
4906,
29922,
8516,
1125,
13,
4706,
1583,
29889,
2914,
29918,
4882,
353,
1121,
29918,
4882,
13,
13,
4706,
565,
1121,
29918,
23147,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
2914,
29918,
23147,
353,
1121,
29918,
23147,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
2914,
29918,
23147,
353,
6213,
13,
13,
4706,
565,
1121,
29918,
4906,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
2914,
29918,
4906,
353,
1121,
29918,
4906,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
2914,
29918,
4906,
353,
6213,
13,
13,
13,
1990,
6204,
3591,
29898,
10925,
3591,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
1121,
29918,
4882,
29892,
13,
462,
1121,
29918,
23147,
29922,
8516,
29892,
13,
462,
1121,
29918,
4906,
29922,
8516,
29892,
13,
462,
1203,
29918,
1853,
29922,
8516,
29892,
13,
462,
318,
5416,
29922,
8516,
29892,
13,
462,
4472,
29918,
12715,
29922,
8516,
1125,
13,
4706,
2428,
29898,
4391,
3591,
29892,
1583,
467,
1649,
2344,
12035,
13,
9651,
1121,
29918,
4882,
29892,
1121,
29918,
23147,
29892,
1121,
29918,
4906,
29897,
13,
4706,
565,
1203,
29918,
1853,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
3318,
29918,
1853,
353,
1203,
29918,
1853,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
3318,
29918,
1853,
353,
6213,
13,
13,
4706,
565,
318,
5416,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
25118,
353,
318,
5416,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
25118,
353,
6213,
13,
13,
4706,
565,
4472,
29918,
12715,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
6886,
29918,
12715,
353,
4472,
29918,
12715,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
6886,
29918,
12715,
353,
6213,
13,
13,
13,
1990,
6204,
2558,
20547,
3591,
29898,
10925,
3591,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
1121,
29918,
4882,
29892,
13,
462,
1121,
29918,
23147,
29922,
8516,
29892,
13,
462,
1121,
29918,
4906,
29922,
8516,
29892,
13,
462,
2024,
29918,
1989,
29918,
25118,
29922,
8516,
29892,
13,
462,
970,
29918,
1989,
29918,
25118,
29922,
8516,
29892,
13,
462,
2024,
29918,
1989,
29918,
6886,
29918,
12715,
29922,
8516,
29892,
13,
462,
970,
29918,
1989,
29918,
6886,
29918,
12715,
29922,
8516,
1125,
13,
4706,
2428,
29898,
4391,
2558,
20547,
3591,
29892,
1583,
467,
1649,
2344,
12035,
13,
9651,
1121,
29918,
4882,
29892,
1121,
29918,
23147,
29892,
1121,
29918,
4906,
29897,
13,
4706,
1583,
29889,
9053,
29918,
1989,
29918,
25118,
353,
2024,
29918,
1989,
29918,
25118,
13,
4706,
1583,
29889,
3597,
29918,
1989,
29918,
25118,
353,
970,
29918,
1989,
29918,
25118,
13,
4706,
1583,
29889,
9053,
29918,
1989,
29918,
6886,
29918,
12715,
353,
2024,
29918,
1989,
29918,
6886,
29918,
12715,
13,
4706,
1583,
29889,
3597,
29918,
1989,
29918,
6886,
29918,
12715,
353,
970,
29918,
1989,
29918,
6886,
29918,
12715,
13,
13,
13,
1990,
21775,
403,
3591,
29898,
10925,
3591,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
1121,
29918,
4882,
29892,
13,
462,
1121,
29918,
23147,
29922,
8516,
29892,
13,
462,
1121,
29918,
4906,
29922,
8516,
29892,
13,
462,
318,
5416,
29922,
8516,
1125,
13,
4706,
2428,
29898,
21786,
403,
3591,
29892,
1583,
467,
1649,
2344,
12035,
13,
9651,
1121,
29918,
4882,
29892,
1121,
29918,
23147,
29892,
1121,
29918,
4906,
29897,
13,
13,
4706,
565,
318,
5416,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
25118,
353,
318,
5416,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
25118,
353,
6213,
13,
13,
13,
1990,
12577,
3591,
29898,
10925,
3591,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
1121,
29918,
4882,
29892,
13,
462,
1121,
29918,
23147,
29922,
8516,
29892,
13,
462,
1121,
29918,
4906,
29922,
8516,
29892,
13,
462,
318,
5416,
29922,
8516,
29892,
13,
462,
4472,
29918,
12715,
29922,
8516,
1125,
13,
4706,
2428,
29898,
15213,
3591,
29892,
1583,
467,
1649,
2344,
12035,
13,
9651,
1121,
29918,
4882,
29892,
1121,
29918,
23147,
29892,
1121,
29918,
4906,
29897,
13,
4706,
565,
318,
5416,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
25118,
353,
318,
5416,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
25118,
353,
6213,
13,
13,
4706,
565,
4472,
29918,
12715,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
6886,
29918,
12715,
353,
4472,
29918,
12715,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
6886,
29918,
12715,
353,
6213,
13,
13,
13,
1990,
830,
1989,
2558,
20547,
3591,
29898,
4391,
2558,
20547,
3591,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
1121,
29918,
4882,
29892,
13,
462,
1121,
29918,
23147,
29922,
8516,
29892,
13,
462,
1121,
29918,
4906,
29922,
8516,
29892,
13,
462,
2024,
29918,
1989,
29918,
25118,
29922,
8516,
29892,
13,
462,
970,
29918,
1989,
29918,
25118,
29922,
8516,
29892,
13,
462,
2024,
29918,
1989,
29918,
6886,
29918,
12715,
29922,
8516,
29892,
13,
462,
970,
29918,
1989,
29918,
6886,
29918,
12715,
29922,
8516,
1125,
13,
4706,
2428,
29898,
1123,
1989,
2558,
20547,
3591,
29892,
1583,
467,
1649,
2344,
12035,
13,
9651,
1121,
29918,
4882,
29892,
1121,
29918,
23147,
29892,
1121,
29918,
4906,
29892,
2024,
29918,
1989,
29918,
25118,
29892,
13,
9651,
970,
29918,
1989,
29918,
25118,
29892,
2024,
29918,
1989,
29918,
6886,
29918,
12715,
29892,
13,
9651,
970,
29918,
1989,
29918,
6886,
29918,
12715,
29897,
13,
13,
13,
1990,
3617,
3591,
29898,
10925,
3591,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
1121,
29918,
4882,
29892,
13,
462,
1121,
29918,
23147,
29922,
8516,
29892,
13,
462,
1121,
29918,
4906,
29922,
8516,
29892,
13,
462,
1203,
29918,
1853,
29922,
8516,
29892,
13,
462,
318,
5416,
29922,
8516,
29892,
13,
462,
7035,
29922,
8516,
1125,
13,
4706,
2428,
29898,
2577,
3591,
29892,
1583,
467,
1649,
2344,
12035,
13,
9651,
1121,
29918,
4882,
29892,
1121,
29918,
23147,
29892,
1121,
29918,
4906,
29897,
13,
4706,
565,
1203,
29918,
1853,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
3318,
29918,
1853,
353,
1203,
29918,
1853,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
3318,
29918,
1853,
353,
6213,
13,
13,
4706,
565,
318,
5416,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
25118,
353,
318,
5416,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
25118,
353,
6213,
13,
13,
4706,
565,
7035,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
19024,
353,
7035,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
19024,
353,
6213,
13,
13,
13,
1990,
3617,
15801,
3591,
29898,
10925,
3591,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
13,
9651,
1583,
29892,
13,
9651,
1121,
29918,
4882,
29892,
13,
9651,
1121,
29918,
23147,
29922,
8516,
29892,
13,
9651,
1121,
29918,
4906,
29922,
8516,
29892,
13,
9651,
318,
5416,
29922,
8516,
29892,
13,
9651,
8393,
29922,
8516,
13,
268,
1125,
13,
4706,
2428,
29898,
2577,
15801,
3591,
29892,
1583,
467,
1649,
2344,
12035,
13,
9651,
1121,
29918,
4882,
29892,
13,
9651,
1121,
29918,
23147,
29892,
13,
9651,
1121,
29918,
4906,
13,
4706,
1723,
13,
4706,
1583,
29889,
25118,
353,
318,
5416,
13,
4706,
1583,
29889,
15697,
353,
8393,
13,
13,
13,
1990,
3617,
6708,
1293,
3591,
29898,
10925,
3591,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
13,
9651,
1583,
29892,
13,
9651,
1121,
29918,
4882,
29892,
13,
9651,
1121,
29918,
23147,
29922,
8516,
29892,
13,
9651,
1121,
29918,
4906,
29922,
8516,
29892,
13,
9651,
318,
333,
29922,
8516,
29892,
13,
9651,
2983,
29922,
8516,
1125,
13,
4706,
2428,
29898,
2577,
6708,
1293,
3591,
29892,
1583,
467,
1649,
2344,
12035,
13,
9651,
1121,
29918,
4882,
29892,
1121,
29918,
23147,
29892,
1121,
29918,
4906,
29897,
13,
4706,
1583,
29889,
5416,
353,
318,
333,
13,
4706,
1583,
29889,
7039,
353,
2983,
13,
13,
13,
1990,
15435,
4727,
3591,
29898,
10925,
3591,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
1121,
29918,
4882,
29892,
13,
462,
1121,
29918,
23147,
29922,
8516,
29892,
13,
462,
1121,
29918,
4906,
29922,
8516,
29892,
13,
462,
318,
5416,
29922,
8516,
1125,
13,
4706,
2428,
29898,
14994,
4727,
3591,
29892,
1583,
467,
1649,
2344,
12035,
13,
9651,
1121,
29918,
4882,
29892,
1121,
29918,
23147,
29892,
1121,
29918,
4906,
29897,
13,
4706,
565,
318,
5416,
338,
451,
6213,
29901,
13,
9651,
1583,
29889,
25118,
353,
318,
5416,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
25118,
353,
6213,
13,
13,
13,
1990,
5976,
403,
3591,
29898,
10925,
3591,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
1121,
29918,
4882,
29892,
13,
462,
1121,
29918,
23147,
29922,
8516,
29892,
13,
462,
1121,
29918,
4906,
29922,
8516,
29892,
13,
462,
318,
29884,
4841,
29922,
8516,
1125,
13,
4706,
2428,
29898,
3524,
403,
3591,
29892,
1583,
467,
1649,
2344,
12035,
13,
9651,
1121,
29918,
4882,
29892,
1121,
29918,
23147,
29892,
1121,
29918,
4906,
29897,
13,
4706,
1583,
29889,
29884,
29884,
4841,
353,
318,
29884,
4841,
13,
13,
13,
1990,
13641,
3591,
29898,
10925,
3591,
1125,
13,
1678,
9995,
13,
1678,
319,
5639,
363,
278,
2582,
310,
263,
13641,
5858,
29889,
13,
13,
1678,
6212,
5026,
29901,
13,
4706,
1121,
29918,
4882,
29901,
450,
4660,
310,
278,
13641,
5858,
313,
29872,
29889,
29887,
1696,
2551,
470,
13,
9651,
10672,
467,
13,
4706,
1121,
29918,
23147,
29901,
450,
2769,
363,
278,
5858,
4660,
29889,
13,
4706,
1121,
29918,
4906,
29901,
7338,
336,
2472,
639,
2408,
292,
304,
278,
4660,
2769,
29889,
13,
4706,
6931,
29901,
319,
1051,
310,
6607,
800,
6969,
491,
278,
1923,
29889,
13,
4706,
1203,
29918,
8768,
29901,
319,
1051,
310,
4669,
28025,
6969,
491,
278,
1923,
29889,
13,
4706,
27042,
29918,
1693,
2450,
29901,
13,
4706,
1923,
29918,
19678,
29901,
13,
4706,
2280,
29918,
7039,
22459,
29901,
319,
1051,
310,
2983,
22459,
6969,
491,
278,
1923,
29889,
13,
4706,
6081,
29918,
19678,
29901,
319,
1051,
310,
17752,
6969,
491,
278,
1923,
29889,
13,
1678,
9995,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
1121,
29918,
4882,
29892,
13,
462,
1121,
29918,
23147,
29922,
8516,
29892,
13,
462,
1121,
29918,
4906,
29922,
8516,
29892,
13,
462,
6931,
29922,
8516,
29892,
13,
462,
1203,
29918,
8768,
29922,
8516,
29892,
13,
462,
27042,
29918,
1693,
2450,
29922,
8516,
29892,
13,
462,
1923,
29918,
19678,
29922,
8516,
29892,
13,
462,
2280,
29918,
7039,
22459,
29922,
8516,
29892,
13,
462,
6081,
29918,
19678,
29922,
8516,
1125,
13,
4706,
2428,
29898,
3010,
3591,
29892,
1583,
467,
1649,
2344,
12035,
13,
9651,
1121,
29918,
4882,
29892,
1121,
29918,
23147,
29892,
1121,
29918,
4906,
29897,
13,
13,
4706,
565,
6931,
338,
6213,
29901,
13,
9651,
1583,
29889,
3372,
800,
353,
1051,
580,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
3372,
800,
353,
6931,
13,
13,
4706,
565,
1203,
29918,
8768,
338,
6213,
29901,
13,
9651,
1583,
29889,
3318,
29918,
8768,
353,
1051,
580,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
3318,
29918,
8768,
353,
1203,
29918,
8768,
13,
13,
4706,
1583,
29889,
19167,
29918,
1693,
2450,
353,
27042,
29918,
1693,
2450,
13,
4706,
1583,
29889,
2974,
29918,
19678,
353,
1923,
29918,
19678,
13,
13,
4706,
565,
2280,
29918,
7039,
22459,
338,
6213,
29901,
13,
9651,
1583,
29889,
6214,
29918,
7039,
22459,
353,
1051,
580,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
6214,
29918,
7039,
22459,
353,
2280,
29918,
7039,
22459,
13,
13,
4706,
565,
6081,
29918,
19678,
338,
6213,
29901,
13,
9651,
1583,
29889,
17588,
29918,
19678,
353,
1051,
580,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
17588,
29918,
19678,
353,
6081,
29918,
19678,
13,
13,
13,
1990,
8565,
957,
29963,
414,
1080,
3591,
29898,
10925,
3591,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
1121,
29918,
4882,
29892,
13,
462,
1121,
29918,
23147,
29922,
8516,
29892,
13,
462,
1121,
29918,
4906,
29922,
8516,
29892,
13,
462,
9608,
29918,
26100,
29922,
8516,
1125,
13,
4706,
2428,
29898,
4205,
11911,
29963,
414,
1080,
3591,
29892,
1583,
467,
1649,
2344,
12035,
13,
9651,
1121,
29918,
4882,
29892,
1121,
29918,
23147,
29892,
1121,
29918,
4906,
29897,
13,
4706,
1583,
29889,
20464,
29918,
26100,
353,
9608,
29918,
26100,
13,
13,
13,
1990,
830,
5744,
3591,
29898,
10925,
3591,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
1121,
29918,
4882,
29892,
13,
462,
1121,
29918,
23147,
29922,
8516,
29892,
13,
462,
1121,
29918,
4906,
29922,
8516,
29892,
13,
462,
5412,
29918,
25378,
29922,
8516,
1125,
13,
4706,
2428,
29898,
1123,
5744,
3591,
29892,
1583,
467,
1649,
2344,
12035,
13,
9651,
1121,
29918,
4882,
29892,
1121,
29918,
23147,
29892,
1121,
29918,
4906,
29897,
13,
4706,
1583,
29889,
13092,
29918,
25378,
353,
5412,
29918,
25378,
13,
13,
13,
1990,
26750,
3591,
29898,
10925,
3591,
1125,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13,
462,
1121,
29918,
4882,
29892,
13,
462,
1121,
29918,
23147,
29922,
8516,
29892,
13,
462,
1121,
29918,
4906,
29922,
8516,
29892,
13,
462,
318,
5416,
29922,
8516,
29892,
13,
462,
5825,
29918,
1272,
29922,
8516,
1125,
13,
4706,
2428,
29898,
1529,
29907,
3591,
29892,
1583,
467,
1649,
2344,
12035,
13,
9651,
1121,
29918,
4882,
29892,
13,
9651,
1121,
29918,
23147,
29892,
13,
9651,
1121,
29918,
4906,
13,
4706,
1723,
13,
4706,
1583,
29889,
25118,
353,
318,
5416,
13,
4706,
1583,
29889,
8628,
29918,
1272,
353,
5825,
29918,
1272,
13,
2
] |
ARC033/ARC033b.py | VolgaKurvar/AtCoder | 0 | 127167 | na, nb = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
a = set(a)
b = set(b)
t = len(a & b)
t2 = len(a.union(b))
print(t/t2)
| [
1,
1055,
29892,
302,
29890,
353,
2910,
29898,
524,
29892,
1881,
2141,
5451,
3101,
13,
29874,
353,
1051,
29898,
1958,
29898,
524,
29892,
1881,
2141,
5451,
22130,
13,
29890,
353,
1051,
29898,
1958,
29898,
524,
29892,
1881,
2141,
5451,
22130,
13,
13,
29874,
353,
731,
29898,
29874,
29897,
13,
29890,
353,
731,
29898,
29890,
29897,
13,
13,
29873,
353,
7431,
29898,
29874,
669,
289,
29897,
13,
29873,
29906,
353,
7431,
29898,
29874,
29889,
13094,
29898,
29890,
876,
13,
2158,
29898,
29873,
29914,
29873,
29906,
29897,
13,
2
] |
8_Mixins/post/views.py | LIkelion-at-KOREATECH/LikeLion_Django_Study_Summary | 28 | 1607694 | <gh_stars>10-100
# 데이터 처리 대상 : 모델, Serializer import 시키기
from .models import Post
from .serializer import PostSerializer
from rest_framework import generics
from rest_framework import mixins
class PostList(mixins.ListModelMixin,
mixins.CreateModelMixin,
generics.GenericAPIView):
# 쿼리셋 등록
queryset = Post.objects.all()
# Serializer 클래스 등록
serializer_class = PostSerializer
def get(self, request, *args, **kwargs):
return self.list(request, *args, **kwargs)
def post(self, request, *args, **kwargs):
return self.create(request, *args, **kwargs)
class PostDetail(mixins.RetrieveModelMixin,
mixins.UpdateModelMixin,
mixins.DestroyModelMixin,
generics.GenericAPIView):
# 쿼리셋 등록
queryset = Post.objects.all()
# Serializer 클래스 등록
serializer_class = PostSerializer
def get(self, request, *args, **kwargs):
return self.retrieve(request, *args, **kwargs)
def put(self, request, *args, **kwargs):
return self.update(request, *args, **kwargs)
def delete(self, request, *args, **kwargs):
return self.destroy(request, *args, **kwargs)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
29871,
238,
144,
179,
30393,
31856,
29871,
239,
181,
155,
30826,
29871,
30890,
31158,
584,
29871,
31962,
238,
144,
187,
29892,
18896,
3950,
1053,
29871,
30889,
240,
133,
167,
30827,
13,
3166,
869,
9794,
1053,
4918,
13,
3166,
869,
15550,
3950,
1053,
4918,
17679,
13,
3166,
1791,
29918,
4468,
1053,
1176,
1199,
13,
3166,
1791,
29918,
4468,
1053,
6837,
1144,
13,
13,
13,
1990,
4918,
1293,
29898,
28084,
1144,
29889,
1293,
3195,
29924,
861,
262,
29892,
13,
1669,
6837,
1144,
29889,
4391,
3195,
29924,
861,
262,
29892,
13,
1669,
1176,
1199,
29889,
15809,
8787,
1043,
1125,
13,
1678,
396,
29871,
239,
194,
191,
30826,
239,
136,
142,
29871,
238,
150,
180,
238,
164,
160,
13,
1678,
2346,
842,
353,
4918,
29889,
12650,
29889,
497,
580,
13,
1678,
396,
18896,
3950,
29871,
240,
132,
183,
238,
161,
155,
30784,
29871,
238,
150,
180,
238,
164,
160,
13,
1678,
7797,
3950,
29918,
1990,
353,
4918,
17679,
13,
13,
1678,
822,
679,
29898,
1311,
29892,
2009,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
736,
1583,
29889,
1761,
29898,
3827,
29892,
334,
5085,
29892,
3579,
19290,
29897,
13,
13,
1678,
822,
1400,
29898,
1311,
29892,
2009,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
736,
1583,
29889,
3258,
29898,
3827,
29892,
334,
5085,
29892,
3579,
19290,
29897,
13,
13,
13,
1990,
4918,
16570,
29898,
28084,
1144,
29889,
8015,
29878,
2418,
3195,
29924,
861,
262,
29892,
13,
462,
6837,
1144,
29889,
6422,
3195,
29924,
861,
262,
29892,
13,
462,
6837,
1144,
29889,
14994,
4727,
3195,
29924,
861,
262,
29892,
13,
462,
1176,
1199,
29889,
15809,
8787,
1043,
1125,
13,
1678,
396,
29871,
239,
194,
191,
30826,
239,
136,
142,
29871,
238,
150,
180,
238,
164,
160,
13,
1678,
2346,
842,
353,
4918,
29889,
12650,
29889,
497,
580,
13,
1678,
396,
18896,
3950,
29871,
240,
132,
183,
238,
161,
155,
30784,
29871,
238,
150,
180,
238,
164,
160,
13,
1678,
7797,
3950,
29918,
1990,
353,
4918,
17679,
13,
13,
1678,
822,
679,
29898,
1311,
29892,
2009,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
736,
1583,
29889,
276,
509,
2418,
29898,
3827,
29892,
334,
5085,
29892,
3579,
19290,
29897,
13,
13,
1678,
822,
1925,
29898,
1311,
29892,
2009,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
736,
1583,
29889,
5504,
29898,
3827,
29892,
334,
5085,
29892,
3579,
19290,
29897,
13,
13,
1678,
822,
5217,
29898,
1311,
29892,
2009,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
736,
1583,
29889,
20524,
29898,
3827,
29892,
334,
5085,
29892,
3579,
19290,
29897,
13,
2
] |
modules/utils/module_user.py | Fogapod/KiwiBot | 18 | 115772 | from objects.modulebase import ModuleBase
from objects.permissions import PermissionEmbedLinks, PermissionExternalEmojis
from utils.funcs import find_user, _get_last_user_message_timestamp
from datetime import datetime
import discord
STATUS_EMOTES = {
'online': '<:online:427209268240973854>',
'idle': '<:idle:427209268203094017>',
'dnd': '<:dnd:427209268043841537>',
'offline': '<:offline:427209267687194625>',
'invisible': '<:invisible:427209267687194625>'
}
ACTIVITY_MAP = {
discord.ActivityType.unknown: '',
discord.ActivityType.playing: 'Playing: ',
discord.ActivityType.streaming: 'Streaming: ',
discord.ActivityType.listening: 'Listening: ',
discord.ActivityType.watching: 'Watching: ',
discord.ActivityType.custom: '',
}
class Module(ModuleBase):
usage_doc = '{prefix}{aliases} [user]'
short_doc = 'Get information about given user'
name = 'user'
aliases = (name, 'userinfo')
category = 'Discord'
bot_perms = (PermissionEmbedLinks(), )
async def on_call(self, ctx, args, **flags):
if len(args) == 1:
user = ctx.author
else:
user = await find_user(args[1:], ctx.message)
if user is None:
return await ctx.warn('User not found')
e = discord.Embed(
title=str(user),
url=str(user.avatar_url),
colour=discord.Colour.gold()
)
e.set_thumbnail(url=user.avatar_url)
e.add_field(
name='registered', inline=False,
value=f'`{user.created_at.replace(microsecond=0)}` ({(datetime.now() - user.created_at).days} days ago)'
)
if isinstance(user, discord.Member):
# function can return members from different guild
if user.guild == ctx.guild:
e.title += ' (member)'
e.add_field(
name='member since', inline=False,
value=f'`{user.joined_at.replace(microsecond=0)}` ({(datetime.now() - user.joined_at).days} days)'
)
last_msg_ts = _get_last_user_message_timestamp(user.id, ctx.channel.id)
if last_msg_ts != datetime.fromtimestamp(0):
last_msg_ts = last_msg_ts.replace(microsecond=0)
e.add_field(
name='last message sent', inline=False,
value=f'`{last_msg_ts}`'
)
e.add_field(name='top role', value=user.top_role.mention)
e.add_field(name='total roles', value=len(user.roles))
if user.nick is not None:
e.add_field(name='nick', value=user.nick, inline=False)
external_emoji_perm = PermissionExternalEmojis().check(ctx.channel, self.bot.user)
activity = user.activity
if activity is None:
e.add_field(
name='status',
value=(STATUS_EMOTES[str(user.status)] if external_emoji_perm else '') + str(user.status)
)
else:
activity_state = ACTIVITY_MAP.get(activity.type, '')
emoji = ''
# thanks discord.py
if getattr(activity, 'emoji', None):
# activity has emoji
if activity.emoji.id:
# emoji is custom
if self.bot.get_emoji(activity.emoji.id):
# bot has access to emoji
emoji = activity.emoji
else:
# bot has no acces to emoji
emoji = '\N{THINKING FACE}'
else:
# emoji is standard
emoji = activity.emoji
activity_name = f'{emoji} {activity.name if activity.name else ""}'
e.add_field(
name='activity',
value=(STATUS_EMOTES[str(user.status)] if external_emoji_perm else '') + f'{activity_state}{activity_name}'
)
e.add_field(name='robot', value='yes' if user.bot else 'no')
e.set_footer(text=user.id)
await ctx.send(embed=e)
| [
1,
515,
3618,
29889,
5453,
3188,
1053,
15591,
5160,
13,
3166,
3618,
29889,
17858,
6847,
1053,
20894,
2333,
6026,
2580,
6595,
29879,
29892,
20894,
2333,
25865,
6026,
3848,
275,
13,
13,
3166,
3667,
29879,
29889,
7692,
2395,
1053,
1284,
29918,
1792,
29892,
903,
657,
29918,
4230,
29918,
1792,
29918,
4906,
29918,
16394,
13,
13,
3166,
12865,
1053,
12865,
13,
13,
5215,
2313,
536,
13,
13,
13,
27047,
29918,
12665,
2891,
2890,
353,
426,
13,
1678,
525,
14627,
2396,
1678,
12801,
29901,
14627,
29901,
29946,
29906,
29955,
29906,
29900,
29929,
29906,
29953,
29947,
29906,
29946,
29900,
29929,
29955,
29941,
29947,
29945,
29946,
29958,
742,
13,
1678,
525,
333,
280,
2396,
418,
12801,
29901,
333,
280,
29901,
29946,
29906,
29955,
29906,
29900,
29929,
29906,
29953,
29947,
29906,
29900,
29941,
29900,
29929,
29946,
29900,
29896,
29955,
29958,
742,
13,
1678,
525,
29881,
299,
2396,
539,
12801,
29901,
29881,
299,
29901,
29946,
29906,
29955,
29906,
29900,
29929,
29906,
29953,
29947,
29900,
29946,
29941,
29947,
29946,
29896,
29945,
29941,
29955,
29958,
742,
13,
1678,
525,
2696,
1220,
2396,
259,
12801,
29901,
2696,
1220,
29901,
29946,
29906,
29955,
29906,
29900,
29929,
29906,
29953,
29955,
29953,
29947,
29955,
29896,
29929,
29946,
29953,
29906,
29945,
29958,
742,
13,
1678,
525,
262,
12872,
2396,
12801,
29901,
262,
12872,
29901,
29946,
29906,
29955,
29906,
29900,
29929,
29906,
29953,
29955,
29953,
29947,
29955,
29896,
29929,
29946,
29953,
29906,
29945,
16299,
13,
29913,
13,
13,
17923,
5667,
11937,
29918,
23827,
353,
426,
13,
1678,
2313,
536,
29889,
3886,
1542,
29889,
26690,
29901,
15516,
13,
1678,
2313,
536,
29889,
3886,
1542,
29889,
1456,
292,
29901,
525,
13454,
292,
29901,
13420,
13,
1678,
2313,
536,
29889,
3886,
1542,
29889,
5461,
292,
29901,
525,
3835,
292,
29901,
13420,
13,
1678,
2313,
536,
29889,
3886,
1542,
29889,
1761,
8333,
29901,
525,
1293,
8333,
29901,
13420,
13,
1678,
2313,
536,
29889,
3886,
1542,
29889,
12344,
292,
29901,
525,
24709,
292,
29901,
13420,
13,
1678,
2313,
536,
29889,
3886,
1542,
29889,
6341,
29901,
15516,
13,
29913,
13,
13,
13,
1990,
15591,
29898,
7355,
5160,
1125,
13,
13,
1678,
8744,
29918,
1514,
353,
22372,
13506,
1157,
2606,
2129,
29913,
518,
1792,
29962,
29915,
13,
1678,
3273,
29918,
1514,
353,
525,
2577,
2472,
1048,
2183,
1404,
29915,
13,
13,
1678,
1024,
353,
525,
1792,
29915,
13,
1678,
14430,
2129,
353,
313,
978,
29892,
525,
1792,
3888,
1495,
13,
1678,
7663,
353,
525,
4205,
16090,
29915,
13,
1678,
9225,
29918,
546,
1516,
353,
313,
27293,
6026,
2580,
6595,
29879,
3285,
1723,
13,
13,
1678,
7465,
822,
373,
29918,
4804,
29898,
1311,
29892,
12893,
29892,
6389,
29892,
3579,
15764,
1125,
13,
4706,
565,
7431,
29898,
5085,
29897,
1275,
29871,
29896,
29901,
13,
9651,
1404,
353,
12893,
29889,
8921,
13,
4706,
1683,
29901,
13,
9651,
1404,
353,
7272,
1284,
29918,
1792,
29898,
5085,
29961,
29896,
29901,
1402,
12893,
29889,
4906,
29897,
13,
13,
4706,
565,
1404,
338,
6213,
29901,
13,
9651,
736,
7272,
12893,
29889,
25442,
877,
2659,
451,
1476,
1495,
13,
13,
4706,
321,
353,
2313,
536,
29889,
6026,
2580,
29898,
13,
9651,
3611,
29922,
710,
29898,
1792,
511,
13,
9651,
3142,
29922,
710,
29898,
1792,
29889,
485,
14873,
29918,
2271,
511,
13,
9651,
12384,
29922,
2218,
16090,
29889,
1625,
473,
29889,
29887,
1025,
580,
13,
4706,
1723,
13,
4706,
321,
29889,
842,
29918,
386,
21145,
29898,
2271,
29922,
1792,
29889,
485,
14873,
29918,
2271,
29897,
13,
4706,
321,
29889,
1202,
29918,
2671,
29898,
13,
9651,
1024,
2433,
9573,
287,
742,
10583,
29922,
8824,
29892,
13,
9651,
995,
29922,
29888,
11120,
29912,
1792,
29889,
11600,
29918,
271,
29889,
6506,
29898,
29885,
2357,
7496,
29922,
29900,
2915,
29952,
313,
8001,
12673,
29889,
3707,
580,
448,
1404,
29889,
11600,
29918,
271,
467,
16700,
29913,
3841,
8020,
16029,
13,
4706,
1723,
13,
4706,
565,
338,
8758,
29898,
1792,
29892,
2313,
536,
29889,
13404,
1125,
13,
9651,
396,
740,
508,
736,
5144,
515,
1422,
1410,
789,
13,
9651,
565,
1404,
29889,
2543,
789,
1275,
12893,
29889,
2543,
789,
29901,
13,
18884,
321,
29889,
3257,
4619,
525,
313,
14242,
16029,
13,
18884,
321,
29889,
1202,
29918,
2671,
29898,
13,
462,
1678,
1024,
2433,
14242,
1951,
742,
10583,
29922,
8824,
29892,
13,
462,
1678,
995,
29922,
29888,
11120,
29912,
1792,
29889,
2212,
1312,
29918,
271,
29889,
6506,
29898,
29885,
2357,
7496,
29922,
29900,
2915,
29952,
313,
8001,
12673,
29889,
3707,
580,
448,
1404,
29889,
2212,
1312,
29918,
271,
467,
16700,
29913,
3841,
16029,
13,
18884,
1723,
13,
18884,
1833,
29918,
7645,
29918,
1372,
353,
903,
657,
29918,
4230,
29918,
1792,
29918,
4906,
29918,
16394,
29898,
1792,
29889,
333,
29892,
12893,
29889,
12719,
29889,
333,
29897,
13,
18884,
565,
1833,
29918,
7645,
29918,
1372,
2804,
12865,
29889,
3166,
16394,
29898,
29900,
1125,
13,
462,
1678,
1833,
29918,
7645,
29918,
1372,
353,
1833,
29918,
7645,
29918,
1372,
29889,
6506,
29898,
29885,
2357,
7496,
29922,
29900,
29897,
13,
462,
1678,
321,
29889,
1202,
29918,
2671,
29898,
13,
462,
4706,
1024,
2433,
4230,
2643,
2665,
742,
10583,
29922,
8824,
29892,
13,
462,
4706,
995,
29922,
29888,
11120,
29912,
4230,
29918,
7645,
29918,
1372,
10114,
29915,
13,
462,
1678,
1723,
13,
18884,
321,
29889,
1202,
29918,
2671,
29898,
978,
2433,
3332,
6297,
742,
995,
29922,
1792,
29889,
3332,
29918,
12154,
29889,
358,
291,
29897,
13,
18884,
321,
29889,
1202,
29918,
2671,
29898,
978,
2433,
7827,
16178,
742,
995,
29922,
2435,
29898,
1792,
29889,
307,
793,
876,
13,
13,
18884,
565,
1404,
29889,
19254,
338,
451,
6213,
29901,
13,
462,
1678,
321,
29889,
1202,
29918,
2671,
29898,
978,
2433,
19254,
742,
995,
29922,
1792,
29889,
19254,
29892,
10583,
29922,
8824,
29897,
13,
13,
9651,
7029,
29918,
15810,
2397,
29918,
17858,
353,
20894,
2333,
25865,
6026,
3848,
275,
2141,
3198,
29898,
13073,
29889,
12719,
29892,
1583,
29889,
7451,
29889,
1792,
29897,
13,
13,
9651,
6354,
353,
1404,
29889,
10072,
13,
9651,
565,
6354,
338,
6213,
29901,
13,
18884,
321,
29889,
1202,
29918,
2671,
29898,
13,
462,
1678,
1024,
2433,
4882,
742,
13,
462,
1678,
995,
7607,
27047,
29918,
12665,
2891,
2890,
29961,
710,
29898,
1792,
29889,
4882,
4638,
565,
7029,
29918,
15810,
2397,
29918,
17858,
1683,
27255,
718,
851,
29898,
1792,
29889,
4882,
29897,
13,
18884,
1723,
13,
9651,
1683,
29901,
13,
18884,
6354,
29918,
3859,
353,
319,
1783,
5667,
11937,
29918,
23827,
29889,
657,
29898,
10072,
29889,
1853,
29892,
27255,
13,
13,
18884,
953,
29877,
2397,
353,
6629,
13,
18884,
396,
3969,
2313,
536,
29889,
2272,
13,
18884,
565,
679,
5552,
29898,
10072,
29892,
525,
15810,
2397,
742,
6213,
1125,
13,
462,
1678,
396,
6354,
756,
953,
29877,
2397,
13,
462,
1678,
565,
6354,
29889,
15810,
2397,
29889,
333,
29901,
13,
462,
4706,
396,
953,
29877,
2397,
338,
2888,
13,
462,
4706,
565,
1583,
29889,
7451,
29889,
657,
29918,
15810,
2397,
29898,
10072,
29889,
15810,
2397,
29889,
333,
1125,
13,
462,
9651,
396,
9225,
756,
2130,
304,
953,
29877,
2397,
13,
462,
9651,
953,
29877,
2397,
353,
6354,
29889,
15810,
2397,
13,
462,
4706,
1683,
29901,
13,
462,
9651,
396,
9225,
756,
694,
1035,
267,
304,
953,
29877,
2397,
13,
462,
9651,
953,
29877,
2397,
353,
11297,
29940,
29912,
4690,
1177,
29968,
4214,
383,
11538,
10162,
13,
462,
1678,
1683,
29901,
13,
462,
4706,
396,
953,
29877,
2397,
338,
3918,
13,
462,
4706,
953,
29877,
2397,
353,
6354,
29889,
15810,
2397,
13,
13,
18884,
6354,
29918,
978,
353,
285,
29915,
29912,
15810,
2397,
29913,
426,
10072,
29889,
978,
565,
6354,
29889,
978,
1683,
5124,
10162,
13,
13,
18884,
321,
29889,
1202,
29918,
2671,
29898,
13,
462,
1678,
1024,
2433,
10072,
742,
13,
462,
1678,
995,
7607,
27047,
29918,
12665,
2891,
2890,
29961,
710,
29898,
1792,
29889,
4882,
4638,
565,
7029,
29918,
15810,
2397,
29918,
17858,
1683,
27255,
718,
285,
29915,
29912,
10072,
29918,
3859,
1157,
10072,
29918,
978,
10162,
13,
18884,
1723,
13,
13,
4706,
321,
29889,
1202,
29918,
2671,
29898,
978,
2433,
307,
7451,
742,
995,
2433,
3582,
29915,
565,
1404,
29889,
7451,
1683,
525,
1217,
1495,
13,
4706,
321,
29889,
842,
29918,
21720,
29898,
726,
29922,
1792,
29889,
333,
29897,
13,
13,
4706,
7272,
12893,
29889,
6717,
29898,
17987,
29922,
29872,
29897,
13,
2
] |
apps/blog/templatetags/template_library.py | gurnitha/2022-django-blog-magazine-cbv | 0 | 183825 | <filename>apps/blog/templatetags/template_library.py
# apps/blog/templatetags/menu_tags.py
# Django modules
from django import template
# Locals
from apps.blog.models import Category
# Template library
register = template.Library()
# Register your template here
@register.inclusion_tag('shared/tpl/menu_tpl.html')
def show_menu():
# categories = Category.objects.all()
first_two_categories = Category.objects.order_by('id')[0:2]
# print(first_three_categories) # <-- :)
the_rest_categories = Category.objects.order_by('id')[2:10]
# print(the_rest_categories) # <-- :)
context = {
# 'menu_category':categories,
'first_two_categories':first_two_categories,
'the_rest_categories':the_rest_categories
}
return context
@register.inclusion_tag('shared/tpl/canvas_menu_tpl.html')
def show_canvas_menu():
first_two_categories_for_canvas_menu = Category.objects.order_by('id')[0:2]
# print(canvas_menu) # <-- :)
the_rest_categories_for_canvas_menu = Category.objects.order_by('id')[2:10]
# print(first_two_categories_for_canvas_menu) # <-- :)
context = {
'first_two_categories_for_canvas_menu':first_two_categories_for_canvas_menu,
'the_rest_categories_for_canvas_menu':the_rest_categories_for_canvas_menu
}
return context | [
1,
529,
9507,
29958,
13371,
29914,
7312,
29914,
1356,
572,
271,
300,
810,
29914,
6886,
29918,
5258,
29889,
2272,
13,
29937,
11446,
29914,
7312,
29914,
1356,
572,
271,
300,
810,
29914,
6510,
29918,
11338,
29889,
2272,
13,
13,
29937,
15337,
10585,
13,
3166,
9557,
1053,
4472,
13,
13,
29937,
5976,
1338,
13,
3166,
11446,
29889,
7312,
29889,
9794,
1053,
17943,
13,
13,
29937,
25663,
3489,
13,
9573,
353,
4472,
29889,
12284,
580,
13,
13,
29937,
12577,
596,
4472,
1244,
13,
13,
29992,
9573,
29889,
262,
10085,
29918,
4039,
877,
12366,
29914,
29873,
572,
29914,
6510,
29918,
29873,
572,
29889,
1420,
1495,
13,
1753,
1510,
29918,
6510,
7295,
13,
12,
29937,
13997,
353,
17943,
29889,
12650,
29889,
497,
580,
13,
12,
4102,
29918,
10184,
29918,
20683,
353,
17943,
29889,
12650,
29889,
2098,
29918,
1609,
877,
333,
29861,
29900,
29901,
29906,
29962,
13,
12,
29937,
1596,
29898,
4102,
29918,
17536,
29918,
20683,
29897,
396,
529,
489,
4248,
13,
13,
12,
1552,
29918,
5060,
29918,
20683,
353,
17943,
29889,
12650,
29889,
2098,
29918,
1609,
877,
333,
29861,
29906,
29901,
29896,
29900,
29962,
13,
12,
29937,
1596,
29898,
1552,
29918,
5060,
29918,
20683,
29897,
396,
529,
489,
4248,
13,
13,
12,
4703,
353,
426,
13,
12,
12,
29937,
525,
6510,
29918,
7320,
2396,
20683,
29892,
13,
12,
12,
29915,
4102,
29918,
10184,
29918,
20683,
2396,
4102,
29918,
10184,
29918,
20683,
29892,
13,
12,
12,
29915,
1552,
29918,
5060,
29918,
20683,
2396,
1552,
29918,
5060,
29918,
20683,
13,
12,
29913,
13,
12,
2457,
3030,
13,
13,
13,
29992,
9573,
29889,
262,
10085,
29918,
4039,
877,
12366,
29914,
29873,
572,
29914,
15257,
29918,
6510,
29918,
29873,
572,
29889,
1420,
1495,
13,
1753,
1510,
29918,
15257,
29918,
6510,
7295,
13,
12,
4102,
29918,
10184,
29918,
20683,
29918,
1454,
29918,
15257,
29918,
6510,
353,
17943,
29889,
12650,
29889,
2098,
29918,
1609,
877,
333,
29861,
29900,
29901,
29906,
29962,
13,
12,
29937,
1596,
29898,
15257,
29918,
6510,
29897,
396,
529,
489,
4248,
13,
13,
12,
1552,
29918,
5060,
29918,
20683,
29918,
1454,
29918,
15257,
29918,
6510,
353,
17943,
29889,
12650,
29889,
2098,
29918,
1609,
877,
333,
29861,
29906,
29901,
29896,
29900,
29962,
13,
12,
29937,
1596,
29898,
4102,
29918,
10184,
29918,
20683,
29918,
1454,
29918,
15257,
29918,
6510,
29897,
396,
529,
489,
4248,
13,
13,
12,
4703,
353,
426,
13,
12,
12,
29915,
4102,
29918,
10184,
29918,
20683,
29918,
1454,
29918,
15257,
29918,
6510,
2396,
4102,
29918,
10184,
29918,
20683,
29918,
1454,
29918,
15257,
29918,
6510,
29892,
13,
12,
12,
29915,
1552,
29918,
5060,
29918,
20683,
29918,
1454,
29918,
15257,
29918,
6510,
2396,
1552,
29918,
5060,
29918,
20683,
29918,
1454,
29918,
15257,
29918,
6510,
13,
12,
29913,
13,
12,
2457,
3030,
2
] |
yolov5/temp.py | shuyansy/A-detection-and-recognition-pipeline-of-complex-meters-in-wild | 17 | 31295 | <gh_stars>10-100
import os
import cv2
import numpy as np
from utils.augmentations import Albumentations, augment_hsv, copy_paste, letterbox
from models.common import DetectMultiBackend
from utils.datasets import IMG_FORMATS, VID_FORMATS, LoadImages, LoadStreams
from utils.general import (LOGGER, check_file, check_img_size, check_imshow, check_requirements, colorstr,
increment_path, non_max_suppression, print_args, scale_coords, strip_optimizer, xyxy2xywh)
from utils.plots import Annotator, colors, save_one_box
from utils.torch_utils import select_device, time_sync
# Load model
device='0'
weights='runs/train/exp6/weights/best.pt'
data='data/mydata.yaml'
device = select_device(device)
model = DetectMultiBackend(weights, device=device, dnn=False, data=data)
stride, names, pt, jit, onnx, engine = model.stride, model.names, model.pt, model.jit, model.onnx, model.engine
imgsz = check_img_size([640], s=stride) # check image size
path='/home/sy/ocr/datasets/all_meter_image/'
img_dir=os.listdir(path)
for i in img_dir:
img=cv2.imread(path+i)
# Padded resize
img = letterbox(img, [640], stride=stride, auto=pt)[0]
# Convert
img = img.transpose((2, 0, 1))[::-1] # HWC to CHW, BGR to RGB
img = np.ascontiguousarray(img)
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
5215,
2897,
13,
5215,
13850,
29906,
13,
5215,
12655,
408,
7442,
13,
3166,
3667,
29879,
29889,
2987,
358,
800,
1053,
16197,
942,
800,
29892,
18765,
29918,
29882,
4501,
29892,
3509,
29918,
16179,
29892,
5497,
1884,
13,
3166,
4733,
29889,
9435,
1053,
5953,
522,
15329,
5841,
355,
13,
3166,
3667,
29879,
29889,
14538,
1691,
1053,
22313,
29954,
29918,
19094,
1299,
29903,
29892,
478,
1367,
29918,
19094,
1299,
29903,
29892,
16012,
20163,
29892,
16012,
3835,
29879,
13,
3166,
3667,
29879,
29889,
17492,
1053,
313,
14480,
17070,
29892,
1423,
29918,
1445,
29892,
1423,
29918,
2492,
29918,
2311,
29892,
1423,
29918,
326,
4294,
29892,
1423,
29918,
12277,
1860,
29892,
2927,
710,
29892,
13,
462,
965,
11924,
29918,
2084,
29892,
1661,
29918,
3317,
29918,
19303,
23881,
29892,
1596,
29918,
5085,
29892,
6287,
29918,
1111,
4339,
29892,
17820,
29918,
20640,
3950,
29892,
921,
29891,
3594,
29906,
3594,
1332,
29897,
13,
3166,
3667,
29879,
29889,
26762,
1053,
530,
1333,
1061,
29892,
11955,
29892,
4078,
29918,
650,
29918,
1884,
13,
3166,
3667,
29879,
29889,
7345,
305,
29918,
13239,
1053,
1831,
29918,
10141,
29892,
931,
29918,
16593,
13,
13,
13,
29937,
16012,
1904,
13,
10141,
2433,
29900,
29915,
13,
705,
5861,
2433,
3389,
29879,
29914,
14968,
29914,
4548,
29953,
29914,
705,
5861,
29914,
13318,
29889,
415,
29915,
13,
1272,
2433,
1272,
29914,
1357,
1272,
29889,
25162,
29915,
13,
13,
10141,
353,
1831,
29918,
10141,
29898,
10141,
29897,
13,
4299,
353,
5953,
522,
15329,
5841,
355,
29898,
705,
5861,
29892,
4742,
29922,
10141,
29892,
270,
15755,
29922,
8824,
29892,
848,
29922,
1272,
29897,
13,
303,
2426,
29892,
2983,
29892,
19592,
29892,
432,
277,
29892,
373,
23818,
29892,
6012,
353,
1904,
29889,
303,
2426,
29892,
1904,
29889,
7039,
29892,
1904,
29889,
415,
29892,
1904,
29889,
29926,
277,
29892,
1904,
29889,
3409,
29916,
29892,
1904,
29889,
10599,
13,
2492,
3616,
353,
1423,
29918,
2492,
29918,
2311,
4197,
29953,
29946,
29900,
1402,
269,
29922,
303,
2426,
29897,
29871,
396,
1423,
1967,
2159,
13,
13,
2084,
2433,
29914,
5184,
29914,
29879,
29891,
29914,
8415,
29914,
14538,
1691,
29914,
497,
29918,
29391,
29918,
3027,
22208,
13,
2492,
29918,
3972,
29922,
359,
29889,
1761,
3972,
29898,
2084,
29897,
13,
1454,
474,
297,
10153,
29918,
3972,
29901,
13,
13,
1678,
10153,
29922,
11023,
29906,
29889,
326,
949,
29898,
2084,
29974,
29875,
29897,
13,
1678,
396,
349,
23959,
19490,
13,
1678,
10153,
353,
5497,
1884,
29898,
2492,
29892,
518,
29953,
29946,
29900,
1402,
380,
2426,
29922,
303,
2426,
29892,
4469,
29922,
415,
9601,
29900,
29962,
13,
13,
1678,
396,
14806,
13,
1678,
10153,
353,
10153,
29889,
3286,
4220,
3552,
29906,
29892,
29871,
29900,
29892,
29871,
29896,
876,
29961,
1057,
29899,
29896,
29962,
29871,
396,
379,
29956,
29907,
304,
5868,
29956,
29892,
350,
14345,
304,
390,
7210,
13,
1678,
10153,
353,
7442,
29889,
294,
1285,
5526,
681,
2378,
29898,
2492,
29897,
13,
13,
2
] |
src/polyswarm/formatters/text.py | polyswarm/polyswarm-cli | 2 | 50641 | from __future__ import absolute_import, unicode_literals
import sys
import functools
import json
import click
from polyswarm.formatters import base
def is_grouped(fn):
@functools.wraps(fn)
def wrapper(self, text):
return self._depth*'\t'+fn(self, text)
return wrapper
class TextOutput(base.BaseOutput):
name = 'text'
def __init__(self, color=True, output=sys.stdout, **kwargs):
super(TextOutput, self).__init__(output)
self.color = color
self._depth = 0
self.color = color
def _get_score_format(self, score):
if score < 0.15:
return self._white
elif score < 0.4:
return self._yellow
else:
return self._red
def _output(self, output, write):
if write:
click.echo('\n'.join(output) + '\n', file=self.out)
else:
return output
def artifact(self, artifact, write=True):
output = []
output.append(self._blue('SHA256: {hash}'.format(hash=artifact.sha256)))
output.append(self._white('SHA1: {hash}'.format(hash=artifact.sha1)))
output.append(self._white('MD5: {hash}'.format(hash=artifact.md5)))
output.append(self._white('File type: mimetype: {mimetype}, extended_info: {extended_type}'.
format(mimetype=artifact.mimetype, extended_type=artifact.extended_type)))
h = artifact.metadata.hash
if 'ssdeep' in h:
output.append(self._white('SSDEEP: {}'.format(h['ssdeep'])))
if 'tlsh' in h:
output.append(self._white('TLSH: {}'.format(h['tlsh'])))
if 'authentihash' in h:
output.append(self._white('Authentihash: {}'.format(h['authentihash'])))
p = artifact.metadata.pefile
if 'imphash' in p:
output.append(self._white('Imphash: {}'.format(p['imphash'])))
output.append(self._white('First seen: {}'.format(artifact.first_seen)))
output.append(self._white('Last scanned: {}'.format(artifact.last_scanned)))
# Deprecated
output.append(self._white('Last seen: {}'.format(artifact.last_scanned)))
return self._output(output, write)
def artifact_instance(self, instance, write=True, timeout=False):
output = []
output.append(self._white('============================= Artifact Instance ============================='))
output.append(self._white('Scan permalink: {}'.format(instance.permalink)))
if instance.community == 'stream':
output.append(self._white('Detections: This artifact has not been scanned. You can trigger a scan now.'))
elif len(instance.valid_assertions) == 0 and instance.window_closed and not instance.failed:
output.append(self._white('Detections: No engines responded to this scan. You can trigger a rescan now.'))
elif len(instance.valid_assertions) > 0 and instance.window_closed and not instance.failed:
malicious = 'Detections: {}/{} engines reported malicious'\
.format(len(instance.malicious_assertions), len(instance.valid_assertions))
if len(instance.malicious_assertions) > 0:
output.append(self._red(malicious))
else:
output.append(self._white(malicious))
elif not instance.window_closed and not instance.failed:
output.append(self._white('Detections: This scan has not finished running yet.'))
else:
output.append(self._white('Detections: This scan has failed. Please try again.'))
self._open_group()
for assertion in instance.assertions:
if assertion.verdict is False:
output.append('%s: %s' % (self._green(assertion.engine_name), 'Clean'))
elif assertion.verdict is None or assertion.mask is False:
output.append('%s: %s' % (self._blue(assertion.engine_name), 'Engine chose not respond to this bounty.'))
else:
value = 'Malicious'
if assertion.metadata:
value += ', metadata: %s' % json.dumps(assertion.metadata, sort_keys=True)
output.append('%s: %s' % (self._red(assertion.engine_name), value))
self._close_group()
output.append(self._blue('Scan id: {}'.format(instance.id)))
output.extend(self.artifact(instance, write=False))
if instance.failed:
output.append(self._red('Status: Failed'))
elif instance.window_closed:
output.append(self._white('Status: Assertion window closed'))
elif instance.community == 'stream':
output.append(self._white('Status: This artifact has not been scanned. You can trigger a scan now.'))
elif timeout:
output.append(self._yellow('Status: Lookup timed-out, please retry'))
else:
output.append(self._white('Status: Running'))
if instance.type == 'URL':
output.append(self._white('URL: {}'.format(instance.filename)))
else:
output.append(self._white('Filename: {}'.format(instance.filename)))
output.append(self._white('Community: {}'.format(instance.community)))
output.append(self._white('Country: {}'.format(instance.country)))
if instance.polyscore is not None:
formatter = self._get_score_format(instance.polyscore)
output.append(formatter('PolyScore: {:.20f}'.format(instance.polyscore)))
return self._output(output, write)
def hunt(self, result, write=True):
output = []
output.append(self._blue('Hunt Id: {}'.format(result.id)))
if result.active is not None:
output.append(self._white('Active: {}'.format(result.active)))
if result.ruleset_name is not None:
output.append(self._white('Ruleset Name: {}'.format(result.ruleset_name)))
output.append(self._white('Created at: {}'.format(result.created)))
return self._output(output, write)
def hunt_deletion(self, result, write=True):
output = []
output.append(self._yellow('Successfully deleted Hunt:'))
output.extend(self.hunt(result, write=False))
return self._output(output, write)
def hunt_result(self, result, write=True):
output = []
output.append(self._white('Match on rule {name}'.format(name=result.rule_name) +
(', tags: {result_tags}'.format(
result_tags=result.tags) if result.tags != '' else '')))
output.extend(self.artifact_instance(result.artifact, write=False))
return self._output(output, write)
def ruleset(self, result, write=True, contents=False):
output = []
output.append(self._blue('Ruleset Id: {}'.format(result.id)))
output.append(self._white('Name: {}'.format(result.name)))
output.append(self._white('Description: {}'.format(result.description)))
output.append(self._white('Created at: {}'.format(result.created)))
output.append(self._white('Modified at: {}'.format(result.modified)))
if contents:
output.append(self._white('Contents:\n{}'.format(result.yara)))
return self._output(output, write)
def tag_link(self, result, write=True):
output = []
output.append(self._blue('SHA256: {}'.format(result.sha256)))
output.append(self._white('First seen: {}'.format(result.first_seen)))
output.append(self._white('Tags: {}'.format(result.tags)))
output.append(self._white('Families: {}'.format(result.families)))
output.append(self._white('Emerging: {}'.format(result.emerging)))
return self._output(output, write)
def family(self, result, write=True):
output = []
output.append(self._blue('Family: {}'.format(result.name)))
output.append(self._white('Emerging: {}'.format(result.emerging)))
return self._output(output, write)
def tag(self, result, write=True):
output = []
output.append(self._blue('Tag: {}'.format(result.name)))
return self._output(output, write)
def local_artifact(self, artifact, write=True):
output = []
output.append(self._white('Successfully downloaded artifact {} to {}'
.format(artifact.artifact_name, artifact.name)))
return self._output(output, write)
def _dfs_mapping_render(self, output, path, tree, depth=0):
tree_string = (' | ' * (depth - 1)) + ' +-' if depth > 0 else ''
current_path = '.'.join(path)
if not tree:
output.append(self._white(tree_string + current_path))
else:
if path:
output.append(self._white(tree_string + current_path))
for k, v in tree.items():
self._dfs_mapping_render(output, path + [k], v, depth=depth + 1)
def mapping(self, mapping, write=True):
output = []
output.append(self._white('============================= Mapping ============================='))
self._dfs_mapping_render(output, [], mapping.json)
return self._output(output, write)
def metadata(self, instance, write=True):
output = []
output.append(self._white('============================= Metadata ============================='))
output.append(self._blue('Artifact id: {}'.format(instance.id)))
output.append(self._white('Created: {}'.format(instance.created)))
if instance.sha256:
output.append(self._white('SHA256: {}'.format(instance.sha256)))
if instance.sha1:
output.append(self._white('SHA1: {}'.format(instance.sha1)))
if instance.md5:
output.append(self._white('MD5: {}'.format(instance.md5)))
if instance.ssdeep:
output.append(self._white('SSDEEP: {}'.format(instance.ssdeep)))
if instance.tlsh:
output.append(self._white('TLSH: {}'.format(instance.tlsh)))
if instance.first_seen:
output.append(self._white('First seen: {}'.format(instance.first_seen)))
if instance.last_scanned:
output.append(self._white('Last scanned: {}'.format(instance.last_scanned)))
# Deprecated
output.append(self._white('Last seen: {}'.format(instance.last_scanned)))
if instance.mimetype:
output.append(self._white('Mimetype: {}'.format(instance.mimetype)))
if instance.extended_mimetype:
output.append(self._white('Extended mimetype: {}'.format(instance.extended_mimetype)))
if instance.malicious:
output.append(self._white('Malicious: {}'.format(instance.malicious)))
if instance.benign:
output.append(self._white('Benign: {}'.format(instance.benign)))
if instance.total_detections:
output.append(self._white('Total detections: {}'.format(instance.total_detections)))
if instance.domains:
output.append(self._white('Domains:'))
self._open_group()
output.append(self._white('{}'.format(', '.join(instance.domains))))
self._close_group()
if instance.ipv4:
output.append(self._white('Ipv4:'))
self._open_group()
output.append(self._white('{}'.format(', '.join(instance.ipv4))))
self._close_group()
if instance.ipv6:
output.append(self._white('Ipv6:'))
self._open_group()
output.append(self._white('{}'.format(', '.join(instance.ipv6))))
self._close_group()
if instance.urls:
output.append(self._white('Urls:'))
self._open_group()
output.append(self._white('{}'.format(', '.join(instance.urls))))
self._close_group()
if instance.filenames:
output.append(self._white('Filenames:'))
self._open_group()
output.append(self._white('{}'.format(', '.join(instance.filenames))))
self._close_group()
return self._output(output, write)
def assertions(self, instance, write=True):
output = []
output.append(self._white('============================= Assertions Job ============================='))
output.append(self._blue('Assertions Job id: {}'.format(instance.id)))
output.append(self._white('Engine id: {}'.format(instance.engine_id)))
output.append(self._white('Created at: {}'.format(instance.created)))
output.append(self._white('Start date: {}'.format(instance.date_start)))
output.append(self._white('End date: {}'.format(instance.date_end)))
if instance.storage_path is not None:
output.append(self._white('Download: {}'.format(instance.storage_path)))
output.append(self._white('True Positive: {}'.format(instance.true_positive)))
output.append(self._white('True Negative: {}'.format(instance.true_negative)))
output.append(self._white('False Positive: {}'.format(instance.false_positive)))
output.append(self._white('False Negative: {}'.format(instance.false_negative)))
output.append(self._white('Suspicious: {}'.format(instance.suspicious)))
output.append(self._white('Unknown: {}'.format(instance.unknown)))
output.append(self._white('Total: {}'.format(instance.total)))
return self._output(output, write)
def votes(self, instance, write=True):
output = []
output.append(self._white('============================= Votes Job ============================='))
output.append(self._blue('Votes Job id: {}'.format(instance.id)))
output.append(self._white('Engine id: {}'.format(instance.engine_id)))
output.append(self._white('Created at: {}'.format(instance.created)))
output.append(self._white('Start date: {}'.format(instance.date_start)))
output.append(self._white('End date: {}'.format(instance.date_end)))
if instance.storage_path is not None:
output.append(self._white('Download: {}'.format(instance.storage_path)))
output.append(self._white('True Positive: {}'.format(instance.true_positive)))
output.append(self._white('True Negative: {}'.format(instance.true_negative)))
output.append(self._white('False Positive: {}'.format(instance.false_positive)))
output.append(self._white('False Negative: {}'.format(instance.false_negative)))
output.append(self._white('Suspicious: {}'.format(instance.suspicious)))
output.append(self._white('Unknown: {}'.format(instance.unknown)))
output.append(self._white('Total: {}'.format(instance.total)))
return self._output(output, write)
@is_grouped
def _white(self, text):
return click.style(text, fg='white')
@is_grouped
def _yellow(self, text):
return click.style(text, fg='yellow')
@is_grouped
def _red(self, text):
return click.style(text, fg='red')
@is_grouped
def _blue(self, text):
return click.style(text, fg='blue')
@is_grouped
def _green(self, text):
return click.style(text, fg='green')
def _open_group(self):
self._depth += 1
def _close_group(self):
self._depth -= 1
| [
1,
515,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
29104,
29918,
20889,
1338,
13,
5215,
10876,
13,
5215,
2090,
312,
8789,
13,
5215,
4390,
13,
13,
5215,
2828,
13,
13,
3166,
1248,
952,
29893,
2817,
29889,
4830,
2153,
1053,
2967,
13,
13,
13,
1753,
338,
29918,
2972,
287,
29898,
9144,
1125,
13,
1678,
732,
7692,
312,
8789,
29889,
29893,
336,
567,
29898,
9144,
29897,
13,
1678,
822,
14476,
29898,
1311,
29892,
1426,
1125,
13,
4706,
736,
1583,
3032,
19488,
29930,
12764,
29873,
18717,
9144,
29898,
1311,
29892,
1426,
29897,
13,
13,
1678,
736,
14476,
13,
13,
13,
1990,
3992,
6466,
29898,
3188,
29889,
5160,
6466,
1125,
13,
1678,
1024,
353,
525,
726,
29915,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2927,
29922,
5574,
29892,
1962,
29922,
9675,
29889,
25393,
29892,
3579,
19290,
1125,
13,
4706,
2428,
29898,
1626,
6466,
29892,
1583,
467,
1649,
2344,
12035,
4905,
29897,
13,
4706,
1583,
29889,
2780,
353,
2927,
13,
4706,
1583,
3032,
19488,
353,
29871,
29900,
13,
4706,
1583,
29889,
2780,
353,
2927,
13,
13,
1678,
822,
903,
657,
29918,
13628,
29918,
4830,
29898,
1311,
29892,
8158,
1125,
13,
4706,
565,
8158,
529,
29871,
29900,
29889,
29896,
29945,
29901,
13,
9651,
736,
1583,
3032,
10921,
13,
4706,
25342,
8158,
529,
29871,
29900,
29889,
29946,
29901,
13,
9651,
736,
1583,
3032,
29136,
13,
4706,
1683,
29901,
13,
9651,
736,
1583,
3032,
1127,
13,
13,
1678,
822,
903,
4905,
29898,
1311,
29892,
1962,
29892,
2436,
1125,
13,
4706,
565,
2436,
29901,
13,
9651,
2828,
29889,
8057,
28909,
29876,
4286,
7122,
29898,
4905,
29897,
718,
11297,
29876,
742,
934,
29922,
1311,
29889,
449,
29897,
13,
4706,
1683,
29901,
13,
9651,
736,
1962,
13,
13,
1678,
822,
24238,
29898,
1311,
29892,
24238,
29892,
2436,
29922,
5574,
1125,
13,
4706,
1962,
353,
5159,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
9539,
877,
23498,
29906,
29945,
29953,
29901,
426,
8568,
29913,
4286,
4830,
29898,
8568,
29922,
8813,
29889,
17051,
29906,
29945,
29953,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
23498,
29896,
29901,
426,
8568,
29913,
4286,
4830,
29898,
8568,
29922,
8813,
29889,
17051,
29896,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
5773,
29945,
29901,
426,
8568,
29913,
4286,
4830,
29898,
8568,
29922,
8813,
29889,
3487,
29945,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
2283,
1134,
29901,
286,
17528,
668,
29901,
426,
29885,
17528,
668,
1118,
10410,
29918,
3888,
29901,
426,
1062,
2760,
29918,
1853,
29913,
4286,
13,
462,
462,
29871,
3402,
29898,
29885,
17528,
668,
29922,
8813,
29889,
29885,
17528,
668,
29892,
10410,
29918,
1853,
29922,
8813,
29889,
1062,
2760,
29918,
1853,
4961,
13,
13,
4706,
298,
353,
24238,
29889,
19635,
29889,
8568,
13,
4706,
565,
525,
893,
24535,
29915,
297,
298,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
1799,
2287,
15488,
29901,
6571,
4286,
4830,
29898,
29882,
1839,
893,
24535,
2033,
4961,
13,
4706,
565,
525,
15206,
845,
29915,
297,
298,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
14632,
7068,
29901,
6571,
4286,
4830,
29898,
29882,
1839,
15206,
845,
2033,
4961,
13,
4706,
565,
525,
5150,
296,
4861,
1161,
29915,
297,
298,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
6444,
296,
4861,
1161,
29901,
6571,
4286,
4830,
29898,
29882,
1839,
5150,
296,
4861,
1161,
2033,
4961,
13,
4706,
282,
353,
24238,
29889,
19635,
29889,
412,
1445,
13,
4706,
565,
525,
326,
561,
1161,
29915,
297,
282,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
1888,
561,
1161,
29901,
6571,
4286,
4830,
29898,
29886,
1839,
326,
561,
1161,
2033,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
6730,
3595,
29901,
6571,
4286,
4830,
29898,
8813,
29889,
4102,
29918,
28026,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
8897,
885,
11310,
29901,
6571,
4286,
4830,
29898,
8813,
29889,
4230,
29918,
1557,
11310,
4961,
13,
4706,
396,
897,
17990,
630,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
8897,
3595,
29901,
6571,
4286,
4830,
29898,
8813,
29889,
4230,
29918,
1557,
11310,
4961,
13,
4706,
736,
1583,
3032,
4905,
29898,
4905,
29892,
2436,
29897,
13,
13,
1678,
822,
24238,
29918,
8758,
29898,
1311,
29892,
2777,
29892,
2436,
29922,
5574,
29892,
11815,
29922,
8824,
1125,
13,
4706,
1962,
353,
5159,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
9166,
4936,
2751,
29922,
3012,
7060,
2799,
749,
1275,
9166,
4936,
1360,
2433,
876,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
29083,
3635,
284,
682,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
546,
5156,
682,
4961,
13,
13,
4706,
565,
2777,
29889,
23834,
1275,
525,
5461,
2396,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
29928,
2650,
1953,
29901,
910,
24238,
756,
451,
1063,
885,
11310,
29889,
887,
508,
7135,
263,
12812,
1286,
6169,
876,
13,
4706,
25342,
7431,
29898,
8758,
29889,
3084,
29918,
9294,
1080,
29897,
1275,
29871,
29900,
322,
2777,
29889,
7165,
29918,
15603,
322,
451,
2777,
29889,
26061,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
29928,
2650,
1953,
29901,
1939,
24000,
10049,
287,
304,
445,
12812,
29889,
887,
508,
7135,
263,
620,
3068,
1286,
6169,
876,
13,
4706,
25342,
7431,
29898,
8758,
29889,
3084,
29918,
9294,
1080,
29897,
1405,
29871,
29900,
322,
2777,
29889,
7165,
29918,
15603,
322,
451,
2777,
29889,
26061,
29901,
13,
9651,
4439,
14803,
353,
525,
29928,
2650,
1953,
29901,
6571,
29914,
8875,
24000,
8967,
4439,
14803,
12764,
13,
18884,
869,
4830,
29898,
2435,
29898,
8758,
29889,
5156,
14803,
29918,
9294,
1080,
511,
7431,
29898,
8758,
29889,
3084,
29918,
9294,
1080,
876,
13,
9651,
565,
7431,
29898,
8758,
29889,
5156,
14803,
29918,
9294,
1080,
29897,
1405,
29871,
29900,
29901,
13,
18884,
1962,
29889,
4397,
29898,
1311,
3032,
1127,
29898,
5156,
14803,
876,
13,
9651,
1683,
29901,
13,
18884,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
29898,
5156,
14803,
876,
13,
4706,
25342,
451,
2777,
29889,
7165,
29918,
15603,
322,
451,
2777,
29889,
26061,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
29928,
2650,
1953,
29901,
910,
12812,
756,
451,
7743,
2734,
3447,
6169,
876,
13,
4706,
1683,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
29928,
2650,
1953,
29901,
910,
12812,
756,
5229,
29889,
3529,
1018,
1449,
6169,
876,
13,
13,
4706,
1583,
3032,
3150,
29918,
2972,
580,
13,
4706,
363,
28306,
297,
2777,
29889,
9294,
1080,
29901,
13,
9651,
565,
28306,
29889,
369,
8977,
338,
7700,
29901,
13,
18884,
1962,
29889,
4397,
877,
29995,
29879,
29901,
1273,
29879,
29915,
1273,
313,
1311,
3032,
12692,
29898,
9294,
291,
29889,
10599,
29918,
978,
511,
525,
29907,
14044,
8785,
13,
9651,
25342,
28306,
29889,
369,
8977,
338,
6213,
470,
28306,
29889,
13168,
338,
7700,
29901,
13,
18884,
1962,
29889,
4397,
877,
29995,
29879,
29901,
1273,
29879,
29915,
1273,
313,
1311,
3032,
9539,
29898,
9294,
291,
29889,
10599,
29918,
978,
511,
525,
12412,
12784,
451,
10049,
304,
445,
289,
792,
29891,
6169,
876,
13,
9651,
1683,
29901,
13,
18884,
995,
353,
525,
22995,
14803,
29915,
13,
18884,
565,
28306,
29889,
19635,
29901,
13,
462,
1678,
995,
4619,
13420,
15562,
29901,
1273,
29879,
29915,
1273,
4390,
29889,
29881,
17204,
29898,
9294,
291,
29889,
19635,
29892,
2656,
29918,
8149,
29922,
5574,
29897,
13,
18884,
1962,
29889,
4397,
877,
29995,
29879,
29901,
1273,
29879,
29915,
1273,
313,
1311,
3032,
1127,
29898,
9294,
291,
29889,
10599,
29918,
978,
511,
995,
876,
13,
4706,
1583,
3032,
5358,
29918,
2972,
580,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
9539,
877,
29083,
1178,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
333,
4961,
13,
4706,
1962,
29889,
21843,
29898,
1311,
29889,
8813,
29898,
8758,
29892,
2436,
29922,
8824,
876,
13,
4706,
565,
2777,
29889,
26061,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
1127,
877,
5709,
29901,
18390,
8785,
13,
4706,
25342,
2777,
29889,
7165,
29918,
15603,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
5709,
29901,
16499,
291,
3474,
5764,
8785,
13,
4706,
25342,
2777,
29889,
23834,
1275,
525,
5461,
2396,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
5709,
29901,
910,
24238,
756,
451,
1063,
885,
11310,
29889,
887,
508,
7135,
263,
12812,
1286,
6169,
876,
13,
4706,
25342,
11815,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
29136,
877,
5709,
29901,
7419,
786,
5335,
287,
29899,
449,
29892,
3113,
337,
2202,
8785,
13,
4706,
1683,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
5709,
29901,
19509,
8785,
13,
4706,
565,
2777,
29889,
1853,
1275,
525,
4219,
2396,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
4219,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
9507,
4961,
13,
4706,
1683,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
3434,
3871,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
9507,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
5261,
6997,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
23834,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
20779,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
13509,
4961,
13,
13,
4706,
565,
2777,
29889,
3733,
952,
3221,
338,
451,
6213,
29901,
13,
9651,
883,
2620,
353,
1583,
3032,
657,
29918,
13628,
29918,
4830,
29898,
8758,
29889,
3733,
952,
3221,
29897,
13,
9651,
1962,
29889,
4397,
29898,
689,
2620,
877,
7713,
29891,
20097,
29901,
12365,
29889,
29906,
29900,
29888,
29913,
4286,
4830,
29898,
8758,
29889,
3733,
952,
3221,
4961,
13,
13,
4706,
736,
1583,
3032,
4905,
29898,
4905,
29892,
2436,
29897,
13,
13,
1678,
822,
298,
1657,
29898,
1311,
29892,
1121,
29892,
2436,
29922,
5574,
1125,
13,
4706,
1962,
353,
5159,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
9539,
877,
29950,
1657,
5163,
29901,
6571,
4286,
4830,
29898,
2914,
29889,
333,
4961,
13,
4706,
565,
1121,
29889,
4925,
338,
451,
6213,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
9966,
29901,
6571,
4286,
4830,
29898,
2914,
29889,
4925,
4961,
13,
4706,
565,
1121,
29889,
19238,
300,
29918,
978,
338,
451,
6213,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
29934,
2540,
300,
4408,
29901,
6571,
4286,
4830,
29898,
2914,
29889,
19238,
300,
29918,
978,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
20399,
472,
29901,
6571,
4286,
4830,
29898,
2914,
29889,
11600,
4961,
13,
13,
4706,
736,
1583,
3032,
4905,
29898,
4905,
29892,
2436,
29897,
13,
13,
1678,
822,
298,
1657,
29918,
311,
1026,
291,
29898,
1311,
29892,
1121,
29892,
2436,
29922,
5574,
1125,
13,
4706,
1962,
353,
5159,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
29136,
877,
14191,
3730,
11132,
379,
1657,
29901,
8785,
13,
4706,
1962,
29889,
21843,
29898,
1311,
29889,
29882,
1657,
29898,
2914,
29892,
2436,
29922,
8824,
876,
13,
13,
4706,
736,
1583,
3032,
4905,
29898,
4905,
29892,
2436,
29897,
13,
13,
1678,
822,
298,
1657,
29918,
2914,
29898,
1311,
29892,
1121,
29892,
2436,
29922,
5574,
1125,
13,
4706,
1962,
353,
5159,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
9652,
373,
5751,
426,
978,
29913,
4286,
4830,
29898,
978,
29922,
2914,
29889,
7491,
29918,
978,
29897,
718,
13,
462,
462,
29871,
313,
742,
8282,
29901,
426,
2914,
29918,
11338,
29913,
4286,
4830,
29898,
13,
462,
462,
268,
1121,
29918,
11338,
29922,
2914,
29889,
11338,
29897,
565,
1121,
29889,
11338,
2804,
6629,
1683,
6629,
4961,
13,
4706,
1962,
29889,
21843,
29898,
1311,
29889,
8813,
29918,
8758,
29898,
2914,
29889,
8813,
29892,
2436,
29922,
8824,
876,
13,
4706,
736,
1583,
3032,
4905,
29898,
4905,
29892,
2436,
29897,
13,
13,
1678,
822,
6865,
300,
29898,
1311,
29892,
1121,
29892,
2436,
29922,
5574,
29892,
8118,
29922,
8824,
1125,
13,
4706,
1962,
353,
5159,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
9539,
877,
29934,
2540,
300,
5163,
29901,
6571,
4286,
4830,
29898,
2914,
29889,
333,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
1170,
29901,
6571,
4286,
4830,
29898,
2914,
29889,
978,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
9868,
29901,
6571,
4286,
4830,
29898,
2914,
29889,
8216,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
20399,
472,
29901,
6571,
4286,
4830,
29898,
2914,
29889,
11600,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
2111,
2164,
472,
29901,
6571,
4286,
4830,
29898,
2914,
29889,
1545,
2164,
4961,
13,
4706,
565,
8118,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
21002,
3583,
29876,
8875,
4286,
4830,
29898,
2914,
29889,
29891,
2518,
4961,
13,
4706,
736,
1583,
3032,
4905,
29898,
4905,
29892,
2436,
29897,
13,
13,
1678,
822,
4055,
29918,
2324,
29898,
1311,
29892,
1121,
29892,
2436,
29922,
5574,
1125,
13,
4706,
1962,
353,
5159,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
9539,
877,
23498,
29906,
29945,
29953,
29901,
6571,
4286,
4830,
29898,
2914,
29889,
17051,
29906,
29945,
29953,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
6730,
3595,
29901,
6571,
4286,
4830,
29898,
2914,
29889,
4102,
29918,
28026,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
28089,
29901,
6571,
4286,
4830,
29898,
2914,
29889,
11338,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
22555,
583,
29901,
6571,
4286,
4830,
29898,
2914,
29889,
8302,
583,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
29923,
1050,
3460,
29901,
6571,
4286,
4830,
29898,
2914,
29889,
25154,
3460,
4961,
13,
4706,
736,
1583,
3032,
4905,
29898,
4905,
29892,
2436,
29897,
13,
13,
1678,
822,
3942,
29898,
1311,
29892,
1121,
29892,
2436,
29922,
5574,
1125,
13,
4706,
1962,
353,
5159,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
9539,
877,
27104,
29901,
6571,
4286,
4830,
29898,
2914,
29889,
978,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
29923,
1050,
3460,
29901,
6571,
4286,
4830,
29898,
2914,
29889,
25154,
3460,
4961,
13,
4706,
736,
1583,
3032,
4905,
29898,
4905,
29892,
2436,
29897,
13,
13,
1678,
822,
4055,
29898,
1311,
29892,
1121,
29892,
2436,
29922,
5574,
1125,
13,
4706,
1962,
353,
5159,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
9539,
877,
8176,
29901,
6571,
4286,
4830,
29898,
2914,
29889,
978,
4961,
13,
4706,
736,
1583,
3032,
4905,
29898,
4905,
29892,
2436,
29897,
13,
13,
1678,
822,
1887,
29918,
8813,
29898,
1311,
29892,
24238,
29892,
2436,
29922,
5574,
1125,
13,
4706,
1962,
353,
5159,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
14191,
3730,
16532,
24238,
6571,
304,
6571,
29915,
13,
462,
462,
29871,
869,
4830,
29898,
8813,
29889,
8813,
29918,
978,
29892,
24238,
29889,
978,
4961,
13,
4706,
736,
1583,
3032,
4905,
29898,
4905,
29892,
2436,
29897,
13,
13,
1678,
822,
903,
29069,
29918,
20698,
29918,
9482,
29898,
1311,
29892,
1962,
29892,
2224,
29892,
5447,
29892,
10809,
29922,
29900,
1125,
13,
4706,
5447,
29918,
1807,
353,
6702,
891,
525,
334,
313,
19488,
448,
29871,
29896,
876,
718,
525,
718,
29899,
29915,
565,
10809,
1405,
29871,
29900,
1683,
6629,
13,
4706,
1857,
29918,
2084,
353,
15300,
4286,
7122,
29898,
2084,
29897,
13,
4706,
565,
451,
5447,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
29898,
8336,
29918,
1807,
718,
1857,
29918,
2084,
876,
13,
4706,
1683,
29901,
13,
9651,
565,
2224,
29901,
13,
18884,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
29898,
8336,
29918,
1807,
718,
1857,
29918,
2084,
876,
13,
9651,
363,
413,
29892,
325,
297,
5447,
29889,
7076,
7295,
13,
18884,
1583,
3032,
29069,
29918,
20698,
29918,
9482,
29898,
4905,
29892,
2224,
718,
518,
29895,
1402,
325,
29892,
10809,
29922,
19488,
718,
29871,
29896,
29897,
13,
13,
1678,
822,
10417,
29898,
1311,
29892,
10417,
29892,
2436,
29922,
5574,
1125,
13,
4706,
1962,
353,
5159,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
9166,
4936,
2751,
29922,
341,
20304,
1275,
9166,
4936,
1360,
2433,
876,
13,
4706,
1583,
3032,
29069,
29918,
20698,
29918,
9482,
29898,
4905,
29892,
19997,
10417,
29889,
3126,
29897,
13,
4706,
736,
1583,
3032,
4905,
29898,
4905,
29892,
2436,
29897,
13,
13,
1678,
822,
15562,
29898,
1311,
29892,
2777,
29892,
2436,
29922,
5574,
1125,
13,
4706,
1962,
353,
5159,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
9166,
4936,
2751,
29922,
4737,
7221,
1275,
9166,
4936,
1360,
2433,
876,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
9539,
877,
9986,
7060,
1178,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
333,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
20399,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
11600,
4961,
13,
13,
4706,
565,
2777,
29889,
17051,
29906,
29945,
29953,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
23498,
29906,
29945,
29953,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
17051,
29906,
29945,
29953,
4961,
13,
4706,
565,
2777,
29889,
17051,
29896,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
23498,
29896,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
17051,
29896,
4961,
13,
4706,
565,
2777,
29889,
3487,
29945,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
5773,
29945,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
3487,
29945,
4961,
13,
4706,
565,
2777,
29889,
893,
24535,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
1799,
2287,
15488,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
893,
24535,
4961,
13,
4706,
565,
2777,
29889,
15206,
845,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
14632,
7068,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
15206,
845,
4961,
13,
13,
4706,
565,
2777,
29889,
4102,
29918,
28026,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
6730,
3595,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
4102,
29918,
28026,
4961,
13,
4706,
565,
2777,
29889,
4230,
29918,
1557,
11310,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
8897,
885,
11310,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
4230,
29918,
1557,
11310,
4961,
13,
9651,
396,
897,
17990,
630,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
8897,
3595,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
4230,
29918,
1557,
11310,
4961,
13,
13,
4706,
565,
2777,
29889,
29885,
17528,
668,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
29924,
17528,
668,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
29885,
17528,
668,
4961,
13,
4706,
565,
2777,
29889,
1062,
2760,
29918,
29885,
17528,
668,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
5647,
2760,
286,
17528,
668,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
1062,
2760,
29918,
29885,
17528,
668,
4961,
13,
4706,
565,
2777,
29889,
5156,
14803,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
22995,
14803,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
5156,
14803,
4961,
13,
4706,
565,
2777,
29889,
1785,
647,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
20841,
647,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
1785,
647,
4961,
13,
4706,
565,
2777,
29889,
7827,
29918,
29881,
2650,
1953,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
11536,
1439,
29872,
1953,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
7827,
29918,
29881,
2650,
1953,
4961,
13,
13,
4706,
565,
2777,
29889,
3129,
2708,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
11096,
2708,
29901,
8785,
13,
9651,
1583,
3032,
3150,
29918,
2972,
580,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
8875,
4286,
4830,
29317,
15300,
7122,
29898,
8758,
29889,
3129,
2708,
13697,
13,
9651,
1583,
3032,
5358,
29918,
2972,
580,
13,
4706,
565,
2777,
29889,
666,
29894,
29946,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
29902,
29886,
29894,
29946,
29901,
8785,
13,
9651,
1583,
3032,
3150,
29918,
2972,
580,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
8875,
4286,
4830,
29317,
15300,
7122,
29898,
8758,
29889,
666,
29894,
29946,
13697,
13,
9651,
1583,
3032,
5358,
29918,
2972,
580,
13,
4706,
565,
2777,
29889,
666,
29894,
29953,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
29902,
29886,
29894,
29953,
29901,
8785,
13,
9651,
1583,
3032,
3150,
29918,
2972,
580,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
8875,
4286,
4830,
29317,
15300,
7122,
29898,
8758,
29889,
666,
29894,
29953,
13697,
13,
9651,
1583,
3032,
5358,
29918,
2972,
580,
13,
4706,
565,
2777,
29889,
26045,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
5983,
29879,
29901,
8785,
13,
9651,
1583,
3032,
3150,
29918,
2972,
580,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
8875,
4286,
4830,
29317,
15300,
7122,
29898,
8758,
29889,
26045,
13697,
13,
9651,
1583,
3032,
5358,
29918,
2972,
580,
13,
13,
4706,
565,
2777,
29889,
1777,
264,
1280,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
3434,
264,
1280,
29901,
8785,
13,
9651,
1583,
3032,
3150,
29918,
2972,
580,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
8875,
4286,
4830,
29317,
15300,
7122,
29898,
8758,
29889,
1777,
264,
1280,
13697,
13,
9651,
1583,
3032,
5358,
29918,
2972,
580,
13,
13,
4706,
736,
1583,
3032,
4905,
29898,
4905,
29892,
2436,
29897,
13,
13,
1678,
822,
4974,
1080,
29898,
1311,
29892,
2777,
29892,
2436,
29922,
5574,
1125,
13,
4706,
1962,
353,
5159,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
9166,
4936,
2751,
29922,
16499,
1080,
17163,
1275,
9166,
4936,
1360,
2433,
876,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
9539,
877,
14697,
1080,
17163,
1178,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
333,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
12412,
1178,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
10599,
29918,
333,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
20399,
472,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
11600,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
4763,
2635,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
1256,
29918,
2962,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
5044,
2635,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
1256,
29918,
355,
4961,
13,
13,
4706,
565,
2777,
29889,
12925,
29918,
2084,
338,
451,
6213,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
22954,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
12925,
29918,
2084,
4961,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
5574,
10321,
3321,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
3009,
29918,
1066,
3321,
4961,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
5574,
12610,
1230,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
3009,
29918,
22198,
4961,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
8824,
10321,
3321,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
4541,
29918,
1066,
3321,
4961,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
8824,
12610,
1230,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
4541,
29918,
22198,
4961,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
29903,
375,
29886,
14803,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
29879,
375,
29886,
14803,
4961,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
14148,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
26690,
4961,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
11536,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
7827,
4961,
13,
13,
4706,
736,
1583,
3032,
4905,
29898,
4905,
29892,
2436,
29897,
13,
13,
1678,
822,
18952,
29898,
1311,
29892,
2777,
29892,
2436,
29922,
5574,
1125,
13,
4706,
1962,
353,
5159,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
9166,
4936,
2751,
29922,
478,
4769,
17163,
1275,
9166,
4936,
1360,
2433,
876,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
9539,
877,
29963,
4769,
17163,
1178,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
333,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
12412,
1178,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
10599,
29918,
333,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
20399,
472,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
11600,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
4763,
2635,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
1256,
29918,
2962,
4961,
13,
4706,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
5044,
2635,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
1256,
29918,
355,
4961,
13,
13,
4706,
565,
2777,
29889,
12925,
29918,
2084,
338,
451,
6213,
29901,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
22954,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
12925,
29918,
2084,
4961,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
5574,
10321,
3321,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
3009,
29918,
1066,
3321,
4961,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
5574,
12610,
1230,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
3009,
29918,
22198,
4961,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
8824,
10321,
3321,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
4541,
29918,
1066,
3321,
4961,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
8824,
12610,
1230,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
4541,
29918,
22198,
4961,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
29903,
375,
29886,
14803,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
29879,
375,
29886,
14803,
4961,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
14148,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
26690,
4961,
13,
9651,
1962,
29889,
4397,
29898,
1311,
3032,
10921,
877,
11536,
29901,
6571,
4286,
4830,
29898,
8758,
29889,
7827,
4961,
13,
13,
4706,
736,
1583,
3032,
4905,
29898,
4905,
29892,
2436,
29897,
13,
13,
1678,
732,
275,
29918,
2972,
287,
13,
1678,
822,
903,
10921,
29898,
1311,
29892,
1426,
1125,
13,
4706,
736,
2828,
29889,
3293,
29898,
726,
29892,
285,
29887,
2433,
10921,
1495,
13,
13,
1678,
732,
275,
29918,
2972,
287,
13,
1678,
822,
903,
29136,
29898,
1311,
29892,
1426,
1125,
13,
4706,
736,
2828,
29889,
3293,
29898,
726,
29892,
285,
29887,
2433,
29136,
1495,
13,
13,
1678,
732,
275,
29918,
2972,
287,
13,
1678,
822,
903,
1127,
29898,
1311,
29892,
1426,
1125,
13,
4706,
736,
2828,
29889,
3293,
29898,
726,
29892,
285,
29887,
2433,
1127,
1495,
13,
13,
1678,
732,
275,
29918,
2972,
287,
13,
1678,
822,
903,
9539,
29898,
1311,
29892,
1426,
1125,
13,
4706,
736,
2828,
29889,
3293,
29898,
726,
29892,
285,
29887,
2433,
9539,
1495,
13,
13,
1678,
732,
275,
29918,
2972,
287,
13,
1678,
822,
903,
12692,
29898,
1311,
29892,
1426,
1125,
13,
4706,
736,
2828,
29889,
3293,
29898,
726,
29892,
285,
29887,
2433,
12692,
1495,
13,
13,
1678,
822,
903,
3150,
29918,
2972,
29898,
1311,
1125,
13,
4706,
1583,
3032,
19488,
4619,
29871,
29896,
13,
13,
1678,
822,
903,
5358,
29918,
2972,
29898,
1311,
1125,
13,
4706,
1583,
3032,
19488,
22361,
29871,
29896,
13,
2
] |
examples/elementtree/pickle.py | Thhhza/sqlalchemy | 2 | 109050 | <filename>examples/elementtree/pickle.py<gh_stars>1-10
"""illustrates a quick and dirty way to persist an XML document expressed using ElementTree and pickle.
This is a trivial example using PickleType to marshal/unmarshal the ElementTree
document into a binary column. Compare to explicit.py which stores the individual components of the ElementTree
structure in distinct rows using two additional mapped entities. Note that the usage of both
styles of persistence are identical, as is the structure of the main Document class.
"""
from sqlalchemy import (create_engine, MetaData, Table, Column, Integer, String,
PickleType)
from sqlalchemy.orm import mapper, Session
import sys, os
from xml.etree import ElementTree
e = create_engine('sqlite://')
meta = MetaData()
# setup a comparator for the PickleType since it's a mutable
# element.
def are_elements_equal(x, y):
return x == y
# stores a top level record of an XML document.
# the "element" column will store the ElementTree document as a BLOB.
documents = Table('documents', meta,
Column('document_id', Integer, primary_key=True),
Column('filename', String(30), unique=True),
Column('element', PickleType(comparator=are_elements_equal))
)
meta.create_all(e)
# our document class. contains a string name,
# and the ElementTree root element.
class Document(object):
def __init__(self, name, element):
self.filename = name
self.element = element
# setup mapper.
mapper(Document, documents)
###### time to test ! #########
# get ElementTree document
filename = os.path.join(os.path.dirname(__file__), "test.xml")
doc = ElementTree.parse(filename)
# save to DB
session = Session(e)
session.add(Document("test.xml", doc))
session.commit()
# restore
document = session.query(Document).filter_by(filename="test.xml").first()
# print
document.element.write(sys.stdout)
| [
1,
529,
9507,
29958,
19057,
29914,
5029,
8336,
29914,
23945,
280,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
453,
4627,
1078,
263,
4996,
322,
26616,
982,
304,
24379,
385,
6560,
1842,
13384,
773,
10619,
9643,
322,
5839,
280,
29889,
13,
13,
4013,
338,
263,
12604,
1342,
773,
23868,
280,
1542,
304,
1766,
23258,
29914,
348,
3034,
23258,
278,
10619,
9643,
13,
3225,
964,
263,
7581,
1897,
29889,
29871,
3831,
598,
304,
6261,
29889,
2272,
607,
14422,
278,
5375,
7117,
310,
278,
10619,
9643,
13,
23905,
297,
8359,
4206,
773,
1023,
5684,
20545,
16212,
29889,
29871,
3940,
393,
278,
8744,
310,
1716,
13,
9783,
310,
3736,
11416,
526,
13557,
29892,
408,
338,
278,
3829,
310,
278,
1667,
10854,
770,
29889,
13,
15945,
29908,
13,
13,
3166,
4576,
284,
305,
6764,
1053,
313,
3258,
29918,
10599,
29892,
20553,
1469,
29892,
6137,
29892,
12481,
29892,
8102,
29892,
1714,
29892,
13,
1678,
23868,
280,
1542,
29897,
13,
3166,
4576,
284,
305,
6764,
29889,
555,
1053,
611,
2496,
29892,
16441,
13,
13,
5215,
10876,
29892,
2897,
13,
13,
3166,
4903,
29889,
300,
929,
1053,
10619,
9643,
13,
13,
29872,
353,
1653,
29918,
10599,
877,
22793,
597,
1495,
13,
7299,
353,
20553,
1469,
580,
13,
13,
29937,
6230,
263,
5734,
1061,
363,
278,
23868,
280,
1542,
1951,
372,
29915,
29879,
263,
26691,
13,
29937,
1543,
29889,
13,
1753,
526,
29918,
17664,
29918,
11745,
29898,
29916,
29892,
343,
1125,
13,
1678,
736,
921,
1275,
343,
13,
13,
29937,
14422,
263,
2246,
3233,
2407,
310,
385,
6560,
1842,
29889,
13,
29937,
278,
376,
5029,
29908,
1897,
674,
3787,
278,
10619,
9643,
1842,
408,
263,
350,
28902,
29889,
13,
3225,
29879,
353,
6137,
877,
3225,
29879,
742,
12700,
29892,
13,
1678,
12481,
877,
3225,
29918,
333,
742,
8102,
29892,
7601,
29918,
1989,
29922,
5574,
511,
13,
1678,
12481,
877,
9507,
742,
1714,
29898,
29941,
29900,
511,
5412,
29922,
5574,
511,
13,
1678,
12481,
877,
5029,
742,
23868,
280,
1542,
29898,
510,
17954,
29922,
598,
29918,
17664,
29918,
11745,
876,
13,
29897,
13,
13,
7299,
29889,
3258,
29918,
497,
29898,
29872,
29897,
13,
13,
29937,
1749,
1842,
770,
29889,
29871,
3743,
263,
1347,
1024,
29892,
13,
29937,
322,
278,
10619,
9643,
3876,
1543,
29889,
13,
1990,
10854,
29898,
3318,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
1024,
29892,
1543,
1125,
13,
4706,
1583,
29889,
9507,
353,
1024,
13,
4706,
1583,
29889,
5029,
353,
1543,
13,
13,
29937,
6230,
611,
2496,
29889,
13,
655,
2496,
29898,
6268,
29892,
10701,
29897,
13,
13,
4136,
2277,
931,
304,
1243,
1738,
835,
4136,
2277,
13,
13,
29937,
679,
10619,
9643,
1842,
13,
9507,
353,
2897,
29889,
2084,
29889,
7122,
29898,
359,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
511,
376,
1688,
29889,
3134,
1159,
13,
1514,
353,
10619,
9643,
29889,
5510,
29898,
9507,
29897,
13,
13,
29937,
4078,
304,
6535,
13,
7924,
353,
16441,
29898,
29872,
29897,
13,
7924,
29889,
1202,
29898,
6268,
703,
1688,
29889,
3134,
613,
1574,
876,
13,
7924,
29889,
15060,
580,
13,
13,
29937,
17749,
13,
3225,
353,
4867,
29889,
1972,
29898,
6268,
467,
4572,
29918,
1609,
29898,
9507,
543,
1688,
29889,
3134,
2564,
4102,
580,
13,
13,
29937,
1596,
13,
3225,
29889,
5029,
29889,
3539,
29898,
9675,
29889,
25393,
29897,
13,
13,
2
] |
usermanagementorg/views_group_insert_user.py | shagun30/djambala-2 | 0 | 164681 | <reponame>shagun30/djambala-2<gh_stars>0
# -*- coding: utf-8 -*-
"""
/dms/usermanagementorg/views_group_insert_user.py
.. loescht User mit dem entsprechenden User-Namen
Django content Management System
<NAME>
<EMAIL>
Die Programme des dms-Systems koennen frei genutzt und den spezifischen
Beduerfnissen entsprechend angepasst werden.
0.01 23.04.2008 Beginn der Arbeit
0.02 24.04.2008 E-Mail versenden
0.03 30.04.2008 target_group_ids
"""
import string
import datetime
import random
from django.db import transaction
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
from django import newforms as forms
from django.utils.safestring import mark_safe
from django.template.loader import get_template
from django.template import Context
from django.utils.translation import ugettext as _
from dms.auth.models import User
from dms.queries import get_site_url
from dms.queries import delete_user_by_username
from dms.queries import get_userfolder_org_id
from dms.queries import delete_group_by_id
from dms.queries import delete_users_in_group
from dms.queries import get_users_by_org_id
from dms.queries import get_users_by_group_id
from dms.queries import get_group_by_id
from dms.queries import get_user_by_email
from dms.queries import set_user_org
from dms.queries import set_user_group
from dms.roles import require_permission
from dms.mail import send_password
from dms.utils import get_tabbed_form
from dms.utils_form import get_item_vars_add
from dms.userregistration.utils import get_username
from dms.usermanagementorg.utils import get_groups
from dms.usermanagementorg.utils import create_member
from dms.usermanagementorg.help_form import help_form
from dms_ext.extension import * # dms-Funktionen ueberschreiben
# -----------------------------------------------------
def create_members(org_id, group_id, target_group_ids, fcontent):
""" legt mehrere User fuer org_id an und ordnet sie der group_id zu """
lines = string.splitfields(fcontent)
for line in lines:
if line.find('@') > 0:
line = line.replace('"', '')
items = string.splitfields(line.strip(), ';')
if len(items) == 4:
sex = items[0].strip()
first_name = items[1].strip()
last_name = items[2].strip()
email = items[3].strip()
title = ''
elif len(items) == 5:
sex = items[0].strip()
title = items[1].strip()
first_name = items[2].strip()
last_name = items[3].strip()
email = items[4].strip()
elif len(items) == 6:
sex = items[1].strip()
title = items[2].strip()
first_name = items[3].strip()
last_name = items[4].strip()
email = items[5].strip()
create_member(org_id, group_id, target_group_ids, sex, first_name, last_name, title_name, email)
# -----------------------------------------------------
@require_permission('perm_manage_user_new')
def usermanagementorg_group_insert_user(request, item_container):
""" nimmt User in Comunity auf und ergaenzt sie bei einer Basisgruppe """
org_id = get_userfolder_org_id(item_container)
def get_group_list(org_id):
""" liefert die vorhandenen Gruppen der Organisation org_id """
tList = get_template('app/usermanagementorg/group_list.html')
groups = get_groups(org_id, True)
return tList.render(Context({ 'groups': groups, }))
def get_group_names(org_id, primary_mode):
""" liefert die vorhandenen Gruppen der Organisation org_id """
groups = get_groups(org_id)
ret = []
for group in groups:
if ( primary_mode and group['is_primary'] ) or \
( not primary_mode and not group['is_primary'] ) :
ret.append((group['id'], group['description']))
return ret
group_items = get_group_list(org_id)
class DmsItemForm(forms.Form):
""" Elemente des Eingabeformulars """
group_names_primary = forms.ChoiceField(choices=get_group_names(org_id, True), widget=forms.RadioSelect() )
group_names = forms.MultipleChoiceField(required=False, choices=get_group_names(org_id, False),
widget=forms.CheckboxSelectMultiple() )
fname = forms.CharField(required=False, max_length=200,
widget=forms.FileInput(attrs={'size':40}) )
app_name = 'usermanagementorg'
my_title = _(u'Mitglieder aufnehmen')
show_errors = ( request.method == 'POST' )
if show_errors:
data = request.POST.copy()
else :
data = {}
# --- Formular mit Daten fuellen und zur Anzeige vorbereiten
f = DmsItemForm(data)
tabs = [ ('tab_group_user_insert', [ 'group_names_primary', 'group_names', 'fname' ]) ]
if request.method == 'POST' and not f.errors:
data = f.cleaned_data
create_members(org_id, data['group_names_primary'], data['group_names'],
request.FILES['fname']['content'])
return HttpResponseRedirect(get_site_url(item_container, 'index.html'))
else:
content = get_tabbed_form(tabs, help_form, app_name, f)
vars = get_item_vars_add(request, item_container, app_name, my_title, content, show_errors)
vars['next'] = './user_management.html?op=member_insert_group'
vars['is_file_form'] = True
return render_to_response('app/base_edit.html', vars)
| [
1,
529,
276,
1112,
420,
29958,
845,
351,
348,
29941,
29900,
29914,
19776,
1117,
2883,
29899,
29906,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
29914,
29881,
1516,
29914,
375,
3504,
5049,
990,
29914,
7406,
29918,
2972,
29918,
7851,
29918,
1792,
29889,
2272,
13,
13,
636,
658,
1968,
29873,
4911,
1380,
1261,
875,
28562,
2162,
4911,
29899,
29940,
5071,
13,
308,
15337,
2793,
15057,
2184,
13,
13,
29966,
5813,
29958,
13,
29966,
26862,
6227,
29958,
13,
13,
16334,
7835,
1004,
553,
270,
1516,
29899,
3924,
29879,
5812,
18723,
3005,
29875,
2531,
26216,
563,
972,
961,
29920,
361,
1679,
13,
29933,
287,
2853,
9144,
13119,
875,
28562,
355,
15725,
18182,
303,
3678,
29889,
13,
13,
29900,
29889,
29900,
29896,
259,
29906,
29941,
29889,
29900,
29946,
29889,
29906,
29900,
29900,
29947,
29871,
27847,
589,
17561,
13,
29900,
29889,
29900,
29906,
259,
29906,
29946,
29889,
29900,
29946,
29889,
29906,
29900,
29900,
29947,
29871,
382,
29899,
14925,
1224,
2162,
13,
29900,
29889,
29900,
29941,
259,
29941,
29900,
29889,
29900,
29946,
29889,
29906,
29900,
29900,
29947,
29871,
3646,
29918,
2972,
29918,
4841,
13,
15945,
29908,
13,
13,
5215,
1347,
13,
5215,
12865,
13,
5215,
4036,
13,
13,
3166,
9557,
29889,
2585,
3986,
1053,
10804,
13,
3166,
9557,
29889,
1124,
4706,
1053,
9056,
5103,
24735,
13,
3166,
9557,
29889,
12759,
7582,
29879,
259,
1053,
4050,
29918,
517,
29918,
5327,
13,
3166,
9557,
632,
1053,
716,
9514,
408,
7190,
13,
3166,
9557,
29889,
13239,
29889,
29879,
2142,
342,
5393,
29871,
1053,
2791,
29918,
11177,
13,
3166,
9557,
29889,
6886,
29889,
12657,
1053,
679,
29918,
6886,
13,
3166,
9557,
29889,
6886,
1678,
1053,
15228,
13,
13,
3166,
9557,
29889,
13239,
29889,
3286,
18411,
1053,
318,
657,
726,
408,
903,
13,
13,
3166,
270,
1516,
29889,
5150,
29889,
9794,
1678,
1053,
4911,
13,
13,
3166,
270,
1516,
29889,
339,
6358,
4706,
1053,
679,
29918,
2746,
29918,
2271,
13,
3166,
270,
1516,
29889,
339,
6358,
4706,
1053,
5217,
29918,
1792,
29918,
1609,
29918,
6786,
13,
3166,
270,
1516,
29889,
339,
6358,
4706,
1053,
679,
29918,
1792,
12083,
29918,
990,
29918,
333,
13,
3166,
270,
1516,
29889,
339,
6358,
4706,
1053,
5217,
29918,
2972,
29918,
1609,
29918,
333,
13,
3166,
270,
1516,
29889,
339,
6358,
4706,
1053,
5217,
29918,
7193,
29918,
262,
29918,
2972,
13,
3166,
270,
1516,
29889,
339,
6358,
4706,
1053,
679,
29918,
7193,
29918,
1609,
29918,
990,
29918,
333,
13,
3166,
270,
1516,
29889,
339,
6358,
4706,
1053,
679,
29918,
7193,
29918,
1609,
29918,
2972,
29918,
333,
13,
3166,
270,
1516,
29889,
339,
6358,
4706,
1053,
679,
29918,
2972,
29918,
1609,
29918,
333,
13,
3166,
270,
1516,
29889,
339,
6358,
4706,
1053,
679,
29918,
1792,
29918,
1609,
29918,
5269,
13,
3166,
270,
1516,
29889,
339,
6358,
4706,
1053,
731,
29918,
1792,
29918,
990,
13,
3166,
270,
1516,
29889,
339,
6358,
4706,
1053,
731,
29918,
1792,
29918,
2972,
13,
13,
3166,
270,
1516,
29889,
307,
793,
3986,
1053,
1996,
29918,
16074,
13,
3166,
270,
1516,
29889,
2549,
965,
1053,
3638,
29918,
5630,
13,
3166,
270,
1516,
29889,
13239,
3986,
1053,
679,
29918,
3891,
2580,
29918,
689,
13,
3166,
270,
1516,
29889,
13239,
29918,
689,
268,
1053,
679,
29918,
667,
29918,
16908,
29918,
1202,
13,
13,
3166,
270,
1516,
29889,
1792,
1727,
8306,
29889,
13239,
539,
1053,
679,
29918,
6786,
13,
3166,
270,
1516,
29889,
375,
3504,
5049,
990,
29889,
13239,
418,
1053,
679,
29918,
13155,
13,
3166,
270,
1516,
29889,
375,
3504,
5049,
990,
29889,
13239,
418,
1053,
1653,
29918,
14242,
13,
3166,
270,
1516,
29889,
375,
3504,
5049,
990,
29889,
8477,
29918,
689,
29871,
1053,
1371,
29918,
689,
13,
13,
3166,
270,
1516,
29918,
1062,
29889,
17588,
1678,
1053,
334,
396,
270,
1516,
29899,
25394,
23668,
318,
774,
7092,
12207,
264,
13,
13,
29937,
448,
2683,
2683,
2683,
807,
13,
1753,
1653,
29918,
28109,
29898,
990,
29918,
333,
29892,
2318,
29918,
333,
29892,
3646,
29918,
2972,
29918,
4841,
29892,
285,
3051,
1125,
13,
29871,
9995,
2814,
29873,
21742,
4911,
8470,
1638,
29918,
333,
385,
563,
4356,
1212,
2686,
589,
2318,
29918,
333,
1729,
9995,
13,
29871,
3454,
353,
1347,
29889,
5451,
9621,
29898,
29888,
3051,
29897,
13,
29871,
363,
1196,
297,
3454,
29901,
13,
1678,
565,
1196,
29889,
2886,
877,
29992,
1495,
1405,
29871,
29900,
29901,
13,
418,
1196,
353,
1196,
29889,
6506,
877,
29908,
742,
27255,
13,
418,
4452,
353,
1347,
29889,
5451,
9621,
29898,
1220,
29889,
17010,
3285,
21921,
1495,
13,
418,
565,
7431,
29898,
7076,
29897,
1275,
29871,
29946,
29901,
13,
4706,
7916,
353,
4452,
29961,
29900,
1822,
17010,
580,
13,
4706,
937,
29918,
978,
353,
4452,
29961,
29896,
1822,
17010,
580,
13,
4706,
1833,
29918,
978,
353,
4452,
29961,
29906,
1822,
17010,
580,
13,
4706,
4876,
353,
4452,
29961,
29941,
1822,
17010,
580,
13,
4706,
3611,
353,
6629,
13,
418,
25342,
7431,
29898,
7076,
29897,
1275,
29871,
29945,
29901,
13,
4706,
7916,
353,
4452,
29961,
29900,
1822,
17010,
580,
13,
4706,
3611,
353,
4452,
29961,
29896,
1822,
17010,
580,
13,
4706,
937,
29918,
978,
353,
4452,
29961,
29906,
1822,
17010,
580,
13,
4706,
1833,
29918,
978,
353,
4452,
29961,
29941,
1822,
17010,
580,
13,
4706,
4876,
353,
4452,
29961,
29946,
1822,
17010,
580,
13,
418,
25342,
7431,
29898,
7076,
29897,
1275,
29871,
29953,
29901,
13,
4706,
7916,
353,
4452,
29961,
29896,
1822,
17010,
580,
13,
4706,
3611,
353,
4452,
29961,
29906,
1822,
17010,
580,
13,
4706,
937,
29918,
978,
353,
4452,
29961,
29941,
1822,
17010,
580,
13,
4706,
1833,
29918,
978,
353,
4452,
29961,
29946,
1822,
17010,
580,
13,
4706,
4876,
353,
4452,
29961,
29945,
1822,
17010,
580,
13,
418,
1653,
29918,
14242,
29898,
990,
29918,
333,
29892,
2318,
29918,
333,
29892,
3646,
29918,
2972,
29918,
4841,
29892,
7916,
29892,
937,
29918,
978,
29892,
1833,
29918,
978,
29892,
3611,
29918,
978,
29892,
4876,
29897,
13,
13,
29937,
448,
2683,
2683,
2683,
807,
13,
29992,
12277,
29918,
16074,
877,
17858,
29918,
1171,
482,
29918,
1792,
29918,
1482,
1495,
13,
1753,
502,
3504,
5049,
990,
29918,
2972,
29918,
7851,
29918,
1792,
29898,
3827,
29892,
2944,
29918,
7611,
1125,
13,
29871,
9995,
21930,
4378,
4911,
297,
422,
6997,
1622,
563,
604,
3249,
264,
2065,
2686,
2862,
3422,
4886,
275,
25218,
9995,
13,
13,
29871,
1638,
29918,
333,
353,
679,
29918,
1792,
12083,
29918,
990,
29918,
333,
29898,
667,
29918,
7611,
29897,
13,
13,
29871,
822,
679,
29918,
2972,
29918,
1761,
29898,
990,
29918,
333,
1125,
13,
1678,
9995,
3804,
19175,
762,
3764,
3179,
6537,
5430,
7785,
589,
25783,
1638,
29918,
333,
9995,
13,
1678,
260,
1293,
353,
679,
29918,
6886,
877,
932,
29914,
375,
3504,
5049,
990,
29914,
2972,
29918,
1761,
29889,
1420,
1495,
13,
1678,
6471,
353,
679,
29918,
13155,
29898,
990,
29918,
333,
29892,
5852,
29897,
13,
1678,
736,
260,
1293,
29889,
9482,
29898,
2677,
3319,
525,
13155,
2396,
6471,
29892,
500,
876,
13,
13,
29871,
822,
679,
29918,
2972,
29918,
7039,
29898,
990,
29918,
333,
29892,
7601,
29918,
8513,
1125,
13,
1678,
9995,
3804,
19175,
762,
3764,
3179,
6537,
5430,
7785,
589,
25783,
1638,
29918,
333,
9995,
13,
1678,
6471,
353,
679,
29918,
13155,
29898,
990,
29918,
333,
29897,
13,
1678,
3240,
353,
5159,
13,
1678,
363,
2318,
297,
6471,
29901,
13,
418,
565,
313,
7601,
29918,
8513,
322,
2318,
1839,
275,
29918,
16072,
2033,
1723,
470,
320,
13,
308,
313,
451,
7601,
29918,
8513,
322,
451,
2318,
1839,
275,
29918,
16072,
2033,
1723,
584,
13,
4706,
3240,
29889,
4397,
3552,
2972,
1839,
333,
7464,
2318,
1839,
8216,
25901,
13,
1678,
736,
3240,
13,
13,
29871,
2318,
29918,
7076,
353,
679,
29918,
2972,
29918,
1761,
29898,
990,
29918,
333,
29897,
13,
13,
29871,
770,
360,
1516,
2001,
2500,
29898,
9514,
29889,
2500,
1125,
13,
1678,
9995,
10619,
29872,
553,
29776,
4302,
689,
1070,
29879,
9995,
13,
1678,
2318,
29918,
7039,
29918,
16072,
353,
7190,
29889,
29620,
3073,
29898,
1859,
1575,
29922,
657,
29918,
2972,
29918,
7039,
29898,
990,
29918,
333,
29892,
5852,
511,
11109,
29922,
9514,
29889,
21818,
3549,
580,
1723,
13,
1678,
2318,
29918,
7039,
353,
7190,
29889,
15329,
552,
29620,
3073,
29898,
12403,
29922,
8824,
29892,
19995,
29922,
657,
29918,
2972,
29918,
7039,
29898,
990,
29918,
333,
29892,
7700,
511,
13,
462,
9651,
11109,
29922,
9514,
29889,
5596,
1884,
3549,
15329,
552,
580,
1723,
13,
1678,
285,
978,
353,
7190,
29889,
27890,
29898,
12403,
29922,
8824,
29892,
4236,
29918,
2848,
29922,
29906,
29900,
29900,
29892,
13,
462,
29871,
11109,
29922,
9514,
29889,
2283,
4290,
29898,
5552,
29879,
3790,
29915,
2311,
2396,
29946,
29900,
1800,
1723,
13,
13,
29871,
623,
29918,
978,
353,
525,
375,
3504,
5049,
990,
29915,
13,
29871,
590,
29918,
3257,
353,
903,
29898,
29884,
29915,
29924,
277,
29887,
16820,
1622,
14026,
1495,
13,
29871,
1510,
29918,
12523,
353,
313,
2009,
29889,
5696,
1275,
525,
5438,
29915,
1723,
13,
29871,
565,
1510,
29918,
12523,
29901,
13,
1678,
848,
353,
2009,
29889,
5438,
29889,
8552,
580,
13,
29871,
1683,
584,
13,
1678,
848,
353,
6571,
13,
29871,
396,
11474,
3812,
1070,
1380,
13617,
4084,
4919,
563,
3046,
530,
911,
2231,
3764,
13167,
3537,
13,
29871,
285,
353,
360,
1516,
2001,
2500,
29898,
1272,
29897,
13,
29871,
18859,
353,
518,
6702,
3891,
29918,
2972,
29918,
1792,
29918,
7851,
742,
518,
525,
2972,
29918,
7039,
29918,
16072,
742,
525,
2972,
29918,
7039,
742,
525,
29888,
978,
29915,
29871,
2314,
4514,
13,
29871,
565,
2009,
29889,
5696,
1275,
525,
5438,
29915,
322,
451,
285,
29889,
12523,
29901,
13,
1678,
848,
353,
285,
29889,
14941,
287,
29918,
1272,
13,
1678,
1653,
29918,
28109,
29898,
990,
29918,
333,
29892,
848,
1839,
2972,
29918,
7039,
29918,
16072,
7464,
848,
1839,
2972,
29918,
7039,
7464,
13,
462,
259,
2009,
29889,
24483,
1839,
29888,
978,
16215,
3051,
11287,
13,
1678,
736,
9056,
5103,
24735,
29898,
657,
29918,
2746,
29918,
2271,
29898,
667,
29918,
7611,
29892,
525,
2248,
29889,
1420,
8785,
13,
29871,
1683,
29901,
13,
1678,
2793,
353,
679,
29918,
3891,
2580,
29918,
689,
29898,
21175,
29892,
1371,
29918,
689,
29892,
623,
29918,
978,
29892,
285,
29897,
13,
1678,
24987,
353,
679,
29918,
667,
29918,
16908,
29918,
1202,
29898,
3827,
29892,
2944,
29918,
7611,
29892,
623,
29918,
978,
29892,
590,
29918,
3257,
29892,
2793,
29892,
1510,
29918,
12523,
29897,
13,
1678,
24987,
1839,
4622,
2033,
353,
19283,
1792,
29918,
21895,
29889,
1420,
29973,
459,
29922,
14242,
29918,
7851,
29918,
2972,
29915,
13,
1678,
24987,
1839,
275,
29918,
1445,
29918,
689,
2033,
353,
5852,
13,
1678,
736,
4050,
29918,
517,
29918,
5327,
877,
932,
29914,
3188,
29918,
5628,
29889,
1420,
742,
24987,
29897,
13,
13,
2
] |
house_robber.py | tusharsadhwani/leetcode | 6 | 119426 | class Solution:
def rob(self, nums: list[int]) -> int:
if len(nums) == 0:
return 0
max_loot: list[int] = [0 for _ in nums]
for index, num in enumerate(nums):
if index == 0:
max_loot[index] = num
elif index == 1:
max_loot[index] = max(max_loot[index-1], num)
else:
max_loot[index] = max(
max_loot[index-1],
num + max_loot[index-2]
)
return max_loot[-1]
tests = [
(
([1, 2, 3, 1],),
4,
),
(
([2, 7, 9, 3, 1],),
12,
),
]
| [
1,
770,
24380,
29901,
13,
1678,
822,
10832,
29898,
1311,
29892,
954,
29879,
29901,
1051,
29961,
524,
2314,
1599,
938,
29901,
13,
4706,
565,
7431,
29898,
1949,
29879,
29897,
1275,
29871,
29900,
29901,
13,
9651,
736,
29871,
29900,
13,
13,
4706,
4236,
29918,
417,
327,
29901,
1051,
29961,
524,
29962,
353,
518,
29900,
363,
903,
297,
954,
29879,
29962,
13,
4706,
363,
2380,
29892,
954,
297,
26985,
29898,
1949,
29879,
1125,
13,
9651,
565,
2380,
1275,
29871,
29900,
29901,
13,
18884,
4236,
29918,
417,
327,
29961,
2248,
29962,
353,
954,
13,
9651,
25342,
2380,
1275,
29871,
29896,
29901,
13,
18884,
4236,
29918,
417,
327,
29961,
2248,
29962,
353,
4236,
29898,
3317,
29918,
417,
327,
29961,
2248,
29899,
29896,
1402,
954,
29897,
13,
9651,
1683,
29901,
13,
18884,
4236,
29918,
417,
327,
29961,
2248,
29962,
353,
4236,
29898,
13,
462,
1678,
4236,
29918,
417,
327,
29961,
2248,
29899,
29896,
1402,
13,
462,
1678,
954,
718,
4236,
29918,
417,
327,
29961,
2248,
29899,
29906,
29962,
13,
18884,
1723,
13,
13,
4706,
736,
4236,
29918,
417,
327,
14352,
29896,
29962,
13,
13,
13,
21150,
353,
518,
13,
1678,
313,
13,
4706,
9310,
29896,
29892,
29871,
29906,
29892,
29871,
29941,
29892,
29871,
29896,
1402,
511,
13,
308,
29946,
29892,
13,
1678,
10353,
13,
1678,
313,
13,
4706,
9310,
29906,
29892,
29871,
29955,
29892,
29871,
29929,
29892,
29871,
29941,
29892,
29871,
29896,
1402,
511,
13,
308,
29896,
29906,
29892,
13,
1678,
10353,
13,
29962,
13,
2
] |
registrobrepp/domain/eppcreatebrdomain.py | ivcmartello/registrobrepp | 0 | 77680 | <gh_stars>0
from eppy.doc import EppDoc
class EppCreateBrDomain(EppDoc):
_path = ('brdomain:create', )
def __init__(self, organization: str, flag1: str = None, flag2: str = None, flag3: str = None, autorenew: bool = False):
rpf = None
if flag1 or flag2 or flag3:
rpf = {'@flag1': flag1, '@flag2': flag2, '@flag3': flag3}
dct = {
'brdomain:create': {
'organization': organization,
'releaseProcessFlags': rpf,
'autoRenew': {'@active': '1' if autorenew else '0'}
}
}
super(EppCreateBrDomain, self).__init__(dct=self.annotate(dct))
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
321,
23717,
29889,
1514,
1053,
382,
407,
14526,
13,
13,
13,
1990,
382,
407,
4391,
12432,
15951,
29898,
29923,
407,
14526,
1125,
13,
1678,
903,
2084,
353,
6702,
1182,
7247,
29901,
3258,
742,
1723,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
13013,
29901,
851,
29892,
7353,
29896,
29901,
851,
353,
6213,
29892,
7353,
29906,
29901,
851,
353,
6213,
29892,
7353,
29941,
29901,
851,
353,
6213,
29892,
1120,
8085,
809,
29901,
6120,
353,
7700,
1125,
13,
4706,
364,
7810,
353,
6213,
13,
4706,
565,
7353,
29896,
470,
7353,
29906,
470,
7353,
29941,
29901,
13,
9651,
364,
7810,
353,
11117,
29992,
15581,
29896,
2396,
7353,
29896,
29892,
18803,
15581,
29906,
2396,
7353,
29906,
29892,
18803,
15581,
29941,
2396,
7353,
29941,
29913,
13,
4706,
270,
312,
353,
426,
13,
9651,
525,
1182,
7247,
29901,
3258,
2396,
426,
13,
18884,
525,
6388,
2133,
2396,
13013,
29892,
13,
18884,
525,
14096,
7032,
15675,
2396,
364,
7810,
29892,
13,
18884,
525,
6921,
29934,
264,
809,
2396,
11117,
29992,
4925,
2396,
525,
29896,
29915,
565,
1120,
8085,
809,
1683,
525,
29900,
10827,
13,
9651,
500,
13,
4706,
500,
13,
4706,
2428,
29898,
29923,
407,
4391,
12432,
15951,
29892,
1583,
467,
1649,
2344,
12035,
29881,
312,
29922,
1311,
29889,
6735,
403,
29898,
29881,
312,
876,
13,
2
] |
universal_portfolio/util/process_data.py | jehung/universal_portfolio | 14 | 1615928 | import os
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
datapath = '../util/stock_dfs/'
def get_ticker(x):
return x.split('/')[-1].split('.')[0]
def ret(x, y):
return np.log(y/x)
def get_zscore(x):
return (x -x.mean())/x.std()
def make_inputs(filepath):
D = pd.read_csv(filepath).set_index('Date')
#D.index = pd.to_datetime(D.index,format='%Y-%m-%d') # Set the indix to a datetime
Res = pd.DataFrame()
ticker = get_ticker(filepath)
Res['c_2_o'] = get_zscore(ret(D.Open,D.Close))
Res['h_2_o'] = get_zscore(ret(D.Open,D.High))
Res['l_2_o'] = get_zscore(ret(D.Open,D.Low))
Res['c_2_h'] = get_zscore(ret(D.High,D.Close))
Res['h_2_l'] = get_zscore(ret(D.High,D.Low))
Res['c1_c0'] = ret(D.Close,D.Close.shift(-1)).fillna(0) #Tommorows return
Res['vol'] = get_zscore(D.Volume)
Res['ticker'] = ticker
return Res
def merge_all_data(datapath):
all = pd.DataFrame()
for f in os.listdir(datapath):
filepath = os.path.join(datapath,f)
if filepath.endswith('.csv'):
print(filepath)
Res = make_inputs(filepath)
all = all.append(Res)
return all
def embed(df, str):
"str: choice of return, class, multi_class"
pivot_columns = df.columns[:-1]
P = df.pivot_table(index=df.index, columns='ticker', values=pivot_columns) # Make a pivot table from the data
mi = P.columns.tolist()
new_ind = pd.Index(e[1] + '_' + e[0] for e in mi)
P.columns = new_ind
clean_and_flat = P.dropna(axis=1)
target_cols = list(filter(lambda x: 'c1_c0' in x, clean_and_flat.columns.values))
input_cols = list(filter(lambda x: 'c1_c0' not in x, clean_and_flat.columns.values))
inputDF = clean_and_flat[input_cols]
targetDF = clean_and_flat[target_cols]
TotalReturn = ((1 - np.exp(targetDF)).sum(axis=1)) / len(targetDF.columns) # If i put one dollar in each stock at the close, this is how much I'd get back
Labeled = pd.DataFrame()
Labeled['return'] = TotalReturn
Labeled['class'] = TotalReturn.apply(labeler, 1)
Labeled['multi_class'] = pd.qcut(TotalReturn, 11, labels=range(11))
pd.qcut(TotalReturn, 5).unique()
return inputDF, Labeled[str]
def labeler(x):
if x>0.0029:
return 1
if x<-0.00462:
return -1
else:
return 0
'''
if __name__ == "__main__":
all = merge_all_data(datapath)
inputdf, targetdf = embed(all)
labeled = process_target(targetdf)
print(inputdf.head())
print(labeled.head())
''' | [
1,
1053,
2897,
13,
5215,
11701,
408,
10518,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
13,
13,
13,
4130,
481,
493,
353,
525,
6995,
4422,
29914,
17712,
29918,
29069,
22208,
13,
13,
13,
1753,
679,
29918,
29873,
6541,
29898,
29916,
1125,
13,
1678,
736,
921,
29889,
5451,
11219,
1495,
14352,
29896,
1822,
5451,
12839,
29861,
29900,
29962,
13,
13,
13,
1753,
3240,
29898,
29916,
29892,
343,
1125,
13,
1678,
736,
7442,
29889,
1188,
29898,
29891,
29914,
29916,
29897,
13,
13,
13,
1753,
679,
29918,
29920,
13628,
29898,
29916,
1125,
13,
1678,
736,
313,
29916,
448,
29916,
29889,
12676,
3101,
29914,
29916,
29889,
4172,
580,
13,
13,
13,
1753,
1207,
29918,
2080,
29879,
29898,
1445,
2084,
1125,
13,
1678,
360,
353,
10518,
29889,
949,
29918,
7638,
29898,
1445,
2084,
467,
842,
29918,
2248,
877,
2539,
1495,
13,
1678,
396,
29928,
29889,
2248,
353,
10518,
29889,
517,
29918,
12673,
29898,
29928,
29889,
2248,
29892,
4830,
2433,
29995,
29979,
19222,
29885,
19222,
29881,
1495,
396,
3789,
278,
1399,
861,
304,
263,
12865,
13,
1678,
2538,
353,
10518,
29889,
17271,
580,
13,
1678,
260,
6541,
353,
679,
29918,
29873,
6541,
29898,
1445,
2084,
29897,
13,
13,
1678,
2538,
1839,
29883,
29918,
29906,
29918,
29877,
2033,
353,
679,
29918,
29920,
13628,
29898,
2267,
29898,
29928,
29889,
6585,
29892,
29928,
29889,
11123,
876,
13,
1678,
2538,
1839,
29882,
29918,
29906,
29918,
29877,
2033,
353,
679,
29918,
29920,
13628,
29898,
2267,
29898,
29928,
29889,
6585,
29892,
29928,
29889,
16382,
876,
13,
1678,
2538,
1839,
29880,
29918,
29906,
29918,
29877,
2033,
353,
679,
29918,
29920,
13628,
29898,
2267,
29898,
29928,
29889,
6585,
29892,
29928,
29889,
29931,
340,
876,
13,
1678,
2538,
1839,
29883,
29918,
29906,
29918,
29882,
2033,
353,
679,
29918,
29920,
13628,
29898,
2267,
29898,
29928,
29889,
16382,
29892,
29928,
29889,
11123,
876,
13,
1678,
2538,
1839,
29882,
29918,
29906,
29918,
29880,
2033,
353,
679,
29918,
29920,
13628,
29898,
2267,
29898,
29928,
29889,
16382,
29892,
29928,
29889,
29931,
340,
876,
13,
1678,
2538,
1839,
29883,
29896,
29918,
29883,
29900,
2033,
353,
3240,
29898,
29928,
29889,
11123,
29892,
29928,
29889,
11123,
29889,
10889,
6278,
29896,
8106,
5589,
1056,
29898,
29900,
29897,
396,
29911,
3011,
272,
1242,
736,
13,
1678,
2538,
1839,
1555,
2033,
353,
679,
29918,
29920,
13628,
29898,
29928,
29889,
24679,
29897,
13,
1678,
2538,
1839,
29873,
6541,
2033,
353,
260,
6541,
13,
1678,
736,
2538,
13,
13,
13,
1753,
10366,
29918,
497,
29918,
1272,
29898,
4130,
481,
493,
1125,
13,
1678,
599,
353,
10518,
29889,
17271,
580,
13,
1678,
363,
285,
297,
2897,
29889,
1761,
3972,
29898,
4130,
481,
493,
1125,
13,
4706,
934,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
4130,
481,
493,
29892,
29888,
29897,
13,
4706,
565,
934,
2084,
29889,
1975,
2541,
12839,
7638,
29374,
13,
9651,
1596,
29898,
1445,
2084,
29897,
13,
9651,
2538,
353,
1207,
29918,
2080,
29879,
29898,
1445,
2084,
29897,
13,
9651,
599,
353,
599,
29889,
4397,
29898,
1666,
29897,
13,
13,
1678,
736,
599,
13,
13,
13,
1753,
8297,
29898,
2176,
29892,
851,
1125,
13,
1678,
376,
710,
29901,
7348,
310,
736,
29892,
770,
29892,
2473,
29918,
1990,
29908,
13,
1678,
24438,
29918,
13099,
353,
4489,
29889,
13099,
7503,
29899,
29896,
29962,
13,
1678,
349,
353,
4489,
29889,
29886,
11002,
29918,
2371,
29898,
2248,
29922,
2176,
29889,
2248,
29892,
4341,
2433,
29873,
6541,
742,
1819,
29922,
29886,
11002,
29918,
13099,
29897,
29871,
396,
8561,
263,
24438,
1591,
515,
278,
848,
13,
1678,
3737,
353,
349,
29889,
13099,
29889,
25027,
391,
580,
13,
1678,
716,
29918,
513,
353,
10518,
29889,
3220,
29898,
29872,
29961,
29896,
29962,
718,
22868,
29915,
718,
321,
29961,
29900,
29962,
363,
321,
297,
3737,
29897,
13,
1678,
349,
29889,
13099,
353,
716,
29918,
513,
13,
1678,
5941,
29918,
392,
29918,
20620,
353,
349,
29889,
8865,
1056,
29898,
8990,
29922,
29896,
29897,
13,
1678,
3646,
29918,
22724,
353,
1051,
29898,
4572,
29898,
2892,
921,
29901,
525,
29883,
29896,
29918,
29883,
29900,
29915,
297,
921,
29892,
5941,
29918,
392,
29918,
20620,
29889,
13099,
29889,
5975,
876,
13,
1678,
1881,
29918,
22724,
353,
1051,
29898,
4572,
29898,
2892,
921,
29901,
525,
29883,
29896,
29918,
29883,
29900,
29915,
451,
297,
921,
29892,
5941,
29918,
392,
29918,
20620,
29889,
13099,
29889,
5975,
876,
13,
1678,
1881,
4037,
353,
5941,
29918,
392,
29918,
20620,
29961,
2080,
29918,
22724,
29962,
13,
1678,
3646,
4037,
353,
5941,
29918,
392,
29918,
20620,
29961,
5182,
29918,
22724,
29962,
13,
13,
1678,
14990,
11609,
353,
5135,
29896,
448,
7442,
29889,
4548,
29898,
5182,
4037,
8106,
2083,
29898,
8990,
29922,
29896,
876,
847,
7431,
29898,
5182,
4037,
29889,
13099,
29897,
29871,
396,
960,
474,
1925,
697,
11232,
279,
297,
1269,
10961,
472,
278,
3802,
29892,
445,
338,
920,
1568,
306,
29915,
29881,
679,
1250,
13,
13,
1678,
365,
24025,
353,
10518,
29889,
17271,
580,
13,
1678,
365,
24025,
1839,
2457,
2033,
353,
14990,
11609,
13,
1678,
365,
24025,
1839,
1990,
2033,
353,
14990,
11609,
29889,
7302,
29898,
1643,
261,
29892,
29871,
29896,
29897,
13,
1678,
365,
24025,
1839,
9910,
29918,
1990,
2033,
353,
10518,
29889,
29939,
7582,
29898,
11536,
11609,
29892,
29871,
29896,
29896,
29892,
11073,
29922,
3881,
29898,
29896,
29896,
876,
13,
1678,
10518,
29889,
29939,
7582,
29898,
11536,
11609,
29892,
29871,
29945,
467,
13092,
580,
13,
13,
1678,
736,
1881,
4037,
29892,
365,
24025,
29961,
710,
29962,
13,
13,
13,
1753,
3858,
261,
29898,
29916,
1125,
13,
1678,
565,
921,
29958,
29900,
29889,
29900,
29900,
29906,
29929,
29901,
13,
4706,
736,
29871,
29896,
13,
1678,
565,
921,
16406,
29900,
29889,
29900,
29900,
29946,
29953,
29906,
29901,
13,
4706,
736,
448,
29896,
13,
1678,
1683,
29901,
13,
4706,
736,
29871,
29900,
13,
13,
13,
12008,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
599,
353,
10366,
29918,
497,
29918,
1272,
29898,
4130,
481,
493,
29897,
13,
1678,
1881,
2176,
29892,
3646,
2176,
353,
8297,
29898,
497,
29897,
13,
1678,
301,
24025,
353,
1889,
29918,
5182,
29898,
5182,
2176,
29897,
13,
13,
1678,
1596,
29898,
2080,
2176,
29889,
2813,
3101,
13,
1678,
1596,
29898,
29880,
24025,
29889,
2813,
3101,
13,
12008,
2
] |
ui/mext.py | szymonkaliski/nott | 25 | 15140 | <filename>ui/mext.py
# FIXME: fix all "happy paths coding" issues
import liblo
from threading import Thread
class Mext(object):
device = None
def __init__(self, device_port=5000):
self.device_receiver = liblo.ServerThread(device_port)
self.device_receiver.add_method("/monome/grid/key", "iii", self.on_grid_key)
self.device_receiver.add_method(
"/serialosc/device", "ssi", self.on_serialosc_device
)
self.device_receiver.start()
liblo.send(liblo.Address(12002), "/serialosc/list", "127.0.0.1", device_port)
def set_grid_key_callback(self, fn):
self.grid_key_callback = fn
def set_led_level(self, x, y, value):
Thread(
target=(
lambda: liblo.send(
self.device, "/monome/grid/led/level/set", x, y, value
)
)
).start()
def set_led_map(self, offset_x, offset_y, values):
Thread(
target=(
lambda: liblo.send(
self.device,
"/monome/grid/led/level/map",
offset_x,
offset_y,
*values
)
)
).start()
def on_grid_key(self, path, args):
x, y, edge = args
if self.grid_key_callback:
self.grid_key_callback(x, y, edge)
def on_serialosc_device(self, path, args):
_, sysId, port = args
self.device = liblo.Address(port)
| [
1,
529,
9507,
29958,
1481,
29914,
1004,
486,
29889,
2272,
13,
29937,
383,
6415,
2303,
29901,
2329,
599,
376,
29882,
14862,
10898,
14137,
29908,
5626,
13,
13,
5215,
4303,
417,
13,
3166,
3244,
292,
1053,
10480,
13,
13,
13,
1990,
341,
1062,
29898,
3318,
1125,
13,
1678,
4742,
353,
6213,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4742,
29918,
637,
29922,
29945,
29900,
29900,
29900,
1125,
13,
4706,
1583,
29889,
10141,
29918,
13556,
2147,
353,
4303,
417,
29889,
6004,
4899,
29898,
10141,
29918,
637,
29897,
13,
13,
4706,
1583,
29889,
10141,
29918,
13556,
2147,
29889,
1202,
29918,
5696,
11974,
3712,
608,
29914,
7720,
29914,
1989,
613,
376,
25609,
613,
1583,
29889,
265,
29918,
7720,
29918,
1989,
29897,
13,
4706,
1583,
29889,
10141,
29918,
13556,
2147,
29889,
1202,
29918,
5696,
29898,
13,
9651,
5591,
15550,
14174,
29914,
10141,
613,
376,
893,
29875,
613,
1583,
29889,
265,
29918,
15550,
14174,
29918,
10141,
13,
4706,
1723,
13,
13,
4706,
1583,
29889,
10141,
29918,
13556,
2147,
29889,
2962,
580,
13,
13,
4706,
4303,
417,
29889,
6717,
29898,
1982,
417,
29889,
7061,
29898,
29896,
29906,
29900,
29900,
29906,
511,
5591,
15550,
14174,
29914,
1761,
613,
376,
29896,
29906,
29955,
29889,
29900,
29889,
29900,
29889,
29896,
613,
4742,
29918,
637,
29897,
13,
13,
1678,
822,
731,
29918,
7720,
29918,
1989,
29918,
14035,
29898,
1311,
29892,
7876,
1125,
13,
4706,
1583,
29889,
7720,
29918,
1989,
29918,
14035,
353,
7876,
13,
13,
1678,
822,
731,
29918,
839,
29918,
5563,
29898,
1311,
29892,
921,
29892,
343,
29892,
995,
1125,
13,
4706,
10480,
29898,
13,
9651,
3646,
7607,
13,
18884,
14013,
29901,
4303,
417,
29889,
6717,
29898,
13,
462,
1678,
1583,
29889,
10141,
29892,
5591,
3712,
608,
29914,
7720,
29914,
839,
29914,
5563,
29914,
842,
613,
921,
29892,
343,
29892,
995,
13,
18884,
1723,
13,
9651,
1723,
13,
4706,
13742,
2962,
580,
13,
13,
1678,
822,
731,
29918,
839,
29918,
1958,
29898,
1311,
29892,
9210,
29918,
29916,
29892,
9210,
29918,
29891,
29892,
1819,
1125,
13,
4706,
10480,
29898,
13,
9651,
3646,
7607,
13,
18884,
14013,
29901,
4303,
417,
29889,
6717,
29898,
13,
462,
1678,
1583,
29889,
10141,
29892,
13,
462,
1678,
5591,
3712,
608,
29914,
7720,
29914,
839,
29914,
5563,
29914,
1958,
613,
13,
462,
1678,
9210,
29918,
29916,
29892,
13,
462,
1678,
9210,
29918,
29891,
29892,
13,
462,
1678,
334,
5975,
13,
18884,
1723,
13,
9651,
1723,
13,
4706,
13742,
2962,
580,
13,
13,
1678,
822,
373,
29918,
7720,
29918,
1989,
29898,
1311,
29892,
2224,
29892,
6389,
1125,
13,
4706,
921,
29892,
343,
29892,
7636,
353,
6389,
13,
13,
4706,
565,
1583,
29889,
7720,
29918,
1989,
29918,
14035,
29901,
13,
9651,
1583,
29889,
7720,
29918,
1989,
29918,
14035,
29898,
29916,
29892,
343,
29892,
7636,
29897,
13,
13,
1678,
822,
373,
29918,
15550,
14174,
29918,
10141,
29898,
1311,
29892,
2224,
29892,
6389,
1125,
13,
4706,
17117,
10876,
1204,
29892,
2011,
353,
6389,
13,
13,
4706,
1583,
29889,
10141,
353,
4303,
417,
29889,
7061,
29898,
637,
29897,
13,
2
] |
tests/settings/test_custom_metrics.py | proknow/proknow-python | 2 | 27193 | import pytest
import re
from proknow import Exceptions
def test_create(app, custom_metric_generator):
pk = app.pk
# Verify returned CustomMetricItem
params, custom_metric = custom_metric_generator()
assert custom_metric.name == params["name"]
assert custom_metric.context == params["context"]
assert custom_metric.type == params["type"]
# Assert item can be found in query
custom_metrics = pk.custom_metrics.query()
for custom_metric in custom_metrics:
if custom_metric.name == params["name"]:
custom_metric_match = custom_metric
break
else:
custom_metric_match = None
assert custom_metric_match is not None
assert custom_metric_match.name == params["name"]
assert custom_metric_match.context == params["context"]
assert custom_metric_match.type == params["type"]
def test_create_failure(app, custom_metric_generator):
pk = app.pk
params, custom_metric = custom_metric_generator()
# Assert error is raised for duplicate custom metric
with pytest.raises(Exceptions.HttpError) as err_wrapper:
pk.custom_metrics.create(**params)
assert err_wrapper.value.status_code == 409
assert err_wrapper.value.body == 'Custom metric already exists with name "' + params["name"] + '"'
def test_delete(app, custom_metric_generator):
pk = app.pk
params, custom_metric = custom_metric_generator(do_not_mark=True)
# Verify custom metric was deleted successfully
custom_metric.delete()
for custom_metric in pk.custom_metrics.query():
if custom_metric.name == params["name"]:
match = custom_metric
break
else:
match = None
assert match is None
def test_delete_failure(app, custom_metric_generator):
pk = app.pk
params, custom_metric = custom_metric_generator(do_not_mark=True)
custom_metric.delete()
# Assert error is raised when attempting to delete protected custom metric
with pytest.raises(Exceptions.HttpError) as err_wrapper:
custom_metric.delete()
assert err_wrapper.value.status_code == 404
assert err_wrapper.value.body == 'Custom metric "' + custom_metric.id + '" not found'
def test_find(app, custom_metric_generator):
pk = app.pk
params, custom_metric = custom_metric_generator(name="Find Me")
expr = re.compile(r"ind M")
# Find with no args
found = pk.custom_metrics.find()
assert found is None
# Find using predicate
found = pk.custom_metrics.find(lambda ws: expr.search(ws.data["name"]) is not None)
assert found is not None
assert found.name == params["name"]
assert found.context == params["context"]
assert found.type == params["type"]
# Find using props
found = pk.custom_metrics.find(id=custom_metric.id, name=params["name"])
assert found is not None
assert found.name == params["name"]
assert found.context == params["context"]
assert found.type == params["type"]
# Find using both
found = pk.custom_metrics.find(lambda ws: expr.search(ws.data["name"]) is not None, id=custom_metric.id, name=params["name"])
assert found is not None
assert found.name == params["name"]
assert found.context == params["context"]
assert found.type == params["type"]
# Find failure
found = pk.custom_metrics.find(lambda ws: expr.search(ws.data["id"]) is not None)
assert found is None
found = pk.custom_metrics.find(id=custom_metric.id, name=params["name"].lower())
assert found is None
def test_query(app, custom_metric_generator):
pk = app.pk
params1, custom_metric1 = custom_metric_generator()
params2, custom_metric2 = custom_metric_generator()
# Verify test 1
for custom_metric in pk.custom_metrics.query():
if custom_metric.name == params1["name"]:
match = custom_metric
break
else:
match = None
assert match is not None
assert match.name == params1["name"]
assert match.context == params1["context"]
assert match.type == params1["type"]
# Verify test 2
for custom_metric in pk.custom_metrics.query():
if custom_metric.name == params2["name"]:
match = custom_metric
break
else:
match = None
assert match is not None
assert match.name == params2["name"]
assert match.context == params2["context"]
assert match.type == params2["type"]
def test_resolve(app, custom_metric_generator):
pk = app.pk
params, custom_metric = custom_metric_generator()
# Test resolve by id
resolved = pk.custom_metrics.resolve(custom_metric.id)
assert resolved is not None
assert resolved.name == params["name"]
assert resolved.context == params["context"]
assert resolved.type == params["type"]
# Test resolve by name
resolved = pk.custom_metrics.resolve(params["name"])
assert resolved is not None
assert resolved.name == params["name"]
assert resolved.context == params["context"]
assert resolved.type == params["type"]
def test_resolve_failure(app):
pk = app.pk
# Test resolve by id
with pytest.raises(Exceptions.CustomMetricLookupError) as err_wrapper:
pk.custom_metrics.resolve("00000000000000000000000000000000")
assert err_wrapper.value.message == "Custom metric with id `00000000000000000000000000000000` not found."
# Test resolve by name
with pytest.raises(Exceptions.CustomMetricLookupError) as err_wrapper:
pk.custom_metrics.resolve("My Metric")
assert err_wrapper.value.message == "Custom metric with name `My Metric` not found."
def test_resolve_by_id(app, custom_metric_generator):
pk = app.pk
params, custom_metric = custom_metric_generator()
resolved = pk.custom_metrics.resolve_by_id(custom_metric.id)
assert resolved is not None
assert resolved.name == params["name"]
assert resolved.context == params["context"]
assert resolved.type == params["type"]
def test_resolve_by_id_failure(app):
pk = app.pk
with pytest.raises(Exceptions.CustomMetricLookupError) as err_wrapper:
pk.custom_metrics.resolve_by_id("00000000000000000000000000000000")
assert err_wrapper.value.message == "Custom metric with id `00000000000000000000000000000000` not found."
def test_resolve_by_name(app, custom_metric_generator):
pk = app.pk
params, custom_metric = custom_metric_generator(name="custom-lower1")
resolved = pk.custom_metrics.resolve_by_name(params["name"])
assert resolved is not None
assert resolved.name == params["name"]
assert resolved.context == params["context"]
assert resolved.type == params["type"]
resolved = pk.custom_metrics.resolve_by_name(params["name"].upper())
assert resolved is not None
assert resolved.name == params["name"]
assert resolved.context == params["context"]
assert resolved.type == params["type"]
def test_resolve_by_name_failure(app):
pk = app.pk
with pytest.raises(Exceptions.CustomMetricLookupError) as err_wrapper:
pk.custom_metrics.resolve("My Custom Metric")
assert err_wrapper.value.message == "Custom metric with name `My Custom Metric` not found."
def test_update(app, custom_metric_generator):
pk = app.pk
resource_prefix = app.resource_prefix
params, custom_metric = custom_metric_generator()
# Verify custom metric was updated successfully
updated_name = resource_prefix + "Updated Custom Metric Name"
custom_metric.name = updated_name
custom_metric.context = "image_set"
custom_metric.save()
custom_metrics = pk.custom_metrics.query()
for custom_metric in custom_metrics:
if custom_metric.name == updated_name:
custom_metric_match = custom_metric
break
else:
custom_metric_match = None
assert custom_metric_match is not None
assert custom_metric_match.name == updated_name
assert custom_metric_match.context == "image_set"
assert custom_metric_match.type == params["type"]
def test_update_failure(app, custom_metric_generator):
pk = app.pk
params1, _ = custom_metric_generator()
params2, custom_metric = custom_metric_generator()
# Assert error is raised for duplicate workspace
with pytest.raises(Exceptions.HttpError) as err_wrapper:
custom_metric.name = params1["name"]
custom_metric.save()
assert err_wrapper.value.status_code == 409
assert err_wrapper.value.body == 'Custom metric already exists with name "' + params1["name"] + '"'
| [
1,
1053,
11451,
1688,
13,
5215,
337,
13,
13,
3166,
410,
28385,
1053,
8960,
29879,
13,
13,
1753,
1243,
29918,
3258,
29898,
932,
29892,
2888,
29918,
16414,
29918,
27959,
1125,
13,
1678,
282,
29895,
353,
623,
29889,
20571,
13,
13,
1678,
396,
1798,
1598,
4133,
8701,
10095,
2200,
2001,
13,
1678,
8636,
29892,
2888,
29918,
16414,
353,
2888,
29918,
16414,
29918,
27959,
580,
13,
1678,
4974,
2888,
29918,
16414,
29889,
978,
1275,
8636,
3366,
978,
3108,
13,
1678,
4974,
2888,
29918,
16414,
29889,
4703,
1275,
8636,
3366,
4703,
3108,
13,
1678,
4974,
2888,
29918,
16414,
29889,
1853,
1275,
8636,
3366,
1853,
3108,
13,
13,
1678,
396,
16499,
2944,
508,
367,
1476,
297,
2346,
13,
1678,
2888,
29918,
2527,
10817,
353,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
1972,
580,
13,
1678,
363,
2888,
29918,
16414,
297,
2888,
29918,
2527,
10817,
29901,
13,
4706,
565,
2888,
29918,
16414,
29889,
978,
1275,
8636,
3366,
978,
3108,
29901,
13,
9651,
2888,
29918,
16414,
29918,
4352,
353,
2888,
29918,
16414,
13,
9651,
2867,
13,
1678,
1683,
29901,
13,
4706,
2888,
29918,
16414,
29918,
4352,
353,
6213,
13,
1678,
4974,
2888,
29918,
16414,
29918,
4352,
338,
451,
6213,
13,
1678,
4974,
2888,
29918,
16414,
29918,
4352,
29889,
978,
1275,
8636,
3366,
978,
3108,
13,
1678,
4974,
2888,
29918,
16414,
29918,
4352,
29889,
4703,
1275,
8636,
3366,
4703,
3108,
13,
1678,
4974,
2888,
29918,
16414,
29918,
4352,
29889,
1853,
1275,
8636,
3366,
1853,
3108,
13,
13,
1753,
1243,
29918,
3258,
29918,
14057,
545,
29898,
932,
29892,
2888,
29918,
16414,
29918,
27959,
1125,
13,
1678,
282,
29895,
353,
623,
29889,
20571,
13,
13,
1678,
8636,
29892,
2888,
29918,
16414,
353,
2888,
29918,
16414,
29918,
27959,
580,
13,
13,
1678,
396,
16499,
1059,
338,
10425,
363,
7929,
2888,
12714,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
2451,
29879,
29889,
5506,
2392,
29897,
408,
4589,
29918,
17699,
29901,
13,
4706,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
3258,
29898,
1068,
7529,
29897,
13,
1678,
4974,
4589,
29918,
17699,
29889,
1767,
29889,
4882,
29918,
401,
1275,
29871,
29946,
29900,
29929,
13,
1678,
4974,
4589,
29918,
17699,
29889,
1767,
29889,
2587,
1275,
525,
7281,
12714,
2307,
4864,
411,
1024,
13577,
718,
8636,
3366,
978,
3108,
718,
18793,
29915,
13,
13,
1753,
1243,
29918,
8143,
29898,
932,
29892,
2888,
29918,
16414,
29918,
27959,
1125,
13,
1678,
282,
29895,
353,
623,
29889,
20571,
13,
13,
1678,
8636,
29892,
2888,
29918,
16414,
353,
2888,
29918,
16414,
29918,
27959,
29898,
1867,
29918,
1333,
29918,
3502,
29922,
5574,
29897,
13,
13,
1678,
396,
1798,
1598,
2888,
12714,
471,
11132,
8472,
13,
1678,
2888,
29918,
16414,
29889,
8143,
580,
13,
1678,
363,
2888,
29918,
16414,
297,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
1972,
7295,
13,
4706,
565,
2888,
29918,
16414,
29889,
978,
1275,
8636,
3366,
978,
3108,
29901,
13,
9651,
1993,
353,
2888,
29918,
16414,
13,
9651,
2867,
13,
1678,
1683,
29901,
13,
4706,
1993,
353,
6213,
13,
1678,
4974,
1993,
338,
6213,
13,
13,
1753,
1243,
29918,
8143,
29918,
14057,
545,
29898,
932,
29892,
2888,
29918,
16414,
29918,
27959,
1125,
13,
1678,
282,
29895,
353,
623,
29889,
20571,
13,
13,
1678,
8636,
29892,
2888,
29918,
16414,
353,
2888,
29918,
16414,
29918,
27959,
29898,
1867,
29918,
1333,
29918,
3502,
29922,
5574,
29897,
13,
13,
1678,
2888,
29918,
16414,
29889,
8143,
580,
13,
1678,
396,
16499,
1059,
338,
10425,
746,
15661,
304,
5217,
6364,
2888,
12714,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
2451,
29879,
29889,
5506,
2392,
29897,
408,
4589,
29918,
17699,
29901,
13,
4706,
2888,
29918,
16414,
29889,
8143,
580,
13,
1678,
4974,
4589,
29918,
17699,
29889,
1767,
29889,
4882,
29918,
401,
1275,
29871,
29946,
29900,
29946,
13,
1678,
4974,
4589,
29918,
17699,
29889,
1767,
29889,
2587,
1275,
525,
7281,
12714,
13577,
718,
2888,
29918,
16414,
29889,
333,
718,
18793,
451,
1476,
29915,
13,
13,
1753,
1243,
29918,
2886,
29898,
932,
29892,
2888,
29918,
16414,
29918,
27959,
1125,
13,
1678,
282,
29895,
353,
623,
29889,
20571,
13,
13,
1678,
8636,
29892,
2888,
29918,
16414,
353,
2888,
29918,
16414,
29918,
27959,
29898,
978,
543,
12542,
2191,
1159,
13,
1678,
22010,
353,
337,
29889,
12198,
29898,
29878,
29908,
513,
341,
1159,
13,
13,
1678,
396,
10987,
411,
694,
6389,
13,
1678,
1476,
353,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
2886,
580,
13,
1678,
4974,
1476,
338,
6213,
13,
13,
1678,
396,
10987,
773,
24384,
13,
1678,
1476,
353,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
2886,
29898,
2892,
16904,
29901,
22010,
29889,
4478,
29898,
5652,
29889,
1272,
3366,
978,
20068,
338,
451,
6213,
29897,
13,
1678,
4974,
1476,
338,
451,
6213,
13,
1678,
4974,
1476,
29889,
978,
1275,
8636,
3366,
978,
3108,
13,
1678,
4974,
1476,
29889,
4703,
1275,
8636,
3366,
4703,
3108,
13,
1678,
4974,
1476,
29889,
1853,
1275,
8636,
3366,
1853,
3108,
13,
13,
1678,
396,
10987,
773,
17761,
13,
1678,
1476,
353,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
2886,
29898,
333,
29922,
6341,
29918,
16414,
29889,
333,
29892,
1024,
29922,
7529,
3366,
978,
20068,
13,
1678,
4974,
1476,
338,
451,
6213,
13,
1678,
4974,
1476,
29889,
978,
1275,
8636,
3366,
978,
3108,
13,
1678,
4974,
1476,
29889,
4703,
1275,
8636,
3366,
4703,
3108,
13,
1678,
4974,
1476,
29889,
1853,
1275,
8636,
3366,
1853,
3108,
13,
13,
1678,
396,
10987,
773,
1716,
13,
1678,
1476,
353,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
2886,
29898,
2892,
16904,
29901,
22010,
29889,
4478,
29898,
5652,
29889,
1272,
3366,
978,
20068,
338,
451,
6213,
29892,
1178,
29922,
6341,
29918,
16414,
29889,
333,
29892,
1024,
29922,
7529,
3366,
978,
20068,
13,
1678,
4974,
1476,
338,
451,
6213,
13,
1678,
4974,
1476,
29889,
978,
1275,
8636,
3366,
978,
3108,
13,
1678,
4974,
1476,
29889,
4703,
1275,
8636,
3366,
4703,
3108,
13,
1678,
4974,
1476,
29889,
1853,
1275,
8636,
3366,
1853,
3108,
13,
13,
1678,
396,
10987,
10672,
13,
1678,
1476,
353,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
2886,
29898,
2892,
16904,
29901,
22010,
29889,
4478,
29898,
5652,
29889,
1272,
3366,
333,
20068,
338,
451,
6213,
29897,
13,
1678,
4974,
1476,
338,
6213,
13,
1678,
1476,
353,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
2886,
29898,
333,
29922,
6341,
29918,
16414,
29889,
333,
29892,
1024,
29922,
7529,
3366,
978,
16862,
13609,
3101,
13,
1678,
4974,
1476,
338,
6213,
13,
13,
1753,
1243,
29918,
1972,
29898,
932,
29892,
2888,
29918,
16414,
29918,
27959,
1125,
13,
1678,
282,
29895,
353,
623,
29889,
20571,
13,
13,
1678,
8636,
29896,
29892,
2888,
29918,
16414,
29896,
353,
2888,
29918,
16414,
29918,
27959,
580,
13,
1678,
8636,
29906,
29892,
2888,
29918,
16414,
29906,
353,
2888,
29918,
16414,
29918,
27959,
580,
13,
13,
1678,
396,
1798,
1598,
1243,
29871,
29896,
13,
1678,
363,
2888,
29918,
16414,
297,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
1972,
7295,
13,
4706,
565,
2888,
29918,
16414,
29889,
978,
1275,
8636,
29896,
3366,
978,
3108,
29901,
13,
9651,
1993,
353,
2888,
29918,
16414,
13,
9651,
2867,
13,
1678,
1683,
29901,
13,
4706,
1993,
353,
6213,
13,
1678,
4974,
1993,
338,
451,
6213,
13,
1678,
4974,
1993,
29889,
978,
1275,
8636,
29896,
3366,
978,
3108,
13,
1678,
4974,
1993,
29889,
4703,
1275,
8636,
29896,
3366,
4703,
3108,
13,
1678,
4974,
1993,
29889,
1853,
1275,
8636,
29896,
3366,
1853,
3108,
13,
13,
1678,
396,
1798,
1598,
1243,
29871,
29906,
13,
1678,
363,
2888,
29918,
16414,
297,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
1972,
7295,
13,
4706,
565,
2888,
29918,
16414,
29889,
978,
1275,
8636,
29906,
3366,
978,
3108,
29901,
13,
9651,
1993,
353,
2888,
29918,
16414,
13,
9651,
2867,
13,
1678,
1683,
29901,
13,
4706,
1993,
353,
6213,
13,
1678,
4974,
1993,
338,
451,
6213,
13,
1678,
4974,
1993,
29889,
978,
1275,
8636,
29906,
3366,
978,
3108,
13,
1678,
4974,
1993,
29889,
4703,
1275,
8636,
29906,
3366,
4703,
3108,
13,
1678,
4974,
1993,
29889,
1853,
1275,
8636,
29906,
3366,
1853,
3108,
13,
13,
1753,
1243,
29918,
17863,
29898,
932,
29892,
2888,
29918,
16414,
29918,
27959,
1125,
13,
1678,
282,
29895,
353,
623,
29889,
20571,
13,
13,
1678,
8636,
29892,
2888,
29918,
16414,
353,
2888,
29918,
16414,
29918,
27959,
580,
13,
13,
1678,
396,
4321,
8814,
491,
1178,
13,
1678,
11527,
353,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
17863,
29898,
6341,
29918,
16414,
29889,
333,
29897,
13,
1678,
4974,
11527,
338,
451,
6213,
13,
1678,
4974,
11527,
29889,
978,
1275,
8636,
3366,
978,
3108,
13,
1678,
4974,
11527,
29889,
4703,
1275,
8636,
3366,
4703,
3108,
13,
1678,
4974,
11527,
29889,
1853,
1275,
8636,
3366,
1853,
3108,
13,
13,
1678,
396,
4321,
8814,
491,
1024,
13,
1678,
11527,
353,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
17863,
29898,
7529,
3366,
978,
20068,
13,
1678,
4974,
11527,
338,
451,
6213,
13,
1678,
4974,
11527,
29889,
978,
1275,
8636,
3366,
978,
3108,
13,
1678,
4974,
11527,
29889,
4703,
1275,
8636,
3366,
4703,
3108,
13,
1678,
4974,
11527,
29889,
1853,
1275,
8636,
3366,
1853,
3108,
13,
13,
1753,
1243,
29918,
17863,
29918,
14057,
545,
29898,
932,
1125,
13,
1678,
282,
29895,
353,
623,
29889,
20571,
13,
13,
1678,
396,
4321,
8814,
491,
1178,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
2451,
29879,
29889,
7281,
10095,
2200,
14959,
786,
2392,
29897,
408,
4589,
29918,
17699,
29901,
13,
4706,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
17863,
703,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
1159,
13,
1678,
4974,
4589,
29918,
17699,
29889,
1767,
29889,
4906,
1275,
376,
7281,
12714,
411,
1178,
421,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29952,
451,
1476,
1213,
13,
13,
1678,
396,
4321,
8814,
491,
1024,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
2451,
29879,
29889,
7281,
10095,
2200,
14959,
786,
2392,
29897,
408,
4589,
29918,
17699,
29901,
13,
4706,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
17863,
703,
3421,
4737,
2200,
1159,
13,
1678,
4974,
4589,
29918,
17699,
29889,
1767,
29889,
4906,
1275,
376,
7281,
12714,
411,
1024,
421,
3421,
4737,
2200,
29952,
451,
1476,
1213,
13,
13,
1753,
1243,
29918,
17863,
29918,
1609,
29918,
333,
29898,
932,
29892,
2888,
29918,
16414,
29918,
27959,
1125,
13,
1678,
282,
29895,
353,
623,
29889,
20571,
13,
13,
1678,
8636,
29892,
2888,
29918,
16414,
353,
2888,
29918,
16414,
29918,
27959,
580,
13,
13,
1678,
11527,
353,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
17863,
29918,
1609,
29918,
333,
29898,
6341,
29918,
16414,
29889,
333,
29897,
13,
1678,
4974,
11527,
338,
451,
6213,
13,
1678,
4974,
11527,
29889,
978,
1275,
8636,
3366,
978,
3108,
13,
1678,
4974,
11527,
29889,
4703,
1275,
8636,
3366,
4703,
3108,
13,
1678,
4974,
11527,
29889,
1853,
1275,
8636,
3366,
1853,
3108,
13,
13,
1753,
1243,
29918,
17863,
29918,
1609,
29918,
333,
29918,
14057,
545,
29898,
932,
1125,
13,
1678,
282,
29895,
353,
623,
29889,
20571,
13,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
2451,
29879,
29889,
7281,
10095,
2200,
14959,
786,
2392,
29897,
408,
4589,
29918,
17699,
29901,
13,
4706,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
17863,
29918,
1609,
29918,
333,
703,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
1159,
13,
1678,
4974,
4589,
29918,
17699,
29889,
1767,
29889,
4906,
1275,
376,
7281,
12714,
411,
1178,
421,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29900,
29952,
451,
1476,
1213,
13,
13,
1753,
1243,
29918,
17863,
29918,
1609,
29918,
978,
29898,
932,
29892,
2888,
29918,
16414,
29918,
27959,
1125,
13,
1678,
282,
29895,
353,
623,
29889,
20571,
13,
13,
1678,
8636,
29892,
2888,
29918,
16414,
353,
2888,
29918,
16414,
29918,
27959,
29898,
978,
543,
6341,
29899,
13609,
29896,
1159,
13,
13,
1678,
11527,
353,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
17863,
29918,
1609,
29918,
978,
29898,
7529,
3366,
978,
20068,
13,
1678,
4974,
11527,
338,
451,
6213,
13,
1678,
4974,
11527,
29889,
978,
1275,
8636,
3366,
978,
3108,
13,
1678,
4974,
11527,
29889,
4703,
1275,
8636,
3366,
4703,
3108,
13,
1678,
4974,
11527,
29889,
1853,
1275,
8636,
3366,
1853,
3108,
13,
13,
1678,
11527,
353,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
17863,
29918,
1609,
29918,
978,
29898,
7529,
3366,
978,
16862,
21064,
3101,
13,
1678,
4974,
11527,
338,
451,
6213,
13,
1678,
4974,
11527,
29889,
978,
1275,
8636,
3366,
978,
3108,
13,
1678,
4974,
11527,
29889,
4703,
1275,
8636,
3366,
4703,
3108,
13,
1678,
4974,
11527,
29889,
1853,
1275,
8636,
3366,
1853,
3108,
13,
13,
1753,
1243,
29918,
17863,
29918,
1609,
29918,
978,
29918,
14057,
545,
29898,
932,
1125,
13,
1678,
282,
29895,
353,
623,
29889,
20571,
13,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
2451,
29879,
29889,
7281,
10095,
2200,
14959,
786,
2392,
29897,
408,
4589,
29918,
17699,
29901,
13,
4706,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
17863,
703,
3421,
8701,
4737,
2200,
1159,
13,
1678,
4974,
4589,
29918,
17699,
29889,
1767,
29889,
4906,
1275,
376,
7281,
12714,
411,
1024,
421,
3421,
8701,
4737,
2200,
29952,
451,
1476,
1213,
13,
13,
1753,
1243,
29918,
5504,
29898,
932,
29892,
2888,
29918,
16414,
29918,
27959,
1125,
13,
1678,
282,
29895,
353,
623,
29889,
20571,
13,
1678,
6503,
29918,
13506,
353,
623,
29889,
10314,
29918,
13506,
13,
13,
1678,
8636,
29892,
2888,
29918,
16414,
353,
2888,
29918,
16414,
29918,
27959,
580,
13,
13,
1678,
396,
1798,
1598,
2888,
12714,
471,
4784,
8472,
13,
1678,
4784,
29918,
978,
353,
6503,
29918,
13506,
718,
376,
29248,
8701,
4737,
2200,
4408,
29908,
13,
1678,
2888,
29918,
16414,
29889,
978,
353,
4784,
29918,
978,
13,
1678,
2888,
29918,
16414,
29889,
4703,
353,
376,
3027,
29918,
842,
29908,
13,
1678,
2888,
29918,
16414,
29889,
7620,
580,
13,
1678,
2888,
29918,
2527,
10817,
353,
282,
29895,
29889,
6341,
29918,
2527,
10817,
29889,
1972,
580,
13,
1678,
363,
2888,
29918,
16414,
297,
2888,
29918,
2527,
10817,
29901,
13,
4706,
565,
2888,
29918,
16414,
29889,
978,
1275,
4784,
29918,
978,
29901,
13,
9651,
2888,
29918,
16414,
29918,
4352,
353,
2888,
29918,
16414,
13,
9651,
2867,
13,
1678,
1683,
29901,
13,
4706,
2888,
29918,
16414,
29918,
4352,
353,
6213,
13,
1678,
4974,
2888,
29918,
16414,
29918,
4352,
338,
451,
6213,
13,
1678,
4974,
2888,
29918,
16414,
29918,
4352,
29889,
978,
1275,
4784,
29918,
978,
13,
1678,
4974,
2888,
29918,
16414,
29918,
4352,
29889,
4703,
1275,
376,
3027,
29918,
842,
29908,
13,
1678,
4974,
2888,
29918,
16414,
29918,
4352,
29889,
1853,
1275,
8636,
3366,
1853,
3108,
13,
13,
1753,
1243,
29918,
5504,
29918,
14057,
545,
29898,
932,
29892,
2888,
29918,
16414,
29918,
27959,
1125,
13,
1678,
282,
29895,
353,
623,
29889,
20571,
13,
13,
1678,
8636,
29896,
29892,
903,
353,
2888,
29918,
16414,
29918,
27959,
580,
13,
1678,
8636,
29906,
29892,
2888,
29918,
16414,
353,
2888,
29918,
16414,
29918,
27959,
580,
13,
13,
1678,
396,
16499,
1059,
338,
10425,
363,
7929,
664,
3493,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
2451,
29879,
29889,
5506,
2392,
29897,
408,
4589,
29918,
17699,
29901,
13,
4706,
2888,
29918,
16414,
29889,
978,
353,
8636,
29896,
3366,
978,
3108,
13,
4706,
2888,
29918,
16414,
29889,
7620,
580,
13,
1678,
4974,
4589,
29918,
17699,
29889,
1767,
29889,
4882,
29918,
401,
1275,
29871,
29946,
29900,
29929,
13,
1678,
4974,
4589,
29918,
17699,
29889,
1767,
29889,
2587,
1275,
525,
7281,
12714,
2307,
4864,
411,
1024,
13577,
718,
8636,
29896,
3366,
978,
3108,
718,
18793,
29915,
13,
2
] |
apps/libro/urls.py | ernestoaguaysol/mysite | 0 | 173249 | <reponame>ernestoaguaysol/mysite<filename>apps/libro/urls.py
from django.urls import path
from .views import crearAutor,listarAutor
urlpatterns = [
path('crear_autor/', crearAutor, name = 'crear_autor'),
path('listar_autor/', listarAutor, name = 'listar_autor')
] | [
1,
529,
276,
1112,
420,
29958,
824,
4778,
10617,
1036,
324,
29914,
5781,
568,
29966,
9507,
29958,
13371,
29914,
1982,
307,
29914,
26045,
29889,
2272,
13,
3166,
9557,
29889,
26045,
1053,
2224,
13,
3166,
869,
7406,
1053,
907,
279,
29909,
3406,
29892,
1761,
279,
29909,
3406,
13,
13,
2271,
11037,
29879,
353,
518,
13,
1678,
2224,
877,
1037,
279,
29918,
8309,
29914,
742,
907,
279,
29909,
3406,
29892,
1024,
353,
525,
1037,
279,
29918,
8309,
5477,
13,
1678,
2224,
877,
1761,
279,
29918,
8309,
29914,
742,
1051,
279,
29909,
3406,
29892,
1024,
353,
525,
1761,
279,
29918,
8309,
1495,
13,
29962,
2
] |
app/viewsets.py | mvargas33/Tablero_digital | 1 | 167341 | from rest_framework import viewsets, status, serializers, mixins, filters
from rest_framework.exceptions import NotFound
from rest_framework.decorators import action
from rest_framework.response import Response
from .models import PostIt, Board, WorkIn, VoteIn
from django.core.exceptions import ObjectDoesNotExist
from django.contrib.auth.models import User
from .serializer import (
PostitSerializer,
UserSerializer,
BoardSerializer,
WorkInSerializer,
VoteInSerializer
)
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework.permissions import IsAuthenticated
from .permissions import (
UserViewSetPermission,
WorkInViewSetPermission,
PostitViewSetPermission,
)
class NoUpdateModelViewSet(mixins.CreateModelMixin,
mixins.RetrieveModelMixin,
mixins.DestroyModelMixin,
mixins.ListModelMixin,
viewsets.GenericViewSet):
"""Similar to a ModelViewSet, but without update actions.
Used by WorkinViewSet.
"""
class PostitViewSet(viewsets.ModelViewSet):
"""Postits related to the current authenticated user."""
permission_classes = [IsAuthenticated, PostitViewSetPermission]
filterset_fields = ['title', 'section', 'status', 'board', 'id']
def get_serializer_class(self):
class NewPostItSerializer(PostitSerializer):
# The user can only see boards related to him.
board = serializers.PrimaryKeyRelatedField(
queryset=Board.objects.filter(workin__user=self.request.user))
return NewPostItSerializer
def get_queryset(self):
# Return only postits related to the current user.
return PostIt.objects.filter(board__workin__user=self.request.user)
def perform_update(self, serializer):
# Overrides perform_update() to reset the votes of the post-it.
postit = serializer.save()
postit.reset_votes()
postit.save()
def vote_postit(self, request, vote):
# Method for voting. Only team leaders can vote, only if the post-it is
# open and the leader hasn't voted yet.
postit = self.get_object()
querySet = WorkIn.objects.filter(board=postit.board, user=request.user)
if not querySet.exists() or not querySet[0].is_leader:
self.permission_denied(
request, 'El usuario actual no es líder de equipo en el tablero de este post-it')
elif not postit.status == 'O':
self.permission_denied(
request, message='El post it no está en estado abierto.')
user_team = querySet[0].team
already_voted_msg = 'El líder de equipo ya votó.'
if user_team == 'S':
if postit.stakeholders_vote != 2:
self.permission_denied(request, message=already_voted_msg)
postit.stakeholders_vote = vote
elif user_team == 'D':
if postit.developers_vote != 2:
self.permission_denied(request, message=already_voted_msg)
postit.developers_vote = vote
if postit.developers_vote == 1 and postit.stakeholders_vote == 1:
postit.status = 'A'
elif postit.developers_vote + postit.stakeholders_vote <= 1:
postit.status = 'R'
postit.save()
serializer = self.get_serializer(postit)
return Response(serializer.data)
@action(detail=True, methods=['get', 'post'])
def reject(self, request, pk=None):
return self.vote_postit(request, 0)
@action(detail=True, methods=['get', 'post'])
def approve(self, request, pk=None):
return self.vote_postit(request, 1)
class BoardViewSet(viewsets.ModelViewSet):
"""Boards related to the current authenticated user."""
permission_classes = [IsAuthenticated]
serializer_class = BoardSerializer
filterset_fields = ['name', 'id']
def get_queryset(self):
# Return only boards related to the current user.
return Board.objects.filter(workin__user=self.request.user)
def create(self, request, *args, **kwargs):
response = super().create(request, *args, **kwargs)
if response.status_code == status.HTTP_201_CREATED:
newBoard = Board.objects.get(id=response.data['id'])
newBoard.project_leader = self.request.user
newBoard.save()
WorkIn.objects.create(
user=request.user, board_id=response.data['id'])
return response
@action(detail=True, methods=['post'])
def add_collaborator(self, request, pk=None):
board = self.get_object()
email = request.data['email']
try:
user = User.objects.get(username=email)
except ObjectDoesNotExist:
raise NotFound(detail='No existe un usuario con ese email.')
workIn, created = WorkIn.objects.get_or_create(board=board, user=user)
if not created:
return Response({'detail': 'El usuario ya colabora en este tablero.'})
serializer = WorkInSerializer(workIn)
return Response(serializer.data, status=status.HTTP_201_CREATED)
@action(methods=['delete'], detail=False)
def delete(self, request):
user_id = request.user.id
project_leader = request.data['project_leader']
if (user_id == project_leader):
id = request.data['id']
board = Board.objects.get(id=id)
board.delete()
return Response(status=status.HTTP_200_OK)
else:
self.permission_denied(
request, message='El usuario actual no es el líder de proyecto.')
class WorkInViewSet(NoUpdateModelViewSet):
"""WorkIn relations related to the current authenticated user and his
boards."""
permission_classes = [IsAuthenticated, WorkInViewSetPermission]
serializer_class = WorkInSerializer
filterset_fields = ['user', 'is_leader', 'board', 'team', 'id']
def get_serializer_class(self):
class NewWorkInSerializer(WorkInSerializer):
# The user can only see boards related to him.
board = serializers.PrimaryKeyRelatedField(
queryset=Board.objects.filter(workin__user=self.request.user))
return NewWorkInSerializer
def get_queryset(self):
# Return only instances of WorkIn for boards related to the current user,
# this includes the WorkIn instances related to collaborators,
# and prefetch user for the WorkInSerializer.
return WorkIn.objects.filter(
board__workin__user=self.request.user).prefetch_related('user')
@action(detail=True, methods=['get', 'put', 'post'])
def pass_leader_privileges(self, request, pk=None):
# Passes leader privileges from the current user to the user with
# primary key pk.
user_workin = self.get_object()
target_workin = WorkIn.objects.get(
user=request.data['user']['id'], board=user_workin.board)
if not user_workin.is_leader:
self.permission_denied(
request, message='El usuario actual no es lider.')
elif target_workin.team != user_workin.team:
self.permission_denied(
request, message='Los usuarios son de equipos diferentes.')
target_workin.is_leader = True
user_workin.is_leader = False
target_workin.save()
user_workin.save()
serializer = self.get_serializer(target_workin)
return Response(serializer.data)
@action(detail=True, methods=['post'])
def select_team(self, request, pk=None):
# Selects the team for the current user in WorkIn relation.
workIn = self.get_object()
team = request.data['team']
workIn.team = team
serializer = self.get_serializer(workIn)
boardWorkin = WorkIn.objects.filter(board=workIn.board)
leaderExist = False
for val in boardWorkin:
if val.is_leader and val.team == team:
leaderExist = True
break
if not leaderExist:
workIn.is_leader = True
workIn.save()
return Response(serializer.data)
@action(detail=True, methods=['delete'])
def delete(self, request, pk=None):
# Selects the team for the current user in WorkIn relation.
user_id = request.user.id
delete_user = request.data['delete_user']
board_id = request.data['board']['id']
board = Board.objects.get(id=board_id)
workin = WorkIn.objects.get(user=delete_user, board=board_id)
print(workin)
if (board.project_leader.id == user_id and user_id != delete_user and workin.is_leader == False):
workin.delete()
return Response(status=status.HTTP_200_OK)
else:
self.permission_denied(
request, message='El usuario actual no es el líder de proyecto.')
class UserViewSet(viewsets.ModelViewSet):
permission_classes = [UserViewSetPermission]
queryset = User.objects.all()
serializer_class = UserSerializer
filter_backends = [DjangoFilterBackend, filters.SearchFilter]
filterset_fields = ['username']
search_fields = ['username']
| [
1,
515,
1791,
29918,
4468,
1053,
1776,
7224,
29892,
4660,
29892,
7797,
19427,
29892,
6837,
1144,
29892,
18094,
13,
3166,
1791,
29918,
4468,
29889,
11739,
29879,
1053,
2216,
9692,
13,
3166,
1791,
29918,
4468,
29889,
19557,
4097,
1053,
3158,
13,
3166,
1791,
29918,
4468,
29889,
5327,
1053,
13291,
13,
3166,
869,
9794,
1053,
4918,
3112,
29892,
12590,
29892,
5244,
797,
29892,
478,
866,
797,
13,
3166,
9557,
29889,
3221,
29889,
11739,
29879,
1053,
4669,
25125,
3664,
1252,
391,
13,
3166,
9557,
29889,
21570,
29889,
5150,
29889,
9794,
1053,
4911,
13,
3166,
869,
15550,
3950,
1053,
313,
13,
1678,
4918,
277,
17679,
29892,
13,
1678,
4911,
17679,
29892,
13,
1678,
12590,
17679,
29892,
13,
1678,
5244,
797,
17679,
29892,
13,
1678,
478,
866,
797,
17679,
13,
29897,
13,
3166,
9557,
29918,
26705,
29889,
5060,
29918,
4468,
1053,
15337,
5072,
5841,
355,
13,
3166,
1791,
29918,
4468,
29889,
17858,
6847,
1053,
1317,
6444,
4173,
630,
13,
3166,
869,
17858,
6847,
1053,
313,
13,
1678,
4911,
1043,
2697,
27293,
29892,
13,
1678,
5244,
797,
1043,
2697,
27293,
29892,
13,
1678,
4918,
277,
1043,
2697,
27293,
29892,
13,
29897,
13,
13,
13,
1990,
1939,
6422,
3195,
1043,
2697,
29898,
28084,
1144,
29889,
4391,
3195,
29924,
861,
262,
29892,
13,
462,
965,
6837,
1144,
29889,
8015,
29878,
2418,
3195,
29924,
861,
262,
29892,
13,
462,
965,
6837,
1144,
29889,
14994,
4727,
3195,
29924,
861,
262,
29892,
13,
462,
965,
6837,
1144,
29889,
1293,
3195,
29924,
861,
262,
29892,
13,
462,
965,
1776,
7224,
29889,
15809,
1043,
2697,
1125,
13,
1678,
9995,
8942,
2327,
304,
263,
8125,
1043,
2697,
29892,
541,
1728,
2767,
8820,
29889,
13,
13,
1678,
501,
8485,
491,
5244,
262,
1043,
2697,
29889,
13,
1678,
9995,
13,
13,
13,
1990,
4918,
277,
1043,
2697,
29898,
1493,
7224,
29889,
3195,
1043,
2697,
1125,
13,
1678,
9995,
6747,
1169,
4475,
304,
278,
1857,
15585,
630,
1404,
1213,
15945,
13,
13,
1678,
10751,
29918,
13203,
353,
518,
3624,
6444,
4173,
630,
29892,
4918,
277,
1043,
2697,
27293,
29962,
13,
1678,
4175,
842,
29918,
9621,
353,
6024,
3257,
742,
525,
2042,
742,
525,
4882,
742,
525,
3377,
742,
525,
333,
2033,
13,
13,
1678,
822,
679,
29918,
15550,
3950,
29918,
1990,
29898,
1311,
1125,
13,
13,
4706,
770,
1570,
6747,
3112,
17679,
29898,
6747,
277,
17679,
1125,
13,
9651,
396,
450,
1404,
508,
871,
1074,
1045,
3163,
4475,
304,
1075,
29889,
13,
9651,
7613,
353,
7797,
19427,
29889,
26666,
2558,
9662,
630,
3073,
29898,
13,
18884,
2346,
842,
29922,
28397,
29889,
12650,
29889,
4572,
29898,
1287,
262,
1649,
1792,
29922,
1311,
29889,
3827,
29889,
1792,
876,
13,
13,
4706,
736,
1570,
6747,
3112,
17679,
13,
13,
1678,
822,
679,
29918,
1972,
842,
29898,
1311,
1125,
13,
4706,
396,
7106,
871,
1400,
1169,
4475,
304,
278,
1857,
1404,
29889,
13,
4706,
736,
4918,
3112,
29889,
12650,
29889,
4572,
29898,
3377,
1649,
1287,
262,
1649,
1792,
29922,
1311,
29889,
3827,
29889,
1792,
29897,
13,
13,
1678,
822,
2189,
29918,
5504,
29898,
1311,
29892,
7797,
3950,
1125,
13,
4706,
396,
6811,
24040,
2189,
29918,
5504,
580,
304,
10092,
278,
18952,
310,
278,
1400,
29899,
277,
29889,
13,
4706,
1400,
277,
353,
7797,
3950,
29889,
7620,
580,
13,
4706,
1400,
277,
29889,
12071,
29918,
29894,
4769,
580,
13,
4706,
1400,
277,
29889,
7620,
580,
13,
13,
1678,
822,
11719,
29918,
2490,
277,
29898,
1311,
29892,
2009,
29892,
11719,
1125,
13,
4706,
396,
8108,
363,
28931,
29889,
9333,
3815,
20251,
508,
11719,
29892,
871,
565,
278,
1400,
29899,
277,
338,
13,
4706,
396,
1722,
322,
278,
11822,
22602,
29915,
29873,
24854,
3447,
29889,
13,
4706,
1400,
277,
353,
1583,
29889,
657,
29918,
3318,
580,
13,
4706,
2346,
2697,
353,
5244,
797,
29889,
12650,
29889,
4572,
29898,
3377,
29922,
2490,
277,
29889,
3377,
29892,
1404,
29922,
3827,
29889,
1792,
29897,
13,
4706,
565,
451,
2346,
2697,
29889,
9933,
580,
470,
451,
2346,
2697,
29961,
29900,
1822,
275,
29918,
280,
1664,
29901,
13,
9651,
1583,
29889,
16074,
29918,
1145,
1000,
29898,
13,
18884,
2009,
29892,
525,
6489,
502,
22223,
3935,
694,
831,
29847,
316,
15434,
427,
560,
4434,
1358,
29877,
316,
4404,
1400,
29899,
277,
1495,
13,
4706,
25342,
451,
1400,
277,
29889,
4882,
1275,
525,
29949,
2396,
13,
9651,
1583,
29889,
16074,
29918,
1145,
1000,
29898,
13,
18884,
2009,
29892,
2643,
2433,
6489,
1400,
372,
694,
7919,
427,
12082,
633,
25449,
29889,
1495,
13,
13,
4706,
1404,
29918,
14318,
353,
2346,
2697,
29961,
29900,
1822,
14318,
13,
4706,
2307,
29918,
29894,
5715,
29918,
7645,
353,
525,
6489,
29847,
316,
15434,
9343,
9014,
29980,
6169,
13,
4706,
565,
1404,
29918,
14318,
1275,
525,
29903,
2396,
13,
9651,
565,
1400,
277,
29889,
303,
1296,
8948,
414,
29918,
15814,
2804,
29871,
29906,
29901,
13,
18884,
1583,
29889,
16074,
29918,
1145,
1000,
29898,
3827,
29892,
2643,
29922,
284,
2040,
29918,
29894,
5715,
29918,
7645,
29897,
13,
9651,
1400,
277,
29889,
303,
1296,
8948,
414,
29918,
15814,
353,
11719,
13,
4706,
25342,
1404,
29918,
14318,
1275,
525,
29928,
2396,
13,
9651,
565,
1400,
277,
29889,
17426,
29918,
15814,
2804,
29871,
29906,
29901,
13,
18884,
1583,
29889,
16074,
29918,
1145,
1000,
29898,
3827,
29892,
2643,
29922,
284,
2040,
29918,
29894,
5715,
29918,
7645,
29897,
13,
9651,
1400,
277,
29889,
17426,
29918,
15814,
353,
11719,
13,
13,
4706,
565,
1400,
277,
29889,
17426,
29918,
15814,
1275,
29871,
29896,
322,
1400,
277,
29889,
303,
1296,
8948,
414,
29918,
15814,
1275,
29871,
29896,
29901,
13,
9651,
1400,
277,
29889,
4882,
353,
525,
29909,
29915,
13,
4706,
25342,
1400,
277,
29889,
17426,
29918,
15814,
718,
1400,
277,
29889,
303,
1296,
8948,
414,
29918,
15814,
5277,
29871,
29896,
29901,
13,
9651,
1400,
277,
29889,
4882,
353,
525,
29934,
29915,
13,
13,
4706,
1400,
277,
29889,
7620,
580,
13,
4706,
7797,
3950,
353,
1583,
29889,
657,
29918,
15550,
3950,
29898,
2490,
277,
29897,
13,
4706,
736,
13291,
29898,
15550,
3950,
29889,
1272,
29897,
13,
13,
1678,
732,
2467,
29898,
16432,
29922,
5574,
29892,
3519,
29922,
1839,
657,
742,
525,
2490,
11287,
13,
1678,
822,
12560,
29898,
1311,
29892,
2009,
29892,
282,
29895,
29922,
8516,
1125,
13,
4706,
736,
1583,
29889,
15814,
29918,
2490,
277,
29898,
3827,
29892,
29871,
29900,
29897,
13,
13,
1678,
732,
2467,
29898,
16432,
29922,
5574,
29892,
3519,
29922,
1839,
657,
742,
525,
2490,
11287,
13,
1678,
822,
2134,
345,
29898,
1311,
29892,
2009,
29892,
282,
29895,
29922,
8516,
1125,
13,
4706,
736,
1583,
29889,
15814,
29918,
2490,
277,
29898,
3827,
29892,
29871,
29896,
29897,
13,
13,
13,
1990,
12590,
1043,
2697,
29898,
1493,
7224,
29889,
3195,
1043,
2697,
1125,
13,
1678,
9995,
8431,
3163,
4475,
304,
278,
1857,
15585,
630,
1404,
1213,
15945,
13,
13,
1678,
10751,
29918,
13203,
353,
518,
3624,
6444,
4173,
630,
29962,
13,
1678,
7797,
3950,
29918,
1990,
353,
12590,
17679,
13,
1678,
4175,
842,
29918,
9621,
353,
6024,
978,
742,
525,
333,
2033,
13,
13,
1678,
822,
679,
29918,
1972,
842,
29898,
1311,
1125,
13,
4706,
396,
7106,
871,
1045,
3163,
4475,
304,
278,
1857,
1404,
29889,
13,
4706,
736,
12590,
29889,
12650,
29889,
4572,
29898,
1287,
262,
1649,
1792,
29922,
1311,
29889,
3827,
29889,
1792,
29897,
13,
13,
1678,
822,
1653,
29898,
1311,
29892,
2009,
29892,
334,
5085,
29892,
3579,
19290,
1125,
13,
4706,
2933,
353,
2428,
2141,
3258,
29898,
3827,
29892,
334,
5085,
29892,
3579,
19290,
29897,
13,
4706,
565,
2933,
29889,
4882,
29918,
401,
1275,
4660,
29889,
10493,
29918,
29906,
29900,
29896,
29918,
27045,
29928,
29901,
13,
9651,
716,
28397,
353,
12590,
29889,
12650,
29889,
657,
29898,
333,
29922,
5327,
29889,
1272,
1839,
333,
11287,
13,
9651,
716,
28397,
29889,
4836,
29918,
280,
1664,
353,
1583,
29889,
3827,
29889,
1792,
13,
9651,
716,
28397,
29889,
7620,
580,
13,
9651,
5244,
797,
29889,
12650,
29889,
3258,
29898,
13,
18884,
1404,
29922,
3827,
29889,
1792,
29892,
7613,
29918,
333,
29922,
5327,
29889,
1272,
1839,
333,
11287,
13,
4706,
736,
2933,
13,
13,
1678,
732,
2467,
29898,
16432,
29922,
5574,
29892,
3519,
29922,
1839,
2490,
11287,
13,
1678,
822,
788,
29918,
22017,
3717,
1061,
29898,
1311,
29892,
2009,
29892,
282,
29895,
29922,
8516,
1125,
13,
4706,
7613,
353,
1583,
29889,
657,
29918,
3318,
580,
13,
4706,
4876,
353,
2009,
29889,
1272,
1839,
5269,
2033,
13,
4706,
1018,
29901,
13,
9651,
1404,
353,
4911,
29889,
12650,
29889,
657,
29898,
6786,
29922,
5269,
29897,
13,
4706,
5174,
4669,
25125,
3664,
1252,
391,
29901,
13,
9651,
12020,
2216,
9692,
29898,
16432,
2433,
3782,
19947,
443,
502,
22223,
378,
15371,
4876,
29889,
1495,
13,
4706,
664,
797,
29892,
2825,
353,
5244,
797,
29889,
12650,
29889,
657,
29918,
272,
29918,
3258,
29898,
3377,
29922,
3377,
29892,
1404,
29922,
1792,
29897,
13,
4706,
565,
451,
2825,
29901,
13,
9651,
736,
13291,
3319,
29915,
16432,
2396,
525,
6489,
502,
22223,
9343,
784,
370,
2207,
427,
4404,
4434,
1358,
29877,
6169,
1800,
13,
4706,
7797,
3950,
353,
5244,
797,
17679,
29898,
1287,
797,
29897,
13,
4706,
736,
13291,
29898,
15550,
3950,
29889,
1272,
29892,
4660,
29922,
4882,
29889,
10493,
29918,
29906,
29900,
29896,
29918,
27045,
29928,
29897,
13,
13,
1678,
732,
2467,
29898,
23515,
29922,
1839,
8143,
7464,
9493,
29922,
8824,
29897,
13,
1678,
822,
5217,
29898,
1311,
29892,
2009,
1125,
13,
4706,
1404,
29918,
333,
353,
2009,
29889,
1792,
29889,
333,
13,
4706,
2060,
29918,
280,
1664,
353,
2009,
29889,
1272,
1839,
4836,
29918,
280,
1664,
2033,
13,
4706,
565,
313,
1792,
29918,
333,
1275,
2060,
29918,
280,
1664,
1125,
13,
9651,
1178,
353,
2009,
29889,
1272,
1839,
333,
2033,
13,
9651,
7613,
353,
12590,
29889,
12650,
29889,
657,
29898,
333,
29922,
333,
29897,
13,
9651,
7613,
29889,
8143,
580,
13,
9651,
736,
13291,
29898,
4882,
29922,
4882,
29889,
10493,
29918,
29906,
29900,
29900,
29918,
8949,
29897,
13,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
16074,
29918,
1145,
1000,
29898,
13,
18884,
2009,
29892,
2643,
2433,
6489,
502,
22223,
3935,
694,
831,
560,
29847,
316,
28255,
29889,
1495,
13,
13,
13,
1990,
5244,
797,
1043,
2697,
29898,
3782,
6422,
3195,
1043,
2697,
1125,
13,
1678,
9995,
5531,
797,
5302,
4475,
304,
278,
1857,
15585,
630,
1404,
322,
670,
13,
1678,
1045,
3163,
1213,
15945,
13,
13,
1678,
10751,
29918,
13203,
353,
518,
3624,
6444,
4173,
630,
29892,
5244,
797,
1043,
2697,
27293,
29962,
13,
1678,
7797,
3950,
29918,
1990,
353,
5244,
797,
17679,
13,
1678,
4175,
842,
29918,
9621,
353,
6024,
1792,
742,
525,
275,
29918,
280,
1664,
742,
525,
3377,
742,
525,
14318,
742,
525,
333,
2033,
13,
13,
1678,
822,
679,
29918,
15550,
3950,
29918,
1990,
29898,
1311,
1125,
13,
13,
4706,
770,
1570,
5531,
797,
17679,
29898,
5531,
797,
17679,
1125,
13,
9651,
396,
450,
1404,
508,
871,
1074,
1045,
3163,
4475,
304,
1075,
29889,
13,
9651,
7613,
353,
7797,
19427,
29889,
26666,
2558,
9662,
630,
3073,
29898,
13,
18884,
2346,
842,
29922,
28397,
29889,
12650,
29889,
4572,
29898,
1287,
262,
1649,
1792,
29922,
1311,
29889,
3827,
29889,
1792,
876,
13,
13,
4706,
736,
1570,
5531,
797,
17679,
13,
13,
1678,
822,
679,
29918,
1972,
842,
29898,
1311,
1125,
13,
4706,
396,
7106,
871,
8871,
310,
5244,
797,
363,
1045,
3163,
4475,
304,
278,
1857,
1404,
29892,
13,
4706,
396,
445,
7805,
278,
5244,
797,
8871,
4475,
304,
11465,
4097,
29892,
13,
4706,
396,
322,
758,
9155,
1404,
363,
278,
5244,
797,
17679,
29889,
13,
4706,
736,
5244,
797,
29889,
12650,
29889,
4572,
29898,
13,
9651,
7613,
1649,
1287,
262,
1649,
1792,
29922,
1311,
29889,
3827,
29889,
1792,
467,
29886,
999,
3486,
29918,
12817,
877,
1792,
1495,
13,
13,
1678,
732,
2467,
29898,
16432,
29922,
5574,
29892,
3519,
29922,
1839,
657,
742,
525,
649,
742,
525,
2490,
11287,
13,
1678,
822,
1209,
29918,
280,
1664,
29918,
22534,
488,
2710,
29898,
1311,
29892,
2009,
29892,
282,
29895,
29922,
8516,
1125,
13,
4706,
396,
6978,
267,
11822,
28091,
515,
278,
1857,
1404,
304,
278,
1404,
411,
13,
4706,
396,
7601,
1820,
282,
29895,
29889,
13,
4706,
1404,
29918,
1287,
262,
353,
1583,
29889,
657,
29918,
3318,
580,
13,
4706,
3646,
29918,
1287,
262,
353,
5244,
797,
29889,
12650,
29889,
657,
29898,
13,
9651,
1404,
29922,
3827,
29889,
1272,
1839,
1792,
16215,
333,
7464,
7613,
29922,
1792,
29918,
1287,
262,
29889,
3377,
29897,
13,
4706,
565,
451,
1404,
29918,
1287,
262,
29889,
275,
29918,
280,
1664,
29901,
13,
9651,
1583,
29889,
16074,
29918,
1145,
1000,
29898,
13,
18884,
2009,
29892,
2643,
2433,
6489,
502,
22223,
3935,
694,
831,
29110,
29889,
1495,
13,
4706,
25342,
3646,
29918,
1287,
262,
29889,
14318,
2804,
1404,
29918,
1287,
262,
29889,
14318,
29901,
13,
9651,
1583,
29889,
16074,
29918,
1145,
1000,
29898,
13,
18884,
2009,
29892,
2643,
2433,
29286,
502,
29884,
8596,
1487,
316,
7462,
359,
20506,
29889,
1495,
13,
4706,
3646,
29918,
1287,
262,
29889,
275,
29918,
280,
1664,
353,
5852,
13,
4706,
1404,
29918,
1287,
262,
29889,
275,
29918,
280,
1664,
353,
7700,
13,
4706,
3646,
29918,
1287,
262,
29889,
7620,
580,
13,
4706,
1404,
29918,
1287,
262,
29889,
7620,
580,
13,
4706,
7797,
3950,
353,
1583,
29889,
657,
29918,
15550,
3950,
29898,
5182,
29918,
1287,
262,
29897,
13,
4706,
736,
13291,
29898,
15550,
3950,
29889,
1272,
29897,
13,
13,
1678,
732,
2467,
29898,
16432,
29922,
5574,
29892,
3519,
29922,
1839,
2490,
11287,
13,
1678,
822,
1831,
29918,
14318,
29898,
1311,
29892,
2009,
29892,
282,
29895,
29922,
8516,
1125,
13,
4706,
396,
7605,
29879,
278,
3815,
363,
278,
1857,
1404,
297,
5244,
797,
8220,
29889,
13,
4706,
664,
797,
353,
1583,
29889,
657,
29918,
3318,
580,
13,
4706,
3815,
353,
2009,
29889,
1272,
1839,
14318,
2033,
13,
4706,
664,
797,
29889,
14318,
353,
3815,
13,
4706,
7797,
3950,
353,
1583,
29889,
657,
29918,
15550,
3950,
29898,
1287,
797,
29897,
13,
4706,
7613,
5531,
262,
353,
5244,
797,
29889,
12650,
29889,
4572,
29898,
3377,
29922,
1287,
797,
29889,
3377,
29897,
13,
4706,
11822,
1252,
391,
353,
7700,
13,
4706,
363,
659,
297,
7613,
5531,
262,
29901,
13,
9651,
565,
659,
29889,
275,
29918,
280,
1664,
322,
659,
29889,
14318,
1275,
3815,
29901,
13,
18884,
11822,
1252,
391,
353,
5852,
13,
18884,
2867,
13,
4706,
565,
451,
11822,
1252,
391,
29901,
13,
9651,
664,
797,
29889,
275,
29918,
280,
1664,
353,
5852,
13,
4706,
664,
797,
29889,
7620,
580,
13,
4706,
736,
13291,
29898,
15550,
3950,
29889,
1272,
29897,
13,
13,
1678,
732,
2467,
29898,
16432,
29922,
5574,
29892,
3519,
29922,
1839,
8143,
11287,
13,
1678,
822,
5217,
29898,
1311,
29892,
2009,
29892,
282,
29895,
29922,
8516,
1125,
13,
4706,
396,
7605,
29879,
278,
3815,
363,
278,
1857,
1404,
297,
5244,
797,
8220,
29889,
13,
4706,
1404,
29918,
333,
353,
2009,
29889,
1792,
29889,
333,
13,
4706,
5217,
29918,
1792,
353,
2009,
29889,
1272,
1839,
8143,
29918,
1792,
2033,
13,
4706,
7613,
29918,
333,
353,
2009,
29889,
1272,
1839,
3377,
16215,
333,
2033,
13,
4706,
7613,
353,
12590,
29889,
12650,
29889,
657,
29898,
333,
29922,
3377,
29918,
333,
29897,
13,
4706,
664,
262,
353,
5244,
797,
29889,
12650,
29889,
657,
29898,
1792,
29922,
8143,
29918,
1792,
29892,
7613,
29922,
3377,
29918,
333,
29897,
13,
4706,
1596,
29898,
1287,
262,
29897,
13,
4706,
565,
313,
3377,
29889,
4836,
29918,
280,
1664,
29889,
333,
1275,
1404,
29918,
333,
322,
1404,
29918,
333,
2804,
5217,
29918,
1792,
322,
664,
262,
29889,
275,
29918,
280,
1664,
1275,
7700,
1125,
13,
9651,
664,
262,
29889,
8143,
580,
13,
9651,
736,
13291,
29898,
4882,
29922,
4882,
29889,
10493,
29918,
29906,
29900,
29900,
29918,
8949,
29897,
13,
4706,
1683,
29901,
13,
9651,
1583,
29889,
16074,
29918,
1145,
1000,
29898,
13,
18884,
2009,
29892,
2643,
2433,
6489,
502,
22223,
3935,
694,
831,
560,
29847,
316,
28255,
29889,
1495,
13,
13,
13,
1990,
4911,
1043,
2697,
29898,
1493,
7224,
29889,
3195,
1043,
2697,
1125,
13,
1678,
10751,
29918,
13203,
353,
518,
2659,
1043,
2697,
27293,
29962,
13,
1678,
2346,
842,
353,
4911,
29889,
12650,
29889,
497,
580,
13,
1678,
7797,
3950,
29918,
1990,
353,
4911,
17679,
13,
1678,
4175,
29918,
1627,
1975,
353,
518,
29928,
5364,
5072,
5841,
355,
29892,
18094,
29889,
7974,
5072,
29962,
13,
1678,
4175,
842,
29918,
9621,
353,
6024,
6786,
2033,
13,
1678,
2740,
29918,
9621,
353,
6024,
6786,
2033,
13,
2
] |
testing/example.py | gndctrl2mjrtm/dkeras | 195 | 93559 | # Ideas
"""
server = dkeras.DataServer()
model1.link(model3)
model1.postprocess = lambda z: np.float16(z)
server = model1 + model2 + model3
server.add(camera1, dest=('m1', 'm2'))
server.add_address('192.168.1.42')
"""
| [
1,
396,
13001,
294,
13,
15945,
29908,
13,
2974,
353,
270,
3946,
294,
29889,
1469,
6004,
580,
13,
13,
4299,
29896,
29889,
2324,
29898,
4299,
29941,
29897,
13,
13,
4299,
29896,
29889,
2490,
5014,
353,
14013,
503,
29901,
7442,
29889,
7411,
29896,
29953,
29898,
29920,
29897,
13,
13,
2974,
353,
1904,
29896,
718,
1904,
29906,
718,
1904,
29941,
13,
13,
2974,
29889,
1202,
29898,
26065,
29896,
29892,
2731,
29922,
877,
29885,
29896,
742,
525,
29885,
29906,
8785,
13,
13,
2974,
29889,
1202,
29918,
7328,
877,
29896,
29929,
29906,
29889,
29896,
29953,
29947,
29889,
29896,
29889,
29946,
29906,
1495,
13,
15945,
29908,
13,
13,
13,
13,
2
] |
tests/test_models.py | mgierm/djangocms_semantic_ui | 3 | 88550 | # -*- coding: utf-8 -*-
from django.test import TestCase
from djangocms_semantic_ui.models import Segment
class SegmentTestCase(TestCase):
def setUp(self):
pass
def test_models(self):
segment = Segment.objects.create(
label='Test',
color='green',
inverted_color=False,
type_segment='raised'
)
self.assertEqual("green", str(segment))
self.assertEqual("Test green <raised>", segment.get_short_description())
self.assertEqual("green raised", segment.get_classes())
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
9557,
29889,
1688,
1053,
4321,
8259,
13,
13,
3166,
270,
29926,
574,
542,
1516,
29918,
12846,
7716,
29918,
1481,
29889,
9794,
1053,
6667,
358,
13,
13,
13,
1990,
6667,
358,
3057,
8259,
29898,
3057,
8259,
1125,
13,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
1209,
13,
13,
1678,
822,
1243,
29918,
9794,
29898,
1311,
1125,
13,
4706,
10768,
353,
6667,
358,
29889,
12650,
29889,
3258,
29898,
13,
9651,
3858,
2433,
3057,
742,
13,
9651,
2927,
2433,
12692,
742,
13,
9651,
21292,
287,
29918,
2780,
29922,
8824,
29892,
13,
9651,
1134,
29918,
28192,
2433,
336,
3368,
29915,
13,
4706,
1723,
13,
4706,
1583,
29889,
9294,
9843,
703,
12692,
613,
851,
29898,
28192,
876,
13,
4706,
1583,
29889,
9294,
9843,
703,
3057,
7933,
529,
336,
3368,
28341,
10768,
29889,
657,
29918,
12759,
29918,
8216,
3101,
13,
4706,
1583,
29889,
9294,
9843,
703,
12692,
10425,
613,
10768,
29889,
657,
29918,
13203,
3101,
13,
2
] |
django_covid19/spider/nCoV/spiders/dxy.py | zhangguoyuanshuai/Python-Covid19API | 0 | 1611140 | """丁香园数据源"""
import json
import scrapy
import logging
from scrapy.selector import Selector
from .. import items
from django.core.cache import cache
from django.utils.timezone import datetime, make_aware
logger = logging.getLogger()
PROVINCE_CODES = {
"黑龙江": "HLJ",
"香港": "XG",
"青海": "QH",
"陕西": "SX", # 同山西
"重庆": "CQ",
"辽宁": "LN",
"贵州": "GZ",
"西藏": "XZ",
"福建": "FJ",
"甘肃": "GS",
"澳门": "AM",
"湖南": "HN",
"湖北": "HB",
"海南": "HN-2",
"浙江": "ZJ",
"河南": "HN-1",
"河北": "HB-1",
"江西": "JX",
"江苏": "JS",
"新疆": "XJ",
"广西": "GX",
"广东": "GD",
"山西": "SX-1",
"山东": "SD",
"安徽": "AH",
"宁夏": "NX",
"天津": "TJ",
"四川": "SC",
"吉林": "JL",
"台湾": "TW",
"北京": "BJ",
"内蒙古": "NMG",
"云南": "YN",
"上海": "SH"
}
COUNTRY_CODE_FIX = {
'Princess': 'PRINCESS',
'Saint Martin': 'MAF',
'Sint Maarten': 'SXM'
}
class DXYSpider(scrapy.Spider):
name = "dxy"
allowed_domains = ["ncov.dxy.cn", "file1.dxycdn.com"]
start_urls = [
"http://ncov.dxy.cn/ncovh5/view/pneumonia",
]
countryCode = 'CHN'
def parse(self, response):
object_id = self.object_id
spider_id = cache.get('running_spider_id')
if object_id != spider_id:
logger.info('Spider is running.')
self.crawled = 0
return
sel = Selector(response)
scripts = sel.xpath('//script')
# 判断是否需要保存抓取的数据
statistics = self.get_dict(scripts, '#getStatisticsService')
create_time = make_aware(
datetime.fromtimestamp(statistics['createTime'] / 1000.0))
modify_time = make_aware(
datetime.fromtimestamp(statistics['modifyTime'] / 1000.0))
qs = items.StatisticsItem.django_model.objects.all().order_by('-id')
if qs.count() > 1 and qs[0].modifyTime == modify_time:
logger.info('Data does not change.')
self.crawled = 0
return
# 统计信息
statistics = self.explain_statistics(statistics)
statistics['createTime'] = create_time
statistics['modifyTime'] = modify_time
# 国内数据
provinces = self.get_list(scripts, '#getAreaStat')
for province in provinces:
cities = province.pop('cities', [])
province.pop('locationId')
yield scrapy.Request(
province['statisticsData'],
callback=self.parse_province_statistics_data,
meta={
'province': province,
'cities': cities
}
)
# 时间线事件,id=“getTimelineService2” 为英文内容
timelines = self.get_list(scripts, '#getTimelineService1')
result = []
for item in timelines:
timeline = {}
for key in ('title', 'summary', 'infoSource', 'sourceUrl',
'pubDate', 'pubDateStr'):
timeline[key] = item.get(key)
result.append(timeline)
statistics['timelines'] = json.dumps(result)
# 建议,id=“#getIndexRecommendList2” 为英文内容
recommends = self.get_list(
scripts, '#getIndexRecommendListundefined')
result = []
for item in recommends:
recommend = {}
for key in ('title', 'linkUrl', 'imgUrl', 'countryType',
'contentType', 'recordStatus', 'sort'):
recommend[key] = item.get(key)
result.append(recommend)
statistics['recommends'] = json.dumps(result)
# WHO 文章
item = self.get_dict(scripts, '#fetchWHOArticle')
article = {}
for key in ('title', 'linkUrl', 'imgUrl'):
article[key] = item.get(key)
statistics['WHOArticle'] = json.dumps(article)
# wiki
wiki_result = self.get_dict(scripts, '#getWikiList')
wikis = wiki_result['result']
result = []
for item in wikis:
wiki = {}
for key in ('title', 'linkUrl', 'imgUrl', 'description'):
wiki[key] = item.get(key)
result.append(wiki)
statistics['wikis'] = json.dumps(result)
# 购物指南
guides = self.get_list(scripts, '#fetchGoodsGuide')
result = []
for item in guides:
guide = {}
for key in ('categoryName', 'title', 'recordStatus',
'contentImgUrls'):
guide[key] = item.get(key)
result.append(guide)
statistics['goodsGuides'] = json.dumps(result)
# 辟谣与防护
rumors = self.get_list(scripts, '#getIndexRumorList')
result = []
for item in rumors:
rumor = {}
for key in ('title', 'mainSummary', 'summary', 'body',
'sourceUrl', 'score', 'rumorType'):
rumor[key] = item.get(key)
result.append(rumor)
statistics['rumors'] = json.dumps(result)
yield statistics
# 国外数据
countries = self.get_list(
scripts, '#getListByCountryTypeService2true')
for country in countries:
country.pop('id', None)
country['countryName'] = country.pop('provinceName', None)
country['provinceName'] = ''
country.pop('countryType')
country.pop('cityName')
country.pop('provinceId')
country.pop('provinceName')
country.pop('provinceShortName')
country.pop('modifyTime', None)
country.pop('createTime', None)
country['incrVo'] = json.dumps(country.get('incrVo', {}))
statistics_data = country.get('statisticsData')
if statistics_data:
yield scrapy.Request(
statistics_data,
callback=self.parse_country_statistics_data,
meta={
'country': country
}
)
else:
yield items.CountryItem(dailyData=[], **country)
self.crawled = 1 # 代表爬虫已爬取数据
def parse_province_statistics_data(self, response):
countryCode = self.countryCode
meta = response.meta
cities = meta['cities']
province = meta['province']
provinceName = province['provinceShortName']
provinceCode = PROVINCE_CODES[provinceName]
result = json.loads(response.text)
dailyData = result['data']
for item in dailyData:
item['countryCode'] = countryCode
item['provinceName'] = provinceName
item['provinceCode'] = provinceCode
data = json.dumps(dailyData)
province['provinceName'] = provinceName
province_args = {}
provice_fieldnames = [f.name for f in \
items.ProvinceItem.django_model._meta.get_fields()]
for fieldname in provice_fieldnames:
value = province.get(fieldname)
if value is not None:
province_args[fieldname] = value
province_args['dailyData'] = data
province_args['dailyUrl'] = province.get('statisticsData')
province_args['countryCode'] = countryCode
province_args['provinceCode'] = provinceCode
yield items.ProvinceItem(**province_args)
for city in cities:
city.pop('locationId')
yield items.CityItem(
countryCode=countryCode,
provinceCode=provinceCode,
provinceName=provinceName,
**city
)
def parse_country_statistics_data(self, response):
result = json.loads(response.text)
dailyData = result['data']
meta = response.meta
country = meta['country']
country.pop('locationId')
country['countryCode'] = countryCode \
= country.pop('countryShortCode')
countryCode = COUNTRY_CODE_FIX.get(countryCode, countryCode)
for item in dailyData:
item['countryCode'] = countryCode
item['countryName'] = country['countryName']
dailyData = json.dumps(dailyData)
yield items.CountryItem(dailyData=dailyData, **country)
def explain_statistics(self, data):
statistics = data['globalStatistics']
instance = {}
item = {}
for key in (
'currentConfirmedCount', 'curedCount', 'confirmedCount',
'seriousCount', 'suspectedCount', 'deadCount',
'currentConfirmedIncr', 'curedIncr', 'confirmedIncr',
'suspectedIncr', 'deadIncr'):
item[key] = statistics.get(key, 0)
instance['globalStatistics'] = json.dumps(item)
statistics = data['foreignStatistics']
item = {}
for key in (
'currentConfirmedCount', 'curedCount', 'confirmedCount',
'seriousCount', 'suspectedCount', 'deadCount',
'currentConfirmedIncr', 'curedIncr', 'confirmedIncr',
'suspectedIncr', 'deadIncr'):
item[key] = statistics.get(key, 0)
instance['internationalStatistics'] = json.dumps(item)
statistics = data
item = {}
for key in (
'currentConfirmedCount', 'curedCount', 'confirmedCount',
'seriousCount', 'suspectedCount', 'deadCount',
'currentConfirmedIncr', 'curedIncr', 'confirmedIncr',
'suspectedIncr', 'deadIncr'):
item[key] = statistics.get(key, 0)
instance['domesticStatistics'] = json.dumps(item)
# Remark and Note
remarks = []
for key in ('remark1', 'remark2', 'remark3', 'remark4', 'remark5'):
remark = data.get(key)
if remark:
remarks.append(remark)
notes = []
for key in ('note1', 'note2', 'note3'):
note = data.get(key)
if note:
notes.append(note)
instance['remarks'] = json.dumps(remarks)
instance['notes'] = json.dumps(notes)
instance['generalRemark'] = data.get('generalRemark')
return items.StatisticsItem(**instance)
def get_list(self, scripts, data_id):
ret = scripts.css(data_id).re(r'(\[.+\])')
return json.loads(ret[0])
def get_dict(self, scripts, data_id):
ret = scripts.css(data_id).re(r'\=\s*(\{.+\})\}catch\(e\)\{\}')
return json.loads(ret[0])
| [
1,
9995,
31968,
31113,
232,
158,
176,
30354,
30763,
31193,
15945,
29908,
13,
13,
5215,
4390,
13,
5215,
24559,
2272,
13,
5215,
12183,
13,
3166,
24559,
2272,
29889,
14357,
1053,
7605,
272,
13,
13,
3166,
6317,
1053,
4452,
13,
13,
3166,
9557,
29889,
3221,
29889,
8173,
1053,
7090,
13,
3166,
9557,
29889,
13239,
29889,
2230,
8028,
1053,
12865,
29892,
1207,
29918,
28327,
13,
13,
21707,
353,
12183,
29889,
657,
16363,
580,
13,
13,
8618,
29963,
1177,
4741,
29918,
16524,
29903,
353,
426,
13,
1678,
376,
236,
190,
148,
31300,
30775,
1115,
376,
15444,
29967,
613,
13,
1678,
376,
31113,
31449,
1115,
376,
29990,
29954,
613,
13,
1678,
376,
30986,
30581,
1115,
376,
29984,
29950,
613,
13,
1678,
376,
236,
156,
152,
30602,
1115,
376,
29903,
29990,
613,
396,
29871,
30980,
30329,
30602,
13,
1678,
376,
30908,
232,
189,
137,
1115,
376,
29907,
29984,
613,
13,
1678,
376,
235,
193,
192,
232,
177,
132,
1115,
376,
29931,
29940,
613,
13,
1678,
376,
235,
183,
184,
30765,
1115,
376,
29954,
29999,
613,
13,
1678,
376,
30602,
31707,
1115,
376,
29990,
29999,
613,
13,
1678,
376,
31121,
30886,
1115,
376,
29943,
29967,
613,
13,
1678,
376,
234,
151,
155,
235,
133,
134,
1115,
376,
10749,
613,
13,
1678,
376,
233,
193,
182,
31649,
1115,
376,
5194,
613,
13,
1678,
376,
31496,
30601,
1115,
376,
29950,
29940,
613,
13,
1678,
376,
31496,
30662,
1115,
376,
29950,
29933,
613,
13,
1678,
376,
30581,
30601,
1115,
376,
29950,
29940,
29899,
29906,
613,
13,
1678,
376,
233,
184,
156,
30775,
1115,
376,
29999,
29967,
613,
13,
1678,
376,
30828,
30601,
1115,
376,
29950,
29940,
29899,
29896,
613,
13,
1678,
376,
30828,
30662,
1115,
376,
29950,
29933,
29899,
29896,
613,
13,
1678,
376,
30775,
30602,
1115,
376,
29967,
29990,
613,
13,
1678,
376,
30775,
235,
142,
146,
1115,
376,
8700,
613,
13,
1678,
376,
30374,
234,
153,
137,
1115,
376,
29990,
29967,
613,
13,
1678,
376,
31566,
30602,
1115,
376,
29954,
29990,
613,
13,
1678,
376,
31566,
30979,
1115,
376,
29954,
29928,
613,
13,
1678,
376,
30329,
30602,
1115,
376,
29903,
29990,
29899,
29896,
613,
13,
1678,
376,
30329,
30979,
1115,
376,
7230,
613,
13,
1678,
376,
30670,
232,
193,
192,
1115,
376,
29909,
29950,
613,
13,
1678,
376,
232,
177,
132,
31241,
1115,
376,
29940,
29990,
613,
13,
1678,
376,
30408,
31365,
1115,
376,
29911,
29967,
613,
13,
1678,
376,
30928,
30575,
1115,
376,
7187,
613,
13,
1678,
376,
31033,
30853,
1115,
376,
29967,
29931,
613,
13,
1678,
376,
31037,
233,
188,
193,
1115,
376,
16240,
613,
13,
1678,
376,
30662,
30675,
1115,
376,
29933,
29967,
613,
13,
1678,
376,
30728,
235,
149,
156,
30960,
1115,
376,
29940,
29924,
29954,
613,
13,
1678,
376,
31784,
30601,
1115,
376,
29979,
29940,
613,
13,
1678,
376,
30429,
30581,
1115,
376,
7068,
29908,
13,
29913,
13,
13,
3217,
3904,
5659,
29979,
29918,
16524,
29918,
25634,
353,
426,
13,
1678,
525,
4040,
262,
985,
2396,
525,
10593,
1177,
23524,
742,
13,
1678,
525,
22211,
6502,
2396,
525,
1529,
29943,
742,
13,
1678,
525,
29903,
524,
3219,
8109,
2396,
525,
29903,
29990,
29924,
29915,
13,
29913,
13,
13,
1990,
360,
18454,
5592,
1241,
29898,
1557,
336,
2272,
29889,
5592,
1241,
1125,
13,
13,
1678,
1024,
353,
376,
29881,
3594,
29908,
13,
1678,
6068,
29918,
3129,
2708,
353,
6796,
17608,
586,
29889,
29881,
3594,
29889,
18038,
613,
376,
1445,
29896,
29889,
29881,
3594,
13687,
29889,
510,
3108,
13,
1678,
1369,
29918,
26045,
353,
518,
13,
4706,
376,
1124,
597,
17608,
586,
29889,
29881,
3594,
29889,
18038,
29914,
17608,
586,
29882,
29945,
29914,
1493,
29914,
29886,
29765,
6405,
613,
13,
1678,
4514,
13,
13,
1678,
4234,
3399,
353,
525,
3210,
29940,
29915,
13,
13,
1678,
822,
6088,
29898,
1311,
29892,
2933,
1125,
13,
4706,
1203,
29918,
333,
353,
1583,
29889,
3318,
29918,
333,
13,
4706,
805,
1241,
29918,
333,
353,
7090,
29889,
657,
877,
21094,
29918,
1028,
1241,
29918,
333,
1495,
13,
4706,
565,
1203,
29918,
333,
2804,
805,
1241,
29918,
333,
29901,
13,
9651,
17927,
29889,
3888,
877,
5592,
1241,
338,
2734,
29889,
1495,
13,
9651,
1583,
29889,
29883,
1610,
839,
353,
29871,
29900,
13,
9651,
736,
13,
13,
4706,
5535,
353,
7605,
272,
29898,
5327,
29897,
13,
4706,
12078,
353,
5535,
29889,
23635,
877,
458,
2154,
1495,
13,
13,
4706,
396,
29871,
31791,
31683,
30392,
31191,
31383,
30698,
30982,
30946,
233,
141,
150,
30683,
30210,
30354,
30763,
13,
4706,
13964,
353,
1583,
29889,
657,
29918,
8977,
29898,
16713,
29892,
16321,
657,
9513,
6765,
3170,
1495,
13,
4706,
1653,
29918,
2230,
353,
1207,
29918,
28327,
29898,
13,
9651,
12865,
29889,
3166,
16394,
29898,
6112,
6765,
1839,
3258,
2481,
2033,
847,
29871,
29896,
29900,
29900,
29900,
29889,
29900,
876,
13,
4706,
6623,
29918,
2230,
353,
1207,
29918,
28327,
29898,
13,
9651,
12865,
29889,
3166,
16394,
29898,
6112,
6765,
1839,
1545,
1598,
2481,
2033,
847,
29871,
29896,
29900,
29900,
29900,
29889,
29900,
876,
13,
4706,
3855,
29879,
353,
4452,
29889,
9513,
6765,
2001,
29889,
14095,
29918,
4299,
29889,
12650,
29889,
497,
2141,
2098,
29918,
1609,
877,
29899,
333,
1495,
13,
4706,
565,
3855,
29879,
29889,
2798,
580,
1405,
29871,
29896,
322,
3855,
29879,
29961,
29900,
1822,
1545,
1598,
2481,
1275,
6623,
29918,
2230,
29901,
13,
9651,
17927,
29889,
3888,
877,
1469,
947,
451,
1735,
29889,
1495,
13,
9651,
1583,
29889,
29883,
1610,
839,
353,
29871,
29900,
13,
9651,
736,
13,
13,
4706,
396,
29871,
31675,
31466,
30689,
31021,
13,
4706,
13964,
353,
1583,
29889,
4548,
7420,
29918,
6112,
6765,
29898,
6112,
6765,
29897,
13,
4706,
13964,
1839,
3258,
2481,
2033,
353,
1653,
29918,
2230,
13,
4706,
13964,
1839,
1545,
1598,
2481,
2033,
353,
6623,
29918,
2230,
13,
13,
4706,
396,
29871,
30356,
30728,
30354,
30763,
13,
4706,
28058,
353,
1583,
29889,
657,
29918,
1761,
29898,
16713,
29892,
16321,
657,
13799,
9513,
1495,
13,
4706,
363,
12291,
297,
28058,
29901,
13,
9651,
14368,
353,
12291,
29889,
7323,
877,
29883,
1907,
742,
518,
2314,
13,
9651,
12291,
29889,
7323,
877,
5479,
1204,
1495,
13,
9651,
7709,
24559,
2272,
29889,
3089,
29898,
13,
18884,
12291,
1839,
6112,
6765,
1469,
7464,
13,
18884,
6939,
29922,
1311,
29889,
5510,
29918,
16123,
1239,
29918,
6112,
6765,
29918,
1272,
29892,
13,
18884,
12700,
3790,
13,
462,
1678,
525,
16123,
1239,
2396,
12291,
29892,
13,
462,
1678,
525,
29883,
1907,
2396,
14368,
13,
18884,
500,
13,
9651,
1723,
13,
13,
4706,
396,
29871,
30594,
31016,
31532,
30745,
30631,
30214,
333,
29922,
30015,
657,
13711,
5570,
3170,
29906,
30024,
29871,
30573,
31144,
30333,
30728,
31294,
13,
4706,
5335,
24210,
353,
1583,
29889,
657,
29918,
1761,
29898,
16713,
29892,
16321,
657,
13711,
5570,
3170,
29896,
1495,
13,
4706,
1121,
353,
5159,
13,
4706,
363,
2944,
297,
5335,
24210,
29901,
13,
9651,
5335,
5570,
353,
6571,
13,
9651,
363,
1820,
297,
6702,
3257,
742,
525,
7727,
742,
525,
3888,
4435,
742,
525,
4993,
5983,
742,
13,
462,
4706,
525,
5467,
2539,
742,
525,
5467,
2539,
5015,
29374,
13,
18884,
5335,
5570,
29961,
1989,
29962,
353,
2944,
29889,
657,
29898,
1989,
29897,
13,
9651,
1121,
29889,
4397,
29898,
9346,
5570,
29897,
13,
4706,
13964,
1839,
9346,
24210,
2033,
353,
4390,
29889,
29881,
17204,
29898,
2914,
29897,
13,
13,
4706,
396,
29871,
30886,
235,
177,
177,
30214,
333,
29922,
30015,
29937,
657,
3220,
1123,
2055,
355,
1293,
29906,
30024,
29871,
30573,
31144,
30333,
30728,
31294,
13,
4706,
5052,
1975,
353,
1583,
29889,
657,
29918,
1761,
29898,
13,
9651,
12078,
29892,
16321,
657,
3220,
1123,
2055,
355,
1293,
15955,
1495,
13,
4706,
1121,
353,
5159,
13,
4706,
363,
2944,
297,
5052,
1975,
29901,
13,
9651,
6907,
353,
6571,
13,
9651,
363,
1820,
297,
6702,
3257,
742,
525,
2324,
5983,
742,
525,
2492,
5983,
742,
525,
13509,
1542,
742,
13,
462,
4706,
525,
3051,
1542,
742,
525,
11651,
5709,
742,
525,
6605,
29374,
13,
18884,
6907,
29961,
1989,
29962,
353,
2944,
29889,
657,
29898,
1989,
29897,
13,
9651,
1121,
29889,
4397,
29898,
276,
2055,
355,
29897,
13,
4706,
13964,
1839,
276,
2055,
1975,
2033,
353,
4390,
29889,
29881,
17204,
29898,
2914,
29897,
13,
13,
4706,
396,
399,
8187,
29871,
30333,
31374,
13,
4706,
2944,
353,
1583,
29889,
657,
29918,
8977,
29898,
16713,
29892,
16321,
9155,
29956,
8187,
9986,
2512,
1495,
13,
4706,
4274,
353,
6571,
13,
4706,
363,
1820,
297,
6702,
3257,
742,
525,
2324,
5983,
742,
525,
2492,
5983,
29374,
13,
9651,
4274,
29961,
1989,
29962,
353,
2944,
29889,
657,
29898,
1989,
29897,
13,
4706,
13964,
1839,
29956,
8187,
9986,
2512,
2033,
353,
4390,
29889,
29881,
17204,
29898,
7914,
29897,
13,
13,
4706,
396,
281,
10058,
13,
4706,
281,
10058,
29918,
2914,
353,
1583,
29889,
657,
29918,
8977,
29898,
16713,
29892,
16321,
657,
5653,
29875,
1293,
1495,
13,
4706,
281,
638,
275,
353,
281,
10058,
29918,
2914,
1839,
2914,
2033,
13,
4706,
1121,
353,
5159,
13,
4706,
363,
2944,
297,
281,
638,
275,
29901,
13,
9651,
281,
10058,
353,
6571,
13,
9651,
363,
1820,
297,
6702,
3257,
742,
525,
2324,
5983,
742,
525,
2492,
5983,
742,
525,
8216,
29374,
13,
18884,
281,
10058,
29961,
1989,
29962,
353,
2944,
29889,
657,
29898,
1989,
29897,
13,
9651,
1121,
29889,
4397,
29898,
4594,
29897,
13,
4706,
13964,
1839,
2851,
275,
2033,
353,
4390,
29889,
29881,
17204,
29898,
2914,
29897,
13,
13,
13,
4706,
396,
29871,
235,
183,
176,
30834,
31084,
30601,
13,
4706,
1410,
2247,
353,
1583,
29889,
657,
29918,
1761,
29898,
16713,
29892,
16321,
9155,
18420,
29879,
9485,
680,
1495,
13,
4706,
1121,
353,
5159,
13,
4706,
363,
2944,
297,
1410,
2247,
29901,
13,
9651,
10754,
353,
6571,
13,
9651,
363,
1820,
297,
6702,
7320,
1170,
742,
525,
3257,
742,
525,
11651,
5709,
742,
13,
462,
4706,
525,
3051,
25518,
5983,
29879,
29374,
13,
18884,
10754,
29961,
1989,
29962,
353,
2944,
29889,
657,
29898,
1989,
29897,
13,
9651,
1121,
29889,
4397,
29898,
13075,
29897,
13,
4706,
13964,
1839,
16773,
29879,
9485,
2247,
2033,
353,
4390,
29889,
29881,
17204,
29898,
2914,
29897,
13,
13,
4706,
396,
29871,
235,
193,
162,
235,
179,
166,
31267,
236,
155,
181,
233,
141,
167,
13,
4706,
16558,
943,
353,
1583,
29889,
657,
29918,
1761,
29898,
16713,
29892,
16321,
657,
3220,
29934,
398,
272,
1293,
1495,
13,
4706,
1121,
353,
5159,
13,
4706,
363,
2944,
297,
16558,
943,
29901,
13,
9651,
16558,
272,
353,
6571,
13,
9651,
363,
1820,
297,
6702,
3257,
742,
525,
3396,
26289,
742,
525,
7727,
742,
525,
2587,
742,
13,
462,
4706,
525,
4993,
5983,
742,
525,
13628,
742,
525,
5848,
272,
1542,
29374,
13,
18884,
16558,
272,
29961,
1989,
29962,
353,
2944,
29889,
657,
29898,
1989,
29897,
13,
9651,
1121,
29889,
4397,
29898,
5848,
272,
29897,
13,
4706,
13964,
1839,
5848,
943,
2033,
353,
4390,
29889,
29881,
17204,
29898,
2914,
29897,
13,
4706,
7709,
13964,
13,
13,
4706,
396,
29871,
30356,
31066,
30354,
30763,
13,
4706,
10916,
353,
1583,
29889,
657,
29918,
1761,
29898,
13,
9651,
12078,
29892,
16321,
657,
1293,
2059,
20779,
1542,
3170,
29906,
3009,
1495,
13,
4706,
363,
4234,
297,
10916,
29901,
13,
9651,
4234,
29889,
7323,
877,
333,
742,
6213,
29897,
13,
9651,
4234,
1839,
13509,
1170,
2033,
353,
4234,
29889,
7323,
877,
16123,
1239,
1170,
742,
6213,
29897,
13,
9651,
4234,
1839,
16123,
1239,
1170,
2033,
353,
6629,
13,
9651,
4234,
29889,
7323,
877,
13509,
1542,
1495,
13,
9651,
4234,
29889,
7323,
877,
12690,
1170,
1495,
13,
9651,
4234,
29889,
7323,
877,
16123,
1239,
1204,
1495,
13,
9651,
4234,
29889,
7323,
877,
16123,
1239,
1170,
1495,
13,
9651,
4234,
29889,
7323,
877,
16123,
1239,
21322,
1170,
1495,
13,
9651,
4234,
29889,
7323,
877,
1545,
1598,
2481,
742,
6213,
29897,
13,
9651,
4234,
29889,
7323,
877,
3258,
2481,
742,
6213,
29897,
13,
9651,
4234,
1839,
3742,
29878,
29963,
29877,
2033,
353,
4390,
29889,
29881,
17204,
29898,
13509,
29889,
657,
877,
3742,
29878,
29963,
29877,
742,
6571,
876,
13,
9651,
13964,
29918,
1272,
353,
4234,
29889,
657,
877,
6112,
6765,
1469,
1495,
13,
9651,
565,
13964,
29918,
1272,
29901,
13,
18884,
7709,
24559,
2272,
29889,
3089,
29898,
13,
462,
1678,
13964,
29918,
1272,
29892,
13,
462,
1678,
6939,
29922,
1311,
29889,
5510,
29918,
13509,
29918,
6112,
6765,
29918,
1272,
29892,
13,
462,
1678,
12700,
3790,
13,
462,
4706,
525,
13509,
2396,
4234,
13,
462,
1678,
500,
13,
18884,
1723,
13,
9651,
1683,
29901,
13,
18884,
7709,
4452,
29889,
20779,
2001,
29898,
29881,
8683,
1469,
11759,
1402,
3579,
13509,
29897,
13,
13,
4706,
1583,
29889,
29883,
1610,
839,
353,
29871,
29896,
29871,
396,
29871,
30690,
30746,
234,
139,
175,
235,
156,
174,
31290,
234,
139,
175,
30683,
30354,
30763,
13,
13,
1678,
822,
6088,
29918,
16123,
1239,
29918,
6112,
6765,
29918,
1272,
29898,
1311,
29892,
2933,
1125,
13,
4706,
4234,
3399,
353,
1583,
29889,
13509,
3399,
13,
4706,
12700,
353,
2933,
29889,
7299,
13,
4706,
14368,
353,
12700,
1839,
29883,
1907,
2033,
13,
4706,
12291,
353,
12700,
1839,
16123,
1239,
2033,
13,
4706,
12291,
1170,
353,
12291,
1839,
16123,
1239,
21322,
1170,
2033,
13,
4706,
12291,
3399,
353,
13756,
29963,
1177,
4741,
29918,
16524,
29903,
29961,
16123,
1239,
1170,
29962,
13,
4706,
1121,
353,
4390,
29889,
18132,
29898,
5327,
29889,
726,
29897,
13,
4706,
14218,
1469,
353,
1121,
1839,
1272,
2033,
13,
4706,
363,
2944,
297,
14218,
1469,
29901,
13,
9651,
2944,
1839,
13509,
3399,
2033,
353,
4234,
3399,
13,
9651,
2944,
1839,
16123,
1239,
1170,
2033,
353,
12291,
1170,
13,
9651,
2944,
1839,
16123,
1239,
3399,
2033,
353,
12291,
3399,
13,
4706,
848,
353,
4390,
29889,
29881,
17204,
29898,
29881,
8683,
1469,
29897,
13,
4706,
12291,
1839,
16123,
1239,
1170,
2033,
353,
12291,
1170,
13,
4706,
12291,
29918,
5085,
353,
6571,
13,
4706,
410,
1087,
29918,
2671,
7039,
353,
518,
29888,
29889,
978,
363,
285,
297,
320,
13,
9651,
4452,
29889,
1184,
29894,
1239,
2001,
29889,
14095,
29918,
4299,
3032,
7299,
29889,
657,
29918,
9621,
580,
29962,
13,
4706,
363,
1746,
978,
297,
410,
1087,
29918,
2671,
7039,
29901,
13,
9651,
995,
353,
12291,
29889,
657,
29898,
2671,
978,
29897,
13,
9651,
565,
995,
338,
451,
6213,
29901,
13,
18884,
12291,
29918,
5085,
29961,
2671,
978,
29962,
353,
995,
13,
4706,
12291,
29918,
5085,
1839,
29881,
8683,
1469,
2033,
353,
848,
13,
4706,
12291,
29918,
5085,
1839,
29881,
8683,
5983,
2033,
353,
12291,
29889,
657,
877,
6112,
6765,
1469,
1495,
13,
4706,
12291,
29918,
5085,
1839,
13509,
3399,
2033,
353,
4234,
3399,
13,
4706,
12291,
29918,
5085,
1839,
16123,
1239,
3399,
2033,
353,
12291,
3399,
13,
4706,
7709,
4452,
29889,
1184,
29894,
1239,
2001,
29898,
1068,
16123,
1239,
29918,
5085,
29897,
13,
13,
4706,
363,
4272,
297,
14368,
29901,
13,
9651,
4272,
29889,
7323,
877,
5479,
1204,
1495,
13,
9651,
7709,
4452,
29889,
16885,
2001,
29898,
13,
18884,
4234,
3399,
29922,
13509,
3399,
29892,
13,
18884,
12291,
3399,
29922,
16123,
1239,
3399,
29892,
13,
18884,
12291,
1170,
29922,
16123,
1239,
1170,
29892,
13,
18884,
3579,
12690,
13,
9651,
1723,
13,
13,
1678,
822,
6088,
29918,
13509,
29918,
6112,
6765,
29918,
1272,
29898,
1311,
29892,
2933,
1125,
13,
4706,
1121,
353,
4390,
29889,
18132,
29898,
5327,
29889,
726,
29897,
13,
4706,
14218,
1469,
353,
1121,
1839,
1272,
2033,
13,
4706,
12700,
353,
2933,
29889,
7299,
13,
4706,
4234,
353,
12700,
1839,
13509,
2033,
13,
4706,
4234,
29889,
7323,
877,
5479,
1204,
1495,
13,
4706,
4234,
1839,
13509,
3399,
2033,
353,
4234,
3399,
320,
13,
9651,
353,
4234,
29889,
7323,
877,
13509,
21322,
3399,
1495,
13,
4706,
4234,
3399,
353,
4810,
3904,
5659,
29979,
29918,
16524,
29918,
25634,
29889,
657,
29898,
13509,
3399,
29892,
4234,
3399,
29897,
13,
4706,
363,
2944,
297,
14218,
1469,
29901,
13,
9651,
2944,
1839,
13509,
3399,
2033,
353,
4234,
3399,
13,
9651,
2944,
1839,
13509,
1170,
2033,
353,
4234,
1839,
13509,
1170,
2033,
13,
4706,
14218,
1469,
353,
4390,
29889,
29881,
17204,
29898,
29881,
8683,
1469,
29897,
13,
4706,
7709,
4452,
29889,
20779,
2001,
29898,
29881,
8683,
1469,
29922,
29881,
8683,
1469,
29892,
3579,
13509,
29897,
13,
13,
1678,
822,
5649,
29918,
6112,
6765,
29898,
1311,
29892,
848,
1125,
13,
4706,
13964,
353,
848,
1839,
10945,
9513,
6765,
2033,
13,
4706,
2777,
353,
6571,
13,
4706,
2944,
353,
6571,
13,
4706,
363,
1820,
297,
313,
13,
18884,
525,
3784,
16376,
381,
2168,
3981,
742,
525,
29883,
2955,
3981,
742,
525,
5527,
381,
2168,
3981,
742,
13,
18884,
525,
643,
2738,
3981,
742,
525,
29879,
375,
6021,
3981,
742,
525,
311,
328,
3981,
742,
13,
18884,
525,
3784,
16376,
381,
2168,
797,
7283,
742,
525,
29883,
2955,
797,
7283,
742,
525,
5527,
381,
2168,
797,
7283,
742,
13,
18884,
525,
29879,
375,
6021,
797,
7283,
742,
525,
311,
328,
797,
7283,
29374,
13,
9651,
2944,
29961,
1989,
29962,
353,
13964,
29889,
657,
29898,
1989,
29892,
29871,
29900,
29897,
13,
4706,
2777,
1839,
10945,
9513,
6765,
2033,
353,
4390,
29889,
29881,
17204,
29898,
667,
29897,
13,
13,
4706,
13964,
353,
848,
1839,
1079,
647,
9513,
6765,
2033,
13,
4706,
2944,
353,
6571,
13,
4706,
363,
1820,
297,
313,
13,
18884,
525,
3784,
16376,
381,
2168,
3981,
742,
525,
29883,
2955,
3981,
742,
525,
5527,
381,
2168,
3981,
742,
13,
18884,
525,
643,
2738,
3981,
742,
525,
29879,
375,
6021,
3981,
742,
525,
311,
328,
3981,
742,
13,
18884,
525,
3784,
16376,
381,
2168,
797,
7283,
742,
525,
29883,
2955,
797,
7283,
742,
525,
5527,
381,
2168,
797,
7283,
742,
13,
18884,
525,
29879,
375,
6021,
797,
7283,
742,
525,
311,
328,
797,
7283,
29374,
13,
9651,
2944,
29961,
1989,
29962,
353,
13964,
29889,
657,
29898,
1989,
29892,
29871,
29900,
29897,
13,
4706,
2777,
1839,
14168,
1288,
9513,
6765,
2033,
353,
4390,
29889,
29881,
17204,
29898,
667,
29897,
13,
13,
13,
4706,
13964,
353,
848,
13,
4706,
2944,
353,
6571,
13,
4706,
363,
1820,
297,
313,
13,
18884,
525,
3784,
16376,
381,
2168,
3981,
742,
525,
29883,
2955,
3981,
742,
525,
5527,
381,
2168,
3981,
742,
13,
18884,
525,
643,
2738,
3981,
742,
525,
29879,
375,
6021,
3981,
742,
525,
311,
328,
3981,
742,
13,
18884,
525,
3784,
16376,
381,
2168,
797,
7283,
742,
525,
29883,
2955,
797,
7283,
742,
525,
5527,
381,
2168,
797,
7283,
742,
13,
18884,
525,
29879,
375,
6021,
797,
7283,
742,
525,
311,
328,
797,
7283,
29374,
13,
9651,
2944,
29961,
1989,
29962,
353,
13964,
29889,
657,
29898,
1989,
29892,
29871,
29900,
29897,
13,
4706,
2777,
1839,
3129,
15931,
9513,
6765,
2033,
353,
4390,
29889,
29881,
17204,
29898,
667,
29897,
13,
13,
4706,
396,
5240,
935,
322,
3940,
13,
4706,
29360,
353,
5159,
13,
4706,
363,
1820,
297,
6702,
26294,
29896,
742,
525,
26294,
29906,
742,
525,
26294,
29941,
742,
525,
26294,
29946,
742,
525,
26294,
29945,
29374,
13,
9651,
8509,
353,
848,
29889,
657,
29898,
1989,
29897,
13,
9651,
565,
8509,
29901,
13,
18884,
29360,
29889,
4397,
29898,
26294,
29897,
13,
13,
4706,
11486,
353,
5159,
13,
4706,
363,
1820,
297,
6702,
6812,
29896,
742,
525,
6812,
29906,
742,
525,
6812,
29941,
29374,
13,
9651,
4443,
353,
848,
29889,
657,
29898,
1989,
29897,
13,
9651,
565,
4443,
29901,
13,
18884,
11486,
29889,
4397,
29898,
6812,
29897,
13,
13,
4706,
2777,
1839,
1745,
17862,
2033,
353,
4390,
29889,
29881,
17204,
29898,
1745,
17862,
29897,
13,
4706,
2777,
1839,
16953,
2033,
353,
4390,
29889,
29881,
17204,
29898,
16953,
29897,
13,
4706,
2777,
1839,
17492,
7301,
935,
2033,
353,
848,
29889,
657,
877,
17492,
7301,
935,
1495,
13,
4706,
736,
4452,
29889,
9513,
6765,
2001,
29898,
1068,
8758,
29897,
13,
13,
1678,
822,
679,
29918,
1761,
29898,
1311,
29892,
12078,
29892,
848,
29918,
333,
1125,
13,
4706,
3240,
353,
12078,
29889,
4268,
29898,
1272,
29918,
333,
467,
276,
29898,
29878,
29915,
1194,
29961,
29889,
3124,
2314,
1495,
13,
4706,
736,
4390,
29889,
18132,
29898,
2267,
29961,
29900,
2314,
13,
13,
1678,
822,
679,
29918,
8977,
29898,
1311,
29892,
12078,
29892,
848,
29918,
333,
1125,
13,
4706,
3240,
353,
12078,
29889,
4268,
29898,
1272,
29918,
333,
467,
276,
29898,
29878,
12764,
2013,
29879,
29930,
1194,
26139,
3124,
11606,
29913,
12510,
29905,
29898,
29872,
29905,
2144,
741,
29913,
1495,
13,
4706,
736,
4390,
29889,
18132,
29898,
2267,
29961,
29900,
2314,
13,
2
] |
src/utility/get_data.py | mtsu-data-science/non-profit-categorization | 1 | 150359 | import pandas as pd
import os
import urllib.request
def download_project_maslow_files():
"""The purpose of this function is to handle getting the nonprofit.txt and nonprofit_text.txt
files. This functin will create a data directory, add a .gitignore file so
source control does not pick up the txt files, and then check to see
if either nonprofit.txt and nonprofit_text.txt have been downloaded yet.
If not, it will proceed to download the files.
"""
if os.path.isfile("data/nonprofit.txt") is False:
print("Downloading nonprofit.txt...")
urllib.request.urlretrieve("https://mtsu-dsi-non-profit-categorization.s3.amazonaws.com/tax-data-descriptions/nonprofit.txt", 'data/nonprofit.txt')
if os.path.isfile("data/nonprofit_text.txt") is False:
print("Downloading nonprofit_text.txt...")
urllib.request.urlretrieve("https://mtsu-dsi-non-profit-categorization.s3.amazonaws.com/tax-data-descriptions/nonprofit_text.txt", 'data/nonprofit_text.txt')
def get_non_profit_df():
"""This function will first run the download_project_maslow_files() to check to
see if the files have been downloaded to the `data/` folder. If not,
it will download the files.
Then, it will read in the file and return a dataframe with the nonprofit
"""
download_project_maslow_files()
col_types = {
"nonprofit_id": "Int64",
"reporting_year": "Int64",
"ein": "Int64",
"businessname": "str",
"phone": "str",
"address1": "str",
"address2": "str",
"city": "str",
"stabbrv": "str",
"zip": "str"
}
df = pd.read_csv("data/nonprofit.txt", sep = "|", dtype=col_types)
return df
def get_non_profit_text_df():
"""This function will first run the download_project_maslow_files() to check to
see if the files have been downloaded to the `data/` folder. If not,
it will download the files.
Then, it will read in the file and return a dataframe with the nonprofit_text
"""
download_project_maslow_files()
col_types = {
"nonprofit_text_id": "Int64",
"reporting_year": "Int64",
"nonprofit_id": "Int64",
"grouptype": "str",
"description": "str"
}
df = pd.read_csv("data/nonprofit_text.txt", sep = "|", encoding="cp1252", dtype=col_types)
return df | [
1,
1053,
11701,
408,
10518,
13,
5215,
2897,
13,
5215,
3142,
1982,
29889,
3827,
13,
13,
13,
1753,
5142,
29918,
4836,
29918,
8247,
677,
29918,
5325,
7295,
13,
1678,
9995,
1576,
6437,
310,
445,
740,
338,
304,
4386,
2805,
278,
1661,
771,
9202,
29889,
3945,
322,
1661,
771,
9202,
29918,
726,
29889,
3945,
13,
1678,
2066,
29889,
29871,
910,
2090,
312,
262,
674,
1653,
263,
848,
3884,
29892,
788,
263,
869,
5559,
17281,
934,
577,
13,
1678,
2752,
2761,
947,
451,
5839,
701,
278,
13872,
2066,
29892,
322,
769,
1423,
304,
1074,
13,
1678,
565,
2845,
1661,
771,
9202,
29889,
3945,
322,
1661,
771,
9202,
29918,
726,
29889,
3945,
505,
1063,
16532,
3447,
29889,
13,
1678,
960,
451,
29892,
372,
674,
8469,
304,
5142,
278,
2066,
29889,
13,
1678,
9995,
13,
13,
1678,
565,
2897,
29889,
2084,
29889,
275,
1445,
703,
1272,
29914,
5464,
771,
9202,
29889,
3945,
1159,
338,
7700,
29901,
13,
4706,
1596,
703,
6767,
13234,
1661,
771,
9202,
29889,
3945,
856,
1159,
13,
4706,
3142,
1982,
29889,
3827,
29889,
2271,
276,
509,
2418,
703,
991,
597,
29885,
1372,
29884,
29899,
29881,
1039,
29899,
5464,
29899,
771,
9202,
29899,
29883,
20440,
2133,
29889,
29879,
29941,
29889,
17260,
10467,
29889,
510,
29914,
20725,
29899,
1272,
29899,
2783,
699,
1980,
29914,
5464,
771,
9202,
29889,
3945,
613,
525,
1272,
29914,
5464,
771,
9202,
29889,
3945,
1495,
13,
13,
1678,
565,
2897,
29889,
2084,
29889,
275,
1445,
703,
1272,
29914,
5464,
771,
9202,
29918,
726,
29889,
3945,
1159,
338,
7700,
29901,
13,
4706,
1596,
703,
6767,
13234,
1661,
771,
9202,
29918,
726,
29889,
3945,
856,
1159,
13,
4706,
3142,
1982,
29889,
3827,
29889,
2271,
276,
509,
2418,
703,
991,
597,
29885,
1372,
29884,
29899,
29881,
1039,
29899,
5464,
29899,
771,
9202,
29899,
29883,
20440,
2133,
29889,
29879,
29941,
29889,
17260,
10467,
29889,
510,
29914,
20725,
29899,
1272,
29899,
2783,
699,
1980,
29914,
5464,
771,
9202,
29918,
726,
29889,
3945,
613,
525,
1272,
29914,
5464,
771,
9202,
29918,
726,
29889,
3945,
1495,
13,
13,
13,
1753,
679,
29918,
5464,
29918,
771,
9202,
29918,
2176,
7295,
13,
1678,
9995,
4013,
740,
674,
937,
1065,
278,
5142,
29918,
4836,
29918,
8247,
677,
29918,
5325,
580,
304,
1423,
304,
13,
1678,
1074,
565,
278,
2066,
505,
1063,
16532,
304,
278,
421,
1272,
16527,
4138,
29889,
29871,
960,
451,
29892,
13,
1678,
372,
674,
5142,
278,
2066,
29889,
13,
1678,
1987,
29892,
372,
674,
1303,
297,
278,
934,
322,
736,
263,
12205,
411,
278,
1661,
771,
9202,
13,
1678,
9995,
13,
13,
1678,
5142,
29918,
4836,
29918,
8247,
677,
29918,
5325,
580,
13,
13,
1678,
784,
29918,
8768,
353,
426,
13,
4706,
376,
5464,
771,
9202,
29918,
333,
1115,
376,
2928,
29953,
29946,
613,
13,
4706,
376,
12276,
292,
29918,
6360,
1115,
376,
2928,
29953,
29946,
613,
13,
4706,
376,
21084,
1115,
376,
2928,
29953,
29946,
613,
13,
4706,
376,
8262,
3335,
978,
1115,
376,
710,
613,
13,
4706,
376,
6710,
1115,
376,
710,
613,
13,
4706,
376,
7328,
29896,
1115,
376,
710,
613,
13,
4706,
376,
7328,
29906,
1115,
376,
710,
613,
13,
4706,
376,
12690,
1115,
376,
710,
613,
13,
4706,
376,
29256,
1182,
29894,
1115,
376,
710,
613,
13,
4706,
376,
7554,
1115,
376,
710,
29908,
13,
418,
500,
13,
13,
1678,
4489,
353,
10518,
29889,
949,
29918,
7638,
703,
1272,
29914,
5464,
771,
9202,
29889,
3945,
613,
16345,
353,
376,
29989,
613,
26688,
29922,
1054,
29918,
8768,
29897,
13,
13,
1678,
736,
4489,
13,
13,
1753,
679,
29918,
5464,
29918,
771,
9202,
29918,
726,
29918,
2176,
7295,
13,
1678,
9995,
4013,
740,
674,
937,
1065,
278,
5142,
29918,
4836,
29918,
8247,
677,
29918,
5325,
580,
304,
1423,
304,
13,
1678,
1074,
565,
278,
2066,
505,
1063,
16532,
304,
278,
421,
1272,
16527,
4138,
29889,
29871,
960,
451,
29892,
13,
1678,
372,
674,
5142,
278,
2066,
29889,
13,
1678,
1987,
29892,
372,
674,
1303,
297,
278,
934,
322,
736,
263,
12205,
411,
278,
1661,
771,
9202,
29918,
726,
13,
1678,
9995,
13,
13,
1678,
5142,
29918,
4836,
29918,
8247,
677,
29918,
5325,
580,
13,
13,
1678,
784,
29918,
8768,
353,
426,
13,
4706,
376,
5464,
771,
9202,
29918,
726,
29918,
333,
1115,
376,
2928,
29953,
29946,
613,
13,
4706,
376,
12276,
292,
29918,
6360,
1115,
376,
2928,
29953,
29946,
613,
13,
4706,
376,
5464,
771,
9202,
29918,
333,
1115,
376,
2928,
29953,
29946,
613,
13,
4706,
376,
629,
283,
415,
668,
1115,
376,
710,
613,
13,
4706,
376,
8216,
1115,
376,
710,
29908,
13,
1678,
500,
13,
13,
1678,
4489,
353,
10518,
29889,
949,
29918,
7638,
703,
1272,
29914,
5464,
771,
9202,
29918,
726,
29889,
3945,
613,
16345,
353,
376,
29989,
613,
8025,
543,
6814,
29896,
29906,
29945,
29906,
613,
26688,
29922,
1054,
29918,
8768,
29897,
13,
13,
1678,
736,
4489,
2
] |
molecule/centos/tests/test_icinga_satclient.py | dverhelst/icinga2 | 3 | 195202 | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('icinga2satclient')
def test_sat_client_config(host):
""" basic configuration checks
"""
with host.sudo():
# Check if zone is configured
file = host.file('/etc/icinga2/zones.conf')
assert file.exists
assert file.user == 'icinga'
assert file.group == 'icinga'
assert file.mode == 0o644
assert file.contains('Generated by Icinga 2 node setup commands')
# Check if satellite endpoint is configured
endpoints = host.run('icinga2 object list --type endpoint')
assert "-icinga2-satellite' of type 'Endpoint':" in endpoints.stdout
# Check if config from master is included
zones = host.run('icinga2 object list --type zone')
assert "Object 'global-templates' of type 'Zone'" in zones.stdout
assert "Object 'director-global' of type 'Zone'" in zones.stdout
assert "Object 'master' of type 'Zone'" in zones.stdout
def test_sat_client_connection(host):
""" Check if client is connected to icinga
"""
with host.sudo():
connections = list(host.socket('tcp://5665')._iter_sockets(False))
# >>> print(connections)
# [(u'tcp', u'10.244.3.219', 51716, u'10.244.5.174', 5665), (u'tcp', u'10.244.3.219', 22, u'10.244.4.0', 33686)]
assert [x for x in connections if x[4] == 5665]
| [
1,
1053,
2897,
13,
5215,
1243,
7192,
336,
29889,
13239,
29889,
550,
1821,
29918,
27492,
13,
13,
1688,
7192,
336,
29918,
23525,
353,
1243,
7192,
336,
29889,
13239,
29889,
550,
1821,
29918,
27492,
29889,
2744,
1687,
16802,
29898,
13,
1678,
2897,
29889,
21813,
1839,
6720,
1307,
29907,
29965,
1307,
29918,
1177,
29963,
3919,
18929,
29918,
7724,
2033,
467,
657,
29918,
23525,
877,
18499,
29874,
29906,
29879,
271,
4645,
1495,
13,
13,
13,
1753,
1243,
29918,
29879,
271,
29918,
4645,
29918,
2917,
29898,
3069,
1125,
13,
1678,
9995,
6996,
5285,
12747,
13,
1678,
9995,
13,
1678,
411,
3495,
29889,
15360,
7295,
13,
4706,
396,
5399,
565,
10640,
338,
13252,
13,
4706,
934,
353,
3495,
29889,
1445,
11219,
7070,
29914,
18499,
29874,
29906,
29914,
29920,
2873,
29889,
5527,
1495,
13,
4706,
4974,
934,
29889,
9933,
13,
4706,
4974,
934,
29889,
1792,
1275,
525,
18499,
29874,
29915,
13,
4706,
4974,
934,
29889,
2972,
1275,
525,
18499,
29874,
29915,
13,
4706,
4974,
934,
29889,
8513,
1275,
29871,
29900,
29877,
29953,
29946,
29946,
13,
4706,
4974,
934,
29889,
11516,
877,
24565,
491,
306,
3277,
29874,
29871,
29906,
2943,
6230,
8260,
1495,
13,
13,
4706,
396,
5399,
565,
28421,
16248,
338,
13252,
13,
4706,
1095,
9748,
353,
3495,
29889,
3389,
877,
18499,
29874,
29906,
1203,
1051,
1192,
1853,
16248,
1495,
13,
4706,
4974,
11663,
18499,
29874,
29906,
29899,
29879,
271,
20911,
29915,
310,
1134,
525,
25602,
2396,
29908,
297,
1095,
9748,
29889,
25393,
13,
13,
4706,
396,
5399,
565,
2295,
515,
5835,
338,
5134,
13,
4706,
20542,
353,
3495,
29889,
3389,
877,
18499,
29874,
29906,
1203,
1051,
1192,
1853,
10640,
1495,
13,
4706,
4974,
376,
2061,
525,
10945,
29899,
20943,
29915,
310,
1134,
525,
18482,
11838,
297,
20542,
29889,
25393,
13,
4706,
4974,
376,
2061,
525,
11851,
272,
29899,
10945,
29915,
310,
1134,
525,
18482,
11838,
297,
20542,
29889,
25393,
13,
4706,
4974,
376,
2061,
525,
6207,
29915,
310,
1134,
525,
18482,
11838,
297,
20542,
29889,
25393,
13,
13,
13,
1753,
1243,
29918,
29879,
271,
29918,
4645,
29918,
9965,
29898,
3069,
1125,
13,
1678,
9995,
5399,
565,
3132,
338,
6631,
304,
16077,
292,
29874,
13,
1678,
9995,
13,
1678,
411,
3495,
29889,
15360,
7295,
13,
4706,
12368,
353,
1051,
29898,
3069,
29889,
11514,
877,
23981,
597,
29945,
29953,
29953,
29945,
2824,
29918,
1524,
29918,
578,
9737,
29898,
8824,
876,
13,
4706,
396,
8653,
1596,
29898,
11958,
1953,
29897,
13,
4706,
396,
17288,
29884,
29915,
23981,
742,
318,
29915,
29896,
29900,
29889,
29906,
29946,
29946,
29889,
29941,
29889,
29906,
29896,
29929,
742,
29871,
29945,
29896,
29955,
29896,
29953,
29892,
318,
29915,
29896,
29900,
29889,
29906,
29946,
29946,
29889,
29945,
29889,
29896,
29955,
29946,
742,
29871,
29945,
29953,
29953,
29945,
511,
313,
29884,
29915,
23981,
742,
318,
29915,
29896,
29900,
29889,
29906,
29946,
29946,
29889,
29941,
29889,
29906,
29896,
29929,
742,
29871,
29906,
29906,
29892,
318,
29915,
29896,
29900,
29889,
29906,
29946,
29946,
29889,
29946,
29889,
29900,
742,
29871,
29941,
29941,
29953,
29947,
29953,
4638,
13,
4706,
4974,
518,
29916,
363,
921,
297,
12368,
565,
921,
29961,
29946,
29962,
1275,
29871,
29945,
29953,
29953,
29945,
29962,
13,
2
] |
project_template.py | dvillega/scripts | 0 | 175242 | <gh_stars>0
#!/usr/bin/env python
"""
Creates a base directory structure ala Project Template (from R)
author - <NAME>
2013/08/19
"""
import argparse
import errno
import os
import sys
def make_sure_path_exists(path):
try:
os.makedirs(path)
except OSError as exception:
if exception.errno != errno.EEXIST:
raise
parser = argparse.ArgumentParser(description='Create a data analysis directory structure')
parser.add_argument('project_name',help='Name of the project we are creating')
args = parser.parse_args()
project_name = args.project_name
cwd = os.getcwd()
target = cwd + '/' + project_name
# Check if we are going to overwrite a directory
current_dirs = os.listdir(cwd)
if args.project_name in current_dirs:
print "Current project name exists in dir"
# Confirm location to create template
ans = raw_input("Confirm creating " + project_name + " project in " + cwd + ": y/[n]\n")
if ans.lower() != 'y':
print "Aborting"
sys.exit(1)
# Create directory structure
dirs = ['cache','config','data','diagnostics',
'doc','figures','lib','logs','munge',
'profiling','reports','scratch','src',
'tests']
make_sure_path_exists(target)
for elem in dirs:
create_dir = target + '/' + elem
print "Creating " + create_dir
make_sure_path_exists(create_dir)
# Create subdirs
make_sure_path_exists(target + '/figures/exploratory')
make_sure_path_exists(target + '/figures/final')
print 'Writing README'
fh1 = open(target + '/README.md','w')
fh1.write('README File for ' + project_name)
fh1.close()
print 'Writing TODO'
fh2 = open(target + '/TODO.md','w')
fh2.write('TODO File for ' + project_name)
fh2.close()
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
15945,
29908,
13,
9832,
1078,
263,
2967,
3884,
3829,
394,
29874,
8010,
25663,
313,
3166,
390,
29897,
13,
8921,
448,
529,
5813,
29958,
13,
29906,
29900,
29896,
29941,
29914,
29900,
29947,
29914,
29896,
29929,
13,
13,
15945,
29908,
13,
13,
5215,
1852,
5510,
13,
5215,
4589,
1217,
13,
5215,
2897,
13,
5215,
10876,
13,
13,
1753,
1207,
29918,
29879,
545,
29918,
2084,
29918,
9933,
29898,
2084,
1125,
13,
1678,
1018,
29901,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
2084,
29897,
13,
1678,
5174,
438,
29173,
408,
3682,
29901,
13,
4706,
565,
3682,
29889,
3127,
1217,
2804,
4589,
1217,
29889,
29923,
5746,
9047,
29901,
13,
9651,
12020,
13,
13,
16680,
353,
1852,
5510,
29889,
15730,
11726,
29898,
8216,
2433,
4391,
263,
848,
7418,
3884,
3829,
1495,
13,
13,
16680,
29889,
1202,
29918,
23516,
877,
4836,
29918,
978,
742,
8477,
2433,
1170,
310,
278,
2060,
591,
526,
4969,
1495,
13,
5085,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
4836,
29918,
978,
353,
6389,
29889,
4836,
29918,
978,
13,
13,
29883,
9970,
353,
2897,
29889,
657,
29883,
9970,
580,
13,
5182,
353,
274,
9970,
718,
8207,
29915,
718,
2060,
29918,
978,
13,
13,
13,
29937,
5399,
565,
591,
526,
2675,
304,
26556,
263,
3884,
13,
3784,
29918,
3972,
29879,
353,
2897,
29889,
1761,
3972,
29898,
29883,
9970,
29897,
13,
361,
6389,
29889,
4836,
29918,
978,
297,
1857,
29918,
3972,
29879,
29901,
13,
1678,
1596,
376,
7583,
2060,
1024,
4864,
297,
4516,
29908,
13,
13,
29937,
10811,
3568,
4423,
304,
1653,
4472,
13,
550,
353,
10650,
29918,
2080,
703,
16376,
3568,
4969,
376,
718,
2060,
29918,
978,
718,
376,
2060,
297,
376,
718,
274,
9970,
718,
29242,
343,
29914,
29961,
29876,
10725,
29876,
1159,
13,
361,
6063,
29889,
13609,
580,
2804,
525,
29891,
2396,
13,
1678,
1596,
376,
4920,
441,
292,
29908,
13,
1678,
10876,
29889,
13322,
29898,
29896,
29897,
13,
13,
29937,
6204,
3884,
3829,
13,
3972,
29879,
353,
6024,
8173,
3788,
2917,
3788,
1272,
3788,
6051,
20921,
742,
13,
4706,
525,
1514,
3788,
1003,
1973,
3788,
1982,
3788,
20756,
3788,
29885,
19440,
742,
13,
4706,
525,
771,
1777,
292,
3788,
276,
4011,
3788,
10526,
905,
3788,
4351,
742,
13,
4706,
525,
21150,
2033,
13,
5675,
29918,
29879,
545,
29918,
2084,
29918,
9933,
29898,
5182,
29897,
13,
1454,
21268,
297,
4516,
29879,
29901,
13,
1678,
1653,
29918,
3972,
353,
3646,
718,
8207,
29915,
718,
21268,
13,
1678,
1596,
376,
9832,
1218,
376,
718,
1653,
29918,
3972,
13,
1678,
1207,
29918,
29879,
545,
29918,
2084,
29918,
9933,
29898,
3258,
29918,
3972,
29897,
13,
13,
29937,
6204,
1014,
3972,
29879,
13,
5675,
29918,
29879,
545,
29918,
2084,
29918,
9933,
29898,
5182,
718,
8207,
1003,
1973,
29914,
24516,
272,
7606,
1495,
13,
5675,
29918,
29879,
545,
29918,
2084,
29918,
9933,
29898,
5182,
718,
8207,
1003,
1973,
29914,
8394,
1495,
13,
13,
2158,
525,
29956,
768,
292,
5195,
3035,
2303,
29915,
13,
29888,
29882,
29896,
353,
1722,
29898,
5182,
718,
8207,
16310,
2303,
29889,
3487,
3788,
29893,
1495,
13,
29888,
29882,
29896,
29889,
3539,
877,
16310,
2303,
3497,
363,
525,
718,
2060,
29918,
978,
29897,
13,
29888,
29882,
29896,
29889,
5358,
580,
13,
13,
2158,
525,
29956,
768,
292,
14402,
29915,
13,
29888,
29882,
29906,
353,
1722,
29898,
5182,
718,
8207,
4986,
3970,
29889,
3487,
3788,
29893,
1495,
13,
29888,
29882,
29906,
29889,
3539,
877,
4986,
3970,
3497,
363,
525,
718,
2060,
29918,
978,
29897,
13,
29888,
29882,
29906,
29889,
5358,
580,
13,
2
] |
setup.py | akhiilkasare/end-to-end-macine-learning-pipeline-with-mlops-tools | 0 | 176040 | <reponame>akhiilkasare/end-to-end-macine-learning-pipeline-with-mlops-tools
from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='End to End Machine Learning Pipeline with MLOps tools',
author='<NAME>',
license='MIT',
)
| [
1,
529,
276,
1112,
420,
29958,
557,
2918,
309,
29895,
294,
598,
29914,
355,
29899,
517,
29899,
355,
29899,
8628,
457,
29899,
21891,
29899,
13096,
5570,
29899,
2541,
29899,
29885,
417,
567,
29899,
8504,
13,
3166,
731,
21245,
8789,
1053,
1284,
29918,
8318,
29892,
6230,
13,
13,
14669,
29898,
13,
1678,
1024,
2433,
4351,
742,
13,
1678,
9741,
29922,
2886,
29918,
8318,
3285,
13,
1678,
1873,
2433,
29900,
29889,
29896,
29889,
29900,
742,
13,
1678,
6139,
2433,
5044,
304,
2796,
6189,
29257,
349,
23828,
411,
341,
3927,
567,
8492,
742,
13,
1678,
4148,
2433,
29966,
5813,
29958,
742,
13,
1678,
19405,
2433,
26349,
742,
13,
29897,
13,
2
] |
main/migrations/0005_auto_20180603_0449.py | OpenHumans/jupyter-gallery | 10 | 115732 | # Generated by Django 2.0.6 on 2018-06-03 04:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0004_auto_20180601_2005'),
]
operations = [
migrations.AlterField(
model_name='sharednotebook',
name='created_at',
field=models.DateTimeField(default='2018-05-27 04:49:28+00:00'),
),
migrations.AlterField(
model_name='sharednotebook',
name='updated_at',
field=models.DateTimeField(default='2018-05-27 04:49:28+00:00'),
),
]
| [
1,
396,
3251,
630,
491,
15337,
29871,
29906,
29889,
29900,
29889,
29953,
373,
29871,
29906,
29900,
29896,
29947,
29899,
29900,
29953,
29899,
29900,
29941,
29871,
29900,
29946,
29901,
29946,
29929,
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,
3396,
742,
525,
29900,
29900,
29900,
29946,
29918,
6921,
29918,
29906,
29900,
29896,
29947,
29900,
29953,
29900,
29896,
29918,
29906,
29900,
29900,
29945,
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,
12366,
1333,
19273,
742,
13,
9651,
1024,
2433,
11600,
29918,
271,
742,
13,
9651,
1746,
29922,
9794,
29889,
11384,
3073,
29898,
4381,
2433,
29906,
29900,
29896,
29947,
29899,
29900,
29945,
29899,
29906,
29955,
29871,
29900,
29946,
29901,
29946,
29929,
29901,
29906,
29947,
29974,
29900,
29900,
29901,
29900,
29900,
5477,
13,
4706,
10353,
13,
4706,
9725,
800,
29889,
2499,
357,
3073,
29898,
13,
9651,
1904,
29918,
978,
2433,
12366,
1333,
19273,
742,
13,
9651,
1024,
2433,
21402,
29918,
271,
742,
13,
9651,
1746,
29922,
9794,
29889,
11384,
3073,
29898,
4381,
2433,
29906,
29900,
29896,
29947,
29899,
29900,
29945,
29899,
29906,
29955,
29871,
29900,
29946,
29901,
29946,
29929,
29901,
29906,
29947,
29974,
29900,
29900,
29901,
29900,
29900,
5477,
13,
4706,
10353,
13,
1678,
4514,
13,
2
] |
tests/ea/mutation/mutator/test_mutate.py | stevenbennett96/stk | 21 | 41317 | from tests.utilities import is_equivalent
def test_mutate(case_data):
"""
Test :meth:`mutate`.
Parameters
----------
case_data : :class:`.CaseData`
A test case. Holds the mutator to test and the correct mutation
record.
Returns
-------
None : :class:`NoneType`
"""
_test_mutate(
mutator=case_data.mutator,
record=case_data.record,
mutation_record=case_data.mutation_record,
)
def _test_mutate(mutator, record, mutation_record):
"""
Test :meth:`mutate`.
Parameters
----------
mutator : :class:`.MoleculeMutator`
The mutator to test.
record : :class:`.MoleculeRecord`
The molecule to mutate.
mutation_record : :class:`.MutationRecord`
The correct mutation record.
Returns
-------
None : :class:`NoneType`
"""
result = mutator.mutate(record)
assert (
result.get_mutator_name() == mutation_record.get_mutator_name()
)
is_equivalent(
result.get_molecule_record().get_molecule(),
mutation_record.get_molecule_record().get_molecule(),
)
| [
1,
515,
6987,
29889,
4422,
1907,
1053,
338,
29918,
1686,
27445,
13,
13,
13,
1753,
1243,
29918,
6149,
403,
29898,
4878,
29918,
1272,
1125,
13,
1678,
9995,
13,
1678,
4321,
584,
29885,
621,
18078,
6149,
403,
1412,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
1206,
29918,
1272,
584,
584,
1990,
29901,
1412,
8259,
1469,
29952,
13,
4706,
319,
1243,
1206,
29889,
379,
3361,
278,
5478,
1061,
304,
1243,
322,
278,
1959,
5478,
362,
13,
4706,
2407,
29889,
13,
13,
1678,
16969,
13,
1678,
448,
22158,
13,
1678,
6213,
584,
584,
1990,
18078,
8516,
1542,
29952,
13,
13,
1678,
9995,
13,
13,
1678,
903,
1688,
29918,
6149,
403,
29898,
13,
4706,
5478,
1061,
29922,
4878,
29918,
1272,
29889,
6149,
1061,
29892,
13,
4706,
2407,
29922,
4878,
29918,
1272,
29889,
11651,
29892,
13,
4706,
5478,
362,
29918,
11651,
29922,
4878,
29918,
1272,
29889,
6149,
362,
29918,
11651,
29892,
13,
1678,
1723,
13,
13,
13,
1753,
903,
1688,
29918,
6149,
403,
29898,
6149,
1061,
29892,
2407,
29892,
5478,
362,
29918,
11651,
1125,
13,
1678,
9995,
13,
1678,
4321,
584,
29885,
621,
18078,
6149,
403,
1412,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
5478,
1061,
584,
584,
1990,
29901,
1412,
29924,
1772,
29883,
1297,
29924,
329,
1061,
29952,
13,
4706,
450,
5478,
1061,
304,
1243,
29889,
13,
13,
1678,
2407,
584,
584,
1990,
29901,
1412,
29924,
1772,
29883,
1297,
9182,
29952,
13,
4706,
450,
13206,
29883,
1297,
304,
5478,
403,
29889,
13,
13,
1678,
5478,
362,
29918,
11651,
584,
584,
1990,
29901,
1412,
29924,
329,
362,
9182,
29952,
13,
4706,
450,
1959,
5478,
362,
2407,
29889,
13,
13,
1678,
16969,
13,
1678,
448,
22158,
13,
1678,
6213,
584,
584,
1990,
18078,
8516,
1542,
29952,
13,
13,
1678,
9995,
13,
13,
1678,
1121,
353,
5478,
1061,
29889,
6149,
403,
29898,
11651,
29897,
13,
1678,
4974,
313,
13,
4706,
1121,
29889,
657,
29918,
6149,
1061,
29918,
978,
580,
1275,
5478,
362,
29918,
11651,
29889,
657,
29918,
6149,
1061,
29918,
978,
580,
13,
1678,
1723,
13,
1678,
338,
29918,
1686,
27445,
29898,
13,
4706,
1121,
29889,
657,
29918,
29885,
1772,
29883,
1297,
29918,
11651,
2141,
657,
29918,
29885,
1772,
29883,
1297,
3285,
13,
4706,
5478,
362,
29918,
11651,
29889,
657,
29918,
29885,
1772,
29883,
1297,
29918,
11651,
2141,
657,
29918,
29885,
1772,
29883,
1297,
3285,
13,
1678,
1723,
13,
2
] |
tests/test_general.py | haku-kiro/flaskCRUD | 0 | 44677 | """
General unit tests
"""
class TestClass:
def test_base(self):
assert 42 == 42
| [
1,
9995,
13,
15263,
5190,
6987,
13,
15945,
29908,
13,
13,
13,
1990,
4321,
2385,
29901,
13,
13,
1678,
822,
1243,
29918,
3188,
29898,
1311,
1125,
13,
4706,
4974,
29871,
29946,
29906,
1275,
29871,
29946,
29906,
13,
2
] |
fourtynine.py | glennandreph/learnpython | 1 | 37106 | def my_function_with_args(username, greeting):
print("Hello, %s , From My Function! I wish you %s" %(username, greeting))
| [
1,
822,
590,
29918,
2220,
29918,
2541,
29918,
5085,
29898,
6786,
29892,
1395,
15133,
1125,
30004,
13,
1678,
1596,
703,
10994,
29892,
1273,
29879,
1919,
3645,
1619,
6680,
29991,
306,
6398,
366,
1273,
29879,
29908,
1273,
29898,
6786,
29892,
1395,
15133,
876,
30004,
13,
2
] |
micropub/renderer/element.py | HakierGrzonzo/microPub | 0 | 189501 | <reponame>HakierGrzonzo/microPub
from bs4 import BeautifulSoup as Soup
from bs4 import Tag
from micropub.renderer.text import Text
class Element:
def __init__(self, tag, renderer, parent = None):
self.renderer = renderer
self.parent = parent
self.tag = tag
self.children = list()
self.style = self.renderer.resolveStyle(self)
self.display = self.style.get("display", "inline")
for child in tag.children:
if isinstance(child, Tag):
self.children.append(Element(child, renderer, self))
else:
self.children.append(Text(child, self))
def render(self, force_inline = False):
if self.display != "inline" and not force_inline:
# handle block elements
contents = list()
lastParagraph = list()
for child in self.children:
if isinstance(child, Text):
lastParagraph.append(child)
elif child.display == "inline":
childContent = child.render(force_inline)
lastParagraph += childContent
else:
childContent = child.render(force_inline)
if len(lastParagraph) > 0:
contents.append(lastParagraph)
lastParagraph = list()
contents.append(childContent)
if len(lastParagraph) > 0:
contents.append(lastParagraph)
return contents
else:
# handle inline elements
contents = list()
for child in self.children:
if isinstance(child, Text):
contents.append(child)
else:
childContent = child.render(force_inline = True)
contents += childContent
return contents
| [
1,
529,
276,
1112,
420,
29958,
29950,
557,
631,
3338,
6626,
2502,
29914,
29885,
2357,
21076,
13,
3166,
24512,
29946,
1053,
25685,
29903,
1132,
408,
317,
1132,
13,
3166,
24512,
29946,
1053,
10522,
13,
3166,
20710,
1336,
431,
29889,
9482,
261,
29889,
726,
1053,
3992,
13,
13,
1990,
10619,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
4055,
29892,
4050,
261,
29892,
3847,
353,
6213,
1125,
13,
4706,
1583,
29889,
9482,
261,
353,
4050,
261,
13,
4706,
1583,
29889,
3560,
353,
3847,
13,
4706,
1583,
29889,
4039,
353,
4055,
13,
4706,
1583,
29889,
11991,
353,
1051,
580,
13,
4706,
1583,
29889,
3293,
353,
1583,
29889,
9482,
261,
29889,
17863,
5568,
29898,
1311,
29897,
13,
4706,
1583,
29889,
4990,
353,
1583,
29889,
3293,
29889,
657,
703,
4990,
613,
376,
14764,
1159,
13,
4706,
363,
2278,
297,
4055,
29889,
11991,
29901,
13,
9651,
565,
338,
8758,
29898,
5145,
29892,
10522,
1125,
13,
18884,
1583,
29889,
11991,
29889,
4397,
29898,
2642,
29898,
5145,
29892,
4050,
261,
29892,
1583,
876,
13,
9651,
1683,
29901,
13,
18884,
1583,
29889,
11991,
29889,
4397,
29898,
1626,
29898,
5145,
29892,
1583,
876,
13,
13,
1678,
822,
4050,
29898,
1311,
29892,
4889,
29918,
14764,
353,
7700,
1125,
13,
4706,
565,
1583,
29889,
4990,
2804,
376,
14764,
29908,
322,
451,
4889,
29918,
14764,
29901,
13,
9651,
396,
4386,
2908,
3161,
13,
9651,
8118,
353,
1051,
580,
13,
9651,
1833,
2177,
9895,
353,
1051,
580,
13,
9651,
363,
2278,
297,
1583,
29889,
11991,
29901,
13,
18884,
565,
338,
8758,
29898,
5145,
29892,
3992,
1125,
13,
462,
1678,
1833,
2177,
9895,
29889,
4397,
29898,
5145,
29897,
13,
18884,
25342,
2278,
29889,
4990,
1275,
376,
14764,
1115,
13,
462,
1678,
2278,
3916,
353,
2278,
29889,
9482,
29898,
10118,
29918,
14764,
29897,
13,
462,
1678,
1833,
2177,
9895,
4619,
2278,
3916,
13,
18884,
1683,
29901,
13,
462,
1678,
2278,
3916,
353,
2278,
29889,
9482,
29898,
10118,
29918,
14764,
29897,
13,
462,
1678,
565,
7431,
29898,
4230,
2177,
9895,
29897,
1405,
29871,
29900,
29901,
13,
462,
4706,
8118,
29889,
4397,
29898,
4230,
2177,
9895,
29897,
13,
462,
4706,
1833,
2177,
9895,
353,
1051,
580,
13,
462,
1678,
8118,
29889,
4397,
29898,
5145,
3916,
29897,
13,
9651,
565,
7431,
29898,
4230,
2177,
9895,
29897,
1405,
29871,
29900,
29901,
13,
18884,
8118,
29889,
4397,
29898,
4230,
2177,
9895,
29897,
13,
9651,
736,
8118,
13,
4706,
1683,
29901,
13,
9651,
396,
4386,
10583,
3161,
13,
9651,
8118,
353,
1051,
580,
13,
9651,
363,
2278,
297,
1583,
29889,
11991,
29901,
13,
18884,
565,
338,
8758,
29898,
5145,
29892,
3992,
1125,
13,
462,
1678,
8118,
29889,
4397,
29898,
5145,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
2278,
3916,
353,
2278,
29889,
9482,
29898,
10118,
29918,
14764,
353,
5852,
29897,
13,
462,
1678,
8118,
4619,
2278,
3916,
13,
9651,
736,
8118,
13,
13,
2
] |
unit_test.py | ksaper/CloudShell_LDAP_Integration | 0 | 78044 | from ldap_user_mgmt import ldapimport
test_runner = ldapimport()
error_log = []
t_user = 'unit_test_user'
user_created = 0
# Get user list from CloudShell
try:
master_list = test_runner.load_cloudshell_users()
print 'CloudShell User List'
print master_list
except:
error_log.append('Fail user list CloudShell')
print 'Unable to get user list from CloudShell'
# check whitelist
print 'The white list: '
for name in test_runner.configs['qs_whitelist']:
print name
# check is_admin
try:
if test_runner.is_admin('admin'):
print '"admin" is an admin'
else:
print('Error "admin" is not an admin')
error_log.append('"admin" not flagged as admin')
except:
error_log.append('Error on is_admin check with "admin"')
print 'Unable to validate "admin" as an admin'
# create a new user
try:
test_runner.create_cloudshell_user(user_name=t_user,
password='<PASSWORD>',
email='<EMAIL>')
user_created = 1
except:
error_log.append('Fail user creation')
print 'Unable to create user'
if user_created == 1:
# validate is_active
try:
check = test_runner.is_active(t_user)
if check:
print 'Test User is active'
else:
error_log.append('Test user was not created in an active state')
except:
error_log.append('Unable to check active status')
print 'Unable to check active status'
# check make_inactive & make_active
try:
test_runner.make_cloudshell_user_inactive(t_user)
try:
test_runner.make_cloudshell_user_active(t_user)
except:
error_log.append('Unable to make user active')
print 'Error making user active'
except error_log.append('Unable to make user inactive'):
print 'Error making user inactive'
# assign to user group
try:
test_runner.assign_cloudshell_usergroup([t_user], test_runner.configs['new_user_default_group'])
except:
error_log.append('Unable to assign user to usergroups')
print 'Error assigning user to a usergroup'
# remove user from usergroup
try:
test_runner.remove_cloudshell_usergroup([t_user], test_runner.configs['new_user_default_group'])
except:
error_log.append('Unable to remove user from usergroup')
print 'Error removing user from usergroup'
try:
test_runner._delete_cloudshell_user(t_user)
except:
error_log.append('Unable to delete the test user: ' + t_user)
print 'Error deleting the test user account'
# end if statment
# get user details from admin
try:
details = test_runner.get_cloudshell_user_detail('admin')
print details.Name
except:
error_log.append('Unable to get user detail for admin')
print 'Error get_cloudshell_user_details'
# try the ldap user lists
for each in test_runner.configs['ldap_import_DN']:
try:
list = test_runner.ldap_query(test_runner.configs["ldap_connection"],
test_runner.configs["ldap_username"],
test_runner.configs["ldap_password"],
each,
test_runner.configs["ldap_use_auth"])
print '\nLDAP user list from ' + each
for name in list:
print name
except:
error_log.append('Unable to get LDAP query, ' + each)
print 'Error on Group ' + each
raise
# try the ldap subgroups
for each in test_runner.configs['ldap_subgroups']:
try:
list = test_runner.ldap_query(test_runner.configs["ldap_connection"],
test_runner.configs["ldap_username"],
test_runner.configs["ldap_password"],
each,
test_runner.configs["ldap_use_auth"])
print '\nLDAP subgroup user list from ' + each
for name in list:
print name
except:
error_log.append('Unable to get LDAP subgroup query, ' + each)
print 'Error on subgroup ' + each
# last thing, print out error_log
print '\n>> Unit test complete'
if len(error_log) > 0:
print 'Errors during run:'
for error in error_log:
print '- ' + error
else:
print 'No Errors found'
| [
1,
515,
301,
29881,
481,
29918,
1792,
29918,
29885,
29887,
4378,
1053,
301,
29881,
481,
5215,
30004,
13,
30004,
13,
1688,
29918,
27492,
353,
301,
29881,
481,
5215,
26471,
13,
2704,
29918,
1188,
353,
5159,
30004,
13,
29873,
29918,
1792,
353,
525,
5441,
29918,
1688,
29918,
1792,
29915,
30004,
13,
1792,
29918,
11600,
353,
29871,
29900,
30004,
13,
30004,
13,
30004,
13,
29937,
3617,
1404,
1051,
515,
14293,
16037,
30004,
13,
2202,
29901,
30004,
13,
1678,
5835,
29918,
1761,
353,
1243,
29918,
27492,
29889,
1359,
29918,
9274,
15903,
29918,
7193,
26471,
13,
1678,
1596,
525,
20442,
16037,
4911,
2391,
29915,
30004,
13,
1678,
1596,
5835,
29918,
1761,
30004,
13,
19499,
29901,
30004,
13,
1678,
1059,
29918,
1188,
29889,
4397,
877,
16243,
1404,
1051,
14293,
16037,
1495,
30004,
13,
1678,
1596,
525,
2525,
519,
304,
679,
1404,
1051,
515,
14293,
16037,
29915,
30004,
13,
30004,
13,
29937,
1423,
377,
7454,
391,
30004,
13,
2158,
525,
1576,
4796,
1051,
29901,
525,
30004,
13,
1454,
1024,
297,
1243,
29918,
27492,
29889,
2917,
29879,
1839,
29939,
29879,
29918,
1332,
7454,
391,
2033,
29901,
30004,
13,
1678,
1596,
1024,
30004,
13,
30004,
13,
29937,
1423,
338,
29918,
6406,
30004,
13,
2202,
29901,
30004,
13,
1678,
565,
1243,
29918,
27492,
29889,
275,
29918,
6406,
877,
6406,
29374,
30004,
13,
4706,
1596,
18793,
6406,
29908,
338,
385,
4113,
29915,
30004,
13,
1678,
1683,
29901,
30004,
13,
4706,
1596,
877,
2392,
376,
6406,
29908,
338,
451,
385,
4113,
1495,
30004,
13,
4706,
1059,
29918,
1188,
29889,
4397,
877,
29908,
6406,
29908,
451,
7353,
3192,
408,
4113,
1495,
30004,
13,
19499,
29901,
30004,
13,
1678,
1059,
29918,
1188,
29889,
4397,
877,
2392,
373,
338,
29918,
6406,
1423,
411,
376,
6406,
29908,
1495,
30004,
13,
1678,
1596,
525,
2525,
519,
304,
12725,
376,
6406,
29908,
408,
385,
4113,
29915,
30004,
13,
30004,
13,
29937,
1653,
263,
716,
1404,
30004,
13,
2202,
29901,
30004,
13,
1678,
1243,
29918,
27492,
29889,
3258,
29918,
9274,
15903,
29918,
1792,
29898,
1792,
29918,
978,
29922,
29873,
29918,
1792,
11167,
13,
462,
462,
539,
4800,
2433,
29966,
25711,
17013,
29958,
23592,
13,
462,
462,
539,
4876,
2433,
29966,
26862,
6227,
29958,
1495,
30004,
13,
1678,
1404,
29918,
11600,
353,
29871,
29896,
30004,
13,
19499,
29901,
30004,
13,
1678,
1059,
29918,
1188,
29889,
4397,
877,
16243,
1404,
11265,
1495,
30004,
13,
1678,
1596,
525,
2525,
519,
304,
1653,
1404,
29915,
30004,
13,
30004,
13,
361,
1404,
29918,
11600,
1275,
29871,
29896,
29901,
30004,
13,
1678,
396,
12725,
338,
29918,
4925,
30004,
13,
1678,
1018,
29901,
30004,
13,
4706,
1423,
353,
1243,
29918,
27492,
29889,
275,
29918,
4925,
29898,
29873,
29918,
1792,
8443,
13,
4706,
565,
1423,
29901,
30004,
13,
9651,
1596,
525,
3057,
4911,
338,
6136,
29915,
30004,
13,
4706,
1683,
29901,
30004,
13,
9651,
1059,
29918,
1188,
29889,
4397,
877,
3057,
1404,
471,
451,
2825,
297,
385,
6136,
2106,
1495,
30004,
13,
1678,
5174,
29901,
30004,
13,
4706,
1059,
29918,
1188,
29889,
4397,
877,
2525,
519,
304,
1423,
6136,
4660,
1495,
30004,
13,
4706,
1596,
525,
2525,
519,
304,
1423,
6136,
4660,
29915,
30004,
13,
30004,
13,
1678,
396,
1423,
1207,
29918,
262,
4925,
669,
1207,
29918,
4925,
30004,
13,
1678,
1018,
29901,
30004,
13,
4706,
1243,
29918,
27492,
29889,
5675,
29918,
9274,
15903,
29918,
1792,
29918,
262,
4925,
29898,
29873,
29918,
1792,
8443,
13,
4706,
1018,
29901,
30004,
13,
9651,
1243,
29918,
27492,
29889,
5675,
29918,
9274,
15903,
29918,
1792,
29918,
4925,
29898,
29873,
29918,
1792,
8443,
13,
4706,
5174,
29901,
30004,
13,
9651,
1059,
29918,
1188,
29889,
4397,
877,
2525,
519,
304,
1207,
1404,
6136,
1495,
30004,
13,
9651,
1596,
525,
2392,
3907,
1404,
6136,
29915,
30004,
13,
1678,
5174,
1059,
29918,
1188,
29889,
4397,
877,
2525,
519,
304,
1207,
1404,
297,
4925,
29374,
30004,
13,
4706,
1596,
525,
2392,
3907,
1404,
297,
4925,
29915,
30004,
13,
30004,
13,
1678,
396,
3566,
304,
1404,
2318,
30004,
13,
1678,
1018,
29901,
30004,
13,
4706,
1243,
29918,
27492,
29889,
16645,
29918,
9274,
15903,
29918,
1792,
2972,
4197,
29873,
29918,
1792,
1402,
1243,
29918,
27492,
29889,
2917,
29879,
1839,
1482,
29918,
1792,
29918,
4381,
29918,
2972,
2033,
8443,
13,
1678,
5174,
29901,
30004,
13,
4706,
1059,
29918,
1188,
29889,
4397,
877,
2525,
519,
304,
3566,
1404,
304,
1404,
13155,
1495,
30004,
13,
4706,
1596,
525,
2392,
23188,
1404,
304,
263,
1404,
2972,
29915,
30004,
13,
30004,
13,
1678,
396,
3349,
1404,
515,
1404,
2972,
30004,
13,
1678,
1018,
29901,
30004,
13,
4706,
1243,
29918,
27492,
29889,
5992,
29918,
9274,
15903,
29918,
1792,
2972,
4197,
29873,
29918,
1792,
1402,
1243,
29918,
27492,
29889,
2917,
29879,
1839,
1482,
29918,
1792,
29918,
4381,
29918,
2972,
2033,
8443,
13,
1678,
5174,
29901,
30004,
13,
4706,
1059,
29918,
1188,
29889,
4397,
877,
2525,
519,
304,
3349,
1404,
515,
1404,
2972,
1495,
30004,
13,
4706,
1596,
525,
2392,
11077,
1404,
515,
1404,
2972,
29915,
30004,
13,
30004,
13,
1678,
1018,
29901,
30004,
13,
4706,
1243,
29918,
27492,
3032,
8143,
29918,
9274,
15903,
29918,
1792,
29898,
29873,
29918,
1792,
8443,
13,
1678,
5174,
29901,
30004,
13,
4706,
1059,
29918,
1188,
29889,
4397,
877,
2525,
519,
304,
5217,
278,
1243,
1404,
29901,
525,
718,
260,
29918,
1792,
8443,
13,
4706,
1596,
525,
2392,
21228,
278,
1243,
1404,
3633,
29915,
30004,
13,
1678,
396,
1095,
565,
1002,
358,
30004,
13,
30004,
13,
29937,
679,
1404,
4902,
515,
4113,
30004,
13,
2202,
29901,
30004,
13,
1678,
4902,
353,
1243,
29918,
27492,
29889,
657,
29918,
9274,
15903,
29918,
1792,
29918,
16432,
877,
6406,
1495,
30004,
13,
1678,
1596,
4902,
29889,
1170,
30004,
13,
19499,
29901,
30004,
13,
1678,
1059,
29918,
1188,
29889,
4397,
877,
2525,
519,
304,
679,
1404,
9493,
363,
4113,
1495,
30004,
13,
1678,
1596,
525,
2392,
679,
29918,
9274,
15903,
29918,
1792,
29918,
14144,
29915,
30004,
13,
30004,
13,
29937,
1018,
278,
301,
29881,
481,
1404,
8857,
30004,
13,
1454,
1269,
297,
1243,
29918,
27492,
29889,
2917,
29879,
1839,
430,
481,
29918,
5215,
29918,
28307,
2033,
29901,
30004,
13,
1678,
1018,
29901,
30004,
13,
4706,
1051,
353,
1243,
29918,
27492,
29889,
430,
481,
29918,
1972,
29898,
1688,
29918,
27492,
29889,
2917,
29879,
3366,
430,
481,
29918,
9965,
12436,
30004,
13,
462,
462,
418,
1243,
29918,
27492,
29889,
2917,
29879,
3366,
430,
481,
29918,
6786,
12436,
30004,
13,
462,
462,
418,
1243,
29918,
27492,
29889,
2917,
29879,
3366,
430,
481,
29918,
5630,
12436,
30004,
13,
462,
462,
418,
1269,
11167,
13,
462,
462,
418,
1243,
29918,
27492,
29889,
2917,
29879,
3366,
430,
481,
29918,
1509,
29918,
5150,
20068,
30004,
13,
30004,
13,
4706,
1596,
11297,
29876,
10249,
3301,
1404,
1051,
515,
525,
718,
1269,
30004,
13,
4706,
363,
1024,
297,
1051,
29901,
30004,
13,
9651,
1596,
1024,
30004,
13,
1678,
5174,
29901,
30004,
13,
4706,
1059,
29918,
1188,
29889,
4397,
877,
2525,
519,
304,
679,
365,
29928,
3301,
2346,
29892,
525,
718,
1269,
8443,
13,
4706,
1596,
525,
2392,
373,
6431,
525,
718,
1269,
30004,
13,
4706,
12020,
30004,
13,
30004,
13,
29937,
1018,
278,
301,
29881,
481,
1014,
13155,
30004,
13,
1454,
1269,
297,
1243,
29918,
27492,
29889,
2917,
29879,
1839,
430,
481,
29918,
1491,
13155,
2033,
29901,
30004,
13,
1678,
1018,
29901,
30004,
13,
4706,
1051,
353,
1243,
29918,
27492,
29889,
430,
481,
29918,
1972,
29898,
1688,
29918,
27492,
29889,
2917,
29879,
3366,
430,
481,
29918,
9965,
12436,
30004,
13,
462,
462,
418,
1243,
29918,
27492,
29889,
2917,
29879,
3366,
430,
481,
29918,
6786,
12436,
30004,
13,
462,
462,
418,
1243,
29918,
27492,
29889,
2917,
29879,
3366,
430,
481,
29918,
5630,
12436,
30004,
13,
462,
462,
418,
1269,
11167,
13,
462,
462,
418,
1243,
29918,
27492,
29889,
2917,
29879,
3366,
430,
481,
29918,
1509,
29918,
5150,
20068,
30004,
13,
4706,
1596,
11297,
29876,
10249,
3301,
24410,
1404,
1051,
515,
525,
718,
1269,
30004,
13,
4706,
363,
1024,
297,
1051,
29901,
30004,
13,
9651,
1596,
1024,
30004,
13,
1678,
5174,
29901,
30004,
13,
4706,
1059,
29918,
1188,
29889,
4397,
877,
2525,
519,
304,
679,
365,
29928,
3301,
24410,
2346,
29892,
525,
718,
1269,
8443,
13,
4706,
1596,
525,
2392,
373,
24410,
525,
718,
1269,
30004,
13,
30004,
13,
29937,
1833,
2655,
29892,
1596,
714,
1059,
29918,
1188,
30004,
13,
30004,
13,
2158,
11297,
29876,
6778,
13223,
1243,
4866,
29915,
30004,
13,
361,
7431,
29898,
2704,
29918,
1188,
29897,
1405,
29871,
29900,
29901,
30004,
13,
1678,
1596,
525,
22463,
2645,
1065,
11283,
30004,
13,
1678,
363,
1059,
297,
1059,
29918,
1188,
29901,
30004,
13,
4706,
1596,
17411,
525,
718,
1059,
30004,
13,
2870,
29901,
30004,
13,
1678,
1596,
525,
3782,
4829,
29879,
1476,
29915,
30004,
13,
2
] |
create_bq_table.py | timurk1234/bqstream | 0 | 133463 | #!/usr/bin/env python
import webapp2
from bqloader import BQLoader
class MainHandler(webapp2.RequestHandler):
def get(self):
bq_loader = BQLoader()
bq_loader.create_table()
self.response.write('ok')
app = webapp2.WSGIApplication([
('/tasks/create_bq_table', MainHandler)
], debug=True) | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
5215,
1856,
932,
29906,
13,
3166,
289,
29939,
12657,
1053,
350,
2239,
29877,
1664,
13,
13,
13,
1990,
4241,
4598,
29898,
2676,
932,
29906,
29889,
3089,
4598,
1125,
13,
1678,
822,
679,
29898,
1311,
1125,
13,
4706,
289,
29939,
29918,
12657,
353,
350,
2239,
29877,
1664,
580,
13,
4706,
289,
29939,
29918,
12657,
29889,
3258,
29918,
2371,
580,
13,
13,
4706,
1583,
29889,
5327,
29889,
3539,
877,
554,
1495,
13,
13,
13,
13,
13,
932,
353,
1856,
932,
29906,
29889,
7811,
29954,
29902,
4873,
4197,
13,
1678,
6702,
29914,
20673,
29914,
3258,
29918,
29890,
29939,
29918,
2371,
742,
4241,
4598,
29897,
13,
1402,
4744,
29922,
5574,
29897,
2
] |
deepchem/feat/molecule_featurizers/coulomb_matrices.py | deloragaskins/deepchem | 3,782 | 13183 | """
Generate coulomb matrices for molecules.
See Montavon et al., _New Journal of Physics_ __15__ (2013) 095003.
"""
import numpy as np
from typing import Any, List, Optional
from deepchem.utils.typing import RDKitMol
from deepchem.utils.data_utils import pad_array
from deepchem.feat.base_classes import MolecularFeaturizer
class CoulombMatrix(MolecularFeaturizer):
"""Calculate Coulomb matrices for molecules.
Coulomb matrices provide a representation of the electronic structure of
a molecule. For a molecule with `N` atoms, the Coulomb matrix is a
`N X N` matrix where each element gives the strength of the
electrostatic interaction between two atoms. The method is described
in more detail in [1]_.
Examples
--------
>>> import deepchem as dc
>>> featurizers = dc.feat.CoulombMatrix(max_atoms=23)
>>> input_file = 'deepchem/feat/tests/data/water.sdf' # really backed by water.sdf.csv
>>> tasks = ["atomization_energy"]
>>> loader = dc.data.SDFLoader(tasks, featurizer=featurizers)
>>> dataset = loader.create_dataset(input_file)
References
----------
.. [1] Montavon, Grégoire, et al. "Learning invariant representations of
molecules for atomization energy prediction." Advances in neural information
processing systems. 2012.
Note
----
This class requires RDKit to be installed.
"""
def __init__(self,
max_atoms: int,
remove_hydrogens: bool = False,
randomize: bool = False,
upper_tri: bool = False,
n_samples: int = 1,
seed: Optional[int] = None):
"""Initialize this featurizer.
Parameters
----------
max_atoms: int
The maximum number of atoms expected for molecules this featurizer will
process.
remove_hydrogens: bool, optional (default False)
If True, remove hydrogens before processing them.
randomize: bool, optional (default False)
If True, use method `randomize_coulomb_matrices` to randomize Coulomb matrices.
upper_tri: bool, optional (default False)
Generate only upper triangle part of Coulomb matrices.
n_samples: int, optional (default 1)
If `randomize` is set to True, the number of random samples to draw.
seed: int, optional (default None)
Random seed to use.
"""
self.max_atoms = int(max_atoms)
self.remove_hydrogens = remove_hydrogens
self.randomize = randomize
self.upper_tri = upper_tri
self.n_samples = n_samples
if seed is not None:
seed = int(seed)
self.seed = seed
def _featurize(self, datapoint: RDKitMol, **kwargs) -> np.ndarray:
"""
Calculate Coulomb matrices for molecules. If extra randomized
matrices are generated, they are treated as if they are features
for additional conformers.
Since Coulomb matrices are symmetric, only the (flattened) upper
triangular portion is returned.
Parameters
----------
datapoint: rdkit.Chem.rdchem.Mol
RDKit Mol object
Returns
-------
np.ndarray
The coulomb matrices of the given molecule.
The default shape is `(num_confs, max_atoms, max_atoms)`.
If num_confs == 1, the shape is `(max_atoms, max_atoms)`.
"""
if 'mol' in kwargs:
datapoint = kwargs.get("mol")
raise DeprecationWarning(
'Mol is being phased out as a parameter, please pass "datapoint" instead.'
)
features = self.coulomb_matrix(datapoint)
if self.upper_tri:
features = [f[np.triu_indices_from(f)] for f in features]
features = np.asarray(features)
if features.shape[0] == 1:
# `(1, max_atoms, max_atoms)` -> `(max_atoms, max_atoms)`
features = np.squeeze(features, axis=0)
return features
def coulomb_matrix(self, mol: RDKitMol) -> np.ndarray:
"""
Generate Coulomb matrices for each conformer of the given molecule.
Parameters
----------
mol: rdkit.Chem.rdchem.Mol
RDKit Mol object
Returns
-------
np.ndarray
The coulomb matrices of the given molecule
"""
try:
from rdkit import Chem
from rdkit.Chem import AllChem
except ModuleNotFoundError:
raise ImportError("This class requires RDKit to be installed.")
# Check whether num_confs >=1 or not
num_confs = len(mol.GetConformers())
if num_confs == 0:
mol = Chem.AddHs(mol)
AllChem.EmbedMolecule(mol, AllChem.ETKDG())
if self.remove_hydrogens:
mol = Chem.RemoveHs(mol)
n_atoms = mol.GetNumAtoms()
z = [atom.GetAtomicNum() for atom in mol.GetAtoms()]
rval = []
for conf in mol.GetConformers():
d = self.get_interatomic_distances(conf)
m = np.outer(z, z) / d
m[range(n_atoms), range(n_atoms)] = 0.5 * np.array(z)**2.4
if self.randomize:
for random_m in self.randomize_coulomb_matrix(m):
random_m = pad_array(random_m, self.max_atoms)
rval.append(random_m)
else:
m = pad_array(m, self.max_atoms)
rval.append(m)
return np.asarray(rval)
def randomize_coulomb_matrix(self, m: np.ndarray) -> List[np.ndarray]:
"""Randomize a Coulomb matrix as decribed in [1]_:
1. Compute row norms for M in a vector row_norms.
2. Sample a zero-mean unit-variance noise vector e with dimension
equal to row_norms.
3. Permute the rows and columns of M with the permutation that
sorts row_norms + e.
Parameters
----------
m: np.ndarray
Coulomb matrix.
Returns
-------
List[np.ndarray]
List of the random coulomb matrix
References
----------
.. [1] Montavon et al., New Journal of Physics, 15, (2013), 095003
"""
rval = []
row_norms = np.asarray([np.linalg.norm(row) for row in m], dtype=float)
rng = np.random.RandomState(self.seed)
for i in range(self.n_samples):
e = rng.normal(size=row_norms.size)
p = np.argsort(row_norms + e)
new = m[p][:, p] # permute rows first, then columns
rval.append(new)
return rval
@staticmethod
def get_interatomic_distances(conf: Any) -> np.ndarray:
"""
Get interatomic distances for atoms in a molecular conformer.
Parameters
----------
conf: rdkit.Chem.rdchem.Conformer
Molecule conformer.
Returns
-------
np.ndarray
The distances matrix for all atoms in a molecule
"""
n_atoms = conf.GetNumAtoms()
coords = [
# Convert AtomPositions from Angstrom to bohr (atomic units)
conf.GetAtomPosition(i).__idiv__(0.52917721092) for i in range(n_atoms)
]
d = np.zeros((n_atoms, n_atoms), dtype=float)
for i in range(n_atoms):
for j in range(i):
d[i, j] = coords[i].Distance(coords[j])
d[j, i] = d[i, j]
return d
class CoulombMatrixEig(CoulombMatrix):
"""Calculate the eigenvalues of Coulomb matrices for molecules.
This featurizer computes the eigenvalues of the Coulomb matrices for provided
molecules. Coulomb matrices are described in [1]_.
Examples
--------
>>> import deepchem as dc
>>> featurizers = dc.feat.CoulombMatrixEig(max_atoms=23)
>>> input_file = 'deepchem/feat/tests/data/water.sdf' # really backed by water.sdf.csv
>>> tasks = ["atomization_energy"]
>>> loader = dc.data.SDFLoader(tasks, featurizer=featurizers)
>>> dataset = loader.create_dataset(input_file)
References
----------
.. [1] Montavon, Grégoire, et al. "Learning invariant representations of
molecules for atomization energy prediction." Advances in neural information
processing systems. 2012.
"""
def __init__(self,
max_atoms: int,
remove_hydrogens: bool = False,
randomize: bool = False,
n_samples: int = 1,
seed: Optional[int] = None):
"""Initialize this featurizer.
Parameters
----------
max_atoms: int
The maximum number of atoms expected for molecules this featurizer will
process.
remove_hydrogens: bool, optional (default False)
If True, remove hydrogens before processing them.
randomize: bool, optional (default False)
If True, use method `randomize_coulomb_matrices` to randomize Coulomb matrices.
n_samples: int, optional (default 1)
If `randomize` is set to True, the number of random samples to draw.
seed: int, optional (default None)
Random seed to use.
"""
self.max_atoms = int(max_atoms)
self.remove_hydrogens = remove_hydrogens
self.randomize = randomize
self.n_samples = n_samples
if seed is not None:
seed = int(seed)
self.seed = seed
def _featurize(self, datapoint: RDKitMol, **kwargs) -> np.ndarray:
"""
Calculate eigenvalues of Coulomb matrix for molecules. Eigenvalues
are returned sorted by absolute value in descending order and padded
by max_atoms.
Parameters
----------
datapoint: rdkit.Chem.rdchem.Mol
RDKit Mol object
Returns
-------
np.ndarray
The eigenvalues of Coulomb matrix for molecules.
The default shape is `(num_confs, max_atoms)`.
If num_confs == 1, the shape is `(max_atoms,)`.
"""
if 'mol' in kwargs:
datapoint = kwargs.get("mol")
raise DeprecationWarning(
'Mol is being phased out as a parameter, please pass "datapoint" instead.'
)
cmat = self.coulomb_matrix(datapoint)
features_list = []
for f in cmat:
w, v = np.linalg.eig(f)
w_abs = np.abs(w)
sortidx = np.argsort(w_abs)
sortidx = sortidx[::-1]
w = w[sortidx]
f = pad_array(w, self.max_atoms)
features_list.append(f)
features = np.asarray(features_list)
if features.shape[0] == 1:
# `(1, max_atoms)` -> `(max_atoms,)`
features = np.squeeze(features, axis=0)
return features
| [
1,
9995,
13,
5631,
403,
3581,
29880,
3424,
13516,
363,
13206,
21337,
29889,
13,
13,
13393,
4526,
485,
265,
634,
394,
1696,
903,
4373,
8237,
310,
29837,
29918,
4770,
29896,
29945,
1649,
313,
29906,
29900,
29896,
29941,
29897,
29871,
29900,
29929,
29945,
29900,
29900,
29941,
29889,
13,
15945,
29908,
13,
5215,
12655,
408,
7442,
13,
3166,
19229,
1053,
3139,
29892,
2391,
29892,
28379,
13,
13,
3166,
6483,
14969,
29889,
13239,
29889,
1017,
15702,
1053,
390,
29928,
13117,
29924,
324,
13,
3166,
6483,
14969,
29889,
13239,
29889,
1272,
29918,
13239,
1053,
17132,
29918,
2378,
13,
3166,
6483,
14969,
29889,
1725,
271,
29889,
3188,
29918,
13203,
1053,
341,
1772,
16637,
8263,
1337,
3950,
13,
13,
13,
1990,
315,
5059,
3424,
14609,
29898,
29924,
1772,
16637,
8263,
1337,
3950,
1125,
13,
29871,
9995,
27065,
403,
315,
5059,
3424,
13516,
363,
13206,
21337,
29889,
13,
13,
29871,
315,
5059,
3424,
13516,
3867,
263,
8954,
310,
278,
27758,
3829,
310,
13,
29871,
263,
13206,
29883,
1297,
29889,
1152,
263,
13206,
29883,
1297,
411,
421,
29940,
29952,
28422,
29892,
278,
315,
5059,
3424,
4636,
338,
263,
13,
29871,
421,
29940,
1060,
405,
29952,
4636,
988,
1269,
1543,
4076,
278,
9324,
310,
278,
13,
29871,
28118,
7959,
14881,
1546,
1023,
28422,
29889,
450,
1158,
338,
5439,
13,
29871,
297,
901,
9493,
297,
518,
29896,
29962,
5396,
13,
13,
29871,
1222,
9422,
13,
29871,
448,
26589,
13,
29871,
8653,
1053,
6483,
14969,
408,
270,
29883,
13,
29871,
8653,
1238,
1337,
19427,
353,
270,
29883,
29889,
1725,
271,
29889,
29907,
5059,
3424,
14609,
29898,
3317,
29918,
271,
4835,
29922,
29906,
29941,
29897,
13,
29871,
8653,
1881,
29918,
1445,
353,
525,
24535,
14969,
29914,
1725,
271,
29914,
21150,
29914,
1272,
29914,
13405,
29889,
29879,
2176,
29915,
396,
2289,
1250,
287,
491,
4094,
29889,
29879,
2176,
29889,
7638,
13,
29871,
8653,
9595,
353,
6796,
8678,
2133,
29918,
27548,
3108,
13,
29871,
8653,
23466,
353,
270,
29883,
29889,
1272,
29889,
29903,
4037,
10036,
29898,
20673,
29892,
1238,
1337,
3950,
29922,
1725,
1337,
19427,
29897,
13,
29871,
8653,
8783,
353,
23466,
29889,
3258,
29918,
24713,
29898,
2080,
29918,
1445,
29897,
13,
13,
29871,
28318,
13,
29871,
448,
1378,
29899,
13,
29871,
6317,
518,
29896,
29962,
4526,
485,
265,
29892,
1632,
29948,
1484,
533,
29892,
634,
394,
29889,
376,
29931,
799,
1076,
22619,
22540,
310,
13,
268,
13206,
21337,
363,
12301,
2133,
5864,
18988,
1213,
25215,
2925,
297,
19677,
2472,
13,
268,
9068,
6757,
29889,
29871,
29906,
29900,
29896,
29906,
29889,
13,
13,
29871,
3940,
13,
29871,
23250,
13,
29871,
910,
770,
6858,
390,
29928,
13117,
304,
367,
5130,
29889,
13,
29871,
9995,
13,
13,
29871,
822,
4770,
2344,
12035,
1311,
29892,
13,
1669,
4236,
29918,
271,
4835,
29901,
938,
29892,
13,
1669,
3349,
29918,
29882,
2941,
9102,
575,
29901,
6120,
353,
7700,
29892,
13,
1669,
4036,
675,
29901,
6120,
353,
7700,
29892,
13,
1669,
7568,
29918,
3626,
29901,
6120,
353,
7700,
29892,
13,
1669,
302,
29918,
27736,
29901,
938,
353,
29871,
29896,
29892,
13,
1669,
16717,
29901,
28379,
29961,
524,
29962,
353,
6213,
1125,
13,
1678,
9995,
6644,
6646,
445,
1238,
1337,
3950,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
4236,
29918,
271,
4835,
29901,
938,
13,
418,
450,
7472,
1353,
310,
28422,
3806,
363,
13206,
21337,
445,
1238,
1337,
3950,
674,
13,
418,
1889,
29889,
13,
1678,
3349,
29918,
29882,
2941,
9102,
575,
29901,
6120,
29892,
13136,
313,
4381,
7700,
29897,
13,
418,
960,
5852,
29892,
3349,
27246,
9102,
575,
1434,
9068,
963,
29889,
13,
1678,
4036,
675,
29901,
6120,
29892,
13136,
313,
4381,
7700,
29897,
13,
418,
960,
5852,
29892,
671,
1158,
421,
8172,
675,
29918,
29883,
5059,
3424,
29918,
2922,
11669,
29952,
304,
4036,
675,
315,
5059,
3424,
13516,
29889,
13,
1678,
7568,
29918,
3626,
29901,
6120,
29892,
13136,
313,
4381,
7700,
29897,
13,
418,
3251,
403,
871,
7568,
17205,
760,
310,
315,
5059,
3424,
13516,
29889,
13,
1678,
302,
29918,
27736,
29901,
938,
29892,
13136,
313,
4381,
29871,
29896,
29897,
13,
418,
960,
421,
8172,
675,
29952,
338,
731,
304,
5852,
29892,
278,
1353,
310,
4036,
11916,
304,
4216,
29889,
13,
1678,
16717,
29901,
938,
29892,
13136,
313,
4381,
6213,
29897,
13,
418,
16968,
16717,
304,
671,
29889,
13,
1678,
9995,
13,
1678,
1583,
29889,
3317,
29918,
271,
4835,
353,
938,
29898,
3317,
29918,
271,
4835,
29897,
13,
1678,
1583,
29889,
5992,
29918,
29882,
2941,
9102,
575,
353,
3349,
29918,
29882,
2941,
9102,
575,
13,
1678,
1583,
29889,
8172,
675,
353,
4036,
675,
13,
1678,
1583,
29889,
21064,
29918,
3626,
353,
7568,
29918,
3626,
13,
1678,
1583,
29889,
29876,
29918,
27736,
353,
302,
29918,
27736,
13,
1678,
565,
16717,
338,
451,
6213,
29901,
13,
418,
16717,
353,
938,
29898,
26776,
29897,
13,
1678,
1583,
29889,
26776,
353,
16717,
13,
13,
29871,
822,
903,
1725,
1337,
675,
29898,
1311,
29892,
1418,
481,
2461,
29901,
390,
29928,
13117,
29924,
324,
29892,
3579,
19290,
29897,
1599,
7442,
29889,
299,
2378,
29901,
13,
1678,
9995,
13,
1678,
20535,
403,
315,
5059,
3424,
13516,
363,
13206,
21337,
29889,
960,
4805,
4036,
1891,
13,
1678,
13516,
526,
5759,
29892,
896,
526,
14914,
408,
565,
896,
526,
5680,
13,
1678,
363,
5684,
14670,
414,
29889,
13,
13,
1678,
4001,
315,
5059,
3424,
13516,
526,
18348,
29892,
871,
278,
313,
1579,
8606,
287,
29897,
7568,
13,
1678,
3367,
6825,
11910,
338,
4133,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
1418,
481,
2461,
29901,
364,
29881,
7354,
29889,
1451,
331,
29889,
5499,
14969,
29889,
29924,
324,
13,
418,
390,
29928,
13117,
10750,
1203,
13,
13,
1678,
16969,
13,
1678,
448,
22158,
13,
1678,
7442,
29889,
299,
2378,
13,
418,
450,
3581,
29880,
3424,
13516,
310,
278,
2183,
13206,
29883,
1297,
29889,
13,
418,
450,
2322,
8267,
338,
12270,
1949,
29918,
5527,
29879,
29892,
4236,
29918,
271,
4835,
29892,
4236,
29918,
271,
4835,
14466,
13,
418,
960,
954,
29918,
5527,
29879,
1275,
29871,
29896,
29892,
278,
8267,
338,
12270,
3317,
29918,
271,
4835,
29892,
4236,
29918,
271,
4835,
14466,
13,
1678,
9995,
13,
1678,
565,
525,
29885,
324,
29915,
297,
9049,
5085,
29901,
13,
418,
1418,
481,
2461,
353,
9049,
5085,
29889,
657,
703,
29885,
324,
1159,
13,
418,
12020,
897,
1457,
9252,
22709,
29898,
13,
3986,
525,
29924,
324,
338,
1641,
1374,
1463,
714,
408,
263,
3443,
29892,
3113,
1209,
376,
4130,
481,
2461,
29908,
2012,
6169,
13,
418,
1723,
13,
13,
1678,
5680,
353,
1583,
29889,
29883,
5059,
3424,
29918,
5344,
29898,
4130,
481,
2461,
29897,
13,
1678,
565,
1583,
29889,
21064,
29918,
3626,
29901,
13,
418,
5680,
353,
518,
29888,
29961,
9302,
29889,
3626,
29884,
29918,
513,
1575,
29918,
3166,
29898,
29888,
4638,
363,
285,
297,
5680,
29962,
13,
1678,
5680,
353,
7442,
29889,
294,
2378,
29898,
22100,
29897,
13,
1678,
565,
5680,
29889,
12181,
29961,
29900,
29962,
1275,
29871,
29896,
29901,
13,
418,
396,
12270,
29896,
29892,
4236,
29918,
271,
4835,
29892,
4236,
29918,
271,
4835,
3569,
1599,
12270,
3317,
29918,
271,
4835,
29892,
4236,
29918,
271,
4835,
3569,
13,
418,
5680,
353,
7442,
29889,
29879,
802,
29872,
911,
29898,
22100,
29892,
9685,
29922,
29900,
29897,
13,
1678,
736,
5680,
13,
13,
29871,
822,
3581,
29880,
3424,
29918,
5344,
29898,
1311,
29892,
6062,
29901,
390,
29928,
13117,
29924,
324,
29897,
1599,
7442,
29889,
299,
2378,
29901,
13,
1678,
9995,
13,
1678,
3251,
403,
315,
5059,
3424,
13516,
363,
1269,
14670,
261,
310,
278,
2183,
13206,
29883,
1297,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
6062,
29901,
364,
29881,
7354,
29889,
1451,
331,
29889,
5499,
14969,
29889,
29924,
324,
13,
418,
390,
29928,
13117,
10750,
1203,
13,
13,
1678,
16969,
13,
1678,
448,
22158,
13,
1678,
7442,
29889,
299,
2378,
13,
418,
450,
3581,
29880,
3424,
13516,
310,
278,
2183,
13206,
29883,
1297,
13,
1678,
9995,
13,
1678,
1018,
29901,
13,
418,
515,
364,
29881,
7354,
1053,
12677,
13,
418,
515,
364,
29881,
7354,
29889,
1451,
331,
1053,
2178,
1451,
331,
13,
1678,
5174,
15591,
17413,
2392,
29901,
13,
418,
12020,
16032,
2392,
703,
4013,
770,
6858,
390,
29928,
13117,
304,
367,
5130,
23157,
13,
13,
1678,
396,
5399,
3692,
954,
29918,
5527,
29879,
6736,
29896,
470,
451,
13,
1678,
954,
29918,
5527,
29879,
353,
7431,
29898,
29885,
324,
29889,
2577,
1168,
689,
414,
3101,
13,
1678,
565,
954,
29918,
5527,
29879,
1275,
29871,
29900,
29901,
13,
418,
6062,
353,
12677,
29889,
2528,
29950,
29879,
29898,
29885,
324,
29897,
13,
418,
2178,
1451,
331,
29889,
6026,
2580,
29924,
1772,
29883,
1297,
29898,
29885,
324,
29892,
2178,
1451,
331,
29889,
2544,
29968,
29928,
29954,
3101,
13,
13,
1678,
565,
1583,
29889,
5992,
29918,
29882,
2941,
9102,
575,
29901,
13,
418,
6062,
353,
12677,
29889,
15941,
29950,
29879,
29898,
29885,
324,
29897,
13,
1678,
302,
29918,
271,
4835,
353,
6062,
29889,
2577,
8009,
4178,
4835,
580,
13,
1678,
503,
353,
518,
8678,
29889,
2577,
4178,
25426,
8009,
580,
363,
12301,
297,
6062,
29889,
2577,
4178,
4835,
580,
29962,
13,
1678,
364,
791,
353,
5159,
13,
1678,
363,
1970,
297,
6062,
29889,
2577,
1168,
689,
414,
7295,
13,
418,
270,
353,
1583,
29889,
657,
29918,
1639,
21641,
29918,
5721,
2925,
29898,
5527,
29897,
13,
418,
286,
353,
7442,
29889,
5561,
29898,
29920,
29892,
503,
29897,
847,
270,
13,
418,
286,
29961,
3881,
29898,
29876,
29918,
271,
4835,
511,
3464,
29898,
29876,
29918,
271,
4835,
4638,
353,
29871,
29900,
29889,
29945,
334,
7442,
29889,
2378,
29898,
29920,
29897,
1068,
29906,
29889,
29946,
13,
418,
565,
1583,
29889,
8172,
675,
29901,
13,
4706,
363,
4036,
29918,
29885,
297,
1583,
29889,
8172,
675,
29918,
29883,
5059,
3424,
29918,
5344,
29898,
29885,
1125,
13,
3986,
4036,
29918,
29885,
353,
17132,
29918,
2378,
29898,
8172,
29918,
29885,
29892,
1583,
29889,
3317,
29918,
271,
4835,
29897,
13,
3986,
364,
791,
29889,
4397,
29898,
8172,
29918,
29885,
29897,
13,
418,
1683,
29901,
13,
4706,
286,
353,
17132,
29918,
2378,
29898,
29885,
29892,
1583,
29889,
3317,
29918,
271,
4835,
29897,
13,
4706,
364,
791,
29889,
4397,
29898,
29885,
29897,
13,
1678,
736,
7442,
29889,
294,
2378,
29898,
29878,
791,
29897,
13,
13,
29871,
822,
4036,
675,
29918,
29883,
5059,
3424,
29918,
5344,
29898,
1311,
29892,
286,
29901,
7442,
29889,
299,
2378,
29897,
1599,
2391,
29961,
9302,
29889,
299,
2378,
5387,
13,
1678,
9995,
17875,
675,
263,
315,
5059,
3424,
4636,
408,
316,
23059,
297,
518,
29896,
21540,
29901,
13,
13,
268,
29896,
29889,
11796,
29872,
1948,
6056,
29879,
363,
341,
297,
263,
4608,
1948,
29918,
12324,
29879,
29889,
13,
268,
29906,
29889,
21029,
263,
5225,
29899,
12676,
5190,
29899,
1707,
8837,
11462,
4608,
321,
411,
9927,
13,
539,
5186,
304,
1948,
29918,
12324,
29879,
29889,
13,
268,
29941,
29889,
20894,
1082,
278,
4206,
322,
4341,
310,
341,
411,
278,
20005,
362,
393,
13,
539,
23551,
1948,
29918,
12324,
29879,
718,
321,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
286,
29901,
7442,
29889,
299,
2378,
13,
418,
315,
5059,
3424,
4636,
29889,
13,
13,
1678,
16969,
13,
1678,
448,
22158,
13,
1678,
2391,
29961,
9302,
29889,
299,
2378,
29962,
13,
418,
2391,
310,
278,
4036,
3581,
29880,
3424,
4636,
13,
13,
1678,
28318,
13,
1678,
448,
1378,
29899,
13,
1678,
6317,
518,
29896,
29962,
4526,
485,
265,
634,
394,
1696,
1570,
8237,
310,
29837,
29892,
29871,
29896,
29945,
29892,
313,
29906,
29900,
29896,
29941,
511,
29871,
29900,
29929,
29945,
29900,
29900,
29941,
13,
1678,
9995,
13,
1678,
364,
791,
353,
5159,
13,
1678,
1948,
29918,
12324,
29879,
353,
7442,
29889,
294,
2378,
4197,
9302,
29889,
29880,
979,
29887,
29889,
12324,
29898,
798,
29897,
363,
1948,
297,
286,
1402,
26688,
29922,
7411,
29897,
13,
1678,
364,
865,
353,
7442,
29889,
8172,
29889,
17875,
2792,
29898,
1311,
29889,
26776,
29897,
13,
1678,
363,
474,
297,
3464,
29898,
1311,
29889,
29876,
29918,
27736,
1125,
13,
418,
321,
353,
364,
865,
29889,
8945,
29898,
2311,
29922,
798,
29918,
12324,
29879,
29889,
2311,
29897,
13,
418,
282,
353,
7442,
29889,
5085,
441,
29898,
798,
29918,
12324,
29879,
718,
321,
29897,
13,
418,
716,
353,
286,
29961,
29886,
3816,
29901,
29892,
282,
29962,
29871,
396,
3635,
1082,
4206,
937,
29892,
769,
4341,
13,
418,
364,
791,
29889,
4397,
29898,
1482,
29897,
13,
1678,
736,
364,
791,
13,
13,
29871,
732,
7959,
5696,
13,
29871,
822,
679,
29918,
1639,
21641,
29918,
5721,
2925,
29898,
5527,
29901,
3139,
29897,
1599,
7442,
29889,
299,
2378,
29901,
13,
1678,
9995,
13,
1678,
3617,
1006,
21641,
24610,
363,
28422,
297,
263,
13206,
16637,
14670,
261,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
1970,
29901,
364,
29881,
7354,
29889,
1451,
331,
29889,
5499,
14969,
29889,
1168,
24784,
13,
418,
341,
1772,
29883,
1297,
14670,
261,
29889,
13,
13,
1678,
16969,
13,
1678,
448,
22158,
13,
1678,
7442,
29889,
299,
2378,
13,
418,
450,
24610,
4636,
363,
599,
28422,
297,
263,
13206,
29883,
1297,
13,
1678,
9995,
13,
1678,
302,
29918,
271,
4835,
353,
1970,
29889,
2577,
8009,
4178,
4835,
580,
13,
1678,
1302,
4339,
353,
518,
13,
4706,
396,
14806,
2180,
290,
9135,
2187,
515,
3218,
303,
456,
304,
1045,
1092,
313,
21641,
10340,
29897,
13,
4706,
1970,
29889,
2577,
4178,
290,
8003,
29898,
29875,
467,
1649,
333,
440,
12035,
29900,
29889,
29945,
29906,
29929,
29896,
29955,
29955,
29906,
29896,
29900,
29929,
29906,
29897,
363,
474,
297,
3464,
29898,
29876,
29918,
271,
4835,
29897,
13,
1678,
4514,
13,
1678,
270,
353,
7442,
29889,
3298,
359,
3552,
29876,
29918,
271,
4835,
29892,
302,
29918,
271,
4835,
511,
26688,
29922,
7411,
29897,
13,
1678,
363,
474,
297,
3464,
29898,
29876,
29918,
271,
4835,
1125,
13,
418,
363,
432,
297,
3464,
29898,
29875,
1125,
13,
4706,
270,
29961,
29875,
29892,
432,
29962,
353,
1302,
4339,
29961,
29875,
1822,
27469,
29898,
1111,
4339,
29961,
29926,
2314,
13,
4706,
270,
29961,
29926,
29892,
474,
29962,
353,
270,
29961,
29875,
29892,
432,
29962,
13,
1678,
736,
270,
13,
13,
13,
1990,
315,
5059,
3424,
14609,
29923,
335,
29898,
29907,
5059,
3424,
14609,
1125,
13,
29871,
9995,
27065,
403,
278,
25973,
310,
315,
5059,
3424,
13516,
363,
13206,
21337,
29889,
13,
13,
29871,
910,
1238,
1337,
3950,
2912,
267,
278,
25973,
310,
278,
315,
5059,
3424,
13516,
363,
4944,
13,
29871,
13206,
21337,
29889,
315,
5059,
3424,
13516,
526,
5439,
297,
518,
29896,
29962,
5396,
13,
13,
29871,
1222,
9422,
13,
29871,
448,
26589,
13,
29871,
8653,
1053,
6483,
14969,
408,
270,
29883,
13,
29871,
8653,
1238,
1337,
19427,
353,
270,
29883,
29889,
1725,
271,
29889,
29907,
5059,
3424,
14609,
29923,
335,
29898,
3317,
29918,
271,
4835,
29922,
29906,
29941,
29897,
13,
29871,
8653,
1881,
29918,
1445,
353,
525,
24535,
14969,
29914,
1725,
271,
29914,
21150,
29914,
1272,
29914,
13405,
29889,
29879,
2176,
29915,
396,
2289,
1250,
287,
491,
4094,
29889,
29879,
2176,
29889,
7638,
13,
29871,
8653,
9595,
353,
6796,
8678,
2133,
29918,
27548,
3108,
13,
29871,
8653,
23466,
353,
270,
29883,
29889,
1272,
29889,
29903,
4037,
10036,
29898,
20673,
29892,
1238,
1337,
3950,
29922,
1725,
1337,
19427,
29897,
13,
29871,
8653,
8783,
353,
23466,
29889,
3258,
29918,
24713,
29898,
2080,
29918,
1445,
29897,
13,
13,
29871,
28318,
13,
29871,
448,
1378,
29899,
13,
29871,
6317,
518,
29896,
29962,
4526,
485,
265,
29892,
1632,
29948,
1484,
533,
29892,
634,
394,
29889,
376,
29931,
799,
1076,
22619,
22540,
310,
13,
268,
13206,
21337,
363,
12301,
2133,
5864,
18988,
1213,
25215,
2925,
297,
19677,
2472,
13,
268,
9068,
6757,
29889,
29871,
29906,
29900,
29896,
29906,
29889,
13,
29871,
9995,
13,
13,
29871,
822,
4770,
2344,
12035,
1311,
29892,
13,
1669,
4236,
29918,
271,
4835,
29901,
938,
29892,
13,
1669,
3349,
29918,
29882,
2941,
9102,
575,
29901,
6120,
353,
7700,
29892,
13,
1669,
4036,
675,
29901,
6120,
353,
7700,
29892,
13,
1669,
302,
29918,
27736,
29901,
938,
353,
29871,
29896,
29892,
13,
1669,
16717,
29901,
28379,
29961,
524,
29962,
353,
6213,
1125,
13,
1678,
9995,
6644,
6646,
445,
1238,
1337,
3950,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
4236,
29918,
271,
4835,
29901,
938,
13,
418,
450,
7472,
1353,
310,
28422,
3806,
363,
13206,
21337,
445,
1238,
1337,
3950,
674,
13,
418,
1889,
29889,
13,
1678,
3349,
29918,
29882,
2941,
9102,
575,
29901,
6120,
29892,
13136,
313,
4381,
7700,
29897,
13,
418,
960,
5852,
29892,
3349,
27246,
9102,
575,
1434,
9068,
963,
29889,
13,
1678,
4036,
675,
29901,
6120,
29892,
13136,
313,
4381,
7700,
29897,
13,
418,
960,
5852,
29892,
671,
1158,
421,
8172,
675,
29918,
29883,
5059,
3424,
29918,
2922,
11669,
29952,
304,
4036,
675,
315,
5059,
3424,
13516,
29889,
13,
1678,
302,
29918,
27736,
29901,
938,
29892,
13136,
313,
4381,
29871,
29896,
29897,
13,
418,
960,
421,
8172,
675,
29952,
338,
731,
304,
5852,
29892,
278,
1353,
310,
4036,
11916,
304,
4216,
29889,
13,
1678,
16717,
29901,
938,
29892,
13136,
313,
4381,
6213,
29897,
13,
418,
16968,
16717,
304,
671,
29889,
13,
1678,
9995,
13,
1678,
1583,
29889,
3317,
29918,
271,
4835,
353,
938,
29898,
3317,
29918,
271,
4835,
29897,
13,
1678,
1583,
29889,
5992,
29918,
29882,
2941,
9102,
575,
353,
3349,
29918,
29882,
2941,
9102,
575,
13,
1678,
1583,
29889,
8172,
675,
353,
4036,
675,
13,
1678,
1583,
29889,
29876,
29918,
27736,
353,
302,
29918,
27736,
13,
1678,
565,
16717,
338,
451,
6213,
29901,
13,
418,
16717,
353,
938,
29898,
26776,
29897,
13,
1678,
1583,
29889,
26776,
353,
16717,
13,
13,
29871,
822,
903,
1725,
1337,
675,
29898,
1311,
29892,
1418,
481,
2461,
29901,
390,
29928,
13117,
29924,
324,
29892,
3579,
19290,
29897,
1599,
7442,
29889,
299,
2378,
29901,
13,
1678,
9995,
13,
1678,
20535,
403,
25973,
310,
315,
5059,
3424,
4636,
363,
13206,
21337,
29889,
382,
2101,
5975,
13,
1678,
526,
4133,
12705,
491,
8380,
995,
297,
5153,
2548,
1797,
322,
282,
23959,
13,
1678,
491,
4236,
29918,
271,
4835,
29889,
13,
13,
1678,
12662,
2699,
13,
1678,
448,
1378,
29899,
13,
1678,
1418,
481,
2461,
29901,
364,
29881,
7354,
29889,
1451,
331,
29889,
5499,
14969,
29889,
29924,
324,
13,
418,
390,
29928,
13117,
10750,
1203,
13,
13,
1678,
16969,
13,
1678,
448,
22158,
13,
1678,
7442,
29889,
299,
2378,
13,
418,
450,
25973,
310,
315,
5059,
3424,
4636,
363,
13206,
21337,
29889,
13,
418,
450,
2322,
8267,
338,
12270,
1949,
29918,
5527,
29879,
29892,
4236,
29918,
271,
4835,
14466,
13,
418,
960,
954,
29918,
5527,
29879,
1275,
29871,
29896,
29892,
278,
8267,
338,
12270,
3317,
29918,
271,
4835,
29892,
14466,
13,
1678,
9995,
13,
1678,
565,
525,
29885,
324,
29915,
297,
9049,
5085,
29901,
13,
418,
1418,
481,
2461,
353,
9049,
5085,
29889,
657,
703,
29885,
324,
1159,
13,
418,
12020,
897,
1457,
9252,
22709,
29898,
13,
3986,
525,
29924,
324,
338,
1641,
1374,
1463,
714,
408,
263,
3443,
29892,
3113,
1209,
376,
4130,
481,
2461,
29908,
2012,
6169,
13,
418,
1723,
13,
13,
1678,
274,
2922,
353,
1583,
29889,
29883,
5059,
3424,
29918,
5344,
29898,
4130,
481,
2461,
29897,
13,
1678,
5680,
29918,
1761,
353,
5159,
13,
1678,
363,
285,
297,
274,
2922,
29901,
13,
418,
281,
29892,
325,
353,
7442,
29889,
29880,
979,
29887,
29889,
29872,
335,
29898,
29888,
29897,
13,
418,
281,
29918,
6897,
353,
7442,
29889,
6897,
29898,
29893,
29897,
13,
418,
2656,
13140,
353,
7442,
29889,
5085,
441,
29898,
29893,
29918,
6897,
29897,
13,
418,
2656,
13140,
353,
2656,
13140,
29961,
1057,
29899,
29896,
29962,
13,
418,
281,
353,
281,
29961,
6605,
13140,
29962,
13,
418,
285,
353,
17132,
29918,
2378,
29898,
29893,
29892,
1583,
29889,
3317,
29918,
271,
4835,
29897,
13,
418,
5680,
29918,
1761,
29889,
4397,
29898,
29888,
29897,
13,
1678,
5680,
353,
7442,
29889,
294,
2378,
29898,
22100,
29918,
1761,
29897,
13,
1678,
565,
5680,
29889,
12181,
29961,
29900,
29962,
1275,
29871,
29896,
29901,
13,
418,
396,
12270,
29896,
29892,
4236,
29918,
271,
4835,
3569,
1599,
12270,
3317,
29918,
271,
4835,
29892,
3569,
13,
418,
5680,
353,
7442,
29889,
29879,
802,
29872,
911,
29898,
22100,
29892,
9685,
29922,
29900,
29897,
13,
1678,
736,
5680,
13,
2
] |
multiuploader/management/commands/clean_uploads.py | SharmaVinayKumar/django-multiuploader | 5 | 32904 | from __future__ import print_function, unicode_literals
import os
from datetime import timedelta
import multiuploader.default_settings as DEFAULTS
from django.conf import settings
from django.core.management.base import BaseCommand
from django.utils.timezone import now
from multiuploader.models import MultiuploaderFile
class Command(BaseCommand):
help = 'Clean all temporary attachments loaded to MultiuploaderFile model'
def handle(self, *args, **options):
expiration_time = getattr(settings, "MULTIUPLOADER_FILE_EXPIRATION_TIME",
DEFAULTS.MULTIUPLOADER_FILE_EXPIRATION_TIME)
time_threshold = now() - timedelta(seconds=expiration_time)
for attach in MultiuploaderFile.objects.filter(upload_date__lt=time_threshold):
try:
os.remove(attach.file.path)
except Exception as ex:
print(ex)
MultiuploaderFile.objects.filter(upload_date__lt=time_threshold).delete()
print("Cleaning temporary upload files complete")
| [
1,
515,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
29892,
29104,
29918,
20889,
1338,
13,
13,
5215,
2897,
13,
3166,
12865,
1053,
5335,
287,
2554,
13,
13,
5215,
2473,
9009,
261,
29889,
4381,
29918,
11027,
408,
22236,
29903,
13,
3166,
9557,
29889,
5527,
1053,
6055,
13,
3166,
9557,
29889,
3221,
29889,
21895,
29889,
3188,
1053,
7399,
6255,
13,
3166,
9557,
29889,
13239,
29889,
2230,
8028,
1053,
1286,
13,
3166,
2473,
9009,
261,
29889,
9794,
1053,
14974,
9009,
261,
2283,
13,
13,
13,
1990,
10516,
29898,
5160,
6255,
1125,
13,
1678,
1371,
353,
525,
29907,
14044,
599,
13201,
10641,
1860,
7500,
304,
14974,
9009,
261,
2283,
1904,
29915,
13,
13,
1678,
822,
4386,
29898,
1311,
29892,
334,
5085,
29892,
3579,
6768,
1125,
13,
4706,
1518,
12232,
29918,
2230,
353,
679,
5552,
29898,
11027,
29892,
376,
29924,
8647,
29902,
4897,
29428,
1001,
29918,
7724,
29918,
5746,
2227,
29934,
8098,
29918,
15307,
613,
13,
462,
462,
29871,
22236,
29903,
29889,
29924,
8647,
29902,
4897,
29428,
1001,
29918,
7724,
29918,
5746,
2227,
29934,
8098,
29918,
15307,
29897,
13,
4706,
931,
29918,
386,
12268,
353,
1286,
580,
448,
5335,
287,
2554,
29898,
23128,
29922,
4548,
12232,
29918,
2230,
29897,
13,
13,
4706,
363,
10641,
297,
14974,
9009,
261,
2283,
29889,
12650,
29889,
4572,
29898,
9009,
29918,
1256,
1649,
1896,
29922,
2230,
29918,
386,
12268,
1125,
13,
9651,
1018,
29901,
13,
18884,
2897,
29889,
5992,
29898,
14930,
29889,
1445,
29889,
2084,
29897,
13,
9651,
5174,
8960,
408,
429,
29901,
13,
18884,
1596,
29898,
735,
29897,
13,
13,
4706,
14974,
9009,
261,
2283,
29889,
12650,
29889,
4572,
29898,
9009,
29918,
1256,
1649,
1896,
29922,
2230,
29918,
386,
12268,
467,
8143,
580,
13,
13,
4706,
1596,
703,
29907,
14044,
292,
13201,
6441,
2066,
4866,
1159,
13,
2
] |
Python/ConkyServerStatus/conkyserverstatus.py | abergman/API | 12 | 168107 | <filename>Python/ConkyServerStatus/conkyserverstatus.py<gh_stars>10-100
#!/usr/bin/python
# -*- coding: utf-8 -*-
# coding: UTF-8
import json, codecs, os, sys, datetime
import xml.etree.ElementTree as ET
import httplib2
import ConfigParser
config = ConfigParser.ConfigParser()
config.readfp(open('glesys.conf'))
__APIKEY__ = config.get('ConkyServerStatus', 'apikey')
__APIUSER__ = config.get('ConkyServerStatus', 'apiuser')
__APISERVER__ = config.get('ConkyServerStatus', 'apiserver')
__APIURL__ = config.get('ConkyServerStatus', 'apiurl')
#print __APIKEY__, __APISERVER__, __APIUSER__
#print __APIURL__
# For some reason ssl_certification is failing at the moment..
try:
h = httplib2.Http(disable_ssl_certificate_validation=True)
h.add_credentials(__APIUSER__, __APIKEY__)
resp, content = h.request(__APIURL__+"/serverid/"+__APISERVER__)
except:
print "No connection"
exit
# Bugfix for conky exec, python does not know which encoding to use and
# will wrongly default to ascii
sys.stdout = codecs.getwriter('utf-8')(sys.stdout)
def printMetric(metricNode, metricName):
usage = float(metricNode.find("usage").text)
max = float(metricNode.find("max").text)
print metricName+": $alignr", usage, " / ", max, metricNode.find("unit").text[0:2]
print "${execbar echo \""+ str(usage * 100 / max) + "\"}"
tree = ET.fromstring(content)
for server in tree.findall("server"):
print "Server name: $alignr", __APISERVER__
print "State: $alignr", server.find("state").text
uptime = int(server.find("uptime").find("current").text)
d = datetime.timedelta(seconds=uptime)
print "Uptime: $alignr", d
print
cpu = server.find("cpu")
print "CPUs: $alignr", cpu.find("usage").text + " / " + cpu.find("max").text, cpu.find("unit").text
memory = server.find("memory")
printMetric(memory, "Memory")
transfer = server.find("transfer")
printMetric(transfer, "Transfer")
| [
1,
529,
9507,
29958,
11980,
29914,
1168,
3459,
6004,
5709,
29914,
535,
3459,
2974,
4882,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
14137,
29901,
18351,
29899,
29947,
13,
13,
5215,
4390,
29892,
775,
2395,
29892,
2897,
29892,
10876,
29892,
12865,
13,
5215,
4903,
29889,
300,
929,
29889,
2642,
9643,
408,
382,
29911,
13,
5215,
1732,
1982,
29906,
13,
5215,
12782,
11726,
13,
13,
13,
2917,
353,
12782,
11726,
29889,
3991,
11726,
580,
13,
2917,
29889,
949,
18091,
29898,
3150,
877,
29887,
793,
952,
29889,
5527,
8785,
13,
13,
1649,
8787,
10818,
1649,
353,
2295,
29889,
657,
877,
1168,
3459,
6004,
5709,
742,
525,
2754,
1989,
1495,
13,
1649,
8787,
11889,
1649,
353,
2295,
29889,
657,
877,
1168,
3459,
6004,
5709,
742,
525,
2754,
1792,
1495,
13,
1649,
8787,
18603,
1649,
353,
2295,
29889,
657,
877,
1168,
3459,
6004,
5709,
742,
525,
481,
7608,
369,
1495,
13,
1649,
8787,
4219,
1649,
353,
2295,
29889,
657,
877,
1168,
3459,
6004,
5709,
742,
525,
2754,
2271,
1495,
13,
13,
29937,
2158,
4770,
8787,
10818,
1649,
29892,
4770,
8787,
18603,
1649,
29892,
4770,
8787,
11889,
1649,
13,
29937,
2158,
4770,
8787,
4219,
1649,
13,
13,
29937,
1152,
777,
2769,
24250,
29918,
6327,
2450,
338,
17581,
472,
278,
3256,
636,
13,
2202,
29901,
13,
12,
29882,
353,
1732,
1982,
29906,
29889,
5506,
29898,
20472,
29918,
16265,
29918,
6327,
8021,
29918,
18157,
29922,
5574,
29897,
29871,
13,
12,
29882,
29889,
1202,
29918,
11944,
9409,
22168,
8787,
11889,
1649,
29892,
4770,
8787,
10818,
1649,
29897,
13,
12,
13713,
29892,
2793,
353,
298,
29889,
3827,
22168,
8787,
4219,
1649,
13578,
29914,
2974,
333,
12975,
29974,
1649,
8787,
18603,
1649,
29897,
12,
12,
13,
19499,
29901,
13,
12,
2158,
376,
3782,
3957,
29908,
13,
12,
13322,
13,
13,
29937,
28209,
5878,
363,
378,
3459,
2279,
29892,
3017,
947,
451,
1073,
607,
8025,
304,
671,
322,
29871,
13,
29937,
674,
2743,
368,
2322,
304,
408,
18869,
13,
9675,
29889,
25393,
353,
775,
2395,
29889,
657,
13236,
877,
9420,
29899,
29947,
1495,
29898,
9675,
29889,
25393,
29897,
12,
13,
13,
13,
1753,
1596,
10095,
2200,
29898,
16414,
4247,
29892,
12714,
1170,
1125,
13,
12,
21125,
353,
5785,
29898,
16414,
4247,
29889,
2886,
703,
21125,
2564,
726,
29897,
13,
12,
3317,
353,
5785,
29898,
16414,
4247,
29889,
2886,
703,
3317,
2564,
726,
29897,
13,
12,
2158,
12714,
1170,
29974,
1115,
395,
2520,
29878,
613,
8744,
29892,
376,
847,
9162,
4236,
29892,
12714,
4247,
29889,
2886,
703,
5441,
2564,
726,
29961,
29900,
29901,
29906,
29962,
12,
13,
12,
2158,
11568,
4258,
1646,
2916,
13218,
17969,
851,
29898,
21125,
334,
29871,
29896,
29900,
29900,
847,
4236,
29897,
718,
376,
5931,
5038,
13,
13,
8336,
353,
382,
29911,
29889,
3166,
1807,
29898,
3051,
29897,
13,
1454,
1923,
297,
5447,
29889,
2886,
497,
703,
2974,
29908,
1125,
13,
12,
2158,
376,
6004,
1024,
29901,
395,
2520,
29878,
613,
4770,
8787,
18603,
1649,
13,
12,
2158,
376,
2792,
29901,
395,
2520,
29878,
613,
1923,
29889,
2886,
703,
3859,
2564,
726,
13,
12,
21245,
603,
353,
938,
29898,
2974,
29889,
2886,
703,
21245,
603,
2564,
2886,
703,
3784,
2564,
726,
29897,
13,
12,
29881,
353,
12865,
29889,
9346,
287,
2554,
29898,
23128,
29922,
21245,
603,
29897,
13,
12,
2158,
376,
29965,
415,
603,
29901,
395,
2520,
29878,
613,
270,
13,
12,
2158,
13,
12,
13,
12,
21970,
353,
1923,
29889,
2886,
703,
21970,
1159,
12,
13,
12,
2158,
376,
6271,
15922,
29901,
395,
2520,
29878,
613,
26403,
29889,
2886,
703,
21125,
2564,
726,
718,
376,
847,
376,
718,
26403,
29889,
2886,
703,
3317,
2564,
726,
29892,
26403,
29889,
2886,
703,
5441,
2564,
726,
12,
13,
12,
14834,
353,
1923,
29889,
2886,
703,
14834,
1159,
12,
13,
12,
2158,
10095,
2200,
29898,
14834,
29892,
376,
16015,
1159,
12,
13,
12,
3286,
571,
353,
1923,
29889,
2886,
703,
3286,
571,
1159,
12,
13,
12,
2158,
10095,
2200,
29898,
3286,
571,
29892,
376,
4300,
571,
1159,
12,
13,
12,
13,
2
] |
test/module/test_null_values.py | dmorel/cfn-python-lint | 1 | 68112 | <reponame>dmorel/cfn-python-lint<gh_stars>1-10
"""
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
import json
from cfnlint import RulesCollection # pylint: disable=E0401
from cfnlint.core import DEFAULT_RULESDIR
import cfnlint.decode.cfn_yaml # pylint: disable=E0401
import cfnlint.decode.cfn_json # pylint: disable=E0401
from testlib.testcase import BaseTestCase
class TestNulls(BaseTestCase):
"""Test Null Value Parsing """
def setUp(self):
""" SetUp template object"""
self.rules = RulesCollection()
rulesdirs = [DEFAULT_RULESDIR]
for rulesdir in rulesdirs:
self.rules.extend(
RulesCollection.create_from_directory(rulesdir))
def test_success_run(self):
"""Test success run"""
filename = 'test/fixtures/templates/good/generic.yaml'
try:
cfnlint.decode.cfn_yaml.load(filename)
except cfnlint.decode.cfn_yaml.CfnParseError:
assert(False)
return
assert(True)
def test_fail_json_run(self):
"""Test failure run"""
def test_fail_run(self):
"""Test failure run"""
filename = 'test/fixtures/templates/bad/null_values.json'
try:
with open(filename) as fp:
json.load(fp, cls=cfnlint.decode.cfn_json.CfnJSONDecoder)
except cfnlint.decode.cfn_json.JSONDecodeError as err:
self.assertIn("Null Error \"EbsOptimized\"", err.msg)
return
assert(False)
def test_fail_yaml_run(self):
"""Test failure run"""
filename = 'test/fixtures/templates/bad/null_values.yaml'
try:
cfnlint.decode.cfn_yaml.load(filename)
except cfnlint.decode.cfn_yaml.CfnParseError:
assert(True)
return
assert(False)
| [
1,
529,
276,
1112,
420,
29958,
29881,
12257,
295,
29914,
6854,
29876,
29899,
4691,
29899,
27854,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
13,
29871,
14187,
1266,
29871,
29906,
29900,
29896,
29929,
16631,
29889,
510,
29892,
9266,
29889,
470,
967,
23736,
1078,
29889,
2178,
26863,
2538,
9841,
29889,
13,
13,
29871,
20894,
2333,
338,
1244,
1609,
16896,
29892,
3889,
310,
8323,
29892,
304,
738,
2022,
4017,
292,
263,
3509,
310,
445,
13,
29871,
7047,
322,
6942,
5106,
2066,
313,
1552,
376,
6295,
14093,
4968,
304,
5376,
297,
278,
18540,
13,
29871,
1728,
24345,
29892,
3704,
1728,
29485,
278,
10462,
304,
671,
29892,
3509,
29892,
6623,
29892,
13,
29871,
10366,
29892,
9805,
29892,
1320,
2666,
29892,
269,
803,
1947,
29892,
322,
29914,
272,
19417,
14591,
310,
278,
18540,
29892,
322,
304,
13,
29871,
14257,
12407,
304,
6029,
278,
18540,
338,
15252,
3276,
304,
437,
577,
29889,
13,
13,
29871,
6093,
7791,
7818,
12982,
1525,
8519,
13756,
13044,
3352,
376,
3289,
8519,
613,
399,
1806,
8187,
2692,
399,
1718,
29934,
13566,
29979,
8079,
13764,
29979,
476,
22255,
29892,
8528,
15094,
1799,
6323,
306,
3580,
5265,
3352,
29892,
13,
29871,
2672,
6154,
15789,
4214,
350,
2692,
6058,
27848,
3352,
7495,
6093,
399,
1718,
29934,
13566,
29059,
8079,
341,
1001,
3210,
13566,
2882,
6227,
11937,
29892,
383,
1806,
8186,
1799,
15842,
319,
13,
29871,
349,
8322,
2965,
13309,
1718,
349,
4574,
13152,
1660,
5300,
405,
1164,
1177,
15860,
1177,
1692,
13780,
29889,
2672,
11698,
382,
29963,
3919,
24972,
9818,
6093,
26524,
29950,
24125,
6323,
315,
4590,
29979,
22789,
3912,
13,
29871,
379,
5607,
8032,
29903,
20700,
17705,
6181,
15842,
13764,
29979,
315,
4375,
7833,
29892,
21330,
1529,
1692,
29903,
6323,
438,
29911,
4448,
17705,
2882,
6227,
11937,
29892,
12317,
2544,
4448,
2672,
13764,
319,
9838,
13,
29871,
8079,
8707,
29911,
4717,
1783,
29892,
323,
8476,
6323,
438,
29911,
4448,
22119,
1660,
29892,
9033,
3235,
4214,
3895,
29892,
19474,
8079,
6323,
2672,
8707,
8186,
9838,
22659,
6093,
13,
29871,
7791,
7818,
12982,
1525,
6323,
6093,
501,
1660,
6323,
438,
29911,
4448,
5012,
1964,
4214,
29903,
2672,
6093,
7791,
7818,
12982,
1525,
29889,
13,
15945,
29908,
13,
5215,
4390,
13,
3166,
274,
9144,
27854,
1053,
390,
2540,
7196,
29871,
396,
282,
2904,
524,
29901,
11262,
29922,
29923,
29900,
29946,
29900,
29896,
13,
3166,
274,
9144,
27854,
29889,
3221,
1053,
22236,
29918,
28283,
17101,
9464,
13,
5215,
274,
9144,
27854,
29889,
13808,
29889,
6854,
29876,
29918,
25162,
29871,
396,
282,
2904,
524,
29901,
11262,
29922,
29923,
29900,
29946,
29900,
29896,
13,
5215,
274,
9144,
27854,
29889,
13808,
29889,
6854,
29876,
29918,
3126,
29871,
396,
282,
2904,
524,
29901,
11262,
29922,
29923,
29900,
29946,
29900,
29896,
13,
3166,
1243,
1982,
29889,
1688,
4878,
1053,
7399,
3057,
8259,
13,
13,
13,
1990,
4321,
7327,
29879,
29898,
5160,
3057,
8259,
1125,
13,
1678,
9995,
3057,
19014,
7865,
1459,
2976,
9995,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
9995,
3789,
3373,
4472,
1203,
15945,
29908,
13,
4706,
1583,
29889,
19238,
353,
390,
2540,
7196,
580,
13,
4706,
6865,
3972,
29879,
353,
518,
23397,
29918,
28283,
17101,
9464,
29962,
13,
4706,
363,
6865,
3972,
297,
6865,
3972,
29879,
29901,
13,
9651,
1583,
29889,
19238,
29889,
21843,
29898,
13,
18884,
390,
2540,
7196,
29889,
3258,
29918,
3166,
29918,
12322,
29898,
19238,
3972,
876,
13,
13,
1678,
822,
1243,
29918,
8698,
29918,
3389,
29898,
1311,
1125,
13,
4706,
9995,
3057,
2551,
1065,
15945,
29908,
13,
13,
4706,
10422,
353,
525,
1688,
29914,
7241,
486,
1973,
29914,
20943,
29914,
16773,
29914,
19206,
29889,
25162,
29915,
13,
13,
4706,
1018,
29901,
13,
9651,
274,
9144,
27854,
29889,
13808,
29889,
6854,
29876,
29918,
25162,
29889,
1359,
29898,
9507,
29897,
13,
4706,
5174,
274,
9144,
27854,
29889,
13808,
29889,
6854,
29876,
29918,
25162,
29889,
29907,
9144,
12914,
2392,
29901,
13,
9651,
4974,
29898,
8824,
29897,
13,
9651,
736,
13,
13,
4706,
4974,
29898,
5574,
29897,
13,
13,
1678,
822,
1243,
29918,
14057,
29918,
3126,
29918,
3389,
29898,
1311,
1125,
13,
4706,
9995,
3057,
10672,
1065,
15945,
29908,
13,
13,
1678,
822,
1243,
29918,
14057,
29918,
3389,
29898,
1311,
1125,
13,
4706,
9995,
3057,
10672,
1065,
15945,
29908,
13,
13,
4706,
10422,
353,
525,
1688,
29914,
7241,
486,
1973,
29914,
20943,
29914,
12313,
29914,
4304,
29918,
5975,
29889,
3126,
29915,
13,
13,
4706,
1018,
29901,
13,
9651,
411,
1722,
29898,
9507,
29897,
408,
285,
29886,
29901,
13,
18884,
4390,
29889,
1359,
29898,
18091,
29892,
1067,
29879,
29922,
6854,
12938,
524,
29889,
13808,
29889,
6854,
29876,
29918,
3126,
29889,
29907,
9144,
7249,
6185,
6119,
29897,
13,
4706,
5174,
274,
9144,
27854,
29889,
13808,
29889,
6854,
29876,
29918,
3126,
29889,
7249,
2772,
401,
2392,
408,
4589,
29901,
13,
9651,
1583,
29889,
9294,
797,
703,
7327,
4829,
13218,
29923,
5824,
20624,
326,
1891,
5931,
613,
4589,
29889,
7645,
29897,
13,
9651,
736,
13,
13,
4706,
4974,
29898,
8824,
29897,
13,
13,
1678,
822,
1243,
29918,
14057,
29918,
25162,
29918,
3389,
29898,
1311,
1125,
13,
4706,
9995,
3057,
10672,
1065,
15945,
29908,
13,
13,
4706,
10422,
353,
525,
1688,
29914,
7241,
486,
1973,
29914,
20943,
29914,
12313,
29914,
4304,
29918,
5975,
29889,
25162,
29915,
13,
13,
4706,
1018,
29901,
13,
9651,
274,
9144,
27854,
29889,
13808,
29889,
6854,
29876,
29918,
25162,
29889,
1359,
29898,
9507,
29897,
13,
4706,
5174,
274,
9144,
27854,
29889,
13808,
29889,
6854,
29876,
29918,
25162,
29889,
29907,
9144,
12914,
2392,
29901,
13,
9651,
4974,
29898,
5574,
29897,
13,
9651,
736,
13,
13,
4706,
4974,
29898,
8824,
29897,
13,
2
] |
german_experiment.py | laurensalvarez/Fooling-LIME-SHAP | 55 | 164317 | <filename>german_experiment.py<gh_stars>10-100
"""
The experiment MAIN for GERMAN.
"""
import warnings
warnings.filterwarnings('ignore')
from adversarial_models import *
from utils import *
from get_data import *
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
import numpy as np
import pandas as pd
import lime
import lime.lime_tabular
import shap
from sklearn.cluster import KMeans
from copy import deepcopy
# Set up experiment parameters
params = Params("model_configurations/experiment_params.json")
X, y, cols = get_and_preprocess_german(params)
features = [c for c in X]
gender_indc = features.index('Gender')
loan_rate_indc = features.index('LoanRateAsPercentOfIncome')
X = X.values
xtrain,xtest,ytrain,ytest = train_test_split(X,y,test_size=0.1)
ss = StandardScaler().fit(xtrain)
xtrain = ss.transform(xtrain)
xtest = ss.transform(xtest)
mean_lrpi = np.mean(xtrain[:,loan_rate_indc])
categorical = ['Gender', 'ForeignWorker', 'Single', 'HasTelephone','CheckingAccountBalance_geq_0','CheckingAccountBalance_geq_200','SavingsAccountBalance_geq_100','SavingsAccountBalance_geq_500','MissedPayments','NoCurrentLoan','CriticalAccountOrLoansElsewhere','OtherLoansAtBank','OtherLoansAtStore','HasCoapplicant','HasGuarantor','OwnsHouse','RentsHouse','Unemployed','YearsAtCurrentJob_lt_1','YearsAtCurrentJob_geq_4','JobClassIsSkilled']
categorical = [features.index(c) for c in categorical]
###
## The models f and psi for GERMAN. We discriminate based on gender for f and consider loan rate % income for explanation
#
# the biased model
class racist_model_f:
# Decision rule: classify negative outcome if female
def predict(self,X):
return np.array([params.negative_outcome if x[gender_indc] < 0 else params.positive_outcome for x in X])
def predict_proba(self, X):
return one_hot_encode(self.predict(X))
def score(self, X,y):
return np.sum(self.predict(X)==y) / len(X)
# the display model with one unrelated feature
class innocuous_model_psi:
# Decision rule: classify according to loan rate indc
def predict_proba(self, X):
return one_hot_encode(np.array([params.negative_outcome if x[loan_rate_indc] > mean_lrpi else params.positive_outcome for x in X]))
##
###
def experiment_main():
"""
Run through experiments for LIME/SHAP on GERMAN.
* This may take some time given that we iterate through every point in the test set
* We print out the rate at which features occur in the top three features
"""
print ('---------------------')
print ("Beginning LIME GERMAN Experiments....")
print ("(These take some time to run because we have to generate explanations for every point in the test set) ")
print ('---------------------')
# Train the adversarial model for LIME with f and psi
adv_lime = Adversarial_Lime_Model(racist_model_f(), innocuous_model_psi()).train(xtrain, ytrain, feature_names=features, perturbation_multiplier=30, categorical_features=categorical)
adv_explainer = lime.lime_tabular.LimeTabularExplainer(xtrain, feature_names=adv_lime.get_column_names(), discretize_continuous=False, categorical_features=categorical)
explanations = []
for i in range(xtest.shape[0]):
explanations.append(adv_explainer.explain_instance(xtest[i], adv_lime.predict_proba).as_list())
# Display Results
print ("LIME Ranks and Pct Occurances (1 corresponds to most important feature) for one unrelated feature:")
print (experiment_summary(explanations, features))
print ("Fidelity:", round(adv_lime.fidelity(xtest),2))
print ('---------------------')
print ('Beginning SHAP GERMAN Experiments....')
print ('---------------------')
#Setup SHAP
background_distribution = KMeans(n_clusters=10,random_state=0).fit(xtrain).cluster_centers_
adv_shap = Adversarial_Kernel_SHAP_Model(racist_model_f(), innocuous_model_psi()).train(xtrain, ytrain,
feature_names=features, background_distribution=background_distribution, rf_estimators=100, n_samples=5e4)
adv_kerenel_explainer = shap.KernelExplainer(adv_shap.predict, background_distribution,)
explanations = adv_kerenel_explainer.shap_values(xtest)
# format for display
formatted_explanations = []
for exp in explanations:
formatted_explanations.append([(features[i], exp[i]) for i in range(len(exp))])
print ("SHAP Ranks and Pct Occurances one unrelated features:")
print (experiment_summary(formatted_explanations, features))
print ("Fidelity:",round(adv_shap.fidelity(xtest),2))
print ('---------------------')
if __name__ == "__main__":
experiment_main()
| [
1,
529,
9507,
29958,
29887,
3504,
29918,
735,
15362,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
15945,
29908,
13,
1576,
7639,
14861,
1177,
363,
402,
1001,
27616,
29889,
13,
15945,
29908,
13,
5215,
18116,
13,
25442,
886,
29889,
4572,
25442,
886,
877,
17281,
1495,
29871,
13,
13,
3166,
19901,
27521,
29918,
9794,
1053,
334,
29871,
13,
3166,
3667,
29879,
1053,
334,
13,
3166,
679,
29918,
1272,
1053,
334,
13,
13,
3166,
2071,
19668,
29889,
4299,
29918,
21731,
1053,
7945,
29918,
1688,
29918,
5451,
13,
3166,
2071,
19668,
29889,
1457,
19170,
1053,
10117,
29636,
261,
13,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
13,
5215,
301,
603,
13,
5215,
301,
603,
29889,
28046,
29918,
9456,
13,
5215,
528,
481,
13,
13,
3166,
2071,
19668,
29889,
19594,
1053,
476,
6816,
550,
29871,
13,
13,
3166,
3509,
1053,
6483,
8552,
13,
13,
29937,
3789,
701,
7639,
4128,
13,
7529,
353,
1459,
2232,
703,
4299,
29918,
2917,
332,
800,
29914,
735,
15362,
29918,
7529,
29889,
3126,
1159,
13,
29990,
29892,
343,
29892,
28730,
353,
679,
29918,
392,
29918,
1457,
5014,
29918,
29887,
3504,
29898,
7529,
29897,
13,
13,
22100,
353,
518,
29883,
363,
274,
297,
1060,
29962,
13,
13,
26098,
29918,
513,
29883,
353,
5680,
29889,
2248,
877,
29954,
1581,
1495,
13,
417,
273,
29918,
10492,
29918,
513,
29883,
353,
5680,
29889,
2248,
877,
3410,
273,
19907,
2887,
27933,
2776,
797,
2763,
1495,
13,
13,
29990,
353,
1060,
29889,
5975,
13,
13,
486,
6038,
29892,
486,
342,
29892,
29891,
14968,
29892,
29891,
1688,
353,
7945,
29918,
1688,
29918,
5451,
29898,
29990,
29892,
29891,
29892,
1688,
29918,
2311,
29922,
29900,
29889,
29896,
29897,
13,
893,
353,
10117,
29636,
261,
2141,
9202,
29898,
486,
6038,
29897,
13,
486,
6038,
353,
17971,
29889,
9067,
29898,
486,
6038,
29897,
13,
486,
342,
353,
17971,
29889,
9067,
29898,
486,
342,
29897,
13,
13,
12676,
29918,
29212,
1631,
353,
7442,
29889,
12676,
29898,
486,
6038,
7503,
29892,
417,
273,
29918,
10492,
29918,
513,
29883,
2314,
13,
13,
13,
29883,
20440,
936,
353,
6024,
29954,
1581,
742,
525,
27755,
16164,
742,
525,
15771,
742,
525,
14510,
29911,
6146,
6710,
3788,
5596,
292,
10601,
22031,
749,
29918,
6279,
29918,
29900,
3788,
5596,
292,
10601,
22031,
749,
29918,
6279,
29918,
29906,
29900,
29900,
3788,
29903,
485,
886,
10601,
22031,
749,
29918,
6279,
29918,
29896,
29900,
29900,
3788,
29903,
485,
886,
10601,
22031,
749,
29918,
6279,
29918,
29945,
29900,
29900,
3788,
18552,
287,
15467,
1860,
3788,
3782,
7583,
3410,
273,
3788,
29907,
768,
936,
10601,
2816,
3410,
550,
27406,
3062,
3788,
16107,
3410,
550,
4178,
29933,
804,
3788,
16107,
3410,
550,
4178,
9044,
3788,
14510,
7967,
932,
506,
424,
3788,
14510,
9485,
279,
424,
272,
3788,
29949,
1233,
29879,
29950,
1709,
3788,
29934,
1237,
29950,
1709,
3788,
2525,
3451,
2376,
287,
3788,
12883,
29879,
4178,
7583,
11947,
29918,
1896,
29918,
29896,
3788,
12883,
29879,
4178,
7583,
11947,
29918,
6279,
29918,
29946,
3788,
11947,
2385,
3624,
15797,
24455,
2033,
13,
29883,
20440,
936,
353,
518,
22100,
29889,
2248,
29898,
29883,
29897,
363,
274,
297,
11608,
936,
29962,
13,
13,
2277,
29937,
13,
2277,
450,
4733,
285,
322,
282,
1039,
363,
402,
1001,
27616,
29889,
29871,
1334,
2313,
5632,
16976,
2729,
373,
23346,
363,
285,
322,
2050,
24806,
6554,
1273,
17869,
363,
8252,
13,
29937,
13,
13,
29937,
278,
4768,
1463,
1904,
29871,
13,
1990,
11021,
391,
29918,
4299,
29918,
29888,
29901,
13,
1678,
396,
3826,
2459,
5751,
29901,
770,
1598,
8178,
21957,
565,
12944,
13,
1678,
822,
8500,
29898,
1311,
29892,
29990,
1125,
13,
4706,
736,
7442,
29889,
2378,
4197,
7529,
29889,
22198,
29918,
449,
2763,
565,
921,
29961,
26098,
29918,
513,
29883,
29962,
529,
29871,
29900,
1683,
8636,
29889,
1066,
3321,
29918,
449,
2763,
363,
921,
297,
1060,
2314,
13,
13,
1678,
822,
8500,
29918,
771,
2291,
29898,
1311,
29892,
1060,
1125,
29871,
13,
4706,
736,
697,
29918,
8711,
29918,
12508,
29898,
1311,
29889,
27711,
29898,
29990,
876,
13,
13,
1678,
822,
8158,
29898,
1311,
29892,
1060,
29892,
29891,
1125,
13,
4706,
736,
7442,
29889,
2083,
29898,
1311,
29889,
27711,
29898,
29990,
29897,
1360,
29891,
29897,
847,
7431,
29898,
29990,
29897,
13,
268,
13,
29937,
278,
2479,
1904,
411,
697,
443,
12817,
4682,
13,
1990,
21458,
17269,
29918,
4299,
29918,
6134,
29901,
13,
1678,
396,
3826,
2459,
5751,
29901,
770,
1598,
5034,
304,
24806,
6554,
1399,
29883,
13,
1678,
822,
8500,
29918,
771,
2291,
29898,
1311,
29892,
1060,
1125,
29871,
13,
4706,
736,
697,
29918,
8711,
29918,
12508,
29898,
9302,
29889,
2378,
4197,
7529,
29889,
22198,
29918,
449,
2763,
565,
921,
29961,
417,
273,
29918,
10492,
29918,
513,
29883,
29962,
1405,
2099,
29918,
29212,
1631,
1683,
8636,
29889,
1066,
3321,
29918,
449,
2763,
363,
921,
297,
1060,
12622,
13,
13,
2277,
13,
2277,
29937,
13,
13,
1753,
7639,
29918,
3396,
7295,
13,
12,
15945,
29908,
13,
12,
6558,
1549,
15729,
363,
365,
8890,
29914,
7068,
3301,
373,
402,
1001,
27616,
29889,
13,
12,
29930,
910,
1122,
2125,
777,
931,
2183,
393,
591,
13649,
1549,
1432,
1298,
297,
278,
1243,
731,
13,
12,
29930,
1334,
1596,
714,
278,
6554,
472,
607,
5680,
6403,
297,
278,
2246,
2211,
5680,
13,
12,
15945,
29908,
13,
13,
12,
2158,
6702,
2683,
23648,
1495,
13,
12,
2158,
4852,
17946,
1076,
365,
8890,
402,
1001,
27616,
28224,
7862,
3045,
1159,
13,
12,
2158,
4852,
29898,
1349,
968,
2125,
777,
931,
304,
1065,
1363,
591,
505,
304,
5706,
7309,
800,
363,
1432,
1298,
297,
278,
1243,
731,
29897,
16521,
13,
12,
2158,
6702,
2683,
23648,
1495,
13,
13,
12,
29937,
28186,
278,
19901,
27521,
1904,
363,
365,
8890,
411,
285,
322,
282,
1039,
29871,
13,
12,
17263,
29918,
28046,
353,
2087,
874,
27521,
29918,
29931,
603,
29918,
3195,
29898,
945,
391,
29918,
4299,
29918,
29888,
3285,
21458,
17269,
29918,
4299,
29918,
6134,
16655,
14968,
29898,
486,
6038,
29892,
343,
14968,
29892,
4682,
29918,
7039,
29922,
22100,
29892,
22786,
362,
29918,
18056,
4926,
29922,
29941,
29900,
29892,
11608,
936,
29918,
22100,
29922,
29883,
20440,
936,
29897,
13,
12,
17263,
29918,
4548,
433,
4983,
353,
301,
603,
29889,
28046,
29918,
9456,
29889,
29931,
603,
8863,
1070,
9544,
433,
4983,
29898,
486,
6038,
29892,
4682,
29918,
7039,
29922,
17263,
29918,
28046,
29889,
657,
29918,
4914,
29918,
7039,
3285,
766,
4838,
675,
29918,
20621,
681,
29922,
8824,
29892,
11608,
936,
29918,
22100,
29922,
29883,
20440,
936,
29897,
13,
462,
462,
18884,
13,
12,
735,
9018,
800,
353,
5159,
13,
12,
1454,
474,
297,
3464,
29898,
486,
342,
29889,
12181,
29961,
29900,
29962,
1125,
13,
12,
12,
735,
9018,
800,
29889,
4397,
29898,
17263,
29918,
4548,
433,
4983,
29889,
4548,
7420,
29918,
8758,
29898,
486,
342,
29961,
29875,
1402,
3061,
29918,
28046,
29889,
27711,
29918,
771,
2291,
467,
294,
29918,
1761,
3101,
13,
13,
12,
29937,
17440,
17212,
13,
12,
2158,
4852,
5265,
2303,
390,
1331,
322,
349,
312,
16117,
332,
2925,
313,
29896,
16161,
304,
1556,
4100,
4682,
29897,
363,
697,
443,
12817,
4682,
29901,
1159,
13,
12,
2158,
313,
735,
15362,
29918,
7727,
29898,
735,
9018,
800,
29892,
5680,
876,
13,
12,
2158,
4852,
29943,
10652,
537,
29901,
613,
4513,
29898,
17263,
29918,
28046,
29889,
29888,
10652,
537,
29898,
486,
342,
511,
29906,
876,
13,
13,
12,
13,
12,
2158,
6702,
2683,
23648,
1495,
13,
12,
2158,
6702,
17946,
1076,
24972,
3301,
402,
1001,
27616,
28224,
7862,
3045,
1495,
13,
12,
2158,
6702,
2683,
23648,
1495,
13,
13,
12,
29937,
26947,
24972,
3301,
13,
12,
7042,
29918,
27691,
353,
476,
6816,
550,
29898,
29876,
29918,
695,
504,
414,
29922,
29896,
29900,
29892,
8172,
29918,
3859,
29922,
29900,
467,
9202,
29898,
486,
6038,
467,
19594,
29918,
1760,
414,
29918,
13,
12,
17263,
29918,
845,
481,
353,
2087,
874,
27521,
29918,
29968,
5851,
29918,
7068,
3301,
29918,
3195,
29898,
945,
391,
29918,
4299,
29918,
29888,
3285,
21458,
17269,
29918,
4299,
29918,
6134,
16655,
14968,
29898,
486,
6038,
29892,
343,
14968,
29892,
29871,
13,
12,
12,
12,
14394,
29918,
7039,
29922,
22100,
29892,
3239,
29918,
27691,
29922,
7042,
29918,
27691,
29892,
364,
29888,
29918,
342,
326,
4097,
29922,
29896,
29900,
29900,
29892,
302,
29918,
27736,
29922,
29945,
29872,
29946,
29897,
13,
12,
17263,
29918,
3946,
264,
295,
29918,
4548,
433,
4983,
353,
528,
481,
29889,
29968,
5851,
9544,
433,
4983,
29898,
17263,
29918,
845,
481,
29889,
27711,
29892,
3239,
29918,
27691,
29892,
29897,
13,
12,
735,
9018,
800,
353,
3061,
29918,
3946,
264,
295,
29918,
4548,
433,
4983,
29889,
845,
481,
29918,
5975,
29898,
486,
342,
29897,
13,
13,
12,
29937,
3402,
363,
2479,
13,
12,
689,
19667,
29918,
735,
9018,
800,
353,
5159,
13,
12,
1454,
1518,
297,
7309,
800,
29901,
13,
12,
12,
689,
19667,
29918,
735,
9018,
800,
29889,
4397,
4197,
29898,
22100,
29961,
29875,
1402,
1518,
29961,
29875,
2314,
363,
474,
297,
3464,
29898,
2435,
29898,
4548,
876,
2314,
13,
13,
12,
2158,
4852,
7068,
3301,
390,
1331,
322,
349,
312,
16117,
332,
2925,
697,
443,
12817,
5680,
29901,
1159,
13,
12,
2158,
313,
735,
15362,
29918,
7727,
29898,
689,
19667,
29918,
735,
9018,
800,
29892,
5680,
876,
13,
12,
2158,
4852,
29943,
10652,
537,
29901,
613,
14486,
29898,
17263,
29918,
845,
481,
29889,
29888,
10652,
537,
29898,
486,
342,
511,
29906,
876,
13,
13,
12,
2158,
6702,
2683,
23648,
1495,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
12,
735,
15362,
29918,
3396,
580,
13,
2
] |
mytrading/configs.py | joeledwardson/betfair-browser | 3 | 59020 | from typing import List, Dict, Optional
from myutils.registrar import Registrar
from myutils import dictionaries
import os, yaml
from os import path
import json
from .exceptions import FeatureConfigException
reg_plots = Registrar()
reg_features = Registrar()
KEY_SAMPLE = 'smp'
KEY_AVERAGE = 'avg'
KEY_TICKS = 'tck'
KEY_MAX_DIF = 'mdf'
KEY_COMPARE = 'cmp'
class ConfigGenerator:
CONFIG_SPEC = {
'name': {
'type': str
},
'kwargs': {
'type': dict
}
}
def __init__(self, cfg_dir: str, out_dir, reg: Registrar):
self._cfg_dir = path.abspath(path.expandvars(cfg_dir))
if not path.isdir(self._cfg_dir):
raise FeatureConfigException(f'configuration dir "{self._cfg_dir}" is not a directory')
self._out_dir = path.abspath(path.expandvars(out_dir))
if not path.isdir(self._out_dir):
raise FeatureConfigException(f'output dir "{self._out_dir}" is not a directory')
self._reg = reg
def reload(self):
_, _, filenames = next(os.walk(self._cfg_dir))
for fn in filenames:
p_in = path.join(self._cfg_dir, fn)
with open(p_in, 'r') as f:
data = f.read()
file_cfg = yaml.load(data, yaml.FullLoader)
dictionaries.validate_config(file_cfg, self.CONFIG_SPEC)
reg_nm = file_cfg['name']
reg_kwargs = file_cfg['kwargs']
ftr_cfg = self._reg[reg_nm](**reg_kwargs)
p_out = path.join(self._out_dir, fn)
with open(p_out, 'w') as f:
f.write(yaml.dump(ftr_cfg, sort_keys=False))
p_out_json = path.splitext(p_out)[0] + '.json'
with open(p_out_json, 'w') as f:
f.write(json.dumps(ftr_cfg, indent=2, sort_keys=False))
def _plot_procs_lad(ftr_key, lad_key):
"""return processors to add ladder feature of price sizes to back/lay feature"""
return [
{
'name': 'prc_ftrstodf',
'kwargs': {
'ftr_keys': {
'y': ftr_key,
'text': lad_key
}
}
}, {
'name': 'prc_dffmtps',
'kwargs': {
'df_col': 'text'
}
}, {
'name': 'prc_dftodict'
}
]
def _plot_colorscale(color_0, color_1) -> Dict:
"""`chart_args` argument to set colorscale with lines+markers"""
return {
'mode': 'lines+markers',
'line_color': 'black',
'marker': {
'colorscale': [
[0, color_0],
[1, color_1]
],
'cmid': 0,
}
}
def _ftr_smooth(sample_ms, cache_count):
"""sub-features config for sampling and then moving average"""
return {
KEY_SAMPLE: {
'name': 'RFSample',
'kwargs': {
'periodic_ms': sample_ms,
'cache_count': cache_count,
'sub_features_config': {
KEY_AVERAGE: {
'name': 'RFMvAvg'
}
}
}
}
}
def _ftr_tick(sub_features_config=None):
"""sub-feature converting parent to tick"""
return {
'name': 'RunnerFeatureSub',
'kwargs': {
'value_processors_config': [{
'name': 'value_processor_to_tick',
}],
'sub_features_config': sub_features_config,
},
}
def _ftr_tvlad(window_s, sampling_ms, cache_count):
"""traded volume `TVLad` feature sub-config for creating max/min values over window, sampling then moving avg"""
return {
'cache_secs': window_s,
'cache_insidewindow': False,
'sub_features_config': {
'dif': {
'name': 'RFTVLadDif',
'kwargs': {
'sub_features_config': {
'max': {
'name': 'RFTVLadMax',
'kwargs': {
'sub_features_config': _ftr_smooth(sampling_ms, cache_count)
}
},
'min': {
'name': 'RFTVLadMin',
'kwargs': {
'sub_features_config': _ftr_smooth(sampling_ms, cache_count)
}
}
}
}
}
}
}
@reg_features.register_element
def feature_configs_spike(
n_ladder_elements,
n_wom_ticks,
ltp_window_width_s,
ltp_window_sampling_ms,
ltp_window_sampling_count,
spread_sampling_ms,
spread_sampling_count,
) -> Dict[str, Dict]:
"""
Get a dict of default runner features, where each entry is a dictionary of:
- key: feature usage name
- value: dict of
- 'name': class name of feature
- 'kwargs': dict of constructor arguments used when creating feature
"""
def ltp_win_kwargs(sample_ms, cache_count):
d = {
'sub_features_config': {
'smp': {
'name': 'RFSample',
'kwargs': {
'periodic_ms': sample_ms,
'cache_count': cache_count,
'sub_features_config': {
'avg': {
'name': 'RFMvAvg'
}
}
}
}
}
}
return d
return {
'best back': {
'name': 'RFBck',
},
'best lay': {
'name': 'RFLay',
},
'back ladder': {
'name': 'RFLadBck',
'kwargs': {
'n_elements': n_ladder_elements,
}
},
'lay ladder': {
'name': 'RFLadLay',
'kwargs': {
'n_elements': n_ladder_elements,
}
},
'wom': {
'name': 'RFWOM',
'kwargs': {
'wom_ticks': n_wom_ticks
},
},
'tvlad': {
'name': 'RFTVLad',
'kwargs': {
'cache_secs': ltp_window_width_s,
'cache_insidewindow': False,
'sub_features_config': {
'dif': {
'name': 'RFTVLadDif',
'kwargs': {
'sub_features_config': {
'max': {
'name': 'RFTVLadMax',
'kwargs': ltp_win_kwargs(ltp_window_sampling_ms, ltp_window_sampling_count)
},
'min': {
'name': 'RFTVLadMin',
'kwargs': ltp_win_kwargs(ltp_window_sampling_ms, ltp_window_sampling_count)
},
'spread': {
'name': 'RFTVLadSpread'
}
}
}
}
}
}
},
'ltp': {
'name': 'RFLTP',
},
'tv': {
'name': 'RFTVTot',
},
'spread': {
'name': 'RFLadSprd',
'kwargs': {
'sub_features_config': {
'smp': {
'name': 'RFSample',
'kwargs': {
'periodic_ms': spread_sampling_ms,
'cache_count': spread_sampling_count,
'sub_features_config': {
'avg': {
'name': 'RFMvAvg'
}
}
}
}
}
}
}
}
@reg_plots.register_element
def plot_configs_spike(
ltp_diff_opacity,
ltp_diff_s,
tv_width_ms
):
IGNORE = [
'back ladder',
'lay ladder',
'spread',
'spread.smp',
'spread.smp.avg',
'wom',
'tvlad',
'tvlad.dif',
'tvlad.dif.max',
'tvlad.dif.max.smp',
'tvlad.dif',
'tvlad.dif.spread',
'tvlad.dif.min',
'tvlad.dif.min.smp',
]
return {
k: {
'ignore': True
} for k in IGNORE
} | {
'best back': {
'value_processors': _plot_procs_lad('best back', 'back ladder'),
},
'best lay': {
'value_processors': _plot_procs_lad('best lay', 'lay ladder')
},
'ltp': {
'chart_args': {
'mode': 'lines+markers'
},
'value_processors': [{
'name': 'prc_ftrstodf',
'kwargs': {
'ftr_keys': {
'y': 'ltp',
'text': 'tv',
}
}
}, {
'name': 'prc_dffillna'
}, {
'name': 'prc_dffmtstr',
'kwargs': {
'df_col': 'text',
'fmt_spec': 'Traded Volume: £{0:.2f}'
}
}, {
'name': 'prc_dftodict',
}],
},
'tv': {
'chart': 'Bar',
'chart_args': {
'marker': {
'colorscale': [
[0, 'rgb(250,50,50)'],
[1, 'rgb(50,250,50)']
], # default plotly colours go white, so use a green to red scale
'cmid': 0, # with grey 0 scale
},
'opacity': ltp_diff_opacity,
'width': tv_width_ms, # 1 seconds width of bars
'offset': 0, # end of bar to be aligned with timestamp
},
'trace_args': {
'secondary_y': True
},
'value_processors': [{
'name': 'prc_dfdiff'
}, {
'name': 'prc_getftr',
'keys': {
'key_out': 'key_1'
},
'kwargs': {
'ftr_key': 'wom',
}
}, {
'name': 'prc_buftodf',
'kwargs': {
'buf_cfg': {
'y': 'key_0',
'text': 'key_1'
},
}
}, {
'name': 'prc_dftypes',
'kwargs': {
'dtypes': {
'y': 'float',
'text': 'float',
}
}
}, {
'name': 'prc_resmp',
'kwargs': {
'n_seconds': tv_width_ms/1000,
'agg_function': {
'y': 'sum',
'text': 'mean',
}
}
}, {
'name': 'prc_dfcp',
'kwargs': {
'col_src': 'text',
'col_out': 'marker_color'
}
}, {
'name': 'prc_dffmtstr',
'kwargs': {
'df_col': 'text',
'fmt_spec': 'Weight of Money: £{0:.2f}'
},
}, {
'name': 'prc_dftodict'
}],
},
'tvlad.dif.max.smp.avg': {
'rename': 'ltp max'
},
'tvlad.dif.min.smp.avg': {
'rename': 'ltp min'
}
}
@reg_features.register_element
def feature_configs_smooth(
spread_sampling_ms,
spread_sampling_count,
wom_ticks,
ltp_window_width_s,
ltp_window_sampling_ms,
ltp_window_sampling_count,
ladder_sampling_ms,
ladder_sampling_count,
ltp_sampling_ms,
ltp_sampling_count,
n_ladder_elements,
diff_s,
split_sum_s,
):
def side_kwargs(diff_s, ladder_sampling_ms, ladder_sampling_count) -> Dict:
return {
'cache_secs': diff_s,
'cache_insidewindow': False,
'sub_features_config': {
KEY_TICKS: {
'name': 'RFTick',
'kwargs': {
'cache_secs': diff_s,
'cache_insidewindow': False,
'sub_features_config': {
KEY_MAX_DIF: {
'name': 'RFMaxDif'
},
KEY_SAMPLE: {
'name': 'RFSample',
'kwargs': {
'periodic_ms': ladder_sampling_ms,
'cache_count': ladder_sampling_count,
'sub_features_config': {
KEY_AVERAGE: {
'name': 'RFMvAvg',
'kwargs': {
'cache_secs': diff_s,
'sub_features_config': {
KEY_COMPARE: {
'name': 'RFDif'
}
}
}
}
}
}
}
}
}
},
KEY_SAMPLE: {
'name': 'RFSample',
'kwargs': {
'periodic_ms': ladder_sampling_ms,
'cache_count': ladder_sampling_count,
'sub_features_config': {
KEY_AVERAGE: {
'name': 'RFMvAvg'
}
}
}
}
}
}
return {
'spread': {
'name': 'RFLadSprd',
'kwargs': {
'sub_features_config': _ftr_smooth(
spread_sampling_ms,
spread_sampling_count
)
}
},
'lay': {
'name': 'RFLay',
'kwargs': side_kwargs(diff_s, ladder_sampling_ms, ladder_sampling_count)
},
'bck': {
'name': 'RFBck',
'kwargs': side_kwargs(diff_s, ladder_sampling_ms, ladder_sampling_count)
},
'ltp': {
'name': 'RFLTP',
'kwargs': {
'sub_features_config': _ftr_smooth(
ltp_sampling_ms,
ltp_sampling_count
),
}
},
'tvlad': {
'name': 'RFTVLad',
'kwargs': _ftr_tvlad(
ltp_window_width_s,
ltp_window_sampling_ms,
ltp_window_sampling_count
)
},
'bcklad': {
'name': 'RFLadBck',
'kwargs': {
'n_elements': n_ladder_elements,
}
},
'laylad': {
'name': 'RFLadLay',
'kwargs': {
'n_elements': n_ladder_elements,
}
},
'wom': {
'name': 'RFWOM',
'kwargs': {
'wom_ticks': wom_ticks
},
},
'split': {
'name': 'RFBkSplit',
'kwargs': {
'cache_secs': split_sum_s,
'cache_insidewindow': False,
'sub_features_config': {
'sum': {
'name': 'RFSum'
},
'tot': {
'name': 'RFIncSum'
}
}
}
},
'tv': {
'name': 'RFTVTot',
},
}
@reg_plots.register_element
def plot_configs_smooth(bar_width_ms, tv_opacity):
IGNORE_LIST = [
'bcklad',
'laylad',
'wom',
'spread',
'spread.smp',
'spread.smp.avg',
'tv',
'bck.smp',
'lay.smp',
'bck.tck',
'lay.tck',
'bck.tck.mdf',
'lay.tck.mdf',
'bck.tck.smp',
'lay.tck.smp',
'bck.tck.smp.avg',
'lay.tck.smp.avg',
'bck.tck.smp.avg.cmp',
'lay.tck.smp.avg.cmp',
'ltp.smp',
'tvlad',
'tvlad.dif',
'tvlad.dif.max',
'tvlad.dif.max.smp',
'tvlad.dif',
'tvlad.dif.min',
'tvlad.dif.min.smp',
]
def prcs_ltp(ltp, tv, spread, split) -> List[Dict]:
return [{
'name': 'prc_ftrstodf',
'kwargs': {
'ftr_keys': {
'y': ltp,
'tv_text': tv,
'spread_text': spread,
'split_text': split,
'marker_color': 'wom',
'wom_text': 'wom',
}
}
}, {
'name': 'prc_dffillna',
}, {
'name': 'prc_dffmtstr',
'kwargs': {
'df_col': 'spread_text',
'fmt_spec': 'Spread: {0}'
}
}, {
'name': 'prc_dffmtstr',
'kwargs': {
'df_col': 'tv_text',
'fmt_spec': 'Traded Volume: £{0:.2f}'
}
}, {
'name': 'prc_dffmtstr',
'kwargs': {
'df_col': 'split_text',
'fmt_spec': 'Book split: £{0:.2f}'
}
}, {
'name': 'prc_dffmtstr',
'kwargs': {
'df_col': 'wom_text',
'fmt_spec': 'WOM: £{0:.2f}'
}
}, {
'name': 'prc_dftxtjoin',
'kwargs': {
'dest_col': 'text',
'src_cols': [
'tv_text',
'spread_text',
'split_text',
'wom_text'
],
}
}, {
'name': 'prc_dfdrop',
'kwargs': {
'cols': [
'tv_text',
'spread_text',
'split_text',
'wom_text'
]
}
}, {
'name': 'prc_dftodict',
}]
def prcs_tvbar(tv, bar_width_ms):
return [{
'name': 'prc_getftr',
'keys': {
'key_out': 'key_tv'
},
'kwargs': {
'ftr_key': tv
}
}, {
'name': 'prc_dfdiff',
'keys': {
'key_in': 'key_tv',
'key_out': 'key_tv'
}
}, {
'name': 'prc_buftodf',
'kwargs': {
'buf_cfg': {
'y': 'key_0',
'text': 'key_tv'
}
}
}, {
'name': 'prc_resmp',
'kwargs': {
'n_seconds': int(bar_width_ms / 1000),
'agg_function': {
'y': 'sum',
'text': 'sum'
}
}
}, {
'name': 'prc_dfcp',
'kwargs': {
'col_src': 'text',
'col_out': 'marker_color'
}
}, {
'name': 'prc_dffmtstr',
'kwargs': {
'df_col': 'text',
'fmt_spec': 'Traded volume: £{0:.2f}'
}
}, {
'name': 'prc_dftodict'
}]
def smooth_value_processors(ftr_src, ftr_tks, ftr_cmp, ftr_dif) -> List[Dict]:
return [{
'name': 'prc_ftrstodf',
'kwargs': {
'ftr_keys': {
'y': ftr_src,
'marker_color': ftr_cmp,
'text_ticks': ftr_tks,
'text_tick_comp': ftr_cmp,
'text_max_diff': ftr_dif
}
},
}, {
'name': 'prc_dffillna',
}, {
'name': 'prc_dffmtstr',
'kwargs': {
'df_col': 'text_ticks',
'fmt_spec': 'Tick: {0:.2f}'
}
}, {
'name': 'prc_dffmtstr',
'kwargs': {
'df_col': 'text_tick_comp',
'fmt_spec': 'Tick difference: {0:.2f}'
}
}, {
'name': 'prc_dffmtstr',
'kwargs': {
'df_col': 'text_max_diff',
'fmt_spec': 'Max tick difference: {0:.2f}',
}
}, {
'name': 'prc_dftxtjoin',
'kwargs': {
'dest_col': 'text',
'src_cols': [
'text_ticks',
'text_tick_comp',
'text_max_diff'
],
}
}, {
'name': 'prc_dfdrop',
'kwargs': {
'cols': [
'text_ticks',
'text_tick_comp',
'text_max_diff'
]
}
}, {
'name': 'prc_dftodict',
}]
return {
f: {
'ignore': True
} for f in IGNORE_LIST
} | {
'tvlad.dif.max.smp.avg': {
'rename': 'ltp max'
},
'tvlad.dif.min.smp.avg': {
'rename': 'ltp min'
},
'bck': {
'chart_args': {
'visible': 'legendonly',
},
'value_processors': _plot_procs_lad('bck', 'bcklad'),
},
'lay': {
'chart_args': {
'visible': 'legendonly',
},
'value_processors': _plot_procs_lad('lay', 'laylad'),
},
'ltp': {
'value_processors': prcs_ltp(
ltp='ltp',
tv='tv',
spread='spread',
split='split.sum',
),
'chart_args': {
'mode': 'lines+markers',
'visible': 'legendonly',
'line_color': 'black',
'marker': {
'colorscale': [
[0, 'rgb(255,0,0)'],
[1, 'rgb(0,255,0)']
],
'cmid': 0,
}
},
},
'split': {
'chart': 'Bar',
'chart_args': {
'marker': { # default plotly colours go white, so use a green to red scale
'colorscale': [
[0, 'rgb(250,50,50)'],
[1, 'rgb(50,250,50)']
],
'cmid': 0, # with grey 0 scale
},
'opacity': tv_opacity,
'width': bar_width_ms, # 1 seconds width of bars
'offset': 0, # end of bar to be aligned with timestamp
},
'trace_args': {
'secondary_y': True
},
'value_processors': prcs_tvbar('tv', bar_width_ms),
},
'split.sum': {
'chart_args': {
'visible': 'legendonly',
},
'trace_args': {
'secondary_y': True
},
},
'split.tot': {
# 'trace_args': {
# 'secondary_y': True
# },
'ignore': True
},
'ltp.smp.avg': {
'chart_args': _plot_colorscale(
color_0='rgb(255,255,0)',
color_1='rgb(0,0,255)' # yellow to blue scale
),
'value_processors': [{
'name': 'prc_ftrstodf',
'kwargs': {
'ftr_keys': {
'y': 'ltp.smp.avg',
'text': 'split.sum',
},
},
}, {
'name': 'prc_dffillna'
}, {
'name': 'prc_dfcp',
'kwargs': {
'col_src': 'text',
'col_out': 'marker_color'
}
}, {
'name': 'prc_dffmtstr',
'kwargs': {
'df_col': 'text',
'fmt_spec': 'Book split: £{0:.2f}'
}
}, {
'name': 'prc_dftodict',
}],
'rename': 'ltp smoothed'
},
'bck.smp.avg': {
# use red to green scale
'chart_args': _plot_colorscale(
color_0='rgb(255,0,0)',
color_1='rgb(0,255,0)',
),
'value_processors': smooth_value_processors(
ftr_src='bck.smp.avg',
ftr_tks='bck.tck.smp.avg',
ftr_cmp='bck.tck.smp.avg.cmp',
ftr_dif='bck.tck.mdf',
),
'rename': 'back smoothed'
},
'lay.smp.avg': {
# use red to green scale
'chart_args': _plot_colorscale(
color_0='rgb(255,0,0)',
color_1='rgb(0,255,0)',
),
'value_processors': smooth_value_processors(
ftr_src='lay.smp.avg',
ftr_tks='lay.tck.smp.avg',
ftr_cmp='lay.tck.smp.avg.cmp',
ftr_dif='lay.tck.mdf',
),
'rename': 'lay smoothed'
},
}
| [
1,
515,
19229,
1053,
2391,
29892,
360,
919,
29892,
28379,
13,
3166,
590,
13239,
29889,
29238,
279,
1053,
2169,
2132,
279,
13,
3166,
590,
13239,
1053,
21503,
4314,
13,
5215,
2897,
29892,
343,
8807,
13,
3166,
2897,
1053,
2224,
13,
5215,
4390,
13,
3166,
869,
11739,
29879,
1053,
5169,
1535,
3991,
2451,
13,
13,
13,
1727,
29918,
26762,
353,
2169,
2132,
279,
580,
13,
1727,
29918,
22100,
353,
2169,
2132,
279,
580,
13,
13,
10818,
29918,
8132,
3580,
1307,
353,
525,
29879,
1526,
29915,
13,
10818,
29918,
29909,
5348,
10461,
353,
525,
485,
29887,
29915,
13,
10818,
29918,
29911,
2965,
17557,
353,
525,
29873,
384,
29915,
13,
10818,
29918,
12648,
29918,
4571,
29943,
353,
525,
29885,
2176,
29915,
13,
10818,
29918,
21514,
29909,
1525,
353,
525,
21058,
29915,
13,
13,
13,
1990,
12782,
21575,
29901,
13,
1678,
8707,
18667,
29918,
29903,
4162,
29907,
353,
426,
13,
4706,
525,
978,
2396,
426,
13,
9651,
525,
1853,
2396,
851,
13,
4706,
2981,
13,
4706,
525,
19290,
2396,
426,
13,
9651,
525,
1853,
2396,
9657,
13,
4706,
500,
13,
1678,
500,
13,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
274,
16434,
29918,
3972,
29901,
851,
29892,
714,
29918,
3972,
29892,
1072,
29901,
2169,
2132,
279,
1125,
13,
4706,
1583,
3032,
16859,
29918,
3972,
353,
2224,
29889,
370,
1028,
493,
29898,
2084,
29889,
18837,
16908,
29898,
16859,
29918,
3972,
876,
13,
4706,
565,
451,
2224,
29889,
275,
3972,
29898,
1311,
3032,
16859,
29918,
3972,
1125,
13,
9651,
12020,
5169,
1535,
3991,
2451,
29898,
29888,
29915,
13305,
4516,
29850,
1311,
3032,
16859,
29918,
3972,
5038,
338,
451,
263,
3884,
1495,
13,
4706,
1583,
3032,
449,
29918,
3972,
353,
2224,
29889,
370,
1028,
493,
29898,
2084,
29889,
18837,
16908,
29898,
449,
29918,
3972,
876,
13,
4706,
565,
451,
2224,
29889,
275,
3972,
29898,
1311,
3032,
449,
29918,
3972,
1125,
13,
9651,
12020,
5169,
1535,
3991,
2451,
29898,
29888,
29915,
4905,
4516,
29850,
1311,
3032,
449,
29918,
3972,
5038,
338,
451,
263,
3884,
1495,
13,
4706,
1583,
3032,
1727,
353,
1072,
13,
13,
1678,
822,
19763,
29898,
1311,
1125,
13,
4706,
17117,
17117,
977,
264,
1280,
353,
2446,
29898,
359,
29889,
20919,
29898,
1311,
3032,
16859,
29918,
3972,
876,
13,
4706,
363,
7876,
297,
977,
264,
1280,
29901,
13,
9651,
282,
29918,
262,
353,
2224,
29889,
7122,
29898,
1311,
3032,
16859,
29918,
3972,
29892,
7876,
29897,
13,
9651,
411,
1722,
29898,
29886,
29918,
262,
29892,
525,
29878,
1495,
408,
285,
29901,
13,
18884,
848,
353,
285,
29889,
949,
580,
13,
9651,
934,
29918,
16859,
353,
343,
8807,
29889,
1359,
29898,
1272,
29892,
343,
8807,
29889,
13658,
10036,
29897,
13,
9651,
21503,
4314,
29889,
15480,
29918,
2917,
29898,
1445,
29918,
16859,
29892,
1583,
29889,
25903,
29918,
29903,
4162,
29907,
29897,
13,
9651,
1072,
29918,
22882,
353,
934,
29918,
16859,
1839,
978,
2033,
13,
9651,
1072,
29918,
19290,
353,
934,
29918,
16859,
1839,
19290,
2033,
13,
9651,
285,
509,
29918,
16859,
353,
1583,
3032,
1727,
29961,
1727,
29918,
22882,
850,
1068,
1727,
29918,
19290,
29897,
13,
9651,
282,
29918,
449,
353,
2224,
29889,
7122,
29898,
1311,
3032,
449,
29918,
3972,
29892,
7876,
29897,
13,
9651,
411,
1722,
29898,
29886,
29918,
449,
29892,
525,
29893,
1495,
408,
285,
29901,
13,
18884,
285,
29889,
3539,
29898,
25162,
29889,
15070,
29898,
29888,
509,
29918,
16859,
29892,
2656,
29918,
8149,
29922,
8824,
876,
13,
9651,
282,
29918,
449,
29918,
3126,
353,
2224,
29889,
23579,
568,
486,
29898,
29886,
29918,
449,
9601,
29900,
29962,
718,
15300,
3126,
29915,
13,
9651,
411,
1722,
29898,
29886,
29918,
449,
29918,
3126,
29892,
525,
29893,
1495,
408,
285,
29901,
13,
18884,
285,
29889,
3539,
29898,
3126,
29889,
29881,
17204,
29898,
29888,
509,
29918,
16859,
29892,
29536,
29922,
29906,
29892,
2656,
29918,
8149,
29922,
8824,
876,
13,
13,
13,
1753,
903,
5317,
29918,
771,
2395,
29918,
4528,
29898,
29888,
509,
29918,
1989,
29892,
11979,
29918,
1989,
1125,
13,
1678,
9995,
2457,
1889,
943,
304,
788,
11979,
672,
4682,
310,
8666,
15786,
304,
1250,
29914,
8387,
4682,
15945,
29908,
13,
1678,
736,
518,
13,
4706,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29888,
509,
303,
397,
29888,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
29888,
509,
29918,
8149,
2396,
426,
13,
462,
1678,
525,
29891,
2396,
285,
509,
29918,
1989,
29892,
13,
462,
1678,
525,
726,
2396,
11979,
29918,
1989,
13,
18884,
500,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
600,
4378,
567,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
2176,
29918,
1054,
2396,
525,
726,
29915,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
615,
397,
919,
29915,
13,
4706,
500,
13,
1678,
4514,
13,
13,
13,
1753,
903,
5317,
29918,
27703,
29883,
744,
29898,
2780,
29918,
29900,
29892,
2927,
29918,
29896,
29897,
1599,
360,
919,
29901,
13,
1678,
5124,
6937,
15425,
29918,
5085,
29952,
2980,
304,
731,
11955,
29883,
744,
411,
3454,
29974,
3502,
414,
15945,
29908,
13,
1678,
736,
426,
13,
4706,
525,
8513,
2396,
525,
9012,
29974,
3502,
414,
742,
13,
4706,
525,
1220,
29918,
2780,
2396,
525,
8517,
742,
13,
4706,
525,
22976,
2396,
426,
13,
9651,
525,
27703,
29883,
744,
2396,
518,
13,
18884,
518,
29900,
29892,
2927,
29918,
29900,
1402,
13,
18884,
518,
29896,
29892,
2927,
29918,
29896,
29962,
13,
9651,
21251,
13,
9651,
525,
4912,
333,
2396,
29871,
29900,
29892,
13,
4706,
500,
13,
1678,
500,
13,
13,
13,
1753,
903,
29888,
509,
29918,
3844,
6983,
29898,
11249,
29918,
1516,
29892,
7090,
29918,
2798,
1125,
13,
1678,
9995,
1491,
29899,
22100,
2295,
363,
23460,
322,
769,
8401,
6588,
15945,
29908,
13,
1678,
736,
426,
13,
4706,
14636,
29918,
8132,
3580,
1307,
29901,
29871,
426,
13,
9651,
525,
978,
2396,
525,
29934,
9998,
981,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
19145,
293,
29918,
1516,
2396,
4559,
29918,
1516,
29892,
13,
18884,
525,
8173,
29918,
2798,
2396,
7090,
29918,
2798,
29892,
13,
18884,
525,
1491,
29918,
22100,
29918,
2917,
2396,
426,
13,
462,
1678,
14636,
29918,
29909,
5348,
10461,
29901,
426,
13,
462,
4706,
525,
978,
2396,
525,
29934,
22192,
29894,
12810,
29887,
29915,
13,
462,
1678,
500,
13,
18884,
500,
13,
9651,
500,
13,
4706,
500,
13,
1678,
500,
13,
13,
13,
1753,
903,
29888,
509,
29918,
24667,
29898,
1491,
29918,
22100,
29918,
2917,
29922,
8516,
1125,
13,
1678,
9995,
1491,
29899,
14394,
17415,
3847,
304,
16892,
15945,
29908,
13,
1678,
736,
426,
13,
4706,
525,
978,
2396,
525,
16802,
19132,
4035,
742,
13,
4706,
525,
19290,
2396,
426,
13,
9651,
525,
1767,
29918,
5014,
943,
29918,
2917,
2396,
15974,
13,
18884,
525,
978,
2396,
525,
1767,
29918,
26482,
29918,
517,
29918,
24667,
742,
13,
9651,
500,
1402,
13,
9651,
525,
1491,
29918,
22100,
29918,
2917,
2396,
1014,
29918,
22100,
29918,
2917,
29892,
13,
4706,
2981,
13,
1678,
500,
13,
13,
13,
1753,
903,
29888,
509,
29918,
12427,
4528,
29898,
7165,
29918,
29879,
29892,
23460,
29918,
1516,
29892,
7090,
29918,
2798,
1125,
13,
1678,
9995,
509,
11932,
7977,
421,
8050,
29931,
328,
29952,
4682,
1014,
29899,
2917,
363,
4969,
4236,
29914,
1195,
1819,
975,
3474,
29892,
23460,
769,
8401,
1029,
29887,
15945,
29908,
13,
1678,
736,
426,
13,
4706,
525,
8173,
29918,
344,
2395,
2396,
3474,
29918,
29879,
29892,
13,
4706,
525,
8173,
29918,
26102,
7165,
2396,
7700,
29892,
13,
4706,
525,
1491,
29918,
22100,
29918,
2917,
2396,
426,
13,
9651,
525,
29881,
361,
2396,
426,
13,
18884,
525,
978,
2396,
525,
29934,
7818,
29963,
29931,
328,
29928,
361,
742,
13,
18884,
525,
19290,
2396,
426,
13,
462,
1678,
525,
1491,
29918,
22100,
29918,
2917,
2396,
426,
13,
462,
4706,
525,
3317,
2396,
426,
13,
462,
9651,
525,
978,
2396,
525,
29934,
7818,
29963,
29931,
328,
7976,
742,
13,
462,
9651,
525,
19290,
2396,
426,
13,
462,
18884,
525,
1491,
29918,
22100,
29918,
2917,
2396,
903,
29888,
509,
29918,
3844,
6983,
29898,
13445,
10335,
29918,
1516,
29892,
7090,
29918,
2798,
29897,
13,
462,
9651,
500,
13,
462,
4706,
2981,
13,
462,
4706,
525,
1195,
2396,
426,
13,
462,
9651,
525,
978,
2396,
525,
29934,
7818,
29963,
29931,
328,
8140,
742,
13,
462,
9651,
525,
19290,
2396,
426,
13,
462,
18884,
525,
1491,
29918,
22100,
29918,
2917,
2396,
903,
29888,
509,
29918,
3844,
6983,
29898,
13445,
10335,
29918,
1516,
29892,
7090,
29918,
2798,
29897,
13,
462,
9651,
500,
13,
462,
4706,
500,
13,
462,
1678,
500,
13,
18884,
500,
13,
9651,
500,
13,
4706,
500,
13,
1678,
500,
13,
13,
13,
29992,
1727,
29918,
22100,
29889,
9573,
29918,
5029,
13,
1753,
4682,
29918,
2917,
29879,
29918,
1028,
9345,
29898,
13,
4706,
302,
29918,
4528,
672,
29918,
17664,
29892,
13,
4706,
302,
29918,
29893,
290,
29918,
29873,
7358,
29892,
13,
4706,
301,
9392,
29918,
7165,
29918,
2103,
29918,
29879,
29892,
13,
4706,
301,
9392,
29918,
7165,
29918,
13445,
10335,
29918,
1516,
29892,
13,
4706,
301,
9392,
29918,
7165,
29918,
13445,
10335,
29918,
2798,
29892,
13,
4706,
9677,
29918,
13445,
10335,
29918,
1516,
29892,
13,
4706,
9677,
29918,
13445,
10335,
29918,
2798,
29892,
13,
29897,
1599,
360,
919,
29961,
710,
29892,
360,
919,
5387,
13,
1678,
9995,
13,
1678,
3617,
263,
9657,
310,
2322,
28877,
5680,
29892,
988,
1269,
6251,
338,
263,
8600,
310,
29901,
13,
1678,
448,
1820,
29901,
4682,
8744,
1024,
13,
1678,
448,
995,
29901,
9657,
310,
13,
4706,
448,
525,
978,
2396,
770,
1024,
310,
4682,
13,
4706,
448,
525,
19290,
2396,
9657,
310,
5823,
6273,
1304,
746,
4969,
4682,
13,
1678,
9995,
13,
13,
1678,
822,
301,
9392,
29918,
5080,
29918,
19290,
29898,
11249,
29918,
1516,
29892,
7090,
29918,
2798,
1125,
13,
4706,
270,
353,
426,
13,
9651,
525,
1491,
29918,
22100,
29918,
2917,
2396,
426,
13,
18884,
525,
29879,
1526,
2396,
426,
13,
462,
1678,
525,
978,
2396,
525,
29934,
9998,
981,
742,
13,
462,
1678,
525,
19290,
2396,
426,
13,
462,
4706,
525,
19145,
293,
29918,
1516,
2396,
4559,
29918,
1516,
29892,
13,
462,
4706,
525,
8173,
29918,
2798,
2396,
7090,
29918,
2798,
29892,
13,
462,
4706,
525,
1491,
29918,
22100,
29918,
2917,
2396,
426,
13,
462,
9651,
525,
485,
29887,
2396,
426,
13,
462,
18884,
525,
978,
2396,
525,
29934,
22192,
29894,
12810,
29887,
29915,
13,
462,
9651,
500,
13,
462,
4706,
500,
13,
462,
1678,
500,
13,
18884,
500,
13,
9651,
500,
13,
4706,
500,
13,
4706,
736,
270,
13,
13,
1678,
736,
426,
13,
13,
4706,
525,
13318,
1250,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
18426,
384,
742,
13,
4706,
2981,
13,
13,
4706,
525,
13318,
6568,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
10536,
388,
742,
13,
4706,
2981,
13,
13,
4706,
525,
1627,
11979,
672,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
10536,
328,
29933,
384,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
29876,
29918,
17664,
2396,
302,
29918,
4528,
672,
29918,
17664,
29892,
13,
9651,
500,
13,
4706,
2981,
13,
13,
4706,
525,
8387,
11979,
672,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
10536,
328,
29931,
388,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
29876,
29918,
17664,
2396,
302,
29918,
4528,
672,
29918,
17664,
29892,
13,
9651,
500,
13,
4706,
2981,
13,
13,
4706,
525,
29893,
290,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
29943,
29956,
6488,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
29893,
290,
29918,
29873,
7358,
2396,
302,
29918,
29893,
290,
29918,
29873,
7358,
13,
9651,
2981,
13,
4706,
2981,
13,
13,
4706,
525,
12427,
4528,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
7818,
29963,
29931,
328,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
8173,
29918,
344,
2395,
2396,
301,
9392,
29918,
7165,
29918,
2103,
29918,
29879,
29892,
13,
18884,
525,
8173,
29918,
26102,
7165,
2396,
7700,
29892,
13,
18884,
525,
1491,
29918,
22100,
29918,
2917,
2396,
426,
13,
462,
1678,
525,
29881,
361,
2396,
426,
13,
462,
4706,
525,
978,
2396,
525,
29934,
7818,
29963,
29931,
328,
29928,
361,
742,
13,
462,
4706,
525,
19290,
2396,
426,
13,
462,
9651,
525,
1491,
29918,
22100,
29918,
2917,
2396,
426,
13,
462,
18884,
525,
3317,
2396,
426,
13,
462,
462,
1678,
525,
978,
2396,
525,
29934,
7818,
29963,
29931,
328,
7976,
742,
13,
462,
462,
1678,
525,
19290,
2396,
301,
9392,
29918,
5080,
29918,
19290,
29898,
1896,
29886,
29918,
7165,
29918,
13445,
10335,
29918,
1516,
29892,
301,
9392,
29918,
7165,
29918,
13445,
10335,
29918,
2798,
29897,
13,
462,
18884,
2981,
13,
462,
18884,
525,
1195,
2396,
426,
13,
462,
462,
1678,
525,
978,
2396,
525,
29934,
7818,
29963,
29931,
328,
8140,
742,
13,
462,
462,
1678,
525,
19290,
2396,
301,
9392,
29918,
5080,
29918,
19290,
29898,
1896,
29886,
29918,
7165,
29918,
13445,
10335,
29918,
1516,
29892,
301,
9392,
29918,
7165,
29918,
13445,
10335,
29918,
2798,
29897,
13,
462,
18884,
2981,
13,
462,
18884,
525,
1028,
949,
2396,
426,
13,
462,
462,
1678,
525,
978,
2396,
525,
29934,
7818,
29963,
29931,
328,
5592,
949,
29915,
13,
462,
18884,
500,
13,
462,
9651,
500,
13,
462,
4706,
500,
13,
462,
1678,
500,
13,
18884,
500,
13,
9651,
500,
13,
4706,
2981,
13,
13,
4706,
525,
1896,
29886,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
10536,
3557,
742,
13,
4706,
2981,
13,
13,
4706,
525,
12427,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
7818,
29963,
29911,
327,
742,
13,
4706,
2981,
13,
13,
4706,
525,
1028,
949,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
10536,
328,
29903,
558,
29881,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
1491,
29918,
22100,
29918,
2917,
2396,
426,
13,
462,
1678,
525,
29879,
1526,
2396,
426,
13,
462,
4706,
525,
978,
2396,
525,
29934,
9998,
981,
742,
13,
462,
4706,
525,
19290,
2396,
426,
13,
462,
9651,
525,
19145,
293,
29918,
1516,
2396,
9677,
29918,
13445,
10335,
29918,
1516,
29892,
13,
462,
9651,
525,
8173,
29918,
2798,
2396,
9677,
29918,
13445,
10335,
29918,
2798,
29892,
13,
462,
9651,
525,
1491,
29918,
22100,
29918,
2917,
2396,
426,
13,
462,
18884,
525,
485,
29887,
2396,
426,
13,
462,
462,
1678,
525,
978,
2396,
525,
29934,
22192,
29894,
12810,
29887,
29915,
13,
462,
18884,
500,
13,
462,
9651,
500,
13,
462,
4706,
500,
13,
462,
1678,
500,
13,
18884,
500,
13,
9651,
500,
13,
4706,
500,
13,
1678,
500,
13,
13,
13,
29992,
1727,
29918,
26762,
29889,
9573,
29918,
5029,
13,
1753,
6492,
29918,
2917,
29879,
29918,
1028,
9345,
29898,
13,
4706,
301,
9392,
29918,
12765,
29918,
28193,
29892,
13,
4706,
301,
9392,
29918,
12765,
29918,
29879,
29892,
13,
4706,
9631,
29918,
2103,
29918,
1516,
13,
1125,
13,
1678,
306,
29954,
6632,
1525,
353,
518,
13,
4706,
525,
1627,
11979,
672,
742,
13,
4706,
525,
8387,
11979,
672,
742,
13,
4706,
525,
1028,
949,
742,
13,
4706,
525,
1028,
949,
29889,
29879,
1526,
742,
13,
4706,
525,
1028,
949,
29889,
29879,
1526,
29889,
485,
29887,
742,
13,
4706,
525,
29893,
290,
742,
13,
4706,
525,
12427,
4528,
742,
13,
4706,
525,
12427,
4528,
29889,
29881,
361,
742,
13,
4706,
525,
12427,
4528,
29889,
29881,
361,
29889,
3317,
742,
13,
4706,
525,
12427,
4528,
29889,
29881,
361,
29889,
3317,
29889,
29879,
1526,
742,
13,
4706,
525,
12427,
4528,
29889,
29881,
361,
742,
13,
4706,
525,
12427,
4528,
29889,
29881,
361,
29889,
1028,
949,
742,
13,
4706,
525,
12427,
4528,
29889,
29881,
361,
29889,
1195,
742,
13,
4706,
525,
12427,
4528,
29889,
29881,
361,
29889,
1195,
29889,
29879,
1526,
742,
13,
1678,
4514,
13,
13,
1678,
736,
426,
13,
4706,
413,
29901,
426,
13,
9651,
525,
17281,
2396,
5852,
13,
4706,
500,
363,
413,
297,
306,
29954,
6632,
1525,
13,
1678,
500,
891,
426,
13,
4706,
525,
13318,
1250,
2396,
426,
13,
9651,
525,
1767,
29918,
5014,
943,
2396,
903,
5317,
29918,
771,
2395,
29918,
4528,
877,
13318,
1250,
742,
525,
1627,
11979,
672,
5477,
13,
4706,
2981,
13,
4706,
525,
13318,
6568,
2396,
426,
13,
9651,
525,
1767,
29918,
5014,
943,
2396,
903,
5317,
29918,
771,
2395,
29918,
4528,
877,
13318,
6568,
742,
525,
8387,
11979,
672,
1495,
13,
4706,
2981,
13,
4706,
525,
1896,
29886,
2396,
426,
13,
9651,
525,
15425,
29918,
5085,
2396,
426,
13,
18884,
525,
8513,
2396,
525,
9012,
29974,
3502,
414,
29915,
13,
9651,
2981,
13,
9651,
525,
1767,
29918,
5014,
943,
2396,
15974,
13,
18884,
525,
978,
2396,
525,
558,
29883,
29918,
29888,
509,
303,
397,
29888,
742,
13,
18884,
525,
19290,
2396,
426,
13,
462,
1678,
525,
29888,
509,
29918,
8149,
2396,
426,
13,
462,
4706,
525,
29891,
2396,
525,
1896,
29886,
742,
13,
462,
4706,
525,
726,
2396,
525,
12427,
742,
13,
462,
1678,
500,
13,
18884,
500,
13,
9651,
2981,
426,
13,
18884,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
600,
453,
1056,
29915,
13,
9651,
2981,
426,
13,
18884,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
600,
4378,
710,
742,
13,
18884,
525,
19290,
2396,
426,
13,
462,
1678,
525,
2176,
29918,
1054,
2396,
525,
726,
742,
13,
462,
1678,
525,
23479,
29918,
6550,
2396,
525,
2308,
11932,
16934,
29901,
15151,
29912,
29900,
29901,
29889,
29906,
29888,
10162,
13,
18884,
500,
13,
9651,
2981,
426,
13,
18884,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
615,
397,
919,
742,
13,
9651,
500,
1402,
13,
4706,
2981,
13,
4706,
525,
12427,
2396,
426,
13,
9651,
525,
15425,
2396,
525,
4297,
742,
13,
9651,
525,
15425,
29918,
5085,
2396,
426,
13,
18884,
525,
22976,
2396,
426,
13,
462,
1678,
525,
27703,
29883,
744,
2396,
518,
13,
462,
4706,
518,
29900,
29892,
525,
23973,
29898,
29906,
29945,
29900,
29892,
29945,
29900,
29892,
29945,
29900,
29897,
7464,
13,
462,
4706,
518,
29896,
29892,
525,
23973,
29898,
29945,
29900,
29892,
29906,
29945,
29900,
29892,
29945,
29900,
29897,
2033,
13,
462,
1678,
21251,
29871,
396,
2322,
6492,
368,
28061,
748,
4796,
29892,
577,
671,
263,
7933,
304,
2654,
6287,
13,
462,
1678,
525,
4912,
333,
2396,
29871,
29900,
29892,
29871,
396,
411,
18345,
29871,
29900,
6287,
13,
18884,
2981,
13,
18884,
525,
28193,
2396,
301,
9392,
29918,
12765,
29918,
28193,
29892,
13,
18884,
525,
2103,
2396,
9631,
29918,
2103,
29918,
1516,
29892,
29871,
396,
29871,
29896,
6923,
2920,
310,
22306,
13,
18884,
525,
10289,
2396,
29871,
29900,
29892,
29871,
396,
1095,
310,
2594,
304,
367,
26118,
411,
14334,
13,
9651,
2981,
13,
9651,
525,
15003,
29918,
5085,
2396,
426,
13,
18884,
525,
7496,
653,
29918,
29891,
2396,
5852,
13,
9651,
2981,
13,
9651,
525,
1767,
29918,
5014,
943,
2396,
15974,
13,
18884,
525,
978,
2396,
525,
558,
29883,
29918,
2176,
12765,
29915,
13,
9651,
2981,
426,
13,
18884,
525,
978,
2396,
525,
558,
29883,
29918,
657,
29888,
509,
742,
13,
18884,
525,
8149,
2396,
426,
13,
462,
1678,
525,
1989,
29918,
449,
2396,
525,
1989,
29918,
29896,
29915,
13,
18884,
2981,
13,
18884,
525,
19290,
2396,
426,
13,
462,
1678,
525,
29888,
509,
29918,
1989,
2396,
525,
29893,
290,
742,
13,
18884,
500,
13,
9651,
2981,
426,
13,
18884,
525,
978,
2396,
525,
558,
29883,
29918,
2423,
615,
397,
29888,
742,
13,
18884,
525,
19290,
2396,
426,
13,
462,
1678,
525,
9721,
29918,
16859,
2396,
426,
13,
462,
4706,
525,
29891,
2396,
525,
1989,
29918,
29900,
742,
13,
462,
4706,
525,
726,
2396,
525,
1989,
29918,
29896,
29915,
13,
462,
1678,
2981,
13,
18884,
500,
13,
9651,
2981,
426,
13,
18884,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
615,
7384,
742,
13,
18884,
525,
19290,
2396,
426,
13,
462,
1678,
525,
29881,
8768,
2396,
426,
13,
462,
4706,
525,
29891,
2396,
525,
7411,
742,
13,
462,
4706,
525,
726,
2396,
525,
7411,
742,
13,
462,
1678,
500,
13,
18884,
500,
13,
9651,
2981,
426,
13,
18884,
525,
978,
2396,
525,
558,
29883,
29918,
690,
1526,
742,
13,
18884,
525,
19290,
2396,
426,
13,
462,
1678,
525,
29876,
29918,
23128,
2396,
9631,
29918,
2103,
29918,
1516,
29914,
29896,
29900,
29900,
29900,
29892,
13,
462,
1678,
525,
16170,
29918,
2220,
2396,
426,
13,
462,
4706,
525,
29891,
2396,
525,
2083,
742,
13,
462,
4706,
525,
726,
2396,
525,
12676,
742,
13,
462,
1678,
500,
13,
18884,
500,
13,
9651,
2981,
426,
13,
18884,
525,
978,
2396,
525,
558,
29883,
29918,
2176,
6814,
742,
13,
18884,
525,
19290,
2396,
426,
13,
462,
1678,
525,
1054,
29918,
4351,
2396,
525,
726,
742,
13,
462,
1678,
525,
1054,
29918,
449,
2396,
525,
22976,
29918,
2780,
29915,
13,
18884,
500,
13,
9651,
2981,
426,
13,
18884,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
600,
4378,
710,
742,
13,
18884,
525,
19290,
2396,
426,
13,
462,
1678,
525,
2176,
29918,
1054,
2396,
525,
726,
742,
13,
462,
1678,
525,
23479,
29918,
6550,
2396,
525,
22676,
310,
341,
4992,
29901,
15151,
29912,
29900,
29901,
29889,
29906,
29888,
10162,
13,
18884,
2981,
13,
9651,
2981,
426,
13,
18884,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
615,
397,
919,
29915,
13,
9651,
500,
1402,
13,
4706,
2981,
13,
4706,
525,
12427,
4528,
29889,
29881,
361,
29889,
3317,
29889,
29879,
1526,
29889,
485,
29887,
2396,
426,
13,
9651,
525,
1267,
420,
2396,
525,
1896,
29886,
4236,
29915,
13,
4706,
2981,
13,
4706,
525,
12427,
4528,
29889,
29881,
361,
29889,
1195,
29889,
29879,
1526,
29889,
485,
29887,
2396,
426,
13,
9651,
525,
1267,
420,
2396,
525,
1896,
29886,
1375,
29915,
13,
4706,
500,
13,
1678,
500,
13,
13,
13,
29992,
1727,
29918,
22100,
29889,
9573,
29918,
5029,
13,
1753,
4682,
29918,
2917,
29879,
29918,
3844,
6983,
29898,
13,
1678,
9677,
29918,
13445,
10335,
29918,
1516,
29892,
13,
1678,
9677,
29918,
13445,
10335,
29918,
2798,
29892,
13,
1678,
281,
290,
29918,
29873,
7358,
29892,
13,
1678,
301,
9392,
29918,
7165,
29918,
2103,
29918,
29879,
29892,
13,
1678,
301,
9392,
29918,
7165,
29918,
13445,
10335,
29918,
1516,
29892,
13,
1678,
301,
9392,
29918,
7165,
29918,
13445,
10335,
29918,
2798,
29892,
13,
1678,
11979,
672,
29918,
13445,
10335,
29918,
1516,
29892,
13,
1678,
11979,
672,
29918,
13445,
10335,
29918,
2798,
29892,
13,
1678,
301,
9392,
29918,
13445,
10335,
29918,
1516,
29892,
13,
1678,
301,
9392,
29918,
13445,
10335,
29918,
2798,
29892,
13,
1678,
302,
29918,
4528,
672,
29918,
17664,
29892,
13,
1678,
2923,
29918,
29879,
29892,
13,
1678,
6219,
29918,
2083,
29918,
29879,
29892,
13,
1125,
13,
1678,
822,
2625,
29918,
19290,
29898,
12765,
29918,
29879,
29892,
11979,
672,
29918,
13445,
10335,
29918,
1516,
29892,
11979,
672,
29918,
13445,
10335,
29918,
2798,
29897,
1599,
360,
919,
29901,
13,
4706,
736,
426,
13,
9651,
525,
8173,
29918,
344,
2395,
2396,
2923,
29918,
29879,
29892,
13,
9651,
525,
8173,
29918,
26102,
7165,
2396,
7700,
29892,
13,
9651,
525,
1491,
29918,
22100,
29918,
2917,
2396,
426,
13,
18884,
14636,
29918,
29911,
2965,
17557,
29901,
426,
13,
462,
1678,
525,
978,
2396,
525,
29934,
7818,
860,
742,
13,
462,
1678,
525,
19290,
2396,
426,
13,
462,
4706,
525,
8173,
29918,
344,
2395,
2396,
2923,
29918,
29879,
29892,
13,
462,
4706,
525,
8173,
29918,
26102,
7165,
2396,
7700,
29892,
13,
462,
4706,
525,
1491,
29918,
22100,
29918,
2917,
2396,
426,
13,
462,
9651,
14636,
29918,
12648,
29918,
4571,
29943,
29901,
426,
13,
462,
18884,
525,
978,
2396,
525,
29934,
29943,
7976,
29928,
361,
29915,
13,
462,
9651,
2981,
13,
462,
9651,
14636,
29918,
8132,
3580,
1307,
29901,
426,
13,
462,
18884,
525,
978,
2396,
525,
29934,
9998,
981,
742,
13,
462,
18884,
525,
19290,
2396,
426,
13,
462,
462,
1678,
525,
19145,
293,
29918,
1516,
2396,
11979,
672,
29918,
13445,
10335,
29918,
1516,
29892,
13,
462,
462,
1678,
525,
8173,
29918,
2798,
2396,
11979,
672,
29918,
13445,
10335,
29918,
2798,
29892,
13,
462,
462,
1678,
525,
1491,
29918,
22100,
29918,
2917,
2396,
426,
13,
462,
462,
4706,
14636,
29918,
29909,
5348,
10461,
29901,
426,
13,
462,
462,
9651,
525,
978,
2396,
525,
29934,
22192,
29894,
12810,
29887,
742,
13,
462,
462,
9651,
525,
19290,
2396,
426,
13,
462,
462,
18884,
525,
8173,
29918,
344,
2395,
2396,
2923,
29918,
29879,
29892,
13,
462,
462,
18884,
525,
1491,
29918,
22100,
29918,
2917,
2396,
426,
13,
462,
462,
462,
1678,
14636,
29918,
21514,
29909,
1525,
29901,
426,
13,
462,
462,
462,
4706,
525,
978,
2396,
525,
29934,
26453,
361,
29915,
13,
462,
462,
462,
1678,
500,
13,
462,
462,
18884,
500,
13,
462,
462,
9651,
500,
13,
462,
462,
4706,
500,
13,
462,
462,
1678,
500,
13,
462,
18884,
500,
13,
462,
9651,
500,
13,
462,
4706,
500,
13,
462,
1678,
500,
13,
18884,
2981,
13,
18884,
14636,
29918,
8132,
3580,
1307,
29901,
426,
13,
462,
1678,
525,
978,
2396,
525,
29934,
9998,
981,
742,
13,
462,
1678,
525,
19290,
2396,
426,
13,
462,
4706,
525,
19145,
293,
29918,
1516,
2396,
11979,
672,
29918,
13445,
10335,
29918,
1516,
29892,
13,
462,
4706,
525,
8173,
29918,
2798,
2396,
11979,
672,
29918,
13445,
10335,
29918,
2798,
29892,
13,
462,
4706,
525,
1491,
29918,
22100,
29918,
2917,
2396,
426,
13,
462,
9651,
14636,
29918,
29909,
5348,
10461,
29901,
426,
13,
462,
18884,
525,
978,
2396,
525,
29934,
22192,
29894,
12810,
29887,
29915,
13,
462,
9651,
500,
13,
462,
4706,
500,
13,
462,
1678,
500,
13,
18884,
500,
13,
9651,
500,
13,
4706,
500,
13,
13,
1678,
736,
426,
13,
4706,
525,
1028,
949,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
10536,
328,
29903,
558,
29881,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
1491,
29918,
22100,
29918,
2917,
2396,
903,
29888,
509,
29918,
3844,
6983,
29898,
13,
462,
1678,
9677,
29918,
13445,
10335,
29918,
1516,
29892,
13,
462,
1678,
9677,
29918,
13445,
10335,
29918,
2798,
13,
18884,
1723,
13,
9651,
500,
13,
4706,
2981,
13,
13,
4706,
525,
8387,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
10536,
388,
742,
13,
9651,
525,
19290,
2396,
2625,
29918,
19290,
29898,
12765,
29918,
29879,
29892,
11979,
672,
29918,
13445,
10335,
29918,
1516,
29892,
11979,
672,
29918,
13445,
10335,
29918,
2798,
29897,
13,
4706,
2981,
13,
13,
4706,
525,
29890,
384,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
18426,
384,
742,
13,
9651,
525,
19290,
2396,
2625,
29918,
19290,
29898,
12765,
29918,
29879,
29892,
11979,
672,
29918,
13445,
10335,
29918,
1516,
29892,
11979,
672,
29918,
13445,
10335,
29918,
2798,
29897,
13,
4706,
2981,
13,
13,
4706,
525,
1896,
29886,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
10536,
3557,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
1491,
29918,
22100,
29918,
2917,
2396,
903,
29888,
509,
29918,
3844,
6983,
29898,
13,
462,
1678,
301,
9392,
29918,
13445,
10335,
29918,
1516,
29892,
13,
462,
1678,
301,
9392,
29918,
13445,
10335,
29918,
2798,
13,
18884,
10353,
13,
9651,
500,
13,
4706,
2981,
13,
13,
4706,
525,
12427,
4528,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
7818,
29963,
29931,
328,
742,
13,
9651,
525,
19290,
2396,
903,
29888,
509,
29918,
12427,
4528,
29898,
13,
18884,
301,
9392,
29918,
7165,
29918,
2103,
29918,
29879,
29892,
13,
18884,
301,
9392,
29918,
7165,
29918,
13445,
10335,
29918,
1516,
29892,
13,
18884,
301,
9392,
29918,
7165,
29918,
13445,
10335,
29918,
2798,
13,
9651,
1723,
13,
4706,
2981,
13,
13,
4706,
525,
29890,
384,
4528,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
10536,
328,
29933,
384,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
29876,
29918,
17664,
2396,
302,
29918,
4528,
672,
29918,
17664,
29892,
13,
9651,
500,
13,
4706,
2981,
13,
13,
4706,
525,
8387,
4528,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
10536,
328,
29931,
388,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
29876,
29918,
17664,
2396,
302,
29918,
4528,
672,
29918,
17664,
29892,
13,
9651,
500,
13,
4706,
2981,
13,
13,
4706,
525,
29893,
290,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
29943,
29956,
6488,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
29893,
290,
29918,
29873,
7358,
2396,
281,
290,
29918,
29873,
7358,
13,
9651,
2981,
13,
4706,
2981,
13,
13,
4706,
525,
5451,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
18426,
29895,
18772,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
8173,
29918,
344,
2395,
2396,
6219,
29918,
2083,
29918,
29879,
29892,
13,
18884,
525,
8173,
29918,
26102,
7165,
2396,
7700,
29892,
13,
18884,
525,
1491,
29918,
22100,
29918,
2917,
2396,
426,
13,
462,
1678,
525,
2083,
2396,
426,
13,
462,
4706,
525,
978,
2396,
525,
29934,
9998,
398,
29915,
13,
462,
1678,
2981,
13,
462,
1678,
525,
4260,
2396,
426,
13,
462,
4706,
525,
978,
2396,
525,
29934,
29943,
797,
29883,
11139,
29915,
13,
462,
1678,
500,
13,
18884,
500,
13,
9651,
500,
13,
4706,
2981,
13,
4706,
525,
12427,
2396,
426,
13,
9651,
525,
978,
2396,
525,
29934,
7818,
29963,
29911,
327,
742,
13,
4706,
2981,
13,
1678,
500,
13,
13,
13,
29992,
1727,
29918,
26762,
29889,
9573,
29918,
5029,
13,
1753,
6492,
29918,
2917,
29879,
29918,
3844,
6983,
29898,
1646,
29918,
2103,
29918,
1516,
29892,
9631,
29918,
28193,
1125,
13,
1678,
306,
29954,
6632,
1525,
29918,
24360,
353,
518,
13,
4706,
525,
29890,
384,
4528,
742,
13,
4706,
525,
8387,
4528,
742,
13,
4706,
525,
29893,
290,
742,
13,
4706,
525,
1028,
949,
742,
13,
4706,
525,
1028,
949,
29889,
29879,
1526,
742,
13,
4706,
525,
1028,
949,
29889,
29879,
1526,
29889,
485,
29887,
742,
13,
4706,
525,
12427,
742,
13,
4706,
525,
29890,
384,
29889,
29879,
1526,
742,
13,
4706,
525,
8387,
29889,
29879,
1526,
742,
13,
4706,
525,
29890,
384,
29889,
29873,
384,
742,
13,
4706,
525,
8387,
29889,
29873,
384,
742,
13,
4706,
525,
29890,
384,
29889,
29873,
384,
29889,
29885,
2176,
742,
13,
4706,
525,
8387,
29889,
29873,
384,
29889,
29885,
2176,
742,
13,
4706,
525,
29890,
384,
29889,
29873,
384,
29889,
29879,
1526,
742,
13,
4706,
525,
8387,
29889,
29873,
384,
29889,
29879,
1526,
742,
13,
4706,
525,
29890,
384,
29889,
29873,
384,
29889,
29879,
1526,
29889,
485,
29887,
742,
13,
4706,
525,
8387,
29889,
29873,
384,
29889,
29879,
1526,
29889,
485,
29887,
742,
13,
4706,
525,
29890,
384,
29889,
29873,
384,
29889,
29879,
1526,
29889,
485,
29887,
29889,
21058,
742,
13,
4706,
525,
8387,
29889,
29873,
384,
29889,
29879,
1526,
29889,
485,
29887,
29889,
21058,
742,
13,
4706,
525,
1896,
29886,
29889,
29879,
1526,
742,
13,
4706,
525,
12427,
4528,
742,
13,
4706,
525,
12427,
4528,
29889,
29881,
361,
742,
13,
4706,
525,
12427,
4528,
29889,
29881,
361,
29889,
3317,
742,
13,
4706,
525,
12427,
4528,
29889,
29881,
361,
29889,
3317,
29889,
29879,
1526,
742,
13,
4706,
525,
12427,
4528,
29889,
29881,
361,
742,
13,
4706,
525,
12427,
4528,
29889,
29881,
361,
29889,
1195,
742,
13,
4706,
525,
12427,
4528,
29889,
29881,
361,
29889,
1195,
29889,
29879,
1526,
742,
13,
1678,
4514,
13,
13,
1678,
822,
544,
2395,
29918,
1896,
29886,
29898,
1896,
29886,
29892,
9631,
29892,
9677,
29892,
6219,
29897,
1599,
2391,
29961,
21533,
5387,
13,
4706,
736,
15974,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29888,
509,
303,
397,
29888,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
29888,
509,
29918,
8149,
2396,
426,
13,
462,
1678,
525,
29891,
2396,
301,
9392,
29892,
13,
462,
1678,
525,
12427,
29918,
726,
2396,
9631,
29892,
13,
462,
1678,
525,
1028,
949,
29918,
726,
2396,
9677,
29892,
13,
462,
1678,
525,
5451,
29918,
726,
2396,
6219,
29892,
13,
462,
1678,
525,
22976,
29918,
2780,
2396,
525,
29893,
290,
742,
13,
462,
1678,
525,
29893,
290,
29918,
726,
2396,
525,
29893,
290,
742,
13,
18884,
500,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
600,
453,
1056,
742,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
600,
4378,
710,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
2176,
29918,
1054,
2396,
525,
1028,
949,
29918,
726,
742,
13,
18884,
525,
23479,
29918,
6550,
2396,
525,
5592,
949,
29901,
426,
29900,
10162,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
600,
4378,
710,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
2176,
29918,
1054,
2396,
525,
12427,
29918,
726,
742,
13,
18884,
525,
23479,
29918,
6550,
2396,
525,
2308,
11932,
16934,
29901,
15151,
29912,
29900,
29901,
29889,
29906,
29888,
10162,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
600,
4378,
710,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
2176,
29918,
1054,
2396,
525,
5451,
29918,
726,
742,
13,
18884,
525,
23479,
29918,
6550,
2396,
525,
10967,
6219,
29901,
15151,
29912,
29900,
29901,
29889,
29906,
29888,
10162,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
600,
4378,
710,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
2176,
29918,
1054,
2396,
525,
29893,
290,
29918,
726,
742,
13,
18884,
525,
23479,
29918,
6550,
2396,
525,
29956,
6488,
29901,
15151,
29912,
29900,
29901,
29889,
29906,
29888,
10162,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
615,
486,
7122,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
7854,
29918,
1054,
2396,
525,
726,
742,
13,
18884,
525,
4351,
29918,
22724,
2396,
518,
13,
462,
1678,
525,
12427,
29918,
726,
742,
13,
462,
1678,
525,
1028,
949,
29918,
726,
742,
13,
462,
1678,
525,
5451,
29918,
726,
742,
13,
462,
1678,
525,
29893,
290,
29918,
726,
29915,
13,
18884,
21251,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
2176,
8865,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
22724,
2396,
518,
13,
462,
1678,
525,
12427,
29918,
726,
742,
13,
462,
1678,
525,
1028,
949,
29918,
726,
742,
13,
462,
1678,
525,
5451,
29918,
726,
742,
13,
462,
1678,
525,
29893,
290,
29918,
726,
29915,
13,
18884,
4514,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
615,
397,
919,
742,
13,
4706,
500,
29962,
13,
13,
1678,
822,
544,
2395,
29918,
12427,
1646,
29898,
12427,
29892,
2594,
29918,
2103,
29918,
1516,
1125,
13,
4706,
736,
15974,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
657,
29888,
509,
742,
13,
9651,
525,
8149,
2396,
426,
13,
18884,
525,
1989,
29918,
449,
2396,
525,
1989,
29918,
12427,
29915,
13,
9651,
2981,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
29888,
509,
29918,
1989,
2396,
9631,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
2176,
12765,
742,
13,
9651,
525,
8149,
2396,
426,
13,
18884,
525,
1989,
29918,
262,
2396,
525,
1989,
29918,
12427,
742,
13,
18884,
525,
1989,
29918,
449,
2396,
525,
1989,
29918,
12427,
29915,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
2423,
615,
397,
29888,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
9721,
29918,
16859,
2396,
426,
13,
462,
1678,
525,
29891,
2396,
525,
1989,
29918,
29900,
742,
13,
462,
1678,
525,
726,
2396,
525,
1989,
29918,
12427,
29915,
13,
18884,
500,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
690,
1526,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
29876,
29918,
23128,
2396,
938,
29898,
1646,
29918,
2103,
29918,
1516,
847,
29871,
29896,
29900,
29900,
29900,
511,
13,
18884,
525,
16170,
29918,
2220,
2396,
426,
13,
462,
1678,
525,
29891,
2396,
525,
2083,
742,
13,
462,
1678,
525,
726,
2396,
525,
2083,
29915,
13,
18884,
500,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
2176,
6814,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
1054,
29918,
4351,
2396,
525,
726,
742,
13,
18884,
525,
1054,
29918,
449,
2396,
525,
22976,
29918,
2780,
29915,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
600,
4378,
710,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
2176,
29918,
1054,
2396,
525,
726,
742,
13,
18884,
525,
23479,
29918,
6550,
2396,
525,
2308,
11932,
7977,
29901,
15151,
29912,
29900,
29901,
29889,
29906,
29888,
10162,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
615,
397,
919,
29915,
13,
4706,
500,
29962,
13,
13,
1678,
822,
10597,
29918,
1767,
29918,
5014,
943,
29898,
29888,
509,
29918,
4351,
29892,
285,
509,
29918,
29873,
2039,
29892,
285,
509,
29918,
21058,
29892,
285,
509,
29918,
29881,
361,
29897,
1599,
2391,
29961,
21533,
5387,
13,
4706,
736,
15974,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29888,
509,
303,
397,
29888,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
29888,
509,
29918,
8149,
2396,
426,
13,
462,
1678,
525,
29891,
2396,
285,
509,
29918,
4351,
29892,
13,
462,
1678,
525,
22976,
29918,
2780,
2396,
285,
509,
29918,
21058,
29892,
13,
462,
1678,
525,
726,
29918,
29873,
7358,
2396,
285,
509,
29918,
29873,
2039,
29892,
13,
462,
1678,
525,
726,
29918,
24667,
29918,
2388,
2396,
285,
509,
29918,
21058,
29892,
13,
462,
1678,
525,
726,
29918,
3317,
29918,
12765,
2396,
285,
509,
29918,
29881,
361,
13,
18884,
500,
13,
9651,
2981,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
600,
453,
1056,
742,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
600,
4378,
710,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
2176,
29918,
1054,
2396,
525,
726,
29918,
29873,
7358,
742,
13,
18884,
525,
23479,
29918,
6550,
2396,
525,
29911,
860,
29901,
426,
29900,
29901,
29889,
29906,
29888,
10162,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
600,
4378,
710,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
2176,
29918,
1054,
2396,
525,
726,
29918,
24667,
29918,
2388,
742,
13,
18884,
525,
23479,
29918,
6550,
2396,
525,
29911,
860,
4328,
29901,
426,
29900,
29901,
29889,
29906,
29888,
10162,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
600,
4378,
710,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
2176,
29918,
1054,
2396,
525,
726,
29918,
3317,
29918,
12765,
742,
13,
18884,
525,
23479,
29918,
6550,
2396,
525,
7976,
16892,
4328,
29901,
426,
29900,
29901,
29889,
29906,
29888,
29913,
742,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
615,
486,
7122,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
7854,
29918,
1054,
2396,
525,
726,
742,
13,
18884,
525,
4351,
29918,
22724,
2396,
518,
13,
462,
1678,
525,
726,
29918,
29873,
7358,
742,
13,
462,
1678,
525,
726,
29918,
24667,
29918,
2388,
742,
13,
462,
1678,
525,
726,
29918,
3317,
29918,
12765,
29915,
13,
18884,
21251,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
2176,
8865,
742,
13,
9651,
525,
19290,
2396,
426,
13,
18884,
525,
22724,
2396,
518,
13,
462,
1678,
525,
726,
29918,
29873,
7358,
742,
13,
462,
1678,
525,
726,
29918,
24667,
29918,
2388,
742,
13,
462,
1678,
525,
726,
29918,
3317,
29918,
12765,
29915,
13,
18884,
4514,
13,
9651,
500,
13,
4706,
2981,
426,
13,
9651,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
615,
397,
919,
742,
13,
4706,
500,
29962,
13,
13,
1678,
736,
426,
13,
9651,
285,
29901,
426,
13,
18884,
525,
17281,
2396,
5852,
13,
9651,
500,
363,
285,
297,
306,
29954,
6632,
1525,
29918,
24360,
13,
4706,
500,
891,
426,
13,
13,
9651,
525,
12427,
4528,
29889,
29881,
361,
29889,
3317,
29889,
29879,
1526,
29889,
485,
29887,
2396,
426,
13,
18884,
525,
1267,
420,
2396,
525,
1896,
29886,
4236,
29915,
13,
9651,
2981,
13,
13,
9651,
525,
12427,
4528,
29889,
29881,
361,
29889,
1195,
29889,
29879,
1526,
29889,
485,
29887,
2396,
426,
13,
18884,
525,
1267,
420,
2396,
525,
1896,
29886,
1375,
29915,
13,
9651,
2981,
13,
13,
9651,
525,
29890,
384,
2396,
426,
13,
18884,
525,
15425,
29918,
5085,
2396,
426,
13,
462,
1678,
525,
12872,
2396,
525,
26172,
6194,
742,
13,
18884,
2981,
13,
18884,
525,
1767,
29918,
5014,
943,
2396,
903,
5317,
29918,
771,
2395,
29918,
4528,
877,
29890,
384,
742,
525,
29890,
384,
4528,
5477,
13,
9651,
2981,
13,
13,
9651,
525,
8387,
2396,
426,
13,
18884,
525,
15425,
29918,
5085,
2396,
426,
13,
462,
1678,
525,
12872,
2396,
525,
26172,
6194,
742,
13,
18884,
2981,
13,
18884,
525,
1767,
29918,
5014,
943,
2396,
903,
5317,
29918,
771,
2395,
29918,
4528,
877,
8387,
742,
525,
8387,
4528,
5477,
13,
9651,
2981,
13,
13,
9651,
525,
1896,
29886,
2396,
426,
13,
18884,
525,
1767,
29918,
5014,
943,
2396,
544,
2395,
29918,
1896,
29886,
29898,
13,
462,
1678,
301,
9392,
2433,
1896,
29886,
742,
13,
462,
1678,
9631,
2433,
12427,
742,
13,
462,
1678,
9677,
2433,
1028,
949,
742,
13,
462,
1678,
6219,
2433,
5451,
29889,
2083,
742,
13,
18884,
10353,
13,
18884,
525,
15425,
29918,
5085,
2396,
426,
13,
462,
1678,
525,
8513,
2396,
525,
9012,
29974,
3502,
414,
742,
13,
462,
1678,
525,
12872,
2396,
525,
26172,
6194,
742,
13,
462,
1678,
525,
1220,
29918,
2780,
2396,
525,
8517,
742,
13,
462,
1678,
525,
22976,
2396,
426,
13,
462,
4706,
525,
27703,
29883,
744,
2396,
518,
13,
462,
9651,
518,
29900,
29892,
525,
23973,
29898,
29906,
29945,
29945,
29892,
29900,
29892,
29900,
29897,
7464,
13,
462,
9651,
518,
29896,
29892,
525,
23973,
29898,
29900,
29892,
29906,
29945,
29945,
29892,
29900,
29897,
2033,
13,
462,
4706,
21251,
13,
462,
4706,
525,
4912,
333,
2396,
29871,
29900,
29892,
13,
462,
1678,
500,
13,
18884,
2981,
13,
9651,
2981,
13,
13,
9651,
525,
5451,
2396,
426,
13,
18884,
525,
15425,
2396,
525,
4297,
742,
13,
18884,
525,
15425,
29918,
5085,
2396,
426,
13,
462,
1678,
525,
22976,
2396,
426,
396,
2322,
6492,
368,
28061,
748,
4796,
29892,
577,
671,
263,
7933,
304,
2654,
6287,
13,
462,
4706,
525,
27703,
29883,
744,
2396,
518,
13,
462,
9651,
518,
29900,
29892,
525,
23973,
29898,
29906,
29945,
29900,
29892,
29945,
29900,
29892,
29945,
29900,
29897,
7464,
13,
462,
9651,
518,
29896,
29892,
525,
23973,
29898,
29945,
29900,
29892,
29906,
29945,
29900,
29892,
29945,
29900,
29897,
2033,
13,
462,
4706,
21251,
13,
462,
4706,
525,
4912,
333,
2396,
29871,
29900,
29892,
29871,
396,
411,
18345,
29871,
29900,
6287,
13,
462,
1678,
2981,
13,
462,
1678,
525,
28193,
2396,
9631,
29918,
28193,
29892,
13,
462,
1678,
525,
2103,
2396,
2594,
29918,
2103,
29918,
1516,
29892,
29871,
396,
29871,
29896,
6923,
2920,
310,
22306,
13,
462,
1678,
525,
10289,
2396,
29871,
29900,
29892,
29871,
396,
1095,
310,
2594,
304,
367,
26118,
411,
14334,
13,
18884,
2981,
13,
18884,
525,
15003,
29918,
5085,
2396,
426,
13,
462,
1678,
525,
7496,
653,
29918,
29891,
2396,
5852,
13,
18884,
2981,
13,
18884,
525,
1767,
29918,
5014,
943,
2396,
544,
2395,
29918,
12427,
1646,
877,
12427,
742,
2594,
29918,
2103,
29918,
1516,
511,
13,
9651,
2981,
13,
13,
9651,
525,
5451,
29889,
2083,
2396,
426,
13,
18884,
525,
15425,
29918,
5085,
2396,
426,
13,
462,
1678,
525,
12872,
2396,
525,
26172,
6194,
742,
13,
18884,
2981,
13,
18884,
525,
15003,
29918,
5085,
2396,
426,
13,
462,
1678,
525,
7496,
653,
29918,
29891,
2396,
5852,
13,
18884,
2981,
13,
9651,
2981,
13,
13,
9651,
525,
5451,
29889,
4260,
2396,
426,
13,
18884,
396,
525,
15003,
29918,
5085,
2396,
426,
13,
18884,
396,
268,
525,
7496,
653,
29918,
29891,
2396,
5852,
13,
18884,
396,
2981,
13,
18884,
525,
17281,
2396,
5852,
13,
9651,
2981,
13,
13,
9651,
525,
1896,
29886,
29889,
29879,
1526,
29889,
485,
29887,
2396,
426,
13,
18884,
525,
15425,
29918,
5085,
2396,
903,
5317,
29918,
27703,
29883,
744,
29898,
13,
462,
1678,
2927,
29918,
29900,
2433,
23973,
29898,
29906,
29945,
29945,
29892,
29906,
29945,
29945,
29892,
29900,
29897,
742,
13,
462,
1678,
2927,
29918,
29896,
2433,
23973,
29898,
29900,
29892,
29900,
29892,
29906,
29945,
29945,
16029,
29871,
396,
13328,
304,
7254,
6287,
13,
18884,
10353,
13,
18884,
525,
1767,
29918,
5014,
943,
2396,
15974,
13,
462,
1678,
525,
978,
2396,
525,
558,
29883,
29918,
29888,
509,
303,
397,
29888,
742,
13,
462,
1678,
525,
19290,
2396,
426,
13,
462,
4706,
525,
29888,
509,
29918,
8149,
2396,
426,
13,
462,
9651,
525,
29891,
2396,
525,
1896,
29886,
29889,
29879,
1526,
29889,
485,
29887,
742,
13,
462,
9651,
525,
726,
2396,
525,
5451,
29889,
2083,
742,
13,
462,
4706,
2981,
13,
462,
1678,
2981,
13,
18884,
2981,
426,
13,
462,
259,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
600,
453,
1056,
29915,
13,
18884,
2981,
426,
13,
462,
1678,
525,
978,
2396,
29871,
525,
558,
29883,
29918,
2176,
6814,
742,
13,
462,
1678,
525,
19290,
2396,
426,
13,
462,
4706,
525,
1054,
29918,
4351,
2396,
525,
726,
742,
13,
462,
4706,
525,
1054,
29918,
449,
2396,
525,
22976,
29918,
2780,
29915,
13,
462,
1678,
500,
13,
18884,
2981,
426,
13,
462,
1678,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
600,
4378,
710,
742,
13,
462,
1678,
525,
19290,
2396,
426,
13,
462,
4706,
525,
2176,
29918,
1054,
2396,
525,
726,
742,
13,
462,
4706,
525,
23479,
29918,
6550,
2396,
525,
10967,
6219,
29901,
15151,
29912,
29900,
29901,
29889,
29906,
29888,
10162,
13,
462,
1678,
500,
13,
18884,
2981,
426,
13,
462,
1678,
525,
978,
2396,
525,
558,
29883,
29918,
29881,
615,
397,
919,
742,
13,
18884,
500,
1402,
13,
18884,
525,
1267,
420,
2396,
525,
1896,
29886,
10597,
287,
29915,
13,
9651,
2981,
13,
13,
9651,
525,
29890,
384,
29889,
29879,
1526,
29889,
485,
29887,
2396,
426,
13,
18884,
396,
671,
2654,
304,
7933,
6287,
13,
18884,
525,
15425,
29918,
5085,
2396,
903,
5317,
29918,
27703,
29883,
744,
29898,
13,
462,
1678,
2927,
29918,
29900,
2433,
23973,
29898,
29906,
29945,
29945,
29892,
29900,
29892,
29900,
29897,
742,
13,
462,
1678,
2927,
29918,
29896,
2433,
23973,
29898,
29900,
29892,
29906,
29945,
29945,
29892,
29900,
29897,
742,
13,
18884,
10353,
13,
18884,
525,
1767,
29918,
5014,
943,
2396,
10597,
29918,
1767,
29918,
5014,
943,
29898,
13,
462,
1678,
285,
509,
29918,
4351,
2433,
29890,
384,
29889,
29879,
1526,
29889,
485,
29887,
742,
13,
462,
1678,
285,
509,
29918,
29873,
2039,
2433,
29890,
384,
29889,
29873,
384,
29889,
29879,
1526,
29889,
485,
29887,
742,
13,
462,
1678,
285,
509,
29918,
21058,
2433,
29890,
384,
29889,
29873,
384,
29889,
29879,
1526,
29889,
485,
29887,
29889,
21058,
742,
13,
462,
1678,
285,
509,
29918,
29881,
361,
2433,
29890,
384,
29889,
29873,
384,
29889,
29885,
2176,
742,
13,
18884,
10353,
13,
18884,
525,
1267,
420,
2396,
525,
1627,
10597,
287,
29915,
13,
9651,
2981,
13,
13,
9651,
525,
8387,
29889,
29879,
1526,
29889,
485,
29887,
2396,
426,
13,
18884,
396,
671,
2654,
304,
7933,
6287,
13,
18884,
525,
15425,
29918,
5085,
2396,
903,
5317,
29918,
27703,
29883,
744,
29898,
13,
462,
1678,
2927,
29918,
29900,
2433,
23973,
29898,
29906,
29945,
29945,
29892,
29900,
29892,
29900,
29897,
742,
13,
462,
1678,
2927,
29918,
29896,
2433,
23973,
29898,
29900,
29892,
29906,
29945,
29945,
29892,
29900,
29897,
742,
13,
18884,
10353,
13,
18884,
525,
1767,
29918,
5014,
943,
2396,
10597,
29918,
1767,
29918,
5014,
943,
29898,
13,
462,
1678,
285,
509,
29918,
4351,
2433,
8387,
29889,
29879,
1526,
29889,
485,
29887,
742,
13,
462,
1678,
285,
509,
29918,
29873,
2039,
2433,
8387,
29889,
29873,
384,
29889,
29879,
1526,
29889,
485,
29887,
742,
13,
462,
1678,
285,
509,
29918,
21058,
2433,
8387,
29889,
29873,
384,
29889,
29879,
1526,
29889,
485,
29887,
29889,
21058,
742,
13,
462,
1678,
285,
509,
29918,
29881,
361,
2433,
8387,
29889,
29873,
384,
29889,
29885,
2176,
742,
13,
18884,
10353,
13,
18884,
525,
1267,
420,
2396,
525,
8387,
10597,
287,
29915,
13,
9651,
2981,
13,
4706,
500,
13,
2
] |
simulation/model/sim_model.py | fladdimir/csa-simulation-based-sc-forecast | 2 | 75393 | from typing import Any, Dict, List
from model.blocks.delivery import Delivery
from model.blocks.order_creation import OrderCreation
from model.blocks.order_ingest import OrderIngest
from model.blocks.order_material import OrderMaterial
from model.blocks.production import Production
from model.blocks.wait_for_material import WaitForMaterial
from model.blocks.wait_for_sop import WaitForSop
from simpy.core import Environment
class Model:
def __init__(self, env: Environment):
self.env = env
self.model_components: Any
self.model_graph_names: Dict[str, List[str]]
#!resources+components (generated)
self.customer = OrderCreation(
self.env, "customer", xy=(41, 43), ways={"ingest": [(59, 43), (117, 43)]}
)
self.delivery = Delivery(self.env, "delivery", xy=(457, 214), ways={})
self.ingest = OrderIngest(
self.env,
"ingest",
xy=(167, 43),
ways={"order_material": [(217, 43), (277, 43)]},
)
self.order_material = OrderMaterial(
self.env,
"order_material",
xy=(327, 43),
ways={"wait_for_material": [(377, 43), (437, 43)]},
)
self.wait_for_material = WaitForMaterial(
self.env,
"wait_for_material",
xy=(487, 43),
ways={
"wait_for_sop": [
(537, 43),
(567, 43),
(567, 134),
(87, 134),
(87, 214),
(117, 214),
]
},
)
self.wait_for_sop = WaitForSop(
self.env,
"wait_for_sop",
xy=(167, 214),
ways={"production": [(217, 214), (277, 214)]},
)
self.production = Production(
self.env,
"production",
xy=(327, 214),
ways={"delivery": [(377, 214), (439, 214)]},
)
#!model (generated)
self.model_components = {
"customer": self.customer,
"delivery": self.delivery,
"ingest": self.ingest,
"order_material": self.order_material,
"wait_for_material": self.wait_for_material,
"wait_for_sop": self.wait_for_sop,
"production": self.production,
}
self.model_graph_names = {
"customer": ["ingest"],
"delivery": [],
"ingest": ["order_material"],
"order_material": ["wait_for_material"],
"wait_for_material": ["wait_for_sop"],
"wait_for_sop": ["production"],
"production": ["delivery"],
}
# translate model_graph_names into corresponding objects
self.model_graph = {
self.model_components[name]: [
self.model_components[nameSucc]
for nameSucc in self.model_graph_names[name]
]
for name in self.model_graph_names
}
for component in self.model_graph:
component.successors = self.model_graph[component]
| [
1,
515,
19229,
1053,
3139,
29892,
360,
919,
29892,
2391,
13,
13,
3166,
1904,
29889,
1271,
29879,
29889,
29881,
27657,
1053,
360,
27657,
13,
3166,
1904,
29889,
1271,
29879,
29889,
2098,
29918,
1037,
362,
1053,
8170,
9832,
362,
13,
3166,
1904,
29889,
1271,
29879,
29889,
2098,
29918,
292,
342,
1053,
8170,
797,
7118,
13,
3166,
1904,
29889,
1271,
29879,
29889,
2098,
29918,
15388,
1053,
8170,
24095,
13,
3166,
1904,
29889,
1271,
29879,
29889,
24601,
1053,
19561,
13,
3166,
1904,
29889,
1271,
29879,
29889,
10685,
29918,
1454,
29918,
15388,
1053,
20340,
2831,
24095,
13,
3166,
1904,
29889,
1271,
29879,
29889,
10685,
29918,
1454,
29918,
29879,
459,
1053,
20340,
2831,
29903,
459,
13,
3166,
1027,
2272,
29889,
3221,
1053,
16738,
13,
13,
13,
1990,
8125,
29901,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
8829,
29901,
16738,
1125,
13,
13,
4706,
1583,
29889,
6272,
353,
8829,
13,
4706,
1583,
29889,
4299,
29918,
14036,
29901,
3139,
13,
4706,
1583,
29889,
4299,
29918,
4262,
29918,
7039,
29901,
360,
919,
29961,
710,
29892,
2391,
29961,
710,
5262,
13,
13,
4706,
396,
29991,
13237,
29974,
14036,
313,
13525,
29897,
13,
13,
4706,
1583,
29889,
15539,
353,
8170,
9832,
362,
29898,
13,
9651,
1583,
29889,
6272,
29892,
376,
15539,
613,
921,
29891,
7607,
29946,
29896,
29892,
29871,
29946,
29941,
511,
5837,
3790,
29908,
292,
342,
1115,
17288,
29945,
29929,
29892,
29871,
29946,
29941,
511,
313,
29896,
29896,
29955,
29892,
29871,
29946,
29941,
4638,
29913,
13,
4706,
1723,
13,
13,
4706,
1583,
29889,
29881,
27657,
353,
360,
27657,
29898,
1311,
29889,
6272,
29892,
376,
29881,
27657,
613,
921,
29891,
7607,
29946,
29945,
29955,
29892,
29871,
29906,
29896,
29946,
511,
5837,
3790,
1800,
13,
13,
4706,
1583,
29889,
292,
342,
353,
8170,
797,
7118,
29898,
13,
9651,
1583,
29889,
6272,
29892,
13,
9651,
376,
292,
342,
613,
13,
9651,
921,
29891,
7607,
29896,
29953,
29955,
29892,
29871,
29946,
29941,
511,
13,
9651,
5837,
3790,
29908,
2098,
29918,
15388,
1115,
17288,
29906,
29896,
29955,
29892,
29871,
29946,
29941,
511,
313,
29906,
29955,
29955,
29892,
29871,
29946,
29941,
4638,
1118,
13,
4706,
1723,
13,
13,
4706,
1583,
29889,
2098,
29918,
15388,
353,
8170,
24095,
29898,
13,
9651,
1583,
29889,
6272,
29892,
13,
9651,
376,
2098,
29918,
15388,
613,
13,
9651,
921,
29891,
7607,
29941,
29906,
29955,
29892,
29871,
29946,
29941,
511,
13,
9651,
5837,
3790,
29908,
10685,
29918,
1454,
29918,
15388,
1115,
17288,
29941,
29955,
29955,
29892,
29871,
29946,
29941,
511,
313,
29946,
29941,
29955,
29892,
29871,
29946,
29941,
4638,
1118,
13,
4706,
1723,
13,
13,
4706,
1583,
29889,
10685,
29918,
1454,
29918,
15388,
353,
20340,
2831,
24095,
29898,
13,
9651,
1583,
29889,
6272,
29892,
13,
9651,
376,
10685,
29918,
1454,
29918,
15388,
613,
13,
9651,
921,
29891,
7607,
29946,
29947,
29955,
29892,
29871,
29946,
29941,
511,
13,
9651,
5837,
3790,
13,
18884,
376,
10685,
29918,
1454,
29918,
29879,
459,
1115,
518,
13,
462,
1678,
313,
29945,
29941,
29955,
29892,
29871,
29946,
29941,
511,
13,
462,
1678,
313,
29945,
29953,
29955,
29892,
29871,
29946,
29941,
511,
13,
462,
1678,
313,
29945,
29953,
29955,
29892,
29871,
29896,
29941,
29946,
511,
13,
462,
1678,
313,
29947,
29955,
29892,
29871,
29896,
29941,
29946,
511,
13,
462,
1678,
313,
29947,
29955,
29892,
29871,
29906,
29896,
29946,
511,
13,
462,
1678,
313,
29896,
29896,
29955,
29892,
29871,
29906,
29896,
29946,
511,
13,
18884,
4514,
13,
9651,
2981,
13,
4706,
1723,
13,
13,
4706,
1583,
29889,
10685,
29918,
1454,
29918,
29879,
459,
353,
20340,
2831,
29903,
459,
29898,
13,
9651,
1583,
29889,
6272,
29892,
13,
9651,
376,
10685,
29918,
1454,
29918,
29879,
459,
613,
13,
9651,
921,
29891,
7607,
29896,
29953,
29955,
29892,
29871,
29906,
29896,
29946,
511,
13,
9651,
5837,
3790,
29908,
24601,
1115,
17288,
29906,
29896,
29955,
29892,
29871,
29906,
29896,
29946,
511,
313,
29906,
29955,
29955,
29892,
29871,
29906,
29896,
29946,
4638,
1118,
13,
4706,
1723,
13,
13,
4706,
1583,
29889,
24601,
353,
19561,
29898,
13,
9651,
1583,
29889,
6272,
29892,
13,
9651,
376,
24601,
613,
13,
9651,
921,
29891,
7607,
29941,
29906,
29955,
29892,
29871,
29906,
29896,
29946,
511,
13,
9651,
5837,
3790,
29908,
29881,
27657,
1115,
17288,
29941,
29955,
29955,
29892,
29871,
29906,
29896,
29946,
511,
313,
29946,
29941,
29929,
29892,
29871,
29906,
29896,
29946,
4638,
1118,
13,
4706,
1723,
13,
13,
4706,
396,
29991,
4299,
313,
13525,
29897,
13,
13,
4706,
1583,
29889,
4299,
29918,
14036,
353,
426,
13,
9651,
376,
15539,
1115,
1583,
29889,
15539,
29892,
13,
9651,
376,
29881,
27657,
1115,
1583,
29889,
29881,
27657,
29892,
13,
9651,
376,
292,
342,
1115,
1583,
29889,
292,
342,
29892,
13,
9651,
376,
2098,
29918,
15388,
1115,
1583,
29889,
2098,
29918,
15388,
29892,
13,
9651,
376,
10685,
29918,
1454,
29918,
15388,
1115,
1583,
29889,
10685,
29918,
1454,
29918,
15388,
29892,
13,
9651,
376,
10685,
29918,
1454,
29918,
29879,
459,
1115,
1583,
29889,
10685,
29918,
1454,
29918,
29879,
459,
29892,
13,
9651,
376,
24601,
1115,
1583,
29889,
24601,
29892,
13,
4706,
500,
13,
13,
4706,
1583,
29889,
4299,
29918,
4262,
29918,
7039,
353,
426,
13,
9651,
376,
15539,
1115,
6796,
292,
342,
12436,
13,
9651,
376,
29881,
27657,
1115,
19997,
13,
9651,
376,
292,
342,
1115,
6796,
2098,
29918,
15388,
12436,
13,
9651,
376,
2098,
29918,
15388,
1115,
6796,
10685,
29918,
1454,
29918,
15388,
12436,
13,
9651,
376,
10685,
29918,
1454,
29918,
15388,
1115,
6796,
10685,
29918,
1454,
29918,
29879,
459,
12436,
13,
9651,
376,
10685,
29918,
1454,
29918,
29879,
459,
1115,
6796,
24601,
12436,
13,
9651,
376,
24601,
1115,
6796,
29881,
27657,
12436,
13,
4706,
500,
13,
4706,
396,
14240,
1904,
29918,
4262,
29918,
7039,
964,
6590,
3618,
13,
4706,
1583,
29889,
4299,
29918,
4262,
353,
426,
13,
9651,
1583,
29889,
4299,
29918,
14036,
29961,
978,
5387,
518,
13,
18884,
1583,
29889,
4299,
29918,
14036,
29961,
978,
5091,
617,
29962,
13,
18884,
363,
1024,
5091,
617,
297,
1583,
29889,
4299,
29918,
4262,
29918,
7039,
29961,
978,
29962,
13,
9651,
4514,
13,
9651,
363,
1024,
297,
1583,
29889,
4299,
29918,
4262,
29918,
7039,
13,
4706,
500,
13,
13,
4706,
363,
4163,
297,
1583,
29889,
4299,
29918,
4262,
29901,
13,
9651,
4163,
29889,
8698,
943,
353,
1583,
29889,
4299,
29918,
4262,
29961,
9700,
29962,
13,
2
] |
tests/functional/modules/test_zos_tso_command.py | IBM/zos-core-collection-ftp | 4 | 23698 | from __future__ import absolute_import, division, print_function
__metaclass__ = type
import os
import sys
import warnings
import ansible.constants
import ansible.errors
import ansible.utils
import pytest
from pprint import pprint
# The positive path test
def test_zos_tso_command_listuser(ansible_adhoc):
hosts = ansible_adhoc(inventory='localhost', connection='local')
print('--- hosts.all ---')
pprint(hosts.all)
pprint(hosts.all.options)
pprint(vars(hosts.all.options['inventory_manager']))
pprint(hosts.all.options['inventory_manager']._inventory.hosts)
hosts.all.options['inventory_manager']._inventory.hosts
results = hosts.localhost.zos_tso_command(commands=["LU"])
print('--- results.contacted ---')
pprint(results.contacted)
for result in results.contacted.values():
assert result.get("output")[0].get("rc") == 0
assert result.get("changed") is True
| [
1,
515,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
8542,
29892,
1596,
29918,
2220,
13,
13,
1649,
2527,
562,
605,
1649,
353,
1134,
13,
13,
5215,
2897,
13,
5215,
10876,
13,
5215,
18116,
13,
13,
5215,
385,
1687,
29889,
3075,
1934,
13,
5215,
385,
1687,
29889,
12523,
13,
5215,
385,
1687,
29889,
13239,
13,
5215,
11451,
1688,
13,
3166,
282,
2158,
1053,
282,
2158,
13,
13,
29937,
450,
6374,
2224,
1243,
13,
1753,
1243,
29918,
29834,
29918,
29873,
578,
29918,
6519,
29918,
1761,
1792,
29898,
550,
1821,
29918,
328,
29882,
542,
1125,
13,
1678,
18982,
353,
385,
1687,
29918,
328,
29882,
542,
29898,
262,
23886,
2433,
7640,
742,
3957,
2433,
2997,
1495,
13,
1678,
1596,
877,
5634,
18982,
29889,
497,
11474,
1495,
13,
1678,
282,
2158,
29898,
23525,
29889,
497,
29897,
13,
1678,
282,
2158,
29898,
23525,
29889,
497,
29889,
6768,
29897,
13,
1678,
282,
2158,
29898,
16908,
29898,
23525,
29889,
497,
29889,
6768,
1839,
262,
23886,
29918,
12847,
25901,
13,
1678,
282,
2158,
29898,
23525,
29889,
497,
29889,
6768,
1839,
262,
23886,
29918,
12847,
13359,
29918,
262,
23886,
29889,
23525,
29897,
13,
1678,
18982,
29889,
497,
29889,
6768,
1839,
262,
23886,
29918,
12847,
13359,
29918,
262,
23886,
29889,
23525,
13,
1678,
2582,
353,
18982,
29889,
7640,
29889,
29834,
29918,
29873,
578,
29918,
6519,
29898,
26381,
29922,
3366,
29931,
29965,
20068,
13,
1678,
1596,
877,
5634,
2582,
29889,
12346,
287,
11474,
1495,
13,
1678,
282,
2158,
29898,
9902,
29889,
12346,
287,
29897,
13,
1678,
363,
1121,
297,
2582,
29889,
12346,
287,
29889,
5975,
7295,
13,
4706,
4974,
1121,
29889,
657,
703,
4905,
1159,
29961,
29900,
1822,
657,
703,
2214,
1159,
1275,
29871,
29900,
13,
4706,
4974,
1121,
29889,
657,
703,
15033,
1159,
338,
5852,
13,
2
] |
deeposlandia/datagen.py | Oslandia/Streetscene_CNN | 53 | 140452 | """Main method to generate new datasets
Example of program call:
* generate 64*64 pixel images from Shapes dataset, 10000 images in the training
set, 100 in the validation set, 1000 in the testing set::
python deeposlandia/datagen.py -D shapes -s 64 -t 10000 -v 100 -T 1000
"""
import argparse
import os
import daiquiri
import pandas as pd
from deeposlandia import config, utils
from deeposlandia.datasets import AVAILABLE_DATASETS, GEOGRAPHIC_DATASETS
from deeposlandia.datasets.mapillary import MapillaryDataset
from deeposlandia.datasets.aerial import AerialDataset
from deeposlandia.datasets.shapes import ShapeDataset
from deeposlandia.datasets.tanzania import TanzaniaDataset
logger = daiquiri.getLogger(__name__)
def main(args):
# Data path and repository management
input_folder = utils.prepare_input_folder(args.datapath, args.dataset)
prepro_folder = utils.prepare_preprocessed_folder(
args.datapath, args.dataset, args.image_size
)
if (
args.dataset in GEOGRAPHIC_DATASETS
and (args.nb_training_image > 0 or args.nb_validation_image > 0)
and args.nb_tiles_per_image is None
):
raise ValueError(
"The amount of tiles per image must be specified for "
f"the {args.dataset} dataset, if training and/or validation images "
"are required. See 'deepo datagen -h' for more details."
)
# Dataset creation
if args.dataset == "mapillary":
config_path = os.path.join(input_folder, "config_aggregate.json")
train_dataset = MapillaryDataset(args.image_size, config_path)
validation_dataset = MapillaryDataset(args.image_size, config_path)
test_dataset = MapillaryDataset(args.image_size, config_path)
elif args.dataset == "shapes":
train_dataset = ShapeDataset(args.image_size)
validation_dataset = ShapeDataset(args.image_size)
test_dataset = ShapeDataset(args.image_size)
os.makedirs(
os.path.join(prepro_folder["testing"], "labels"), exist_ok=True
)
elif args.dataset == "aerial":
train_dataset = AerialDataset(args.image_size)
validation_dataset = AerialDataset(args.image_size)
test_dataset = AerialDataset(args.image_size)
elif args.dataset == "tanzania":
train_dataset = TanzaniaDataset(args.image_size)
validation_dataset = TanzaniaDataset(args.image_size)
test_dataset = TanzaniaDataset(args.image_size)
else:
raise ValueError(
f"Unsupported dataset type. Please choose amongst {AVAILABLE_DATASETS}"
)
# Dataset populating/loading
# (depends on the existence of a specification file)
if args.nb_training_image > 0:
if os.path.isfile(prepro_folder["training_config"]):
train_dataset.load(
prepro_folder["training_config"], args.nb_training_image
)
else:
logger.info(
"No existing configuration file for this dataset. Create %s.",
prepro_folder["training_config"],
)
input_image_dir = os.path.join(input_folder, "training")
train_dataset.populate(
prepro_folder["training"],
input_image_dir,
nb_images=args.nb_training_image,
nb_processes=int(config.get("running", "processes")),
nb_tiles_per_image=args.nb_tiles_per_image,
)
train_dataset.save(prepro_folder["training_config"])
if args.nb_validation_image > 0:
if os.path.isfile(prepro_folder["validation_config"]):
validation_dataset.load(
prepro_folder["validation_config"], args.nb_validation_image
)
else:
logger.info(
"No existing configuration file for this dataset. Create %s.",
prepro_folder["validation_config"],
)
input_image_dir = os.path.join(input_folder, "validation")
validation_dataset.populate(
prepro_folder["validation"],
input_image_dir,
nb_images=args.nb_validation_image,
nb_processes=int(config.get("running", "processes")),
nb_tiles_per_image=args.nb_tiles_per_image,
)
validation_dataset.save(prepro_folder["validation_config"])
if args.nb_testing_image > 0:
if os.path.isfile(prepro_folder["testing_config"]):
test_dataset.load(
prepro_folder["testing_config"], args.nb_testing_image
)
else:
logger.info(
"No existing configuration file for this dataset. Create %s.",
prepro_folder["testing_config"],
)
input_image_dir = os.path.join(input_folder, "testing")
test_dataset.populate(
prepro_folder["testing"],
input_image_dir,
nb_images=args.nb_testing_image,
labelling=False,
nb_processes=int(config.get("running", "processes")),
)
test_dataset.save(prepro_folder["testing_config"])
glossary = pd.DataFrame(train_dataset.labels)
glossary["popularity"] = train_dataset.get_label_popularity()
logger.info("Data glossary:\n%s", glossary)
| [
1,
9995,
6330,
1158,
304,
5706,
716,
20035,
13,
13,
14023,
310,
1824,
1246,
29901,
13,
13,
29930,
5706,
29871,
29953,
29946,
29930,
29953,
29946,
15526,
4558,
515,
1383,
11603,
8783,
29892,
29871,
29896,
29900,
29900,
29900,
29900,
4558,
297,
278,
6694,
13,
29871,
731,
29892,
29871,
29896,
29900,
29900,
297,
278,
8845,
731,
29892,
29871,
29896,
29900,
29900,
29900,
297,
278,
6724,
731,
1057,
13,
13,
1678,
3017,
6483,
359,
1049,
423,
29914,
4130,
5370,
29889,
2272,
448,
29928,
25834,
448,
29879,
29871,
29953,
29946,
448,
29873,
29871,
29896,
29900,
29900,
29900,
29900,
448,
29894,
29871,
29896,
29900,
29900,
448,
29911,
29871,
29896,
29900,
29900,
29900,
13,
13,
15945,
29908,
13,
13,
5215,
1852,
5510,
13,
5215,
2897,
13,
13,
5215,
14720,
6578,
374,
13,
5215,
11701,
408,
10518,
13,
13,
3166,
6483,
359,
1049,
423,
1053,
2295,
29892,
3667,
29879,
13,
3166,
6483,
359,
1049,
423,
29889,
14538,
1691,
1053,
16884,
29909,
6227,
6181,
29918,
25832,
8127,
9375,
29892,
402,
29923,
29949,
14345,
3301,
29950,
2965,
29918,
25832,
8127,
9375,
13,
3166,
6483,
359,
1049,
423,
29889,
14538,
1691,
29889,
1958,
453,
653,
1053,
7315,
453,
653,
16390,
24541,
13,
3166,
6483,
359,
1049,
423,
29889,
14538,
1691,
29889,
29874,
261,
616,
1053,
18682,
616,
16390,
24541,
13,
3166,
6483,
359,
1049,
423,
29889,
14538,
1691,
29889,
845,
11603,
1053,
1383,
4085,
16390,
24541,
13,
3166,
6483,
359,
1049,
423,
29889,
14538,
1691,
29889,
29873,
4096,
4807,
1053,
323,
4096,
4807,
16390,
24541,
13,
13,
13,
21707,
353,
14720,
6578,
374,
29889,
657,
16363,
22168,
978,
1649,
29897,
13,
13,
13,
1753,
1667,
29898,
5085,
1125,
13,
1678,
396,
3630,
2224,
322,
9810,
10643,
13,
1678,
1881,
29918,
12083,
353,
3667,
29879,
29889,
19125,
29918,
2080,
29918,
12083,
29898,
5085,
29889,
4130,
481,
493,
29892,
6389,
29889,
24713,
29897,
13,
1678,
758,
771,
29918,
12083,
353,
3667,
29879,
29889,
19125,
29918,
1457,
5014,
287,
29918,
12083,
29898,
13,
4706,
6389,
29889,
4130,
481,
493,
29892,
6389,
29889,
24713,
29892,
6389,
29889,
3027,
29918,
2311,
13,
1678,
1723,
13,
1678,
565,
313,
13,
9651,
6389,
29889,
24713,
297,
402,
29923,
29949,
14345,
3301,
29950,
2965,
29918,
25832,
8127,
9375,
13,
9651,
322,
313,
5085,
29889,
9877,
29918,
26495,
29918,
3027,
1405,
29871,
29900,
470,
6389,
29889,
9877,
29918,
18157,
29918,
3027,
1405,
29871,
29900,
29897,
13,
9651,
322,
6389,
29889,
9877,
29918,
1376,
267,
29918,
546,
29918,
3027,
338,
6213,
13,
268,
1125,
13,
4706,
12020,
7865,
2392,
29898,
13,
9651,
376,
1576,
5253,
310,
260,
5475,
639,
1967,
1818,
367,
6790,
363,
376,
13,
9651,
285,
29908,
1552,
426,
5085,
29889,
24713,
29913,
8783,
29892,
565,
6694,
322,
29914,
272,
8845,
4558,
376,
13,
9651,
376,
598,
3734,
29889,
2823,
525,
24535,
29877,
1418,
5370,
448,
29882,
29915,
363,
901,
4902,
1213,
13,
4706,
1723,
13,
13,
1678,
396,
13373,
24541,
11265,
13,
1678,
565,
6389,
29889,
24713,
1275,
376,
1958,
453,
653,
1115,
13,
4706,
2295,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
29898,
2080,
29918,
12083,
29892,
376,
2917,
29918,
26193,
403,
29889,
3126,
1159,
13,
4706,
7945,
29918,
24713,
353,
7315,
453,
653,
16390,
24541,
29898,
5085,
29889,
3027,
29918,
2311,
29892,
2295,
29918,
2084,
29897,
13,
4706,
8845,
29918,
24713,
353,
7315,
453,
653,
16390,
24541,
29898,
5085,
29889,
3027,
29918,
2311,
29892,
2295,
29918,
2084,
29897,
13,
4706,
1243,
29918,
24713,
353,
7315,
453,
653,
16390,
24541,
29898,
5085,
29889,
3027,
29918,
2311,
29892,
2295,
29918,
2084,
29897,
13,
1678,
25342,
6389,
29889,
24713,
1275,
376,
845,
11603,
1115,
13,
4706,
7945,
29918,
24713,
353,
1383,
4085,
16390,
24541,
29898,
5085,
29889,
3027,
29918,
2311,
29897,
13,
4706,
8845,
29918,
24713,
353,
1383,
4085,
16390,
24541,
29898,
5085,
29889,
3027,
29918,
2311,
29897,
13,
4706,
1243,
29918,
24713,
353,
1383,
4085,
16390,
24541,
29898,
5085,
29889,
3027,
29918,
2311,
29897,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
13,
9651,
2897,
29889,
2084,
29889,
7122,
29898,
1457,
771,
29918,
12083,
3366,
13424,
12436,
376,
21134,
4968,
1863,
29918,
554,
29922,
5574,
13,
4706,
1723,
13,
1678,
25342,
6389,
29889,
24713,
1275,
376,
29874,
261,
616,
1115,
13,
4706,
7945,
29918,
24713,
353,
18682,
616,
16390,
24541,
29898,
5085,
29889,
3027,
29918,
2311,
29897,
13,
4706,
8845,
29918,
24713,
353,
18682,
616,
16390,
24541,
29898,
5085,
29889,
3027,
29918,
2311,
29897,
13,
4706,
1243,
29918,
24713,
353,
18682,
616,
16390,
24541,
29898,
5085,
29889,
3027,
29918,
2311,
29897,
13,
1678,
25342,
6389,
29889,
24713,
1275,
376,
29873,
4096,
4807,
1115,
13,
4706,
7945,
29918,
24713,
353,
323,
4096,
4807,
16390,
24541,
29898,
5085,
29889,
3027,
29918,
2311,
29897,
13,
4706,
8845,
29918,
24713,
353,
323,
4096,
4807,
16390,
24541,
29898,
5085,
29889,
3027,
29918,
2311,
29897,
13,
4706,
1243,
29918,
24713,
353,
323,
4096,
4807,
16390,
24541,
29898,
5085,
29889,
3027,
29918,
2311,
29897,
13,
1678,
1683,
29901,
13,
4706,
12020,
7865,
2392,
29898,
13,
9651,
285,
29908,
25807,
29884,
3016,
287,
8783,
1134,
29889,
3529,
6755,
22611,
426,
26612,
6227,
6181,
29918,
25832,
8127,
9375,
5038,
13,
4706,
1723,
13,
13,
1678,
396,
13373,
24541,
14938,
1218,
29914,
13234,
13,
1678,
396,
313,
2716,
1975,
373,
278,
10379,
310,
263,
21992,
934,
29897,
13,
1678,
565,
6389,
29889,
9877,
29918,
26495,
29918,
3027,
1405,
29871,
29900,
29901,
13,
4706,
565,
2897,
29889,
2084,
29889,
275,
1445,
29898,
1457,
771,
29918,
12083,
3366,
26495,
29918,
2917,
3108,
1125,
13,
9651,
7945,
29918,
24713,
29889,
1359,
29898,
13,
18884,
758,
771,
29918,
12083,
3366,
26495,
29918,
2917,
12436,
6389,
29889,
9877,
29918,
26495,
29918,
3027,
13,
9651,
1723,
13,
4706,
1683,
29901,
13,
9651,
17927,
29889,
3888,
29898,
13,
462,
1678,
376,
3782,
5923,
5285,
934,
363,
445,
8783,
29889,
6204,
1273,
29879,
19602,
13,
462,
1678,
758,
771,
29918,
12083,
3366,
26495,
29918,
2917,
12436,
13,
9651,
1723,
13,
9651,
1881,
29918,
3027,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
2080,
29918,
12083,
29892,
376,
26495,
1159,
13,
9651,
7945,
29918,
24713,
29889,
7323,
5987,
29898,
13,
18884,
758,
771,
29918,
12083,
3366,
26495,
12436,
13,
18884,
1881,
29918,
3027,
29918,
3972,
29892,
13,
18884,
302,
29890,
29918,
8346,
29922,
5085,
29889,
9877,
29918,
26495,
29918,
3027,
29892,
13,
18884,
302,
29890,
29918,
5014,
267,
29922,
524,
29898,
2917,
29889,
657,
703,
21094,
613,
376,
5014,
267,
1159,
511,
13,
18884,
302,
29890,
29918,
1376,
267,
29918,
546,
29918,
3027,
29922,
5085,
29889,
9877,
29918,
1376,
267,
29918,
546,
29918,
3027,
29892,
13,
9651,
1723,
13,
9651,
7945,
29918,
24713,
29889,
7620,
29898,
1457,
771,
29918,
12083,
3366,
26495,
29918,
2917,
20068,
13,
13,
1678,
565,
6389,
29889,
9877,
29918,
18157,
29918,
3027,
1405,
29871,
29900,
29901,
13,
4706,
565,
2897,
29889,
2084,
29889,
275,
1445,
29898,
1457,
771,
29918,
12083,
3366,
18157,
29918,
2917,
3108,
1125,
13,
9651,
8845,
29918,
24713,
29889,
1359,
29898,
13,
18884,
758,
771,
29918,
12083,
3366,
18157,
29918,
2917,
12436,
6389,
29889,
9877,
29918,
18157,
29918,
3027,
13,
9651,
1723,
13,
4706,
1683,
29901,
13,
9651,
17927,
29889,
3888,
29898,
13,
462,
1678,
376,
3782,
5923,
5285,
934,
363,
445,
8783,
29889,
6204,
1273,
29879,
19602,
13,
462,
1678,
758,
771,
29918,
12083,
3366,
18157,
29918,
2917,
12436,
13,
9651,
1723,
13,
9651,
1881,
29918,
3027,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
2080,
29918,
12083,
29892,
376,
18157,
1159,
13,
9651,
8845,
29918,
24713,
29889,
7323,
5987,
29898,
13,
18884,
758,
771,
29918,
12083,
3366,
18157,
12436,
13,
18884,
1881,
29918,
3027,
29918,
3972,
29892,
13,
18884,
302,
29890,
29918,
8346,
29922,
5085,
29889,
9877,
29918,
18157,
29918,
3027,
29892,
13,
18884,
302,
29890,
29918,
5014,
267,
29922,
524,
29898,
2917,
29889,
657,
703,
21094,
613,
376,
5014,
267,
1159,
511,
13,
18884,
302,
29890,
29918,
1376,
267,
29918,
546,
29918,
3027,
29922,
5085,
29889,
9877,
29918,
1376,
267,
29918,
546,
29918,
3027,
29892,
13,
9651,
1723,
13,
9651,
8845,
29918,
24713,
29889,
7620,
29898,
1457,
771,
29918,
12083,
3366,
18157,
29918,
2917,
20068,
13,
13,
1678,
565,
6389,
29889,
9877,
29918,
13424,
29918,
3027,
1405,
29871,
29900,
29901,
13,
4706,
565,
2897,
29889,
2084,
29889,
275,
1445,
29898,
1457,
771,
29918,
12083,
3366,
13424,
29918,
2917,
3108,
1125,
13,
9651,
1243,
29918,
24713,
29889,
1359,
29898,
13,
18884,
758,
771,
29918,
12083,
3366,
13424,
29918,
2917,
12436,
6389,
29889,
9877,
29918,
13424,
29918,
3027,
13,
9651,
1723,
13,
4706,
1683,
29901,
13,
9651,
17927,
29889,
3888,
29898,
13,
462,
1678,
376,
3782,
5923,
5285,
934,
363,
445,
8783,
29889,
6204,
1273,
29879,
19602,
13,
462,
1678,
758,
771,
29918,
12083,
3366,
13424,
29918,
2917,
12436,
13,
9651,
1723,
13,
9651,
1881,
29918,
3027,
29918,
3972,
353,
2897,
29889,
2084,
29889,
7122,
29898,
2080,
29918,
12083,
29892,
376,
13424,
1159,
13,
9651,
1243,
29918,
24713,
29889,
7323,
5987,
29898,
13,
18884,
758,
771,
29918,
12083,
3366,
13424,
12436,
13,
18884,
1881,
29918,
3027,
29918,
3972,
29892,
13,
18884,
302,
29890,
29918,
8346,
29922,
5085,
29889,
9877,
29918,
13424,
29918,
3027,
29892,
13,
18884,
9775,
7807,
29922,
8824,
29892,
13,
18884,
302,
29890,
29918,
5014,
267,
29922,
524,
29898,
2917,
29889,
657,
703,
21094,
613,
376,
5014,
267,
1159,
511,
13,
9651,
1723,
13,
9651,
1243,
29918,
24713,
29889,
7620,
29898,
1457,
771,
29918,
12083,
3366,
13424,
29918,
2917,
20068,
13,
13,
1678,
3144,
2209,
653,
353,
10518,
29889,
17271,
29898,
14968,
29918,
24713,
29889,
21134,
29897,
13,
1678,
3144,
2209,
653,
3366,
7323,
1070,
537,
3108,
353,
7945,
29918,
24713,
29889,
657,
29918,
1643,
29918,
7323,
1070,
537,
580,
13,
1678,
17927,
29889,
3888,
703,
1469,
3144,
2209,
653,
3583,
29876,
29995,
29879,
613,
3144,
2209,
653,
29897,
13,
2
] |
Section 12/12.4-download-img.py | magnusmel/The-Modern-Python-Challenge-v | 3 | 189256 | import requests
def get_image(url, filename):
target = requests.get(url)
ext = '.png'
open(filename + ext, 'wb').write(target.content)
print(f"{filename}{ext} downloaded")
url = "https://www.python.org/static/img/[email protected]"
get_image(url,'py-logo')
| [
1,
1053,
7274,
30004,
13,
30004,
13,
1753,
679,
29918,
3027,
29898,
2271,
29892,
10422,
1125,
30004,
13,
1678,
3646,
353,
7274,
29889,
657,
29898,
2271,
8443,
13,
1678,
1294,
353,
15300,
2732,
29915,
30004,
13,
1678,
1722,
29898,
9507,
718,
1294,
29892,
525,
29893,
29890,
2824,
3539,
29898,
5182,
29889,
3051,
8443,
13,
1678,
1596,
29898,
29888,
29908,
29912,
9507,
1157,
1062,
29913,
16532,
1159,
30004,
13,
30004,
13,
2271,
353,
376,
991,
597,
1636,
29889,
4691,
29889,
990,
29914,
7959,
29914,
2492,
29914,
4691,
29899,
14569,
29992,
29906,
29916,
29889,
2732,
19451,
13,
30004,
13,
657,
29918,
3027,
29898,
2271,
5501,
2272,
29899,
14569,
1495,
30004,
13,
2
] |
examples/tornado/myapp/__init__.py | s-shin/wswrapper | 2 | 26895 | # -*- coding: utf-8 -*-
def setup_argparser(parser):
"""コマンドパーサーのセットアップ。
パーサーは共有されるので、被らないように上手く調整すること。
:param parser: ``argparse.ArgumentParser`` のインスタンス。
"""
pass
def setup_app(args):
"""コマンドパース後のセットアップ。
:param args: ``parser.arg_parse()`` の戻り値。
"""
pass
def on_open(client):
"""WebSocketのコネクションが成立した時に呼ばれる。
"""
pass
def on_close(client):
"""WebSocketのコネクションが切れた時に呼ばれる。
"""
pass
def on_setup(client, data):
client.emit("print", "Hello world!")
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
1753,
6230,
29918,
1191,
16680,
29898,
16680,
1125,
13,
1678,
9995,
30459,
30388,
30203,
30335,
30715,
30185,
30615,
30185,
30199,
30885,
30317,
30279,
30310,
30317,
30605,
30267,
13,
268,
30715,
30185,
30615,
30185,
30449,
31611,
30417,
30566,
30553,
30332,
30199,
30499,
30330,
31407,
30513,
30371,
30298,
30787,
30465,
30353,
30429,
30880,
30568,
235,
173,
194,
233,
152,
183,
30427,
30332,
30589,
30364,
30267,
13,
268,
13,
1678,
584,
3207,
13812,
29901,
4954,
1191,
5510,
29889,
15730,
11726,
16159,
29871,
30199,
30260,
30203,
30255,
30369,
30203,
30255,
30267,
13,
1678,
9995,
13,
1678,
1209,
13,
13,
13,
1753,
6230,
29918,
932,
29898,
5085,
1125,
13,
1678,
9995,
30459,
30388,
30203,
30335,
30715,
30185,
30255,
31220,
30199,
30885,
30317,
30279,
30310,
30317,
30605,
30267,
13,
268,
13,
1678,
584,
3207,
6389,
29901,
4954,
16680,
29889,
1191,
29918,
5510,
2555,
29952,
29871,
30199,
233,
139,
190,
30453,
232,
131,
167,
30267,
13,
1678,
9995,
13,
1678,
1209,
13,
13,
13,
1753,
373,
29918,
3150,
29898,
4645,
1125,
13,
1678,
9995,
3609,
11373,
30199,
30459,
31038,
30305,
30373,
30907,
30203,
30458,
30494,
30939,
30326,
30366,
30974,
30353,
232,
148,
191,
31254,
30553,
30332,
30267,
13,
1678,
9995,
13,
1678,
1209,
13,
13,
13,
1753,
373,
29918,
5358,
29898,
4645,
1125,
13,
1678,
9995,
3609,
11373,
30199,
30459,
31038,
30305,
30373,
30907,
30203,
30458,
31757,
30553,
30366,
30974,
30353,
232,
148,
191,
31254,
30553,
30332,
30267,
13,
1678,
9995,
13,
1678,
1209,
13,
268,
13,
13,
1753,
373,
29918,
14669,
29898,
4645,
29892,
848,
1125,
13,
1678,
3132,
29889,
21976,
703,
2158,
613,
376,
10994,
3186,
29991,
1159,
13,
13,
13,
2
] |
python/pointcloud/lidaroverview.py | NLeSC/pointcloud-benchmark | 9 | 158016 | <filename>python/pointcloud/lidaroverview.py
#!/usr/bin/env python
################################################################################
# Created by <NAME> #
# <EMAIL> #
################################################################################
import os, optparse, psycopg2, multiprocessing, logging
from pointcloud import utils, postgresops, lasops
def runChild(childId, childrenQueue, connectionString, dbtable, srid):
kill_received = False
connection = psycopg2.connect(connectionString)
cursor = connection.cursor()
while not kill_received:
job = None
try:
# This call will patiently wait until new job is available
job = childrenQueue.get()
except:
# if there is an error we will quit the loop
kill_received = True
if job == None:
kill_received = True
else:
[identifier, inputFile,] = job
(_, count, minX, minY, minZ, maxX, maxY, maxZ, scaleX, scaleY, scaleZ, offsetX, offsetY, offsetZ) = lasops.getPCFileDetails(inputFile)
insertStatement = """INSERT INTO """ + dbtable + """(id,filepath,num,scalex,scaley,scalez,offsetx,offsety,offsetz,geom) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, ST_MakeEnvelope(%s, %s, %s, %s, %s));"""
insertArgs = [identifier, inputFile, int(count), float(scaleX), float(scaleY), float(scaleZ), float(offsetX), float(offsetY), float(offsetZ), float(minX), float(minY), float(maxX), float(maxY), int(srid)]
logging.info(cursor.mogrify(insertStatement, insertArgs))
cursor.execute(insertStatement, insertArgs)
connection.commit()
cursor.close()
connection.close()
def run(inputFolder, numcores, dbname, dbuser, dbpass, dbhost, dbport, createdb, dbtable, srid):
opts = 0
childrenQueue = multiprocessing.Queue()
ifiles = utils.getFiles(inputFolder)
for i in range(len(ifiles)):
childrenQueue.put([i, ifiles[i]])
for i in range(int(numcores)): #we add as many None jobs as numWorkers to tell them to terminate (queue is FIFO)
childrenQueue.put(None)
clineConString = postgresops.getConnectString(dbname, dbuser, dbpass, dbhost, dbport, True)
psycopgConString = postgresops.getConnectString(dbname, dbuser, dbpass, dbhost, dbport, False)
if createdb:
os.system('dropdb ' + clineConString)
os.system('createdb ' + clineConString)
connection = psycopg2.connect(psycopgConString)
cursor = connection.cursor()
if createdb:
cursor.execute('CREATE EXTENSION postgis')
connection.commit()
q = """
CREATE TABLE """ + dbtable + """ (
id integer,
filepath text,
num integer,
scalex double precision,
scaley double precision,
scalez double precision,
offsetx double precision,
offsety double precision,
offsetz double precision,
geom public.geometry(Geometry,""" + str(srid) + """)
)"""
logging.info(cursor.mogrify(q))
cursor.execute(q)
connection.commit()
# q = "select addgeometrycolumn('" + dbtable + "','geom',28992,'POLYGON',2)"
# logging.info(cursor.mogrify(q))
# cursor.execute(q)
# connection.commit()
print 'numcores',numcores
children = []
# We start numcores children processes
for i in range(int(numcores)):
children.append(multiprocessing.Process(target=runChild,
args=(i, childrenQueue, psycopgConString, dbtable, srid)))
children[-1].start()
# wait for all children to finish their execution
for i in range(int(numcores)):
children[i].join()
q = "create index ON " + dbtable + " using GIST (geom)"
logging.info(cursor.mogrify(q))
cursor.execute(q)
connection.commit()
old_isolation_level = connection.isolation_level
connection.set_isolation_level(0)
q = "VACUUM FULL ANALYZE " + dbtable
logging.info(cursor.mogrify(q))
cursor.execute(q)
connection.commit()
connection.set_isolation_level(old_isolation_level)
cursor.close()
def main(opts):
run(opts.input, opts.cores, opts.dbname, opts.dbuser, opts.dbpass, opts.dbhost, opts.dbport, opts.create, opts.dbtable, opts.srid)
if __name__ == "__main__":
usage = 'Usage: %prog [options]'
description = "Creates a table with geometries describing the areas of which the LAS files contain points."
op = optparse.OptionParser(usage=usage, description=description)
op.add_option('-i','--input',default='',help='Input folder where to find the LAS files',type='string')
op.add_option('-s','--srid',default='',help='SRID',type='string')
op.add_option('-x','--create',default=False,help='Creates the database',action='store_true')
op.add_option('-n','--dbname',default='',help='Postgres DB name where to store the geometries',type='string')
op.add_option('-u','--dbuser',default='',help='DB user',type='string')
op.add_option('-p','--dbpass',default='',help='DB pass',type='string')
op.add_option('-m','--dbhost',default='',help='DB host',type='string')
op.add_option('-r','--dbport',default='',help='DB port',type='string')
op.add_option('-t','--dbtable',default='',help='DB table',type='string')
op.add_option('-c','--cores',default='',help='Number of used processes',type='string')
(opts, args) = op.parse_args()
main(opts)
| [
1,
529,
9507,
29958,
4691,
29914,
3149,
9274,
29914,
29880,
333,
279,
957,
1493,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13383,
13383,
13383,
13383,
13383,
13,
29937,
1678,
6760,
630,
491,
529,
5813,
29958,
462,
462,
462,
396,
13,
29937,
1678,
529,
26862,
6227,
29958,
462,
462,
462,
29871,
396,
13,
13383,
13383,
13383,
13383,
13383,
13,
5215,
2897,
29892,
3523,
5510,
29892,
6529,
29891,
9708,
29887,
29906,
29892,
6674,
307,
985,
292,
29892,
12183,
13,
3166,
1298,
9274,
1053,
3667,
29879,
29892,
1400,
7201,
3554,
29892,
1869,
3554,
13,
13,
1753,
1065,
5938,
29898,
5145,
1204,
29892,
4344,
10620,
29892,
3957,
1231,
29892,
4833,
2371,
29892,
269,
2429,
1125,
13,
1678,
12088,
29918,
13556,
2347,
353,
7700,
13,
1678,
3957,
353,
6529,
29891,
9708,
29887,
29906,
29889,
6915,
29898,
9965,
1231,
29897,
13,
1678,
10677,
353,
3957,
29889,
18127,
580,
13,
1678,
1550,
451,
12088,
29918,
13556,
2347,
29901,
13,
4706,
4982,
353,
6213,
13,
4706,
1018,
29901,
13,
9651,
396,
910,
1246,
674,
16500,
368,
4480,
2745,
716,
4982,
338,
3625,
13,
9651,
4982,
353,
4344,
10620,
29889,
657,
580,
13,
4706,
5174,
29901,
13,
9651,
396,
565,
727,
338,
385,
1059,
591,
674,
23283,
278,
2425,
13,
9651,
12088,
29918,
13556,
2347,
353,
5852,
13,
4706,
565,
4982,
1275,
6213,
29901,
13,
9651,
12088,
29918,
13556,
2347,
353,
5852,
13,
4706,
1683,
29901,
632,
13,
9651,
518,
25378,
29892,
1881,
2283,
26073,
353,
4982,
13,
9651,
313,
3383,
2302,
29892,
1375,
29990,
29892,
1375,
29979,
29892,
1375,
29999,
29892,
4236,
29990,
29892,
4236,
29979,
29892,
4236,
29999,
29892,
6287,
29990,
29892,
6287,
29979,
29892,
6287,
29999,
29892,
9210,
29990,
29892,
9210,
29979,
29892,
9210,
29999,
29897,
353,
1869,
3554,
29889,
657,
9026,
2283,
10602,
29898,
2080,
2283,
29897,
13,
632,
13,
9651,
4635,
14473,
353,
9995,
19460,
11646,
9995,
718,
4833,
2371,
718,
9995,
29898,
333,
29892,
1445,
2084,
29892,
1949,
29892,
7052,
29916,
29892,
7052,
29891,
29892,
7052,
29920,
29892,
10289,
29916,
29892,
10289,
29891,
29892,
10289,
29920,
29892,
479,
290,
29897,
15673,
313,
29995,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
6850,
29918,
9984,
2369,
21367,
29414,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
29892,
1273,
29879,
2483,
15945,
29908,
13,
9651,
4635,
7883,
353,
518,
25378,
29892,
1881,
2283,
29892,
938,
29898,
2798,
511,
5785,
29898,
7052,
29990,
511,
5785,
29898,
7052,
29979,
511,
5785,
29898,
7052,
29999,
511,
5785,
29898,
10289,
29990,
511,
5785,
29898,
10289,
29979,
511,
5785,
29898,
10289,
29999,
511,
5785,
29898,
1195,
29990,
511,
5785,
29898,
1195,
29979,
511,
5785,
29898,
3317,
29990,
511,
5785,
29898,
3317,
29979,
511,
938,
29898,
29879,
2429,
4638,
13,
9651,
12183,
29889,
3888,
29898,
18127,
29889,
29885,
468,
29878,
1598,
29898,
7851,
14473,
29892,
4635,
7883,
876,
13,
9651,
10677,
29889,
7978,
29898,
7851,
14473,
29892,
4635,
7883,
29897,
13,
9651,
3957,
29889,
15060,
580,
13,
1678,
10677,
29889,
5358,
580,
13,
1678,
3957,
29889,
5358,
580,
13,
13,
1753,
1065,
29898,
2080,
12924,
29892,
954,
29883,
2361,
29892,
4833,
978,
29892,
4833,
1792,
29892,
4833,
3364,
29892,
4833,
3069,
29892,
4833,
637,
29892,
2825,
29890,
29892,
4833,
2371,
29892,
269,
2429,
1125,
13,
1678,
29111,
353,
29871,
29900,
13,
1678,
4344,
10620,
353,
6674,
307,
985,
292,
29889,
10620,
580,
13,
1678,
565,
5475,
353,
3667,
29879,
29889,
657,
10547,
29898,
2080,
12924,
29897,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
361,
5475,
22164,
13,
4706,
4344,
10620,
29889,
649,
4197,
29875,
29892,
565,
5475,
29961,
29875,
24960,
13,
1678,
363,
474,
297,
3464,
29898,
524,
29898,
1949,
29883,
2361,
22164,
396,
705,
788,
408,
1784,
6213,
17643,
408,
954,
5531,
414,
304,
2649,
963,
304,
29504,
313,
9990,
338,
9338,
5800,
29897,
13,
4706,
4344,
10620,
29889,
649,
29898,
8516,
29897,
13,
268,
13,
1678,
1067,
457,
1168,
1231,
353,
1400,
7201,
3554,
29889,
657,
17918,
1231,
29898,
2585,
978,
29892,
4833,
1792,
29892,
4833,
3364,
29892,
4833,
3069,
29892,
4833,
637,
29892,
5852,
29897,
13,
1678,
6529,
29891,
9708,
29887,
1168,
1231,
353,
1400,
7201,
3554,
29889,
657,
17918,
1231,
29898,
2585,
978,
29892,
4833,
1792,
29892,
4833,
3364,
29892,
4833,
3069,
29892,
4833,
637,
29892,
7700,
29897,
13,
268,
13,
1678,
565,
2825,
29890,
29901,
13,
4706,
2897,
29889,
5205,
877,
8865,
2585,
525,
718,
1067,
457,
1168,
1231,
29897,
13,
4706,
2897,
29889,
5205,
877,
11600,
29890,
525,
718,
1067,
457,
1168,
1231,
29897,
13,
13,
1678,
3957,
353,
6529,
29891,
9708,
29887,
29906,
29889,
6915,
29898,
567,
29891,
9708,
29887,
1168,
1231,
29897,
13,
1678,
10677,
353,
3957,
29889,
18127,
580,
13,
1678,
565,
2825,
29890,
29901,
13,
4706,
10677,
29889,
7978,
877,
27045,
8528,
29911,
1430,
13381,
1400,
29887,
275,
1495,
13,
1678,
3957,
29889,
15060,
580,
13,
1678,
3855,
353,
9995,
13,
1678,
14602,
10911,
9995,
718,
4833,
2371,
718,
9995,
313,
13,
4706,
1178,
6043,
29892,
13,
4706,
934,
2084,
1426,
29892,
13,
4706,
954,
6043,
29892,
13,
4706,
6287,
29916,
3765,
16716,
29892,
13,
4706,
6287,
29891,
3765,
16716,
29892,
13,
4706,
6287,
29920,
3765,
16716,
29892,
13,
4706,
9210,
29916,
3765,
16716,
29892,
418,
13,
4706,
9210,
29891,
3765,
16716,
29892,
13,
4706,
9210,
29920,
3765,
16716,
29892,
13,
4706,
23216,
970,
29889,
19156,
29898,
7999,
7843,
1699,
15945,
718,
851,
29898,
29879,
2429,
29897,
718,
5124,
1159,
13,
1678,
1723,
15945,
29908,
13,
1678,
12183,
29889,
3888,
29898,
18127,
29889,
29885,
468,
29878,
1598,
29898,
29939,
876,
13,
1678,
10677,
29889,
7978,
29898,
29939,
29897,
13,
1678,
3957,
29889,
15060,
580,
13,
13,
29937,
1678,
3855,
353,
376,
2622,
788,
19156,
4914,
877,
29908,
718,
4833,
2371,
718,
376,
3788,
479,
290,
742,
29906,
29947,
29929,
29929,
29906,
5501,
29925,
5607,
29979,
29954,
1164,
742,
29906,
5513,
13,
29937,
1678,
12183,
29889,
3888,
29898,
18127,
29889,
29885,
468,
29878,
1598,
29898,
29939,
876,
13,
29937,
1678,
10677,
29889,
7978,
29898,
29939,
29897,
13,
29937,
1678,
3957,
29889,
15060,
580,
13,
1678,
1596,
525,
1949,
29883,
2361,
742,
1949,
29883,
2361,
13,
1678,
4344,
353,
5159,
13,
1678,
396,
1334,
1369,
954,
29883,
2361,
4344,
10174,
13,
1678,
363,
474,
297,
3464,
29898,
524,
29898,
1949,
29883,
2361,
22164,
13,
4706,
4344,
29889,
4397,
29898,
18056,
307,
985,
292,
29889,
7032,
29898,
5182,
29922,
3389,
5938,
29892,
29871,
13,
9651,
6389,
7607,
29875,
29892,
4344,
10620,
29892,
6529,
29891,
9708,
29887,
1168,
1231,
29892,
4833,
2371,
29892,
269,
2429,
4961,
13,
4706,
4344,
14352,
29896,
1822,
2962,
580,
13,
13,
1678,
396,
4480,
363,
599,
4344,
304,
8341,
1009,
8225,
13,
1678,
363,
474,
297,
3464,
29898,
524,
29898,
1949,
29883,
2361,
22164,
13,
4706,
4344,
29961,
29875,
1822,
7122,
580,
13,
3986,
13,
1678,
3855,
353,
376,
3258,
2380,
6732,
376,
718,
4833,
2371,
718,
376,
773,
402,
9047,
313,
479,
290,
5513,
13,
1678,
12183,
29889,
3888,
29898,
18127,
29889,
29885,
468,
29878,
1598,
29898,
29939,
876,
13,
1678,
10677,
29889,
7978,
29898,
29939,
29897,
13,
13,
1678,
3957,
29889,
15060,
580,
13,
418,
13,
1678,
2030,
29918,
275,
22671,
29918,
5563,
353,
3957,
29889,
275,
22671,
29918,
5563,
13,
1678,
3957,
29889,
842,
29918,
275,
22671,
29918,
5563,
29898,
29900,
29897,
13,
1678,
3855,
353,
376,
29963,
2477,
29965,
5005,
383,
3299,
13764,
1964,
29979,
10721,
376,
718,
4833,
2371,
13,
1678,
12183,
29889,
3888,
29898,
18127,
29889,
29885,
468,
29878,
1598,
29898,
29939,
876,
13,
1678,
10677,
29889,
7978,
29898,
29939,
29897,
13,
1678,
3957,
29889,
15060,
580,
13,
1678,
3957,
29889,
842,
29918,
275,
22671,
29918,
5563,
29898,
1025,
29918,
275,
22671,
29918,
5563,
29897,
13,
1678,
10677,
29889,
5358,
580,
308,
13,
13,
1753,
1667,
29898,
25707,
1125,
13,
1678,
1065,
29898,
25707,
29889,
2080,
29892,
29111,
29889,
29883,
2361,
29892,
29111,
29889,
2585,
978,
29892,
29111,
29889,
2585,
1792,
29892,
29111,
29889,
2585,
3364,
29892,
29111,
29889,
2585,
3069,
29892,
29111,
29889,
2585,
637,
29892,
29111,
29889,
3258,
29892,
29111,
29889,
2585,
2371,
29892,
29111,
29889,
29879,
2429,
29897,
13,
308,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
8744,
353,
525,
27573,
29901,
1273,
29097,
518,
6768,
29962,
29915,
13,
1678,
6139,
353,
376,
9832,
1078,
263,
1591,
411,
28855,
2722,
20766,
278,
10161,
310,
607,
278,
365,
3289,
2066,
1712,
3291,
1213,
13,
1678,
1015,
353,
3523,
5510,
29889,
8375,
11726,
29898,
21125,
29922,
21125,
29892,
6139,
29922,
8216,
29897,
13,
1678,
1015,
29889,
1202,
29918,
3385,
877,
29899,
29875,
3788,
489,
2080,
742,
4381,
2433,
742,
8477,
2433,
4290,
4138,
988,
304,
1284,
278,
365,
3289,
2066,
742,
1853,
2433,
1807,
1495,
13,
1678,
1015,
29889,
1202,
29918,
3385,
877,
29899,
29879,
3788,
489,
29879,
2429,
742,
4381,
2433,
742,
8477,
2433,
14098,
1367,
742,
1853,
2433,
1807,
1495,
13,
1678,
1015,
29889,
1202,
29918,
3385,
877,
29899,
29916,
3788,
489,
3258,
742,
4381,
29922,
8824,
29892,
8477,
2433,
9832,
1078,
278,
2566,
742,
2467,
2433,
8899,
29918,
3009,
1495,
13,
1678,
1015,
29889,
1202,
29918,
3385,
877,
29899,
29876,
3788,
489,
2585,
978,
742,
4381,
2433,
742,
8477,
2433,
6747,
7201,
6535,
1024,
988,
304,
3787,
278,
28855,
2722,
742,
1853,
2433,
1807,
1495,
13,
1678,
1015,
29889,
1202,
29918,
3385,
877,
29899,
29884,
3788,
489,
2585,
1792,
742,
4381,
2433,
742,
8477,
2433,
4051,
1404,
742,
1853,
2433,
1807,
1495,
13,
1678,
1015,
29889,
1202,
29918,
3385,
877,
29899,
29886,
3788,
489,
2585,
3364,
742,
4381,
2433,
742,
8477,
2433,
4051,
1209,
742,
1853,
2433,
1807,
1495,
13,
1678,
1015,
29889,
1202,
29918,
3385,
877,
29899,
29885,
3788,
489,
2585,
3069,
742,
4381,
2433,
742,
8477,
2433,
4051,
3495,
742,
1853,
2433,
1807,
1495,
13,
1678,
1015,
29889,
1202,
29918,
3385,
877,
29899,
29878,
3788,
489,
2585,
637,
742,
4381,
2433,
742,
8477,
2433,
4051,
2011,
742,
1853,
2433,
1807,
1495,
13,
1678,
1015,
29889,
1202,
29918,
3385,
877,
29899,
29873,
3788,
489,
2585,
2371,
742,
4381,
2433,
742,
8477,
2433,
4051,
1591,
742,
1853,
2433,
1807,
1495,
13,
1678,
1015,
29889,
1202,
29918,
3385,
877,
29899,
29883,
3788,
489,
29883,
2361,
742,
4381,
2433,
742,
8477,
2433,
4557,
310,
1304,
10174,
742,
1853,
2433,
1807,
1495,
13,
1678,
313,
25707,
29892,
6389,
29897,
353,
1015,
29889,
5510,
29918,
5085,
580,
13,
1678,
1667,
29898,
25707,
29897,
13,
2
] |
paccmann_proteomics/data/datasets/seq_clf.py | xueeinstein/paccmann_proteomics | 28 | 35753 | import os
import time
from dataclasses import dataclass, field
from enum import Enum
from typing import List, Optional, Union
import torch
from filelock import FileLock
from transformers import PreTrainedTokenizer, RobertaTokenizer, RobertaTokenizerFast, XLMRobertaTokenizer
from transformers.data.datasets import GlueDataset
from transformers.data.datasets import GlueDataTrainingArguments
from transformers.data.processors.glue import glue_convert_examples_to_features
from transformers.data.processors.utils import InputFeatures
from loguru import logger
from ..processors.seq_clf import seq_clf_output_modes, seq_clf_processors, seq_clf_tasks_num_labels
class Split(Enum):
train = 'train'
dev = 'dev'
test = 'test'
class SeqClfDataset(GlueDataset):
"""
Why this class even exists?
`class GlueDataset(Dataset)` has a constructor `def __init__()` with
`processor = glue_processors[args.task_name]()`, however I want to expand `glue_processors`
with protein clf task names. The line `processor = glue_processors[args.task_name]()` in parent
class doesn't accomodate this.
"""
args: GlueDataTrainingArguments
output_mode: str
features: List[InputFeatures]
def __init__(
self,
args: GlueDataTrainingArguments,
tokenizer: PreTrainedTokenizer,
limit_length: Optional[int] = None,
mode: Union[str, Split] = Split.train,
cache_dir: Optional[str] = None,
):
self.args = args
self.processor = seq_clf_processors[args.task_name]()
self.output_mode = seq_clf_output_modes[args.task_name]
if isinstance(mode, str):
try:
mode = Split[mode]
except KeyError:
raise KeyError('mode is not a valid split name')
# Load data features from cache or dataset file
cached_features_file = os.path.join(
cache_dir if cache_dir is not None else args.data_dir,
'cached_{}_{}_{}_{}'.format(
mode.value, tokenizer.__class__.__name__, str(args.max_seq_length), args.task_name,
),
)
label_list = self.processor.get_labels()
if args.task_name in ['mnli', 'mnli-mm'] and tokenizer.__class__ in (
RobertaTokenizer,
RobertaTokenizerFast,
XLMRobertaTokenizer,
BartTokenizer,
BartTokenizerFast,
):
# HACK(label indices are swapped in RoBERTa pretrained model)
label_list[1], label_list[2] = label_list[2], label_list[1]
self.label_list = label_list
# Make sure only the first process in distributed training processes the dataset,
# and the others will use the cache.
lock_path = cached_features_file + '.lock'
with FileLock(lock_path):
if os.path.exists(cached_features_file) and not args.overwrite_cache:
start = time.time()
self.features = torch.load(cached_features_file)
logger.info(
f'Loading features from cached file {cached_features_file} [took %.3f s]', time.time() - start
)
else:
logger.info(f'Creating features from dataset file at {args.data_dir}')
if mode == Split.dev:
examples = self.processor.get_dev_examples(args.data_dir)
elif mode == Split.test:
examples = self.processor.get_test_examples(args.data_dir)
else:
examples = self.processor.get_train_examples(args.data_dir)
if limit_length is not None:
examples = examples[:limit_length]
# Load a data file into a list of ``InputFeatures``
self.features = glue_convert_examples_to_features(
examples,
tokenizer,
max_length=args.max_seq_length,
label_list=label_list,
output_mode=self.output_mode,
)
start = time.time()
torch.save(self.features, cached_features_file)
# ^ This seems to take a lot of time so I want to investigate why and how we can improve.
logger.info(
'Saving features into cached file %s [took %.3f s]', cached_features_file, time.time() - start
)
def __len__(self):
return len(self.features)
def __getitem__(self, i) -> InputFeatures:
return self.features[i]
def get_labels(self):
return self.label_list
| [
1,
1053,
2897,
13,
5215,
931,
13,
3166,
848,
13203,
1053,
848,
1990,
29892,
1746,
13,
3166,
14115,
1053,
1174,
398,
13,
3166,
19229,
1053,
2391,
29892,
28379,
29892,
7761,
13,
5215,
4842,
305,
13,
3166,
934,
908,
1053,
3497,
16542,
13,
3166,
4327,
414,
1053,
4721,
5323,
1312,
6066,
3950,
29892,
1528,
19954,
6066,
3950,
29892,
1528,
19954,
6066,
3950,
29943,
579,
29892,
1060,
29931,
21055,
4950,
941,
6066,
3950,
13,
3166,
4327,
414,
29889,
1272,
29889,
14538,
1691,
1053,
8467,
434,
16390,
24541,
13,
3166,
4327,
414,
29889,
1272,
29889,
14538,
1691,
1053,
8467,
434,
1469,
5323,
2827,
26915,
13,
3166,
4327,
414,
29889,
1272,
29889,
5014,
943,
29889,
3820,
434,
1053,
3144,
434,
29918,
13441,
29918,
19057,
29918,
517,
29918,
22100,
13,
3166,
4327,
414,
29889,
1272,
29889,
5014,
943,
29889,
13239,
1053,
10567,
8263,
3698,
13,
3166,
1480,
20144,
1053,
17927,
13,
3166,
6317,
5014,
943,
29889,
11762,
29918,
695,
29888,
1053,
19359,
29918,
695,
29888,
29918,
4905,
29918,
1545,
267,
29892,
19359,
29918,
695,
29888,
29918,
5014,
943,
29892,
19359,
29918,
695,
29888,
29918,
20673,
29918,
1949,
29918,
21134,
13,
13,
13,
1990,
26178,
29898,
16854,
1125,
13,
1678,
7945,
353,
525,
14968,
29915,
13,
1678,
2906,
353,
525,
3359,
29915,
13,
1678,
1243,
353,
525,
1688,
29915,
13,
13,
13,
1990,
25981,
6821,
29888,
16390,
24541,
29898,
29954,
29880,
434,
16390,
24541,
1125,
13,
1678,
9995,
13,
1678,
3750,
445,
770,
1584,
4864,
29973,
13,
1678,
421,
1990,
8467,
434,
16390,
24541,
29898,
16390,
24541,
3569,
756,
29871,
263,
5823,
421,
1753,
4770,
2344,
1649,
2555,
411,
1678,
13,
1678,
421,
26482,
353,
3144,
434,
29918,
5014,
943,
29961,
5085,
29889,
7662,
29918,
978,
29962,
16996,
3138,
306,
864,
304,
7985,
421,
3820,
434,
29918,
5014,
943,
29952,
29871,
13,
1678,
411,
26823,
1067,
29888,
3414,
2983,
29889,
450,
1196,
421,
26482,
353,
3144,
434,
29918,
5014,
943,
29961,
5085,
29889,
7662,
29918,
978,
29962,
2555,
297,
3847,
29871,
13,
1678,
770,
1838,
29915,
29873,
7954,
397,
403,
445,
29889,
13,
1678,
9995,
13,
1678,
6389,
29901,
8467,
434,
1469,
5323,
2827,
26915,
13,
1678,
1962,
29918,
8513,
29901,
851,
13,
1678,
5680,
29901,
2391,
29961,
4290,
8263,
3698,
29962,
13,
13,
1678,
822,
4770,
2344,
12035,
13,
4706,
1583,
29892,
13,
4706,
6389,
29901,
8467,
434,
1469,
5323,
2827,
26915,
29892,
13,
4706,
5993,
3950,
29901,
4721,
5323,
1312,
6066,
3950,
29892,
13,
4706,
4046,
29918,
2848,
29901,
28379,
29961,
524,
29962,
353,
6213,
29892,
13,
4706,
4464,
29901,
7761,
29961,
710,
29892,
26178,
29962,
353,
26178,
29889,
14968,
29892,
13,
4706,
7090,
29918,
3972,
29901,
28379,
29961,
710,
29962,
353,
6213,
29892,
13,
268,
1125,
13,
4706,
1583,
29889,
5085,
353,
6389,
13,
4706,
1583,
29889,
26482,
353,
19359,
29918,
695,
29888,
29918,
5014,
943,
29961,
5085,
29889,
7662,
29918,
978,
29962,
580,
13,
4706,
1583,
29889,
4905,
29918,
8513,
353,
19359,
29918,
695,
29888,
29918,
4905,
29918,
1545,
267,
29961,
5085,
29889,
7662,
29918,
978,
29962,
13,
4706,
565,
338,
8758,
29898,
8513,
29892,
851,
1125,
13,
9651,
1018,
29901,
13,
18884,
4464,
353,
26178,
29961,
8513,
29962,
13,
9651,
5174,
7670,
2392,
29901,
13,
18884,
12020,
7670,
2392,
877,
8513,
338,
451,
263,
2854,
6219,
1024,
1495,
13,
308,
13,
4706,
396,
16012,
848,
5680,
515,
7090,
470,
8783,
934,
13,
4706,
22152,
29918,
22100,
29918,
1445,
353,
2897,
29889,
2084,
29889,
7122,
29898,
13,
9651,
7090,
29918,
3972,
565,
7090,
29918,
3972,
338,
451,
6213,
1683,
6389,
29889,
1272,
29918,
3972,
29892,
13,
9651,
525,
29883,
3791,
648,
3227,
3227,
3227,
29913,
4286,
4830,
29898,
13,
18884,
4464,
29889,
1767,
29892,
5993,
3950,
17255,
1990,
1649,
17255,
978,
1649,
29892,
851,
29898,
5085,
29889,
3317,
29918,
11762,
29918,
2848,
511,
6389,
29889,
7662,
29918,
978,
29892,
13,
9651,
10353,
13,
4706,
1723,
13,
4706,
3858,
29918,
1761,
353,
1583,
29889,
26482,
29889,
657,
29918,
21134,
580,
13,
4706,
565,
6389,
29889,
7662,
29918,
978,
297,
6024,
23521,
492,
742,
525,
23521,
492,
29899,
4317,
2033,
322,
5993,
3950,
17255,
1990,
1649,
297,
313,
13,
9651,
1528,
19954,
6066,
3950,
29892,
13,
9651,
1528,
19954,
6066,
3950,
29943,
579,
29892,
13,
9651,
1060,
29931,
21055,
4950,
941,
6066,
3950,
29892,
13,
9651,
12245,
6066,
3950,
29892,
13,
9651,
12245,
6066,
3950,
29943,
579,
29892,
13,
308,
1125,
13,
9651,
396,
379,
11375,
29898,
1643,
16285,
526,
2381,
17280,
297,
1528,
13635,
29911,
29874,
758,
3018,
1312,
1904,
29897,
13,
9651,
3858,
29918,
1761,
29961,
29896,
1402,
3858,
29918,
1761,
29961,
29906,
29962,
353,
3858,
29918,
1761,
29961,
29906,
1402,
3858,
29918,
1761,
29961,
29896,
29962,
13,
4706,
1583,
29889,
1643,
29918,
1761,
353,
3858,
29918,
1761,
13,
13,
4706,
396,
8561,
1854,
871,
278,
937,
1889,
297,
13235,
6694,
10174,
278,
8783,
29892,
13,
4706,
396,
322,
278,
4045,
674,
671,
278,
7090,
29889,
13,
4706,
7714,
29918,
2084,
353,
22152,
29918,
22100,
29918,
1445,
718,
15300,
908,
29915,
13,
4706,
411,
3497,
16542,
29898,
908,
29918,
2084,
1125,
13,
13,
9651,
565,
2897,
29889,
2084,
29889,
9933,
29898,
29883,
3791,
29918,
22100,
29918,
1445,
29897,
322,
451,
6389,
29889,
957,
3539,
29918,
8173,
29901,
13,
18884,
1369,
353,
931,
29889,
2230,
580,
13,
18884,
1583,
29889,
22100,
353,
4842,
305,
29889,
1359,
29898,
29883,
3791,
29918,
22100,
29918,
1445,
29897,
13,
18884,
17927,
29889,
3888,
29898,
13,
462,
1678,
285,
29915,
23456,
5680,
515,
22152,
934,
426,
29883,
3791,
29918,
22100,
29918,
1445,
29913,
518,
517,
554,
18695,
29941,
29888,
269,
29962,
742,
931,
29889,
2230,
580,
448,
1369,
13,
18884,
1723,
13,
9651,
1683,
29901,
13,
18884,
17927,
29889,
3888,
29898,
29888,
29915,
9832,
1218,
5680,
515,
8783,
934,
472,
426,
5085,
29889,
1272,
29918,
3972,
29913,
1495,
13,
13,
18884,
565,
4464,
1275,
26178,
29889,
3359,
29901,
13,
462,
1678,
6455,
353,
1583,
29889,
26482,
29889,
657,
29918,
3359,
29918,
19057,
29898,
5085,
29889,
1272,
29918,
3972,
29897,
13,
18884,
25342,
4464,
1275,
26178,
29889,
1688,
29901,
13,
462,
1678,
6455,
353,
1583,
29889,
26482,
29889,
657,
29918,
1688,
29918,
19057,
29898,
5085,
29889,
1272,
29918,
3972,
29897,
13,
18884,
1683,
29901,
13,
462,
1678,
6455,
353,
1583,
29889,
26482,
29889,
657,
29918,
14968,
29918,
19057,
29898,
5085,
29889,
1272,
29918,
3972,
29897,
13,
18884,
565,
4046,
29918,
2848,
338,
451,
6213,
29901,
13,
462,
1678,
6455,
353,
6455,
7503,
13400,
29918,
2848,
29962,
13,
13,
18884,
396,
16012,
263,
848,
934,
964,
263,
1051,
310,
4954,
4290,
8263,
3698,
16159,
13,
18884,
1583,
29889,
22100,
353,
3144,
434,
29918,
13441,
29918,
19057,
29918,
517,
29918,
22100,
29898,
13,
462,
1678,
6455,
29892,
13,
462,
1678,
5993,
3950,
29892,
13,
462,
1678,
4236,
29918,
2848,
29922,
5085,
29889,
3317,
29918,
11762,
29918,
2848,
29892,
13,
462,
1678,
3858,
29918,
1761,
29922,
1643,
29918,
1761,
29892,
13,
462,
1678,
1962,
29918,
8513,
29922,
1311,
29889,
4905,
29918,
8513,
29892,
13,
18884,
1723,
13,
18884,
1369,
353,
931,
29889,
2230,
580,
13,
18884,
4842,
305,
29889,
7620,
29898,
1311,
29889,
22100,
29892,
22152,
29918,
22100,
29918,
1445,
29897,
13,
18884,
396,
6228,
910,
2444,
304,
2125,
263,
3287,
310,
931,
577,
306,
864,
304,
23033,
2020,
322,
920,
591,
508,
11157,
29889,
13,
18884,
17927,
29889,
3888,
29898,
13,
462,
1678,
525,
29903,
5555,
5680,
964,
22152,
934,
1273,
29879,
518,
517,
554,
18695,
29941,
29888,
269,
29962,
742,
22152,
29918,
22100,
29918,
1445,
29892,
931,
29889,
2230,
580,
448,
1369,
13,
18884,
1723,
13,
13,
1678,
822,
4770,
2435,
12035,
1311,
1125,
13,
4706,
736,
7431,
29898,
1311,
29889,
22100,
29897,
13,
13,
1678,
822,
4770,
657,
667,
12035,
1311,
29892,
474,
29897,
1599,
10567,
8263,
3698,
29901,
13,
4706,
736,
1583,
29889,
22100,
29961,
29875,
29962,
13,
13,
1678,
822,
679,
29918,
21134,
29898,
1311,
1125,
13,
4706,
736,
1583,
29889,
1643,
29918,
1761,
13,
2
] |
lianjia_fetch/proxy/mutilprocess_fetch_proxy.py | lxyangfan/lianjia_fetch | 0 | 77446 | <filename>lianjia_fetch/proxy/mutilprocess_fetch_proxy.py
# ! -*- encoding:utf8 -*-
import multiprocessing as MP
from multiprocessing import Manager, Queue, Value, Lock
import time
def task(url, v):
print 'Url is:', url
v.value += 1
return url
def apply_pool_test():
url = 'http://sh.lianjia.com/d'
useful_proxy_num = Value('i', 0)
pool_size = MP.cpu_count() * 2
print 'Pool count', pool_size
# init process pool
pool = MP.Pool(processes=pool_size)
# mark the start time
start_time = time.time()
# task num is 100, and thread num is 8
for i in xrange(100):
pool.apply_async(task, ('{0}{1}'.format(url, i),useful_proxy_num,))
pool.close()
pool.join()
# computing elapsed time
end_time = time.time()
print 'Time used: {0}'.format(end_time - start_time)
print 'Useful proxy num, ', useful_proxy_num.value
def pool_map_test():
urls = [
'https://www.baidu.com',
'http://www.meituan.com/',
'http://blog.csdn.net/',
'http://xxxyxxx.net'
]
print 'Cpu count', MP.cpu_count()
pool_size = MP.cpu_count() * 2
print 'Pool count', pool_size
pool = MP.Pool(processes=pool_size)
pool_outputs = pool.map(task, urls)
pool.close()
pool.join()
print 'Pool :', pool_outputs
if __name__ == '__main__':
apply_pool_test() | [
1,
529,
9507,
29958,
492,
273,
29926,
423,
29918,
9155,
29914,
14701,
29914,
29885,
4422,
5014,
29918,
9155,
29918,
14701,
29889,
2272,
13,
29937,
1738,
448,
29930,
29899,
8025,
29901,
9420,
29947,
448,
29930,
29899,
13,
5215,
6674,
307,
985,
292,
408,
16379,
13,
3166,
6674,
307,
985,
292,
1053,
15629,
29892,
5462,
434,
29892,
7865,
29892,
18199,
13,
5215,
931,
13,
13,
13,
1753,
3414,
29898,
2271,
29892,
325,
1125,
13,
1678,
1596,
525,
5983,
338,
29901,
742,
3142,
13,
1678,
325,
29889,
1767,
4619,
29871,
29896,
13,
1678,
736,
3142,
13,
13,
13,
1753,
3394,
29918,
10109,
29918,
1688,
7295,
13,
1678,
3142,
353,
525,
1124,
597,
845,
29889,
492,
273,
29926,
423,
29889,
510,
29914,
29881,
29915,
13,
1678,
5407,
29918,
14701,
29918,
1949,
353,
7865,
877,
29875,
742,
29871,
29900,
29897,
13,
13,
1678,
11565,
29918,
2311,
353,
16379,
29889,
21970,
29918,
2798,
580,
334,
29871,
29906,
13,
1678,
1596,
525,
11426,
2302,
742,
11565,
29918,
2311,
13,
1678,
396,
2069,
1889,
11565,
13,
1678,
11565,
353,
16379,
29889,
11426,
29898,
5014,
267,
29922,
10109,
29918,
2311,
29897,
13,
1678,
396,
2791,
278,
1369,
931,
13,
1678,
1369,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
1678,
396,
3414,
954,
338,
29871,
29896,
29900,
29900,
29892,
322,
3244,
954,
338,
29871,
29947,
13,
1678,
363,
474,
297,
921,
3881,
29898,
29896,
29900,
29900,
1125,
13,
4706,
11565,
29889,
7302,
29918,
12674,
29898,
7662,
29892,
6702,
29912,
29900,
1157,
29896,
29913,
4286,
4830,
29898,
2271,
29892,
474,
511,
1509,
1319,
29918,
14701,
29918,
1949,
29892,
876,
13,
13,
1678,
11565,
29889,
5358,
580,
13,
1678,
11565,
29889,
7122,
580,
13,
1678,
396,
20602,
560,
28170,
931,
13,
1678,
1095,
29918,
2230,
353,
931,
29889,
2230,
580,
13,
1678,
1596,
525,
2481,
1304,
29901,
426,
29900,
29913,
4286,
4830,
29898,
355,
29918,
2230,
448,
1369,
29918,
2230,
29897,
13,
1678,
1596,
525,
11403,
1319,
10166,
954,
29892,
13420,
5407,
29918,
14701,
29918,
1949,
29889,
1767,
13,
13,
13,
1753,
11565,
29918,
1958,
29918,
1688,
7295,
13,
1678,
23942,
353,
518,
13,
4706,
525,
991,
597,
1636,
29889,
2291,
333,
29884,
29889,
510,
742,
13,
4706,
525,
1124,
597,
1636,
29889,
1004,
1981,
273,
29889,
510,
29914,
742,
13,
4706,
525,
1124,
597,
7312,
29889,
2395,
5200,
29889,
1212,
29914,
742,
13,
4706,
525,
1124,
597,
4419,
3594,
12353,
29889,
1212,
29915,
13,
1678,
4514,
13,
13,
1678,
1596,
525,
29907,
3746,
2302,
742,
16379,
29889,
21970,
29918,
2798,
580,
13,
1678,
11565,
29918,
2311,
353,
16379,
29889,
21970,
29918,
2798,
580,
334,
29871,
29906,
13,
1678,
1596,
525,
11426,
2302,
742,
11565,
29918,
2311,
13,
1678,
11565,
353,
16379,
29889,
11426,
29898,
5014,
267,
29922,
10109,
29918,
2311,
29897,
13,
13,
1678,
11565,
29918,
4905,
29879,
353,
11565,
29889,
1958,
29898,
7662,
29892,
23942,
29897,
13,
1678,
11565,
29889,
5358,
580,
13,
1678,
11565,
29889,
7122,
580,
13,
13,
1678,
1596,
525,
11426,
29871,
584,
742,
11565,
29918,
4905,
29879,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
3394,
29918,
10109,
29918,
1688,
580,
2
] |
ThinkPython/chap9/ex9.py | sokolowskik/Tutorials | 0 | 22353 | <gh_stars>0
def is_reverse(i, j):
"""
Convert 2-digit numbers to strings and check if they are palindromic.
If one of the numbers has less then 2 digits, fill with zeros.
"""
str_i = str(i)
str_j = str(j)
if len(str_i) < 2:
str_i = str_i.zfill(2)
if len(str_j) < 2:
str_j = str_j.zfill(2)
return str_j[::-1] == str_i
age_diff = 15
d_age = 0
while age_diff <= 50:
reversible = 0
for d_age in range(0,80):
m_age = d_age + age_diff
if is_reverse(d_age, m_age):
reversible += 1
if reversible == 6:
print 'The daughter is', d_age, 'years old'
if reversible == 8:
print 'At the 8th time the daughter will be', d_age, 'years old and the mother will be', m_age, 'years old'
break
d_age += 1
age_diff += 1
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
1753,
338,
29918,
24244,
29898,
29875,
29892,
432,
1125,
13,
1678,
9995,
13,
1678,
14806,
29871,
29906,
29899,
26204,
3694,
304,
6031,
322,
1423,
565,
896,
526,
5112,
513,
456,
293,
29889,
13,
1678,
960,
697,
310,
278,
3694,
756,
3109,
769,
29871,
29906,
13340,
29892,
5445,
411,
24786,
29889,
13,
1678,
9995,
13,
1678,
851,
29918,
29875,
353,
851,
29898,
29875,
29897,
13,
1678,
851,
29918,
29926,
353,
851,
29898,
29926,
29897,
13,
1678,
565,
7431,
29898,
710,
29918,
29875,
29897,
529,
29871,
29906,
29901,
13,
4706,
851,
29918,
29875,
353,
851,
29918,
29875,
29889,
29920,
5589,
29898,
29906,
29897,
13,
1678,
565,
7431,
29898,
710,
29918,
29926,
29897,
529,
29871,
29906,
29901,
13,
4706,
851,
29918,
29926,
353,
851,
29918,
29926,
29889,
29920,
5589,
29898,
29906,
29897,
13,
1678,
736,
851,
29918,
29926,
29961,
1057,
29899,
29896,
29962,
1275,
851,
29918,
29875,
13,
13,
482,
29918,
12765,
353,
29871,
29896,
29945,
13,
29881,
29918,
482,
353,
29871,
29900,
13,
13,
8000,
5046,
29918,
12765,
5277,
29871,
29945,
29900,
29901,
13,
1678,
18764,
1821,
353,
29871,
29900,
13,
1678,
363,
270,
29918,
482,
297,
3464,
29898,
29900,
29892,
29947,
29900,
1125,
13,
4706,
286,
29918,
482,
353,
270,
29918,
482,
718,
5046,
29918,
12765,
13,
4706,
565,
338,
29918,
24244,
29898,
29881,
29918,
482,
29892,
286,
29918,
482,
1125,
13,
9651,
18764,
1821,
4619,
29871,
29896,
13,
9651,
565,
18764,
1821,
1275,
29871,
29953,
29901,
13,
18884,
1596,
525,
1576,
8750,
338,
742,
270,
29918,
482,
29892,
525,
6360,
29879,
2030,
29915,
13,
9651,
565,
18764,
1821,
1275,
29871,
29947,
29901,
13,
18884,
1596,
525,
4178,
278,
29871,
29947,
386,
931,
278,
8750,
674,
367,
742,
270,
29918,
482,
29892,
525,
6360,
29879,
2030,
322,
278,
5637,
674,
367,
742,
286,
29918,
482,
29892,
525,
6360,
29879,
2030,
29915,
13,
18884,
2867,
13,
4706,
270,
29918,
482,
4619,
29871,
29896,
13,
1678,
5046,
29918,
12765,
4619,
29871,
29896,
13,
13,
13,
2
] |
websauna/utils/psql.py | highPriestLOL/websauna | 286 | 165264 | <reponame>highPriestLOL/websauna
"""PostgreSQL helpers."""
# Use pgcrypto, instead of uuid-ossp
# Also create a function uuid_generate_v4 for backward compatibility
UUID_SUPPORT_STMT = """CREATE EXTENSION IF NOT EXISTS "pgcrypto";
CREATE OR REPLACE FUNCTION uuid_generate_v4()
RETURNS uuid
AS '
BEGIN
RETURN gen_random_uuid();
END'
LANGUAGE 'plpgsql';
"""
| [
1,
529,
276,
1112,
420,
29958,
9812,
29925,
374,
342,
3927,
29931,
29914,
2676,
4977,
4347,
13,
15945,
29908,
6747,
7979,
4176,
1371,
414,
1213,
15945,
13,
13,
29937,
4803,
23822,
29883,
17929,
29892,
2012,
310,
318,
5416,
29899,
359,
1028,
13,
29937,
3115,
1653,
263,
740,
318,
5416,
29918,
17158,
29918,
29894,
29946,
363,
1250,
1328,
24521,
13,
29965,
11150,
29918,
29903,
4897,
15082,
29918,
1254,
11490,
353,
9995,
27045,
8528,
29911,
1430,
13381,
10762,
6058,
28731,
376,
4061,
29883,
17929,
1769,
13,
27045,
6323,
5195,
7390,
11538,
383,
28700,
318,
5416,
29918,
17158,
29918,
29894,
29946,
580,
13,
1525,
29911,
4574,
3059,
318,
5416,
13,
3289,
525,
13,
29933,
17958,
13,
1525,
29911,
24015,
2531,
29918,
8172,
29918,
25118,
890,
13,
11794,
29915,
13,
29931,
19453,
29965,
10461,
525,
572,
4061,
2850,
2670,
13,
15945,
29908,
13,
2
] |
cardboard/cards/sets/saviors_of_kamigawa.py | Julian/cardboard | 5 | 71238 | <reponame>Julian/cardboard
from cardboard import types
from cardboard.ability import (
AbilityNotImplemented, spell, activated, triggered, static
)
from cardboard.cards import card, common, keywords, match
@card("Hidetsugu's Second Rite")
def hidetsugus_second_rite(card, abilities):
def hidetsugus_second_rite():
return AbilityNotImplemented
return hidetsugus_second_rite,
@card("Kitsune Dawnblade")
def kitsune_dawnblade(card, abilities):
def kitsune_dawnblade():
return AbilityNotImplemented
def kitsune_dawnblade():
return AbilityNotImplemented
return kitsune_dawnblade, kitsune_dawnblade,
@card("Measure of Wickedness")
def measure_of_wickedness(card, abilities):
def measure_of_wickedness():
return AbilityNotImplemented
def measure_of_wickedness():
return AbilityNotImplemented
return measure_of_wickedness, measure_of_wickedness,
@card("Pithing Needle")
def pithing_needle(card, abilities):
def pithing_needle():
return AbilityNotImplemented
def pithing_needle():
return AbilityNotImplemented
return pithing_needle, pithing_needle,
@card("Kuon, Ogre Ascendant")
def kuon_ogre_ascendant(card, abilities):
def kuon_ogre_ascendant():
return AbilityNotImplemented
def kuon_ogre_ascendant():
return AbilityNotImplemented
return kuon_ogre_ascendant, kuon_ogre_ascendant,
@card("Kaho, Minamo Historian")
def kaho_minamo_historian(card, abilities):
def kaho_minamo_historian():
return AbilityNotImplemented
def kaho_minamo_historian():
return AbilityNotImplemented
return kaho_minamo_historian, kaho_minamo_historian,
@card("Inner-Chamber Guard")
def innerchamber_guard(card, abilities):
def innerchamber_guard():
return AbilityNotImplemented
return innerchamber_guard,
@card("Nikko-Onna")
def nikkoonna(card, abilities):
def nikkoonna():
return AbilityNotImplemented
def nikkoonna():
return AbilityNotImplemented
return nikkoonna, nikkoonna,
@card("Oppressive Will")
def oppressive_will(card, abilities):
def oppressive_will():
return AbilityNotImplemented
return oppressive_will,
@card("Soramaro, First to Dream")
def soramaro_first_to_dream(card, abilities):
def soramaro_first_to_dream():
return AbilityNotImplemented
def soramaro_first_to_dream():
return AbilityNotImplemented
def soramaro_first_to_dream():
return AbilityNotImplemented
return soramaro_first_to_dream, soramaro_first_to_dream, soramaro_first_to_dream,
@card("Kashi-Tribe Elite")
def kashitribe_elite(card, abilities):
def kashitribe_elite():
return AbilityNotImplemented
def kashitribe_elite():
return AbilityNotImplemented
return kashitribe_elite, kashitribe_elite,
@card("Arashi, the Sky Asunder")
def arashi_the_sky_asunder(card, abilities):
def arashi_the_sky_asunder():
return AbilityNotImplemented
def arashi_the_sky_asunder():
return AbilityNotImplemented
return arashi_the_sky_asunder, arashi_the_sky_asunder,
@card("Rune-Tail's Essence")
def runetails_essence(card, abilities):
def runetails_essence():
return AbilityNotImplemented
def runetails_essence():
return AbilityNotImplemented
return runetails_essence, runetails_essence,
@card("Captive Flame")
def captive_flame(card, abilities):
def captive_flame():
return AbilityNotImplemented
return captive_flame,
@card("Shinen of Life's Roar")
def shinen_of_lifes_roar(card, abilities):
def shinen_of_lifes_roar():
return AbilityNotImplemented
def shinen_of_lifes_roar():
return AbilityNotImplemented
return shinen_of_lifes_roar, shinen_of_lifes_roar,
@card("Oboro Envoy")
def oboro_envoy(card, abilities):
def oboro_envoy():
return AbilityNotImplemented
def oboro_envoy():
return AbilityNotImplemented
return oboro_envoy, oboro_envoy,
@card("Shifting Borders")
def shifting_borders(card, abilities):
def shifting_borders():
return AbilityNotImplemented
def shifting_borders():
return AbilityNotImplemented
return shifting_borders, shifting_borders,
@card("Presence of the Wise")
def presence_of_the_wise(card, abilities):
def presence_of_the_wise():
return AbilityNotImplemented
return presence_of_the_wise,
@card("Curtain of Light")
def curtain_of_light(card, abilities):
def curtain_of_light():
return AbilityNotImplemented
def curtain_of_light():
return AbilityNotImplemented
def curtain_of_light():
return AbilityNotImplemented
return curtain_of_light, curtain_of_light, curtain_of_light,
@card("Endless Swarm")
def endless_swarm(card, abilities):
def endless_swarm():
return AbilityNotImplemented
def endless_swarm():
return AbilityNotImplemented
return endless_swarm, endless_swarm,
@card("Sokenzan Spellblade")
def sokenzan_spellblade(card, abilities):
def sokenzan_spellblade():
return AbilityNotImplemented
def sokenzan_spellblade():
return AbilityNotImplemented
return sokenzan_spellblade, sokenzan_spellblade,
@card("Hand of Cruelty")
def hand_of_cruelty(card, abilities):
def hand_of_cruelty():
return AbilityNotImplemented
def hand_of_cruelty():
return AbilityNotImplemented
return hand_of_cruelty, hand_of_cruelty,
@card("Neverending Torment")
def neverending_torment(card, abilities):
def neverending_torment():
return AbilityNotImplemented
def neverending_torment():
return AbilityNotImplemented
return neverending_torment, neverending_torment,
@card("Sekki, Seasons' Guide")
def sekki_seasons_guide(card, abilities):
def sekki_seasons_guide():
return AbilityNotImplemented
def sekki_seasons_guide():
return AbilityNotImplemented
def sekki_seasons_guide():
return AbilityNotImplemented
return sekki_seasons_guide, sekki_seasons_guide, sekki_seasons_guide,
@card("Kagemaro's Clutch")
def kagemaros_clutch(card, abilities):
def kagemaros_clutch():
return AbilityNotImplemented
def kagemaros_clutch():
return AbilityNotImplemented
return kagemaros_clutch, kagemaros_clutch,
@card("Shinen of Fear's Chill")
def shinen_of_fears_chill(card, abilities):
def shinen_of_fears_chill():
return AbilityNotImplemented
def shinen_of_fears_chill():
return AbilityNotImplemented
return shinen_of_fears_chill, shinen_of_fears_chill,
@card("Adamaro, First to Desire")
def adamaro_first_to_desire(card, abilities):
def adamaro_first_to_desire():
return AbilityNotImplemented
return adamaro_first_to_desire,
@card("Celestial Kirin")
def celestial_kirin(card, abilities):
def celestial_kirin():
return AbilityNotImplemented
def celestial_kirin():
return AbilityNotImplemented
return celestial_kirin, celestial_kirin,
@card("Ideas Unbound")
def ideas_unbound(card, abilities):
def ideas_unbound():
return AbilityNotImplemented
return ideas_unbound,
@card("Godo's Irregulars")
def godos_irregulars(card, abilities):
def godos_irregulars():
return AbilityNotImplemented
return godos_irregulars,
@card("Kitsune Loreweaver")
def kitsune_loreweaver(card, abilities):
def kitsune_loreweaver():
return AbilityNotImplemented
return kitsune_loreweaver,
@card("Promise of Bunrei")
def promise_of_bunrei(card, abilities):
def promise_of_bunrei():
return AbilityNotImplemented
return promise_of_bunrei,
@card("Nightsoil Kami")
def nightsoil_kami(card, abilities):
def nightsoil_kami():
return AbilityNotImplemented
return nightsoil_kami,
@card("Kagemaro, First to Suffer")
def kagemaro_first_to_suffer(card, abilities):
def kagemaro_first_to_suffer():
return AbilityNotImplemented
def kagemaro_first_to_suffer():
return AbilityNotImplemented
return kagemaro_first_to_suffer, kagemaro_first_to_suffer,
@card("Homura, Human Ascendant")
def homura_human_ascendant(card, abilities):
def homura_human_ascendant():
return AbilityNotImplemented
def homura_human_ascendant():
return AbilityNotImplemented
def homura_human_ascendant():
return AbilityNotImplemented
return homura_human_ascendant, homura_human_ascendant, homura_human_ascendant,
@card("Erayo's Essence")
def erayos_essence(card, abilities):
def erayos_essence():
return AbilityNotImplemented
def erayos_essence():
return AbilityNotImplemented
return erayos_essence, erayos_essence,
@card("Eternal Dominion")
def eternal_dominion(card, abilities):
def eternal_dominion():
return AbilityNotImplemented
def eternal_dominion():
return AbilityNotImplemented
return eternal_dominion, eternal_dominion,
@card("Kami of the Tended Garden")
def kami_of_the_tended_garden(card, abilities):
def kami_of_the_tended_garden():
return AbilityNotImplemented
def kami_of_the_tended_garden():
return AbilityNotImplemented
return kami_of_the_tended_garden, kami_of_the_tended_garden,
@card("Oboro, Palace in the Clouds")
def oboro_palace_in_the_clouds(card, abilities):
def oboro_palace_in_the_clouds():
return AbilityNotImplemented
def oboro_palace_in_the_clouds():
return AbilityNotImplemented
return oboro_palace_in_the_clouds, oboro_palace_in_the_clouds,
@card("Rally the Horde")
def rally_the_horde(card, abilities):
def rally_the_horde():
return AbilityNotImplemented
return rally_the_horde,
@card("Sasaya, Orochi Ascendant")
def sasaya_orochi_ascendant(card, abilities):
def sasaya_orochi_ascendant():
return AbilityNotImplemented
def sasaya_orochi_ascendant():
return AbilityNotImplemented
return sasaya_orochi_ascendant, sasaya_orochi_ascendant,
@card("Minamo Scrollkeeper")
def minamo_scrollkeeper(card, abilities):
def minamo_scrollkeeper():
return AbilityNotImplemented
def minamo_scrollkeeper():
return AbilityNotImplemented
return minamo_scrollkeeper, minamo_scrollkeeper,
@card("Footsteps of the Goryo")
def footsteps_of_the_goryo(card, abilities):
def footsteps_of_the_goryo():
return AbilityNotImplemented
return footsteps_of_the_goryo,
@card("Cut the Earthly Bond")
def cut_the_earthly_bond(card, abilities):
def cut_the_earthly_bond():
return AbilityNotImplemented
return cut_the_earthly_bond,
@card("Dosan's Oldest Chant")
def dosans_oldest_chant(card, abilities):
def dosans_oldest_chant():
return AbilityNotImplemented
def dosans_oldest_chant():
return AbilityNotImplemented
return dosans_oldest_chant, dosans_oldest_chant,
@card("Ghost-Lit Warder")
def ghostlit_warder(card, abilities):
def ghostlit_warder():
return AbilityNotImplemented
def ghostlit_warder():
return AbilityNotImplemented
return ghostlit_warder, ghostlit_warder,
@card("Fiddlehead Kami")
def fiddlehead_kami(card, abilities):
def fiddlehead_kami():
return AbilityNotImplemented
return fiddlehead_kami,
@card("Dense Canopy")
def dense_canopy(card, abilities):
def dense_canopy():
return AbilityNotImplemented
return dense_canopy,
@card("Elder Pine of Jukai")
def elder_pine_of_jukai(card, abilities):
def elder_pine_of_jukai():
return AbilityNotImplemented
def elder_pine_of_jukai():
return AbilityNotImplemented
return elder_pine_of_jukai, elder_pine_of_jukai,
@card("Iname as One")
def iname_as_one(card, abilities):
def iname_as_one():
return AbilityNotImplemented
def iname_as_one():
return AbilityNotImplemented
return iname_as_one, iname_as_one,
@card("Rune-Tail, Kitsune Ascendant")
def runetail_kitsune_ascendant(card, abilities):
def runetail_kitsune_ascendant():
return AbilityNotImplemented
def runetail_kitsune_ascendant():
return AbilityNotImplemented
return runetail_kitsune_ascendant, runetail_kitsune_ascendant,
@card("Gnat Miser")
def gnat_miser(card, abilities):
def gnat_miser():
return AbilityNotImplemented
return gnat_miser,
@card("Akki Underling")
def akki_underling(card, abilities):
def akki_underling():
return AbilityNotImplemented
return akki_underling,
@card("Kami of Empty Graves")
def kami_of_empty_graves(card, abilities):
def kami_of_empty_graves():
return AbilityNotImplemented
return kami_of_empty_graves,
@card("Kami of the Crescent Moon")
def kami_of_the_crescent_moon(card, abilities):
def kami_of_the_crescent_moon():
return AbilityNotImplemented
return kami_of_the_crescent_moon,
@card("Twincast")
def twincast(card, abilities):
def twincast():
return AbilityNotImplemented
return twincast,
@card("<NAME>")
def deathknell_kami(card, abilities):
def deathknell_kami():
return AbilityNotImplemented
def deathknell_kami():
return AbilityNotImplemented
def deathknell_kami():
return AbilityNotImplemented
return deathknell_kami, deathknell_kami, deathknell_kami,
@card("Sakashima the Impostor")
def sakashima_the_impostor(card, abilities):
def sakashima_the_impostor():
return AbilityNotImplemented
return sakashima_the_impostor,
@card("<NAME>")
def promised_kannushi(card, abilities):
def promised_kannushi():
return AbilityNotImplemented
return promised_kannushi,
@card("Homura's Essence")
def homuras_essence(card, abilities):
def homuras_essence():
return AbilityNotImplemented
def homuras_essence():
return AbilityNotImplemented
return homuras_essence, homuras_essence,
@card("<NAME>")
def sokenzan_renegade(card, abilities):
def sokenzan_renegade():
return AbilityNotImplemented
def sokenzan_renegade():
return AbilityNotImplemented
return sokenzan_renegade, sokenzan_renegade,
@card("Overwhelming Intellect")
def overwhelming_intellect(card, abilities):
def overwhelming_intellect():
return AbilityNotImplemented
return overwhelming_intellect,
@card("Descendant of Kiyomaro")
def descendant_of_kiyomaro(card, abilities):
def descendant_of_kiyomaro():
return AbilityNotImplemented
return descendant_of_kiyomaro,
@card("Dreamcatcher")
def dreamcatcher(card, abilities):
def dreamcatcher():
return AbilityNotImplemented
return dreamcatcher,
@card("Kemuri-Onna")
def kemurionna(card, abilities):
def kemurionna():
return AbilityNotImplemented
def kemurionna():
return AbilityNotImplemented
return kemurionna, kemurionna,
@card("Oni of Wild Places")
def oni_of_wild_places(card, abilities):
def oni_of_wild_places():
return AbilityNotImplemented
def oni_of_wild_places():
return AbilityNotImplemented
return oni_of_wild_places, oni_of_wild_places,
@card("One with Nothing")
def one_with_nothing(card, abilities):
def one_with_nothing():
return AbilityNotImplemented
return one_with_nothing,
@card("Soratami Cloud Chariot")
def soratami_cloud_chariot(card, abilities):
def soratami_cloud_chariot():
return AbilityNotImplemented
def soratami_cloud_chariot():
return AbilityNotImplemented
return soratami_cloud_chariot, soratami_cloud_chariot,
@card("Spiraling Embers")
def spiraling_embers(card, abilities):
def spiraling_embers():
return AbilityNotImplemented
return spiraling_embers,
@card("Akuta, Born of Ash")
def akuta_born_of_ash(card, abilities):
def akuta_born_of_ash():
return AbilityNotImplemented
def akuta_born_of_ash():
return AbilityNotImplemented
return akuta_born_of_ash, akuta_born_of_ash,
@card("Feral Lightning")
def feral_lightning(card, abilities):
def feral_lightning():
return AbilityNotImplemented
return feral_lightning,
@card("Trusted Advisor")
def trusted_advisor(card, abilities):
def trusted_advisor():
return AbilityNotImplemented
def trusted_advisor():
return AbilityNotImplemented
return trusted_advisor, trusted_advisor,
@card("Death<NAME>")
def deathmask_nezumi(card, abilities):
def deathmask_nezumi():
return AbilityNotImplemented
return deathmask_nezumi,
@card("Path of Anger's Flame")
def path_of_angers_flame(card, abilities):
def path_of_angers_flame():
return AbilityNotImplemented
return path_of_angers_flame,
@card("Rushing-Tide Zubera")
def rushingtide_zubera(card, abilities):
def rushingtide_zubera():
return AbilityNotImplemented
return rushingtide_zubera,
@card("Descendant of Masumaro")
def descendant_of_masumaro(card, abilities):
def descendant_of_masumaro():
return AbilityNotImplemented
return descendant_of_masumaro,
@card("Kitsune Bonesetter")
def kitsune_bonesetter(card, abilities):
def kitsune_bonesetter():
return AbilityNotImplemented
return kitsune_bonesetter,
@card("Ashes of the Fallen")
def ashes_of_the_fallen(card, abilities):
def ashes_of_the_fallen():
return AbilityNotImplemented
def ashes_of_the_fallen():
return AbilityNotImplemented
return ashes_of_the_fallen, ashes_of_the_fallen,
@card("Ghost-Lit Nourisher")
def ghostlit_nourisher(card, abilities):
def ghostlit_nourisher():
return AbilityNotImplemented
def ghostlit_nourisher():
return AbilityNotImplemented
return ghostlit_nourisher, ghostlit_nourisher,
@card("Eiganjo Free-Riders")
def eiganjo_freeriders(card, abilities):
def eiganjo_freeriders():
return AbilityNotImplemented
def eiganjo_freeriders():
return AbilityNotImplemented
return eiganjo_freeriders, eiganjo_freeriders,
@card("Kiyomaro, First to Stand")
def kiyomaro_first_to_stand(card, abilities):
def kiyomaro_first_to_stand():
return AbilityNotImplemented
def kiyomaro_first_to_stand():
return AbilityNotImplemented
def kiyomaro_first_to_stand():
return AbilityNotImplemented
return kiyomaro_first_to_stand, kiyomaro_first_to_stand, kiyomaro_first_to_stand,
@card("Evermind")
def evermind(card, abilities):
def evermind():
return AbilityNotImplemented
def evermind():
return AbilityNotImplemented
def evermind():
return AbilityNotImplemented
def evermind():
return AbilityNotImplemented
return evermind, evermind, evermind, evermind,
@card("Bounteous Kirin")
def bounteous_kirin(card, abilities):
def bounteous_kirin():
return AbilityNotImplemented
def bounteous_kirin():
return AbilityNotImplemented
return bounteous_kirin, bounteous_kirin,
@card("Enduring Ideal")
def enduring_ideal(card, abilities):
def enduring_ideal():
return AbilityNotImplemented
def enduring_ideal():
return AbilityNotImplemented
return enduring_ideal, enduring_ideal,
@card("Iv<NAME>")
def ivory_crane_netsuke(card, abilities):
def ivory_crane_netsuke():
return AbilityNotImplemented
return ivory_crane_netsuke,
@card("Blood Clock")
def blood_clock(card, abilities):
def blood_clock():
return AbilityNotImplemented
return blood_clock,
@card("Infernal Kirin")
def infernal_kirin(card, abilities):
def infernal_kirin():
return AbilityNotImplemented
def infernal_kirin():
return AbilityNotImplemented
return infernal_kirin, infernal_kirin,
@card("<NAME>, Truth Seeker")
def michiko_konda_truth_seeker(card, abilities):
def michiko_konda_truth_seeker():
return AbilityNotImplemented
return michiko_konda_truth_seeker,
@card("Manriki-Gusari")
def manrikigusari(card, abilities):
def manrikigusari():
return AbilityNotImplemented
def manrikigusari():
return AbilityNotImplemented
return manrikigusari, manrikigusari,
@card("Masumaro, First to Live")
def masumaro_first_to_live(card, abilities):
def masumaro_first_to_live():
return AbilityNotImplemented
return masumaro_first_to_live,
@card("Cowed by Wisdom")
def cowed_by_wisdom(card, abilities):
def cowed_by_wisdom():
return AbilityNotImplemented
def cowed_by_wisdom():
return AbilityNotImplemented
return cowed_by_wisdom, cowed_by_wisdom,
@card("Choice of Damnations")
def choice_of_damnations(card, abilities):
def choice_of_damnations():
return AbilityNotImplemented
return choice_of_damnations,
@card("Skull Collector")
def skull_collector(card, abilities):
def skull_collector():
return AbilityNotImplemented
def skull_collector():
return AbilityNotImplemented
return skull_collector, skull_collector,
@card("Meishin, the Mind Cage")
def meishin_the_mind_cage(card, abilities):
def meishin_the_mind_cage():
return AbilityNotImplemented
return meishin_the_mind_cage,
@card("Shinen of Stars' Light")
def shinen_of_stars_light(card, abilities):
def shinen_of_stars_light():
return AbilityNotImplemented
def shinen_of_stars_light():
return AbilityNotImplemented
return shinen_of_stars_light, shinen_of_stars_light,
@card("Hand of Honor")
def hand_of_honor(card, abilities):
def hand_of_honor():
return AbilityNotImplemented
def hand_of_honor():
return AbilityNotImplemented
return hand_of_honor, hand_of_honor,
@card("Pure Intentions")
def pure_intentions(card, abilities):
def pure_intentions():
return AbilityNotImplemented
def pure_intentions():
return AbilityNotImplemented
return pure_intentions, pure_intentions,
@card("Murmurs from Beyond")
def murmurs_from_beyond(card, abilities):
def murmurs_from_beyond():
return AbilityNotImplemented
return murmurs_from_beyond,
@card("Hail of Arrows")
def hail_of_arrows(card, abilities):
def hail_of_arrows():
return AbilityNotImplemented
return hail_of_arrows,
@card("Seek the Horizon")
def seek_the_horizon(card, abilities):
def seek_the_horizon():
return AbilityNotImplemented
return seek_the_horizon,
@card("Gaze of Adamaro")
def gaze_of_adamaro(card, abilities):
def gaze_of_adamaro():
return AbilityNotImplemented
return gaze_of_adamaro,
@card("Reki, the History of Kamigawa")
def reki_the_history_of_kamigawa(card, abilities):
def reki_the_history_of_kamigawa():
return AbilityNotImplemented
return reki_the_history_of_kamigawa,
@card("Kuon's Essence")
def kuons_essence(card, abilities):
def kuons_essence():
return AbilityNotImplemented
def kuons_essence():
return AbilityNotImplemented
return kuons_essence, kuons_essence,
@card("Charge Across the Araba")
def charge_across_the_araba(card, abilities):
def charge_across_the_araba():
return AbilityNotImplemented
return charge_across_the_araba,
@card("Death Denied")
def death_denied(card, abilities):
def death_denied():
return AbilityNotImplemented
return death_denied,
@card("Ghost-Lit Raider")
def ghostlit_raider(card, abilities):
def ghostlit_raider():
return AbilityNotImplemented
def ghostlit_raider():
return AbilityNotImplemented
return ghostlit_raider, ghostlit_raider,
@card("Thoughts of Ruin")
def thoughts_of_ruin(card, abilities):
def thoughts_of_ruin():
return AbilityNotImplemented
return thoughts_of_ruin,
@card("Kataki, War's Wage")
def kataki_wars_wage(card, abilities):
def kataki_wars_wage():
return AbilityNotImplemented
return kataki_wars_wage,
@card("O-Naginata")
def onaginata(card, abilities):
def onaginata():
return AbilityNotImplemented
def onaginata():
return AbilityNotImplemented
def onaginata():
return AbilityNotImplemented
return onaginata, onaginata, onaginata,
@card("B<NAME>")
def briarknit_kami(card, abilities):
def briarknit_kami():
return AbilityNotImplemented
return briarknit_kami,
@card("Glitterfang")
def glitterfang(card, abilities):
def glitterfang():
return AbilityNotImplemented
def glitterfang():
return AbilityNotImplemented
return glitterfang, glitterfang,
@card("Reverence")
def reverence(card, abilities):
def reverence():
return AbilityNotImplemented
return reverence,
@card("Plow Through Reito")
def plow_through_reito(card, abilities):
def plow_through_reito():
return AbilityNotImplemented
return plow_through_reito,
@card("Undying Flames")
def undying_flames(card, abilities):
def undying_flames():
return AbilityNotImplemented
def undying_flames():
return AbilityNotImplemented
return undying_flames, undying_flames,
@card("Sunder from Within")
def sunder_from_within(card, abilities):
def sunder_from_within():
return AbilityNotImplemented
return sunder_from_within,
@card("Bar<NAME>")
def barrel_down_sokenzan(card, abilities):
def barrel_down_sokenzan():
return AbilityNotImplemented
return barrel_down_sokenzan,
@card("Shape Stealer")
def shape_stealer(card, abilities):
def shape_stealer():
return AbilityNotImplemented
return shape_stealer,
@card("<NAME>")
def razorjaw_oni(card, abilities):
def razorjaw_oni():
return AbilityNotImplemented
return razorjaw_oni,
@card("Sink into Takenuma")
def sink_into_takenuma(card, abilities):
def sink_into_takenuma():
return AbilityNotImplemented
return sink_into_takenuma,
@card("Ghost-Lit Redeemer")
def ghostlit_redeemer(card, abilities):
def ghostlit_redeemer():
return AbilityNotImplemented
def ghostlit_redeemer():
return AbilityNotImplemented
return ghostlit_redeemer, ghostlit_redeemer,
@card("Inner Fire")
def inner_fire(card, abilities):
def inner_fire():
return AbilityNotImplemented
return inner_fire,
@card("Moonwing Moth")
def moonwing_moth(card, abilities):
def moonwing_moth():
return AbilityNotImplemented
def moonwing_moth():
return AbilityNotImplemented
return moonwing_moth, moonwing_moth,
@card("Kiku's Shadow")
def kikus_shadow(card, abilities):
def kikus_shadow():
return AbilityNotImplemented
return kikus_shadow,
@card("Locust Miser")
def locust_miser(card, abilities):
def locust_miser():
return AbilityNotImplemented
return locust_miser,
@card("Sakura-Tribe Scout")
def sakuratribe_scout(card, abilities):
def sakuratribe_scout():
return AbilityNotImplemented
return sakuratribe_scout,
@card("Rending Vines")
def rending_vines(card, abilities):
def rending_vines():
return AbilityNotImplemented
def rending_vines():
return AbilityNotImplemented
return rending_vines, rending_vines,
@card("Stampeding Serow")
def stampeding_serow(card, abilities):
def stampeding_serow():
return AbilityNotImplemented
def stampeding_serow():
return AbilityNotImplemented
return stampeding_serow, stampeding_serow,
@card("Skyfire Kirin")
def skyfire_kirin(card, abilities):
def skyfire_kirin():
return AbilityNotImplemented
def skyfire_kirin():
return AbilityNotImplemented
return skyfire_kirin, skyfire_kirin,
@card("Cloudhoof Kirin")
def cloudhoof_kirin(card, abilities):
def cloudhoof_kirin():
return AbilityNotImplemented
def cloudhoof_kirin():
return AbilityNotImplemented
return cloudhoof_kirin, cloudhoof_kirin,
@card("Spiritual Visit")
def spiritual_visit(card, abilities):
def spiritual_visit():
return AbilityNotImplemented
def spiritual_visit():
return AbilityNotImplemented
return spiritual_visit, spiritual_visit,
@card("Into the Fray")
def into_the_fray(card, abilities):
def into_the_fray():
return AbilityNotImplemented
def into_the_fray():
return AbilityNotImplemented
return into_the_fray, into_the_fray,
@card("Ghost-Lit Stalker")
def ghostlit_stalker(card, abilities):
def ghostlit_stalker():
return AbilityNotImplemented
def ghostlit_stalker():
return AbilityNotImplemented
return ghostlit_stalker, ghostlit_stalker,
@card("Ronin Cavekeeper")
def ronin_cavekeeper(card, abilities):
def ronin_cavekeeper():
return AbilityNotImplemented
return ronin_cavekeeper,
@card("<NAME>")
def araba_mothrider(card, abilities):
def araba_mothrider():
return AbilityNotImplemented
def araba_mothrider():
return AbilityNotImplemented
return araba_mothrider, araba_mothrider,
@card("Okina Nightwatch")
def okina_nightwatch(card, abilities):
def okina_nightwatch():
return AbilityNotImplemented
return okina_nightwatch,
@card("Ayumi, the Last Visitor")
def ayumi_the_last_visitor(card, abilities):
def ayumi_the_last_visitor():
return AbilityNotImplemented
return ayumi_the_last_visitor,
@card("Haru-Onna")
def haruonna(card, abilities):
def haruonna():
return AbilityNotImplemented
def haruonna():
return AbilityNotImplemented
return haruonna, haruonna,
@card("Molting Skin")
def molting_skin(card, abilities):
def molting_skin():
return AbilityNotImplemented
return molting_skin,
@card("Freed from the Real")
def freed_from_the_real(card, abilities):
def freed_from_the_real():
return AbilityNotImplemented
def freed_from_the_real():
return AbilityNotImplemented
def freed_from_the_real():
return AbilityNotImplemented
return freed_from_the_real, freed_from_the_real, freed_from_the_real,
@card("Inner Calm, Outer Strength")
def inner_calm_outer_strength(card, abilities):
def inner_calm_outer_strength():
return AbilityNotImplemented
return inner_calm_outer_strength,
@card("Raving Oni-Slave")
def raving_onislave(card, abilities):
def raving_onislave():
return AbilityNotImplemented
return raving_onislave,
@card("Seed the Land")
def seed_the_land(card, abilities):
def seed_the_land():
return AbilityNotImplemented
return seed_the_land,
@card("Descendant of Soramaro")
def descendant_of_soramaro(card, abilities):
def descendant_of_soramaro():
return AbilityNotImplemented
return descendant_of_soramaro,
@card("Maga, Traitor to Mortals")
def maga_traitor_to_mortals(card, abilities):
def maga_traitor_to_mortals():
return AbilityNotImplemented
def maga_traitor_to_mortals():
return AbilityNotImplemented
return maga_traitor_to_mortals, maga_traitor_to_mortals,
@card("Kiri-Onna")
def kirionna(card, abilities):
def kirionna():
return AbilityNotImplemented
def kirionna():
return AbilityNotImplemented
return kirionna, kirionna,
@card("Iizuka the Ruthless")
def iizuka_the_ruthless(card, abilities):
def iizuka_the_ruthless():
return AbilityNotImplemented
def iizuka_the_ruthless():
return AbilityNotImplemented
return iizuka_the_ruthless, iizuka_the_ruthless,
@card("Yuki-Onna")
def yukionna(card, abilities):
def yukionna():
return AbilityNotImplemented
def yukionna():
return AbilityNotImplemented
return yukionna, yukionna,
@card("Death of a Thousand Stings")
def death_of_a_thousand_stings(card, abilities):
def death_of_a_thousand_stings():
return AbilityNotImplemented
def death_of_a_thousand_stings():
return AbilityNotImplemented
return death_of_a_thousand_stings, death_of_a_thousand_stings,
@card("Pain's Reward")
def pains_reward(card, abilities):
def pains_reward():
return AbilityNotImplemented
return pains_reward,
@card("Scroll of Origins")
def scroll_of_origins(card, abilities):
def scroll_of_origins():
return AbilityNotImplemented
return scroll_of_origins,
@card("Jiwari, the Earth Aflame")
def jiwari_the_earth_aflame(card, abilities):
def jiwari_the_earth_aflame():
return AbilityNotImplemented
def jiwari_the_earth_aflame():
return AbilityNotImplemented
return jiwari_the_earth_aflame, jiwari_the_earth_aflame,
@card("<NAME>")
def oboro_breezecaller(card, abilities):
def oboro_breezecaller():
return AbilityNotImplemented
def oboro_breezecaller():
return AbilityNotImplemented
return oboro_breezecaller, oboro_breezecaller,
@card("Sasaya's Essence")
def sasayas_essence(card, abilities):
def sasayas_essence():
return AbilityNotImplemented
def sasayas_essence():
return AbilityNotImplemented
return sasayas_essence, sasayas_essence,
@card("Tomb of Urami")
def tomb_of_urami(card, abilities):
def tomb_of_urami():
return AbilityNotImplemented
def tomb_of_urami():
return AbilityNotImplemented
return tomb_of_urami, tomb_of_urami,
@card("Shinen of Flight's Wings")
def shinen_of_flights_wings(card, abilities):
def shinen_of_flights_wings():
return AbilityNotImplemented
def shinen_of_flights_wings():
return AbilityNotImplemented
return shinen_of_flights_wings, shinen_of_flights_wings,
@card("Torii Watchward")
def torii_watchward(card, abilities):
def torii_watchward():
return AbilityNotImplemented
def torii_watchward():
return AbilityNotImplemented
return torii_watchward, torii_watchward,
@card("Akki Drillmaster")
def akki_drillmaster(card, abilities):
def akki_drillmaster():
return AbilityNotImplemented
return akki_drillmaster,
@card("Secretkeeper")
def secretkeeper(card, abilities):
def secretkeeper():
return AbilityNotImplemented
return secretkeeper,
@card("<NAME>")
def ebony_owl_netsuke(card, abilities):
def ebony_owl_netsuke():
return AbilityNotImplemented
return ebony_owl_netsuke,
@card("Moonbow Illusionist")
def moonbow_illusionist(card, abilities):
def moonbow_illusionist():
return AbilityNotImplemented
def moonbow_illusionist():
return AbilityNotImplemented
return moonbow_illusionist, moonbow_illusionist,
@card("Kuro's Taken")
def kuros_taken(card, abilities):
def kuros_taken():
return AbilityNotImplemented
def kuros_taken():
return AbilityNotImplemented
return kuros_taken, kuros_taken,
@card("Burning-Eye Zubera")
def burningeye_zubera(card, abilities):
def burningeye_zubera():
return AbilityNotImplemented
return burningeye_zubera,
@card("AEther Shockwave")
def aether_shockwave(card, abilities):
def aether_shockwave():
return AbilityNotImplemented
return aether_shockwave,
@card("Exile into Darkness")
def exile_into_darkness(card, abilities):
def exile_into_darkness():
return AbilityNotImplemented
def exile_into_darkness():
return AbilityNotImplemented
return exile_into_darkness, exile_into_darkness,
@card("Wine of Blood and Iron")
def wine_of_blood_and_iron(card, abilities):
def wine_of_blood_and_iron():
return AbilityNotImplemented
return wine_of_blood_and_iron,
@card("Matsu-Tribe Birdstalker")
def matsutribe_birdstalker(card, abilities):
def matsutribe_birdstalker():
return AbilityNotImplemented
def matsutribe_birdstalker():
return AbilityNotImplemented
return matsutribe_birdstalker, matsutribe_birdstalker,
@card("Shinen of Fury's Fire")
def shinen_of_furys_fire(card, abilities):
def shinen_of_furys_fire():
return AbilityNotImplemented
def shinen_of_furys_fire():
return AbilityNotImplemented
return shinen_of_furys_fire, shinen_of_furys_fire,
@card("Miren, the Moaning Well")
def miren_the_moaning_well(card, abilities):
def miren_the_moaning_well():
return AbilityNotImplemented
def miren_the_moaning_well():
return AbilityNotImplemented
return miren_the_moaning_well, miren_the_moaning_well,
@card("Erayo, Soratami Ascendant")
def erayo_soratami_ascendant(card, abilities):
def erayo_soratami_ascendant():
return AbilityNotImplemented
def erayo_soratami_ascendant():
return AbilityNotImplemented
def erayo_soratami_ascendant():
return AbilityNotImplemented
return erayo_soratami_ascendant, erayo_soratami_ascendant, erayo_soratami_ascendant,
@card("Mikokoro, Center of the Sea")
def mikokoro_center_of_the_sea(card, abilities):
def mikokoro_center_of_the_sea():
return AbilityNotImplemented
def mikokoro_center_of_the_sea():
return AbilityNotImplemented
return mikokoro_center_of_the_sea, mikokoro_center_of_the_sea, | [
1,
529,
276,
1112,
420,
29958,
27501,
713,
29914,
7543,
3377,
13,
3166,
5881,
3377,
1053,
4072,
13,
3166,
5881,
3377,
29889,
3097,
1053,
313,
13,
1678,
1976,
1793,
3664,
1888,
2037,
287,
29892,
24779,
29892,
5039,
630,
29892,
19799,
29892,
2294,
13,
29897,
13,
3166,
5881,
3377,
29889,
28160,
1053,
5881,
29892,
3619,
29892,
29361,
29892,
1993,
13,
13,
13,
29992,
7543,
703,
29950,
333,
1691,
688,
29884,
29915,
29879,
6440,
390,
568,
1159,
13,
1753,
20552,
1691,
688,
375,
29918,
7496,
29918,
1377,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
20552,
1691,
688,
375,
29918,
7496,
29918,
1377,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
20552,
1691,
688,
375,
29918,
7496,
29918,
1377,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
1169,
1540,
7266,
1233,
17530,
311,
1159,
13,
1753,
413,
1169,
1540,
29918,
25516,
17530,
311,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
413,
1169,
1540,
29918,
25516,
17530,
311,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
413,
1169,
1540,
29918,
25516,
17530,
311,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
413,
1169,
1540,
29918,
25516,
17530,
311,
29892,
413,
1169,
1540,
29918,
25516,
17530,
311,
29892,
13,
13,
13,
29992,
7543,
703,
6816,
3745,
310,
399,
17840,
2264,
1159,
13,
1753,
5645,
29918,
974,
29918,
6669,
287,
2264,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
5645,
29918,
974,
29918,
6669,
287,
2264,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
5645,
29918,
974,
29918,
6669,
287,
2264,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
5645,
29918,
974,
29918,
6669,
287,
2264,
29892,
5645,
29918,
974,
29918,
6669,
287,
2264,
29892,
13,
13,
13,
29992,
7543,
703,
29925,
389,
292,
20768,
280,
1159,
13,
1753,
282,
389,
292,
29918,
26180,
280,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
282,
389,
292,
29918,
26180,
280,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
282,
389,
292,
29918,
26180,
280,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
282,
389,
292,
29918,
26180,
280,
29892,
282,
389,
292,
29918,
26180,
280,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
29884,
265,
29892,
438,
7979,
1094,
29883,
5818,
1159,
13,
1753,
413,
29884,
265,
29918,
468,
276,
29918,
6151,
5818,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
413,
29884,
265,
29918,
468,
276,
29918,
6151,
5818,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
413,
29884,
265,
29918,
468,
276,
29918,
6151,
5818,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
413,
29884,
265,
29918,
468,
276,
29918,
6151,
5818,
29892,
413,
29884,
265,
29918,
468,
276,
29918,
6151,
5818,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
29745,
29892,
3080,
10178,
4731,
713,
1159,
13,
1753,
413,
29745,
29918,
1195,
10178,
29918,
16211,
713,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
413,
29745,
29918,
1195,
10178,
29918,
16211,
713,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
413,
29745,
29918,
1195,
10178,
29918,
16211,
713,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
413,
29745,
29918,
1195,
10178,
29918,
16211,
713,
29892,
413,
29745,
29918,
1195,
10178,
29918,
16211,
713,
29892,
13,
13,
13,
29992,
7543,
703,
27748,
29899,
1451,
314,
495,
13211,
1159,
13,
1753,
6426,
305,
314,
495,
29918,
17728,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
6426,
305,
314,
495,
29918,
17728,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
6426,
305,
314,
495,
29918,
17728,
29892,
13,
13,
13,
29992,
7543,
703,
29940,
638,
2901,
29899,
2951,
1056,
1159,
13,
1753,
302,
638,
2901,
11586,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
302,
638,
2901,
11586,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
302,
638,
2901,
11586,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
302,
638,
2901,
11586,
29892,
302,
638,
2901,
11586,
29892,
13,
13,
13,
29992,
7543,
703,
29949,
407,
1253,
573,
2811,
1159,
13,
1753,
4575,
1253,
573,
29918,
14043,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
4575,
1253,
573,
29918,
14043,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
4575,
1253,
573,
29918,
14043,
29892,
13,
13,
13,
29992,
7543,
703,
29903,
272,
8715,
29877,
29892,
3824,
304,
16814,
1159,
13,
1753,
7319,
8715,
29877,
29918,
4102,
29918,
517,
29918,
29881,
1633,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
7319,
8715,
29877,
29918,
4102,
29918,
517,
29918,
29881,
1633,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
7319,
8715,
29877,
29918,
4102,
29918,
517,
29918,
29881,
1633,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
7319,
8715,
29877,
29918,
4102,
29918,
517,
29918,
29881,
1633,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
7319,
8715,
29877,
29918,
4102,
29918,
517,
29918,
29881,
1633,
29892,
7319,
8715,
29877,
29918,
4102,
29918,
517,
29918,
29881,
1633,
29892,
7319,
8715,
29877,
29918,
4102,
29918,
517,
29918,
29881,
1633,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
18321,
29899,
29565,
915,
1260,
568,
1159,
13,
1753,
413,
1161,
277,
374,
915,
29918,
295,
568,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
413,
1161,
277,
374,
915,
29918,
295,
568,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
413,
1161,
277,
374,
915,
29918,
295,
568,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
413,
1161,
277,
374,
915,
29918,
295,
568,
29892,
413,
1161,
277,
374,
915,
29918,
295,
568,
29892,
13,
13,
13,
29992,
7543,
703,
1433,
18321,
29892,
278,
16572,
1094,
5062,
1159,
13,
1753,
564,
18321,
29918,
1552,
29918,
7912,
29918,
294,
5062,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
564,
18321,
29918,
1552,
29918,
7912,
29918,
294,
5062,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
564,
18321,
29918,
1552,
29918,
7912,
29918,
294,
5062,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
564,
18321,
29918,
1552,
29918,
7912,
29918,
294,
5062,
29892,
564,
18321,
29918,
1552,
29918,
7912,
29918,
294,
5062,
29892,
13,
13,
13,
29992,
7543,
703,
29934,
1540,
29899,
29911,
737,
29915,
29879,
11044,
663,
1159,
13,
1753,
1065,
300,
2234,
29918,
404,
663,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
1065,
300,
2234,
29918,
404,
663,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
1065,
300,
2234,
29918,
404,
663,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
1065,
300,
2234,
29918,
404,
663,
29892,
1065,
300,
2234,
29918,
404,
663,
29892,
13,
13,
13,
29992,
7543,
703,
21133,
573,
2379,
420,
1159,
13,
1753,
4332,
573,
29918,
1579,
420,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
4332,
573,
29918,
1579,
420,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
4332,
573,
29918,
1579,
420,
29892,
13,
13,
13,
29992,
7543,
703,
2713,
7026,
310,
4634,
29915,
29879,
1528,
279,
1159,
13,
1753,
528,
7026,
29918,
974,
29918,
29880,
361,
267,
29918,
307,
279,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
528,
7026,
29918,
974,
29918,
29880,
361,
267,
29918,
307,
279,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
528,
7026,
29918,
974,
29918,
29880,
361,
267,
29918,
307,
279,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
528,
7026,
29918,
974,
29918,
29880,
361,
267,
29918,
307,
279,
29892,
528,
7026,
29918,
974,
29918,
29880,
361,
267,
29918,
307,
279,
29892,
13,
13,
13,
29992,
7543,
703,
29949,
4089,
29877,
1174,
18644,
1159,
13,
1753,
704,
5801,
29918,
264,
18644,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
704,
5801,
29918,
264,
18644,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
704,
5801,
29918,
264,
18644,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
704,
5801,
29918,
264,
18644,
29892,
704,
5801,
29918,
264,
18644,
29892,
13,
13,
13,
29992,
7543,
703,
2713,
24377,
350,
20488,
1159,
13,
1753,
528,
24377,
29918,
29890,
20488,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
528,
24377,
29918,
29890,
20488,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
528,
24377,
29918,
29890,
20488,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
528,
24377,
29918,
29890,
20488,
29892,
528,
24377,
29918,
29890,
20488,
29892,
13,
13,
13,
29992,
7543,
703,
13504,
663,
310,
278,
399,
895,
1159,
13,
1753,
10122,
29918,
974,
29918,
1552,
29918,
3538,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
10122,
29918,
974,
29918,
1552,
29918,
3538,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
10122,
29918,
974,
29918,
1552,
29918,
3538,
29892,
13,
13,
13,
29992,
7543,
703,
23902,
2408,
310,
12790,
1159,
13,
1753,
3151,
2408,
29918,
974,
29918,
4366,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
3151,
2408,
29918,
974,
29918,
4366,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
3151,
2408,
29918,
974,
29918,
4366,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
3151,
2408,
29918,
974,
29918,
4366,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
3151,
2408,
29918,
974,
29918,
4366,
29892,
3151,
2408,
29918,
974,
29918,
4366,
29892,
3151,
2408,
29918,
974,
29918,
4366,
29892,
13,
13,
13,
29992,
7543,
703,
5044,
2222,
3925,
2817,
1159,
13,
1753,
1095,
2222,
29918,
2774,
2817,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
1095,
2222,
29918,
2774,
2817,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
1095,
2222,
29918,
2774,
2817,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
1095,
2222,
29918,
2774,
2817,
29892,
1095,
2222,
29918,
2774,
2817,
29892,
13,
13,
13,
29992,
7543,
703,
29903,
4476,
24912,
1706,
514,
17530,
311,
1159,
13,
1753,
269,
4476,
24912,
29918,
1028,
514,
17530,
311,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
269,
4476,
24912,
29918,
1028,
514,
17530,
311,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
269,
4476,
24912,
29918,
1028,
514,
17530,
311,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
269,
4476,
24912,
29918,
1028,
514,
17530,
311,
29892,
269,
4476,
24912,
29918,
1028,
514,
17530,
311,
29892,
13,
13,
13,
29992,
7543,
703,
3481,
310,
11263,
295,
1017,
1159,
13,
1753,
1361,
29918,
974,
29918,
29883,
582,
295,
1017,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
1361,
29918,
974,
29918,
29883,
582,
295,
1017,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
1361,
29918,
974,
29918,
29883,
582,
295,
1017,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
1361,
29918,
974,
29918,
29883,
582,
295,
1017,
29892,
1361,
29918,
974,
29918,
29883,
582,
295,
1017,
29892,
13,
13,
13,
29992,
7543,
703,
29940,
1310,
2548,
4794,
358,
1159,
13,
1753,
2360,
2548,
29918,
7345,
358,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
2360,
2548,
29918,
7345,
358,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
2360,
2548,
29918,
7345,
358,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
2360,
2548,
29918,
7345,
358,
29892,
2360,
2548,
29918,
7345,
358,
29892,
13,
13,
13,
29992,
7543,
703,
29903,
1416,
1984,
29892,
922,
7040,
29915,
16886,
1159,
13,
1753,
409,
29895,
1984,
29918,
344,
7040,
29918,
13075,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
409,
29895,
1984,
29918,
344,
7040,
29918,
13075,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
409,
29895,
1984,
29918,
344,
7040,
29918,
13075,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
409,
29895,
1984,
29918,
344,
7040,
29918,
13075,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
409,
29895,
1984,
29918,
344,
7040,
29918,
13075,
29892,
409,
29895,
1984,
29918,
344,
7040,
29918,
13075,
29892,
409,
29895,
1984,
29918,
344,
7040,
29918,
13075,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
13904,
8854,
29915,
29879,
2233,
10519,
1159,
13,
1753,
413,
13904,
279,
359,
29918,
695,
10519,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
413,
13904,
279,
359,
29918,
695,
10519,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
413,
13904,
279,
359,
29918,
695,
10519,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
413,
13904,
279,
359,
29918,
695,
10519,
29892,
413,
13904,
279,
359,
29918,
695,
10519,
29892,
13,
13,
13,
29992,
7543,
703,
2713,
7026,
310,
383,
799,
29915,
29879,
678,
453,
1159,
13,
1753,
528,
7026,
29918,
974,
29918,
29888,
15451,
29918,
305,
453,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
528,
7026,
29918,
974,
29918,
29888,
15451,
29918,
305,
453,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
528,
7026,
29918,
974,
29918,
29888,
15451,
29918,
305,
453,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
528,
7026,
29918,
974,
29918,
29888,
15451,
29918,
305,
453,
29892,
528,
7026,
29918,
974,
29918,
29888,
15451,
29918,
305,
453,
29892,
13,
13,
13,
29992,
7543,
703,
3253,
8715,
29877,
29892,
3824,
304,
2726,
533,
1159,
13,
1753,
594,
8715,
29877,
29918,
4102,
29918,
517,
29918,
2783,
533,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
594,
8715,
29877,
29918,
4102,
29918,
517,
29918,
2783,
533,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
594,
8715,
29877,
29918,
4102,
29918,
517,
29918,
2783,
533,
29892,
13,
13,
13,
29992,
7543,
703,
29907,
295,
342,
616,
5201,
262,
1159,
13,
1753,
6432,
342,
616,
29918,
14166,
262,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
6432,
342,
616,
29918,
14166,
262,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
6432,
342,
616,
29918,
14166,
262,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
6432,
342,
616,
29918,
14166,
262,
29892,
6432,
342,
616,
29918,
14166,
262,
29892,
13,
13,
13,
29992,
7543,
703,
29902,
311,
294,
853,
9917,
1159,
13,
1753,
7014,
29918,
348,
9917,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
7014,
29918,
348,
9917,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
7014,
29918,
348,
9917,
29892,
13,
13,
13,
29992,
7543,
703,
29954,
8144,
29915,
29879,
6600,
15227,
29879,
1159,
13,
1753,
7339,
359,
29918,
381,
15227,
29879,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
7339,
359,
29918,
381,
15227,
29879,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
7339,
359,
29918,
381,
15227,
29879,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
1169,
1540,
365,
487,
705,
12483,
1159,
13,
1753,
413,
1169,
1540,
29918,
29880,
487,
705,
12483,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
413,
1169,
1540,
29918,
29880,
487,
705,
12483,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
413,
1169,
1540,
29918,
29880,
487,
705,
12483,
29892,
13,
13,
13,
29992,
7543,
703,
18571,
895,
310,
27105,
5803,
1159,
13,
1753,
11640,
29918,
974,
29918,
29890,
348,
5803,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
11640,
29918,
974,
29918,
29890,
348,
5803,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
11640,
29918,
974,
29918,
29890,
348,
5803,
29892,
13,
13,
13,
29992,
7543,
703,
29940,
523,
578,
309,
476,
4479,
1159,
13,
1753,
4646,
578,
309,
29918,
29895,
4479,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
4646,
578,
309,
29918,
29895,
4479,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
4646,
578,
309,
29918,
29895,
4479,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
13904,
8854,
29892,
3824,
304,
317,
3043,
1159,
13,
1753,
413,
13904,
8854,
29918,
4102,
29918,
517,
29918,
29879,
3043,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
413,
13904,
8854,
29918,
4102,
29918,
517,
29918,
29879,
3043,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
413,
13904,
8854,
29918,
4102,
29918,
517,
29918,
29879,
3043,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
413,
13904,
8854,
29918,
4102,
29918,
517,
29918,
29879,
3043,
29892,
413,
13904,
8854,
29918,
4102,
29918,
517,
29918,
29879,
3043,
29892,
13,
13,
13,
29992,
7543,
703,
24259,
2002,
29892,
12968,
1094,
29883,
5818,
1159,
13,
1753,
3632,
2002,
29918,
26029,
29918,
6151,
5818,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
3632,
2002,
29918,
26029,
29918,
6151,
5818,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
3632,
2002,
29918,
26029,
29918,
6151,
5818,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
3632,
2002,
29918,
26029,
29918,
6151,
5818,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
3632,
2002,
29918,
26029,
29918,
6151,
5818,
29892,
3632,
2002,
29918,
26029,
29918,
6151,
5818,
29892,
3632,
2002,
29918,
26029,
29918,
6151,
5818,
29892,
13,
13,
13,
29992,
7543,
703,
29923,
764,
29877,
29915,
29879,
11044,
663,
1159,
13,
1753,
604,
388,
359,
29918,
404,
663,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
604,
388,
359,
29918,
404,
663,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
604,
388,
359,
29918,
404,
663,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
604,
388,
359,
29918,
404,
663,
29892,
604,
388,
359,
29918,
404,
663,
29892,
13,
13,
13,
29992,
7543,
703,
29923,
1890,
13298,
291,
1159,
13,
1753,
634,
17196,
29918,
24130,
291,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
634,
17196,
29918,
24130,
291,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
634,
17196,
29918,
24130,
291,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
634,
17196,
29918,
24130,
291,
29892,
634,
17196,
29918,
24130,
291,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
4479,
310,
278,
323,
2760,
19906,
1159,
13,
1753,
413,
4479,
29918,
974,
29918,
1552,
29918,
29873,
2760,
29918,
29887,
7879,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
413,
4479,
29918,
974,
29918,
1552,
29918,
29873,
2760,
29918,
29887,
7879,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
413,
4479,
29918,
974,
29918,
1552,
29918,
29873,
2760,
29918,
29887,
7879,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
413,
4479,
29918,
974,
29918,
1552,
29918,
29873,
2760,
29918,
29887,
7879,
29892,
413,
4479,
29918,
974,
29918,
1552,
29918,
29873,
2760,
29918,
29887,
7879,
29892,
13,
13,
13,
29992,
7543,
703,
29949,
4089,
29877,
29892,
24537,
297,
278,
14293,
29879,
1159,
13,
1753,
704,
5801,
29918,
7830,
815,
29918,
262,
29918,
1552,
29918,
9274,
29879,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
704,
5801,
29918,
7830,
815,
29918,
262,
29918,
1552,
29918,
9274,
29879,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
704,
5801,
29918,
7830,
815,
29918,
262,
29918,
1552,
29918,
9274,
29879,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
704,
5801,
29918,
7830,
815,
29918,
262,
29918,
1552,
29918,
9274,
29879,
29892,
704,
5801,
29918,
7830,
815,
29918,
262,
29918,
1552,
29918,
9274,
29879,
29892,
13,
13,
13,
29992,
7543,
703,
29934,
635,
278,
6912,
311,
1159,
13,
1753,
364,
635,
29918,
1552,
29918,
2015,
311,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
364,
635,
29918,
1552,
29918,
2015,
311,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
364,
635,
29918,
1552,
29918,
2015,
311,
29892,
13,
13,
13,
29992,
7543,
703,
29903,
294,
9010,
29892,
438,
307,
4161,
1094,
29883,
5818,
1159,
13,
1753,
269,
294,
9010,
29918,
272,
2878,
29875,
29918,
6151,
5818,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
269,
294,
9010,
29918,
272,
2878,
29875,
29918,
6151,
5818,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
269,
294,
9010,
29918,
272,
2878,
29875,
29918,
6151,
5818,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
269,
294,
9010,
29918,
272,
2878,
29875,
29918,
6151,
5818,
29892,
269,
294,
9010,
29918,
272,
2878,
29875,
29918,
6151,
5818,
29892,
13,
13,
13,
29992,
7543,
703,
8140,
10178,
28797,
23935,
1159,
13,
1753,
1375,
10178,
29918,
10510,
23935,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
1375,
10178,
29918,
10510,
23935,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
1375,
10178,
29918,
10510,
23935,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
1375,
10178,
29918,
10510,
23935,
29892,
1375,
10178,
29918,
10510,
23935,
29892,
13,
13,
13,
29992,
7543,
703,
13440,
24530,
310,
278,
402,
706,
29877,
1159,
13,
1753,
3661,
24530,
29918,
974,
29918,
1552,
29918,
29887,
706,
29877,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
3661,
24530,
29918,
974,
29918,
1552,
29918,
29887,
706,
29877,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
3661,
24530,
29918,
974,
29918,
1552,
29918,
29887,
706,
29877,
29892,
13,
13,
13,
29992,
7543,
703,
29907,
329,
278,
11563,
368,
26370,
1159,
13,
1753,
5700,
29918,
1552,
29918,
799,
386,
368,
29918,
29890,
898,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
5700,
29918,
1552,
29918,
799,
386,
368,
29918,
29890,
898,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
5700,
29918,
1552,
29918,
799,
386,
368,
29918,
29890,
898,
29892,
13,
13,
13,
29992,
7543,
703,
29928,
359,
273,
29915,
29879,
8198,
342,
678,
424,
1159,
13,
1753,
3248,
550,
29918,
1025,
342,
29918,
13775,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
3248,
550,
29918,
1025,
342,
29918,
13775,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
3248,
550,
29918,
1025,
342,
29918,
13775,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
3248,
550,
29918,
1025,
342,
29918,
13775,
29892,
3248,
550,
29918,
1025,
342,
29918,
13775,
29892,
13,
13,
13,
29992,
7543,
703,
29954,
3069,
29899,
29931,
277,
21910,
261,
1159,
13,
1753,
330,
3069,
19411,
29918,
1328,
261,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
330,
3069,
19411,
29918,
1328,
261,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
330,
3069,
19411,
29918,
1328,
261,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
330,
3069,
19411,
29918,
1328,
261,
29892,
330,
3069,
19411,
29918,
1328,
261,
29892,
13,
13,
13,
29992,
7543,
703,
24026,
2813,
476,
4479,
1159,
13,
1753,
18243,
2813,
29918,
29895,
4479,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
18243,
2813,
29918,
29895,
4479,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
18243,
2813,
29918,
29895,
4479,
29892,
13,
13,
13,
29992,
7543,
703,
29928,
1947,
1815,
2270,
1159,
13,
1753,
20619,
29918,
3068,
2270,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
20619,
29918,
3068,
2270,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
20619,
29918,
3068,
2270,
29892,
13,
13,
13,
29992,
7543,
703,
29923,
25943,
349,
457,
310,
5342,
1335,
29875,
1159,
13,
1753,
27008,
29918,
26215,
29918,
974,
29918,
4900,
1335,
29875,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
27008,
29918,
26215,
29918,
974,
29918,
4900,
1335,
29875,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
27008,
29918,
26215,
29918,
974,
29918,
4900,
1335,
29875,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
27008,
29918,
26215,
29918,
974,
29918,
4900,
1335,
29875,
29892,
27008,
29918,
26215,
29918,
974,
29918,
4900,
1335,
29875,
29892,
13,
13,
13,
29992,
7543,
703,
797,
420,
408,
3118,
1159,
13,
1753,
297,
420,
29918,
294,
29918,
650,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
297,
420,
29918,
294,
29918,
650,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
297,
420,
29918,
294,
29918,
650,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
297,
420,
29918,
294,
29918,
650,
29892,
297,
420,
29918,
294,
29918,
650,
29892,
13,
13,
13,
29992,
7543,
703,
29934,
1540,
29899,
29911,
737,
29892,
476,
1169,
1540,
1094,
29883,
5818,
1159,
13,
1753,
1065,
300,
737,
29918,
29895,
1169,
1540,
29918,
6151,
5818,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
1065,
300,
737,
29918,
29895,
1169,
1540,
29918,
6151,
5818,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
1065,
300,
737,
29918,
29895,
1169,
1540,
29918,
6151,
5818,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
1065,
300,
737,
29918,
29895,
1169,
1540,
29918,
6151,
5818,
29892,
1065,
300,
737,
29918,
29895,
1169,
1540,
29918,
6151,
5818,
29892,
13,
13,
13,
29992,
7543,
703,
29954,
8924,
341,
7608,
1159,
13,
1753,
330,
8924,
29918,
29885,
7608,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
330,
8924,
29918,
29885,
7608,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
330,
8924,
29918,
29885,
7608,
29892,
13,
13,
13,
29992,
7543,
703,
29909,
29895,
1984,
7634,
1847,
1159,
13,
1753,
11208,
1984,
29918,
5062,
1847,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
11208,
1984,
29918,
5062,
1847,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
11208,
1984,
29918,
5062,
1847,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
4479,
310,
2812,
2349,
4989,
1960,
1159,
13,
1753,
413,
4479,
29918,
974,
29918,
6310,
29918,
3874,
1960,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
413,
4479,
29918,
974,
29918,
6310,
29918,
3874,
1960,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
413,
4479,
29918,
974,
29918,
6310,
29918,
3874,
1960,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
4479,
310,
278,
315,
690,
1760,
17549,
1159,
13,
1753,
413,
4479,
29918,
974,
29918,
1552,
29918,
29883,
690,
1760,
29918,
4346,
265,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
413,
4479,
29918,
974,
29918,
1552,
29918,
29883,
690,
1760,
29918,
4346,
265,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
413,
4479,
29918,
974,
29918,
1552,
29918,
29883,
690,
1760,
29918,
4346,
265,
29892,
13,
13,
13,
29992,
7543,
703,
27418,
3742,
579,
1159,
13,
1753,
3252,
3742,
579,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
3252,
3742,
579,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
3252,
3742,
579,
29892,
13,
13,
13,
29992,
7543,
28945,
5813,
29958,
1159,
13,
1753,
4892,
3959,
514,
29918,
29895,
4479,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
4892,
3959,
514,
29918,
29895,
4479,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
4892,
3959,
514,
29918,
29895,
4479,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
4892,
3959,
514,
29918,
29895,
4479,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
4892,
3959,
514,
29918,
29895,
4479,
29892,
4892,
3959,
514,
29918,
29895,
4479,
29892,
4892,
3959,
514,
29918,
29895,
4479,
29892,
13,
13,
13,
29992,
7543,
703,
29903,
557,
1161,
2946,
278,
14305,
520,
272,
1159,
13,
1753,
269,
557,
1161,
2946,
29918,
1552,
29918,
326,
2490,
272,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
269,
557,
1161,
2946,
29918,
1552,
29918,
326,
2490,
272,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
269,
557,
1161,
2946,
29918,
1552,
29918,
326,
2490,
272,
29892,
13,
13,
13,
29992,
7543,
28945,
5813,
29958,
1159,
13,
1753,
22399,
29918,
29895,
812,
1878,
29875,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
22399,
29918,
29895,
812,
1878,
29875,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
22399,
29918,
29895,
812,
1878,
29875,
29892,
13,
13,
13,
29992,
7543,
703,
24259,
2002,
29915,
29879,
11044,
663,
1159,
13,
1753,
3632,
10939,
29918,
404,
663,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
3632,
10939,
29918,
404,
663,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
3632,
10939,
29918,
404,
663,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
3632,
10939,
29918,
404,
663,
29892,
3632,
10939,
29918,
404,
663,
29892,
13,
13,
13,
29992,
7543,
28945,
5813,
29958,
1159,
13,
1753,
269,
4476,
24912,
29918,
1267,
387,
1943,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
269,
4476,
24912,
29918,
1267,
387,
1943,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
269,
4476,
24912,
29918,
1267,
387,
1943,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
269,
4476,
24912,
29918,
1267,
387,
1943,
29892,
269,
4476,
24912,
29918,
1267,
387,
1943,
29892,
13,
13,
13,
29992,
7543,
703,
3563,
1332,
295,
4056,
18555,
781,
1159,
13,
1753,
975,
1332,
295,
4056,
29918,
524,
295,
781,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
975,
1332,
295,
4056,
29918,
524,
295,
781,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
975,
1332,
295,
4056,
29918,
524,
295,
781,
29892,
13,
13,
13,
29992,
7543,
703,
19617,
5818,
310,
16540,
29891,
290,
8854,
1159,
13,
1753,
5153,
5818,
29918,
974,
29918,
1984,
29891,
290,
8854,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
5153,
5818,
29918,
974,
29918,
1984,
29891,
290,
8854,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
5153,
5818,
29918,
974,
29918,
1984,
29891,
290,
8854,
29892,
13,
13,
13,
29992,
7543,
703,
29928,
1633,
12510,
261,
1159,
13,
1753,
12561,
12510,
261,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
12561,
12510,
261,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
12561,
12510,
261,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
331,
5338,
29899,
2951,
1056,
1159,
13,
1753,
413,
331,
332,
291,
1056,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
413,
331,
332,
291,
1056,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
413,
331,
332,
291,
1056,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
413,
331,
332,
291,
1056,
29892,
413,
331,
332,
291,
1056,
29892,
13,
13,
13,
29992,
7543,
703,
29949,
1240,
310,
11821,
23178,
1159,
13,
1753,
373,
29875,
29918,
974,
29918,
29893,
789,
29918,
29886,
6048,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
373,
29875,
29918,
974,
29918,
29893,
789,
29918,
29886,
6048,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
373,
29875,
29918,
974,
29918,
29893,
789,
29918,
29886,
6048,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
373,
29875,
29918,
974,
29918,
29893,
789,
29918,
29886,
6048,
29892,
373,
29875,
29918,
974,
29918,
29893,
789,
29918,
29886,
6048,
29892,
13,
13,
13,
29992,
7543,
703,
6716,
411,
9531,
1159,
13,
1753,
697,
29918,
2541,
29918,
28450,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
697,
29918,
2541,
29918,
28450,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
697,
29918,
2541,
29918,
28450,
29892,
13,
13,
13,
29992,
7543,
703,
29903,
272,
271,
4479,
14293,
678,
1306,
327,
1159,
13,
1753,
7319,
271,
4479,
29918,
9274,
29918,
305,
1306,
327,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
7319,
271,
4479,
29918,
9274,
29918,
305,
1306,
327,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
7319,
271,
4479,
29918,
9274,
29918,
305,
1306,
327,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
7319,
271,
4479,
29918,
9274,
29918,
305,
1306,
327,
29892,
7319,
271,
4479,
29918,
9274,
29918,
305,
1306,
327,
29892,
13,
13,
13,
29992,
7543,
703,
5592,
381,
12818,
2812,
2596,
1159,
13,
1753,
6337,
12818,
29918,
13415,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
6337,
12818,
29918,
13415,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
6337,
12818,
29918,
13415,
29892,
13,
13,
13,
29992,
7543,
703,
29909,
29895,
6637,
29892,
19298,
310,
12835,
1159,
13,
1753,
11208,
6637,
29918,
4939,
29918,
974,
29918,
1161,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
11208,
6637,
29918,
4939,
29918,
974,
29918,
1161,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
11208,
6637,
29918,
4939,
29918,
974,
29918,
1161,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
11208,
6637,
29918,
4939,
29918,
974,
29918,
1161,
29892,
11208,
6637,
29918,
4939,
29918,
974,
29918,
1161,
29892,
13,
13,
13,
29992,
7543,
703,
29943,
13537,
12790,
1076,
1159,
13,
1753,
6013,
284,
29918,
4366,
1076,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
6013,
284,
29918,
4366,
1076,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
6013,
284,
29918,
4366,
1076,
29892,
13,
13,
13,
29992,
7543,
703,
2308,
16656,
2087,
19188,
1159,
13,
1753,
9311,
287,
29918,
328,
19188,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
9311,
287,
29918,
328,
19188,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
9311,
287,
29918,
328,
19188,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
9311,
287,
29918,
328,
19188,
29892,
9311,
287,
29918,
328,
19188,
29892,
13,
13,
13,
29992,
7543,
703,
2772,
493,
29966,
5813,
29958,
1159,
13,
1753,
4892,
13168,
29918,
16617,
15547,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
4892,
13168,
29918,
16617,
15547,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
4892,
13168,
29918,
16617,
15547,
29892,
13,
13,
13,
29992,
7543,
703,
2605,
310,
530,
914,
29915,
29879,
2379,
420,
1159,
13,
1753,
2224,
29918,
974,
29918,
13873,
29918,
1579,
420,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
2224,
29918,
974,
29918,
13873,
29918,
1579,
420,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
2224,
29918,
974,
29918,
13873,
29918,
1579,
420,
29892,
13,
13,
13,
29992,
7543,
703,
29934,
21616,
29899,
29911,
680,
796,
431,
1572,
1159,
13,
1753,
364,
1878,
19680,
680,
29918,
29920,
431,
1572,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
364,
1878,
19680,
680,
29918,
29920,
431,
1572,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
364,
1878,
19680,
680,
29918,
29920,
431,
1572,
29892,
13,
13,
13,
29992,
7543,
703,
19617,
5818,
310,
8622,
398,
8854,
1159,
13,
1753,
5153,
5818,
29918,
974,
29918,
8247,
398,
8854,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
5153,
5818,
29918,
974,
29918,
8247,
398,
8854,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
5153,
5818,
29918,
974,
29918,
8247,
398,
8854,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
1169,
1540,
350,
2873,
19036,
1159,
13,
1753,
413,
1169,
1540,
29918,
29890,
2873,
19036,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
413,
1169,
1540,
29918,
29890,
2873,
19036,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
413,
1169,
1540,
29918,
29890,
2873,
19036,
29892,
13,
13,
13,
29992,
7543,
703,
29909,
845,
267,
310,
278,
383,
5442,
1159,
13,
1753,
408,
13244,
29918,
974,
29918,
1552,
29918,
29888,
5442,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
408,
13244,
29918,
974,
29918,
1552,
29918,
29888,
5442,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
408,
13244,
29918,
974,
29918,
1552,
29918,
29888,
5442,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
408,
13244,
29918,
974,
29918,
1552,
29918,
29888,
5442,
29892,
408,
13244,
29918,
974,
29918,
1552,
29918,
29888,
5442,
29892,
13,
13,
13,
29992,
7543,
703,
29954,
3069,
29899,
29931,
277,
405,
473,
22154,
1159,
13,
1753,
330,
3069,
19411,
29918,
29876,
473,
22154,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
330,
3069,
19411,
29918,
29876,
473,
22154,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
330,
3069,
19411,
29918,
29876,
473,
22154,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
330,
3069,
19411,
29918,
29876,
473,
22154,
29892,
330,
3069,
19411,
29918,
29876,
473,
22154,
29892,
13,
13,
13,
29992,
7543,
703,
29923,
11163,
2212,
12362,
29899,
29934,
11376,
1159,
13,
1753,
321,
11163,
2212,
29918,
10745,
261,
11376,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
321,
11163,
2212,
29918,
10745,
261,
11376,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
321,
11163,
2212,
29918,
10745,
261,
11376,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
321,
11163,
2212,
29918,
10745,
261,
11376,
29892,
321,
11163,
2212,
29918,
10745,
261,
11376,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
19881,
290,
8854,
29892,
3824,
304,
6679,
1159,
13,
1753,
8506,
29891,
290,
8854,
29918,
4102,
29918,
517,
29918,
1689,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
8506,
29891,
290,
8854,
29918,
4102,
29918,
517,
29918,
1689,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
8506,
29891,
290,
8854,
29918,
4102,
29918,
517,
29918,
1689,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
8506,
29891,
290,
8854,
29918,
4102,
29918,
517,
29918,
1689,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
8506,
29891,
290,
8854,
29918,
4102,
29918,
517,
29918,
1689,
29892,
8506,
29891,
290,
8854,
29918,
4102,
29918,
517,
29918,
1689,
29892,
8506,
29891,
290,
8854,
29918,
4102,
29918,
517,
29918,
1689,
29892,
13,
13,
13,
29992,
7543,
703,
29923,
369,
24021,
1159,
13,
1753,
3926,
24021,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
3926,
24021,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
3926,
24021,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
3926,
24021,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
3926,
24021,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
3926,
24021,
29892,
3926,
24021,
29892,
3926,
24021,
29892,
3926,
24021,
29892,
13,
13,
13,
29992,
7543,
703,
29933,
1309,
371,
681,
5201,
262,
1159,
13,
1753,
289,
1309,
371,
681,
29918,
14166,
262,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
289,
1309,
371,
681,
29918,
14166,
262,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
289,
1309,
371,
681,
29918,
14166,
262,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
289,
1309,
371,
681,
29918,
14166,
262,
29892,
289,
1309,
371,
681,
29918,
14166,
262,
29892,
13,
13,
13,
29992,
7543,
703,
5044,
3864,
13001,
284,
1159,
13,
1753,
1095,
3864,
29918,
680,
284,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
1095,
3864,
29918,
680,
284,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
1095,
3864,
29918,
680,
284,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
1095,
3864,
29918,
680,
284,
29892,
1095,
3864,
29918,
680,
284,
29892,
13,
13,
13,
29992,
7543,
703,
29902,
29894,
29966,
5813,
29958,
1159,
13,
1753,
20444,
706,
29918,
29883,
10800,
29918,
1212,
2146,
446,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
20444,
706,
29918,
29883,
10800,
29918,
1212,
2146,
446,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
20444,
706,
29918,
29883,
10800,
29918,
1212,
2146,
446,
29892,
13,
13,
13,
29992,
7543,
703,
29933,
417,
397,
315,
908,
1159,
13,
1753,
10416,
29918,
13058,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
10416,
29918,
13058,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
10416,
29918,
13058,
29892,
13,
13,
13,
29992,
7543,
703,
797,
571,
20809,
5201,
262,
1159,
13,
1753,
10115,
20809,
29918,
14166,
262,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
10115,
20809,
29918,
14166,
262,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
10115,
20809,
29918,
14166,
262,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
10115,
20809,
29918,
14166,
262,
29892,
10115,
20809,
29918,
14166,
262,
29892,
13,
13,
13,
29992,
7543,
28945,
5813,
10202,
1605,
2806,
922,
1416,
261,
1159,
13,
1753,
21488,
10349,
29918,
29895,
14287,
29918,
509,
2806,
29918,
344,
1416,
261,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
21488,
10349,
29918,
29895,
14287,
29918,
509,
2806,
29918,
344,
1416,
261,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
21488,
10349,
29918,
29895,
14287,
29918,
509,
2806,
29918,
344,
1416,
261,
29892,
13,
13,
13,
29992,
7543,
703,
2517,
374,
1984,
29899,
29954,
375,
1306,
1159,
13,
1753,
767,
5357,
335,
375,
1306,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
767,
5357,
335,
375,
1306,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
767,
5357,
335,
375,
1306,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
767,
5357,
335,
375,
1306,
29892,
767,
5357,
335,
375,
1306,
29892,
13,
13,
13,
29992,
7543,
703,
29924,
294,
398,
8854,
29892,
3824,
304,
10782,
1159,
13,
1753,
5516,
398,
8854,
29918,
4102,
29918,
517,
29918,
9258,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
5516,
398,
8854,
29918,
4102,
29918,
517,
29918,
9258,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
5516,
398,
8854,
29918,
4102,
29918,
517,
29918,
9258,
29892,
13,
13,
13,
29992,
7543,
703,
29907,
20937,
491,
15756,
3129,
1159,
13,
1753,
274,
20937,
29918,
1609,
29918,
29893,
275,
3129,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
274,
20937,
29918,
1609,
29918,
29893,
275,
3129,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
274,
20937,
29918,
1609,
29918,
29893,
275,
3129,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
274,
20937,
29918,
1609,
29918,
29893,
275,
3129,
29892,
274,
20937,
29918,
1609,
29918,
29893,
275,
3129,
29892,
13,
13,
13,
29992,
7543,
703,
29620,
310,
9865,
29876,
800,
1159,
13,
1753,
7348,
29918,
974,
29918,
16846,
29876,
800,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
7348,
29918,
974,
29918,
16846,
29876,
800,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
7348,
29918,
974,
29918,
16846,
29876,
800,
29892,
13,
13,
13,
29992,
7543,
703,
15797,
913,
24930,
272,
1159,
13,
1753,
2071,
913,
29918,
15914,
272,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
2071,
913,
29918,
15914,
272,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
2071,
913,
29918,
15914,
272,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
2071,
913,
29918,
15914,
272,
29892,
2071,
913,
29918,
15914,
272,
29892,
13,
13,
13,
29992,
7543,
703,
6816,
728,
262,
29892,
278,
20152,
315,
482,
1159,
13,
1753,
592,
728,
262,
29918,
1552,
29918,
24021,
29918,
29883,
482,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
592,
728,
262,
29918,
1552,
29918,
24021,
29918,
29883,
482,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
592,
728,
262,
29918,
1552,
29918,
24021,
29918,
29883,
482,
29892,
13,
13,
13,
29992,
7543,
703,
2713,
7026,
310,
25435,
29915,
12790,
1159,
13,
1753,
528,
7026,
29918,
974,
29918,
303,
1503,
29918,
4366,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
528,
7026,
29918,
974,
29918,
303,
1503,
29918,
4366,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
528,
7026,
29918,
974,
29918,
303,
1503,
29918,
4366,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
528,
7026,
29918,
974,
29918,
303,
1503,
29918,
4366,
29892,
528,
7026,
29918,
974,
29918,
303,
1503,
29918,
4366,
29892,
13,
13,
13,
29992,
7543,
703,
3481,
310,
18236,
1159,
13,
1753,
1361,
29918,
974,
29918,
27305,
272,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
1361,
29918,
974,
29918,
27305,
272,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
1361,
29918,
974,
29918,
27305,
272,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
1361,
29918,
974,
29918,
27305,
272,
29892,
1361,
29918,
974,
29918,
27305,
272,
29892,
13,
13,
13,
29992,
7543,
703,
29925,
545,
11171,
1080,
1159,
13,
1753,
8296,
29918,
14029,
1080,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
8296,
29918,
14029,
1080,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
8296,
29918,
14029,
1080,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
8296,
29918,
14029,
1080,
29892,
8296,
29918,
14029,
1080,
29892,
13,
13,
13,
29992,
7543,
703,
29924,
17095,
1295,
515,
18502,
898,
1159,
13,
1753,
25234,
1295,
29918,
3166,
29918,
915,
8538,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
25234,
1295,
29918,
3166,
29918,
915,
8538,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
25234,
1295,
29918,
3166,
29918,
915,
8538,
29892,
13,
13,
13,
29992,
7543,
703,
29950,
737,
310,
826,
5727,
1159,
13,
1753,
447,
309,
29918,
974,
29918,
2936,
29879,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
447,
309,
29918,
974,
29918,
2936,
29879,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
447,
309,
29918,
974,
29918,
2936,
29879,
29892,
13,
13,
13,
29992,
7543,
703,
2008,
1416,
278,
6912,
18162,
1159,
13,
1753,
16508,
29918,
1552,
29918,
2015,
18162,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
16508,
29918,
1552,
29918,
2015,
18162,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
16508,
29918,
1552,
29918,
2015,
18162,
29892,
13,
13,
13,
29992,
7543,
703,
29954,
28334,
310,
2087,
8715,
29877,
1159,
13,
1753,
12642,
29872,
29918,
974,
29918,
328,
8715,
29877,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
12642,
29872,
29918,
974,
29918,
328,
8715,
29877,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
12642,
29872,
29918,
974,
29918,
328,
8715,
29877,
29892,
13,
13,
13,
29992,
7543,
703,
1123,
1984,
29892,
278,
5298,
310,
12986,
335,
10011,
1159,
13,
1753,
337,
1984,
29918,
1552,
29918,
18434,
29918,
974,
29918,
29895,
314,
335,
10011,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
337,
1984,
29918,
1552,
29918,
18434,
29918,
974,
29918,
29895,
314,
335,
10011,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
337,
1984,
29918,
1552,
29918,
18434,
29918,
974,
29918,
29895,
314,
335,
10011,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
29884,
265,
29915,
29879,
11044,
663,
1159,
13,
1753,
413,
29884,
787,
29918,
404,
663,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
413,
29884,
787,
29918,
404,
663,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
413,
29884,
787,
29918,
404,
663,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
413,
29884,
787,
29918,
404,
663,
29892,
413,
29884,
787,
29918,
404,
663,
29892,
13,
13,
13,
29992,
7543,
703,
5914,
479,
7255,
2124,
278,
25953,
2291,
1159,
13,
1753,
8323,
29918,
562,
2124,
29918,
1552,
29918,
279,
5363,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
8323,
29918,
562,
2124,
29918,
1552,
29918,
279,
5363,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
8323,
29918,
562,
2124,
29918,
1552,
29918,
279,
5363,
29892,
13,
13,
13,
29992,
7543,
703,
2772,
493,
3384,
1000,
1159,
13,
1753,
4892,
29918,
1145,
1000,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
4892,
29918,
1145,
1000,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
4892,
29918,
1145,
1000,
29892,
13,
13,
13,
29992,
7543,
703,
29954,
3069,
29899,
29931,
277,
6981,
1241,
1159,
13,
1753,
330,
3069,
19411,
29918,
336,
1241,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
330,
3069,
19411,
29918,
336,
1241,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
330,
3069,
19411,
29918,
336,
1241,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
330,
3069,
19411,
29918,
336,
1241,
29892,
330,
3069,
19411,
29918,
336,
1241,
29892,
13,
13,
13,
29992,
7543,
703,
1349,
1774,
29879,
310,
9723,
262,
1159,
13,
1753,
13133,
29918,
974,
29918,
582,
262,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
13133,
29918,
974,
29918,
582,
262,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
13133,
29918,
974,
29918,
582,
262,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
532,
1984,
29892,
3362,
29915,
29879,
399,
482,
1159,
13,
1753,
413,
532,
1984,
29918,
29893,
1503,
29918,
29893,
482,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
413,
532,
1984,
29918,
29893,
1503,
29918,
29893,
482,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
413,
532,
1984,
29918,
29893,
1503,
29918,
29893,
482,
29892,
13,
13,
13,
29992,
7543,
703,
29949,
29899,
29940,
26584,
532,
1159,
13,
1753,
373,
26584,
532,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
373,
26584,
532,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
373,
26584,
532,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
373,
26584,
532,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
373,
26584,
532,
29892,
373,
26584,
532,
29892,
373,
26584,
532,
29892,
13,
13,
13,
29992,
7543,
703,
29933,
29966,
5813,
29958,
1159,
13,
1753,
289,
374,
935,
26129,
29918,
29895,
4479,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
289,
374,
935,
26129,
29918,
29895,
4479,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
289,
374,
935,
26129,
29918,
29895,
4479,
29892,
13,
13,
13,
29992,
7543,
703,
29954,
29880,
5171,
11363,
1159,
13,
1753,
3144,
5171,
11363,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
3144,
5171,
11363,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
3144,
5171,
11363,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
3144,
5171,
11363,
29892,
3144,
5171,
11363,
29892,
13,
13,
13,
29992,
7543,
703,
1123,
369,
663,
1159,
13,
1753,
24187,
663,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
24187,
663,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
24187,
663,
29892,
13,
13,
13,
29992,
7543,
703,
29925,
677,
17044,
830,
2049,
1159,
13,
1753,
282,
677,
29918,
20678,
29918,
276,
2049,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
282,
677,
29918,
20678,
29918,
276,
2049,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
282,
677,
29918,
20678,
29918,
276,
2049,
29892,
13,
13,
13,
29992,
7543,
703,
25263,
5414,
2379,
1280,
1159,
13,
1753,
563,
5414,
29918,
1579,
1280,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
563,
5414,
29918,
1579,
1280,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
563,
5414,
29918,
1579,
1280,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
563,
5414,
29918,
1579,
1280,
29892,
563,
5414,
29918,
1579,
1280,
29892,
13,
13,
13,
29992,
7543,
703,
29903,
5062,
515,
23732,
1159,
13,
1753,
480,
5740,
29918,
3166,
29918,
2541,
262,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
480,
5740,
29918,
3166,
29918,
2541,
262,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
480,
5740,
29918,
3166,
29918,
2541,
262,
29892,
13,
13,
13,
29992,
7543,
703,
4297,
29966,
5813,
29958,
1159,
13,
1753,
2594,
2674,
29918,
3204,
29918,
29879,
4476,
24912,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
2594,
2674,
29918,
3204,
29918,
29879,
4476,
24912,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
2594,
2674,
29918,
3204,
29918,
29879,
4476,
24912,
29892,
13,
13,
13,
29992,
7543,
703,
24111,
2443,
18362,
1159,
13,
1753,
8267,
29918,
1655,
18362,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
8267,
29918,
1655,
18362,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
8267,
29918,
1655,
18362,
29892,
13,
13,
13,
29992,
7543,
28945,
5813,
29958,
1159,
13,
1753,
8006,
272,
29926,
1450,
29918,
5271,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
8006,
272,
29926,
1450,
29918,
5271,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
8006,
272,
29926,
1450,
29918,
5271,
29892,
13,
13,
13,
29992,
7543,
703,
29903,
682,
964,
323,
9424,
10859,
1159,
13,
1753,
28169,
29918,
8941,
29918,
29873,
9424,
10859,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
28169,
29918,
8941,
29918,
29873,
9424,
10859,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
28169,
29918,
8941,
29918,
29873,
9424,
10859,
29892,
13,
13,
13,
29992,
7543,
703,
29954,
3069,
29899,
29931,
277,
390,
2742,
25154,
1159,
13,
1753,
330,
3069,
19411,
29918,
276,
311,
25154,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
330,
3069,
19411,
29918,
276,
311,
25154,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
330,
3069,
19411,
29918,
276,
311,
25154,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
330,
3069,
19411,
29918,
276,
311,
25154,
29892,
330,
3069,
19411,
29918,
276,
311,
25154,
29892,
13,
13,
13,
29992,
7543,
703,
27748,
6438,
1159,
13,
1753,
6426,
29918,
8696,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
6426,
29918,
8696,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
6426,
29918,
8696,
29892,
13,
13,
13,
29992,
7543,
703,
29924,
6150,
16958,
341,
720,
1159,
13,
1753,
18786,
16958,
29918,
29885,
720,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
18786,
16958,
29918,
29885,
720,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
18786,
16958,
29918,
29885,
720,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
18786,
16958,
29918,
29885,
720,
29892,
18786,
16958,
29918,
29885,
720,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
18282,
29915,
29879,
1383,
6986,
1159,
13,
1753,
413,
17342,
29918,
17505,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
413,
17342,
29918,
17505,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
413,
17342,
29918,
17505,
29892,
13,
13,
13,
29992,
7543,
703,
3524,
504,
341,
7608,
1159,
13,
1753,
1180,
504,
29918,
29885,
7608,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
1180,
504,
29918,
29885,
7608,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
1180,
504,
29918,
29885,
7608,
29892,
13,
13,
13,
29992,
7543,
703,
29903,
557,
2002,
29899,
29565,
915,
2522,
449,
1159,
13,
1753,
269,
557,
332,
25054,
915,
29918,
1557,
449,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
269,
557,
332,
25054,
915,
29918,
1557,
449,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
269,
557,
332,
25054,
915,
29918,
1557,
449,
29892,
13,
13,
13,
29992,
7543,
703,
29934,
2548,
478,
1475,
1159,
13,
1753,
364,
2548,
29918,
29894,
1475,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
364,
2548,
29918,
29894,
1475,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
364,
2548,
29918,
29894,
1475,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
364,
2548,
29918,
29894,
1475,
29892,
364,
2548,
29918,
29894,
1475,
29892,
13,
13,
13,
29992,
7543,
703,
855,
1160,
21219,
1816,
340,
1159,
13,
1753,
25214,
21219,
29918,
643,
340,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
25214,
21219,
29918,
643,
340,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
25214,
21219,
29918,
643,
340,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
25214,
21219,
29918,
643,
340,
29892,
25214,
21219,
29918,
643,
340,
29892,
13,
13,
13,
29992,
7543,
703,
29903,
3459,
8696,
5201,
262,
1159,
13,
1753,
14744,
8696,
29918,
14166,
262,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
14744,
8696,
29918,
14166,
262,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
14744,
8696,
29918,
14166,
262,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
14744,
8696,
29918,
14166,
262,
29892,
14744,
8696,
29918,
14166,
262,
29892,
13,
13,
13,
29992,
7543,
703,
20442,
1251,
974,
5201,
262,
1159,
13,
1753,
9570,
1251,
974,
29918,
14166,
262,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
9570,
1251,
974,
29918,
14166,
262,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
9570,
1251,
974,
29918,
14166,
262,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
9570,
1251,
974,
29918,
14166,
262,
29892,
9570,
1251,
974,
29918,
14166,
262,
29892,
13,
13,
13,
29992,
7543,
703,
5592,
14987,
950,
5741,
277,
1159,
13,
1753,
20954,
29918,
1730,
277,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
20954,
29918,
1730,
277,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
20954,
29918,
1730,
277,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
20954,
29918,
1730,
277,
29892,
20954,
29918,
1730,
277,
29892,
13,
13,
13,
29992,
7543,
703,
797,
517,
278,
383,
764,
1159,
13,
1753,
964,
29918,
1552,
29918,
29888,
764,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
964,
29918,
1552,
29918,
29888,
764,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
964,
29918,
1552,
29918,
29888,
764,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
964,
29918,
1552,
29918,
29888,
764,
29892,
964,
29918,
1552,
29918,
29888,
764,
29892,
13,
13,
13,
29992,
7543,
703,
29954,
3069,
29899,
29931,
277,
624,
2235,
261,
1159,
13,
1753,
330,
3069,
19411,
29918,
303,
2235,
261,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
330,
3069,
19411,
29918,
303,
2235,
261,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
330,
3069,
19411,
29918,
303,
2235,
261,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
330,
3069,
19411,
29918,
303,
2235,
261,
29892,
330,
3069,
19411,
29918,
303,
2235,
261,
29892,
13,
13,
13,
29992,
7543,
703,
29934,
265,
262,
315,
1351,
23935,
1159,
13,
1753,
364,
265,
262,
29918,
1113,
345,
23935,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
364,
265,
262,
29918,
1113,
345,
23935,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
364,
265,
262,
29918,
1113,
345,
23935,
29892,
13,
13,
13,
29992,
7543,
28945,
5813,
29958,
1159,
13,
1753,
24418,
2291,
29918,
29885,
720,
29878,
1241,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
24418,
2291,
29918,
29885,
720,
29878,
1241,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
24418,
2291,
29918,
29885,
720,
29878,
1241,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
24418,
2291,
29918,
29885,
720,
29878,
1241,
29892,
24418,
2291,
29918,
29885,
720,
29878,
1241,
29892,
13,
13,
13,
29992,
7543,
703,
20434,
1099,
11554,
12344,
1159,
13,
1753,
3431,
1099,
29918,
11147,
12344,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
3431,
1099,
29918,
11147,
12344,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
3431,
1099,
29918,
11147,
12344,
29892,
13,
13,
13,
29992,
7543,
703,
29909,
29891,
15547,
29892,
278,
9208,
5741,
2105,
1159,
13,
1753,
10156,
15547,
29918,
1552,
29918,
4230,
29918,
1730,
2105,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
10156,
15547,
29918,
1552,
29918,
4230,
29918,
1730,
2105,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
10156,
15547,
29918,
1552,
29918,
4230,
29918,
1730,
2105,
29892,
13,
13,
13,
29992,
7543,
703,
29950,
18071,
29899,
2951,
1056,
1159,
13,
1753,
4023,
29884,
11586,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
4023,
29884,
11586,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
4023,
29884,
11586,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
4023,
29884,
11586,
29892,
4023,
29884,
11586,
29892,
13,
13,
13,
29992,
7543,
703,
29924,
324,
1259,
4971,
262,
1159,
13,
1753,
6062,
1259,
29918,
808,
262,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
6062,
1259,
29918,
808,
262,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
6062,
1259,
29918,
808,
262,
29892,
13,
13,
13,
29992,
7543,
703,
23923,
287,
515,
278,
8195,
1159,
13,
1753,
3005,
287,
29918,
3166,
29918,
1552,
29918,
6370,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
3005,
287,
29918,
3166,
29918,
1552,
29918,
6370,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
3005,
287,
29918,
3166,
29918,
1552,
29918,
6370,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
3005,
287,
29918,
3166,
29918,
1552,
29918,
6370,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
3005,
287,
29918,
3166,
29918,
1552,
29918,
6370,
29892,
3005,
287,
29918,
3166,
29918,
1552,
29918,
6370,
29892,
3005,
287,
29918,
3166,
29918,
1552,
29918,
6370,
29892,
13,
13,
13,
29992,
7543,
703,
27748,
3037,
29885,
29892,
4451,
261,
3767,
1477,
1159,
13,
1753,
6426,
29918,
1052,
29885,
29918,
5561,
29918,
710,
1477,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
6426,
29918,
1052,
29885,
29918,
5561,
29918,
710,
1477,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
6426,
29918,
1052,
29885,
29918,
5561,
29918,
710,
1477,
29892,
13,
13,
13,
29992,
7543,
703,
29934,
5555,
438,
1240,
29899,
29903,
18398,
1159,
13,
1753,
1153,
1747,
29918,
265,
275,
18398,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
1153,
1747,
29918,
265,
275,
18398,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
1153,
1747,
29918,
265,
275,
18398,
29892,
13,
13,
13,
29992,
7543,
703,
2008,
287,
278,
3172,
1159,
13,
1753,
16717,
29918,
1552,
29918,
1049,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
16717,
29918,
1552,
29918,
1049,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
16717,
29918,
1552,
29918,
1049,
29892,
13,
13,
13,
29992,
7543,
703,
19617,
5818,
310,
17784,
8715,
29877,
1159,
13,
1753,
5153,
5818,
29918,
974,
29918,
29879,
272,
8715,
29877,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
5153,
5818,
29918,
974,
29918,
29879,
272,
8715,
29877,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
5153,
5818,
29918,
974,
29918,
29879,
272,
8715,
29877,
29892,
13,
13,
13,
29992,
7543,
703,
29924,
7781,
29892,
3201,
2105,
304,
15533,
1338,
1159,
13,
1753,
2320,
29874,
29918,
3018,
2105,
29918,
517,
29918,
29720,
1338,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
2320,
29874,
29918,
3018,
2105,
29918,
517,
29918,
29720,
1338,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
2320,
29874,
29918,
3018,
2105,
29918,
517,
29918,
29720,
1338,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
2320,
29874,
29918,
3018,
2105,
29918,
517,
29918,
29720,
1338,
29892,
2320,
29874,
29918,
3018,
2105,
29918,
517,
29918,
29720,
1338,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
12737,
29899,
2951,
1056,
1159,
13,
1753,
18990,
291,
1056,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
18990,
291,
1056,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
18990,
291,
1056,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
18990,
291,
1056,
29892,
18990,
291,
1056,
29892,
13,
13,
13,
29992,
7543,
703,
29902,
466,
22971,
278,
23130,
2222,
1159,
13,
1753,
474,
466,
22971,
29918,
1552,
29918,
29878,
2806,
2222,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
474,
466,
22971,
29918,
1552,
29918,
29878,
2806,
2222,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
474,
466,
22971,
29918,
1552,
29918,
29878,
2806,
2222,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
474,
466,
22971,
29918,
1552,
29918,
29878,
2806,
2222,
29892,
474,
466,
22971,
29918,
1552,
29918,
29878,
2806,
2222,
29892,
13,
13,
13,
29992,
7543,
703,
29979,
19267,
29899,
2951,
1056,
1159,
13,
1753,
343,
2679,
291,
1056,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
343,
2679,
291,
1056,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
343,
2679,
291,
1056,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
343,
2679,
291,
1056,
29892,
343,
2679,
291,
1056,
29892,
13,
13,
13,
29992,
7543,
703,
2772,
493,
310,
263,
498,
681,
392,
624,
886,
1159,
13,
1753,
4892,
29918,
974,
29918,
29874,
29918,
386,
681,
392,
29918,
303,
886,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
4892,
29918,
974,
29918,
29874,
29918,
386,
681,
392,
29918,
303,
886,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
4892,
29918,
974,
29918,
29874,
29918,
386,
681,
392,
29918,
303,
886,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
4892,
29918,
974,
29918,
29874,
29918,
386,
681,
392,
29918,
303,
886,
29892,
4892,
29918,
974,
29918,
29874,
29918,
386,
681,
392,
29918,
303,
886,
29892,
13,
13,
13,
29992,
7543,
703,
29925,
475,
29915,
29879,
390,
809,
538,
1159,
13,
1753,
282,
2708,
29918,
276,
1328,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
282,
2708,
29918,
276,
1328,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
282,
2708,
29918,
276,
1328,
29892,
13,
13,
13,
29992,
7543,
703,
10463,
310,
29766,
1144,
1159,
13,
1753,
6355,
29918,
974,
29918,
12683,
1144,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
6355,
29918,
974,
29918,
12683,
1144,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
6355,
29918,
974,
29918,
12683,
1144,
29892,
13,
13,
13,
29992,
7543,
703,
29967,
9429,
1306,
29892,
278,
11563,
319,
1579,
420,
1159,
13,
1753,
432,
9429,
1306,
29918,
1552,
29918,
799,
386,
29918,
29874,
1579,
420,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
432,
9429,
1306,
29918,
1552,
29918,
799,
386,
29918,
29874,
1579,
420,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
432,
9429,
1306,
29918,
1552,
29918,
799,
386,
29918,
29874,
1579,
420,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
432,
9429,
1306,
29918,
1552,
29918,
799,
386,
29918,
29874,
1579,
420,
29892,
432,
9429,
1306,
29918,
1552,
29918,
799,
386,
29918,
29874,
1579,
420,
29892,
13,
13,
13,
29992,
7543,
28945,
5813,
29958,
1159,
13,
1753,
704,
5801,
29918,
29890,
929,
17938,
12572,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
704,
5801,
29918,
29890,
929,
17938,
12572,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
704,
5801,
29918,
29890,
929,
17938,
12572,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
704,
5801,
29918,
29890,
929,
17938,
12572,
29892,
704,
5801,
29918,
29890,
929,
17938,
12572,
29892,
13,
13,
13,
29992,
7543,
703,
29903,
294,
9010,
29915,
29879,
11044,
663,
1159,
13,
1753,
269,
294,
388,
294,
29918,
404,
663,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
269,
294,
388,
294,
29918,
404,
663,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
269,
294,
388,
294,
29918,
404,
663,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
269,
294,
388,
294,
29918,
404,
663,
29892,
269,
294,
388,
294,
29918,
404,
663,
29892,
13,
13,
13,
29992,
7543,
703,
29911,
3424,
310,
501,
2572,
29875,
1159,
13,
1753,
20450,
29918,
974,
29918,
332,
4479,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
20450,
29918,
974,
29918,
332,
4479,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
20450,
29918,
974,
29918,
332,
4479,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
20450,
29918,
974,
29918,
332,
4479,
29892,
20450,
29918,
974,
29918,
332,
4479,
29892,
13,
13,
13,
29992,
7543,
703,
2713,
7026,
310,
2379,
523,
29915,
29879,
399,
886,
1159,
13,
1753,
528,
7026,
29918,
974,
29918,
1579,
5861,
29918,
29893,
886,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
528,
7026,
29918,
974,
29918,
1579,
5861,
29918,
29893,
886,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
528,
7026,
29918,
974,
29918,
1579,
5861,
29918,
29893,
886,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
528,
7026,
29918,
974,
29918,
1579,
5861,
29918,
29893,
886,
29892,
528,
7026,
29918,
974,
29918,
1579,
5861,
29918,
29893,
886,
29892,
13,
13,
13,
29992,
7543,
703,
29911,
272,
2236,
24274,
1328,
1159,
13,
1753,
4842,
2236,
29918,
12344,
1328,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
4842,
2236,
29918,
12344,
1328,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
4842,
2236,
29918,
12344,
1328,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
4842,
2236,
29918,
12344,
1328,
29892,
4842,
2236,
29918,
12344,
1328,
29892,
13,
13,
13,
29992,
7543,
703,
29909,
29895,
1984,
4942,
453,
6207,
1159,
13,
1753,
11208,
1984,
29918,
7707,
453,
6207,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
11208,
1984,
29918,
7707,
453,
6207,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
11208,
1984,
29918,
7707,
453,
6207,
29892,
13,
13,
13,
29992,
7543,
703,
28459,
23935,
1159,
13,
1753,
7035,
23935,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
7035,
23935,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
7035,
23935,
29892,
13,
13,
13,
29992,
7543,
28945,
5813,
29958,
1159,
13,
1753,
18230,
2592,
29918,
340,
29880,
29918,
1212,
2146,
446,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
18230,
2592,
29918,
340,
29880,
29918,
1212,
2146,
446,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
18230,
2592,
29918,
340,
29880,
29918,
1212,
2146,
446,
29892,
13,
13,
13,
29992,
7543,
703,
29924,
6150,
17729,
8408,
3958,
391,
1159,
13,
1753,
18786,
17729,
29918,
453,
3958,
391,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
18786,
17729,
29918,
453,
3958,
391,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
18786,
17729,
29918,
453,
3958,
391,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
18786,
17729,
29918,
453,
3958,
391,
29892,
18786,
17729,
29918,
453,
3958,
391,
29892,
13,
13,
13,
29992,
7543,
703,
29968,
2192,
29915,
29879,
323,
9424,
1159,
13,
1753,
413,
29884,
1883,
29918,
29873,
9424,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
413,
29884,
1883,
29918,
29873,
9424,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
413,
29884,
1883,
29918,
29873,
9424,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
413,
29884,
1883,
29918,
29873,
9424,
29892,
413,
29884,
1883,
29918,
29873,
9424,
29892,
13,
13,
13,
29992,
7543,
703,
29933,
595,
292,
29899,
29923,
4099,
796,
431,
1572,
1159,
13,
1753,
25535,
1032,
29872,
29918,
29920,
431,
1572,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
25535,
1032,
29872,
29918,
29920,
431,
1572,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
25535,
1032,
29872,
29918,
29920,
431,
1572,
29892,
13,
13,
13,
29992,
7543,
703,
16036,
721,
17550,
384,
27766,
1159,
13,
1753,
263,
1979,
29918,
845,
1698,
27766,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
263,
1979,
29918,
845,
1698,
27766,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
263,
1979,
29918,
845,
1698,
27766,
29892,
13,
13,
13,
29992,
7543,
703,
1252,
488,
964,
15317,
2264,
1159,
13,
1753,
429,
488,
29918,
8941,
29918,
26031,
2264,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
429,
488,
29918,
8941,
29918,
26031,
2264,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
429,
488,
29918,
8941,
29918,
26031,
2264,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
429,
488,
29918,
8941,
29918,
26031,
2264,
29892,
429,
488,
29918,
8941,
29918,
26031,
2264,
29892,
13,
13,
13,
29992,
7543,
703,
29956,
457,
310,
25122,
322,
20492,
1159,
13,
1753,
19006,
29918,
974,
29918,
14073,
397,
29918,
392,
29918,
381,
265,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
19006,
29918,
974,
29918,
14073,
397,
29918,
392,
29918,
381,
265,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
19006,
29918,
974,
29918,
14073,
397,
29918,
392,
29918,
381,
265,
29892,
13,
13,
13,
29992,
7543,
703,
29924,
1446,
29884,
29899,
29565,
915,
17777,
303,
2235,
261,
1159,
13,
1753,
286,
1446,
329,
374,
915,
29918,
18513,
303,
2235,
261,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
286,
1446,
329,
374,
915,
29918,
18513,
303,
2235,
261,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
286,
1446,
329,
374,
915,
29918,
18513,
303,
2235,
261,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
286,
1446,
329,
374,
915,
29918,
18513,
303,
2235,
261,
29892,
286,
1446,
329,
374,
915,
29918,
18513,
303,
2235,
261,
29892,
13,
13,
13,
29992,
7543,
703,
2713,
7026,
310,
383,
2857,
29915,
29879,
6438,
1159,
13,
1753,
528,
7026,
29918,
974,
29918,
22613,
952,
29918,
8696,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
528,
7026,
29918,
974,
29918,
22613,
952,
29918,
8696,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
528,
7026,
29918,
974,
29918,
22613,
952,
29918,
8696,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
528,
7026,
29918,
974,
29918,
22613,
952,
29918,
8696,
29892,
528,
7026,
29918,
974,
29918,
22613,
952,
29918,
8696,
29892,
13,
13,
13,
29992,
7543,
703,
29924,
381,
264,
29892,
278,
4546,
273,
292,
5674,
1159,
13,
1753,
10078,
264,
29918,
1552,
29918,
4346,
273,
292,
29918,
5872,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
10078,
264,
29918,
1552,
29918,
4346,
273,
292,
29918,
5872,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
10078,
264,
29918,
1552,
29918,
4346,
273,
292,
29918,
5872,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
10078,
264,
29918,
1552,
29918,
4346,
273,
292,
29918,
5872,
29892,
10078,
264,
29918,
1552,
29918,
4346,
273,
292,
29918,
5872,
29892,
13,
13,
13,
29992,
7543,
703,
29923,
764,
29877,
29892,
17784,
271,
4479,
1094,
29883,
5818,
1159,
13,
1753,
604,
388,
29877,
29918,
29879,
272,
271,
4479,
29918,
6151,
5818,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
604,
388,
29877,
29918,
29879,
272,
271,
4479,
29918,
6151,
5818,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
604,
388,
29877,
29918,
29879,
272,
271,
4479,
29918,
6151,
5818,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
604,
388,
29877,
29918,
29879,
272,
271,
4479,
29918,
6151,
5818,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
604,
388,
29877,
29918,
29879,
272,
271,
4479,
29918,
6151,
5818,
29892,
604,
388,
29877,
29918,
29879,
272,
271,
4479,
29918,
6151,
5818,
29892,
604,
388,
29877,
29918,
29879,
272,
271,
4479,
29918,
6151,
5818,
29892,
13,
13,
13,
29992,
7543,
703,
29924,
638,
554,
5801,
29892,
7817,
310,
278,
14070,
1159,
13,
1753,
286,
638,
554,
5801,
29918,
5064,
29918,
974,
29918,
1552,
29918,
344,
29874,
29898,
7543,
29892,
633,
9770,
1125,
13,
13,
1678,
822,
286,
638,
554,
5801,
29918,
5064,
29918,
974,
29918,
1552,
29918,
344,
29874,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
822,
286,
638,
554,
5801,
29918,
5064,
29918,
974,
29918,
1552,
29918,
344,
29874,
7295,
13,
4706,
736,
1976,
1793,
3664,
1888,
2037,
287,
13,
13,
1678,
736,
286,
638,
554,
5801,
29918,
5064,
29918,
974,
29918,
1552,
29918,
344,
29874,
29892,
286,
638,
554,
5801,
29918,
5064,
29918,
974,
29918,
1552,
29918,
344,
29874,
29892,
2
] |
apps/blog/migrations/0005_blogentry_is_active.py | deniskrumko/deniskrumko | 2 | 87584 | # Generated by Django 2.0.5 on 2018-09-03 09:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0004_auto_20180828_2007'),
]
operations = [
migrations.AddField(
model_name='blogentry',
name='is_active',
field=models.BooleanField(default=True, verbose_name='Is active'),
),
]
| [
1,
396,
3251,
630,
491,
15337,
29871,
29906,
29889,
29900,
29889,
29945,
373,
29871,
29906,
29900,
29896,
29947,
29899,
29900,
29929,
29899,
29900,
29941,
29871,
29900,
29929,
29901,
29945,
29929,
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,
7312,
742,
525,
29900,
29900,
29900,
29946,
29918,
6921,
29918,
29906,
29900,
29896,
29947,
29900,
29947,
29906,
29947,
29918,
29906,
29900,
29900,
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,
7312,
8269,
742,
13,
9651,
1024,
2433,
275,
29918,
4925,
742,
13,
9651,
1746,
29922,
9794,
29889,
18146,
3073,
29898,
4381,
29922,
5574,
29892,
26952,
29918,
978,
2433,
3624,
6136,
5477,
13,
4706,
10353,
13,
1678,
4514,
13,
2
] |
tools/ghc-paths/defs.bzl | guibou/rules_haskell | 222 | 197238 | <filename>tools/ghc-paths/defs.bzl
load("@bazel_skylib//lib:paths.bzl", "paths")
def _add_data_impl(ctx):
(_, extension) = paths.split_extension(ctx.executable.executable.path)
executable = ctx.actions.declare_file(
ctx.label.name + extension,
)
ctx.actions.symlink(
output = executable,
target_file = ctx.executable.executable,
is_executable = True,
)
runfiles = ctx.runfiles(files = [executable, ctx.executable.executable] + ctx.files.data)
runfiles = runfiles.merge(ctx.attr.executable[DefaultInfo].default_runfiles)
for data_dep in ctx.attr.data:
runfiles = runfiles.merge(data_dep[DefaultInfo].default_runfiles)
return [DefaultInfo(
executable = executable,
files = depset(direct = [executable]),
runfiles = runfiles,
)]
add_data = rule(
_add_data_impl,
attrs = {
"executable": attr.label(
executable = True,
cfg = "target",
doc = "Create a symlink to this executable",
),
"data": attr.label_list(
allow_files = True,
doc = "Add these data files to the executable's runfiles",
),
},
executable = True,
doc = "Creates a new target for the given executable with additional runfiles.",
)
| [
1,
529,
9507,
29958,
8504,
29914,
12443,
29883,
29899,
24772,
29914,
1753,
29879,
29889,
29890,
29920,
29880,
13,
1359,
29475,
27975,
295,
29918,
7912,
1982,
458,
1982,
29901,
24772,
29889,
29890,
29920,
29880,
613,
376,
24772,
1159,
13,
13,
1753,
903,
1202,
29918,
1272,
29918,
13699,
29898,
13073,
1125,
13,
1678,
313,
3383,
6081,
29897,
353,
10898,
29889,
5451,
29918,
17588,
29898,
13073,
29889,
4258,
9246,
29889,
4258,
9246,
29889,
2084,
29897,
13,
1678,
16813,
353,
12893,
29889,
7387,
29889,
7099,
8663,
29918,
1445,
29898,
13,
4706,
12893,
29889,
1643,
29889,
978,
718,
6081,
29892,
13,
1678,
1723,
13,
1678,
12893,
29889,
7387,
29889,
29879,
21053,
682,
29898,
13,
4706,
1962,
353,
16813,
29892,
13,
4706,
3646,
29918,
1445,
353,
12893,
29889,
4258,
9246,
29889,
4258,
9246,
29892,
13,
4706,
338,
29918,
4258,
9246,
353,
5852,
29892,
13,
1678,
1723,
13,
13,
1678,
1065,
5325,
353,
12893,
29889,
3389,
5325,
29898,
5325,
353,
518,
4258,
9246,
29892,
12893,
29889,
4258,
9246,
29889,
4258,
9246,
29962,
718,
12893,
29889,
5325,
29889,
1272,
29897,
13,
1678,
1065,
5325,
353,
1065,
5325,
29889,
14634,
29898,
13073,
29889,
5552,
29889,
4258,
9246,
29961,
4592,
3401,
1822,
4381,
29918,
3389,
5325,
29897,
13,
1678,
363,
848,
29918,
2716,
297,
12893,
29889,
5552,
29889,
1272,
29901,
13,
4706,
1065,
5325,
353,
1065,
5325,
29889,
14634,
29898,
1272,
29918,
2716,
29961,
4592,
3401,
1822,
4381,
29918,
3389,
5325,
29897,
13,
13,
1678,
736,
518,
4592,
3401,
29898,
13,
4706,
16813,
353,
16813,
29892,
13,
4706,
2066,
353,
316,
567,
300,
29898,
11851,
353,
518,
4258,
9246,
11724,
13,
4706,
1065,
5325,
353,
1065,
5325,
29892,
13,
1678,
1723,
29962,
13,
13,
1202,
29918,
1272,
353,
5751,
29898,
13,
1678,
903,
1202,
29918,
1272,
29918,
13699,
29892,
13,
1678,
12421,
29879,
353,
426,
13,
4706,
376,
4258,
9246,
1115,
12421,
29889,
1643,
29898,
13,
9651,
16813,
353,
5852,
29892,
13,
9651,
274,
16434,
353,
376,
5182,
613,
13,
9651,
1574,
353,
376,
4391,
263,
9878,
828,
682,
304,
445,
16813,
613,
13,
4706,
10353,
13,
4706,
376,
1272,
1115,
12421,
29889,
1643,
29918,
1761,
29898,
13,
9651,
2758,
29918,
5325,
353,
5852,
29892,
13,
9651,
1574,
353,
376,
2528,
1438,
848,
2066,
304,
278,
16813,
29915,
29879,
1065,
5325,
613,
13,
4706,
10353,
13,
1678,
2981,
13,
1678,
16813,
353,
5852,
29892,
13,
1678,
1574,
353,
376,
9832,
1078,
263,
716,
3646,
363,
278,
2183,
16813,
411,
5684,
1065,
5325,
19602,
13,
29897,
13,
2
] |
record_types.py | droberson/greylost | 13 | 140771 | """ DNS Record Types """
# https://en.wikipedia.org/wiki/List_of_DNS_record_types
DNS_RECORD_TYPES = {
1: "A",
28: "AAAA",
18: "AFSDB",
42: "APL",
257: "CAA",
60: "CDNSKEY",
59: "CDS",
37: "CERT",
5: "CNAME",
62: "CSYNC",
49: "DHCID",
32769: "DLV",
39: "DNAME",
48: "DNSKEY",
43: "DS",
55: "HIP",
45: "IPSECKEY",
25: "KEY",
36: "KX",
29: "LOC",
15: "MX",
35: "NAPTR",
2: "NS",
47: "NSEC",
50: "NSEC3",
51: "NSEC3PARAM",
61: "OPENPGPKEY",
12: "PTR",
46: "RRSIG",
17: "RP",
24: "SIG",
53: "SMIMEA",
6: "SOA",
33: "SRV",
44: "SSHFP",
32768: "TA",
249: "TKEY",
52: "TLSA",
250: "TSIG",
16: "TXT",
256: "URI",
255: "*",
252: "AXFR",
251: "IXFR",
41: "OPT",
# Obsolete record types
3: "MD",
4: "MF",
254: "MAILA",
7: "MB",
8: "MG",
9: "MR",
14: "MINFO",
253: "MAILB",
11: "WKS",
#32: "NB", # now assigned to NIMLOC
#33: "NBTSTAT", # now assigned to SRV
10: "NULL",
38: "A6",
13: "HINFO",
19: "X25",
20: "ISDN",
21: "RT",
22: "NSAP",
23: "NSAP-PTR",
26: "PX",
31: "EID",
32: "NIMLOC", # duplicate id: NB
34: "ATMA",
40: "SINK",
27: "GPOS",
100: "UINFO",
101: "UID",
102: "GID",
103: "UNSPEC",
99: "SPF",
56: "NINFO",
57: "RKEY",
58: "TALINK",
104: "NID",
105: "L32",
106: "L64",
107: "LP",
108: "EUI48",
109: "EUI64",
259: "DOA",
}
| [
1,
9995,
16332,
14164,
28025,
9995,
13,
13,
29937,
2045,
597,
264,
29889,
6011,
29889,
990,
29914,
4594,
29914,
1293,
29918,
974,
29918,
29928,
3059,
29918,
11651,
29918,
8768,
13,
29928,
3059,
29918,
1525,
29907,
25593,
29918,
15631,
29925,
2890,
353,
426,
13,
268,
29896,
29901,
376,
29909,
613,
13,
268,
29906,
29947,
29901,
376,
23184,
613,
13,
268,
29896,
29947,
29901,
376,
5098,
29903,
4051,
613,
13,
268,
29946,
29906,
29901,
376,
3301,
29931,
613,
13,
268,
29906,
29945,
29955,
29901,
376,
22701,
613,
13,
268,
29953,
29900,
29901,
376,
6530,
3059,
10818,
613,
13,
268,
29945,
29929,
29901,
376,
6530,
29903,
613,
13,
268,
29941,
29955,
29901,
376,
29907,
20161,
613,
13,
268,
29945,
29901,
376,
29907,
5813,
613,
13,
268,
29953,
29906,
29901,
376,
9295,
29979,
15868,
613,
13,
268,
29946,
29929,
29901,
376,
29928,
19127,
1367,
613,
13,
268,
29941,
29906,
29955,
29953,
29929,
29901,
376,
19558,
29963,
613,
13,
268,
29941,
29929,
29901,
376,
29928,
5813,
613,
13,
268,
29946,
29947,
29901,
376,
29928,
3059,
10818,
613,
13,
268,
29946,
29941,
29901,
376,
8452,
613,
13,
268,
29945,
29945,
29901,
376,
29950,
5690,
613,
13,
268,
29946,
29945,
29901,
376,
5690,
1660,
29907,
10818,
613,
13,
268,
29906,
29945,
29901,
376,
10818,
613,
13,
268,
29941,
29953,
29901,
376,
29968,
29990,
613,
13,
268,
29906,
29929,
29901,
376,
16652,
613,
13,
268,
29896,
29945,
29901,
376,
29924,
29990,
613,
13,
268,
29941,
29945,
29901,
376,
29940,
3301,
5659,
613,
13,
268,
29906,
29901,
376,
3059,
613,
13,
268,
29946,
29955,
29901,
376,
29940,
1660,
29907,
613,
13,
268,
29945,
29900,
29901,
376,
29940,
1660,
29907,
29941,
613,
13,
268,
29945,
29896,
29901,
376,
29940,
1660,
29907,
29941,
16320,
5194,
613,
13,
268,
29953,
29896,
29901,
376,
4590,
1430,
16903,
29925,
10818,
613,
13,
268,
29896,
29906,
29901,
376,
29925,
5659,
613,
13,
268,
29946,
29953,
29901,
376,
29934,
29934,
5425,
29954,
613,
13,
268,
29896,
29955,
29901,
376,
29934,
29925,
613,
13,
268,
29906,
29946,
29901,
376,
5425,
29954,
613,
13,
268,
29945,
29941,
29901,
376,
17061,
8890,
29909,
613,
13,
268,
29953,
29901,
376,
6156,
29909,
613,
13,
268,
29941,
29941,
29901,
376,
14098,
29963,
613,
13,
268,
29946,
29946,
29901,
376,
1799,
29950,
26353,
613,
13,
268,
29941,
29906,
29955,
29953,
29947,
29901,
376,
6040,
613,
13,
268,
29906,
29946,
29929,
29901,
376,
29911,
10818,
613,
13,
268,
29945,
29906,
29901,
376,
14632,
8132,
613,
13,
268,
29906,
29945,
29900,
29901,
376,
29911,
5425,
29954,
613,
13,
268,
29896,
29953,
29901,
376,
29911,
12188,
613,
13,
268,
29906,
29945,
29953,
29901,
376,
15551,
613,
13,
13,
268,
29906,
29945,
29945,
29901,
26345,
613,
13,
268,
29906,
29945,
29906,
29901,
376,
6604,
15860,
613,
13,
268,
29906,
29945,
29896,
29901,
376,
6415,
15860,
613,
13,
268,
29946,
29896,
29901,
376,
14094,
613,
13,
13,
1678,
396,
4250,
2170,
371,
2407,
4072,
13,
268,
29941,
29901,
376,
5773,
613,
13,
268,
29946,
29901,
376,
29924,
29943,
613,
13,
268,
29906,
29945,
29946,
29901,
376,
1529,
29902,
4375,
613,
13,
268,
29955,
29901,
376,
9486,
613,
13,
268,
29947,
29901,
376,
29924,
29954,
613,
13,
268,
29929,
29901,
376,
21055,
613,
13,
268,
29896,
29946,
29901,
376,
29924,
11690,
613,
13,
268,
29906,
29945,
29941,
29901,
376,
1529,
6227,
29933,
613,
13,
268,
29896,
29896,
29901,
376,
29956,
17557,
613,
13,
1678,
396,
29941,
29906,
29901,
376,
23189,
613,
396,
1286,
9859,
304,
405,
29902,
1988,
20166,
13,
1678,
396,
29941,
29941,
29901,
376,
23189,
29911,
17816,
613,
396,
1286,
9859,
304,
29871,
21020,
29963,
13,
268,
29896,
29900,
29901,
376,
10074,
613,
13,
268,
29941,
29947,
29901,
376,
29909,
29953,
613,
13,
268,
29896,
29941,
29901,
376,
29950,
11690,
613,
13,
268,
29896,
29929,
29901,
376,
29990,
29906,
29945,
613,
13,
268,
29906,
29900,
29901,
376,
3235,
28307,
613,
13,
268,
29906,
29896,
29901,
376,
13079,
613,
13,
268,
29906,
29906,
29901,
376,
3059,
3301,
613,
13,
268,
29906,
29941,
29901,
376,
3059,
3301,
29899,
29925,
5659,
613,
13,
268,
29906,
29953,
29901,
376,
29925,
29990,
613,
13,
268,
29941,
29896,
29901,
376,
29923,
1367,
613,
13,
268,
29941,
29906,
29901,
376,
12916,
1988,
20166,
613,
396,
7929,
1178,
29901,
405,
29933,
13,
268,
29941,
29946,
29901,
376,
1299,
1529,
613,
13,
268,
29946,
29900,
29901,
376,
29903,
1177,
29968,
613,
13,
268,
29906,
29955,
29901,
376,
19903,
3267,
613,
13,
268,
29896,
29900,
29900,
29901,
376,
29965,
11690,
613,
13,
268,
29896,
29900,
29896,
29901,
376,
11150,
613,
13,
268,
29896,
29900,
29906,
29901,
376,
29954,
1367,
613,
13,
268,
29896,
29900,
29941,
29901,
376,
29965,
3059,
4162,
29907,
613,
13,
268,
29929,
29929,
29901,
376,
5550,
29943,
613,
13,
268,
29945,
29953,
29901,
376,
29940,
11690,
613,
13,
268,
29945,
29955,
29901,
376,
29934,
10818,
613,
13,
268,
29945,
29947,
29901,
376,
29911,
1964,
1177,
29968,
613,
13,
268,
29896,
29900,
29946,
29901,
376,
29940,
1367,
613,
13,
268,
29896,
29900,
29945,
29901,
376,
29931,
29941,
29906,
613,
13,
268,
29896,
29900,
29953,
29901,
376,
29931,
29953,
29946,
613,
13,
268,
29896,
29900,
29955,
29901,
376,
13208,
613,
13,
268,
29896,
29900,
29947,
29901,
376,
29923,
3120,
29946,
29947,
613,
13,
268,
29896,
29900,
29929,
29901,
376,
29923,
3120,
29953,
29946,
613,
13,
268,
29906,
29945,
29929,
29901,
376,
3970,
29909,
613,
13,
29913,
13,
2
] |
tests/integration/test_jwt_authorization.py | ONSdigital/ras-frontstage | 8 | 130934 | <reponame>ONSdigital/ras-frontstage<filename>tests/integration/test_jwt_authorization.py
import unittest
from unittest import mock
from uuid import uuid4
from jose import JWTError
from frontstage import app
from frontstage.common.authorisation import jwt_authorization
from frontstage.common.session import Session
from frontstage.exceptions.exceptions import JWTValidationError
valid_jwt = (
"<KEY>"
"<KEY>"
"<KEY>"
"<KEY>"
"jc2NzQwMDAuMH0.m94R50EPIKTJmE6gf6PvCmCq8ZpYwwV8PHSqsJh5fnI"
)
expired_jwt = (
"<KEY>"
"<KEY>"
"<KEY>"
"GFydHlfaWQiOiJkYjAzNmZkNy1jZTE3LTQwYzItYThmYy05MzJlN2MyMjgzOTcifQ.ro95XUJ2gqgz7ecF2r3guSi-kh4wI_XYTgUF"
"8IZFHDA"
)
no_expiry_jwt = (
"<KEY>"
"<KEY>"
)
class TestJWTAuthorization(unittest.TestCase):
def setUp(self):
self.app = app.test_client()
self.app.testing = True
self.session = Session.from_party_id("test")
def tearDown(self):
self.session.delete_session()
@staticmethod
def decorator_test(request):
@jwt_authorization(request)
def test_function(session):
pass
test_function()
def test_jwt_authorization_success(self):
self.session.encoded_jwt_token = valid_jwt
self.session.session_key = str(uuid4())
self.session.save()
request = mock.MagicMock(cookies={"authorization": self.session.session_key})
# If this function runs without exceptions the test is considered passed
self.decorator_test(request)
def test_jwt_authorization_expired_jwt(self):
self.session.encoded_jwt_token = expired_jwt
self.session.session_key = str(uuid4())
self.session.save()
request = mock.MagicMock(cookies={"authorization": self.session.session_key})
with self.assertRaises(JWTValidationError):
self.decorator_test(request)
def test_jwt_authorization_no_expiry(self):
self.session.encoded_jwt_token = no_expiry_jwt
self.session.session_key = str(uuid4())
self.session.save()
request = mock.MagicMock(cookies={"authorization": self.session.session_key})
with self.assertRaises(JWTValidationError):
self.decorator_test(request)
@mock.patch("frontstage.common.authorisation.decode")
def test_jwt_authorization_decode_failure(self, mock_decode):
self.session.encoded_jwt_token = valid_jwt
self.session.session_key = str(uuid4())
self.session.save()
request = mock.MagicMock(cookies={"authorization": self.session.session_key})
mock_decode.side_effect = JWTError
with self.assertRaises(JWTValidationError):
self.decorator_test(request)
| [
1,
529,
276,
1112,
420,
29958,
1164,
29903,
7501,
2410,
29914,
3417,
29899,
8862,
19190,
29966,
9507,
29958,
21150,
29914,
27925,
29914,
1688,
29918,
29926,
14554,
29918,
8921,
2133,
29889,
2272,
13,
5215,
443,
27958,
13,
3166,
443,
27958,
1053,
11187,
13,
3166,
318,
5416,
1053,
318,
5416,
29946,
13,
13,
3166,
432,
852,
1053,
435,
17755,
2392,
13,
13,
3166,
4565,
19190,
1053,
623,
13,
3166,
4565,
19190,
29889,
9435,
29889,
8921,
4371,
1053,
432,
14554,
29918,
8921,
2133,
13,
3166,
4565,
19190,
29889,
9435,
29889,
7924,
1053,
16441,
13,
3166,
4565,
19190,
29889,
11739,
29879,
29889,
11739,
29879,
1053,
435,
17755,
19448,
2392,
13,
13,
3084,
29918,
29926,
14554,
353,
313,
13,
1678,
9872,
10818,
11903,
13,
1678,
9872,
10818,
11903,
13,
1678,
9872,
10818,
11903,
13,
1678,
9872,
10818,
11903,
13,
1678,
376,
29926,
29883,
29906,
29940,
29920,
29984,
29893,
5773,
29909,
29884,
29924,
29950,
29900,
29889,
29885,
29929,
29946,
29934,
29945,
29900,
29923,
2227,
29968,
29911,
29967,
29885,
29923,
29953,
29887,
29888,
29953,
29925,
29894,
29907,
29885,
29907,
29939,
29947,
29999,
29886,
29979,
1615,
29963,
29947,
29925,
14851,
29939,
29879,
29967,
29882,
29945,
9144,
29902,
29908,
13,
29897,
13,
4548,
2859,
29918,
29926,
14554,
353,
313,
13,
1678,
9872,
10818,
11903,
13,
1678,
9872,
10818,
11903,
13,
1678,
9872,
10818,
11903,
13,
1678,
376,
29954,
29943,
2941,
29950,
29880,
5444,
29956,
29984,
29875,
29949,
29875,
29967,
29895,
29979,
29926,
16748,
29940,
29885,
29999,
29895,
29940,
29891,
29896,
29926,
29999,
4330,
29941,
5850,
29984,
29893,
29979,
29920,
3112,
29979,
1349,
29885,
29979,
29891,
29900,
29945,
29924,
29920,
29967,
29880,
29940,
29906,
3421,
29924,
29926,
18828,
2891,
29883,
361,
29984,
29889,
307,
29929,
29945,
29990,
29965,
29967,
29906,
29887,
29939,
18828,
29955,
687,
29943,
29906,
29878,
29941,
2543,
25598,
29899,
15339,
29946,
29893,
29902,
29918,
18454,
29911,
29887,
29965,
29943,
29908,
13,
1678,
376,
29947,
26664,
29943,
29950,
7698,
29908,
13,
29897,
13,
1217,
29918,
4548,
16129,
29918,
29926,
14554,
353,
313,
13,
1678,
9872,
10818,
11903,
13,
1678,
9872,
10818,
11903,
13,
29897,
13,
13,
13,
1990,
4321,
29967,
29956,
6040,
329,
2015,
2133,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
822,
731,
3373,
29898,
1311,
1125,
13,
4706,
1583,
29889,
932,
353,
623,
29889,
1688,
29918,
4645,
580,
13,
4706,
1583,
29889,
932,
29889,
13424,
353,
5852,
13,
4706,
1583,
29889,
7924,
353,
16441,
29889,
3166,
29918,
22633,
29918,
333,
703,
1688,
1159,
13,
13,
1678,
822,
734,
279,
6767,
29898,
1311,
1125,
13,
4706,
1583,
29889,
7924,
29889,
8143,
29918,
7924,
580,
13,
13,
1678,
732,
7959,
5696,
13,
1678,
822,
10200,
1061,
29918,
1688,
29898,
3827,
1125,
13,
4706,
732,
29926,
14554,
29918,
8921,
2133,
29898,
3827,
29897,
13,
4706,
822,
1243,
29918,
2220,
29898,
7924,
1125,
13,
9651,
1209,
13,
13,
4706,
1243,
29918,
2220,
580,
13,
13,
1678,
822,
1243,
29918,
29926,
14554,
29918,
8921,
2133,
29918,
8698,
29898,
1311,
1125,
13,
4706,
1583,
29889,
7924,
29889,
26716,
29918,
29926,
14554,
29918,
6979,
353,
2854,
29918,
29926,
14554,
13,
4706,
1583,
29889,
7924,
29889,
7924,
29918,
1989,
353,
851,
29898,
25118,
29946,
3101,
13,
4706,
1583,
29889,
7924,
29889,
7620,
580,
13,
4706,
2009,
353,
11187,
29889,
19095,
293,
18680,
29898,
15108,
583,
3790,
29908,
8921,
2133,
1115,
1583,
29889,
7924,
29889,
7924,
29918,
1989,
1800,
13,
13,
4706,
396,
960,
445,
740,
6057,
1728,
15283,
278,
1243,
338,
5545,
4502,
13,
4706,
1583,
29889,
19557,
1061,
29918,
1688,
29898,
3827,
29897,
13,
13,
1678,
822,
1243,
29918,
29926,
14554,
29918,
8921,
2133,
29918,
4548,
2859,
29918,
29926,
14554,
29898,
1311,
1125,
13,
4706,
1583,
29889,
7924,
29889,
26716,
29918,
29926,
14554,
29918,
6979,
353,
1518,
2859,
29918,
29926,
14554,
13,
4706,
1583,
29889,
7924,
29889,
7924,
29918,
1989,
353,
851,
29898,
25118,
29946,
3101,
13,
4706,
1583,
29889,
7924,
29889,
7620,
580,
13,
4706,
2009,
353,
11187,
29889,
19095,
293,
18680,
29898,
15108,
583,
3790,
29908,
8921,
2133,
1115,
1583,
29889,
7924,
29889,
7924,
29918,
1989,
1800,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
29967,
17755,
19448,
2392,
1125,
13,
9651,
1583,
29889,
19557,
1061,
29918,
1688,
29898,
3827,
29897,
13,
13,
1678,
822,
1243,
29918,
29926,
14554,
29918,
8921,
2133,
29918,
1217,
29918,
4548,
16129,
29898,
1311,
1125,
13,
4706,
1583,
29889,
7924,
29889,
26716,
29918,
29926,
14554,
29918,
6979,
353,
694,
29918,
4548,
16129,
29918,
29926,
14554,
13,
4706,
1583,
29889,
7924,
29889,
7924,
29918,
1989,
353,
851,
29898,
25118,
29946,
3101,
13,
4706,
1583,
29889,
7924,
29889,
7620,
580,
13,
4706,
2009,
353,
11187,
29889,
19095,
293,
18680,
29898,
15108,
583,
3790,
29908,
8921,
2133,
1115,
1583,
29889,
7924,
29889,
7924,
29918,
1989,
1800,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
29967,
17755,
19448,
2392,
1125,
13,
9651,
1583,
29889,
19557,
1061,
29918,
1688,
29898,
3827,
29897,
13,
13,
1678,
732,
17640,
29889,
5041,
703,
8862,
19190,
29889,
9435,
29889,
8921,
4371,
29889,
13808,
1159,
13,
1678,
822,
1243,
29918,
29926,
14554,
29918,
8921,
2133,
29918,
13808,
29918,
14057,
545,
29898,
1311,
29892,
11187,
29918,
13808,
1125,
13,
4706,
1583,
29889,
7924,
29889,
26716,
29918,
29926,
14554,
29918,
6979,
353,
2854,
29918,
29926,
14554,
13,
4706,
1583,
29889,
7924,
29889,
7924,
29918,
1989,
353,
851,
29898,
25118,
29946,
3101,
13,
4706,
1583,
29889,
7924,
29889,
7620,
580,
13,
4706,
2009,
353,
11187,
29889,
19095,
293,
18680,
29898,
15108,
583,
3790,
29908,
8921,
2133,
1115,
1583,
29889,
7924,
29889,
7924,
29918,
1989,
1800,
13,
4706,
11187,
29918,
13808,
29889,
2975,
29918,
15987,
353,
435,
17755,
2392,
13,
13,
4706,
411,
1583,
29889,
9294,
29934,
1759,
267,
29898,
29967,
17755,
19448,
2392,
1125,
13,
9651,
1583,
29889,
19557,
1061,
29918,
1688,
29898,
3827,
29897,
13,
2
] |
komoog/paths.py | benmaier/komoog | 2 | 49658 | # -*- coding: utf-8 -*-
"""
Path handling
"""
import pathlib
from pathlib import Path
import simplejson as json
customdir = Path.home() / ".komoog"
def _prepare():
customdir.mkdir(exist_ok=True)
cred_file = customdir / "komoot.json"
if not cred_file.exists():
data = {
"email" : "",
"password" : "",
"clientid" : "",
}
with open(cred_file,'w') as f:
credentials = json.dump(data,f)
def get_credentials():
"""
Returns credentials for komoot login in structure
.. code:: python
{
"email" : "",
"password" : "",
"clientid" : ""
}
from the file ``~/.komoog/komoot.json``
"""
_prepare()
cred_file = customdir / "komoot.json"
with open(cred_file,'r') as f:
credentials = json.load(f)
assert(all([ k in credentials.keys() for k in ["email", "password", "clientid"]]))
assert(not any([ credentials[k] == '' for k in ["email", "password", "clientid"]]))
return credentials
if __name__ == "__main__":
get_credentials()
| [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
2605,
11415,
13,
15945,
29908,
13,
13,
5215,
2224,
1982,
13,
3166,
2224,
1982,
1053,
10802,
13,
5215,
2560,
3126,
408,
4390,
13,
13,
6341,
3972,
353,
10802,
29889,
5184,
580,
847,
11393,
7218,
29877,
468,
29908,
13,
13,
1753,
903,
19125,
7295,
13,
13,
1678,
2888,
3972,
29889,
11256,
3972,
29898,
28997,
29918,
554,
29922,
5574,
29897,
13,
1678,
6625,
29918,
1445,
353,
2888,
3972,
847,
376,
7218,
3155,
29889,
3126,
29908,
13,
1678,
565,
451,
6625,
29918,
1445,
29889,
9933,
7295,
13,
4706,
848,
353,
426,
13,
462,
1678,
376,
5269,
29908,
584,
12633,
13,
462,
1678,
376,
5630,
29908,
584,
12633,
13,
462,
1678,
376,
4645,
333,
29908,
584,
12633,
13,
1669,
500,
13,
4706,
411,
1722,
29898,
11944,
29918,
1445,
5501,
29893,
1495,
408,
285,
29901,
13,
9651,
16140,
353,
4390,
29889,
15070,
29898,
1272,
29892,
29888,
29897,
13,
13,
13,
1753,
679,
29918,
11944,
9409,
7295,
13,
1678,
9995,
13,
1678,
16969,
16140,
363,
4677,
3155,
6464,
297,
3829,
13,
13,
1678,
6317,
775,
1057,
3017,
13,
13,
4706,
426,
13,
9651,
376,
5269,
29908,
584,
12633,
13,
9651,
376,
5630,
29908,
584,
12633,
13,
9651,
376,
4645,
333,
29908,
584,
5124,
13,
4706,
500,
13,
13,
1678,
515,
278,
934,
4954,
30022,
6294,
7218,
29877,
468,
29914,
7218,
3155,
29889,
3126,
16159,
13,
1678,
9995,
13,
13,
1678,
903,
19125,
580,
13,
13,
1678,
6625,
29918,
1445,
353,
2888,
3972,
847,
376,
7218,
3155,
29889,
3126,
29908,
13,
13,
1678,
411,
1722,
29898,
11944,
29918,
1445,
5501,
29878,
1495,
408,
285,
29901,
13,
4706,
16140,
353,
4390,
29889,
1359,
29898,
29888,
29897,
13,
13,
1678,
4974,
29898,
497,
4197,
413,
297,
16140,
29889,
8149,
580,
363,
413,
297,
6796,
5269,
613,
376,
5630,
613,
376,
4645,
333,
3108,
12622,
13,
1678,
4974,
29898,
1333,
738,
4197,
16140,
29961,
29895,
29962,
1275,
6629,
363,
413,
297,
6796,
5269,
613,
376,
5630,
613,
376,
4645,
333,
3108,
12622,
13,
13,
1678,
736,
16140,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
679,
29918,
11944,
9409,
580,
13,
2
] |
GettingStarted/gettingstarted.py | rohitp934/roadtoadatascientist | 0 | 11960 | #importing necessary modules
from sklearn.linear_model import Perceptron
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import accuracy_score
import numpy as np
# Data and labels
Xtrain = [[182, 80, 34], [176, 70, 33], [161, 60, 28], [154, 55, 27], [166, 63, 30], [189, 90, 36], [175, 63, 28], [177, 71, 30], [159, 52, 27], [171, 72, 32], [181, 85, 34]]
Ytrain = ['male', 'male', 'female', 'female', 'male', 'male', 'female', 'female', 'female', 'male', 'male']
Xval = [[163, 62, 28], [182, 80, 35], [150, 50, 24], [160, 57, 27], [175, 62, 30], [183, 67, 32], [177, 64, 29], [164, 62, 29], [157, 53, 23], [170, 73, 32], [169, 59, 29]]
Yval = ['female', 'male', 'female', 'female', 'male', 'male', 'female', 'female',
'female', 'male', 'female']
# initializing the ML models
knn = KNeighborsClassifier()
perceptron = Perceptron()
# Fitting the models
knn.fit(Xtrain, Ytrain)
perceptron.fit(Xtrain, Ytrain)
# Testing using our input data
pred_knn = knn.predict(Xval)
acc_knn = accuracy_score(Yval, pred_knn) * 100
print(f'Accuracy for knn: {acc_knn}')
pred_perceptron = perceptron.predict(Xval)
acc_perceptron = accuracy_score(Yval, pred_perceptron) * 100
print(f'Accuracy for perceptron: {acc_perceptron}')
# The best classifier out of the two models
index = np.argmax([acc_knn, acc_perceptron])
#argmax function assigns the index of the maximum value to the variable
classifiers = {0: 'KNN', 1:'PER'}
print(f'Best gender classifier is {classifiers[index]}')
| [
1,
396,
5215,
292,
5181,
10585,
13,
3166,
2071,
19668,
29889,
10660,
29918,
4299,
1053,
2431,
1547,
1617,
13,
3166,
2071,
19668,
29889,
484,
1141,
29890,
943,
1053,
476,
8139,
1141,
29890,
943,
2385,
3709,
13,
3166,
2071,
19668,
29889,
2527,
10817,
1053,
13600,
29918,
13628,
13,
5215,
12655,
408,
7442,
13,
13,
29937,
3630,
322,
11073,
13,
29990,
14968,
353,
5519,
29896,
29947,
29906,
29892,
29871,
29947,
29900,
29892,
29871,
29941,
29946,
1402,
518,
29896,
29955,
29953,
29892,
29871,
29955,
29900,
29892,
29871,
29941,
29941,
1402,
518,
29896,
29953,
29896,
29892,
29871,
29953,
29900,
29892,
29871,
29906,
29947,
1402,
518,
29896,
29945,
29946,
29892,
29871,
29945,
29945,
29892,
29871,
29906,
29955,
1402,
518,
29896,
29953,
29953,
29892,
29871,
29953,
29941,
29892,
29871,
29941,
29900,
1402,
518,
29896,
29947,
29929,
29892,
29871,
29929,
29900,
29892,
29871,
29941,
29953,
1402,
518,
29896,
29955,
29945,
29892,
29871,
29953,
29941,
29892,
29871,
29906,
29947,
1402,
518,
29896,
29955,
29955,
29892,
29871,
29955,
29896,
29892,
29871,
29941,
29900,
1402,
518,
29896,
29945,
29929,
29892,
29871,
29945,
29906,
29892,
29871,
29906,
29955,
1402,
518,
29896,
29955,
29896,
29892,
29871,
29955,
29906,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29947,
29896,
29892,
29871,
29947,
29945,
29892,
29871,
29941,
29946,
5262,
13,
13,
29979,
14968,
353,
6024,
19202,
742,
525,
19202,
742,
525,
29888,
331,
744,
742,
525,
29888,
331,
744,
742,
525,
19202,
742,
525,
19202,
742,
525,
29888,
331,
744,
742,
525,
29888,
331,
744,
742,
525,
29888,
331,
744,
742,
525,
19202,
742,
525,
19202,
2033,
13,
13,
29990,
791,
353,
5519,
29896,
29953,
29941,
29892,
29871,
29953,
29906,
29892,
29871,
29906,
29947,
1402,
518,
29896,
29947,
29906,
29892,
29871,
29947,
29900,
29892,
29871,
29941,
29945,
1402,
518,
29896,
29945,
29900,
29892,
29871,
29945,
29900,
29892,
29871,
29906,
29946,
1402,
518,
29896,
29953,
29900,
29892,
29871,
29945,
29955,
29892,
29871,
29906,
29955,
1402,
518,
29896,
29955,
29945,
29892,
29871,
29953,
29906,
29892,
29871,
29941,
29900,
1402,
518,
29896,
29947,
29941,
29892,
29871,
29953,
29955,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29955,
29955,
29892,
29871,
29953,
29946,
29892,
29871,
29906,
29929,
1402,
518,
29896,
29953,
29946,
29892,
29871,
29953,
29906,
29892,
29871,
29906,
29929,
1402,
518,
29896,
29945,
29955,
29892,
29871,
29945,
29941,
29892,
29871,
29906,
29941,
1402,
518,
29896,
29955,
29900,
29892,
29871,
29955,
29941,
29892,
29871,
29941,
29906,
1402,
518,
29896,
29953,
29929,
29892,
29871,
29945,
29929,
29892,
29871,
29906,
29929,
5262,
13,
13,
29979,
791,
353,
6024,
29888,
331,
744,
742,
525,
19202,
742,
525,
29888,
331,
744,
742,
525,
29888,
331,
744,
742,
525,
19202,
742,
525,
19202,
742,
525,
29888,
331,
744,
742,
525,
29888,
331,
744,
742,
13,
268,
525,
29888,
331,
744,
742,
525,
19202,
742,
525,
29888,
331,
744,
2033,
13,
13,
29937,
2847,
5281,
278,
23158,
4733,
13,
3959,
29876,
353,
476,
8139,
1141,
29890,
943,
2385,
3709,
580,
13,
546,
1547,
1617,
353,
2431,
1547,
1617,
580,
13,
13,
29937,
383,
5367,
278,
4733,
13,
3959,
29876,
29889,
9202,
29898,
29990,
14968,
29892,
612,
14968,
29897,
13,
546,
1547,
1617,
29889,
9202,
29898,
29990,
14968,
29892,
612,
14968,
29897,
13,
13,
29937,
4321,
292,
773,
1749,
1881,
848,
13,
11965,
29918,
3959,
29876,
353,
889,
29876,
29889,
27711,
29898,
29990,
791,
29897,
13,
5753,
29918,
3959,
29876,
353,
13600,
29918,
13628,
29898,
29979,
791,
29892,
4450,
29918,
3959,
29876,
29897,
334,
29871,
29896,
29900,
29900,
13,
2158,
29898,
29888,
29915,
7504,
332,
4135,
363,
889,
29876,
29901,
426,
5753,
29918,
3959,
29876,
29913,
1495,
13,
13,
11965,
29918,
546,
1547,
1617,
353,
639,
1547,
1617,
29889,
27711,
29898,
29990,
791,
29897,
13,
5753,
29918,
546,
1547,
1617,
353,
13600,
29918,
13628,
29898,
29979,
791,
29892,
4450,
29918,
546,
1547,
1617,
29897,
334,
29871,
29896,
29900,
29900,
13,
2158,
29898,
29888,
29915,
7504,
332,
4135,
363,
639,
1547,
1617,
29901,
426,
5753,
29918,
546,
1547,
1617,
29913,
1495,
13,
13,
29937,
450,
1900,
770,
3709,
714,
310,
278,
1023,
4733,
13,
2248,
353,
7442,
29889,
1191,
3317,
4197,
5753,
29918,
3959,
29876,
29892,
1035,
29918,
546,
1547,
1617,
2314,
13,
29937,
1191,
3317,
740,
3566,
29879,
278,
2380,
310,
278,
7472,
995,
304,
278,
2286,
13,
1990,
14903,
353,
426,
29900,
29901,
525,
29968,
10262,
742,
29871,
29896,
11283,
13171,
10827,
13,
2158,
29898,
29888,
29915,
25353,
23346,
770,
3709,
338,
426,
1990,
14903,
29961,
2248,
12258,
1495,
13,
2
] |
hard-gists/2787060/snippet.py | jjhenkel/dockerizeme | 21 | 172782 | <reponame>jjhenkel/dockerizeme<filename>hard-gists/2787060/snippet.py<gh_stars>10-100
# -*- coding:UTF8 -*-
#1.概念:
# 正则表达式(或 RE)是一种小型的、高度专业化的编程语言,
# (在Python中)它内嵌在Python中,并通过 re 模块实现。使用这个小型语言,
# 你可以为想要匹配的相应字符串集指定规则;该字符串集可能包含英文语句、email
# 地址、TeX命令或任何你想搞定的东西。然后你可以问诸如“这个字符串匹配
# 该模式吗?”或“在这个字符串中是否有部分匹配该模式呢?”。你也可以使用 RE
# 以各种方式来修改或分割字符串。
#
# 正则表达式语言相对小型和受限(功能有限),因此并非所有字符串处理都能用
# 正则表达式完成。当然也有些任务可以用正则表达式完成,不过最终表达式会变
# 得异常复杂。碰到这些情形时,编写 Python 代码进行处理可能反而更好;尽管
# Python 代码比一个精巧的正则表达式要慢些,但它更易理解。
#
#2.在正则表达式中, 如下的字符是具有特殊含义的
# . (所有字符) ^ $ *(0-N次) +(1-N次) ? (0-1次) { } [ ] \ | ( )
# 1)."[" 和 "]"。它们常用来指定一个字符类别,所谓字符类别就是你想匹配的一个字符集
# 2).其它地方的"^"只会简单匹配 "^"字符本身。例[^5] 将匹配除 "5" 之外的任意字符。
# 3).反斜杠后面可以加不同的字符以表示不同特殊意义。它也可以用于取消所有的元字符
#
#3.RE 函数用法:
# findall(rule , target [,flag] ) 在目标字符串中查找符合规则的字符串。
# match() 决定 RE 是否在字符串刚开始的位置匹配
# search() 扫描字符串,找到这个 RE 匹配的位置
# findall() 找到 RE 匹配的所有子串,并把它们作为一个列表返回
# finditer() 找到 RE 匹配的所有子串,并把它们作为一个迭代器返回
# group() 返回被 RE 匹配的字符串
# start() 返回匹配开始的位置
# end() 返回匹配结束的位置
# span() 返回一个元组包含匹配 (开始,结束) 的位置
# compile( rule [,flag] )将正则规则编译成一个Pattern对象,以供接下来使用第一个参数
#
# 是规则式,第二个参数是规则选项。(使用compile加速)
#
#4 : 含义:
# 预定义转义字符集: “\d” “\w” “\s” 等等,它们是以字符’\’开头,后面接一个特定
#
#字符的形式,用来指示一个预定义好的含义
#
# ‘^’ 和’$’ 匹配字符串开头和结尾
# ‘.’ 匹配所有字符 除\n以外
# ‘\d’ 匹配数字
# ‘\D’ 匹配非数字
# ‘\w’ 匹配字母和数字
# ‘\W’ 匹配非英文字母和数字
# ‘\s’ 匹配间隔符
# ‘\S’ 匹配非间隔符
# ‘\A’ 匹配字符串开头
# ‘\Z’ 匹配字符串结尾
# ‘\b’ 只用以匹配单词的词首和词尾。单词被定义为一个字母数字序列,因此词尾就
#
# 是用空白符或非字母数字符来标示的。(退格)
# ‘\B’,它正好同 \b 相反,只在当前位置不在单词边界时匹配。
#5.前向界定与后向界定:
# ‘(?<=…)’ 前向界定:括号中’…’代表你希望匹配的字符串的前面应该出现的字符串。
# ‘(?=…)’后向界定 :括号中的’…’代表你希望匹配的字符串后面应该出现的字符串
# ‘(?<!..)’前向非界定 :只有当你希望的字符串前面不是’…’的内容时才匹配
# ‘(?!...)’后向非界定 :只有当你希望的字符串后面不跟着’…’内容时才匹配。
#6.组的基本知识:
# ‘(‘’)’ 无命名组 [a-z]+(\d+)[a-z]+
# ‘(?P<name>…)’ 命名组 (?P<g1>[a-z]+)\d+(?P=g1)
# ‘(?P=name)’ 调用已匹配的命名组
# ‘\number’通过序号调用已匹配的组正则式中的每个组都有一个序号,序号是按组
#
#从左到右,从1开始的数字,你可以通过下面的形式来调用已匹配的组
# ( r"(\d+)([a-z]+)(\d+)(\2)(\1)" )
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
import rhinoscriptsyntax as rs
# 正则表达式
import re
str1 = "abc \\ 123 456"
print re.findall("\\\\",str1) # 不用r和用r的区
print re.findall(r"\d\Z",str1) # 用"r"来定义规则字符串
p = re.compile('(a)b')
m = p.match('ab')
print m.group()
s = "aaa1 22 gg 333 ccc 4444 pppp 55555 666"
print re.findall(r"\b\d{3}\b",s)
print re.findall(r"\b\d{2,4}\b",s)
s2 = "aaa111aaa , bbb222 , 333ccc"
print re.findall( r"(?<=[a-z]+)\d+(?=[a-z]+)",s2 )
print re.findall( r"\d+(?=[a-z]+)",s2 )
## 目标 前面是a-z 1-多次、中间数字1-9 1-多次
print re.findall(r"\d+(?!\w+)",s2)
#无命名组
print re.findall(r"[a-z]+(\d+)[a-z]+",s2) # 只返回()里面的
s3 = 'aaa111aaa,bbb222,333ccc,444ddd444,555eee666,fff777ggg,hhh888hhh'
print re.findall(r"([a-z]+)\d+([a-z]+)",s3) #返回括号里面的
#‘(?P<name>…)’ 命名组
print re.findall( r"(?P<g1>[a-z]+)\d+(?P=g1)",s3 ) #找出被中间夹有数字的前后同样的字母
print re.findall(r"([a-z]+)\d+\1",s3)
s4 = "111aaa222aaa111,333bbb444bb33"
print re.findall( r"(\d+)([a-z]+)(\d+)(\2)(\1)", s4 ) #数字、字母、数字、字母、数字相对称
print re.compile(r"(\d+)([a-z]+)(\d+)(\2)(\1)").findall(s4)
#compile( rule [,flag] ) 使用compile加速
s5 = "111,222,aaa,bbb,ccc333,444ddd"
print re.compile(r"\d+\b").findall(s5) # \退格 匹配一个位于开头的数字,没有使用M选项
s6 = "123 456\n789 012\n345 678"
print re.compile(r"^\d+",re.M).findall(s6) # 匹配位于(M/多行)开头的数字
rcm=re.compile(r"\d+$")# 对于’$’来说,没有使用M选项,它将匹配最后一个行尾的数字,即’678’,加上以后,就能匹配三个行尾的数字456 012和678了.
print re.compile(r"\d+$",re.M).findall(s6) #
| [
1,
529,
276,
1112,
420,
29958,
29926,
29926,
3169,
10265,
29914,
14695,
466,
2004,
29966,
9507,
29958,
6800,
29899,
29887,
2879,
29914,
29906,
29955,
29947,
29955,
29900,
29953,
29900,
29914,
29879,
1240,
7988,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
448,
29930,
29899,
14137,
29901,
10496,
29947,
448,
29930,
29899,
13,
29937,
29896,
29889,
233,
169,
133,
232,
194,
184,
30383,
13,
29937,
12,
30724,
31403,
30746,
31798,
30607,
30419,
31391,
5195,
30409,
30392,
30287,
31893,
30446,
30883,
30210,
30330,
30528,
30898,
31756,
31729,
30705,
30210,
31795,
31101,
31505,
31243,
30214,
13,
29937,
539,
30419,
30505,
11980,
30275,
30409,
232,
177,
134,
30728,
232,
184,
143,
30505,
11980,
30275,
30214,
31666,
30768,
31138,
337,
29871,
31382,
232,
160,
154,
31195,
31424,
30267,
30785,
30406,
30810,
30502,
30446,
30883,
31505,
31243,
30214,
13,
29937,
4706,
30919,
30682,
30651,
30573,
31522,
30698,
232,
143,
188,
31361,
30210,
30990,
31370,
30578,
31277,
31767,
30893,
31084,
30495,
235,
170,
135,
31403,
31608,
31751,
30578,
31277,
31767,
30893,
30682,
30815,
31473,
232,
147,
174,
31144,
30333,
31505,
232,
146,
168,
30330,
5269,
13,
29937,
4706,
30533,
31702,
30330,
16644,
31237,
31650,
31391,
31450,
31502,
30919,
31522,
233,
147,
161,
30495,
30210,
30979,
30602,
30267,
31516,
30822,
30919,
30682,
30651,
31658,
235,
178,
187,
30847,
30015,
30810,
30502,
30578,
31277,
31767,
232,
143,
188,
31361,
13,
29937,
4706,
31751,
31382,
30607,
232,
147,
154,
30882,
30024,
31391,
30015,
30505,
30810,
30502,
30578,
31277,
31767,
30275,
30392,
31191,
30417,
30636,
30748,
232,
143,
188,
31361,
31751,
31382,
30607,
232,
148,
165,
30882,
30024,
30267,
30919,
30953,
30682,
30651,
30785,
30406,
5195,
13,
29937,
4706,
30651,
232,
147,
135,
31893,
30525,
30607,
30805,
31273,
31264,
31391,
30748,
232,
140,
181,
30578,
31277,
31767,
30267,
13,
29937,
13,
29937,
12,
30724,
31403,
30746,
31798,
30607,
31505,
31243,
30990,
30783,
30446,
30883,
30503,
232,
146,
154,
31175,
30419,
31134,
30815,
30417,
31175,
30409,
30214,
31570,
31389,
31666,
31838,
30744,
30417,
30578,
31277,
31767,
31548,
30687,
30769,
30815,
30406,
13,
29937,
4706,
30724,
31403,
30746,
31798,
30607,
31366,
30494,
30267,
30948,
31516,
30953,
30417,
31959,
31450,
31358,
30682,
30651,
30406,
30724,
31403,
30746,
31798,
30607,
31366,
30494,
30214,
30413,
31138,
30878,
234,
190,
139,
30746,
31798,
30607,
30437,
31462,
13,
29937,
4706,
31050,
232,
191,
133,
31190,
31810,
233,
160,
133,
30267,
234,
165,
179,
30780,
30810,
31959,
30993,
31305,
30594,
30214,
31795,
31479,
5132,
29871,
30690,
31183,
31174,
30448,
31548,
30687,
30682,
30815,
31908,
31325,
31100,
31076,
31608,
232,
179,
192,
31624,
13,
29937,
539,
5132,
29871,
30690,
31183,
31419,
30287,
30502,
234,
181,
193,
232,
186,
170,
30210,
30724,
31403,
30746,
31798,
30607,
30698,
233,
136,
165,
31959,
30214,
231,
192,
137,
232,
177,
134,
31100,
233,
155,
150,
30687,
31201,
30267,
13,
29937,
13,
29937,
29906,
29889,
30505,
30724,
31403,
30746,
31798,
30607,
30275,
30214,
29871,
30847,
30557,
30210,
30578,
31277,
30392,
232,
136,
186,
30417,
31141,
233,
177,
141,
232,
147,
174,
31349,
30210,
13,
29937,
12,
29889,
313,
30744,
30417,
30578,
31277,
29897,
29871,
6228,
29871,
395,
29871,
334,
29898,
29900,
29899,
29940,
30936,
29897,
29871,
718,
29898,
29896,
29899,
29940,
30936,
29897,
29871,
1577,
313,
29900,
29899,
29896,
30936,
29897,
426,
500,
518,
29871,
4514,
29871,
320,
29871,
891,
29871,
313,
1723,
29871,
13,
29937,
4706,
29896,
467,
29908,
3366,
29871,
30503,
376,
18017,
30267,
232,
177,
134,
31381,
31190,
30406,
30805,
31084,
30495,
30287,
30502,
30578,
31277,
30832,
232,
139,
174,
30214,
30744,
235,
179,
150,
30578,
31277,
30832,
232,
139,
174,
31238,
30392,
30919,
31522,
232,
143,
188,
31361,
30210,
30287,
30502,
30578,
31277,
30893,
13,
29937,
4706,
29906,
467,
31149,
232,
177,
134,
30533,
30525,
30210,
29908,
29985,
29908,
31557,
30437,
234,
177,
131,
31166,
232,
143,
188,
31361,
13898,
29908,
30578,
31277,
30346,
31687,
30267,
31507,
22896,
29945,
29962,
29871,
30998,
232,
143,
188,
31361,
31152,
376,
29945,
29908,
29871,
30577,
31066,
30210,
31450,
31474,
30578,
31277,
30267,
13,
29937,
4706,
29941,
467,
31908,
233,
153,
159,
233,
160,
163,
30822,
30806,
30682,
30651,
30666,
30413,
30980,
30210,
30578,
31277,
30651,
30746,
30858,
30413,
30980,
31141,
233,
177,
141,
31474,
31349,
30267,
232,
177,
134,
30953,
30682,
30651,
30406,
30909,
30683,
31276,
30744,
30417,
30210,
30824,
30578,
31277,
13,
29937,
13,
29937,
29941,
29889,
1525,
29871,
31629,
30354,
30406,
30545,
29901,
13,
29937,
539,
1284,
497,
29898,
7491,
1919,
3646,
518,
29892,
15581,
29962,
1723,
29871,
30505,
30895,
31062,
30578,
31277,
31767,
30275,
31213,
233,
140,
193,
31277,
30733,
235,
170,
135,
31403,
30210,
30578,
31277,
31767,
30267,
13,
29937,
539,
1993,
580,
29871,
232,
137,
182,
30495,
5195,
29871,
30392,
31191,
30505,
30578,
31277,
31767,
232,
139,
157,
31026,
31020,
30210,
30956,
30669,
232,
143,
188,
31361,
13,
29937,
539,
2740,
580,
29871,
233,
140,
174,
233,
146,
146,
30578,
31277,
31767,
30214,
233,
140,
193,
30780,
30810,
30502,
5195,
29871,
232,
143,
188,
31361,
30210,
30956,
30669,
13,
29937,
539,
1284,
497,
580,
29871,
233,
140,
193,
30780,
5195,
29871,
232,
143,
188,
31361,
30210,
30744,
30417,
30319,
31767,
30214,
31666,
233,
141,
141,
232,
177,
134,
31381,
30732,
30573,
30287,
30502,
31025,
30746,
31086,
30742,
13,
29937,
539,
1284,
1524,
580,
29871,
233,
140,
193,
30780,
5195,
29871,
232,
143,
188,
31361,
30210,
30744,
30417,
30319,
31767,
30214,
31666,
233,
141,
141,
232,
177,
134,
31381,
30732,
30573,
30287,
30502,
235,
194,
176,
30690,
30943,
31086,
30742,
13,
29937,
539,
2318,
580,
29871,
31086,
30742,
31407,
5195,
29871,
232,
143,
188,
31361,
30210,
30578,
31277,
31767,
13,
29937,
539,
1369,
580,
29871,
31086,
30742,
232,
143,
188,
31361,
31026,
31020,
30210,
30956,
30669,
13,
29937,
539,
1095,
580,
29871,
31086,
30742,
232,
143,
188,
31361,
31320,
233,
160,
162,
30210,
30956,
30669,
13,
29937,
539,
10638,
580,
29871,
31086,
30742,
30287,
30502,
30824,
31263,
31473,
232,
147,
174,
232,
143,
188,
31361,
313,
31026,
31020,
29892,
31320,
233,
160,
162,
29897,
29871,
30210,
30956,
30669,
13,
29937,
539,
6633,
29898,
5751,
518,
29892,
15581,
29962,
1723,
30998,
30724,
31403,
235,
170,
135,
31403,
31795,
235,
178,
148,
30494,
30287,
30502,
17144,
30783,
31133,
30214,
30651,
231,
193,
158,
31092,
30557,
30805,
30785,
30406,
30622,
30287,
30502,
31125,
30354,
1678,
13,
29937,
13,
29937,
462,
462,
1678,
30392,
235,
170,
135,
31403,
30607,
30214,
30622,
30685,
30502,
31125,
30354,
30392,
235,
170,
135,
31403,
31333,
31888,
30267,
29898,
30785,
30406,
12198,
30666,
31859,
29897,
13,
29937,
13,
29937,
29946,
584,
29871,
232,
147,
174,
31349,
29901,
13,
29937,
12,
236,
165,
135,
30495,
31349,
31415,
31349,
30578,
31277,
30893,
30383,
1346,
29905,
29881,
30024,
29871,
1346,
29905,
29893,
30024,
1346,
29905,
29879,
30024,
29871,
31184,
31184,
30214,
232,
177,
134,
31381,
30392,
30651,
30578,
31277,
30010,
29905,
30010,
31026,
31584,
30214,
30822,
30806,
31092,
30287,
30502,
31141,
30495,
13,
29937,
13,
29937,
30578,
31277,
30210,
31305,
30607,
29892,
30406,
30805,
31084,
30858,
30287,
30502,
236,
165,
135,
30495,
31349,
31076,
30210,
232,
147,
174,
31349,
13,
29937,
13,
29937,
12,
30086,
29985,
30010,
259,
30503,
30010,
29938,
30010,
29871,
232,
143,
188,
31361,
30578,
31277,
31767,
31026,
31584,
30503,
31320,
31631,
13,
29937,
12,
30086,
16412,
268,
232,
143,
188,
31361,
30744,
30417,
30578,
31277,
29871,
31152,
29905,
29876,
30651,
31066,
13,
29937,
12,
30086,
29905,
29881,
30010,
259,
232,
143,
188,
31361,
30354,
30578,
13,
29937,
12,
30086,
29905,
29928,
30010,
259,
232,
143,
188,
31361,
31838,
30354,
30578,
13,
29937,
12,
30086,
29905,
29893,
30010,
259,
232,
143,
188,
31361,
30578,
31763,
30503,
30354,
30578,
13,
29937,
12,
30086,
29905,
29956,
30010,
259,
232,
143,
188,
31361,
31838,
31144,
30333,
30578,
31763,
30503,
30354,
30578,
13,
29937,
12,
30086,
29905,
29879,
30010,
1678,
232,
143,
188,
31361,
31016,
236,
157,
151,
31277,
13,
29937,
12,
30086,
29905,
29903,
30010,
1678,
232,
143,
188,
31361,
31838,
31016,
236,
157,
151,
31277,
13,
29937,
12,
30086,
29905,
29909,
30010,
259,
232,
143,
188,
31361,
30578,
31277,
31767,
31026,
31584,
13,
29937,
12,
30086,
29905,
29999,
30010,
259,
232,
143,
188,
31361,
30578,
31277,
31767,
31320,
31631,
13,
29937,
12,
30086,
29905,
29890,
30010,
259,
31557,
30406,
30651,
232,
143,
188,
31361,
31166,
235,
178,
144,
30210,
235,
178,
144,
31688,
30503,
235,
178,
144,
31631,
30267,
31166,
235,
178,
144,
31407,
30495,
31349,
30573,
30287,
30502,
30578,
31763,
30354,
30578,
31463,
31025,
30214,
31570,
31389,
235,
178,
144,
31631,
31238,
12,
13,
29937,
13,
29937,
462,
418,
30392,
30406,
30816,
30868,
31277,
31391,
31838,
30578,
31763,
30354,
30578,
31277,
30805,
31062,
30858,
30210,
30267,
29898,
236,
131,
131,
31168,
29897,
13,
29937,
12,
30086,
29905,
29933,
30010,
30214,
232,
177,
134,
30724,
31076,
30980,
320,
29890,
29871,
30990,
31908,
30214,
31557,
30505,
30948,
30658,
30956,
30669,
30413,
30505,
31166,
235,
178,
144,
31993,
30967,
30594,
232,
143,
188,
31361,
30267,
13,
29937,
29945,
29889,
30658,
31331,
30967,
30495,
31267,
30822,
31331,
30967,
30495,
29901,
13,
29937,
12,
30086,
10780,
14065,
30098,
29897,
30010,
29871,
30658,
31331,
30967,
30495,
29901,
233,
142,
175,
30850,
30275,
30010,
30098,
30010,
30690,
30746,
30919,
31841,
31839,
232,
143,
188,
31361,
30210,
30578,
31277,
31767,
30210,
30658,
30806,
31370,
31751,
30544,
31424,
30210,
30578,
31277,
31767,
30267,
13,
29937,
12,
30086,
10780,
29922,
30098,
29897,
30010,
30822,
31331,
30967,
30495,
1678,
584,
233,
142,
175,
30850,
30275,
30210,
30010,
30098,
30010,
30690,
30746,
30919,
31841,
31839,
232,
143,
188,
31361,
30210,
30578,
31277,
31767,
30822,
30806,
31370,
31751,
30544,
31424,
30210,
30578,
31277,
31767,
13,
29937,
12,
30086,
10780,
29966,
29991,
636,
29897,
30010,
30658,
31331,
31838,
30967,
30495,
584,
31557,
30417,
30948,
30919,
31841,
31839,
30210,
30578,
31277,
31767,
30658,
30806,
30413,
30392,
30010,
30098,
30010,
30210,
30728,
31294,
30594,
31979,
232,
143,
188,
31361,
13,
29937,
12,
30086,
10780,
29991,
11410,
30010,
30822,
31331,
31838,
30967,
30495,
29871,
584,
31557,
30417,
30948,
30919,
31841,
31839,
30210,
30578,
31277,
31767,
30822,
30806,
30413,
235,
186,
162,
234,
160,
131,
30010,
30098,
30010,
30728,
31294,
30594,
31979,
232,
143,
188,
31361,
30267,
13,
29937,
29953,
29889,
31263,
30210,
31359,
30346,
31043,
235,
178,
137,
29901,
13,
29937,
12,
30086,
29898,
30086,
30010,
29897,
30010,
462,
259,
31352,
31237,
30548,
31263,
462,
1678,
518,
29874,
29899,
29920,
10062,
1194,
29881,
29974,
9601,
29874,
29899,
29920,
10062,
13,
29937,
12,
30086,
10780,
29925,
29966,
978,
29958,
30098,
29897,
30010,
268,
31237,
30548,
31263,
462,
1678,
22308,
29925,
29966,
29887,
29896,
24566,
29874,
29899,
29920,
10062,
2144,
29881,
29974,
10780,
29925,
29922,
29887,
29896,
29897,
13,
29937,
12,
30086,
10780,
29925,
29922,
978,
29897,
30010,
29871,
31268,
30406,
31290,
232,
143,
188,
31361,
30210,
31237,
30548,
31263,
13,
29937,
12,
30086,
29905,
4537,
30010,
30768,
31138,
31463,
30850,
31268,
30406,
31290,
232,
143,
188,
31361,
30210,
31263,
30724,
31403,
30607,
30275,
30210,
31951,
30502,
31263,
30769,
30417,
30287,
30502,
31463,
30850,
30214,
31463,
30850,
30392,
31590,
31263,
13,
29937,
13,
29937,
31594,
31651,
30780,
31803,
30214,
31594,
29896,
31026,
31020,
30210,
30354,
30578,
30214,
30919,
30682,
30651,
30768,
31138,
30557,
30806,
30210,
31305,
30607,
30805,
31268,
30406,
31290,
232,
143,
188,
31361,
30210,
31263,
13,
29937,
12,
462,
4706,
12,
12,
632,
313,
364,
29908,
1194,
29881,
28135,
4197,
29874,
29899,
29920,
10062,
29897,
1194,
29881,
28135,
1194,
29906,
29897,
1194,
29896,
5513,
1723,
1678,
13,
5215,
10876,
13,
28120,
29898,
9675,
29897,
13,
9675,
29889,
842,
4381,
22331,
877,
9420,
29899,
29947,
1495,
13,
13,
5215,
18178,
8226,
924,
29562,
408,
20371,
13,
29937,
29871,
30724,
31403,
30746,
31798,
30607,
13,
5215,
337,
13,
710,
29896,
353,
376,
10736,
2474,
29871,
29896,
29906,
29941,
29871,
29946,
29945,
29953,
29908,
13,
2158,
337,
29889,
2886,
497,
703,
1966,
1966,
613,
710,
29896,
29897,
29871,
396,
29871,
30413,
30406,
29878,
30503,
30406,
29878,
30210,
30467,
13,
2158,
337,
29889,
2886,
497,
29898,
29878,
26732,
29881,
29905,
29999,
613,
710,
29896,
29897,
396,
29871,
30406,
29908,
29878,
29908,
30805,
30495,
31349,
235,
170,
135,
31403,
30578,
31277,
31767,
13,
13,
29886,
353,
337,
29889,
12198,
877,
29898,
29874,
29897,
29890,
1495,
13,
29885,
353,
282,
29889,
4352,
877,
370,
1495,
13,
2158,
286,
29889,
2972,
580,
13,
13,
29879,
353,
376,
7340,
29874,
29896,
29871,
29906,
29906,
20775,
29871,
29941,
29941,
29941,
274,
617,
29871,
29946,
29946,
29946,
29946,
282,
407,
29886,
29871,
29945,
29945,
29945,
29945,
29945,
29871,
29953,
29953,
29953,
29908,
13,
2158,
337,
29889,
2886,
497,
29898,
29878,
26732,
29890,
29905,
29881,
29912,
29941,
1012,
29890,
613,
29879,
29897,
13,
2158,
337,
29889,
2886,
497,
29898,
29878,
26732,
29890,
29905,
29881,
29912,
29906,
29892,
29946,
1012,
29890,
613,
29879,
29897,
13,
13,
29879,
29906,
353,
376,
7340,
29874,
29896,
29896,
29896,
7340,
29874,
1919,
289,
1327,
29906,
29906,
29906,
1919,
29871,
29941,
29941,
29941,
26854,
29908,
13,
2158,
337,
29889,
2886,
497,
29898,
364,
29908,
10780,
29966,
11759,
29874,
29899,
29920,
10062,
2144,
29881,
29974,
10780,
11759,
29874,
29899,
29920,
10062,
19123,
29879,
29906,
1723,
13,
2158,
337,
29889,
2886,
497,
29898,
364,
26732,
29881,
29974,
10780,
11759,
29874,
29899,
29920,
10062,
19123,
29879,
29906,
1723,
13,
2277,
29871,
30895,
31062,
29871,
30658,
30806,
30392,
29874,
29899,
29920,
29871,
29896,
29899,
30923,
30936,
30330,
30275,
31016,
30354,
30578,
29896,
29899,
29929,
29871,
29896,
29899,
30923,
30936,
13,
2158,
337,
29889,
2886,
497,
29898,
29878,
26732,
29881,
29974,
10780,
9903,
29893,
29974,
19123,
29879,
29906,
29897,
13,
29937,
31352,
31237,
30548,
31263,
13,
2158,
337,
29889,
2886,
497,
29898,
29878,
29908,
29961,
29874,
29899,
29920,
10062,
1194,
29881,
29974,
9601,
29874,
29899,
29920,
10062,
613,
29879,
29906,
29897,
396,
29871,
31557,
31086,
30742,
580,
30755,
30806,
30210,
13,
29879,
29941,
353,
525,
7340,
29874,
29896,
29896,
29896,
7340,
29874,
29892,
1327,
29890,
29906,
29906,
29906,
29892,
29941,
29941,
29941,
26854,
29892,
29946,
29946,
29946,
1289,
29881,
29946,
29946,
29946,
29892,
29945,
29945,
29945,
3905,
29872,
29953,
29953,
29953,
29892,
18725,
29955,
29955,
29955,
1505,
29887,
29892,
25446,
29882,
29947,
29947,
29947,
25446,
29882,
29915,
13,
2158,
337,
29889,
2886,
497,
29898,
29878,
29908,
4197,
29874,
29899,
29920,
10062,
2144,
29881,
29974,
4197,
29874,
29899,
29920,
10062,
19123,
29879,
29941,
29897,
396,
31086,
30742,
233,
142,
175,
30850,
30755,
30806,
30210,
13,
29937,
30086,
10780,
29925,
29966,
978,
29958,
30098,
29897,
30010,
29871,
31237,
30548,
31263,
13,
2158,
337,
29889,
2886,
497,
29898,
364,
29908,
10780,
29925,
29966,
29887,
29896,
24566,
29874,
29899,
29920,
10062,
2144,
29881,
29974,
10780,
29925,
29922,
29887,
29896,
19123,
29879,
29941,
1723,
396,
233,
140,
193,
30544,
31407,
30275,
31016,
232,
167,
188,
30417,
30354,
30578,
30210,
30658,
30822,
30980,
31819,
30210,
30578,
31763,
13,
2158,
337,
29889,
2886,
497,
29898,
29878,
29908,
4197,
29874,
29899,
29920,
10062,
2144,
29881,
3124,
29896,
613,
29879,
29941,
29897,
13,
29879,
29946,
353,
376,
29896,
29896,
29896,
7340,
29874,
29906,
29906,
29906,
7340,
29874,
29896,
29896,
29896,
29892,
29941,
29941,
29941,
1327,
29890,
29946,
29946,
29946,
1327,
29941,
29941,
29908,
13,
2158,
337,
29889,
2886,
497,
29898,
364,
29908,
1194,
29881,
28135,
4197,
29874,
29899,
29920,
10062,
29897,
1194,
29881,
28135,
1194,
29906,
29897,
1194,
29896,
19123,
269,
29946,
1723,
396,
30354,
30578,
30330,
30578,
31763,
30330,
30354,
30578,
30330,
30578,
31763,
30330,
30354,
30578,
30990,
30783,
31685,
13,
2158,
337,
29889,
12198,
29898,
29878,
29908,
1194,
29881,
28135,
4197,
29874,
29899,
29920,
10062,
29897,
1194,
29881,
28135,
1194,
29906,
29897,
1194,
29896,
29897,
2564,
2886,
497,
29898,
29879,
29946,
29897,
13,
13,
29937,
12198,
29898,
5751,
518,
29892,
15581,
29962,
1723,
29871,
30785,
30406,
12198,
30666,
31859,
13,
29879,
29945,
353,
376,
29896,
29896,
29896,
29892,
29906,
29906,
29906,
29892,
7340,
29874,
29892,
1327,
29890,
29892,
26854,
29941,
29941,
29941,
29892,
29946,
29946,
29946,
1289,
29881,
29908,
13,
2158,
337,
29889,
12198,
29898,
29878,
26732,
29881,
3124,
29890,
2564,
2886,
497,
29898,
29879,
29945,
29897,
396,
320,
236,
131,
131,
31168,
29871,
232,
143,
188,
31361,
30287,
30502,
30956,
30909,
31026,
31584,
30210,
30354,
30578,
30214,
31423,
30417,
30785,
30406,
29924,
31333,
31888,
13,
13,
29879,
29953,
353,
376,
29896,
29906,
29941,
29871,
29946,
29945,
29953,
29905,
29876,
29955,
29947,
29929,
29871,
29900,
29896,
29906,
29905,
29876,
29941,
29946,
29945,
29871,
29953,
29955,
29947,
29908,
13,
2158,
337,
29889,
12198,
29898,
29878,
29908,
3823,
29881,
29974,
613,
276,
29889,
29924,
467,
2886,
497,
29898,
29879,
29953,
29897,
396,
29871,
232,
143,
188,
31361,
30956,
30909,
29898,
29924,
29914,
30923,
30448,
29897,
31026,
31584,
30210,
30354,
30578,
13,
13,
2214,
29885,
29922,
276,
29889,
12198,
29898,
29878,
26732,
29881,
24035,
1159,
29937,
29871,
30783,
30909,
30010,
29938,
30010,
30805,
31639,
30214,
31423,
30417,
30785,
30406,
29924,
31333,
31888,
30214,
232,
177,
134,
30998,
232,
143,
188,
31361,
30878,
30822,
30287,
30502,
30448,
31631,
30210,
30354,
30578,
30214,
232,
144,
182,
30010,
29953,
29955,
29947,
30010,
30214,
30666,
30429,
30651,
30822,
30214,
31238,
30815,
232,
143,
188,
31361,
30457,
30502,
30448,
31631,
30210,
30354,
30578,
29946,
29945,
29953,
29871,
29900,
29896,
29906,
30503,
29953,
29955,
29947,
30743,
29889,
13,
2158,
337,
29889,
12198,
29898,
29878,
26732,
29881,
24035,
613,
276,
29889,
29924,
467,
2886,
497,
29898,
29879,
29953,
29897,
396,
29871,
13,
13,
13,
13,
13,
13,
13,
13,
2
] |
instagram/admin.py | James19stack/instagram-copy_cat | 0 | 4868 | <reponame>James19stack/instagram-copy_cat<filename>instagram/admin.py
from django.contrib import admin
from .models import Images,Comments,Profile
# Register your models here.
class CommentInline(admin.TabularInline):
model=Comments
extra=3
class ImageInline(admin.ModelAdmin):
fieldsets=[
(None,{'fields':['image']}),
(None,{'fields':['image_name']}),
(None,{'fields':['image_caption']}),
(None,{'fields':['likes']}),
]
inlines=[CommentInline]
admin.site.site_header='InstaPost Admin'
admin.site.site_title='InstaPost Admin Dashboard'
admin.site.register(Images,ImageInline)
admin.site.register(Profile)
| [
1,
529,
276,
1112,
420,
29958,
29470,
29896,
29929,
1429,
29914,
2611,
14442,
29899,
8552,
29918,
4117,
29966,
9507,
29958,
2611,
14442,
29914,
6406,
29889,
2272,
13,
3166,
9557,
29889,
21570,
1053,
4113,
13,
3166,
869,
9794,
1053,
1954,
1179,
29892,
1523,
1860,
29892,
13909,
13,
29937,
12577,
596,
4733,
1244,
29889,
13,
13,
1990,
461,
797,
1220,
29898,
6406,
29889,
8863,
1070,
797,
1220,
1125,
13,
1678,
1904,
29922,
1523,
1860,
13,
1678,
4805,
29922,
29941,
13,
268,
13,
1990,
7084,
797,
1220,
29898,
6406,
29889,
3195,
12754,
1125,
13,
1678,
1746,
7224,
11759,
13,
4706,
313,
8516,
29892,
10998,
9621,
2396,
1839,
3027,
2033,
9594,
13,
4706,
313,
8516,
29892,
10998,
9621,
2396,
1839,
3027,
29918,
978,
2033,
9594,
13,
4706,
313,
8516,
29892,
10998,
9621,
2396,
1839,
3027,
29918,
6671,
2033,
9594,
13,
4706,
313,
8516,
29892,
10998,
9621,
2396,
1839,
5081,
267,
2033,
9594,
13,
1678,
4514,
13,
1678,
297,
9012,
11759,
20001,
797,
1220,
29962,
13,
268,
13,
268,
13,
6406,
29889,
2746,
29889,
2746,
29918,
6672,
2433,
3379,
29874,
6747,
10229,
29915,
13,
6406,
29889,
2746,
29889,
2746,
29918,
3257,
2433,
3379,
29874,
6747,
10229,
360,
1161,
3377,
29915,
13,
13,
6406,
29889,
2746,
29889,
9573,
29898,
20163,
29892,
2940,
797,
1220,
29897,
13,
6406,
29889,
2746,
29889,
9573,
29898,
13909,
29897,
13,
13,
2
] |
tests/sentry/event_manager/interfaces/test_debug_meta.py | uandco/sentry | 2 | 67931 | <filename>tests/sentry/event_manager/interfaces/test_debug_meta.py
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import pytest
from sentry.models import Event
from sentry.event_manager import EventManager
@pytest.fixture
def make_debug_meta_snapshot(insta_snapshot):
def inner(data):
mgr = EventManager(data={"debug_meta": data})
mgr.normalize()
evt = Event(data=mgr.get_data())
interface = evt.interfaces.get('debug_meta')
insta_snapshot({
'errors': evt.data.get('errors'),
'to_json': interface and interface.to_json()
})
return inner
@pytest.mark.parametrize('input', [
{},
{"images": None},
# TODO(markus): Should eventually generate {"images": [None]}
{"images": [None]},
])
def test_null_values(make_debug_meta_snapshot, input):
make_debug_meta_snapshot(input)
def test_apple_behavior(make_debug_meta_snapshot):
image_name = (
'/var/containers/Bundle/Application/'
'B33C37A8-F933-4B6B-9FFA-152282BFDF13/SentryTest.app/SentryTest'
)
make_debug_meta_snapshot(
{
"images": [
{
"type": "apple",
"cpu_subtype": 0,
"uuid": "C05B4DDD-69A7-3840-A649-32180D341587",
"image_vmaddr": 4294967296,
"image_addr": '0x100020000',
"cpu_type": 16777228,
"image_size": 32768,
"name": image_name,
}
],
"sdk_info": {
"sdk_name": "iOS",
"version_major": 9,
"version_minor": 3,
"version_patchlevel": 0
}
}
)
def test_apple_behavior_with_arch(make_debug_meta_snapshot):
image_name = (
'/var/containers/Bundle/Application/'
'B33C37A8-F933-4B6B-9FFA-152282BFDF13/SentryTest.app/SentryTest'
)
make_debug_meta_snapshot(
{
"images": [
{
"type": "apple",
"arch": "x86_64",
"cpu_subtype": 0,
"uuid": "C05B4DDD-69A7-3840-A649-32180D341587",
"image_vmaddr": 4294967296,
"image_addr": '0x100020000',
"cpu_type": 16777228,
"image_size": 32768,
"name": image_name,
}
],
"sdk_info": {
"sdk_name": "iOS",
"version_major": 9,
"version_minor": 3,
"version_patchlevel": 0
}
}
)
def test_symbolic_behavior(make_debug_meta_snapshot):
make_debug_meta_snapshot(
{
"images": [
{
"type": "symbolic",
"id": "3249d99d-0c40-4931-8610-f4e4fb0b6936-1",
"image_addr": 2752512,
"image_size": 36864,
"name": "C:\\projects\\breakpad-tools\\windows\\Release\\crash.exe",
}
],
"sdk_info": {
"sdk_name": "Windows",
"version_major": 10,
"version_minor": 0,
"version_patchlevel": 14393
}
}
)
def test_symbolic_behavior_with_arch(make_debug_meta_snapshot):
make_debug_meta_snapshot(
{
"images": [
{
"type": "symbolic",
"arch": "x86",
"id": "3249d99d-0c40-4931-8610-f4e4fb0b6936-1",
"image_addr": 2752512,
"image_size": 36864,
"name": "C:\\projects\\breakpad-tools\\windows\\Release\\crash.exe",
}
],
"sdk_info": {
"sdk_name": "Windows",
"version_major": 10,
"version_minor": 0,
"version_patchlevel": 14393
}
}
)
def test_proguard_behavior(make_debug_meta_snapshot):
make_debug_meta_snapshot(
{
"images": [{
"type": "proguard",
"uuid": "C05B4DDD-69A7-3840-A649-32180D341587",
}]
}
)
| [
1,
529,
9507,
29958,
21150,
29914,
29879,
8269,
29914,
3696,
29918,
12847,
29914,
1639,
8726,
29914,
1688,
29918,
8382,
29918,
7299,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
13,
13,
5215,
11451,
1688,
13,
13,
3166,
2665,
719,
29889,
9794,
1053,
6864,
13,
3166,
2665,
719,
29889,
3696,
29918,
12847,
1053,
6864,
3260,
13,
13,
13,
29992,
2272,
1688,
29889,
7241,
15546,
13,
1753,
1207,
29918,
8382,
29918,
7299,
29918,
29879,
14551,
29898,
2611,
29874,
29918,
29879,
14551,
1125,
13,
1678,
822,
6426,
29898,
1272,
1125,
13,
4706,
286,
629,
353,
6864,
3260,
29898,
1272,
3790,
29908,
8382,
29918,
7299,
1115,
848,
1800,
13,
4706,
286,
629,
29889,
8945,
675,
580,
13,
4706,
3415,
29873,
353,
6864,
29898,
1272,
29922,
29885,
629,
29889,
657,
29918,
1272,
3101,
13,
4706,
5067,
353,
3415,
29873,
29889,
1639,
8726,
29889,
657,
877,
8382,
29918,
7299,
1495,
13,
4706,
832,
29874,
29918,
29879,
14551,
3319,
13,
9651,
525,
12523,
2396,
3415,
29873,
29889,
1272,
29889,
657,
877,
12523,
5477,
13,
9651,
525,
517,
29918,
3126,
2396,
5067,
322,
5067,
29889,
517,
29918,
3126,
580,
13,
4706,
5615,
13,
13,
1678,
736,
6426,
13,
13,
13,
29992,
2272,
1688,
29889,
3502,
29889,
3207,
300,
374,
911,
877,
2080,
742,
518,
13,
1678,
24335,
13,
1678,
8853,
8346,
1115,
6213,
1118,
13,
1678,
396,
14402,
29898,
3502,
375,
1125,
10575,
10201,
5706,
8853,
8346,
1115,
518,
8516,
12258,
13,
1678,
8853,
8346,
1115,
518,
8516,
29962,
1118,
13,
2314,
13,
1753,
1243,
29918,
4304,
29918,
5975,
29898,
5675,
29918,
8382,
29918,
7299,
29918,
29879,
14551,
29892,
1881,
1125,
13,
1678,
1207,
29918,
8382,
29918,
7299,
29918,
29879,
14551,
29898,
2080,
29897,
13,
13,
13,
1753,
1243,
29918,
11548,
29918,
915,
16300,
29898,
5675,
29918,
8382,
29918,
7299,
29918,
29879,
14551,
1125,
13,
1678,
1967,
29918,
978,
353,
313,
13,
4706,
8207,
1707,
29914,
1285,
475,
414,
29914,
9534,
29914,
4873,
22208,
13,
4706,
525,
29933,
29941,
29941,
29907,
29941,
29955,
29909,
29947,
29899,
29943,
29929,
29941,
29941,
29899,
29946,
29933,
29953,
29933,
29899,
29929,
4198,
29909,
29899,
29896,
29945,
29906,
29906,
29947,
29906,
28062,
4037,
29896,
29941,
29914,
29903,
8269,
3057,
29889,
932,
29914,
29903,
8269,
3057,
29915,
13,
1678,
1723,
13,
1678,
1207,
29918,
8382,
29918,
7299,
29918,
29879,
14551,
29898,
13,
4706,
426,
13,
9651,
376,
8346,
1115,
518,
13,
18884,
426,
13,
462,
1678,
376,
1853,
1115,
376,
11548,
613,
13,
462,
1678,
376,
21970,
29918,
1491,
1853,
1115,
29871,
29900,
29892,
13,
462,
1678,
376,
25118,
1115,
376,
29907,
29900,
29945,
29933,
29946,
7858,
29928,
29899,
29953,
29929,
29909,
29955,
29899,
29941,
29947,
29946,
29900,
29899,
29909,
29953,
29946,
29929,
29899,
29941,
29906,
29896,
29947,
29900,
29928,
29941,
29946,
29896,
29945,
29947,
29955,
613,
13,
462,
1678,
376,
3027,
29918,
6925,
10030,
1115,
29871,
29946,
29906,
29929,
29946,
29929,
29953,
29955,
29906,
29929,
29953,
29892,
13,
462,
1678,
376,
3027,
29918,
10030,
1115,
525,
29900,
29916,
29896,
29900,
29900,
29900,
29906,
29900,
29900,
29900,
29900,
742,
13,
462,
1678,
376,
21970,
29918,
1853,
1115,
29871,
29896,
29953,
29955,
29955,
29955,
29906,
29906,
29947,
29892,
13,
462,
1678,
376,
3027,
29918,
2311,
1115,
29871,
29941,
29906,
29955,
29953,
29947,
29892,
13,
462,
1678,
376,
978,
1115,
1967,
29918,
978,
29892,
13,
18884,
500,
13,
9651,
21251,
13,
9651,
376,
15348,
29918,
3888,
1115,
426,
13,
18884,
376,
15348,
29918,
978,
1115,
376,
29875,
3267,
613,
13,
18884,
376,
3259,
29918,
21355,
1115,
29871,
29929,
29892,
13,
18884,
376,
3259,
29918,
1195,
272,
1115,
29871,
29941,
29892,
13,
18884,
376,
3259,
29918,
5041,
5563,
1115,
29871,
29900,
13,
9651,
500,
13,
4706,
500,
13,
1678,
1723,
13,
13,
13,
1753,
1243,
29918,
11548,
29918,
915,
16300,
29918,
2541,
29918,
1279,
29898,
5675,
29918,
8382,
29918,
7299,
29918,
29879,
14551,
1125,
13,
1678,
1967,
29918,
978,
353,
313,
13,
4706,
8207,
1707,
29914,
1285,
475,
414,
29914,
9534,
29914,
4873,
22208,
13,
4706,
525,
29933,
29941,
29941,
29907,
29941,
29955,
29909,
29947,
29899,
29943,
29929,
29941,
29941,
29899,
29946,
29933,
29953,
29933,
29899,
29929,
4198,
29909,
29899,
29896,
29945,
29906,
29906,
29947,
29906,
28062,
4037,
29896,
29941,
29914,
29903,
8269,
3057,
29889,
932,
29914,
29903,
8269,
3057,
29915,
13,
1678,
1723,
13,
1678,
1207,
29918,
8382,
29918,
7299,
29918,
29879,
14551,
29898,
13,
4706,
426,
13,
9651,
376,
8346,
1115,
518,
13,
18884,
426,
13,
462,
1678,
376,
1853,
1115,
376,
11548,
613,
13,
462,
1678,
376,
1279,
1115,
376,
29916,
29947,
29953,
29918,
29953,
29946,
613,
13,
462,
1678,
376,
21970,
29918,
1491,
1853,
1115,
29871,
29900,
29892,
13,
462,
1678,
376,
25118,
1115,
376,
29907,
29900,
29945,
29933,
29946,
7858,
29928,
29899,
29953,
29929,
29909,
29955,
29899,
29941,
29947,
29946,
29900,
29899,
29909,
29953,
29946,
29929,
29899,
29941,
29906,
29896,
29947,
29900,
29928,
29941,
29946,
29896,
29945,
29947,
29955,
613,
13,
462,
1678,
376,
3027,
29918,
6925,
10030,
1115,
29871,
29946,
29906,
29929,
29946,
29929,
29953,
29955,
29906,
29929,
29953,
29892,
13,
462,
1678,
376,
3027,
29918,
10030,
1115,
525,
29900,
29916,
29896,
29900,
29900,
29900,
29906,
29900,
29900,
29900,
29900,
742,
13,
462,
1678,
376,
21970,
29918,
1853,
1115,
29871,
29896,
29953,
29955,
29955,
29955,
29906,
29906,
29947,
29892,
13,
462,
1678,
376,
3027,
29918,
2311,
1115,
29871,
29941,
29906,
29955,
29953,
29947,
29892,
13,
462,
1678,
376,
978,
1115,
1967,
29918,
978,
29892,
13,
18884,
500,
13,
9651,
21251,
13,
9651,
376,
15348,
29918,
3888,
1115,
426,
13,
18884,
376,
15348,
29918,
978,
1115,
376,
29875,
3267,
613,
13,
18884,
376,
3259,
29918,
21355,
1115,
29871,
29929,
29892,
13,
18884,
376,
3259,
29918,
1195,
272,
1115,
29871,
29941,
29892,
13,
18884,
376,
3259,
29918,
5041,
5563,
1115,
29871,
29900,
13,
9651,
500,
13,
4706,
500,
13,
1678,
1723,
13,
13,
13,
1753,
1243,
29918,
18098,
293,
29918,
915,
16300,
29898,
5675,
29918,
8382,
29918,
7299,
29918,
29879,
14551,
1125,
13,
1678,
1207,
29918,
8382,
29918,
7299,
29918,
29879,
14551,
29898,
13,
4706,
426,
13,
9651,
376,
8346,
1115,
518,
13,
18884,
426,
13,
462,
1678,
376,
1853,
1115,
376,
18098,
293,
613,
13,
462,
1678,
376,
333,
1115,
376,
29941,
29906,
29946,
29929,
29881,
29929,
29929,
29881,
29899,
29900,
29883,
29946,
29900,
29899,
29946,
29929,
29941,
29896,
29899,
29947,
29953,
29896,
29900,
29899,
29888,
29946,
29872,
29946,
14943,
29900,
29890,
29953,
29929,
29941,
29953,
29899,
29896,
613,
13,
462,
1678,
376,
3027,
29918,
10030,
1115,
29871,
29906,
29955,
29945,
29906,
29945,
29896,
29906,
29892,
13,
462,
1678,
376,
3027,
29918,
2311,
1115,
29871,
29941,
29953,
29947,
29953,
29946,
29892,
13,
462,
1678,
376,
978,
1115,
376,
29907,
22298,
16418,
1966,
8690,
8305,
29899,
8504,
1966,
10499,
1966,
19729,
1966,
7283,
1161,
29889,
8097,
613,
13,
18884,
500,
13,
9651,
21251,
13,
9651,
376,
15348,
29918,
3888,
1115,
426,
13,
18884,
376,
15348,
29918,
978,
1115,
376,
7685,
613,
13,
18884,
376,
3259,
29918,
21355,
1115,
29871,
29896,
29900,
29892,
13,
18884,
376,
3259,
29918,
1195,
272,
1115,
29871,
29900,
29892,
13,
18884,
376,
3259,
29918,
5041,
5563,
1115,
29871,
29896,
29946,
29941,
29929,
29941,
13,
9651,
500,
13,
4706,
500,
13,
1678,
1723,
13,
13,
13,
1753,
1243,
29918,
18098,
293,
29918,
915,
16300,
29918,
2541,
29918,
1279,
29898,
5675,
29918,
8382,
29918,
7299,
29918,
29879,
14551,
1125,
13,
1678,
1207,
29918,
8382,
29918,
7299,
29918,
29879,
14551,
29898,
13,
4706,
426,
13,
9651,
376,
8346,
1115,
518,
13,
18884,
426,
13,
462,
1678,
376,
1853,
1115,
376,
18098,
293,
613,
13,
462,
1678,
376,
1279,
1115,
376,
29916,
29947,
29953,
613,
13,
462,
1678,
376,
333,
1115,
376,
29941,
29906,
29946,
29929,
29881,
29929,
29929,
29881,
29899,
29900,
29883,
29946,
29900,
29899,
29946,
29929,
29941,
29896,
29899,
29947,
29953,
29896,
29900,
29899,
29888,
29946,
29872,
29946,
14943,
29900,
29890,
29953,
29929,
29941,
29953,
29899,
29896,
613,
13,
462,
1678,
376,
3027,
29918,
10030,
1115,
29871,
29906,
29955,
29945,
29906,
29945,
29896,
29906,
29892,
13,
462,
1678,
376,
3027,
29918,
2311,
1115,
29871,
29941,
29953,
29947,
29953,
29946,
29892,
13,
462,
1678,
376,
978,
1115,
376,
29907,
22298,
16418,
1966,
8690,
8305,
29899,
8504,
1966,
10499,
1966,
19729,
1966,
7283,
1161,
29889,
8097,
613,
13,
18884,
500,
13,
9651,
21251,
13,
9651,
376,
15348,
29918,
3888,
1115,
426,
13,
18884,
376,
15348,
29918,
978,
1115,
376,
7685,
613,
13,
18884,
376,
3259,
29918,
21355,
1115,
29871,
29896,
29900,
29892,
13,
18884,
376,
3259,
29918,
1195,
272,
1115,
29871,
29900,
29892,
13,
18884,
376,
3259,
29918,
5041,
5563,
1115,
29871,
29896,
29946,
29941,
29929,
29941,
13,
9651,
500,
13,
4706,
500,
13,
1678,
1723,
13,
13,
13,
1753,
1243,
29918,
771,
17728,
29918,
915,
16300,
29898,
5675,
29918,
8382,
29918,
7299,
29918,
29879,
14551,
1125,
13,
1678,
1207,
29918,
8382,
29918,
7299,
29918,
29879,
14551,
29898,
13,
4706,
426,
13,
9651,
376,
8346,
1115,
15974,
13,
18884,
376,
1853,
1115,
376,
771,
17728,
613,
13,
18884,
376,
25118,
1115,
376,
29907,
29900,
29945,
29933,
29946,
7858,
29928,
29899,
29953,
29929,
29909,
29955,
29899,
29941,
29947,
29946,
29900,
29899,
29909,
29953,
29946,
29929,
29899,
29941,
29906,
29896,
29947,
29900,
29928,
29941,
29946,
29896,
29945,
29947,
29955,
613,
13,
9651,
500,
29962,
13,
4706,
500,
13,
1678,
1723,
13,
2
] |
wsgi.py | nadeengamage/flaskee | 0 | 41200 | """
The Flaskee is an Open Source project for Microservices.
Develop By <NAME> | https://nadeengamage.com | <EMAIL>
"""
from werkzeug.serving import run_simple
from werkzeug.middleware.dispatcher import DispatcherMiddleware
from flaskee import api
app = api.create_app()
application = DispatcherMiddleware(app)
if __name__ == "__main__":
run_simple('0.0.0.0', 5000, application, use_reloader=True, use_debugger=True)
| [
1,
9995,
13,
1576,
2379,
294,
23137,
338,
385,
4673,
7562,
2060,
363,
20140,
9916,
29889,
13,
21956,
2648,
529,
5813,
29958,
891,
2045,
597,
1056,
311,
996,
314,
482,
29889,
510,
891,
529,
26862,
6227,
29958,
13,
15945,
29908,
13,
13,
3166,
23085,
13289,
29889,
643,
1747,
1053,
1065,
29918,
12857,
13,
3166,
23085,
13289,
29889,
17662,
2519,
29889,
13369,
261,
1053,
3295,
5041,
261,
25411,
2519,
13,
13,
3166,
1652,
294,
23137,
1053,
7882,
13,
13,
932,
353,
7882,
29889,
3258,
29918,
932,
580,
13,
13,
6214,
353,
3295,
5041,
261,
25411,
2519,
29898,
932,
29897,
13,
13,
361,
4770,
978,
1649,
1275,
376,
1649,
3396,
1649,
1115,
13,
1678,
1065,
29918,
12857,
877,
29900,
29889,
29900,
29889,
29900,
29889,
29900,
742,
29871,
29945,
29900,
29900,
29900,
29892,
2280,
29892,
671,
29918,
276,
12657,
29922,
5574,
29892,
671,
29918,
8382,
914,
29922,
5574,
29897,
13,
268,
2
] |
flink-libraries/flink-streaming-python/src/test/python/org/apache/flink/streaming/python/api/utils/pygeneratorbase.py | Silven1117/flink | 9 | 115211 | ################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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 org.apache.flink.streaming.api.functions.source import SourceFunction
class PyGeneratorBase(SourceFunction):
def __init__(self, num_iters=7000):
self._running = True
self._num_iters = num_iters
def run(self, ctx):
counter = 0
while self._running and counter < self._num_iters:
self.do(ctx)
counter += 1
def do(self, ctx):
pass
def cancel(self):
self._running = False
| [
1,
835,
13383,
13383,
13383,
13383,
7346,
4136,
29937,
13,
29937,
29871,
10413,
21144,
304,
278,
13380,
18540,
10606,
313,
3289,
29943,
29897,
1090,
697,
13,
29937,
29871,
470,
901,
17737,
3406,
19405,
8571,
4110,
29889,
29871,
2823,
278,
6058,
12107,
934,
13,
29937,
29871,
13235,
411,
445,
664,
363,
5684,
2472,
13,
29937,
29871,
11211,
3509,
1266,
27428,
29889,
29871,
450,
3339,
29943,
7794,
11259,
445,
934,
13,
29937,
29871,
304,
366,
1090,
278,
13380,
19245,
29892,
10079,
29871,
29906,
29889,
29900,
313,
1552,
13,
29937,
29871,
376,
29931,
293,
1947,
1496,
366,
1122,
451,
671,
445,
934,
5174,
297,
752,
13036,
13,
29937,
29871,
411,
278,
19245,
29889,
29871,
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,
29871,
25870,
3734,
491,
22903,
4307,
470,
15502,
304,
297,
5007,
29892,
7047,
13,
29937,
29871,
13235,
1090,
278,
19245,
338,
13235,
373,
385,
376,
3289,
8519,
29908,
350,
3289,
3235,
29892,
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,
29889,
13,
29937,
29871,
2823,
278,
19245,
363,
278,
2702,
4086,
14765,
1076,
11239,
322,
13,
29937,
27028,
1090,
278,
19245,
29889,
13,
13383,
13383,
13383,
13383,
13383,
13,
3166,
1638,
29889,
4288,
29889,
1579,
682,
29889,
5461,
292,
29889,
2754,
29889,
12171,
29889,
4993,
1053,
7562,
6678,
13,
13,
13,
1990,
10772,
21575,
5160,
29898,
4435,
6678,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
954,
29918,
277,
414,
29922,
29955,
29900,
29900,
29900,
1125,
13,
4706,
1583,
3032,
21094,
353,
5852,
13,
4706,
1583,
3032,
1949,
29918,
277,
414,
353,
954,
29918,
277,
414,
13,
13,
1678,
822,
1065,
29898,
1311,
29892,
12893,
1125,
13,
4706,
6795,
353,
29871,
29900,
13,
4706,
1550,
1583,
3032,
21094,
322,
6795,
529,
1583,
3032,
1949,
29918,
277,
414,
29901,
13,
9651,
1583,
29889,
1867,
29898,
13073,
29897,
13,
9651,
6795,
4619,
29871,
29896,
13,
13,
1678,
822,
437,
29898,
1311,
29892,
12893,
1125,
13,
4706,
1209,
13,
13,
1678,
822,
12611,
29898,
1311,
1125,
13,
4706,
1583,
3032,
21094,
353,
7700,
13,
2
] |
divedownload.py | AmoghRRao/Game-Recommendation-System | 0 | 105365 | <filename>divedownload.py<gh_stars>0
from google_drive_downloader import GoogleDriveDownloader as gdd
gdd.download_file_from_google_drive(file_id='14LXxwldPTV5K1EmrDr-HQc1svBhMKDvT',
dest_path='./similarity.pkl',
unzip=False)
| [
1,
529,
9507,
29958,
29881,
2347,
776,
1359,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
5386,
29918,
21594,
29918,
10382,
261,
1053,
5087,
29928,
4401,
6767,
12657,
408,
330,
1289,
13,
13,
13,
29887,
1289,
29889,
10382,
29918,
1445,
29918,
3166,
29918,
3608,
29918,
21594,
29898,
1445,
29918,
333,
2433,
29896,
29946,
29931,
29990,
29916,
29893,
430,
7982,
29963,
29945,
29968,
29896,
6026,
29878,
25639,
29899,
29950,
29984,
29883,
29896,
4501,
29933,
29882,
29924,
29968,
29928,
29894,
29911,
742,
13,
462,
462,
1678,
2731,
29918,
2084,
2433,
6904,
29764,
537,
29889,
29886,
6321,
742,
13,
462,
462,
1678,
443,
7554,
29922,
8824,
29897,
13,
2
] |
lib/clean_npy.py | L0SG/Liver_segmentation | 0 | 198041 | import skimage
from skimage.measure import label, regionprops
import matplotlib.pyplot as plt
import cv2
import numpy as np
import os
from imageio import imwrite
# following previous labeling method
lesion_class_label = 0
def convert(warped_mask):
bboxes = []
if warped_mask.max() == 1:
mask_contour, _ = cv2.findContours(warped_mask.astype(np.uint8), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
label_slice = label(warped_mask)
props = regionprops(label_slice)
for prop in props:
# additionally construct bbox coordinates format matching miccai2018 notations
x_start, y_start, x_end, y_end = prop.bbox[1], prop.bbox[0], prop.bbox[3], prop.bbox[2]
# use [x_min, y_min, x_max, y_max] type
coordinate = [x_start, y_start, x_end, y_end, lesion_class_label]
# append zero class label for lesion
coordinate.append(lesion_class_label)
bboxes.append(coordinate)
# print(len(props))
else:
bboxes.append(None)
return bboxes
if __name__ == '__main__':
metadata_path = os.path.join('/home/eunji/hdd/eunji/Data/liver_year1_dataset_extended_1904_preprocessed/ml_ready_phaselabel', "metadata.txt")
src_path = '/home/eunji/hdd/eunji/Data/liver_year1_dataset_extended_1904_preprocessed/ml_ready_phaselabel_align'
out_path = '/home/eunji/hdd/eunji/Data/liver_year1_dataset_extended_1904_preprocessed/ml_ready_phaselabel_align_clean'
data = []
with open(metadata_path, 'r') as f:
lines = f.readlines()
for line in lines:
line = line.strip().split("|")
data.append(line[0])
os.makedirs(out_path, exist_ok=True)
for i in range(len(data)):
os.makedirs(os.path.join(out_path, data[i].split('/')[0]), exist_ok=True)
datapoint_name_relative = data[i]
datapoint_name_ct = datapoint_name_relative + '_ct.npy'
datapoint_name_mask = datapoint_name_relative + '_mask.npy'
datapoint_name_bbox = datapoint_name_relative + '_bbox.npy'
if os.path.isfile(os.path.join(src_path, datapoint_name_ct)):
ct_data = np.load(os.path.join(src_path, datapoint_name_ct))
mask_data = np.load(os.path.join(src_path, datapoint_name_mask))
orig_bbox = np.load(
os.path.join('/home/eunji/hdd/eunji/Data/liver_year1_dataset_extended_1904_preprocessed/ml_ready_phaselabel',
datapoint_name_bbox))
else:
continue
ct_data[ct_data < 0] = 0
ct_data[ct_data > 1] = 1
mask_data[mask_data > 0.5] = 1
mask_data[mask_data < 1] = 0
bbox_data = convert(mask_data)
if (len(bbox_data) != orig_bbox.shape[0]):
print("{}: {} -> {}".format(data[i], orig_bbox.shape[0], len(bbox_data)))
np.save(os.path.join(out_path, datapoint_name_ct), ct_data)
np.save(os.path.join(out_path, datapoint_name_mask), mask_data)
np.save(os.path.join(out_path, datapoint_name_bbox), bbox_data)
| [
1,
1053,
2071,
3027,
13,
3166,
2071,
3027,
29889,
26658,
1053,
3858,
29892,
5120,
11030,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
13850,
29906,
13,
5215,
12655,
408,
7442,
13,
5215,
2897,
13,
3166,
1967,
601,
1053,
527,
3539,
13,
13,
29937,
1494,
3517,
3858,
292,
1158,
13,
793,
291,
29918,
1990,
29918,
1643,
353,
29871,
29900,
13,
13,
1753,
3588,
29898,
4495,
9795,
29918,
13168,
1125,
13,
1678,
289,
1884,
267,
353,
5159,
13,
13,
1678,
565,
1370,
9795,
29918,
13168,
29889,
3317,
580,
1275,
29871,
29896,
29901,
13,
4706,
11105,
29918,
1285,
473,
29892,
903,
353,
13850,
29906,
29889,
2886,
1323,
2470,
29898,
4495,
9795,
29918,
13168,
29889,
579,
668,
29898,
9302,
29889,
13470,
29947,
511,
13850,
29906,
29889,
1525,
5659,
29918,
5746,
4945,
29940,
1964,
29892,
13850,
29906,
29889,
3210,
29909,
1177,
29918,
3301,
8618,
29990,
29918,
5425,
3580,
1307,
29897,
13,
13,
4706,
3858,
29918,
18337,
353,
3858,
29898,
4495,
9795,
29918,
13168,
29897,
13,
4706,
17761,
353,
5120,
11030,
29898,
1643,
29918,
18337,
29897,
13,
13,
4706,
363,
3107,
297,
17761,
29901,
13,
9651,
396,
6124,
635,
3386,
289,
1884,
10350,
3402,
9686,
20710,
1113,
29875,
29906,
29900,
29896,
29947,
451,
800,
13,
9651,
921,
29918,
2962,
29892,
343,
29918,
2962,
29892,
921,
29918,
355,
29892,
343,
29918,
355,
353,
3107,
29889,
29890,
1884,
29961,
29896,
1402,
3107,
29889,
29890,
1884,
29961,
29900,
1402,
3107,
29889,
29890,
1884,
29961,
29941,
1402,
3107,
29889,
29890,
1884,
29961,
29906,
29962,
13,
9651,
396,
671,
518,
29916,
29918,
1195,
29892,
343,
29918,
1195,
29892,
921,
29918,
3317,
29892,
343,
29918,
3317,
29962,
1134,
13,
9651,
14821,
353,
518,
29916,
29918,
2962,
29892,
343,
29918,
2962,
29892,
921,
29918,
355,
29892,
343,
29918,
355,
29892,
966,
291,
29918,
1990,
29918,
1643,
29962,
13,
9651,
396,
9773,
5225,
770,
3858,
363,
966,
291,
13,
9651,
14821,
29889,
4397,
29898,
793,
291,
29918,
1990,
29918,
1643,
29897,
13,
9651,
289,
1884,
267,
29889,
4397,
29898,
29302,
29897,
13,
4706,
396,
1596,
29898,
2435,
29898,
11030,
876,
13,
1678,
1683,
29901,
13,
4706,
289,
1884,
267,
29889,
4397,
29898,
8516,
29897,
13,
13,
1678,
736,
289,
1884,
267,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
15562,
29918,
2084,
353,
2897,
29889,
2084,
29889,
7122,
11219,
5184,
29914,
29872,
348,
2397,
29914,
29882,
1289,
29914,
29872,
348,
2397,
29914,
1469,
29914,
14381,
29918,
6360,
29896,
29918,
24713,
29918,
1062,
2760,
29918,
29896,
29929,
29900,
29946,
29918,
1457,
5014,
287,
29914,
828,
29918,
2040,
29918,
16130,
295,
1107,
742,
376,
19635,
29889,
3945,
1159,
13,
1678,
4765,
29918,
2084,
353,
8207,
5184,
29914,
29872,
348,
2397,
29914,
29882,
1289,
29914,
29872,
348,
2397,
29914,
1469,
29914,
14381,
29918,
6360,
29896,
29918,
24713,
29918,
1062,
2760,
29918,
29896,
29929,
29900,
29946,
29918,
1457,
5014,
287,
29914,
828,
29918,
2040,
29918,
16130,
295,
1107,
29918,
2520,
29915,
13,
1678,
714,
29918,
2084,
353,
8207,
5184,
29914,
29872,
348,
2397,
29914,
29882,
1289,
29914,
29872,
348,
2397,
29914,
1469,
29914,
14381,
29918,
6360,
29896,
29918,
24713,
29918,
1062,
2760,
29918,
29896,
29929,
29900,
29946,
29918,
1457,
5014,
287,
29914,
828,
29918,
2040,
29918,
16130,
295,
1107,
29918,
2520,
29918,
14941,
29915,
13,
1678,
848,
353,
5159,
13,
1678,
411,
1722,
29898,
19635,
29918,
2084,
29892,
525,
29878,
1495,
408,
285,
29901,
13,
4706,
3454,
353,
285,
29889,
949,
9012,
580,
13,
4706,
363,
1196,
297,
3454,
29901,
13,
9651,
1196,
353,
1196,
29889,
17010,
2141,
5451,
703,
29989,
1159,
13,
9651,
848,
29889,
4397,
29898,
1220,
29961,
29900,
2314,
13,
1678,
2897,
29889,
29885,
12535,
12935,
29898,
449,
29918,
2084,
29892,
1863,
29918,
554,
29922,
5574,
29897,
13,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
1272,
22164,
13,
4706,
2897,
29889,
29885,
12535,
12935,
29898,
359,
29889,
2084,
29889,
7122,
29898,
449,
29918,
2084,
29892,
848,
29961,
29875,
1822,
5451,
11219,
29861,
29900,
11724,
1863,
29918,
554,
29922,
5574,
29897,
13,
4706,
1418,
481,
2461,
29918,
978,
29918,
22925,
353,
848,
29961,
29875,
29962,
13,
4706,
1418,
481,
2461,
29918,
978,
29918,
312,
353,
1418,
481,
2461,
29918,
978,
29918,
22925,
718,
22868,
312,
29889,
29876,
2272,
29915,
13,
4706,
1418,
481,
2461,
29918,
978,
29918,
13168,
353,
1418,
481,
2461,
29918,
978,
29918,
22925,
718,
22868,
13168,
29889,
29876,
2272,
29915,
13,
4706,
1418,
481,
2461,
29918,
978,
29918,
29890,
1884,
353,
1418,
481,
2461,
29918,
978,
29918,
22925,
718,
22868,
29890,
1884,
29889,
29876,
2272,
29915,
13,
13,
4706,
565,
2897,
29889,
2084,
29889,
275,
1445,
29898,
359,
29889,
2084,
29889,
7122,
29898,
4351,
29918,
2084,
29892,
1418,
481,
2461,
29918,
978,
29918,
312,
22164,
13,
9651,
274,
29873,
29918,
1272,
353,
7442,
29889,
1359,
29898,
359,
29889,
2084,
29889,
7122,
29898,
4351,
29918,
2084,
29892,
1418,
481,
2461,
29918,
978,
29918,
312,
876,
13,
9651,
11105,
29918,
1272,
353,
7442,
29889,
1359,
29898,
359,
29889,
2084,
29889,
7122,
29898,
4351,
29918,
2084,
29892,
1418,
481,
2461,
29918,
978,
29918,
13168,
876,
13,
9651,
1677,
29918,
29890,
1884,
353,
7442,
29889,
1359,
29898,
13,
18884,
2897,
29889,
2084,
29889,
7122,
11219,
5184,
29914,
29872,
348,
2397,
29914,
29882,
1289,
29914,
29872,
348,
2397,
29914,
1469,
29914,
14381,
29918,
6360,
29896,
29918,
24713,
29918,
1062,
2760,
29918,
29896,
29929,
29900,
29946,
29918,
1457,
5014,
287,
29914,
828,
29918,
2040,
29918,
16130,
295,
1107,
742,
13,
462,
632,
1418,
481,
2461,
29918,
978,
29918,
29890,
1884,
876,
13,
4706,
1683,
29901,
13,
9651,
6773,
13,
13,
4706,
274,
29873,
29918,
1272,
29961,
312,
29918,
1272,
529,
29871,
29900,
29962,
353,
29871,
29900,
13,
4706,
274,
29873,
29918,
1272,
29961,
312,
29918,
1272,
1405,
29871,
29896,
29962,
353,
29871,
29896,
13,
4706,
11105,
29918,
1272,
29961,
13168,
29918,
1272,
1405,
29871,
29900,
29889,
29945,
29962,
353,
29871,
29896,
13,
4706,
11105,
29918,
1272,
29961,
13168,
29918,
1272,
529,
29871,
29896,
29962,
353,
29871,
29900,
13,
13,
4706,
289,
1884,
29918,
1272,
353,
3588,
29898,
13168,
29918,
1272,
29897,
13,
4706,
565,
313,
2435,
29898,
29890,
1884,
29918,
1272,
29897,
2804,
1677,
29918,
29890,
1884,
29889,
12181,
29961,
29900,
29962,
1125,
13,
9651,
1596,
703,
29912,
6177,
6571,
1599,
6571,
1642,
4830,
29898,
1272,
29961,
29875,
1402,
1677,
29918,
29890,
1884,
29889,
12181,
29961,
29900,
1402,
7431,
29898,
29890,
1884,
29918,
1272,
4961,
13,
4706,
7442,
29889,
7620,
29898,
359,
29889,
2084,
29889,
7122,
29898,
449,
29918,
2084,
29892,
1418,
481,
2461,
29918,
978,
29918,
312,
511,
274,
29873,
29918,
1272,
29897,
13,
4706,
7442,
29889,
7620,
29898,
359,
29889,
2084,
29889,
7122,
29898,
449,
29918,
2084,
29892,
1418,
481,
2461,
29918,
978,
29918,
13168,
511,
11105,
29918,
1272,
29897,
13,
4706,
7442,
29889,
7620,
29898,
359,
29889,
2084,
29889,
7122,
29898,
449,
29918,
2084,
29892,
1418,
481,
2461,
29918,
978,
29918,
29890,
1884,
511,
289,
1884,
29918,
1272,
29897,
13,
2
] |
logs/on_member_unban.py | DiscordHackers/BetterBot-1.0.2.2 | 0 | 123586 | import disnake as discord
from disnake.ext import commands
from datetime import datetime
from api.server import base, main
class OnMemberUnBan(commands.Cog):
def __init__(self, client):
self.client = client
@commands.Cog.listener()
async def on_member_unban(self, guild, user):
if base.guild(guild)[6] is not None:
async for event in guild.audit_logs(limit = 1, action = discord.AuditLogAction.unban):
if getattr(event.target, "id", None) != user.id:
continue
try:
embed = discord.Embed(description = main.get_lang(guild, "MEMBER_UNBAN").format(user.name, user.mention), timestamp = datetime.utcnow(), color = 0x85ea8a)
embed.add_field(name = main.get_lang(guild, "MODERATOR"), value=f'**{event.user.name}** ({event.user.mention})', inline = True)
embed.set_footer(text = main.get_lang(guild, "MEMBER_ID").format(user.id), icon_url = user.avatar.url)
await self.client.get_channel(int(base.guild(guild)[6])).send(embed = embed)
except:
embed = discord.Embed(description = main.get_lang(guild, "MEMBER_UNBAN").format(user.name, user.mention), timestamp = datetime.utcnow(), color = 0x85ea8a)
embed.add_field(name = main.get_lang(guild, "MODERATOR"), value=f'**{event.user.name}** ({event.user.mention})', inline = True)
embed.set_footer(text = main.get_lang(guild, "MEMBER_ID").format(user.id))
await self.client.get_channel(int(base.guild(guild)[6])).send(embed = embed)
def setup(client):
client.add_cog(OnMemberUnBan(client)) | [
1,
1053,
766,
21040,
408,
2313,
536,
13,
3166,
766,
21040,
29889,
1062,
1053,
8260,
13,
3166,
12865,
1053,
12865,
13,
3166,
7882,
29889,
2974,
1053,
2967,
29892,
1667,
13,
13,
1990,
1551,
13404,
2525,
29933,
273,
29898,
26381,
29889,
29907,
468,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
3132,
1125,
13,
4706,
1583,
29889,
4645,
353,
3132,
13,
13,
1678,
732,
26381,
29889,
29907,
468,
29889,
25894,
580,
13,
1678,
7465,
822,
373,
29918,
14242,
29918,
348,
2571,
29898,
1311,
29892,
1410,
789,
29892,
1404,
1125,
13,
13,
4706,
565,
2967,
29889,
2543,
789,
29898,
2543,
789,
9601,
29953,
29962,
338,
451,
6213,
29901,
13,
9651,
7465,
363,
1741,
297,
1410,
789,
29889,
15052,
277,
29918,
20756,
29898,
13400,
353,
29871,
29896,
29892,
3158,
353,
2313,
536,
29889,
29909,
566,
277,
3403,
4276,
29889,
348,
2571,
1125,
13,
18884,
565,
679,
5552,
29898,
3696,
29889,
5182,
29892,
376,
333,
613,
6213,
29897,
2804,
1404,
29889,
333,
29901,
13,
462,
1678,
6773,
13,
18884,
1018,
29901,
13,
462,
1678,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
8216,
353,
1667,
29889,
657,
29918,
3893,
29898,
2543,
789,
29892,
376,
2303,
9486,
1001,
29918,
3904,
29933,
2190,
2564,
4830,
29898,
1792,
29889,
978,
29892,
1404,
29889,
358,
291,
511,
14334,
353,
12865,
29889,
329,
29883,
3707,
3285,
2927,
353,
29871,
29900,
29916,
29947,
29945,
11248,
29947,
29874,
29897,
13,
462,
1678,
8297,
29889,
1202,
29918,
2671,
29898,
978,
353,
1667,
29889,
657,
29918,
3893,
29898,
2543,
789,
29892,
376,
6720,
8032,
1299,
1955,
4968,
995,
29922,
29888,
29915,
1068,
29912,
3696,
29889,
1792,
29889,
978,
29913,
1068,
21313,
3696,
29889,
1792,
29889,
358,
291,
1800,
742,
10583,
353,
5852,
29897,
13,
462,
1678,
8297,
29889,
842,
29918,
21720,
29898,
726,
353,
1667,
29889,
657,
29918,
3893,
29898,
2543,
789,
29892,
376,
2303,
9486,
1001,
29918,
1367,
2564,
4830,
29898,
1792,
29889,
333,
511,
9849,
29918,
2271,
353,
1404,
29889,
485,
14873,
29889,
2271,
29897,
13,
462,
1678,
7272,
1583,
29889,
4645,
29889,
657,
29918,
12719,
29898,
524,
29898,
3188,
29889,
2543,
789,
29898,
2543,
789,
9601,
29953,
2314,
467,
6717,
29898,
17987,
353,
8297,
29897,
13,
18884,
5174,
29901,
13,
462,
1678,
8297,
353,
2313,
536,
29889,
6026,
2580,
29898,
8216,
353,
1667,
29889,
657,
29918,
3893,
29898,
2543,
789,
29892,
376,
2303,
9486,
1001,
29918,
3904,
29933,
2190,
2564,
4830,
29898,
1792,
29889,
978,
29892,
1404,
29889,
358,
291,
511,
14334,
353,
12865,
29889,
329,
29883,
3707,
3285,
2927,
353,
29871,
29900,
29916,
29947,
29945,
11248,
29947,
29874,
29897,
13,
462,
1678,
8297,
29889,
1202,
29918,
2671,
29898,
978,
353,
1667,
29889,
657,
29918,
3893,
29898,
2543,
789,
29892,
376,
6720,
8032,
1299,
1955,
4968,
995,
29922,
29888,
29915,
1068,
29912,
3696,
29889,
1792,
29889,
978,
29913,
1068,
21313,
3696,
29889,
1792,
29889,
358,
291,
1800,
742,
10583,
353,
5852,
29897,
13,
462,
1678,
8297,
29889,
842,
29918,
21720,
29898,
726,
353,
1667,
29889,
657,
29918,
3893,
29898,
2543,
789,
29892,
376,
2303,
9486,
1001,
29918,
1367,
2564,
4830,
29898,
1792,
29889,
333,
876,
13,
462,
1678,
7272,
1583,
29889,
4645,
29889,
657,
29918,
12719,
29898,
524,
29898,
3188,
29889,
2543,
789,
29898,
2543,
789,
9601,
29953,
2314,
467,
6717,
29898,
17987,
353,
8297,
29897,
13,
13,
1753,
6230,
29898,
4645,
1125,
13,
1678,
3132,
29889,
1202,
29918,
29883,
468,
29898,
2951,
13404,
2525,
29933,
273,
29898,
4645,
876,
2
] |
scripts/example_basic_classifier.py | nicolasigor/sleep-stage | 0 | 199018 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import matplotlib.pyplot as plt
import numpy as np
from sklearn.ensemble import RandomForestClassifier
from sklearn.utils import shuffle
from sklearn.metrics import confusion_matrix
from sklearn.utils.multiclass import unique_labels
sys.path.append('..')
from libs.data.mass import Mass
from libs.data.utils import power_spectrum
def plot_confusion_matrix(y_true, y_pred,
normalize=False,
title=None,
cmap=plt.cm.Blues):
"""
This function prints and plots the confusion matrix.
Normalization can be applied by setting `normalize=True`.
"""
if not title:
if normalize:
title = 'Normalized confusion matrix'
else:
title = 'Confusion matrix, without normalization'
# Compute confusion matrix
cm = confusion_matrix(y_true, y_pred)
# Only use the labels that appear in the data
classes = unique_labels(y_true, y_pred)
if normalize:
cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis]
print("Normalized confusion matrix")
else:
print('Confusion matrix, without normalization')
print(cm)
fig, ax = plt.subplots()
im = ax.imshow(cm, interpolation='nearest', cmap=cmap)
ax.figure.colorbar(im, ax=ax)
# We want to show all ticks...
ax.set(xticks=np.arange(cm.shape[1]),
yticks=np.arange(cm.shape[0]),
# ... and label them with the respective list entries
xticklabels=classes, yticklabels=classes,
title=title,
ylabel='True label',
xlabel='Predicted label')
# Rotate the tick labels and set their alignment.
plt.setp(ax.get_xticklabels(), rotation=45, ha="right",
rotation_mode="anchor")
# Loop over data dimensions and create text annotations.
fmt = '.2f' if normalize else 'd'
thresh = cm.max() / 2.
for i in range(cm.shape[0]):
for j in range(cm.shape[1]):
ax.text(j, i, format(cm[i, j], fmt),
ha="center", va="center",
color="white" if cm[i, j] > thresh else "black")
fig.tight_layout()
return ax
if __name__ == '__main__':
dataset = Mass(load_checkpoint=True)
subject_id = 1
original_fs = dataset.fs
page_duration = dataset.page_duration
signal_names = dataset.get_signal_names()
stage2int_dict = {
'?': 2,
'W': 1,
'R': 0,
'N1': -1,
'N2': -2,
'N3': -3
}
# Get database
output_fs = 100
x_train, y_train = dataset.get_subset_data(
subject_id_list=dataset.get_train_ids(),
output_fs=output_fs, border_duration=0, ignore_unknown=True)
x_test, y_test = dataset.get_subset_data(
subject_id_list=dataset.get_test_ids(),
output_fs=output_fs, border_duration=0, ignore_unknown=True)
x_train = np.concatenate(x_train, axis=0)
y_train = np.concatenate(y_train, axis=0)
x_test = np.concatenate(x_test, axis=0)
y_test = np.concatenate(y_test, axis=0)
print('%d segments in train set. %d segments in test set'
% (y_train.size, y_test.size))
# Check class frequency
print('')
print('Training set')
values, counts = np.unique(y_train, return_counts=True)
for value, count in zip(values, counts):
print('%s: %d segments (%1.2f %% of total)'
% (value, count, 100*count/y_train.size))
print('')
print('Test set')
values, counts = np.unique(y_test, return_counts=True)
for value, count in zip(values, counts):
print('%s: %d segments (%1.2f %% of total)'
% (value, count, 100 * count / y_test.size))
print('')
# Compute simple features using FFT
print('Computing Training set features')
x_train_features = []
for i in range(x_train.shape[0]):
example_feats = []
for chn in range(x_train.shape[2]):
single_channel = x_train[i, :, chn]
power, freq = power_spectrum(single_channel, output_fs)
delta_idx = np.where((freq >= 0) & (freq <= 4))[0]
theta_idx = np.where((freq >= 4) & (freq <= 7.5))[0]
alpha_idx = np.where((freq >= 7.5) & (freq <= 15.5))[0]
beta_idx = np.where((freq >= 15.5) & (freq <= 31))[0]
gamma_idx = np.where(freq >= 31)[0]
example_feats.append([
power[delta_idx].sum(),
power[theta_idx].sum(),
power[alpha_idx].sum(),
power[beta_idx].sum(),
power[gamma_idx].sum()
])
example_feats = np.concatenate(example_feats).flatten()
x_train_features.append(example_feats)
x_train_features = np.stack(x_train_features, axis=0)
print('Computing Test set features')
x_test_features = []
for i in range(x_test.shape[0]):
example_feats = []
for chn in range(x_test.shape[2]):
single_channel = x_test[i, :, chn]
power, freq = power_spectrum(single_channel, output_fs)
delta_idx = np.where((freq >= 0) & (freq <= 4))[0]
theta_idx = np.where((freq >= 4) & (freq <= 7.5))[0]
alpha_idx = np.where((freq >= 7.5) & (freq <= 15.5))[0]
beta_idx = np.where((freq >= 15.5) & (freq <= 31))[0]
gamma_idx = np.where(freq >= 31)[0]
example_feats.append([
power[delta_idx].sum(),
power[theta_idx].sum(),
power[alpha_idx].sum(),
power[beta_idx].sum(),
power[gamma_idx].sum()
])
example_feats = np.concatenate(example_feats).flatten()
x_test_features.append(example_feats)
x_test_features = np.stack(x_test_features, axis=0)
# Train a simple classifier to solve the task
x_train_features, y_train = shuffle(
x_train_features, y_train, random_state=0)
clf = RandomForestClassifier(
n_estimators=50, max_depth=4, class_weight="balanced", random_state=0)
clf = clf.fit(x_train_features, y_train)
# Predict on test data
y_hat_test = clf.predict(x_test_features)
# Evaluate performance
np.set_printoptions(precision=2)
# Plot non-normalized confusion matrix
plot_confusion_matrix(y_test, y_hat_test,
title='Confusion matrix, without normalization')
plt.show()
# Plot normalized confusion matrix
plot_confusion_matrix(y_test, y_hat_test, normalize=True,
title='Normalized confusion matrix')
plt.show()
| [
1,
515,
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,
10876,
13,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
5215,
12655,
408,
7442,
13,
3166,
2071,
19668,
29889,
24031,
1053,
16968,
2831,
342,
2385,
3709,
13,
3166,
2071,
19668,
29889,
13239,
1053,
528,
21897,
13,
3166,
2071,
19668,
29889,
2527,
10817,
1053,
14679,
29918,
5344,
13,
3166,
2071,
19668,
29889,
13239,
29889,
4713,
293,
605,
1053,
5412,
29918,
21134,
13,
13,
9675,
29889,
2084,
29889,
4397,
877,
636,
1495,
13,
13,
3166,
4303,
29879,
29889,
1272,
29889,
25379,
1053,
7360,
13,
3166,
4303,
29879,
29889,
1272,
29889,
13239,
1053,
3081,
29918,
21494,
5848,
13,
13,
13,
1753,
6492,
29918,
5527,
3958,
29918,
5344,
29898,
29891,
29918,
3009,
29892,
343,
29918,
11965,
29892,
13,
462,
3986,
4226,
675,
29922,
8824,
29892,
13,
462,
3986,
3611,
29922,
8516,
29892,
13,
462,
3986,
274,
1958,
29922,
572,
29873,
29889,
4912,
29889,
10358,
1041,
1125,
13,
1678,
9995,
13,
1678,
910,
740,
14677,
322,
24580,
278,
14679,
4636,
29889,
13,
1678,
21981,
2133,
508,
367,
7436,
491,
4444,
421,
8945,
675,
29922,
5574,
1412,
13,
1678,
9995,
13,
1678,
565,
451,
3611,
29901,
13,
4706,
565,
4226,
675,
29901,
13,
9651,
3611,
353,
525,
19077,
1891,
14679,
4636,
29915,
13,
4706,
1683,
29901,
13,
9651,
3611,
353,
525,
16376,
3958,
4636,
29892,
1728,
4226,
2133,
29915,
13,
13,
1678,
396,
11796,
29872,
14679,
4636,
13,
1678,
7477,
353,
14679,
29918,
5344,
29898,
29891,
29918,
3009,
29892,
343,
29918,
11965,
29897,
13,
1678,
396,
9333,
671,
278,
11073,
393,
2615,
297,
278,
848,
13,
1678,
4413,
353,
5412,
29918,
21134,
29898,
29891,
29918,
3009,
29892,
343,
29918,
11965,
29897,
13,
1678,
565,
4226,
675,
29901,
13,
4706,
7477,
353,
7477,
29889,
579,
668,
877,
7411,
1495,
847,
7477,
29889,
2083,
29898,
8990,
29922,
29896,
29897,
7503,
29892,
7442,
29889,
1482,
8990,
29962,
13,
4706,
1596,
703,
19077,
1891,
14679,
4636,
1159,
13,
1678,
1683,
29901,
13,
4706,
1596,
877,
16376,
3958,
4636,
29892,
1728,
4226,
2133,
1495,
13,
13,
1678,
1596,
29898,
4912,
29897,
13,
13,
1678,
2537,
29892,
4853,
353,
14770,
29889,
1491,
26762,
580,
13,
1678,
527,
353,
4853,
29889,
326,
4294,
29898,
4912,
29892,
29694,
2433,
28502,
342,
742,
274,
1958,
29922,
29883,
1958,
29897,
13,
1678,
4853,
29889,
4532,
29889,
2780,
1646,
29898,
326,
29892,
4853,
29922,
1165,
29897,
13,
1678,
396,
1334,
864,
304,
1510,
599,
260,
7358,
856,
13,
1678,
4853,
29889,
842,
29898,
486,
7358,
29922,
9302,
29889,
279,
927,
29898,
4912,
29889,
12181,
29961,
29896,
11724,
13,
965,
343,
29873,
7358,
29922,
9302,
29889,
279,
927,
29898,
4912,
29889,
12181,
29961,
29900,
11724,
13,
965,
396,
2023,
322,
3858,
963,
411,
278,
18067,
1051,
9976,
13,
9651,
486,
860,
21134,
29922,
13203,
29892,
343,
24667,
21134,
29922,
13203,
29892,
13,
965,
3611,
29922,
3257,
29892,
13,
965,
343,
1643,
2433,
5574,
3858,
742,
13,
965,
921,
1643,
2433,
23084,
18186,
3858,
1495,
13,
13,
1678,
396,
9664,
403,
278,
16892,
11073,
322,
731,
1009,
22239,
29889,
13,
1678,
14770,
29889,
842,
29886,
29898,
1165,
29889,
657,
29918,
486,
860,
21134,
3285,
13733,
29922,
29946,
29945,
29892,
447,
543,
1266,
613,
13,
632,
13733,
29918,
8513,
543,
25367,
1159,
13,
13,
1678,
396,
21493,
975,
848,
13391,
322,
1653,
1426,
25495,
29889,
13,
1678,
19200,
353,
15300,
29906,
29888,
29915,
565,
4226,
675,
1683,
525,
29881,
29915,
13,
1678,
266,
3781,
353,
7477,
29889,
3317,
580,
847,
29871,
29906,
29889,
13,
1678,
363,
474,
297,
3464,
29898,
4912,
29889,
12181,
29961,
29900,
29962,
1125,
13,
4706,
363,
432,
297,
3464,
29898,
4912,
29889,
12181,
29961,
29896,
29962,
1125,
13,
9651,
4853,
29889,
726,
29898,
29926,
29892,
474,
29892,
3402,
29898,
4912,
29961,
29875,
29892,
432,
1402,
19200,
511,
13,
462,
1678,
447,
543,
5064,
613,
2947,
543,
5064,
613,
13,
462,
1678,
2927,
543,
10921,
29908,
565,
7477,
29961,
29875,
29892,
432,
29962,
1405,
266,
3781,
1683,
376,
8517,
1159,
13,
1678,
2537,
29889,
29873,
523,
29918,
2680,
580,
13,
1678,
736,
4853,
13,
13,
13,
361,
4770,
978,
1649,
1275,
525,
1649,
3396,
1649,
2396,
13,
1678,
8783,
353,
7360,
29898,
1359,
29918,
3198,
3149,
29922,
5574,
29897,
13,
13,
1678,
4967,
29918,
333,
353,
29871,
29896,
13,
1678,
2441,
29918,
5847,
353,
8783,
29889,
5847,
13,
1678,
1813,
29918,
19708,
353,
8783,
29889,
3488,
29918,
19708,
13,
1678,
7182,
29918,
7039,
353,
8783,
29889,
657,
29918,
25436,
29918,
7039,
580,
13,
1678,
7408,
29906,
524,
29918,
8977,
353,
426,
13,
4706,
525,
29973,
2396,
29871,
29906,
29892,
13,
4706,
525,
29956,
2396,
29871,
29896,
29892,
13,
4706,
525,
29934,
2396,
29871,
29900,
29892,
13,
4706,
525,
29940,
29896,
2396,
448,
29896,
29892,
13,
4706,
525,
29940,
29906,
2396,
448,
29906,
29892,
13,
4706,
525,
29940,
29941,
2396,
448,
29941,
13,
1678,
500,
13,
13,
1678,
396,
3617,
2566,
13,
1678,
1962,
29918,
5847,
353,
29871,
29896,
29900,
29900,
13,
1678,
921,
29918,
14968,
29892,
343,
29918,
14968,
353,
8783,
29889,
657,
29918,
6484,
29918,
1272,
29898,
13,
4706,
4967,
29918,
333,
29918,
1761,
29922,
24713,
29889,
657,
29918,
14968,
29918,
4841,
3285,
13,
4706,
1962,
29918,
5847,
29922,
4905,
29918,
5847,
29892,
5139,
29918,
19708,
29922,
29900,
29892,
11455,
29918,
26690,
29922,
5574,
29897,
13,
1678,
921,
29918,
1688,
29892,
343,
29918,
1688,
353,
8783,
29889,
657,
29918,
6484,
29918,
1272,
29898,
13,
4706,
4967,
29918,
333,
29918,
1761,
29922,
24713,
29889,
657,
29918,
1688,
29918,
4841,
3285,
13,
4706,
1962,
29918,
5847,
29922,
4905,
29918,
5847,
29892,
5139,
29918,
19708,
29922,
29900,
29892,
11455,
29918,
26690,
29922,
5574,
29897,
13,
1678,
921,
29918,
14968,
353,
7442,
29889,
535,
29883,
2579,
403,
29898,
29916,
29918,
14968,
29892,
9685,
29922,
29900,
29897,
13,
1678,
343,
29918,
14968,
353,
7442,
29889,
535,
29883,
2579,
403,
29898,
29891,
29918,
14968,
29892,
9685,
29922,
29900,
29897,
13,
1678,
921,
29918,
1688,
353,
7442,
29889,
535,
29883,
2579,
403,
29898,
29916,
29918,
1688,
29892,
9685,
29922,
29900,
29897,
13,
1678,
343,
29918,
1688,
353,
7442,
29889,
535,
29883,
2579,
403,
29898,
29891,
29918,
1688,
29892,
9685,
29922,
29900,
29897,
13,
13,
1678,
1596,
877,
29995,
29881,
24611,
297,
7945,
731,
29889,
1273,
29881,
24611,
297,
1243,
731,
29915,
13,
3986,
1273,
313,
29891,
29918,
14968,
29889,
2311,
29892,
343,
29918,
1688,
29889,
2311,
876,
13,
13,
1678,
396,
5399,
770,
10868,
13,
1678,
1596,
877,
1495,
13,
1678,
1596,
877,
5323,
2827,
731,
1495,
13,
1678,
1819,
29892,
18139,
353,
7442,
29889,
13092,
29898,
29891,
29918,
14968,
29892,
736,
29918,
2798,
29879,
29922,
5574,
29897,
13,
1678,
363,
995,
29892,
2302,
297,
14319,
29898,
5975,
29892,
18139,
1125,
13,
4706,
1596,
877,
29995,
29879,
29901,
1273,
29881,
24611,
313,
29995,
29896,
29889,
29906,
29888,
17806,
310,
3001,
16029,
13,
795,
1273,
313,
1767,
29892,
2302,
29892,
29871,
29896,
29900,
29900,
29930,
2798,
29914,
29891,
29918,
14968,
29889,
2311,
876,
13,
1678,
1596,
877,
1495,
13,
1678,
1596,
877,
3057,
731,
1495,
13,
1678,
1819,
29892,
18139,
353,
7442,
29889,
13092,
29898,
29891,
29918,
1688,
29892,
736,
29918,
2798,
29879,
29922,
5574,
29897,
13,
1678,
363,
995,
29892,
2302,
297,
14319,
29898,
5975,
29892,
18139,
1125,
13,
4706,
1596,
877,
29995,
29879,
29901,
1273,
29881,
24611,
313,
29995,
29896,
29889,
29906,
29888,
17806,
310,
3001,
16029,
13,
795,
1273,
313,
1767,
29892,
2302,
29892,
29871,
29896,
29900,
29900,
334,
2302,
847,
343,
29918,
1688,
29889,
2311,
876,
13,
1678,
1596,
877,
1495,
13,
13,
1678,
396,
11796,
29872,
2560,
5680,
773,
383,
7818,
13,
1678,
1596,
877,
20606,
292,
26101,
731,
5680,
1495,
13,
1678,
921,
29918,
14968,
29918,
22100,
353,
5159,
13,
1678,
363,
474,
297,
3464,
29898,
29916,
29918,
14968,
29889,
12181,
29961,
29900,
29962,
1125,
13,
4706,
1342,
29918,
1725,
1446,
353,
5159,
13,
4706,
363,
521,
29876,
297,
3464,
29898,
29916,
29918,
14968,
29889,
12181,
29961,
29906,
29962,
1125,
13,
9651,
2323,
29918,
12719,
353,
921,
29918,
14968,
29961,
29875,
29892,
584,
29892,
521,
29876,
29962,
13,
9651,
3081,
29892,
3005,
29939,
353,
3081,
29918,
21494,
5848,
29898,
14369,
29918,
12719,
29892,
1962,
29918,
5847,
29897,
13,
9651,
19471,
29918,
13140,
353,
7442,
29889,
3062,
3552,
29888,
7971,
6736,
29871,
29900,
29897,
669,
313,
29888,
7971,
5277,
29871,
29946,
876,
29961,
29900,
29962,
13,
9651,
278,
941,
29918,
13140,
353,
7442,
29889,
3062,
3552,
29888,
7971,
6736,
29871,
29946,
29897,
669,
313,
29888,
7971,
5277,
29871,
29955,
29889,
29945,
876,
29961,
29900,
29962,
13,
9651,
15595,
29918,
13140,
353,
7442,
29889,
3062,
3552,
29888,
7971,
6736,
29871,
29955,
29889,
29945,
29897,
669,
313,
29888,
7971,
5277,
29871,
29896,
29945,
29889,
29945,
876,
29961,
29900,
29962,
13,
9651,
21762,
29918,
13140,
353,
7442,
29889,
3062,
3552,
29888,
7971,
6736,
29871,
29896,
29945,
29889,
29945,
29897,
669,
313,
29888,
7971,
5277,
29871,
29941,
29896,
876,
29961,
29900,
29962,
13,
9651,
330,
2735,
29918,
13140,
353,
7442,
29889,
3062,
29898,
29888,
7971,
6736,
29871,
29941,
29896,
9601,
29900,
29962,
13,
13,
9651,
1342,
29918,
1725,
1446,
29889,
4397,
4197,
13,
18884,
3081,
29961,
4181,
29918,
13140,
1822,
2083,
3285,
13,
18884,
3081,
29961,
3416,
29918,
13140,
1822,
2083,
3285,
13,
18884,
3081,
29961,
2312,
29918,
13140,
1822,
2083,
3285,
13,
18884,
3081,
29961,
3571,
29918,
13140,
1822,
2083,
3285,
13,
18884,
3081,
29961,
4283,
29918,
13140,
1822,
2083,
580,
13,
632,
2314,
13,
13,
4706,
1342,
29918,
1725,
1446,
353,
7442,
29889,
535,
29883,
2579,
403,
29898,
4773,
29918,
1725,
1446,
467,
1579,
8606,
580,
13,
4706,
921,
29918,
14968,
29918,
22100,
29889,
4397,
29898,
4773,
29918,
1725,
1446,
29897,
13,
1678,
921,
29918,
14968,
29918,
22100,
353,
7442,
29889,
1429,
29898,
29916,
29918,
14968,
29918,
22100,
29892,
9685,
29922,
29900,
29897,
13,
13,
1678,
1596,
877,
20606,
292,
4321,
731,
5680,
1495,
13,
1678,
921,
29918,
1688,
29918,
22100,
353,
5159,
13,
1678,
363,
474,
297,
3464,
29898,
29916,
29918,
1688,
29889,
12181,
29961,
29900,
29962,
1125,
13,
4706,
1342,
29918,
1725,
1446,
353,
5159,
13,
4706,
363,
521,
29876,
297,
3464,
29898,
29916,
29918,
1688,
29889,
12181,
29961,
29906,
29962,
1125,
13,
9651,
2323,
29918,
12719,
353,
921,
29918,
1688,
29961,
29875,
29892,
584,
29892,
521,
29876,
29962,
13,
9651,
3081,
29892,
3005,
29939,
353,
3081,
29918,
21494,
5848,
29898,
14369,
29918,
12719,
29892,
1962,
29918,
5847,
29897,
13,
9651,
19471,
29918,
13140,
353,
7442,
29889,
3062,
3552,
29888,
7971,
6736,
29871,
29900,
29897,
669,
313,
29888,
7971,
5277,
29871,
29946,
876,
29961,
29900,
29962,
13,
9651,
278,
941,
29918,
13140,
353,
7442,
29889,
3062,
3552,
29888,
7971,
6736,
29871,
29946,
29897,
669,
313,
29888,
7971,
5277,
29871,
29955,
29889,
29945,
876,
29961,
29900,
29962,
13,
9651,
15595,
29918,
13140,
353,
7442,
29889,
3062,
3552,
29888,
7971,
6736,
29871,
29955,
29889,
29945,
29897,
669,
313,
29888,
7971,
5277,
29871,
29896,
29945,
29889,
29945,
876,
29961,
29900,
29962,
13,
9651,
21762,
29918,
13140,
353,
7442,
29889,
3062,
3552,
29888,
7971,
6736,
29871,
29896,
29945,
29889,
29945,
29897,
669,
313,
29888,
7971,
5277,
29871,
29941,
29896,
876,
29961,
29900,
29962,
13,
9651,
330,
2735,
29918,
13140,
353,
7442,
29889,
3062,
29898,
29888,
7971,
6736,
29871,
29941,
29896,
9601,
29900,
29962,
13,
13,
9651,
1342,
29918,
1725,
1446,
29889,
4397,
4197,
13,
18884,
3081,
29961,
4181,
29918,
13140,
1822,
2083,
3285,
13,
18884,
3081,
29961,
3416,
29918,
13140,
1822,
2083,
3285,
13,
18884,
3081,
29961,
2312,
29918,
13140,
1822,
2083,
3285,
13,
18884,
3081,
29961,
3571,
29918,
13140,
1822,
2083,
3285,
13,
18884,
3081,
29961,
4283,
29918,
13140,
1822,
2083,
580,
13,
632,
2314,
13,
13,
4706,
1342,
29918,
1725,
1446,
353,
7442,
29889,
535,
29883,
2579,
403,
29898,
4773,
29918,
1725,
1446,
467,
1579,
8606,
580,
13,
4706,
921,
29918,
1688,
29918,
22100,
29889,
4397,
29898,
4773,
29918,
1725,
1446,
29897,
13,
1678,
921,
29918,
1688,
29918,
22100,
353,
7442,
29889,
1429,
29898,
29916,
29918,
1688,
29918,
22100,
29892,
9685,
29922,
29900,
29897,
13,
13,
1678,
396,
28186,
263,
2560,
770,
3709,
304,
4505,
278,
3414,
13,
1678,
921,
29918,
14968,
29918,
22100,
29892,
343,
29918,
14968,
353,
528,
21897,
29898,
13,
4706,
921,
29918,
14968,
29918,
22100,
29892,
343,
29918,
14968,
29892,
4036,
29918,
3859,
29922,
29900,
29897,
13,
1678,
1067,
29888,
353,
16968,
2831,
342,
2385,
3709,
29898,
13,
4706,
302,
29918,
342,
326,
4097,
29922,
29945,
29900,
29892,
4236,
29918,
19488,
29922,
29946,
29892,
770,
29918,
7915,
543,
5521,
8362,
613,
4036,
29918,
3859,
29922,
29900,
29897,
13,
1678,
1067,
29888,
353,
1067,
29888,
29889,
9202,
29898,
29916,
29918,
14968,
29918,
22100,
29892,
343,
29918,
14968,
29897,
13,
13,
1678,
396,
21099,
919,
373,
1243,
848,
13,
1678,
343,
29918,
2455,
29918,
1688,
353,
1067,
29888,
29889,
27711,
29898,
29916,
29918,
1688,
29918,
22100,
29897,
13,
13,
1678,
396,
382,
4387,
403,
4180,
13,
1678,
7442,
29889,
842,
29918,
558,
8941,
1980,
29898,
17990,
2459,
29922,
29906,
29897,
13,
13,
1678,
396,
18399,
1661,
29899,
8945,
1891,
14679,
4636,
13,
1678,
6492,
29918,
5527,
3958,
29918,
5344,
29898,
29891,
29918,
1688,
29892,
343,
29918,
2455,
29918,
1688,
29892,
13,
462,
3986,
3611,
2433,
16376,
3958,
4636,
29892,
1728,
4226,
2133,
1495,
13,
1678,
14770,
29889,
4294,
580,
13,
13,
1678,
396,
18399,
4226,
1891,
14679,
4636,
13,
1678,
6492,
29918,
5527,
3958,
29918,
5344,
29898,
29891,
29918,
1688,
29892,
343,
29918,
2455,
29918,
1688,
29892,
4226,
675,
29922,
5574,
29892,
13,
462,
3986,
3611,
2433,
19077,
1891,
14679,
4636,
1495,
13,
1678,
14770,
29889,
4294,
580,
13,
13,
2
] |
jexam/argparser.py | chrispyles/jexam | 1 | 22825 | <reponame>chrispyles/jexam
#################################
##### jExam Argument Parser #####
#################################
import argparse
def get_parser():
"""
Creates and returns the argument parser for jExam
Returns:
``argparse.ArgumentParser``: the argument parser for jExam
"""
parser = argparse.ArgumentParser()
parser.add_argument("master", type=str, help="Path to exam master notebook")
parser.add_argument("result", nargs="?", default="dist", help="Path at which to write output notebooks")
parser.add_argument("-f", "--format", type=str, default="otter", help="Name of autograder format; 'otter' or 'ok'")
parser.add_argument("-s", "--seed", type=int, default=None, help="Random seed for NumPy to run before execution")
parser.add_argument("-q", "--quiet", default=False, action="store_true", help="Run without printing status")
return parser
| [
1,
529,
276,
1112,
420,
29958,
305,
3780,
2272,
793,
29914,
29926,
735,
314,
13,
13383,
13383,
29937,
13,
4136,
29937,
432,
1252,
314,
23125,
1459,
643,
16101,
13,
13383,
13383,
29937,
13,
13,
5215,
1852,
5510,
13,
13,
1753,
679,
29918,
16680,
7295,
13,
1678,
9995,
13,
1678,
6760,
1078,
322,
3639,
278,
2980,
13812,
363,
432,
1252,
314,
13,
268,
13,
1678,
16969,
29901,
13,
4706,
4954,
1191,
5510,
29889,
15730,
11726,
29952,
6998,
278,
2980,
13812,
363,
432,
1252,
314,
13,
1678,
9995,
13,
1678,
13812,
353,
1852,
5510,
29889,
15730,
11726,
580,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
6207,
613,
1134,
29922,
710,
29892,
1371,
543,
2605,
304,
4392,
5835,
451,
19273,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
2914,
613,
302,
5085,
543,
29973,
613,
2322,
543,
5721,
613,
1371,
543,
2605,
472,
607,
304,
2436,
1962,
451,
19273,
29879,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
29899,
29888,
613,
376,
489,
4830,
613,
1134,
29922,
710,
29892,
2322,
543,
327,
357,
613,
1371,
543,
1170,
310,
1120,
468,
29878,
1664,
3402,
29936,
525,
327,
357,
29915,
470,
525,
554,
29915,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
29899,
29879,
613,
376,
489,
26776,
613,
1134,
29922,
524,
29892,
2322,
29922,
8516,
29892,
1371,
543,
17875,
16717,
363,
11848,
19737,
304,
1065,
1434,
8225,
1159,
13,
1678,
13812,
29889,
1202,
29918,
23516,
703,
29899,
29939,
613,
376,
489,
339,
2035,
613,
2322,
29922,
8824,
29892,
3158,
543,
8899,
29918,
3009,
613,
1371,
543,
6558,
1728,
14010,
4660,
1159,
13,
1678,
736,
13812,
13,
2
] |
abc/abc189/abc189d-1.py | c-yan/atcoder | 1 | 70082 | N, *S = open(0).read().split()
t = 1
f = 1
for s in S:
if s == 'AND':
f = t + f * 2
elif s == 'OR':
t = t * 2 + f
print(t)
| [
1,
405,
29892,
334,
29903,
353,
1722,
29898,
29900,
467,
949,
2141,
5451,
580,
13,
13,
29873,
353,
29871,
29896,
13,
29888,
353,
29871,
29896,
13,
1454,
269,
297,
317,
29901,
13,
1678,
565,
269,
1275,
525,
9468,
2396,
13,
4706,
285,
353,
260,
718,
285,
334,
29871,
29906,
13,
1678,
25342,
269,
1275,
525,
1955,
2396,
13,
4706,
260,
353,
260,
334,
29871,
29906,
718,
285,
13,
2158,
29898,
29873,
29897,
13,
2
] |
formato_python/calendario_formato.py | kurokirasama/webies | 0 | 1616107 | <gh_stars>0
#!/usr/bin/env python
# coding: utf-8
# In[18]:
get_ipython().system('pip install unidecode')
# In[37]:
file = open("calendario/calendario.txt", "r")
for line in file:
datos = line.split(" : ")
info = datos[0].replace("iÃ","í").replace("³","o").replace("Ã","í").replace("í©","e").replace("í¡","a")
fecha = datos[1].replace("\n","")
print(f"<tr><td>{info}</td><td>{fecha}</td></tr>")
# In[ ]:
| [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
14137,
29901,
23616,
29899,
29947,
13,
13,
29937,
512,
29961,
29896,
29947,
5387,
13,
13,
13,
657,
29918,
666,
1656,
2141,
5205,
877,
13096,
2601,
443,
680,
401,
1495,
13,
13,
13,
29937,
512,
29961,
29941,
29955,
5387,
13,
13,
13,
1445,
353,
1722,
703,
1052,
355,
2628,
29914,
1052,
355,
2628,
29889,
3945,
613,
376,
29878,
1159,
13,
1454,
1196,
297,
934,
29901,
13,
1678,
18683,
353,
1196,
29889,
5451,
703,
584,
16521,
13,
1678,
5235,
353,
18683,
29961,
29900,
1822,
6506,
703,
29875,
30179,
3284,
29983,
2564,
6506,
703,
30168,
3284,
29877,
2564,
6506,
703,
30179,
3284,
29983,
2564,
6506,
703,
29983,
30211,
3284,
29872,
2564,
6506,
703,
29983,
30180,
3284,
29874,
1159,
13,
1678,
29100,
353,
18683,
29961,
29896,
1822,
6506,
14182,
29876,
3284,
1159,
13,
268,
13,
1678,
1596,
29898,
29888,
29908,
29966,
509,
5299,
1594,
26208,
3888,
16040,
1594,
5299,
1594,
26208,
1725,
5815,
16040,
1594,
2565,
509,
29958,
1159,
13,
13,
13,
29937,
512,
29961,
4514,
29901,
13,
13,
13,
13,
13,
2
] |
tests/unit/injector/test_injector.py | pauleveritt/predico | 0 | 75358 | <filename>tests/unit/injector/test_injector.py
from dataclasses import dataclass, field
import pytest
from predico.field_types import injected
from predico.injector import inject, InvalidInjectable
@dataclass
class Shoe:
size: int = 77
@dataclass
class Athlete:
shoe: Shoe = Shoe()
def test_injector_props():
""" Create instance based on data from passed-in props """
shoe = Shoe(size=55)
props = dict(shoe=shoe)
injectables = dict()
athlete = inject(props, injectables, Athlete)
assert 55 == athlete.shoe.size
def test_injector_injected():
""" Create instance from data based on injectables """
shoe = Shoe(size=66)
props = dict()
injectables = {Shoe.__name__: shoe}
athlete = inject(props, injectables, Athlete)
assert 66 == athlete.shoe.size
def test_injector_injected_double():
""" Tell the injector to hand attribute of another injectable """
@dataclass
class InjectedAthlete:
shoe_size: int = injected(Shoe, attr='size')
shoe = Shoe(size=88)
props = dict()
injectables = {Shoe.__name__: shoe}
athlete = inject(props, injectables, InjectedAthlete)
assert 88 == athlete.shoe_size
def test_injector_injected_callable():
""" Tell the injector to hand call result of another injectable """
@dataclass
class CallableShoe:
size: int
def __call__(self):
return self.size + 5
@dataclass
class InjectedAthlete:
shoe_size: int = injected(CallableShoe)
shoe = CallableShoe(size=70)
props = dict()
injectables = {CallableShoe.__name__: shoe}
athlete = inject(props, injectables, InjectedAthlete)
assert 75 == athlete.shoe_size
def test_injector_injectedattr_missing_class():
""" Ask for a class not registered as injectable """
class Jersey:
pass
@dataclass
class InjectedAthlete:
shoe_size: int = injected(Jersey, attr='size')
shoe = Shoe(size=88)
props = dict()
injectables = {Shoe.__name__: shoe}
with pytest.raises(InvalidInjectable) as exc:
inject(props, injectables, InjectedAthlete)
expected = 'Invalid injected type Jersey requested from type'
assert expected == str(exc.value)
def test_injector_fielddefault():
props = dict()
injectables = dict()
athlete = inject(props, injectables, Athlete)
assert 77 == athlete.shoe.size
def test_injector_precedence():
# When both props and injectable, choose props
shoe = Shoe(size=55)
props = dict(shoe=shoe)
shoe = Shoe(size=66)
injectables = {Shoe.__name__: shoe}
athlete = inject(props, injectables, Athlete)
assert 55 == athlete.shoe.size
def test_injector_defaultvalue():
# Field has a default value which should be used instead of
# injection
default_shoesize = Shoe(size=34523)
@dataclass
class DefaultValueAthlete:
shoe: Shoe = default_shoesize
props = dict()
injectables = dict()
athlete = inject(props, injectables, DefaultValueAthlete)
assert 34523 == athlete.shoe.size
def test_injector_defaultfactory():
# Field has a default value which should be used instead of
# injection
@dataclass
class DefaultValueAthlete:
shoe: Shoe = field(default_factory=Shoe)
props = dict()
injectables = dict()
athlete = inject(props, injectables, DefaultValueAthlete)
assert 77 == athlete.shoe.size
def test_injector_failure():
# Dataclass wants a value, doesn't have a default, and it
# isn't in props or injector
@dataclass
class AgeAthlete:
age: int # Note that this field is required
props = dict()
injectables = dict()
with pytest.raises(TypeError):
inject(props, injectables, AgeAthlete)
| [
1,
529,
9507,
29958,
21150,
29914,
5441,
29914,
21920,
272,
29914,
1688,
29918,
21920,
272,
29889,
2272,
13,
3166,
848,
13203,
1053,
848,
1990,
29892,
1746,
13,
13,
5215,
11451,
1688,
13,
13,
3166,
4450,
1417,
29889,
2671,
29918,
8768,
1053,
11658,
287,
13,
3166,
4450,
1417,
29889,
21920,
272,
1053,
11658,
29892,
21403,
28329,
519,
13,
13,
13,
29992,
1272,
1990,
13,
1990,
17550,
29872,
29901,
13,
1678,
2159,
29901,
938,
353,
29871,
29955,
29955,
13,
13,
13,
29992,
1272,
1990,
13,
1990,
9193,
2810,
29901,
13,
1678,
528,
7297,
29901,
17550,
29872,
353,
17550,
29872,
580,
13,
13,
13,
1753,
1243,
29918,
21920,
272,
29918,
11030,
7295,
13,
1678,
9995,
6204,
2777,
2729,
373,
848,
515,
4502,
29899,
262,
17761,
29871,
9995,
13,
13,
1678,
528,
7297,
353,
17550,
29872,
29898,
2311,
29922,
29945,
29945,
29897,
13,
1678,
17761,
353,
9657,
29898,
845,
7297,
29922,
845,
7297,
29897,
13,
1678,
11658,
1849,
353,
9657,
580,
13,
1678,
17622,
2810,
353,
11658,
29898,
11030,
29892,
11658,
1849,
29892,
9193,
2810,
29897,
13,
1678,
4974,
29871,
29945,
29945,
1275,
17622,
2810,
29889,
845,
7297,
29889,
2311,
13,
13,
13,
1753,
1243,
29918,
21920,
272,
29918,
21920,
287,
7295,
13,
1678,
9995,
6204,
2777,
515,
848,
2729,
373,
11658,
1849,
9995,
13,
13,
1678,
528,
7297,
353,
17550,
29872,
29898,
2311,
29922,
29953,
29953,
29897,
13,
1678,
17761,
353,
9657,
580,
13,
1678,
11658,
1849,
353,
426,
29903,
1251,
29872,
17255,
978,
1649,
29901,
528,
7297,
29913,
13,
1678,
17622,
2810,
353,
11658,
29898,
11030,
29892,
11658,
1849,
29892,
9193,
2810,
29897,
13,
1678,
4974,
29871,
29953,
29953,
1275,
17622,
2810,
29889,
845,
7297,
29889,
2311,
13,
13,
13,
1753,
1243,
29918,
21920,
272,
29918,
21920,
287,
29918,
8896,
7295,
13,
1678,
9995,
24948,
278,
11658,
272,
304,
1361,
5352,
310,
1790,
11658,
519,
9995,
13,
13,
1678,
732,
1272,
1990,
13,
1678,
770,
512,
622,
287,
29909,
386,
2810,
29901,
13,
4706,
528,
7297,
29918,
2311,
29901,
938,
353,
11658,
287,
29898,
29903,
1251,
29872,
29892,
12421,
2433,
2311,
1495,
13,
13,
1678,
528,
7297,
353,
17550,
29872,
29898,
2311,
29922,
29947,
29947,
29897,
13,
1678,
17761,
353,
9657,
580,
13,
1678,
11658,
1849,
353,
426,
29903,
1251,
29872,
17255,
978,
1649,
29901,
528,
7297,
29913,
13,
1678,
17622,
2810,
353,
11658,
29898,
11030,
29892,
11658,
1849,
29892,
512,
622,
287,
29909,
386,
2810,
29897,
13,
1678,
4974,
29871,
29947,
29947,
1275,
17622,
2810,
29889,
845,
7297,
29918,
2311,
13,
13,
13,
1753,
1243,
29918,
21920,
272,
29918,
21920,
287,
29918,
4804,
519,
7295,
13,
1678,
9995,
24948,
278,
11658,
272,
304,
1361,
1246,
1121,
310,
1790,
11658,
519,
9995,
13,
13,
1678,
732,
1272,
1990,
13,
1678,
770,
8251,
519,
29903,
1251,
29872,
29901,
13,
4706,
2159,
29901,
938,
13,
13,
4706,
822,
4770,
4804,
12035,
1311,
1125,
13,
9651,
736,
1583,
29889,
2311,
718,
29871,
29945,
13,
13,
1678,
732,
1272,
1990,
13,
1678,
770,
512,
622,
287,
29909,
386,
2810,
29901,
13,
4706,
528,
7297,
29918,
2311,
29901,
938,
353,
11658,
287,
29898,
5594,
519,
29903,
1251,
29872,
29897,
13,
13,
1678,
528,
7297,
353,
8251,
519,
29903,
1251,
29872,
29898,
2311,
29922,
29955,
29900,
29897,
13,
1678,
17761,
353,
9657,
580,
13,
1678,
11658,
1849,
353,
426,
5594,
519,
29903,
1251,
29872,
17255,
978,
1649,
29901,
528,
7297,
29913,
13,
1678,
17622,
2810,
353,
11658,
29898,
11030,
29892,
11658,
1849,
29892,
512,
622,
287,
29909,
386,
2810,
29897,
13,
1678,
4974,
29871,
29955,
29945,
1275,
17622,
2810,
29889,
845,
7297,
29918,
2311,
13,
13,
13,
1753,
1243,
29918,
21920,
272,
29918,
21920,
287,
5552,
29918,
27259,
29918,
1990,
7295,
13,
1678,
9995,
26579,
363,
263,
770,
451,
15443,
408,
11658,
519,
9995,
13,
13,
1678,
770,
14500,
29901,
13,
4706,
1209,
13,
13,
1678,
732,
1272,
1990,
13,
1678,
770,
512,
622,
287,
29909,
386,
2810,
29901,
13,
4706,
528,
7297,
29918,
2311,
29901,
938,
353,
11658,
287,
29898,
29967,
261,
7759,
29892,
12421,
2433,
2311,
1495,
13,
13,
1678,
528,
7297,
353,
17550,
29872,
29898,
2311,
29922,
29947,
29947,
29897,
13,
1678,
17761,
353,
9657,
580,
13,
1678,
11658,
1849,
353,
426,
29903,
1251,
29872,
17255,
978,
1649,
29901,
528,
7297,
29913,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
13919,
28329,
519,
29897,
408,
5566,
29901,
13,
4706,
11658,
29898,
11030,
29892,
11658,
1849,
29892,
512,
622,
287,
29909,
386,
2810,
29897,
13,
1678,
3806,
353,
525,
13919,
11658,
287,
1134,
14500,
13877,
515,
1134,
29915,
13,
1678,
4974,
3806,
1275,
851,
29898,
735,
29883,
29889,
1767,
29897,
13,
13,
13,
1753,
1243,
29918,
21920,
272,
29918,
2671,
4381,
7295,
13,
1678,
17761,
353,
9657,
580,
13,
1678,
11658,
1849,
353,
9657,
580,
13,
1678,
17622,
2810,
353,
11658,
29898,
11030,
29892,
11658,
1849,
29892,
9193,
2810,
29897,
13,
1678,
4974,
29871,
29955,
29955,
1275,
17622,
2810,
29889,
845,
7297,
29889,
2311,
13,
13,
13,
1753,
1243,
29918,
21920,
272,
29918,
1457,
1133,
663,
7295,
13,
1678,
396,
1932,
1716,
17761,
322,
11658,
519,
29892,
6755,
17761,
13,
13,
1678,
528,
7297,
353,
17550,
29872,
29898,
2311,
29922,
29945,
29945,
29897,
13,
1678,
17761,
353,
9657,
29898,
845,
7297,
29922,
845,
7297,
29897,
13,
13,
1678,
528,
7297,
353,
17550,
29872,
29898,
2311,
29922,
29953,
29953,
29897,
13,
1678,
11658,
1849,
353,
426,
29903,
1251,
29872,
17255,
978,
1649,
29901,
528,
7297,
29913,
13,
13,
1678,
17622,
2810,
353,
11658,
29898,
11030,
29892,
11658,
1849,
29892,
9193,
2810,
29897,
13,
1678,
4974,
29871,
29945,
29945,
1275,
17622,
2810,
29889,
845,
7297,
29889,
2311,
13,
13,
13,
1753,
1243,
29918,
21920,
272,
29918,
4381,
1767,
7295,
13,
1678,
396,
8989,
756,
263,
2322,
995,
607,
881,
367,
1304,
2012,
310,
13,
1678,
396,
20859,
13,
1678,
2322,
29918,
845,
29877,
267,
675,
353,
17550,
29872,
29898,
2311,
29922,
29941,
29946,
29945,
29906,
29941,
29897,
13,
13,
1678,
732,
1272,
1990,
13,
1678,
770,
13109,
1917,
29909,
386,
2810,
29901,
13,
4706,
528,
7297,
29901,
17550,
29872,
353,
2322,
29918,
845,
29877,
267,
675,
13,
13,
1678,
17761,
353,
9657,
580,
13,
1678,
11658,
1849,
353,
9657,
580,
13,
1678,
17622,
2810,
353,
11658,
29898,
11030,
29892,
11658,
1849,
29892,
13109,
1917,
29909,
386,
2810,
29897,
13,
1678,
4974,
29871,
29941,
29946,
29945,
29906,
29941,
1275,
17622,
2810,
29889,
845,
7297,
29889,
2311,
13,
13,
13,
1753,
1243,
29918,
21920,
272,
29918,
4381,
14399,
7295,
13,
1678,
396,
8989,
756,
263,
2322,
995,
607,
881,
367,
1304,
2012,
310,
13,
1678,
396,
20859,
13,
13,
1678,
732,
1272,
1990,
13,
1678,
770,
13109,
1917,
29909,
386,
2810,
29901,
13,
4706,
528,
7297,
29901,
17550,
29872,
353,
1746,
29898,
4381,
29918,
14399,
29922,
29903,
1251,
29872,
29897,
13,
13,
1678,
17761,
353,
9657,
580,
13,
1678,
11658,
1849,
353,
9657,
580,
13,
1678,
17622,
2810,
353,
11658,
29898,
11030,
29892,
11658,
1849,
29892,
13109,
1917,
29909,
386,
2810,
29897,
13,
1678,
4974,
29871,
29955,
29955,
1275,
17622,
2810,
29889,
845,
7297,
29889,
2311,
13,
13,
13,
1753,
1243,
29918,
21920,
272,
29918,
14057,
545,
7295,
13,
1678,
396,
3630,
1990,
10753,
263,
995,
29892,
1838,
29915,
29873,
505,
263,
2322,
29892,
322,
372,
13,
1678,
396,
3508,
29915,
29873,
297,
17761,
470,
11658,
272,
13,
1678,
732,
1272,
1990,
13,
1678,
770,
16767,
29909,
386,
2810,
29901,
13,
4706,
5046,
29901,
938,
29871,
396,
3940,
393,
445,
1746,
338,
3734,
13,
13,
1678,
17761,
353,
9657,
580,
13,
1678,
11658,
1849,
353,
9657,
580,
13,
1678,
411,
11451,
1688,
29889,
336,
4637,
29898,
1542,
2392,
1125,
13,
4706,
11658,
29898,
11030,
29892,
11658,
1849,
29892,
16767,
29909,
386,
2810,
29897,
13,
2
] |
dialog/apps.py | asmadotgh/neural_chat_web | 26 | 149973 | <reponame>asmadotgh/neural_chat_web
from django.apps import AppConfig
class DialogConfig(AppConfig):
name = 'dialog'
| [
1,
529,
276,
1112,
420,
29958,
11625,
328,
327,
12443,
29914,
484,
3631,
29918,
13496,
29918,
2676,
13,
3166,
9557,
29889,
13371,
1053,
2401,
3991,
13,
13,
1990,
18878,
3991,
29898,
2052,
3991,
1125,
13,
1678,
1024,
353,
525,
15901,
29915,
13,
13,
13,
2
] |
tech_project/lib/python2.7/site-packages/djangocms_picture/migrations/0007_fix_alignment.py | priyamshah112/Project-Descripton-Blog | 0 | 121481 | <reponame>priyamshah112/Project-Descripton-Blog<filename>tech_project/lib/python2.7/site-packages/djangocms_picture/migrations/0007_fix_alignment.py
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from djangocms_picture.models import PICTURE_ALIGNMENT
class Migration(migrations.Migration):
dependencies = [
('djangocms_picture', '0006_remove_null_values'),
]
operations = [
migrations.AlterField(
model_name='picture',
name='alignment',
field=models.CharField(blank=True, help_text='Aligns the image according to the selected option.', max_length=255, verbose_name='Alignment', choices=PICTURE_ALIGNMENT),
),
]
| [
1,
529,
276,
1112,
420,
29958,
29886,
374,
29891,
314,
845,
801,
29896,
29896,
29906,
29914,
7653,
29899,
4002,
924,
265,
29899,
29933,
1188,
29966,
9507,
29958,
11345,
29918,
4836,
29914,
1982,
29914,
4691,
29906,
29889,
29955,
29914,
2746,
29899,
8318,
29914,
19776,
574,
542,
1516,
29918,
12095,
29914,
26983,
800,
29914,
29900,
29900,
29900,
29955,
29918,
5878,
29918,
2520,
358,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
4770,
29888,
9130,
1649,
1053,
29104,
29918,
20889,
1338,
13,
13,
3166,
9557,
29889,
2585,
1053,
9725,
800,
29892,
4733,
13,
13,
3166,
270,
29926,
574,
542,
1516,
29918,
12095,
29889,
9794,
1053,
349,
29902,
1783,
11499,
29918,
1964,
17298,
13780,
13,
13,
13,
1990,
341,
16783,
29898,
26983,
800,
29889,
29924,
16783,
1125,
13,
13,
1678,
9962,
353,
518,
13,
4706,
6702,
19776,
574,
542,
1516,
29918,
12095,
742,
525,
29900,
29900,
29900,
29953,
29918,
5992,
29918,
4304,
29918,
5975,
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,
12095,
742,
13,
9651,
1024,
2433,
2520,
358,
742,
13,
9651,
1746,
29922,
9794,
29889,
27890,
29898,
19465,
29922,
5574,
29892,
1371,
29918,
726,
2433,
2499,
647,
29879,
278,
1967,
5034,
304,
278,
4629,
2984,
29889,
742,
4236,
29918,
2848,
29922,
29906,
29945,
29945,
29892,
26952,
29918,
978,
2433,
14658,
742,
19995,
29922,
2227,
1783,
11499,
29918,
1964,
17298,
13780,
511,
13,
4706,
10353,
13,
1678,
4514,
13,
2
] |
music_site/mongoServices/services.py | UVG-Teams/music-space | 0 | 24391 | from pymongo import MongoClient
client = MongoClient()
db = client.music_space
def print_collection(collection):
print("/" * 75)
for x in db[collection].find():
print(x)
print("/" * 75)
def save_sales_on_mongo(collection, data):
for i in range(len(data['sales'])):
data['sales'][i]['total'] = float(data['sales'][i]['total'])
# db[collection].insert_one({ 'sales': data['sales'] })
if data['sales'] != []:
db[collection].insert_many( data['sales'] )
def save_recommendations_on_mongo(collection, data):
db[collection].insert_one({ 'rec': data })
| [
1,
515,
282,
962,
7443,
1053,
18294,
4032,
13,
13,
4645,
353,
18294,
4032,
580,
13,
2585,
353,
3132,
29889,
23596,
29918,
3493,
13,
13,
1753,
1596,
29918,
10855,
29898,
10855,
1125,
13,
1678,
1596,
11974,
29908,
334,
29871,
29955,
29945,
29897,
13,
1678,
363,
921,
297,
4833,
29961,
10855,
1822,
2886,
7295,
13,
4706,
1596,
29898,
29916,
29897,
13,
1678,
1596,
11974,
29908,
334,
29871,
29955,
29945,
29897,
13,
13,
1753,
4078,
29918,
29879,
2122,
29918,
265,
29918,
29885,
7443,
29898,
10855,
29892,
848,
1125,
13,
1678,
363,
474,
297,
3464,
29898,
2435,
29898,
1272,
1839,
29879,
2122,
2033,
22164,
13,
4706,
848,
1839,
29879,
2122,
2033,
29961,
29875,
22322,
7827,
2033,
353,
5785,
29898,
1272,
1839,
29879,
2122,
2033,
29961,
29875,
22322,
7827,
11287,
29871,
13,
1678,
396,
4833,
29961,
10855,
1822,
7851,
29918,
650,
3319,
525,
29879,
2122,
2396,
848,
1839,
29879,
2122,
2033,
5615,
13,
1678,
565,
848,
1839,
29879,
2122,
2033,
2804,
5159,
29901,
13,
4706,
4833,
29961,
10855,
1822,
7851,
29918,
13011,
29898,
848,
1839,
29879,
2122,
2033,
1723,
13,
13,
13,
1753,
4078,
29918,
276,
2055,
355,
800,
29918,
265,
29918,
29885,
7443,
29898,
10855,
29892,
848,
1125,
13,
1678,
4833,
29961,
10855,
1822,
7851,
29918,
650,
3319,
525,
3757,
2396,
848,
5615,
13,
2
] |
pc-policy-status.py | sgordon46/pc-toolbox | 0 | 1611028 | from __future__ import print_function
try:
input = raw_input
except NameError:
pass
import argparse
import pc_lib_general
import pc_lib_api
# --Execution Block-- #
# --Parse command line arguments-- #
parser = argparse.ArgumentParser(prog='rltoolbox')
parser.add_argument(
'-u',
'--username',
type=str,
help='*Required* - Prisma Cloud API Access Key ID that you want to set to access your Prisma Cloud account.')
parser.add_argument(
'-p',
'--password',
type=str,
help='*Required* - Prisma Cloud API Secret Key that you want to set to access your Prisma Cloud account.')
parser.add_argument(
'-url',
'--uiurl',
type=str,
help='*Required* - Base URL used in the UI for connecting to Prisma Cloud. '
'Formatted as app.prismacloud.io or app2.prismacloud.io or app.eu.prismacloud.io, etc. '
'You can also input the api version of the URL if you know it and it will be passed through.')
parser.add_argument(
'-y',
'--yes',
action='store_true',
help='(Optional) - Override user input for verification (auto answer for yes).')
parser.add_argument(
'policytype',
type=str,
choices=['config', 'network', 'audit_event', 'anomaly', 'all'],
help='Policy type to enable/disable.')
parser.add_argument(
'status',
type=str,
choices=['enable', 'disable'],
help='Policy status to change the policy types to (enable or disable).')
args = parser.parse_args()
# --End parse command line arguments-- #
# --Main-- #
# Get login details worked out
pc_settings = pc_lib_general.pc_login_get(args.username, args.password, args.uiurl)
# Verification (override with -y)
if not args.yes:
print()
print('Ready to excute commands aginst your Prisma Cloud tenant.')
verification_response = str(input('Would you like to continue (y or yes to continue)?'))
continue_response = {'yes', 'y'}
print()
if verification_response not in continue_response:
pc_lib_general.pc_exit_error(400, 'Verification failed due to user response. Exiting...')
# Sort out API Login
print('API - Getting authentication token...', end='')
pc_settings = pc_lib_api.pc_jwt_get(pc_settings)
print('Done.')
print('API - Getting list of Policies...', end='')
pc_settings, response_package = pc_lib_api.api_policy_list_get(pc_settings)
policy_list_old = response_package['data']
print('Done.')
print('Filter policy list for indicated policy types of ' + args.policytype + '...', end='')
policy_type = args.policytype.lower()
policy_list_filtered = []
if args.status.lower() == "enable":
policy_enabled = True
policy_enabled_str = "true"
else:
policy_enabled = False
policy_enabled_str = "false"
for policy_old in policy_list_old:
if policy_old['enabled'] is not policy_enabled:
if policy_type == "all":
policy_list_filtered.append(policy_old)
elif policy_old['policyType'] == policy_type:
policy_list_filtered.append(policy_old)
print('Done.')
print('API - Updating policy statuses...')
for policy_update in policy_list_filtered:
print('Updating policy: ' + policy_update['name'])
pc_settings, response_package = pc_lib_api.api_policy_status_update(pc_settings, policy_update['policyId'], policy_enabled_str)
print('Done.')
| [
1,
515,
4770,
29888,
9130,
1649,
1053,
1596,
29918,
2220,
13,
2202,
29901,
13,
1678,
1881,
353,
10650,
29918,
2080,
13,
19499,
4408,
2392,
29901,
13,
1678,
1209,
13,
5215,
1852,
5510,
13,
5215,
22844,
29918,
1982,
29918,
17492,
13,
5215,
22844,
29918,
1982,
29918,
2754,
13,
13,
13,
29937,
1192,
20418,
15658,
489,
396,
13,
29937,
1192,
12914,
1899,
1196,
6273,
489,
396,
13,
16680,
353,
1852,
5510,
29889,
15730,
11726,
29898,
29097,
2433,
2096,
10154,
1884,
1495,
13,
13,
16680,
29889,
1202,
29918,
23516,
29898,
13,
1678,
17411,
29884,
742,
13,
1678,
525,
489,
6786,
742,
13,
1678,
1134,
29922,
710,
29892,
13,
1678,
1371,
2433,
29930,
19347,
29930,
448,
1588,
275,
655,
14293,
3450,
11028,
7670,
3553,
393,
366,
864,
304,
731,
304,
2130,
596,
1588,
275,
655,
14293,
3633,
29889,
1495,
13,
13,
16680,
29889,
1202,
29918,
23516,
29898,
13,
1678,
17411,
29886,
742,
13,
1678,
525,
489,
5630,
742,
13,
1678,
1134,
29922,
710,
29892,
13,
1678,
1371,
2433,
29930,
19347,
29930,
448,
1588,
275,
655,
14293,
3450,
10213,
7670,
393,
366,
864,
304,
731,
304,
2130,
596,
1588,
275,
655,
14293,
3633,
29889,
1495,
13,
13,
16680,
29889,
1202,
29918,
23516,
29898,
13,
1678,
17411,
2271,
742,
13,
1678,
525,
489,
1481,
2271,
742,
13,
1678,
1134,
29922,
710,
29892,
13,
1678,
1371,
2433,
29930,
19347,
29930,
448,
7399,
3988,
1304,
297,
278,
3740,
363,
16791,
304,
1588,
275,
655,
14293,
29889,
29871,
525,
13,
308,
525,
2500,
19667,
408,
623,
29889,
558,
1608,
562,
29880,
2736,
29889,
601,
470,
623,
29906,
29889,
558,
1608,
562,
29880,
2736,
29889,
601,
470,
623,
29889,
12932,
29889,
558,
1608,
562,
29880,
2736,
29889,
601,
29892,
2992,
29889,
29871,
525,
13,
308,
525,
3492,
508,
884,
1881,
278,
7882,
1873,
310,
278,
3988,
565,
366,
1073,
372,
322,
372,
674,
367,
4502,
1549,
29889,
1495,
13,
13,
16680,
29889,
1202,
29918,
23516,
29898,
13,
1678,
17411,
29891,
742,
13,
1678,
525,
489,
3582,
742,
13,
1678,
3158,
2433,
8899,
29918,
3009,
742,
13,
1678,
1371,
2433,
29898,
27636,
29897,
448,
6811,
2426,
1404,
1881,
363,
1147,
2450,
313,
6921,
1234,
363,
4874,
467,
1495,
13,
13,
16680,
29889,
1202,
29918,
23516,
29898,
13,
1678,
525,
22197,
1853,
742,
13,
1678,
1134,
29922,
710,
29892,
13,
1678,
19995,
29922,
1839,
2917,
742,
525,
11618,
742,
525,
15052,
277,
29918,
3696,
742,
525,
273,
290,
14997,
742,
525,
497,
7464,
13,
1678,
1371,
2433,
15644,
1134,
304,
9025,
29914,
20472,
29889,
1495,
13,
13,
16680,
29889,
1202,
29918,
23516,
29898,
13,
1678,
525,
4882,
742,
13,
1678,
1134,
29922,
710,
29892,
13,
1678,
19995,
29922,
1839,
12007,
742,
525,
20472,
7464,
13,
1678,
1371,
2433,
15644,
4660,
304,
1735,
278,
8898,
4072,
304,
313,
12007,
470,
11262,
467,
1495,
13,
13,
5085,
353,
13812,
29889,
5510,
29918,
5085,
580,
13,
29937,
1192,
5044,
6088,
1899,
1196,
6273,
489,
396,
13,
13,
29937,
1192,
6330,
489,
396,
13,
29937,
3617,
6464,
4902,
3796,
714,
13,
6739,
29918,
11027,
353,
22844,
29918,
1982,
29918,
17492,
29889,
6739,
29918,
7507,
29918,
657,
29898,
5085,
29889,
6786,
29892,
6389,
29889,
5630,
29892,
6389,
29889,
1481,
2271,
29897,
13,
13,
29937,
1798,
2450,
313,
15752,
411,
448,
29891,
29897,
13,
361,
451,
6389,
29889,
3582,
29901,
13,
1678,
1596,
580,
13,
1678,
1596,
877,
28181,
304,
5566,
1082,
8260,
946,
2611,
596,
1588,
275,
655,
14293,
3006,
424,
29889,
1495,
13,
1678,
1147,
2450,
29918,
5327,
353,
851,
29898,
2080,
877,
29956,
483,
366,
763,
304,
6773,
313,
29891,
470,
4874,
304,
6773,
6877,
8785,
13,
1678,
6773,
29918,
5327,
353,
11117,
3582,
742,
525,
29891,
10827,
13,
1678,
1596,
580,
13,
1678,
565,
1147,
2450,
29918,
5327,
451,
297,
6773,
29918,
5327,
29901,
13,
4706,
22844,
29918,
1982,
29918,
17492,
29889,
6739,
29918,
13322,
29918,
2704,
29898,
29946,
29900,
29900,
29892,
525,
6565,
2450,
5229,
2861,
304,
1404,
2933,
29889,
29871,
1222,
11407,
856,
1495,
13,
13,
29937,
20025,
714,
3450,
19130,
13,
2158,
877,
8787,
448,
24162,
10760,
5993,
856,
742,
1095,
2433,
1495,
13,
6739,
29918,
11027,
353,
22844,
29918,
1982,
29918,
2754,
29889,
6739,
29918,
29926,
14554,
29918,
657,
29898,
6739,
29918,
11027,
29897,
13,
2158,
877,
25632,
29889,
1495,
13,
13,
2158,
877,
8787,
448,
24162,
1051,
310,
2043,
293,
583,
856,
742,
1095,
2433,
1495,
13,
6739,
29918,
11027,
29892,
2933,
29918,
5113,
353,
22844,
29918,
1982,
29918,
2754,
29889,
2754,
29918,
22197,
29918,
1761,
29918,
657,
29898,
6739,
29918,
11027,
29897,
13,
22197,
29918,
1761,
29918,
1025,
353,
2933,
29918,
5113,
1839,
1272,
2033,
13,
2158,
877,
25632,
29889,
1495,
13,
13,
2158,
877,
5072,
8898,
1051,
363,
18694,
8898,
4072,
310,
525,
718,
6389,
29889,
22197,
1853,
718,
525,
856,
742,
1095,
2433,
1495,
13,
22197,
29918,
1853,
353,
6389,
29889,
22197,
1853,
29889,
13609,
580,
13,
22197,
29918,
1761,
29918,
4572,
287,
353,
5159,
13,
13,
361,
6389,
29889,
4882,
29889,
13609,
580,
1275,
376,
12007,
1115,
13,
1678,
8898,
29918,
17590,
353,
5852,
13,
1678,
8898,
29918,
17590,
29918,
710,
353,
376,
3009,
29908,
13,
2870,
29901,
13,
1678,
8898,
29918,
17590,
353,
7700,
13,
1678,
8898,
29918,
17590,
29918,
710,
353,
376,
4541,
29908,
13,
13,
1454,
8898,
29918,
1025,
297,
8898,
29918,
1761,
29918,
1025,
29901,
13,
1678,
565,
8898,
29918,
1025,
1839,
17590,
2033,
338,
451,
8898,
29918,
17590,
29901,
13,
4706,
565,
8898,
29918,
1853,
1275,
376,
497,
1115,
13,
9651,
8898,
29918,
1761,
29918,
4572,
287,
29889,
4397,
29898,
22197,
29918,
1025,
29897,
13,
4706,
25342,
8898,
29918,
1025,
1839,
22197,
1542,
2033,
1275,
8898,
29918,
1853,
29901,
13,
9651,
8898,
29918,
1761,
29918,
4572,
287,
29889,
4397,
29898,
22197,
29918,
1025,
29897,
13,
2158,
877,
25632,
29889,
1495,
13,
13,
2158,
877,
8787,
448,
5020,
26747,
8898,
4660,
267,
856,
1495,
13,
1454,
8898,
29918,
5504,
297,
8898,
29918,
1761,
29918,
4572,
287,
29901,
13,
1678,
1596,
877,
3373,
26747,
8898,
29901,
525,
718,
8898,
29918,
5504,
1839,
978,
11287,
13,
1678,
22844,
29918,
11027,
29892,
2933,
29918,
5113,
353,
22844,
29918,
1982,
29918,
2754,
29889,
2754,
29918,
22197,
29918,
4882,
29918,
5504,
29898,
6739,
29918,
11027,
29892,
8898,
29918,
5504,
1839,
22197,
1204,
7464,
8898,
29918,
17590,
29918,
710,
29897,
13,
2158,
877,
25632,
29889,
1495,
13,
2
] |
natlas-agent/config.py | m4rcu5/natlas | 0 | 1801 | import os
from dotenv import load_dotenv
class Config:
# Current Version
NATLAS_VERSION = "0.6.10"
BASEDIR = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(BASEDIR, '.env'))
def get_int(self, varname):
tmp = os.environ.get(varname)
if tmp:
return int(tmp)
return None
def get_bool(self, varname):
tmp = os.environ.get(varname)
if tmp and tmp.upper() == "TRUE":
return True
if tmp and tmp.upper() == "FALSE":
return False
return None
def __init__(self):
# url of server to get/submit work from/to
self.server = os.environ.get('NATLAS_SERVER_ADDRESS') or 'http://127.0.0.1:5000'
# ignore warnings about SSL connections
# you shouldn't ignore ssl warnings, but I'll give you the option
# Instead, you should put the trusted CA certificate bundle on the agent and use the REQUESTS_CA_BUNDLE env variable
self.ignore_ssl_warn = self.get_bool('NATLAS_IGNORE_SSL_WARN') or False
# maximum number of threads to utilize
self.max_threads = self.get_int('NATLAS_MAX_THREADS') or 3
# Are we allowed to scan local addresses?
# By default, agents protect themselves from scanning their local network
self.scan_local = self.get_bool('NATLAS_SCAN_LOCAL') or False
# default time to wait for the server to respond
self.request_timeout = self.get_int('NATLAS_REQUEST_TIMEOUT') or 15 # seconds
# Maximum value for exponential backoff of requests, 5 minutes default
self.backoff_max = self.get_int('NATLAS_BACKOFF_MAX') or 300 # seconds
# Base value to begin the exponential backoff
self.backoff_base = self.get_int('NATLAS_BACKOFF_BASE') or 1 # seconds
# Maximum number of times to retry submitting data before giving up
# This is useful if a thread is submitting data that the server doesn't understand for some reason
self.max_retries = self.get_int('NATLAS_MAX_RETRIES') or 10
# Identification string that identifies the agent that performed any given scan
# Used for database lookup and stored in scan output
self.agent_id = os.environ.get("NATLAS_AGENT_ID") or None
# Authentication token that agents can use to talk to the server API
# Only needed if the server is configured to require agent authentication
self.auth_token = os.environ.get("NATLAS_AGENT_TOKEN") or None
# Optionally save files that failed to upload
self.save_fails = self.get_bool("NATLAS_SAVE_FAILS") or False
# Allow version overrides for local development
# Necessary to test versioned host data templates before release
self.version_override = os.environ.get("NATLAS_VERSION_OVERRIDE") or None
self.sentry_dsn = os.environ.get("SENTRY_DSN") or None
if self.version_override:
self.NATLAS_VERSION = self.version_override
| [
1,
1053,
2897,
13,
3166,
8329,
6272,
1053,
2254,
29918,
6333,
6272,
13,
13,
13,
1990,
12782,
29901,
13,
13,
12,
29937,
9626,
10079,
13,
12,
29940,
1299,
29931,
3289,
29918,
16358,
353,
376,
29900,
29889,
29953,
29889,
29896,
29900,
29908,
13,
13,
12,
25416,
9464,
353,
2897,
29889,
2084,
29889,
370,
1028,
493,
29898,
359,
29889,
2084,
29889,
25721,
22168,
1445,
1649,
876,
13,
12,
1359,
29918,
6333,
6272,
29898,
359,
29889,
2084,
29889,
7122,
29898,
25416,
9464,
29892,
15300,
6272,
8785,
13,
13,
12,
1753,
679,
29918,
524,
29898,
1311,
29892,
722,
978,
1125,
13,
12,
12,
7050,
353,
2897,
29889,
21813,
29889,
657,
29898,
1707,
978,
29897,
13,
12,
12,
361,
13128,
29901,
13,
12,
12,
12,
2457,
938,
29898,
7050,
29897,
13,
12,
12,
2457,
6213,
13,
13,
12,
1753,
679,
29918,
11227,
29898,
1311,
29892,
722,
978,
1125,
13,
12,
12,
7050,
353,
2897,
29889,
21813,
29889,
657,
29898,
1707,
978,
29897,
13,
12,
12,
361,
13128,
322,
13128,
29889,
21064,
580,
1275,
376,
20652,
1115,
13,
12,
12,
12,
2457,
5852,
13,
12,
12,
361,
13128,
322,
13128,
29889,
21064,
580,
1275,
376,
25717,
1115,
13,
12,
12,
12,
2457,
7700,
13,
12,
12,
2457,
6213,
13,
13,
12,
1753,
4770,
2344,
12035,
1311,
1125,
13,
12,
12,
29937,
3142,
310,
1923,
304,
679,
29914,
7892,
664,
515,
29914,
517,
13,
12,
12,
1311,
29889,
2974,
353,
2897,
29889,
21813,
29889,
657,
877,
29940,
1299,
29931,
3289,
29918,
18603,
29918,
17744,
26785,
1495,
470,
525,
1124,
597,
29896,
29906,
29955,
29889,
29900,
29889,
29900,
29889,
29896,
29901,
29945,
29900,
29900,
29900,
29915,
13,
13,
12,
12,
29937,
11455,
18116,
1048,
17122,
12368,
13,
12,
12,
29937,
366,
9273,
29915,
29873,
11455,
24250,
18116,
29892,
541,
306,
29915,
645,
2367,
366,
278,
2984,
13,
12,
12,
29937,
8669,
29892,
366,
881,
1925,
278,
9311,
287,
12766,
12289,
11846,
373,
278,
10823,
322,
671,
278,
5195,
14130,
29903,
29918,
5454,
29918,
7838,
2797,
1307,
8829,
2286,
13,
12,
12,
1311,
29889,
17281,
29918,
16265,
29918,
25442,
353,
1583,
29889,
657,
29918,
11227,
877,
29940,
1299,
29931,
3289,
29918,
6259,
6632,
1525,
29918,
18641,
29918,
29956,
15249,
1495,
470,
7700,
13,
13,
12,
12,
29937,
7472,
1353,
310,
9717,
304,
3667,
675,
13,
12,
12,
1311,
29889,
3317,
29918,
28993,
353,
1583,
29889,
657,
29918,
524,
877,
29940,
1299,
29931,
3289,
29918,
12648,
29918,
4690,
16310,
29903,
1495,
470,
29871,
29941,
13,
13,
12,
12,
29937,
4683,
591,
6068,
304,
12812,
1887,
14157,
29973,
13,
12,
12,
29937,
2648,
2322,
29892,
19518,
12566,
6053,
515,
885,
9450,
1009,
1887,
3564,
13,
12,
12,
1311,
29889,
16192,
29918,
2997,
353,
1583,
29889,
657,
29918,
11227,
877,
29940,
1299,
29931,
3289,
29918,
7187,
2190,
29918,
16652,
1964,
1495,
470,
7700,
13,
13,
12,
12,
29937,
2322,
931,
304,
4480,
363,
278,
1923,
304,
10049,
13,
12,
12,
1311,
29889,
3827,
29918,
15619,
353,
1583,
29889,
657,
29918,
524,
877,
29940,
1299,
29931,
3289,
29918,
16244,
29918,
15307,
12015,
1495,
470,
29871,
29896,
29945,
396,
6923,
13,
13,
12,
12,
29937,
5918,
12539,
995,
363,
25658,
1250,
2696,
310,
7274,
29892,
29871,
29945,
6233,
2322,
13,
12,
12,
1311,
29889,
1627,
2696,
29918,
3317,
353,
1583,
29889,
657,
29918,
524,
877,
29940,
1299,
29931,
3289,
29918,
29933,
11375,
27681,
29918,
12648,
1495,
470,
29871,
29941,
29900,
29900,
396,
6923,
13,
13,
12,
12,
29937,
7399,
995,
304,
3380,
278,
25658,
1250,
2696,
13,
12,
12,
1311,
29889,
1627,
2696,
29918,
3188,
353,
1583,
29889,
657,
29918,
524,
877,
29940,
1299,
29931,
3289,
29918,
29933,
11375,
27681,
29918,
25416,
1495,
470,
29871,
29896,
396,
6923,
13,
13,
12,
12,
29937,
5918,
12539,
1353,
310,
3064,
304,
337,
2202,
11834,
5367,
848,
1434,
6820,
701,
13,
12,
12,
29937,
910,
338,
5407,
565,
263,
3244,
338,
11834,
5367,
848,
393,
278,
1923,
1838,
29915,
29873,
2274,
363,
777,
2769,
13,
12,
12,
1311,
29889,
3317,
29918,
2267,
2722,
353,
1583,
29889,
657,
29918,
524,
877,
29940,
1299,
29931,
3289,
29918,
12648,
29918,
1525,
29911,
3960,
2890,
1495,
470,
29871,
29896,
29900,
13,
13,
12,
12,
29937,
13355,
2450,
1347,
393,
2893,
11057,
278,
10823,
393,
8560,
738,
2183,
12812,
13,
12,
12,
29937,
501,
8485,
363,
2566,
16280,
322,
6087,
297,
12812,
1962,
13,
12,
12,
1311,
29889,
14748,
29918,
333,
353,
2897,
29889,
21813,
29889,
657,
703,
29940,
1299,
29931,
3289,
29918,
10051,
3919,
29918,
1367,
1159,
470,
6213,
13,
13,
12,
12,
29937,
27241,
5993,
393,
19518,
508,
671,
304,
5193,
304,
278,
1923,
3450,
13,
12,
12,
29937,
9333,
4312,
565,
278,
1923,
338,
13252,
304,
1996,
10823,
10760,
13,
12,
12,
1311,
29889,
5150,
29918,
6979,
353,
2897,
29889,
21813,
29889,
657,
703,
29940,
1299,
29931,
3289,
29918,
10051,
3919,
29918,
4986,
29968,
1430,
1159,
470,
6213,
13,
13,
12,
12,
29937,
10831,
635,
4078,
2066,
393,
5229,
304,
6441,
13,
12,
12,
1311,
29889,
7620,
29918,
29888,
2234,
353,
1583,
29889,
657,
29918,
11227,
703,
29940,
1299,
29931,
3289,
29918,
29903,
7520,
29923,
29918,
4519,
6227,
29903,
1159,
470,
7700,
13,
13,
12,
12,
29937,
29408,
1873,
975,
24040,
363,
1887,
5849,
13,
12,
12,
29937,
405,
687,
404,
653,
304,
1243,
1873,
287,
3495,
848,
17475,
1434,
6507,
13,
12,
12,
1311,
29889,
3259,
29918,
15752,
353,
2897,
29889,
21813,
29889,
657,
703,
29940,
1299,
29931,
3289,
29918,
16358,
29918,
29949,
5348,
29934,
22027,
1159,
470,
6213,
13,
13,
12,
12,
1311,
29889,
29879,
8269,
29918,
6289,
29876,
353,
2897,
29889,
21813,
29889,
657,
703,
29903,
3919,
13207,
29918,
8452,
29940,
1159,
470,
6213,
13,
13,
12,
12,
361,
1583,
29889,
3259,
29918,
15752,
29901,
13,
12,
12,
12,
1311,
29889,
29940,
1299,
29931,
3289,
29918,
16358,
353,
1583,
29889,
3259,
29918,
15752,
13,
2
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.